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
Given a hash of CSS properties, returns a string of CSS. Uses property names asis (no camelcase conversion). Will not make statements for null/undefined values.
function cssToStr(cssProps) { var statements = []; for (var name_1 in cssProps) { var val = cssProps[name_1]; if (val != null && val !== '') { statements.push(name_1 + ':' + val); } } return statements.join(';'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cssToStr(cssProps) {\n var statements = [];\n\n for (var name_1 in cssProps) {\n var val = cssProps[name_1];\n\n if (val != null && val !== '') {\n statements.push(name_1 + ':' + val);\n }\n }\n\n return statements.join(';');\n } // Given an object hash of HTML attribute names to values,", "function cssToStr(cssProps){var statements=[];$.each(cssProps,function(name,val){if(val!=null){statements.push(name+':'+val);}});return statements.join(';');}", "function cssToStr(cssProps) {\n var statements = [];\n $.each(cssProps, function (name, val) {\n if (val != null) {\n statements.push(name + ':' + val);\n }\n });\n return statements.join(';');\n}", "function cssToStr(cssProps) {\n var statements = [];\n $.each(cssProps, function (name, val) {\n if (val != null) {\n statements.push(name + ':' + val);\n }\n });\n return statements.join(';');\n}", "function cssToStr(cssProps) {\n var statements = [];\n $.each(cssProps, function (name, val) {\n if (val != null) {\n statements.push(name + ':' + val);\n }\n });\n return statements.join(';');\n}", "function cssToStr(cssProps) {\n var statements = [];\n $.each(cssProps, function (name, val) {\n if (val != null) {\n statements.push(name + ':' + val);\n }\n });\n return statements.join(';');\n}", "function cssToStr(cssProps) {\n var statements = [];\n for (var name_1 in cssProps) {\n var val = cssProps[name_1];\n if (val != null && val !== '') {\n statements.push(name_1 + ':' + val);\n }\n }\n return statements.join(';');\n}", "function cssToStr(cssProps) {\n var statements = [];\n\n $.each(cssProps, function (name, val) {\n if (val != null) {\n statements.push(name + ':' + val);\n }\n });\n\n return statements.join(';');\n }", "function cssToStr(cssProps) {\n\tvar statements = [];\n\n\t$.each(cssProps, function(name, val) {\n\t\tif (val != null) {\n\t\t\tstatements.push(name + ':' + val);\n\t\t}\n\t});\n\n\treturn statements.join(';');\n}", "function cssToStr(cssProps) {\n\tvar statements = [];\n\n\t$.each(cssProps, function(name, val) {\n\t\tif (val != null) {\n\t\t\tstatements.push(name + ':' + val);\n\t\t}\n\t});\n\n\treturn statements.join(';');\n}", "function cssToStr(cssProps) {\n\tvar statements = [];\n\n\t$.each(cssProps, function(name, val) {\n\t\tif (val != null) {\n\t\t\tstatements.push(name + ':' + val);\n\t\t}\n\t});\n\n\treturn statements.join(';');\n}", "function cssToStr(cssProps) {\n\tvar statements = [];\n\n\t$.each(cssProps, function(name, val) {\n\t\tif (val != null) {\n\t\t\tstatements.push(name + ':' + val);\n\t\t}\n\t});\n\n\treturn statements.join(';');\n}", "function cssToStr(cssProps) {\n\tvar statements = [];\n\n\t$.each(cssProps, function(name, val) {\n\t\tif (val != null) {\n\t\t\tstatements.push(name + ':' + val);\n\t\t}\n\t});\n\n\treturn statements.join(';');\n}", "function cssToStr(cssProps) {\n\tvar statements = [];\n\n\t$.each(cssProps, function(name, val) {\n\t\tif (val != null) {\n\t\t\tstatements.push(name + ':' + val);\n\t\t}\n\t});\n\n\treturn statements.join(';');\n}", "function cssToStr(cssProps) {\n\tvar statements = [];\n\n\t$.each(cssProps, function(name, val) {\n\t\tif (val != null) {\n\t\t\tstatements.push(name + ':' + val);\n\t\t}\n\t});\n\n\treturn statements.join(';');\n}", "function cssToStr(cssProps) {\n\tvar statements = [];\n\n\t$.each(cssProps, function(name, val) {\n\t\tif (val != null) {\n\t\t\tstatements.push(name + ':' + val);\n\t\t}\n\t});\n\n\treturn statements.join(';');\n}", "get cssText(){\n\t\tvar properties = [];\n\t\tfor (var i=0, length=this.length; i < length; ++i) {\n\t\t\tvar name = this[i];\n\t\t\tvar value = this.getPropertyValue(name);\n\t\t\tvar priority = this.getPropertyPriority(name);\n\t\t\tif (priority) {\n\t\t\t\tpriority = \" !\" + priority;\n\t\t\t}\n\t\t\tproperties[i] = name + \": \" + value + priority + \";\";\n\t\t}\n\t\treturn properties.join(\" \");\n\t}", "get cssText(){\n\t\tvar properties = [];\n\t\tfor (var i=0, length=this.length; i < length; ++i) {\n\t\t\tvar name = this[i];\n\t\t\tvar value = this.getPropertyValue(name);\n\t\t\tvar priority = this.getPropertyPriority(name);\n\t\t\tif (priority) {\n\t\t\t\tpriority = \" !\" + priority;\n\t\t\t}\n\t\t\tproperties[i] = name + \": \" + value + priority + \";\";\n\t\t}\n\t\treturn properties.join(\" \");\n\t}", "function cssToStr(cssProps) {\n var statements = [];\n\n for (var name in cssProps) {\n var val = cssProps[name];\n\n if (val != null && val !== '') {\n statements.push(name + ':' + val);\n }\n }\n\n return statements.join(';');\n }", "get cssText() {\n var properties = [];\n for (var i = 0, length = this.length; i < length; ++i) {\n var name = this[i];\n var value = this.getPropertyValue(name);\n var priority = this.getPropertyPriority(name);\n if (priority) {\n priority = \" !\" + priority;\n }\n properties[i] = name + \": \" + value + priority + \";\";\n }\n return properties.join(\" \");\n }", "get cssText(){\n var properties = [];\n for (var i=0, length=this.length; i < length; ++i) {\n var name = this[i];\n var value = this.getPropertyValue(name);\n var priority = this.getPropertyPriority(name);\n if (priority) {\n priority = \" !\" + priority;\n }\n properties[i] = name + \": \" + value + priority + \";\";\n }\n return properties.join(\" \")\n }", "function stringifyProperties(properties) {\n\t return properties.map(function (p) { return styleToString(p[0], p[1]); }).join(';');\n\t}", "function cssToStr(cssProps) {\n\t\tvar statements = [];\n\n\t\t$.each(cssProps, function(name, val) {\n\t\t\tif (val != null) {\n\t\t\t\tstatements.push(name + ':' + val);\n\t\t\t}\n\t\t});\n\n\t\treturn statements.join(';');\n\t}", "function stringifyProperties(properties) {\n var end = properties.length - 1;\n var result = '';\n for (var i = 0; i < properties.length; i++) {\n var _a = properties[i], name = _a[0], value = _a[1];\n result += styleToString(name, value) + (i === end ? '' : ';');\n }\n return result;\n}", "function stringifyProperties(properties) {\n return properties.map(function (_a) {\n var name = _a[0], value = _a[1];\n if (!Array.isArray(value))\n return styleToString(name, value);\n return value.map(function (x) { return styleToString(name, x); }).join(';');\n }).join(';');\n}", "function toCss(key, value) {\n var p = '', css = '';\n if (value) {\n if (!/^[A-Z]/g.test(key)) {\n /[A-Z]/g.test(key) ? key = key.replace(/[A-Z]/g, function (e) { \n return '-' + e.toLowerCase(); \n }) : key;\n } else {\n var temp = '';\n while(/^[A-Z]/.test(key)) {\n temp += key.substr(0,1);\n key = key.substr(1);\n }\n\n key = '-'+temp.toLowerCase()+'-' + key.replace(/[A-Z]/g, function (e) { \n return '-' + e.toLowerCase(); \n });\n }\n\n css = key + \": \" + value + \";\";\n }\n return css;\n }", "function stringifyProperties(properties) {\n return properties\n .map(([name, value]) => {\n if (!Array.isArray(value))\n return styleToString(name, value);\n return value.map(x => styleToString(name, x)).join(\";\");\n })\n .join(\";\");\n}", "function stringifyProperties(properties) {\n return properties\n .map(([name, value]) => {\n if (!Array.isArray(value))\n return styleToString(name, value);\n return value.map(x => styleToString(name, x)).join(\";\");\n })\n .join(\";\");\n}", "function styleString(styleInfo){var o=[];for(var name in styleInfo){var v=styleInfo[name];if(v||v===0){o.push(\"\".concat(camelToDashCase(name),\": \").concat(v));}}return o.join('; ');}", "function cssFor() {\n for (var _len7 = arguments.length, rules = Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {\n rules[_key7] = arguments[_key7];\n }\n\n rules = (0, _clean2.default)(rules);\n return rules ? rules.map(function (r) {\n var style = { label: [] };\n build(style, { src: r }); // mutative! but worth it.\n return deconstructedStyleToCSS(hashify(style), deconstruct(style)).join('');\n }).join('') : '';\n}", "function cssFor() {\n for (var _len7 = arguments.length, rules = Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {\n rules[_key7] = arguments[_key7];\n }\n\n rules = (0, _clean2.default)(rules);\n return rules ? rules.map(function (r) {\n var style = { label: [] };\n build(style, { src: r }); // mutative! but worth it.\n return deconstructedStyleToCSS(hashify(style), deconstruct(style)).join('');\n }).join('') : '';\n}", "function cssFor() {\n for (var _len7 = arguments.length, rules = Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {\n rules[_key7] = arguments[_key7];\n }\n\n rules = (0, _clean2.default)(rules);\n return rules ? rules.map(function (r) {\n var style = { label: [] };\n build(style, { src: r }); // mutative! but worth it.\n return deconstructedStyleToCSS(hashify(style), deconstruct(style)).join('');\n }).join('') : '';\n}", "function cssFor() {\n for (var _len7 = arguments.length, rules = Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {\n rules[_key7] = arguments[_key7];\n }\n\n rules = (0, _clean2.default)(rules);\n return rules ? rules.map(function (r) {\n var style = { label: [] };\n build(style, { src: r }); // mutative! but worth it.\n return deconstructedStyleToCSS(hashify(style), deconstruct(style)).join('');\n }).join('') : '';\n}", "function cssFor() {\n for (var _len7 = arguments.length, rules = Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {\n rules[_key7] = arguments[_key7];\n }\n\n rules = (0, _clean2.default)(rules);\n return rules ? rules.map(function (r) {\n var style = { label: [] };\n build(style, { src: r }); // mutative! but worth it.\n return deconstructedStyleToCSS(hashify(style), deconstruct(style)).join('');\n }).join('') : '';\n}", "function cssFor() {\n for (var _len7 = arguments.length, rules = Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {\n rules[_key7] = arguments[_key7];\n }\n\n rules = (0, _clean2.default)(rules);\n return rules ? rules.map(function (r) {\n var style = { label: [] };\n build(style, { src: r }); // mutative! but worth it.\n return deconstructedStyleToCSS(hashify(style), deconstruct(style)).join('');\n }).join('') : '';\n}", "function getCSSStyle(key, value) {\n if(value && value.value) {\n return key + \": \" + value.value +\";\";\n }\n else\n return \"\";\n }", "function get_computed_value(cs, property)\n{\n var info = gCSSProperties[property];\n if (info.type == CSS_TYPE_TRUE_SHORTHAND ||\n (info.type == CSS_TYPE_SHORTHAND_AND_LONGHAND &&\n (property == \"text-decoration\" || property == \"mask\"))) {\n var results = [];\n for (var idx in info.subproperties) {\n var subprop = info.subproperties[idx];\n results.push(get_computed_value(cs, subprop));\n }\n return results.join(\" ; \");\n }\n if (info.get_computed)\n return info.get_computed(cs, property);\n return cs.getPropertyValue(property);\n}", "function evaluateStyle(styleProperties_)\n{\n\tlet s = \"\";\n\tfor(let i = 0; i < styleProperties_.length; ++i)\n\t{\n\t\tif (i != 0)\n\t\t\ts += \";\";\n\t\ts += evaluateStyleRule(styleProperties_[i]);\n\t}\n\treturn s;\n}", "function cssFor() {\n for (var _len8 = arguments.length, rules = Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {\n rules[_key8] = arguments[_key8];\n }\n\n rules = (0, _clean2.default)(rules);\n return rules ? rules.map(function (r) {\n var style = { label: [] };\n build(style, { src: r }); // mutative! but worth it. \n return deconstructedStyleToCSS(hashify(style), deconstruct(style)).join('');\n }).join('') : '';\n}", "function getProperties(props) {\n var re = [];\n\n $.each(props, function(key) {\n key = $.camelCase(key); // Convert \"text-align\" => \"textAlign\"\n key = $.transit.propertyMap[key] || $.cssProps[key] || key;\n key = uncamel(key); // Convert back to dasherized\n\n if ($.inArray(key, re) === -1) { re.push(key); }\n });\n\n return re;\n }", "function utilFromCssProperty(cssName) {\n\t\tif (!cssName.includes('-')) {\n\t\t\tswitch (cssName) {\n\t\t\tcase 'bgcolor': return 'backgroundColor';\n\t\t\tcase 'float': return 'cssFloat';\n\t\t\tdefault: return cssName;\n\t\t\t}\n\t\t}\n\n\t\t// Strip the leading hyphen from the `-ms-` vendor prefix, so it stays lowercased.\n\t\tconst normalized = cssName.slice(0, 4) === '-ms-' ? cssName.slice(1) : cssName;\n\n\t\treturn normalized\n\t\t\t.split('-')\n\t\t\t.map((part, i) => i === 0 ? part : part.toUpperFirst())\n\t\t\t.join('');\n\t}", "function getProperties(props) {\n var re = [];\n\n jQuery.each(props, function(key) {\n key = jQuery.camelCase(key); // Convert \"text-align\" => \"textAlign\"\n key = jQuery.transit.propertyMap[key] || jQuery.cssProps[key] || key;\n key = uncamel(key); // Convert back to dasherized\n\n if (jQuery.inArray(key, re) === -1) {\n re.push(key);\n }\n });\n\n return re;\n }", "function cssstyle(name) {\n return name.replace(/[A-Z]/g, function(m) { return '-'+m.toLowerCase(); })\n}", "function getProperties(props) {\n var re = [];\n\n $.each(props, function(key) {\n key = $.camelCase(key); // Convert \"text-align\" => \"textAlign\"\n key = $.transit.propertyMap[key] || $.cssProps[key] || key;\n key = uncamel(key); // Convert back to dasherized\n\n // Get vendor specify propertie\n if (support[key])\n key = uncamel(support[key]);\n\n if ($.inArray(key, re) === -1) { re.push(key); }\n });\n\n return re;\n }", "function buildPropertyList(properties, cssClass) {\n cssClass = cssClass === undefined ? \"prop-name\" : cssClass;\n var html = \"\";\n Object.getOwnPropertyNames(properties).forEach(function(key) {\n html += \"<span class='\" + cssClass + \"'>\" + escapeHtml(key) + \": </span>\";\n html += \"<span style='prop-value'>\" + escapeHtml(properties[key]) + \"</span><br />\";\n });\n return html;\n }", "function xCamelize(cssPropStr)\n{\n var i, c, a, s;\n a = cssPropStr.split('-');\n s = a[0];\n for (i=1; i<a.length; ++i) {\n c = a[i].charAt(0);\n s += a[i].replace(c, c.toUpperCase());\n }\n return s;\n}", "function getProperties(props) {\n\t var re = [];\n\t\n\t $.each(props, function(key) {\n\t key = $.camelCase(key); // Convert \"text-align\" => \"textAlign\"\n\t key = $.transit.propertyMap[key] || $.cssProps[key] || key;\n\t key = uncamel(key); // Convert back to dasherized\n\t\n\t // Get vendor specify propertie\n\t if (support[key])\n\t key = uncamel(support[key]);\n\t\n\t if ($.inArray(key, re) === -1) { re.push(key); }\n\t });\n\t\n\t return re;\n\t }", "function getProperties(props) {\n var re = [];\n\n $.each(props, function(key) {\n key = $.camelCase(key); // Convert \"text-align\" => \"textAlign\"\n key = $.transit.propertyMap[key] || $.cssProps[key] || key;\n key = uncamel(key); // Convert back to dasherized\n\n // Get vendor specify propertie\n if (support[key])\n key = uncamel(support[key]);\n\n if ($.inArray(key, re) === -1) {\n re.push(key);\n }\n });\n\n return re;\n }", "function createDangerousStringForStyles(styles) {\n var serialized = '';\n var delimiter = '';\n for(var styleName in styles){\n if (!styles.hasOwnProperty(styleName)) continue;\n var styleValue = styles[styleName];\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n return serialized || null;\n }", "function css2json(css) {\n var s = {};\n if (!css) return s;\n if (css instanceof CSSStyleDeclaration) {\n for (var i in css) {\n if ((css[i]).toLowerCase) {\n s[(css[i]).toLowerCase()] = (css[css[i]]);\n }\n }\n } else if (typeof css == \"string\") {\n css = css.split(\"; \");\n for (var i in css) {\n var l = css[i].split(\": \");\n s[l[0].toLowerCase()] = (l[1]);\n }\n }\n return s;\n }", "function getStyleString(styleJson) {\n /* tslint:disable */\n return Object.entries(styleJson).reduce((styleString, [propName, propValue]) => {\n return `${styleString}${propName}:${propValue};`;\n }, '');\n }", "function toCss(selector, style, options) {\n if (options === void 0) {\n options = {};\n }\n\n var result = '';\n if (!style) return result;\n var _options = options,\n _options$indent = _options.indent,\n indent = _options$indent === void 0 ? 0 : _options$indent;\n var fallbacks = style.fallbacks;\n if (selector) indent++; // Apply fallbacks first.\n\n if (fallbacks) {\n // Array syntax {fallbacks: [{prop: value}]}\n if (Array.isArray(fallbacks)) {\n for (var index = 0; index < fallbacks.length; index++) {\n var fallback = fallbacks[index];\n\n for (var prop in fallback) {\n var value = fallback[prop];\n\n if (value != null) {\n if (result) result += '\\n';\n result += \"\" + indentStr(prop + \": \" + toCssValue(value) + \";\", indent);\n }\n }\n }\n } else {\n // Object syntax {fallbacks: {prop: value}}\n for (var _prop in fallbacks) {\n var _value = fallbacks[_prop];\n\n if (_value != null) {\n if (result) result += '\\n';\n result += \"\" + indentStr(_prop + \": \" + toCssValue(_value) + \";\", indent);\n }\n }\n }\n }\n\n for (var _prop2 in style) {\n var _value2 = style[_prop2];\n\n if (_value2 != null && _prop2 !== 'fallbacks') {\n if (result) result += '\\n';\n result += \"\" + indentStr(_prop2 + \": \" + toCssValue(_value2) + \";\", indent);\n }\n } // Allow empty style in this case, because properties will be added dynamically.\n\n\n if (!result && !options.allowEmpty) return result; // When rule is being stringified before selector was defined.\n\n if (!selector) return result;\n indent--;\n if (result) result = \"\\n\" + result + \"\\n\";\n return indentStr(selector + \" {\" + result, indent) + indentStr('}', indent);\n }", "function toCss(selector, style, options) {\n if (options === void 0) options = {\n };\n var result = '';\n if (!style) return result;\n var _options = options, _options$indent = _options.indent, indent = _options$indent === void 0 ? 0 : _options$indent;\n var fallbacks = style.fallbacks;\n if (selector) indent++; // Apply fallbacks first.\n if (fallbacks) {\n // Array syntax {fallbacks: [{prop: value}]}\n if (Array.isArray(fallbacks)) for(var index = 0; index < fallbacks.length; index++){\n var fallback = fallbacks[index];\n for(var prop in fallback){\n var value = fallback[prop];\n if (value != null) {\n if (result) result += '\\n';\n result += \"\" + indentStr(prop + \": \" + toCssValue(value) + \";\", indent);\n }\n }\n }\n else // Object syntax {fallbacks: {prop: value}}\n for(var _prop in fallbacks){\n var _value = fallbacks[_prop];\n if (_value != null) {\n if (result) result += '\\n';\n result += \"\" + indentStr(_prop + \": \" + toCssValue(_value) + \";\", indent);\n }\n }\n }\n for(var _prop2 in style){\n var _value2 = style[_prop2];\n if (_value2 != null && _prop2 !== 'fallbacks') {\n if (result) result += '\\n';\n result += \"\" + indentStr(_prop2 + \": \" + toCssValue(_value2) + \";\", indent);\n }\n } // Allow empty style in this case, because properties will be added dynamically.\n if (!result && !options.allowEmpty) return result; // When rule is being stringified before selector was defined.\n if (!selector) return result;\n indent--;\n if (result) result = \"\\n\" + result + \"\\n\";\n return indentStr(selector + \" {\" + result, indent) + indentStr('}', indent);\n}", "function $EiDS$var$cssFor() {\n for (var _len7 = arguments.length, rules = Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {\n rules[_key7] = arguments[_key7];\n }\n\n rules = (0, $EiDS$var$_clean2.default)(rules);\n return rules ? rules.map(function (r) {\n var style = {\n label: []\n };\n $EiDS$var$build(style, {\n src: r\n }); // mutative! but worth it.\n\n return $EiDS$var$deconstructedStyleToCSS($EiDS$var$hashify(style), $EiDS$var$deconstruct(style)).join('');\n }).join('') : '';\n}", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n }", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n }", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n }", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n }", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n }", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n }", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n }", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n }", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n }", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n }", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + hyphenateStyleName(styleName) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n }", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + hyphenateStyleName(styleName) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n }", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + hyphenateStyleName(styleName) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n }", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n var styleValue = styles[styleName];\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n return serialized || null;\n }\n }", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n var styleValue = styles[styleName];\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + hyphenateStyleName(styleName) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n\n delimiter = ';';\n }\n }\n return serialized || null;\n }\n }", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n var styleValue = styles[styleName];\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + hyphenateStyleName(styleName) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n\n delimiter = ';';\n }\n }\n return serialized || null;\n }\n }", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n var styleValue = styles[styleName];\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + hyphenateStyleName(styleName) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n\n delimiter = ';';\n }\n }\n return serialized || null;\n }\n }", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n var styleValue = styles[styleName];\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + hyphenateStyleName(styleName) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n return serialized || null;\n }\n }", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n}", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n}", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n}", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n}", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n}", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n}", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n}", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n}", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n}", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n}", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n}", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n}", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n}", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n}", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n}", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n}", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n}", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n}", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n}", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n}", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n}", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n}", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n}", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n}", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n}", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n}" ]
[ "0.73140204", "0.7179752", "0.7159448", "0.7159448", "0.7159448", "0.7159448", "0.708191", "0.70214397", "0.69848025", "0.69848025", "0.69848025", "0.69848025", "0.69848025", "0.69848025", "0.69848025", "0.69848025", "0.6977314", "0.6977314", "0.6975481", "0.6921566", "0.6891217", "0.68571573", "0.6850069", "0.669116", "0.65155077", "0.6461675", "0.64322263", "0.64322263", "0.6381656", "0.62988716", "0.62988716", "0.62988716", "0.62988716", "0.62988716", "0.62988716", "0.6255341", "0.6208477", "0.6134677", "0.61135894", "0.6078123", "0.5967837", "0.59648615", "0.59642303", "0.5941996", "0.5925925", "0.5841752", "0.5838471", "0.5836174", "0.5835375", "0.58182967", "0.58130676", "0.580625", "0.5800242", "0.57910985", "0.5787318", "0.5787318", "0.5787318", "0.5787318", "0.5787318", "0.5787318", "0.5787318", "0.5787318", "0.5787318", "0.5787318", "0.5787182", "0.5787182", "0.5787182", "0.5783172", "0.57824165", "0.57824165", "0.57824165", "0.57758784", "0.57751054", "0.57751054", "0.57751054", "0.57751054", "0.57751054", "0.57751054", "0.57751054", "0.57751054", "0.57751054", "0.57751054", "0.57751054", "0.57751054", "0.57751054", "0.57751054", "0.57751054", "0.57751054", "0.57751054", "0.57751054", "0.57751054", "0.57751054", "0.57751054", "0.57751054", "0.57751054", "0.57751054", "0.57751054", "0.57751054" ]
0.69908786
10
Given an object hash of HTML attribute names to values, generates a string that can be injected between in HTML
function attrsToStr(attrs) { var parts = []; for (var name_2 in attrs) { var val = attrs[name_2]; if (val != null) { parts.push(name_2 + '="' + htmlEscape(val) + '"'); } } return parts.join(' '); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_hashTag(tag, attrs, isVoid) {\n const start = `<${tag}`;\n const strAttrs = Object.keys(attrs).sort().map((name) => ` ${name}=${attrs[name]}`).join('');\n const end = isVoid ? '/>' : `></${tag}>`;\n return start + strAttrs + end;\n }", "_hashTag(tag, attrs, isVoid) {\n const start = `<${tag}`;\n const strAttrs = Object.keys(attrs).sort().map((name) => ` ${name}=${attrs[name]}`).join('');\n const end = isVoid ? '/>' : `></${tag}>`;\n return start + strAttrs + end;\n }", "_hashTag(tag, attrs, isVoid) {\n const start = `<${tag}`;\n const strAttrs = Object.keys(attrs).sort().map((name) => ` ${name}=${attrs[name]}`).join('');\n const end = isVoid ? '/>' : `></${tag}>`;\n return start + strAttrs + end;\n }", "_hashTag(tag, attrs, isVoid) {\n const start = `<${tag}`;\n const strAttrs = Object.keys(attrs).sort().map((name) => ` ${name}=${attrs[name]}`).join('');\n const end = isVoid ? '/>' : `></${tag}>`;\n return start + strAttrs + end;\n }", "getAttributes() {\n return Object.keys(this.attributes).map(\n key => ' ' + key + '=\"' + escapeHTML(this.attributes[key]) + '\"'\n ).join('');\n }", "function kwtoattr(html_attrs, merge){\n var k,v;\n var rv = '';\n if (merge) {\n for (k in merge) {\n if (merge.hasOwnProperty(k)) {\n v = merge[k];\n if(html_attrs.hasOwnProperty(k)){\n v = html_attrs[k] + ' ' + v\n }\n html_attrs[k] = v\n }\n }\n }\n\n var booleanAttributes = \" hidden novalidate formnovalidate readonly required multiple autofocus disabled selected\";\n\n for (k in html_attrs){\n if(!html_attrs.hasOwnProperty(k) || typeof html_attrs[k] !== 'string')\n continue;\n\n if (booleanAttributes.indexOf(\" \" + k + \" \") > -1) {\n if (html_attrs[k]==k || html_attrs[k]==\"\") //otherwise omit\n rv += k + \" \";\n } else {\n rv += k + '= \"' + html_attrs[k].replace(/&/g,'&amp;').replace(/\"/g,'&quot;') + '\" ';\n }\n }\n return rv;\n }", "getHTML() {\n const endIndex = this.strings.length - 1;\n let html = '';\n for (let i = 0; i < endIndex; i++) {\n const s = this.strings[i];\n // This exec() call does two things:\n // 1) Appends a suffix to the bound attribute name to opt out of special\n // attribute value parsing that IE11 and Edge do, like for style and\n // many SVG attributes. The Template class also appends the same suffix\n // when looking up attributes to create Parts.\n // 2) Adds an unquoted-attribute-safe marker for the first expression in\n // an attribute. Subsequent attribute expressions will use node markers,\n // and this is safe since attributes with multiple expressions are\n // guaranteed to be quoted.\n const match = lastAttributeNameRegex.exec(s);\n if (match) {\n // We're starting a new bound attribute.\n // Add the safe attribute suffix, and use unquoted-attribute-safe\n // marker.\n html += s.substr(0, match.index) + match[1] + match[2] +\n boundAttributeSuffix + match[3] + marker;\n }\n else {\n // We're either in a bound node, or trailing bound attribute.\n // Either way, nodeMarker is safe to use.\n html += s + nodeMarker;\n }\n }\n return html + this.strings[endIndex];\n }", "function attribToHtml(str) {\n return str.replace(pr_amp, '&amp;')\n .replace(pr_lt, '&lt;')\n .replace(pr_gt, '&gt;')\n .replace(pr_quot, '&quot;');\n }", "function attribToHtml(str) {\n return str.replace(pr_amp, '&amp;')\n .replace(pr_lt, '&lt;')\n .replace(pr_gt, '&gt;')\n .replace(pr_quot, '&quot;');\n }", "function html(h, ...values){ return h.join('');}", "function make_attributes (attr) {\n\t\tvar attr_str = '';\n\t\tfor (var k in attr) {\n\t\t\tif (k && attr[k] != null) attr_str += ' '+ k +'='+ '\"'+ attr[k] +'\"';\n\t\t}\n\t\treturn attr_str;\n\t}", "function attr(a,b){return ' '+a+'=\"'+b+'\"';}", "function attrsToStr(attrs){var parts=[];$.each(attrs,function(name,val){if(val!=null){parts.push(name+'=\"'+htmlEscape(val)+'\"');}});return parts.join(' ');}", "function attrStr(k, v) {\n return isDefined(v) ? ' ' + k + '=\"' + v + '\"' : '';\n }", "function attrStr(k, v) {\n return isDefined(v) ? ' ' + k + '=\"' + v + '\"' : '';\n }", "function _htmlElementAsString(el, keyAttrs) {\n const elem = el\n\n;\n\n const out = [];\n let className;\n let classes;\n let key;\n let attr;\n let i;\n\n if (!elem || !elem.tagName) {\n return '';\n }\n\n out.push(elem.tagName.toLowerCase());\n\n // Pairs of attribute keys defined in `serializeAttribute` and their values on element.\n const keyAttrPairs =\n keyAttrs && keyAttrs.length\n ? keyAttrs.filter(keyAttr => elem.getAttribute(keyAttr)).map(keyAttr => [keyAttr, elem.getAttribute(keyAttr)])\n : null;\n\n if (keyAttrPairs && keyAttrPairs.length) {\n keyAttrPairs.forEach(keyAttrPair => {\n out.push(`[${keyAttrPair[0]}=\"${keyAttrPair[1]}\"]`);\n });\n } else {\n if (elem.id) {\n out.push(`#${elem.id}`);\n }\n\n // eslint-disable-next-line prefer-const\n className = elem.className;\n if (className && is.isString(className)) {\n classes = className.split(/\\s+/);\n for (i = 0; i < classes.length; i++) {\n out.push(`.${classes[i]}`);\n }\n }\n }\n const allowedAttrs = ['type', 'name', 'title', 'alt'];\n for (i = 0; i < allowedAttrs.length; i++) {\n key = allowedAttrs[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.push(`[${key}=\"${attr}\"]`);\n }\n }\n return out.join('');\n}", "function _htmlElementAsString(el, keyAttrs) {\n const elem = el\n\n ;\n\n const out = [];\n let className;\n let classes;\n let key;\n let attr;\n let i;\n\n if (!elem || !elem.tagName) {\n return '';\n }\n\n out.push(elem.tagName.toLowerCase());\n\n // Pairs of attribute keys defined in `serializeAttribute` and their values on element.\n const keyAttrPairs =\n keyAttrs && keyAttrs.length\n ? keyAttrs.filter(keyAttr => elem.getAttribute(keyAttr)).map(keyAttr => [keyAttr, elem.getAttribute(keyAttr)])\n : null;\n\n if (keyAttrPairs && keyAttrPairs.length) {\n keyAttrPairs.forEach(keyAttrPair => {\n out.push(`[${keyAttrPair[0]}=\"${keyAttrPair[1]}\"]`);\n });\n } else {\n if (elem.id) {\n out.push(`#${elem.id}`);\n }\n\n // eslint-disable-next-line prefer-const\n className = elem.className;\n if (className && isString(className)) {\n classes = className.split(/\\s+/);\n for (i = 0; i < classes.length; i++) {\n out.push(`.${classes[i]}`);\n }\n }\n }\n const allowedAttrs = ['aria-label', 'type', 'name', 'title', 'alt'];\n for (i = 0; i < allowedAttrs.length; i++) {\n key = allowedAttrs[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.push(`[${key}=\"${attr}\"]`);\n }\n }\n return out.join('');\n }", "function _htmlElementAsString(el, keyAttrs) {\n\t const elem = el\n\n\t;\n\n\t const out = [];\n\t let className;\n\t let classes;\n\t let key;\n\t let attr;\n\t let i;\n\n\t if (!elem || !elem.tagName) {\n\t return '';\n\t }\n\n\t out.push(elem.tagName.toLowerCase());\n\n\t // Pairs of attribute keys defined in `serializeAttribute` and their values on element.\n\t const keyAttrPairs =\n\t keyAttrs && keyAttrs.length\n\t ? keyAttrs.filter(keyAttr => elem.getAttribute(keyAttr)).map(keyAttr => [keyAttr, elem.getAttribute(keyAttr)])\n\t : null;\n\n\t if (keyAttrPairs && keyAttrPairs.length) {\n\t keyAttrPairs.forEach(keyAttrPair => {\n\t out.push(`[${keyAttrPair[0]}=\"${keyAttrPair[1]}\"]`);\n\t });\n\t } else {\n\t if (elem.id) {\n\t out.push(`#${elem.id}`);\n\t }\n\n\t // eslint-disable-next-line prefer-const\n\t className = elem.className;\n\t if (className && isString$2(className)) {\n\t classes = className.split(/\\s+/);\n\t for (i = 0; i < classes.length; i++) {\n\t out.push(`.${classes[i]}`);\n\t }\n\t }\n\t }\n\t const allowedAttrs = ['type', 'name', 'title', 'alt'];\n\t for (i = 0; i < allowedAttrs.length; i++) {\n\t key = allowedAttrs[i];\n\t attr = elem.getAttribute(key);\n\t if (attr) {\n\t out.push(`[${key}=\"${attr}\"]`);\n\t }\n\t }\n\t return out.join('');\n\t}", "function encodeAttr(str) {\n\treturn (str+'').replace(/\"/g, '&quot;').replace(/</g, '&lt;').replace(/>/g, '&gt;');\n}", "function attrStr(k,v) {\n return angular.isDefined(v) ? ' ' + k + '=\"' + v + '\"' : '';\n }", "function _htmlElementAsString(el, keyAttrs) {\n var _a, _b;\n var elem = el;\n var out = [];\n var className;\n var classes;\n var key;\n var attr;\n var i;\n if (!elem || !elem.tagName) {\n return '';\n }\n out.push(elem.tagName.toLowerCase());\n // Pairs of attribute keys defined in `serializeAttribute` and their values on element.\n var keyAttrPairs = ((_a = keyAttrs) === null || _a === void 0 ? void 0 : _a.length) ? keyAttrs.filter(function (keyAttr) { return elem.getAttribute(keyAttr); }).map(function (keyAttr) { return [keyAttr, elem.getAttribute(keyAttr)]; })\n : null;\n if ((_b = keyAttrPairs) === null || _b === void 0 ? void 0 : _b.length) {\n keyAttrPairs.forEach(function (keyAttrPair) {\n out.push(\"[\" + keyAttrPair[0] + \"=\\\"\" + keyAttrPair[1] + \"\\\"]\");\n });\n }\n else {\n if (elem.id) {\n out.push(\"#\" + elem.id);\n }\n // eslint-disable-next-line prefer-const\n className = elem.className;\n if (className && is_1.isString(className)) {\n classes = className.split(/\\s+/);\n for (i = 0; i < classes.length; i++) {\n out.push(\".\" + classes[i]);\n }\n }\n }\n var allowedAttrs = ['type', 'name', 'title', 'alt'];\n for (i = 0; i < allowedAttrs.length; i++) {\n key = allowedAttrs[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.push(\"[\" + key + \"=\\\"\" + attr + \"\\\"]\");\n }\n }\n return out.join('');\n}", "function htmlAttr(s) {\n\treturn String(s).replace(/[&<>\"\\n\\r\\t]/g, function (c) { return ESCAPES[c]; });\n}", "function cssToStr(cssProps) {\n var statements = [];\n\n for (var name_1 in cssProps) {\n var val = cssProps[name_1];\n\n if (val != null && val !== '') {\n statements.push(name_1 + ':' + val);\n }\n }\n\n return statements.join(';');\n } // Given an object hash of HTML attribute names to values,", "function attr(a, b) {\n return ' ' + a + '=\"' + b + '\"';\n }", "getHTML() {\n const l = this.strings.length - 1;\n let html = '';\n let isTextBinding = true;\n for (let i = 0; i < l; i++) {\n const s = this.strings[i];\n html += s;\n const close = s.lastIndexOf('>');\n // We're in a text position if the previous string closed its last tag, an\n // attribute position if the string opened an unclosed tag, and unchanged\n // if the string had no brackets at all:\n //\n // \"...>...\": text position. open === -1, close > -1\n // \"...<...\": attribute position. open > -1\n // \"...\": no change. open === -1, close === -1\n isTextBinding = (close > -1 || isTextBinding) && s.indexOf('<', close + 1) === -1;\n if (!isTextBinding && _template.rewritesStyleAttribute) {\n html = html.replace(_template.lastAttributeNameRegex, (match, p1, p2, p3) => {\n return p2 === 'style' ? `${p1}style$${p3}` : match;\n });\n }\n html += isTextBinding ? _template.nodeMarker : _template.marker;\n }\n html += this.strings[l];\n return html;\n }", "getCustomAttributes( data ){\n // only items which are objects have properties which can be used as attributes\n if( !isObject(data) )\n return '';\n\n var output = {}, propName;\n\n for( propName in data ){\n if( propName.slice(0,2) != '__' && propName != 'class' && data.hasOwnProperty(propName) && data[propName] !== undefined )\n output[propName] = escapeHTML(data[propName])\n }\n return output\n }", "function displayCustomAttributes() {\n let customAttributeArray = Object.keys(CUSTOM_QUALIFICATION_DATA);\n let customAttributeHtml = \"\";\n for (let i = 0; i < customAttributeArray.length; i++) {\n customAttributeHtml = customAttributeHtml +\n customAttributeArray[i]+\":\"+\n \"<input type='text' id='custom\"+customAttributeArray[i]+\"'>\"+\n \"<br>\";\n }\n document.getElementById('customAttributes').innerHTML = customAttributeHtml;\n}", "function stringifyElement(field) {\n const attributesToInclude = ['action', 'autocomplete', 'for', 'id', 'name', 'placeholder'];\n // entry[0] is an attribute name, entry[1] is an attribute value (which may be null or empty).\n let attributes = Object.entries(field)\n .filter(entry => attributesToInclude.includes(entry[0]))\n // Iinclude empty attributes, e.g. for=\"\", but not missing attributes.\n .filter(entry => field[entry[0]] !== null)\n .map(entry => `${entry[0]}=\"${entry[1]}\"`).join(' ');\n const openingTag = `&lt;${field.tagName}${attributes ? ' ' + attributes : ''}&gt;`;\n return field.tagName === 'label' ?\n `<code>${openingTag}${field.textContent || ''}&lt;/label&gt;</code>` :\n `<code>${openingTag}</code>`;\n}", "function htmlAttributeDisplayDetails() {}", "function createHTML(hashTable){\n return '<!DOCTYPE html>\\n' +\n '<html lang=\"en\">\\n' +\n '\\t<head>\\n' +\n '\\t\\t<meta charset=\"UTF-8\">\\n' +\n '\\t\\t<title>The Elements - ' + hashTable.elementName + '</title>\\n'+\n '\\t\\t<link rel=\"stylesheet\" href=\"css/styles.css\">\\n'+\n '\\t</head>\\n'+\n '\\t<body>\\n' +\n '\\t\\t<h1>' + hashTable.elementName + '</h1>\\n' +\n '\\t\\t<h2>' + hashTable.elementSymbol + '</h2>\\n' +\n '\\t\\t<h3>Atomic number ' + hashTable.elementAtomicNumber + '</h3>\\n' +\n '\\t\\t<p>' + hashTable.elementDescription + '</p>\\n' +\n '\\t\\t<p><a href=\"/\">back</a></p>\\n' +\n '\\t</body>\\n'+\n '</html>';\n}", "function attrsToStr(attrs) {\n var parts = [];\n $.each(attrs, function (name, val) {\n if (val != null) {\n parts.push(name + '=\"' + htmlEscape(val) + '\"');\n }\n });\n return parts.join(' ');\n}", "function attrsToStr(attrs) {\n var parts = [];\n $.each(attrs, function (name, val) {\n if (val != null) {\n parts.push(name + '=\"' + htmlEscape(val) + '\"');\n }\n });\n return parts.join(' ');\n}", "function attrsToStr(attrs) {\n var parts = [];\n $.each(attrs, function (name, val) {\n if (val != null) {\n parts.push(name + '=\"' + htmlEscape(val) + '\"');\n }\n });\n return parts.join(' ');\n}", "function attrsToStr(attrs) {\n var parts = [];\n $.each(attrs, function (name, val) {\n if (val != null) {\n parts.push(name + '=\"' + htmlEscape(val) + '\"');\n }\n });\n return parts.join(' ');\n}", "function escape_attr(m)\n{\n if (!m)\n return m;\n\n var n = \"\";\n for (var i = 0; i < m.length; i++) {\n var c = m[i];\n // This assumes that all attributes are wrapped in '', never \"\".\n if (c === \"'\") { n += \"&#039;\"; continue; }\n n += c;\n }\n \n return n;\n}", "function $EiDS$var$hashify(obj) {\n var str = JSON.stringify(obj);\n var toRet = (0, $EiDS$var$_hash2.default)(str).toString(36);\n\n if (obj.label && obj.label.length > 0 && $EiDS$var$isDev) {\n return $EiDS$var$simple(obj.label.join('.'), '-') + '-' + toRet;\n }\n\n return toRet;\n} // of shape { 'data-css-<id>': '' }", "function walkAttributes(html, fn) {\n var m, re = /([-\\w]+) ?= ?(?:\"([^\"]*)|'([^']*)|({[^}]*}))/g;\n while (m = re.exec(html)) {\n fn(m[1].toLowerCase(), m[2] || m[3] || m[4])\n }\n }", "function wrapElemInnerHTML(name, content, attrObj) {\n var result = [];\n result.push(\"<\");\n result.push(name);\n for (var key in attrObj) {\n if (attrObj.hasOwnProperty(key)) {\n result.push(\" \");\n result.push(key);\n result.push(\"=\\\"\");\n result.push(attrObj[key]);\n result.push(\"\\\"\");\n }\n }\n result.push(\">\");\n result.push(content);\n result.push(\"</\");\n result.push(name);\n result.push(\">\");\n return result.join(\"\");\n}", "function attrsToStr(attrs) {\n var parts = [];\n for (var name_2 in attrs) {\n var val = attrs[name_2];\n if (val != null) {\n parts.push(name_2 + '=\"' + htmlEscape(val) + '\"');\n }\n }\n return parts.join(' ');\n}", "function createHtml(o){\n var b = '',\n attr,\n val,\n key,\n keyVal,\n cn;\n\n if(typeof o == \"string\"){\n b = o;\n } else if (Ext.isArray(o)) {\n for (var i=0; i < o.length; i++) {\n if(o[i]) {\n b += createHtml(o[i]);\n }\n };\n } else {\n b += '<' + (o.tag = o.tag || 'div');\n for (attr in o) {\n val = o[attr];\n if(!confRe.test(attr)){\n if (typeof val == \"object\") {\n b += ' ' + attr + '=\"';\n for (key in val) {\n b += key + ':' + val[key] + ';';\n };\n b += '\"';\n }else{\n b += ' ' + ({cls : 'class', htmlFor : 'for'}[attr] || attr) + '=\"' + val + '\"';\n }\n }\n };\n // Now either just close the tag or try to add children and close the tag.\n if (emptyTags.test(o.tag)) {\n b += '/>';\n } else {\n b += '>';\n if ((cn = o.children || o.cn)) {\n b += createHtml(cn);\n } else if(o.html){\n b += o.html;\n }\n b += '</' + o.tag + '>';\n }\n }\n return b;\n }", "function makeAttributes(attrs) {\n\t\tvar attributes = '{';\n\t\tvar attr = void 0;\n\n\t\twhile (attr = attrRegExp.exec(attrs)) {\n\t\t\tif (attributes !== '{') attributes += ', ';\n\t\t\tattributes += '\"' + attr[1].toLowerCase() + '\": ' + handleText(attr[2] || attr[3] || '', true).replace(/\\s*[,+]\\s*$/g, '');\n\t\t}\n\t\treturn attributes + '}';\n\t}", "function displayStandardAttributes() {\n let standardAttributeArray = Object.keys(STANDARD_QUALIFICATION_DATA);\n let standardAttributeHtml = \"\";\n for (let i = 0; i < standardAttributeArray.length; i++) {\n standardAttributeHtml = standardAttributeHtml +\n standardAttributeArray[i]+\":\"+\n \"<input type='text' id='standard\"+standardAttributeArray[i]+\"'>\"+\n \"<br>\";\n }\n document.getElementById('standardAttributes').innerHTML = standardAttributeHtml;\n}", "getHTML(){const l=this.strings.length-1;let html='';let isCommentBinding=false;for(let i=0;i<l;i++){const s=this.strings[i];// For each binding we want to determine the kind of marker to insert\n// into the template source before it's parsed by the browser's HTML\n// parser. The marker type is based on whether the expression is in an\n// attribute, text, or comment position.\n// * For node-position bindings we insert a comment with the marker\n// sentinel as its text content, like <!--{{lit-guid}}-->.\n// * For attribute bindings we insert just the marker sentinel for the\n// first binding, so that we support unquoted attribute bindings.\n// Subsequent bindings can use a comment marker because multi-binding\n// attributes must be quoted.\n// * For comment bindings we insert just the marker sentinel so we don't\n// close the comment.\n//\n// The following code scans the template source, but is *not* an HTML\n// parser. We don't need to track the tree structure of the HTML, only\n// whether a binding is inside a comment, and if not, if it appears to be\n// the first binding in an attribute.\nconst commentOpen=s.lastIndexOf('<!--');// We're in comment position if we have a comment open with no following\n// comment close. Because <-- can appear in an attribute value there can\n// be false positives.\nisCommentBinding=(commentOpen>-1||isCommentBinding)&&s.indexOf('-->',commentOpen+1)===-1;// Check to see if we have an attribute-like sequence preceding the\n// expression. This can match \"name=value\" like structures in text,\n// comments, and attribute values, so there can be false-positives.\nconst attributeMatch=lastAttributeNameRegex.exec(s);if(attributeMatch===null){// We're only in this branch if we don't have a attribute-like\n// preceding sequence. For comments, this guards against unusual\n// attribute values like <div foo=\"<!--${'bar'}\">. Cases like\n// <!-- foo=${'bar'}--> are handled correctly in the attribute branch\n// below.\nhtml+=s+(isCommentBinding?commentMarker:nodeMarker);}else {// For attributes we use just a marker sentinel, and also append a\n// $lit$ suffix to the name to opt-out of attribute-specific parsing\n// that IE and Edge do for style and certain SVG attributes.\nhtml+=s.substr(0,attributeMatch.index)+attributeMatch[1]+attributeMatch[2]+boundAttributeSuffix+attributeMatch[3]+marker;}}html+=this.strings[l];return html;}", "function walkAttributes(html, fn) {\n var m,\n re = /([-\\w]+) ?= ?(?:\"([^\"]*)|'([^']*)|({[^}]*}))/g\n\n while ((m = re.exec(html))) {\n fn(m[1].toLowerCase(), m[2] || m[3] || m[4])\n }\n}", "function attrsToStr$1(attrs) {\n var parts = [];\n for (var name_2 in attrs) {\n var val = attrs[name_2];\n if (val != null) {\n parts.push(name_2 + '=\"' + htmlEscape$1(val) + '\"');\n }\n }\n return parts.join(' ');\n }", "function attrsToStr(attrs) {\n var parts = [];\n\n for (var name_2 in attrs) {\n var val = attrs[name_2];\n\n if (val != null) {\n parts.push(name_2 + '=\"' + htmlEscape(val) + '\"');\n }\n }\n\n return parts.join(' ');\n }", "function buildHTML(tag, html, attrs) {\n\n var element = document.createElement(tag);\n // if custom html passed in, append it\n if (html) element.innerHTML = html;\n\n // set each individual attribute passed in\n for (attr in attrs) {\n if (attrs[attr] === false) continue;\n element.setAttribute(attr, attrs[attr]);\n }\n\n return element;\n }", "function attrsToStr(attrs) {\n var parts = [];\n\n for (var name in attrs) {\n var val = attrs[name];\n\n if (val != null) {\n parts.push(name + '=\"' + htmlEscape(val) + '\"');\n }\n }\n\n return parts.join(' ');\n }", "function attrsToStr(attrs) {\n\tvar parts = [];\n\n\t$.each(attrs, function(name, val) {\n\t\tif (val != null) {\n\t\t\tparts.push(name + '=\"' + htmlEscape(val) + '\"');\n\t\t}\n\t});\n\n\treturn parts.join(' ');\n}", "function attrsToStr(attrs) {\n\tvar parts = [];\n\n\t$.each(attrs, function(name, val) {\n\t\tif (val != null) {\n\t\t\tparts.push(name + '=\"' + htmlEscape(val) + '\"');\n\t\t}\n\t});\n\n\treturn parts.join(' ');\n}", "function attrsToStr(attrs) {\n\tvar parts = [];\n\n\t$.each(attrs, function(name, val) {\n\t\tif (val != null) {\n\t\t\tparts.push(name + '=\"' + htmlEscape(val) + '\"');\n\t\t}\n\t});\n\n\treturn parts.join(' ');\n}", "function attrsToStr(attrs) {\n\tvar parts = [];\n\n\t$.each(attrs, function(name, val) {\n\t\tif (val != null) {\n\t\t\tparts.push(name + '=\"' + htmlEscape(val) + '\"');\n\t\t}\n\t});\n\n\treturn parts.join(' ');\n}", "function attrsToStr(attrs) {\n\tvar parts = [];\n\n\t$.each(attrs, function(name, val) {\n\t\tif (val != null) {\n\t\t\tparts.push(name + '=\"' + htmlEscape(val) + '\"');\n\t\t}\n\t});\n\n\treturn parts.join(' ');\n}", "getHTML(){const l=this.strings.length-1;let html=\"\",isCommentBinding=!1;for(let i=0;i<l;i++){const s=this.strings[i],commentOpen=s.lastIndexOf(\"<!--\");// For each binding we want to determine the kind of marker to insert\n// into the template source before it's parsed by the browser's HTML\n// parser. The marker type is based on whether the expression is in an\n// attribute, text, or comment poisition.\n// * For node-position bindings we insert a comment with the marker\n// sentinel as its text content, like <!--{{lit-guid}}-->.\n// * For attribute bindings we insert just the marker sentinel for the\n// first binding, so that we support unquoted attribute bindings.\n// Subsequent bindings can use a comment marker because multi-binding\n// attributes must be quoted.\n// * For comment bindings we insert just the marker sentinel so we don't\n// close the comment.\n//\n// The following code scans the template source, but is *not* an HTML\n// parser. We don't need to track the tree structure of the HTML, only\n// whether a binding is inside a comment, and if not, if it appears to be\n// the first binding in an attribute.\n// We're in comment position if we have a comment open with no following\n// comment close. Because <-- can appear in an attribute value there can\n// be false positives.\nisCommentBinding=(-1<commentOpen||isCommentBinding)&&-1===s.indexOf(\"-->\",commentOpen+1);// Check to see if we have an attribute-like sequence preceeding the\n// expression. This can match \"name=value\" like structures in text,\n// comments, and attribute values, so there can be false-positives.\nconst attributeMatch=lastAttributeNameRegex.exec(s);if(null===attributeMatch){// We're only in this branch if we don't have a attribute-like\n// preceeding sequence. For comments, this guards against unusual\n// attribute values like <div foo=\"<!--${'bar'}\">. Cases like\n// <!-- foo=${'bar'}--> are handled correctly in the attribute branch\n// below.\nhtml+=s+(isCommentBinding?marker:nodeMarker)}else{// For attributes we use just a marker sentinel, and also append a\n// $lit$ suffix to the name to opt-out of attribute-specific parsing\n// that IE and Edge do for style and certain SVG attributes.\nhtml+=s.substr(0,attributeMatch.index)+attributeMatch[1]+attributeMatch[2]+boundAttributeSuffix+attributeMatch[3]+marker}}html+=this.strings[l];return html}", "function createHtml(o){\n var b = '',\n attr,\n val,\n key,\n cn;\n\n if(typeof o == \"string\"){\n b = o;\n } else if (Ambow.isArray(o)) {\n for (var i=0; i < o.length; i++) {\n if(o[i]) {\n b += createHtml(o[i]);\n }\n };\n } else {\n b += '<' + (o.tag = o.tag || 'div');\n for (attr in o) {\n val = o[attr];\n if(!confRe.test(attr)){\n if (typeof val == \"object\") {\n b += ' ' + attr + '=\"';\n for (key in val) {\n b += key + ':' + val[key] + ';';\n };\n b += '\"';\n }else{\n b += ' ' + ({cls : 'class', htmlFor : 'for'}[attr] || attr) + '=\"' + val + '\"';\n }\n }\n };\n // Now either just close the tag or try to add children and close the tag.\n if (emptyTags.test(o.tag)) {\n b += '/>';\n } else {\n b += '>';\n if ((cn = o.children || o.cn)) {\n b += createHtml(cn);\n } else if(o.html){\n b += o.html;\n }\n b += '</' + o.tag + '>';\n }\n }\n return b;\n }", "getHTML(){const e=this.strings.length-1;let t=\"\",n=!1;for(let r=0;r<e;r++){const e=this.strings[r],a=e.lastIndexOf(\"<!--\");// For each binding we want to determine the kind of marker to insert\n// into the template source before it's parsed by the browser's HTML\n// parser. The marker type is based on whether the expression is in an\n// attribute, text, or comment poisition.\n// * For node-position bindings we insert a comment with the marker\n// sentinel as its text content, like <!--{{lit-guid}}-->.\n// * For attribute bindings we insert just the marker sentinel for the\n// first binding, so that we support unquoted attribute bindings.\n// Subsequent bindings can use a comment marker because multi-binding\n// attributes must be quoted.\n// * For comment bindings we insert just the marker sentinel so we don't\n// close the comment.\n//\n// The following code scans the template source, but is *not* an HTML\n// parser. We don't need to track the tree structure of the HTML, only\n// whether a binding is inside a comment, and if not, if it appears to be\n// the first binding in an attribute.\nn=(-1<a||n)&&-1===e.indexOf(\"-->\",a+1);// Check to see if we have an attribute-like sequence preceeding the\n// expression. This can match \"name=value\" like structures in text,\n// comments, and attribute values, so there can be false-positives.\nconst s=lastAttributeNameRegex.exec(e);t+=null===s?e+(n?commentMarker:nodeMarker):e.substr(0,s.index)+s[1]+s[2]+boundAttributeSuffix+s[3]+marker}return t+=this.strings[e],t}", "function attrsToStr(attrs) {\n\t\tvar parts = [];\n\n\t\t$.each(attrs, function(name, val) {\n\t\t\tif (val != null) {\n\t\t\t\tparts.push(name + '=\"' + htmlEscape(val) + '\"');\n\t\t\t}\n\t\t});\n\n\t\treturn parts.join(' ');\n\t}", "function stringifyAttributes(attrsObj) {\n var attributes = [];\n\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = (0, _getIterator3.default)((0, _entries2.default)(attrsObj)), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var _ref = _step.value;\n\n var _ref2 = (0, _slicedToArray3.default)(_ref, 2);\n\n var key = _ref2[0];\n var value = _ref2[1];\n\n if (value === false) {\n continue;\n }\n\n if (Array.isArray(value)) {\n value = value.join(' ');\n }\n\n value = value === true ? '' : `=\"${String(value)}\"`;\n\n attributes.push(`${key}${value}`);\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n\n return attributes.length > 0 ? ' ' + attributes.join(' ') : '';\n}", "update2(el, dict = {}, data = {}) {\n const result = {};\n Object.entries(dict).forEach(([key, value]) => {\n const foundValue = value.split('.').reduce((store, key) => {\n return store && store[key] != null ? store[key] : null;\n }, data);\n\n if (foundValue != null) {\n // if (key === 'text') {\n // if (foundValue === true) -> use default?\n // if (typeof foundValue === 'string') -> interpolate?\n // }\n result[key] = foundValue;\n el.setAttributeNS(null, key, foundValue);\n }\n });\n\n return result;\n }", "function getHtml(attr, attrValue){\n\t\tvar resultString = '';\n\t\tvar classString = attr.replace(/_/g, '-');\n\t\tvar resultString = '';\n\t\tvar classString = attr.replace(/_/g, '-');\n\t\tif(attr == 'matching_type'){\n\t\t\tresultString += '<select class=\"matching-type\"><option value=\"conjunction\"';\n\t\t\tif(attrValue == 'conjunction'){\n\t\t\t\tresultString += ' selected';\n\t\t\t}\n\t\t\tresultString += '>Conjunction</option><option value=\"phrase\"';\n\t\t\tif(attrValue == 'phrase'){\n\t\t\t\tresultString += ' selected';\n\t\t\t}\n\t\t\tresultString += '>Phrase</option><option value=\"substring\"';\n\t\t\tif(attrValue == 'substring'){\n\t\t\t\tresultString += ' selected';\n\t\t\t}\n\t\t\tresultString += '>Substring</option></select>';\n\t\t}\n\t\telse{\n\t\t\tresultString += '<input type=\"text\" class=\"' + classString + '\" value=\"' + attrValue + '\">';\n\t\t}\n\t\teditOperators.push(classString);\n\t\treturn resultString;\t\t\n\t}", "function htmlEncode(str, attribute) {\n\tlet res = str.replace(/&/g, \"&amp;\").\n\t\treplace(/</g, \"&lt;\").\n\t\treplace(/>/g, \"&gt;\");\n\tif(attribute) {\n\t\tres = res.replace(/\"/g, \"&quot;\").\n\t\t\treplace(/'/g, \"&#x27;\");\n\t}\n\treturn res;\n}", "function htmlToJsx(str){\n\n // for attribute to htmlFor\n str = replaceAttribute(str, \"for\", \"htmlFor\");\n // class attribute to className\n str = replaceAttribute(str, \"class\", \"className\");\n\n // \"selfclose\" self closing tags: \"…>\" to \"…/>\"\n for(var k=0; k<selfClosingTags.length; k++) {\n str = str.replace(new RegExp(\"(<\"+selfClosingTags[k]+\"(?:[^>\\\"']|\\\".*\\\"|'.*')*)\\/?>\",\"ig\"),\"$1\"+\" />\");\n }\n\n // Remove auto-quotes around {expressions} + Remove {expression}=\"\" attachment\n str = str\n .replace(/<(?:[^>\\\"']|\\\".*\\\"|'.*')*=(?:[^>\\\"']|\\\".*\\\"|'.*')*>/g, function(match){\n return match.replace(/(?:\"|')?(\\{(?:[^\\'\"}]|\".*\"|'.*')*\\})(?:\"|')?(?:=\"\"|='')?/g, \"$1\");\n });\n\n // Transform style attribute string (\"color:red; background-image:url()\") to object ({{color:'red', backgroundImage:'url()'}})\n str = str.replace(/(<(?:[^>\"']|\".*\"|'.*')*\\sstyle\\s*=\\s*)((?:\"(?:[^\"]|\\s)*\")|(?:'(?:[^']|\\s)*'))((?:[^>\"']|\".*\"|'.*')*>)/ig, function(match, start, style, end){\n var styles = \"\";\n style\n .slice(1,-1)\n .replace(/(&quot)|'/g,'\"')\n .replace(/\\s*([^:;]*)\\s*:\\s*((?:[^;\"]|\".*\")*)\\s*;?/g, function(match, key, value){\n\n // transform key to camelCase\n key = key.replace(/-([^-]*)/g, function(match, part){\n if(part === \"ms\") return part;\n return part.charAt(0).toUpperCase()+part.slice(1);\n });\n\n styles+=key+\":'\"+value+\"',\";\n \n return match;\n });\n\n return start+\"{{\"+styles.slice(0,-1)+\"}}\"+end;\n });\n\n return str;\n}", "function optionsToHtml(tagKey, jsonTemplate, settings) {\n var html = '';\n\t\t\t\tvar innerContent = '';\n\t\t\t\tvar attributes = ['_juid_=\"' + tagKey + '\"'];\n\t\t\t\tvar options = {};\n\t\t\t\t$.extend(options, jsonTemplate, settings);\n\t\t\t\tvar tag = jsonTemplate._tag_;\n\t\t\t\tfor (var attribute in options) {\n\t\t\t\t\tif (attribute === '_text_') {\n\t\t\t\t\t\tinnerContent += formatText(options[attribute]);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif (attribute === '_html_') {\n\t\t\t\t\t\tinnerContent += options[attribute];\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif ((/^_.+_$/).test(attribute)) continue;\n\t\t\t\t\tif (options[attribute] === false) continue;\n\t\t\t\t\tif (options[attribute] === true) {\n\t\t\t\t\t\tattributes.push(attribute + '=\"' + attribute + '\"');\n\t\t\t\t\t} else {\n\t\t\t\t\t\tattributes.push(attribute + '=\"' + options[attribute] + '\"');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tattributes = attributes.join(' ');\n\t\t\t\tif (attributes.length > 0) attributes = ' ' + attributes;\n\t\t\t\thtml = '<' + tag + attributes;\n\t\t\t\tif ($.inArray(tag, ['input', 'img', 'br', 'hr', 'area']) > -1) {\n\t\t\t\t\thtml += ' />';\n\t\t\t\t} else {\n\t\t\t\t\thtml += '>';\n\t\t\t\t\tif (innerContent !== '') html += innerContent;\n\t\t\t\t\thtml += '</' + tag + '>';\n\t\t\t\t}\n return html;\n }", "function sortAttributes(html) {\n return html.replace(/<([a-z0-9-]+)((?:\\s[a-z0-9:_.-]+=\".*?\")+)((?:\\s*\\/)?>)/gi, (s, pre, attrs, after) => {\n const list = attrs.match(/\\s[a-z0-9:_.-]+=\".*?\"/gi).sort((a, b) => (a > b ? 1 : -1));\n if (~after.indexOf('/')) after = `></${pre}>`;\n return `<${pre + list.join('') + after}`;\n });\n}", "function genProps(el, state) {\n const attrs = [];\n el.attrsList.forEach(({ name, value }) => {\n if (name[0] === ':') {\n // bind\n const pty = name.slice(1);\n attrs.push(`${pty}=\"{{${value}}}\"`);\n } else if (name[0] === '@') {\n // event\n const evtName = name.slice(1);\n const evtProp = 'on' +\n (evtNameMapping[evtName] || evtName).replace(/^(\\w)/, ($1) => $1.toUpperCase());\n\n if (state.isTemplateDependency) {\n value = state.templateName + '$' + value;\n }\n attrs.push(`${evtProp}=\"${value}\"`);\n } else {\n attrs.push(`${name}=\"${value}\"`);\n }\n });\n if (el.staticClass || el.classBinding) {\n attrs.push(`class=\"${getStaticProp(el.staticClass)}${el.classBinding ? ` {{${el.classBinding}}}` : ''}\"`);\n }\n return attrs.join(' ');\n}", "function replace(dict) {\r\n // Replace the template with the inputs,\r\n // write the replaced template to the output\r\n let ta_temp = document.getElementById(\"ta_template\");\r\n let ta_outp = document.getElementById(\"ta_output\");\r\n let string = ta_temp.value;\r\n Object.keys(dict).forEach(function (key) {\r\n string = replaceAll(string, \"`\" + key + \"`\", dict[key]);\r\n });\r\n ta_outp.value = string;\r\n }", "function makeTag (tagName, strValue) {\n return \"<\"+tagName+\">\"+strValue+\"</\"+tagName+\">\"\n}", "function get_w_AttributeText(tagNode) {\n let text = \"\";\n const attributes = [\"lemma\", \"strong\", \"srcloc\"];\n attributes.forEach((value) => {\n if (tagNode.hasOwnProperty(value)) {\n text = text === \"\" ? \"|\" : text + \" \";\n text += `${value}=\\\"${tagNode[value]}\\\"`;\n }\n });\n return text;\n}", "function buildHashFromAttributes(attributes) {\n var pairs = [];\n\n for (var i = 0; i < attributes.length; i++) {\n var attr = attributes[i];\n if (attr.value.type === 'mustache') {\n pairs.push([attr.name, attr.value.sexpr]);\n } else if (attr.value.type === 'text') {\n pairs.push([attr.name, new StringNode(attr.value.chars)]);\n }\n }\n\n return new HashNode(pairs);\n }", "function html(strings, ...values) {\n const directives = [];\n let html = \"\";\n\n for (let i = 0, ii = strings.length - 1; i < ii; ++i) {\n const currentString = strings[i];\n let value = values[i];\n html += currentString;\n\n if (value instanceof ViewTemplate) {\n const template = value;\n\n value = () => template;\n }\n\n if (typeof value === \"function\") {\n value = new HTMLBindingDirective(value);\n }\n\n if (value instanceof TargetedHTMLDirective) {\n const match = lastAttributeNameRegex.exec(currentString);\n\n if (match !== null) {\n value.targetName = match[2];\n }\n }\n\n if (value instanceof HTMLDirective) {\n // Since not all values are directives, we can't use i\n // as the index for the placeholder. Instead, we need to\n // use directives.length to get the next index.\n html += value.createPlaceholder(directives.length);\n directives.push(value);\n } else {\n html += value;\n }\n }\n\n html += strings[strings.length - 1];\n return new ViewTemplate(html, directives);\n}", "function getRaw(node){\n let text = '';\n text += node.name;\n _.each(node.attribs, (value, key) => {\n if (value.length === 0) {\n text += ' ' + key;\n } else {\n text += ' ' +key + '=\"' + value + '\"';\n }\n });\n return text;\n }", "function showData(attributes, key) {\n\n\tattributes = attributes + key;\n\tvar attributes = attributes.split(\"`\");\n\n\tvar ids = ['ua', 'prod', 'prodsub', 'ce', 'vend', 'plat', 'lang', 'langs', 'je', 'an',\n\t\t\t 'ac', 'av', 'os', 'mtp', 'cd', 'pd', 'width', 'height', 'plugs', 'mime', 'dev', 'key'];\n\n\n\tfor(data in attributes) {\n\t\tdocument.getElementById(ids[data]).innerHTML = attributes[data];\n\t}\n\n}", "function generateStyleElements(styleHash = \"\"){\r\n \r\n if (styleHash == \"\"){\r\n return ;\r\n }\r\n \r\n var inlineStyle = \"\";\r\n $.each(styleHash, function(key, value){\r\n inlineStyle += key+\":\"+ value + \";\"\r\n })\r\n \r\n return '\"' + inlineStyle + '\"';\r\n }", "get asAttribute() {\n const keys = Array.from(this.classes.keys());\n return (keys.length ? ' class=\"' + escapeHTML(keys.join(' ')) + '\"' : '');\n }", "getHTML() {\n const l = this.strings.length - 1;\n let html = '';\n let isCommentBinding = false;\n\n for (let i = 0; i < l; i++) {\n const s = this.strings[i]; // For each binding we want to determine the kind of marker to insert\n // into the template source before it's parsed by the browser's HTML\n // parser. The marker type is based on whether the expression is in an\n // attribute, text, or comment position.\n // * For node-position bindings we insert a comment with the marker\n // sentinel as its text content, like <!--{{lit-guid}}-->.\n // * For attribute bindings we insert just the marker sentinel for the\n // first binding, so that we support unquoted attribute bindings.\n // Subsequent bindings can use a comment marker because multi-binding\n // attributes must be quoted.\n // * For comment bindings we insert just the marker sentinel so we don't\n // close the comment.\n //\n // The following code scans the template source, but is *not* an HTML\n // parser. We don't need to track the tree structure of the HTML, only\n // whether a binding is inside a comment, and if not, if it appears to be\n // the first binding in an attribute.\n\n const commentOpen = s.lastIndexOf('<!--'); // We're in comment position if we have a comment open with no following\n // comment close. Because <-- can appear in an attribute value there can\n // be false positives.\n\n isCommentBinding = (commentOpen > -1 || isCommentBinding) && s.indexOf('-->', commentOpen + 1) === -1; // Check to see if we have an attribute-like sequence preceding the\n // expression. This can match \"name=value\" like structures in text,\n // comments, and attribute values, so there can be false-positives.\n\n const attributeMatch = _template.lastAttributeNameRegex.exec(s);\n\n if (attributeMatch === null) {\n // We're only in this branch if we don't have a attribute-like\n // preceding sequence. For comments, this guards against unusual\n // attribute values like <div foo=\"<!--${'bar'}\">. Cases like\n // <!-- foo=${'bar'}--> are handled correctly in the attribute branch\n // below.\n html += s + (isCommentBinding ? commentMarker : _template.nodeMarker);\n } else {\n // For attributes we use just a marker sentinel, and also append a\n // $lit$ suffix to the name to opt-out of attribute-specific parsing\n // that IE and Edge do for style and certain SVG attributes.\n html += s.substr(0, attributeMatch.index) + attributeMatch[1] + attributeMatch[2] + _template.boundAttributeSuffix + attributeMatch[3] + _template.marker;\n }\n }\n\n html += this.strings[l];\n return html;\n }", "createCustomAttributePlaceholder(attributeName, index) {\n return `${attributeName}=\"${this.createInterpolationPlaceholder(index)}\"`;\n }", "attr(obj) {\n return this.forEach((el => Object.keys(obj).forEach((key => el.setAttribute(key, obj[key]))))), \n this;\n }", "toString(nameMap = undefined) {\n return this.tags.map(a => `#${a}`).join(' ');\n }", "function solve(args) {\n let obj = JSON.parse(args[0]);\n let tags = '' + args[1];\n tags = tags.replace(/'/g, '\"');\n\n\n String.prototype.bind = function(output, parameters) {\n var regexContent,\n regexHref,\n regexClass,\n prop;\n output = this;\n\n for (prop in parameters) {\n regexContent = new RegExp('(<)([a-z]+)(.*?data-bind-content=\"' + prop + '\".*?>)(.*?)(</.*?>)', 'g');\n regexHref = new RegExp('(<.*?data-bind-href=\"' + prop + '\".*?)>', 'g');\n regexClass = new RegExp('(<.*?data-bind-class=\"(' + prop + ')\".*?)>', 'g');\n\n output = output.replace(regexContent, '$1$2$3' + parameters[prop] + '$1/$2>')\n .replace(regexHref, '$1' + ' href=\"' + parameters[prop] + '\">')\n .replace(regexClass, '$1' + ' class=\"' + parameters[prop] + '\">');\n }\n\n if (output.match(/<.*?(class=\"[A-Z]{1}[a-z]*?\") (href=\".*?\")>/g)) {\n output = output.replace(/(class=\"[A-Z]{1}[a-z]*?\") (href=\".*?\")/g, '$2 $1');\n }\n return output;\n };\n console.log(tags.bind('', obj));\n}", "getElement(properties) {\n let str_element = properties.tag ? `<${properties.tag}` : \"<div\";\n\n for (let property in properties) {\n if (!/(tag|contains|icon)/.test(property))\n str_element += ` ${property}=\"${properties[property]}\"`;\n }\n\n str_element += `>${this.processContent(properties.contains)}`;\n\n str_element += properties.tag\n ? this.closeElement(properties)\n : this.closeElement({\n tag: \"div\"\n });\n\n return str_element;\n }", "function escapeAttribute(value) {\n return value.replace(/&/g, \"&amp;\").replace(/</g, \"&lt;\").replace(/>/g, \"&gt;\").replace(/\"/g, \"&quot;\");\n}", "function escapeAttr(value) {\n if (typeof value !== 'string') {\n return value;\n }\n\t\t\n\t\t// If not string then convert double quotes \n return value.replace(/\"/g, '&quot;');\n }", "function html(h, node) {\n return h.dangerous ? h.augment(node, u('raw', node.value)) : null;\n}", "function html(h, node) {\n return h.dangerous ? h.augment(node, u('raw', node.value)) : null\n}", "function createAttributeLinks(elem, opts) {\n\t var props = opts.properties;\n\t var tname = elem.toUpperCase();\n\t Object.keys(props).forEach(function (name) {\n\t var dataName = tname + '.' + name;\n\t var prop = props[name];\n\n\t // Ensure Incremental DOM knows to set this as a property.\n\t internalData.applyProp[dataName] = true;\n\n\t if (!prop) {\n\t prop = props[name] = {};\n\t }\n\n\t // Don't override the user's value.\n\t if (typeof prop.attribute === 'undefined') {\n\t prop.attribute = true;\n\t }\n\t });\n\t}", "function stringifyProps(node, tagObj, { anchors: anchors$1, doc }) {\n if (!doc.directives)\n return '';\n const props = [];\n const anchor = (identity.isScalar(node) || identity.isCollection(node)) && node.anchor;\n if (anchor && anchors.anchorIsValid(anchor)) {\n anchors$1.add(anchor);\n props.push(`&${anchor}`);\n }\n const tag = node.tag ? node.tag : tagObj.default ? null : tagObj.tag;\n if (tag)\n props.push(doc.directives.tagString(tag));\n return props.join(' ');\n}", "function html(tagName, attributes, ...children) {\n // create the element\n const r = document.createElement(tagName);\n // add the attributes\n for (const key in attributes) {\n // special case for booleans\n if (typeof attributes[key] === \"boolean\") {\n if (attributes[key]) {\n r.setAttribute(key, \"\");\n }\n }\n else {\n r.setAttribute(key, attributes[key]);\n }\n }\n // add the children\n children.forEach(child => {\n // special case for strings\n if (typeof child === \"string\") {\n r.appendChild(document.createTextNode(child));\n }\n else {\n r.appendChild(child);\n }\n });\n return r;\n}", "function replaceKey(html, key, rep) {\n var node = null;\n if (isElement(html) == true) {\n node = html;\n html = node.innerHTML;\n }\n html = replaceAll(html, key, rep, true);\n html = replaceAll(html, key + '=\"\"', rep, true);\n if (node != null)\n node.innerHTML = html;\n return html;\n }", "attrs(prefix, args) {\r\n\t\tlet res = '';\r\n\t\tconst len = prefix.length\r\n\t\targs.forEach(v => {\r\n\t\t\tif (v.lhs.startsWith(prefix)) {\r\n\t\t\t\t// remove the prefix\r\n\t\t\t\tres += ` ${v.lhs.substr(prefix.length)}`\r\n\t if (v.rhs.length > 0) res += `=\"${v.rhs.join(' ')}\"`\r\n\t\t\t}\r\n\t\t})\r\n\r\n\t\treturn res;\r\n\t}", "function treatAttributes(attributes) {\n\n\tvar attributes = attributes.split(\"*,\");\n\tvar aux = \"\";\n\tfor (var i in attributes) {\n\t\taux += attributes[i] + \"`\";\n\t}\n\n\treturn aux;\n}", "getOpenElement(properties) {\n let str_element = `<${properties.tag}`;\n\n for (let property in properties) {\n if (!/(tag|contains|icon)/.test(property))\n str_element += ` ${property}=\"${properties[property]}\"`;\n }\n\n str_element += \">\";\n\n return str_element;\n }", "function escapeAttribute(value) {\n return value.replace(/&/g, '&amp;').replace(/'/g, '&apos;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/\"/g, '&quot;');\n}", "function escapeAttribute(value) {\n return value.replace(/&/g, '&amp;').replace(/'/g, '&apos;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/\"/g, '&quot;');\n}", "function escapeAttribute(value) {\n return value.replace(/&/g, '&amp;').replace(/'/g, '&apos;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/\"/g, '&quot;');\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}", "getHTML() {\n const l = this.strings.length - 1;\n let html = '';\n let isCommentBinding = false;\n for (let i = 0; i < l; i++) {\n const s = this.strings[i];\n // For each binding we want to determine the kind of marker to insert\n // into the template source before it's parsed by the browser's HTML\n // parser. The marker type is based on whether the expression is in an\n // attribute, text, or comment position.\n // * For node-position bindings we insert a comment with the marker\n // sentinel as its text content, like <!--{{lit-guid}}-->.\n // * For attribute bindings we insert just the marker sentinel for the\n // first binding, so that we support unquoted attribute bindings.\n // Subsequent bindings can use a comment marker because multi-binding\n // attributes must be quoted.\n // * For comment bindings we insert just the marker sentinel so we don't\n // close the comment.\n //\n // The following code scans the template source, but is *not* an HTML\n // parser. We don't need to track the tree structure of the HTML, only\n // whether a binding is inside a comment, and if not, if it appears to be\n // the first binding in an attribute.\n const commentOpen = s.lastIndexOf('<!--');\n // We're in comment position if we have a comment open with no following\n // comment close. Because <-- can appear in an attribute value there can\n // be false positives.\n isCommentBinding = (commentOpen > -1 || isCommentBinding) &&\n s.indexOf('-->', commentOpen + 1) === -1;\n // Check to see if we have an attribute-like sequence preceding the\n // expression. This can match \"name=value\" like structures in text,\n // comments, and attribute values, so there can be false-positives.\n const attributeMatch = lastAttributeNameRegex.exec(s);\n if (attributeMatch === null) {\n // We're only in this branch if we don't have a attribute-like\n // preceding sequence. For comments, this guards against unusual\n // attribute values like <div foo=\"<!--${'bar'}\">. Cases like\n // <!-- foo=${'bar'}--> are handled correctly in the attribute branch\n // below.\n html += s + (isCommentBinding ? commentMarker : nodeMarker);\n }\n else {\n // For attributes we use just a marker sentinel, and also append a\n // $lit$ suffix to the name to opt-out of attribute-specific parsing\n // that IE and Edge do for style and certain SVG attributes.\n html += s.substr(0, attributeMatch.index) + attributeMatch[1] +\n attributeMatch[2] + boundAttributeSuffix + attributeMatch[3] +\n marker;\n }\n }\n html += this.strings[l];\n return html;\n }", "getHTML() {\n const l = this.strings.length - 1;\n let html = '';\n let isCommentBinding = false;\n for (let i = 0; i < l; i++) {\n const s = this.strings[i];\n // For each binding we want to determine the kind of marker to insert\n // into the template source before it's parsed by the browser's HTML\n // parser. The marker type is based on whether the expression is in an\n // attribute, text, or comment position.\n // * For node-position bindings we insert a comment with the marker\n // sentinel as its text content, like <!--{{lit-guid}}-->.\n // * For attribute bindings we insert just the marker sentinel for the\n // first binding, so that we support unquoted attribute bindings.\n // Subsequent bindings can use a comment marker because multi-binding\n // attributes must be quoted.\n // * For comment bindings we insert just the marker sentinel so we don't\n // close the comment.\n //\n // The following code scans the template source, but is *not* an HTML\n // parser. We don't need to track the tree structure of the HTML, only\n // whether a binding is inside a comment, and if not, if it appears to be\n // the first binding in an attribute.\n const commentOpen = s.lastIndexOf('<!--');\n // We're in comment position if we have a comment open with no following\n // comment close. Because <-- can appear in an attribute value there can\n // be false positives.\n isCommentBinding = (commentOpen > -1 || isCommentBinding) &&\n s.indexOf('-->', commentOpen + 1) === -1;\n // Check to see if we have an attribute-like sequence preceding the\n // expression. This can match \"name=value\" like structures in text,\n // comments, and attribute values, so there can be false-positives.\n const attributeMatch = lastAttributeNameRegex.exec(s);\n if (attributeMatch === null) {\n // We're only in this branch if we don't have a attribute-like\n // preceding sequence. For comments, this guards against unusual\n // attribute values like <div foo=\"<!--${'bar'}\">. Cases like\n // <!-- foo=${'bar'}--> are handled correctly in the attribute branch\n // below.\n html += s + (isCommentBinding ? commentMarker : nodeMarker);\n }\n else {\n // For attributes we use just a marker sentinel, and also append a\n // $lit$ suffix to the name to opt-out of attribute-specific parsing\n // that IE and Edge do for style and certain SVG attributes.\n html += s.substr(0, attributeMatch.index) + attributeMatch[1] +\n attributeMatch[2] + boundAttributeSuffix + attributeMatch[3] +\n marker;\n }\n }\n html += this.strings[l];\n return html;\n }", "function stringifyProps(node, tagObj, { anchors, doc }) {\n if (!doc.directives)\n return '';\n const props = [];\n const anchor = (isScalar(node) || isCollection(node)) && node.anchor;\n if (anchor && anchorIsValid(anchor)) {\n anchors.add(anchor);\n props.push(`&${anchor}`);\n }\n const tag = node.tag ? node.tag : tagObj.default ? null : tagObj.tag;\n if (tag)\n props.push(doc.directives.tagString(tag));\n return props.join(' ');\n }" ]
[ "0.6485755", "0.6485755", "0.6485755", "0.6485755", "0.6485111", "0.6445947", "0.6396426", "0.6333782", "0.6333782", "0.61989754", "0.6172342", "0.6092175", "0.6072262", "0.60631484", "0.60631484", "0.6054279", "0.6043974", "0.6042282", "0.5949147", "0.59302217", "0.5894648", "0.58637315", "0.57943934", "0.5784117", "0.5750355", "0.57221717", "0.57171476", "0.5708938", "0.56740856", "0.56736046", "0.5641977", "0.5641977", "0.5641977", "0.5641977", "0.56329477", "0.56223744", "0.5611776", "0.5604584", "0.5600668", "0.5580777", "0.5577722", "0.55484456", "0.552454", "0.5519094", "0.55034536", "0.55024403", "0.54940236", "0.5459165", "0.5443241", "0.5443241", "0.5443241", "0.5443241", "0.5443241", "0.5422407", "0.53889346", "0.5368658", "0.5358162", "0.5353828", "0.53375334", "0.5332362", "0.53226423", "0.53127384", "0.530477", "0.5297773", "0.52912503", "0.5270502", "0.5257723", "0.5248963", "0.52372134", "0.52366185", "0.5208407", "0.5206637", "0.5196809", "0.5179829", "0.517851", "0.51772505", "0.513703", "0.5135634", "0.5132439", "0.5131838", "0.51146466", "0.5108207", "0.5101608", "0.51011467", "0.5095397", "0.5063778", "0.5041666", "0.50378007", "0.5033106", "0.5030764", "0.50276893", "0.49977767", "0.49977767", "0.49977767", "0.49892926", "0.49787495", "0.49787495", "0.49747792" ]
0.55336237
44
prevent against problems with <2 args!
function combineEventUis(uis) { return uis.reduce(combineTwoEventUis, EMPTY_EVENT_UI); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "if (args.length % 2 !== 0) {\n throw new Error('layout must have even number of arguments.');\n }", "function get_arg_2() { return arguments[2]; }", "function isTwoPassed(){\n var args = Array.prototype.slice.call(arguments);\n return args.indexOf(2) != -1;\n}", "function args2(...args) {\n console.log(\"arguments: \", args[0])\n}", "function isTwoPassed() {\n var args = Array.prototype.slice.call(arguments);\n\n for (let i = 0; i < args.length; i++) {\n if (args[i] === 2) {\n return true;\n }\n }\n\n return false;\n}", "function fn1([...args]) {}", "function args() {\n\n}", "function a() {\n if(arguments.length<3) return;//arguments 갯수가 3보다 작으면 return해!\n console.log('my name is ', arguments[2])\n}", "function checkArgs(instr: bril.Operation, count: number) {\n if (instr.args.length != count) {\n throw `${instr.op} takes ${count} argument(s); got ${instr.args.length}`;\n }\n}", "function checkArgs(instr: bril.Operation, count: number) {\n if (instr.args.length != count) {\n throw `${instr.op} takes ${count} argument(s); got ${instr.args.length}`;\n }\n}", "function removeExcessArgs (args) {\n if (args.length > command._handler.args.length) return removeExcessArgs(_.initial(args));\n return args;\n }", "function isExclusive(args) {\r\n\treturn false;\r\n}", "function SimpleArgs() {\r\n}", "function doWhat(first, second, third) {\n if (arguments.length != 3) {\n throw new Error(\"Excepts 3 arguments, but invoke with \" +\n arguments.length + \" arguments\");\n }\n}", "function foo() {\n\tvar a = arguments[0] !== (void 0) ? arguments[0] : 2;\n\tconsole.log( a );\n}", "function check (args) {\n\tvar actual = args.length;\n\tvar expected = args.callee.length;\n\tif (actual !== expected)\n\t\tthrow Error(\"Expected \" + expected + \" args; got \" + actual);\n}", "function validateNumArgs(n, args) {\n if (args.length < n)\n throw \"The number of arguments passed should be \" + n;\n}", "function validateExactNumberOfArgs(functionName,args,numberOfArgs){if(args.length!==numberOfArgs){throw new index_esm_FirestoreError(Code.INVALID_ARGUMENT,\"Function \"+functionName+\"() requires \"+formatPlural(numberOfArgs,'argument')+', but was called with '+formatPlural(args.length,'argument')+'.');}}", "function fun1() {\n var a =\n typeof arguments[0] === \"undefined\" ?\n -1 : arguments[0];\n var b =\n typeof arguments[1] === \"undefined\" ?\n -1 : arguments[1];\n // return a + \"\" + b/* + arguments[5]*/;\n return a + \"\" + b;\n\n}", "function f(x, y, z) {\n\t// verifica se foi passado o numero correto de args\n\tif (arguments.length != 3) throw \"Numero de args incorreto!\";\n\t// continua o corpo...\n}", "function funkcijosPavadinimas(argumntas1, argumentas2) {\n // funkcijos body. kodas kuris bus vygdomas kai iskviesim funkcija\n // argumntas1 - lokalus kintamasis naudojamas tik sioje funkcijoje\n console.log(argumntas1);\n}", "error(...args) {\n }", "function validateArgs(args) {\n if (args.length <= 3) {\n console.error('Please enter the apropriate amount of arguments.');\n process.exit(1);\n }\n var regex = new RegExp(\"^[elr][1-9][0-9]{0,2}$\");\n for (var i = 2; i < args.length; i++) {\n if (regex.test(args[i]) === false) {\n console.error('The argument \\'' + args[i] + '\\' is malformed.');\n process.exit(1);\n }\n }\n}", "function validateArgs() {\n if (!getAction(args)) {\n errorHandler(new Error('there is no the following required argument: --action'));\n }\n if (!getShift(args)) {\n errorHandler(new Error('there is no the following required argument: --shift'));\n }\n const fs = require('fs');\n let file = getInputFile(args);\n if (file) {\n fs.access(file, fs.constants.R_OK, err => errorHandler(err));\n }\n file = getOutputFile(args);\n if (file) {\n fs.access(file, fs.constants.W_OK, err => errorHandler(err));\n }\n}", "function validateUserInput(){\n if(arg2.length>0){\n return true\n }else {\n return false\n }\n }", "function fail() {\r\n\terror(new Error(join(arguments, ' ')));\r\n}", "function func1(str1, str2) {\n console.log(arguments[3]);\n console.log(arguments.length);\n}", "function f2(a,b,c){\n\tassert(! sanityjs.arguments_check([\"boolean\",\"number\",\"string\"], options) );\n}", "function validateBetweenNumberOfArgs(functionName,args,minNumberOfArgs,maxNumberOfArgs){if(args.length<minNumberOfArgs||args.length>maxNumberOfArgs){throw new index_esm_FirestoreError(Code.INVALID_ARGUMENT,\"Function \"+functionName+\"() requires between \"+minNumberOfArgs+\" and \"+(maxNumberOfArgs+\" arguments, but was called with \")+formatPlural(args.length,'argument')+'.');}}", "function duplicateArgMessage(argName) {\n return 'There can be only one argument named \"' + argName + '\".';\n}", "function getArguments(args) {\n if (args.length <= 2) return null;\n\n // splice on arguments prevents js optimisation, so we do it a bit longer way\n var arg = [];\n for (var i = 2; i < args.length; i++)\n arg.push(args[i]);\n\n return arg;\n }", "function addTwoArgs(arg1, arg2) {\n\treturn arg1 + arg2;\n}", "function checkMainArguments() {\n if (!this.operator) {\n error('\"operator\" parameter is missing');\n }\n\n if (!this.oldApiKey) {\n error('\"oldApiKey\" parameter is missing');\n }\n\n if (!this.newApiKey) {\n error('\"newApiKey\" parameter is missing');\n }\n}", "function duplicateArgMessage(argName) {\n return \"There can be only one argument named \\\"\".concat(argName, \"\\\".\");\n}", "piece_taken(args) {\n\n }", "function parseArgs(args) {\n\tlet err = null\n\tlet [num1, op, num2] = args\n\tconst validOps = [\"+\", \"-\", \"/\", \"x\"]\n\n\tif (validOps.includes(op) === false) {\n\t\terr = new Error('Please use on of these operators: +, -, /, x')\n\t} else if(isNaN(num1) === true) {\n\t\terr = new Error('Please enter a number for the first argument')\n\t} else if(isNaN(num2) === true) {\n\t\terr = new Error('please unter a number for the third argument')\n\t}\n\n\targs = [Number(num1), op, Number(num2)]\n\treturn {err, args}\n}", "function checkArgs() {\n if (process.argv.length > 4) {\n console.log(\"Too many inputs!\");\n } else {\n return true;\n }\n}", "function profilerMarkArgs(arg0, arg1, arg2) {\n if (arg2 !== undefined) {\n return \"(\" + arg0 + \";\" + arg1 + \";\" + arg2 + \")\";\n } else if (arg1 !== undefined) {\n return \"(\" + arg0 + \";\" + arg1 + \")\";\n } else if (arg0 !== undefined) {\n return \"(\" + arg0 + \")\";\n } else {\n return \"\";\n }\n }", "variadicArgNotLast(name) {\n console.error('error: variadic arguments must be last `%s`', name);\n process.exit(1);\n }", "function checkUnamedArguments(){\n\t\tvar arg = arguments; \n\t\tdebugger;\n\t}", "function logMismatch(arg1, arg2){\n console.log(arg1 + \" and \" + arg2 + \" do not match!\");\n}", "function logMismatch(arg1, arg2) { \n console.log(arg1 + \" does not match \" + arg2 + \" !\");\n}", "function validateAtLeastNumberOfArgs(functionName,args,minNumberOfArgs){if(args.length<minNumberOfArgs){throw new index_esm_FirestoreError(Code.INVALID_ARGUMENT,\"Function \"+functionName+\"() requires at least \"+formatPlural(minNumberOfArgs,'argument')+', but was called with '+formatPlural(args.length,'argument')+'.');}}", "function imprimeArguemntos(){\n console.log(arguments);\n}", "function failure(args) {\n Y.log('Failure: '+args[0]);\n }", "function failure(args) {\n Y.log('Failure: '+args[0]);\n }", "function failure(args) {\n Y.log('Failure: '+args[0]);\n }", "function failure(args) {\n Y.log('Failure: '+args[0]);\n }", "function always() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return true;\n}", "function logMismatch(arg1, arg2) {\n console.log(arg1 + \" and \" + arg2 + \" do not match!\")\n}", "function failure(args) {\n Y.log('Failure: '+args[0]);\n }", "function validateExactNumberOfArgs(functionName, args, numberOfArgs) {\n if (args.length !== numberOfArgs) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Function \" + functionName + \"() requires \" + formatPlural(numberOfArgs, 'argument') + ', but was called with ' + formatPlural(args.length, 'argument') + '.');\n }\n }", "function oneOf(args) { }", "function countarg(a, b) {\n return arguments.length;\n}", "function add2(args) {\n return args[0] + args[1];\n }", "warn(...args) {\n }", "function VALIDARLONGITUD() {\n var len = arguments[0].toString().length;\n\n if (len > arguments[2] || len < arguments[1]) {\n return false;\n }\n\n return true;\n}", "function invalidArg(message) {\n if(message) console.log(message); //Shows the specific error message about the invalid argument\n validArgs = false; //Sets the valid arguments flag to false\n}", "function marry2(...args) {\n console.log(args);\n}", "function add2(args) {\n return args[0] + args[1];\n }", "function multiParameterUnderstanding(gotParam1, gotParam2) {\n\tconsole.log(\"Unassigned Multiple Marameters: \"+gotParam1+gotParam2)\n}", "function fn3(data, data2) {\n assert.strictEqual(data, 'data', 'should not be null err argument');\n assert.strictEqual(data2, 'data2', 'should not be data argument');\n}", "function varParams(a, b) {\r\n if (a == undefined) {\r\n console.log(\"a is undefined\");\r\n }\r\n if (b == undefined) {\r\n console.log(\"b is undefined\");\r\n }\r\n if (arguments.length > 2) {\r\n console.log(\"got extra arguments\");\r\n }\r\n}", "function $e(t, e, n) {\n if (e.length < n) throw new c(h.INVALID_ARGUMENT, \"Function \" + t + \"() requires at least \" + yn(n, \"argument\") + \", but was called with \" + yn(e.length, \"argument\") + \".\");\n}", "function commandValid(args) {\n if (args.length < 3) {\n return false;\n }\n if (!Array.isArray(args)) {\n return false;\n }\n return true;\n}", "function get_arg() { return arguments; }", "function imprimeArgumentos() {\n console.log(arguments);\n}", "function solution(){\n var args = Array.prototype.slice.call(arguments);\n\n var out = args.filter(function(v,i){\n return args.indexOf(v) === i;\n });\n\n return args.length !== out.length;\n\n}", "emerg(...any){}", "function validateExactNumberOfArgs(functionName, args, numberOfArgs) {\n if (args.length !== numberOfArgs) {\n throw new __WEBPACK_IMPORTED_MODULE_1__error__[\"a\" /* FirestoreError */](__WEBPACK_IMPORTED_MODULE_1__error__[\"b\" /* Code */].INVALID_ARGUMENT, \"Function \" + functionName + \"() requires \" +\n formatPlural(numberOfArgs, 'argument') +\n ', but was called with ' +\n formatPlural(args.length, 'argument') +\n '.');\n }\n}", "function validateExactNumberOfArgs(functionName, args, numberOfArgs) {\n if (args.length !== numberOfArgs) {\n throw new __WEBPACK_IMPORTED_MODULE_1__error__[\"a\" /* FirestoreError */](__WEBPACK_IMPORTED_MODULE_1__error__[\"b\" /* Code */].INVALID_ARGUMENT, \"Function \" + functionName + \"() requires \" +\n formatPlural(numberOfArgs, 'argument') +\n ', but was called with ' +\n formatPlural(args.length, 'argument') +\n '.');\n }\n}", "function check(args, n, m, min) {\n if (n !== (m ? args.length % m : args.length) || args.length < min)\n throw new Error(\"wrong number of arguments\");\n }", "function newArgs(a,b,...args){\r\n console.log(args[3]);//prints third element in rest parameter after the parameter that are defined\r\n\r\n}", "function parse(args) {\n return validateArgs(parseArgs(triageArgs(args)));\n}", "function validateBetweenNumberOfArgs(functionName, args, minNumberOfArgs, maxNumberOfArgs) {\n if (args.length < minNumberOfArgs || args.length > maxNumberOfArgs) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Function \" + functionName + \"() requires between \" + minNumberOfArgs + \" and \" + (maxNumberOfArgs + \" arguments, but was called with \") + formatPlural(args.length, 'argument') + '.');\n }\n }", "function validateExactNumberOfArgs(functionName, args, numberOfArgs) {\r\n if (args.length !== numberOfArgs) {\r\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Function \" + functionName + \"() requires \" +\r\n formatPlural(numberOfArgs, 'argument') +\r\n ', but was called with ' +\r\n formatPlural(args.length, 'argument') +\r\n '.');\r\n }\r\n}", "function validateExactNumberOfArgs(functionName, args, numberOfArgs) {\r\n if (args.length !== numberOfArgs) {\r\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Function \" + functionName + \"() requires \" +\r\n formatPlural(numberOfArgs, 'argument') +\r\n ', but was called with ' +\r\n formatPlural(args.length, 'argument') +\r\n '.');\r\n }\r\n}", "function validateExactNumberOfArgs(functionName, args, numberOfArgs) {\r\n if (args.length !== numberOfArgs) {\r\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Function \" + functionName + \"() requires \" +\r\n formatPlural(numberOfArgs, 'argument') +\r\n ', but was called with ' +\r\n formatPlural(args.length, 'argument') +\r\n '.');\r\n }\r\n}", "function validateExactNumberOfArgs(functionName, args, numberOfArgs) {\n if (args.length !== numberOfArgs) {\n throw new __WEBPACK_IMPORTED_MODULE_1__error__[\"b\" /* FirestoreError */](__WEBPACK_IMPORTED_MODULE_1__error__[\"a\" /* Code */].INVALID_ARGUMENT, \"Function \" + functionName + \"() requires \" +\n formatPlural(numberOfArgs, 'argument') +\n ', but was called with ' +\n formatPlural(args.length, 'argument') +\n '.');\n }\n}", "function validateBetweenNumberOfArgs(functionName, args, minNumberOfArgs, maxNumberOfArgs) {\n if (args.length < minNumberOfArgs || args.length > maxNumberOfArgs) {\n throw new __WEBPACK_IMPORTED_MODULE_1__error__[\"a\" /* FirestoreError */](__WEBPACK_IMPORTED_MODULE_1__error__[\"b\" /* Code */].INVALID_ARGUMENT, \"Function \" + functionName + \"() requires between \" + minNumberOfArgs + \" and \" +\n (maxNumberOfArgs + \" arguments, but was called with \") +\n formatPlural(args.length, 'argument') +\n '.');\n }\n}", "function validateBetweenNumberOfArgs(functionName, args, minNumberOfArgs, maxNumberOfArgs) {\n if (args.length < minNumberOfArgs || args.length > maxNumberOfArgs) {\n throw new __WEBPACK_IMPORTED_MODULE_1__error__[\"a\" /* FirestoreError */](__WEBPACK_IMPORTED_MODULE_1__error__[\"b\" /* Code */].INVALID_ARGUMENT, \"Function \" + functionName + \"() requires between \" + minNumberOfArgs + \" and \" +\n (maxNumberOfArgs + \" arguments, but was called with \") +\n formatPlural(args.length, 'argument') +\n '.');\n }\n}", "function isNotChained(command, otherArgs) {\n if (command == 'option' && (otherArgs.length == 0 ||\n (otherArgs.length == 1 && typeof otherArgs[0] == 'string'))) {\n return true;\n }\n return $.inArray(command, getters) > -1;\n}", "function PopArg() {\r\n}", "function qo(t, e, n) {\n if (e.length !== n) throw new x(D.INVALID_ARGUMENT, \"Function \" + t + \"() requires \" + es(n, \"argument\") + \", but was called with \" + es(e.length, \"argument\") + \".\");\n}", "function validateBetweenNumberOfArgs(functionName, args, minNumberOfArgs, maxNumberOfArgs) {\n if (args.length < minNumberOfArgs || args.length > maxNumberOfArgs) {\n throw new __WEBPACK_IMPORTED_MODULE_1__error__[\"b\" /* FirestoreError */](__WEBPACK_IMPORTED_MODULE_1__error__[\"a\" /* Code */].INVALID_ARGUMENT, \"Function \" + functionName + \"() requires between \" + minNumberOfArgs + \" and \" +\n (maxNumberOfArgs + \" arguments, but was called with \") +\n formatPlural(args.length, 'argument') +\n '.');\n }\n}", "function validateOptionalArgType(functionName,type,position,argument){if(argument!==undefined){validateArgType(functionName,type,position,argument);}}", "function test2() {\n var _arguments = arguments;\n for (var i = 0; i < 1; i++) {\n _arguments = [0]; // Unsupported phi use of arguments\n }\n}", "function myFunction2(arg) {\n return arg[1];\n}", "function callWith2Arg(arg1, arg2, func) {\n return func(arg1,arg2)\n}", "function validateExactNumberOfArgs(functionName, args, numberOfArgs) {\n if (args.length !== numberOfArgs) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Function \" + functionName + \"() requires \" + formatPlural(numberOfArgs, 'argument') + ', but was called with ' + formatPlural(args.length, 'argument') + '.');\n }\n}", "function validateArgType(functionName,type,position,argument){validateType(functionName,type,ordinal(position)+\" argument\",argument);}", "function isNotChained(command, otherArgs) {\n\tif (command == 'option' && (otherArgs.length == 0 ||\n\t\t\t(otherArgs.length == 1 && typeof otherArgs[0] == 'string'))) {\n\t\treturn true;\n\t}\n\treturn $.inArray(command, getters) > -1;\n}", "function isNotChained(command, otherArgs) {\n\tif (command == 'option' && (otherArgs.length == 0 ||\n\t\t\t(otherArgs.length == 1 && typeof otherArgs[0] == 'string'))) {\n\t\treturn true;\n\t}\n\treturn $.inArray(command, getters) > -1;\n}", "function validateExactNumberOfArgs(functionName, args, numberOfArgs) {\n if (args.length !== numberOfArgs) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Function \" + functionName + \"() requires \" +\n formatPlural(numberOfArgs, 'argument') +\n ', but was called with ' +\n formatPlural(args.length, 'argument') +\n '.');\n }\n}", "function validateExactNumberOfArgs(functionName, args, numberOfArgs) {\n if (args.length !== numberOfArgs) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Function \" + functionName + \"() requires \" +\n formatPlural(numberOfArgs, 'argument') +\n ', but was called with ' +\n formatPlural(args.length, 'argument') +\n '.');\n }\n}", "function validateExactNumberOfArgs(functionName, args, numberOfArgs) {\n if (args.length !== numberOfArgs) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Function \" + functionName + \"() requires \" +\n formatPlural(numberOfArgs, 'argument') +\n ', but was called with ' +\n formatPlural(args.length, 'argument') +\n '.');\n }\n}", "function f3(a,...b){}", "function mixArguments(first, second) {\n \"use strict\";\n console.log(arguments.length);\n console.log(first === arguments[0]); // true\n console.log(second === arguments[1]); // true\n // because of \"use strict\" the value of the arguments cannot be change\n first = 300;\n second = 400;\n console.log(first === arguments[0]); // false\n console.log(second === arguments[1]); // false\n}", "function argsFor() {\n\n}", "function handleMany(a, b, ... rest) {\r\n console.log(`we have ${rest.length} additional parameters`);\r\n if (rest.length > 0) {\r\n console.log(`the third parameter is ${rest[0]}`);\r\n }\r\n}", "function unknownFn(arg) {\n console.log(\"%s is not a valid option!\", arg);\n return;\n}" ]
[ "0.66999125", "0.66169", "0.66078186", "0.62619156", "0.6085757", "0.6078876", "0.60607874", "0.6044875", "0.6013319", "0.6013319", "0.6001775", "0.5957773", "0.59493506", "0.59154224", "0.58943975", "0.5889102", "0.58630645", "0.58504117", "0.5838746", "0.5819491", "0.57694334", "0.5752927", "0.5749456", "0.5745727", "0.5741145", "0.57304496", "0.5711831", "0.5672413", "0.5639842", "0.56377065", "0.56319314", "0.56291217", "0.5608218", "0.55981934", "0.5596261", "0.5543383", "0.5541987", "0.55345094", "0.5533155", "0.5529724", "0.5524118", "0.55177456", "0.55033886", "0.5499894", "0.54910713", "0.54910713", "0.54910713", "0.54910713", "0.5489415", "0.54887855", "0.54861367", "0.5478401", "0.54606974", "0.5459932", "0.54554194", "0.5453423", "0.5453293", "0.54492474", "0.5449239", "0.54392016", "0.54039127", "0.54003596", "0.53999376", "0.5393351", "0.5391857", "0.53898287", "0.53860325", "0.538481", "0.5372485", "0.5371968", "0.5371968", "0.53654647", "0.5363632", "0.53615564", "0.535302", "0.5345417", "0.5345417", "0.5345417", "0.5344415", "0.53401965", "0.53401965", "0.53262746", "0.5323659", "0.5321537", "0.53197646", "0.53156984", "0.53133935", "0.5312133", "0.530862", "0.53074825", "0.53056407", "0.5302688", "0.5302688", "0.53022695", "0.53022695", "0.53022695", "0.52915204", "0.52884823", "0.52845865", "0.52785945", "0.52767277" ]
0.0
-1
Will NOT populate extendedProps with the leftover properties. Will NOT populate daterelated props. The EventNonDateInput has been normalized (id => publicId, etc).
function parseEventDef(raw, sourceId, allDay, hasEnd, calendar) { var leftovers = {}; var def = pluckNonDateProps(raw, calendar, leftovers); def.defId = String(uid++); def.sourceId = sourceId; def.allDay = allDay; def.hasEnd = hasEnd; for (var _i = 0, _a = calendar.pluginSystem.hooks.eventDefParsers; _i < _a.length; _i++) { var eventDefParser = _a[_i]; var newLeftovers = {}; eventDefParser(def, leftovers, newLeftovers); leftovers = newLeftovers; } def.extendedProps = __assign(leftovers, def.extendedProps || {}); // help out EventApi from having user modify props Object.freeze(def.ui.classNames); Object.freeze(def.extendedProps); return def; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function normalizeEventDates(eventProps) {\n\n\t\t\tnormalizeEventTimes(eventProps);\n\n\t\t\tif (eventProps.end && !eventProps.end.isAfter(eventProps.start)) {\n\t\t\t\teventProps.end = null;\n\t\t\t}\n\n\t\t\tif (!eventProps.end) {\n\t\t\t\tif (t.options.forceEventDuration) {\n\t\t\t\t\teventProps.end = t.getDefaultEventEnd(eventProps.allDay, eventProps.start);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\teventProps.end = null;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function normalizeEventDates(eventProps) {\n\n\t\tnormalizeEventTimes(eventProps);\n\n\t\tif (eventProps.end && !eventProps.end.isAfter(eventProps.start)) {\n\t\t\teventProps.end = null;\n\t\t}\n\n\t\tif (!eventProps.end) {\n\t\t\tif (options.forceEventDuration) {\n\t\t\t\teventProps.end = t.getDefaultEventEnd(eventProps.allDay, eventProps.start);\n\t\t\t}\n\t\t\telse {\n\t\t\t\teventProps.end = null;\n\t\t\t}\n\t\t}\n\t}", "function normalizeEventDates(eventProps) {\n\n\t\tnormalizeEventTimes(eventProps);\n\n\t\tif (eventProps.end && !eventProps.end.isAfter(eventProps.start)) {\n\t\t\teventProps.end = null;\n\t\t}\n\n\t\tif (!eventProps.end) {\n\t\t\tif (t.options.forceEventDuration) {\n\t\t\t\teventProps.end = t.getDefaultEventEnd(eventProps.allDay, eventProps.start);\n\t\t\t}\n\t\t\telse {\n\t\t\t\teventProps.end = null;\n\t\t\t}\n\t\t}\n\t}", "function normalizeEventDates(eventProps) {\n\n\t\tnormalizeEventTimes(eventProps);\n\n\t\tif (eventProps.end && !eventProps.end.isAfter(eventProps.start)) {\n\t\t\teventProps.end = null;\n\t\t}\n\n\t\tif (!eventProps.end) {\n\t\t\tif (t.options.forceEventDuration) {\n\t\t\t\teventProps.end = t.getDefaultEventEnd(eventProps.allDay, eventProps.start);\n\t\t\t}\n\t\t\telse {\n\t\t\t\teventProps.end = null;\n\t\t\t}\n\t\t}\n\t}", "function normalizeEventDates(eventProps) {\n\n\t\tnormalizeEventTimes(eventProps);\n\n\t\tif (eventProps.end && !eventProps.end.isAfter(eventProps.start)) {\n\t\t\teventProps.end = null;\n\t\t}\n\n\t\tif (!eventProps.end) {\n\t\t\tif (t.opt('forceEventDuration')) {\n\t\t\t\teventProps.end = t.getDefaultEventEnd(eventProps.allDay, eventProps.start);\n\t\t\t}\n\t\t\telse {\n\t\t\t\teventProps.end = null;\n\t\t\t}\n\t\t}\n\t}", "function normalizeEventDates(eventProps) {\n\n\t\tnormalizeEventTimes(eventProps);\n\n\t\tif (eventProps.end && !eventProps.end.isAfter(eventProps.start)) {\n\t\t\teventProps.end = null;\n\t\t}\n\n\t\tif (!eventProps.end) {\n\t\t\tif (t.opt('forceEventDuration')) {\n\t\t\t\teventProps.end = t.getDefaultEventEnd(eventProps.allDay, eventProps.start);\n\t\t\t}\n\t\t\telse {\n\t\t\t\teventProps.end = null;\n\t\t\t}\n\t\t}\n\t}", "function normalizeEventTimes(eventProps) {\n\t\tif (eventProps.allDay == null) {\n\t\t\teventProps.allDay = !(eventProps.start.hasTime() || (eventProps.end && eventProps.end.hasTime()));\n\t\t}\n\n\t\tif (eventProps.allDay) {\n\t\t\teventProps.start.stripTime();\n\t\t\tif (eventProps.end) {\n\t\t\t\t// TODO: consider nextDayThreshold here? If so, will require a lot of testing and adjustment\n\t\t\t\teventProps.end.stripTime();\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif (!eventProps.start.hasTime()) {\n\t\t\t\teventProps.start = t.applyTimezone(eventProps.start.time(0)); // will assign a 00:00 time\n\t\t\t}\n\t\t\tif (eventProps.end && !eventProps.end.hasTime()) {\n\t\t\t\teventProps.end = t.applyTimezone(eventProps.end.time(0)); // will assign a 00:00 time\n\t\t\t}\n\t\t}\n\t}", "function normalizeEventTimes(eventProps) {\n\t\tif (eventProps.allDay == null) {\n\t\t\teventProps.allDay = !(eventProps.start.hasTime() || (eventProps.end && eventProps.end.hasTime()));\n\t\t}\n\n\t\tif (eventProps.allDay) {\n\t\t\teventProps.start.stripTime();\n\t\t\tif (eventProps.end) {\n\t\t\t\t// TODO: consider nextDayThreshold here? If so, will require a lot of testing and adjustment\n\t\t\t\teventProps.end.stripTime();\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif (!eventProps.start.hasTime()) {\n\t\t\t\teventProps.start = t.applyTimezone(eventProps.start.time(0)); // will assign a 00:00 time\n\t\t\t}\n\t\t\tif (eventProps.end && !eventProps.end.hasTime()) {\n\t\t\t\teventProps.end = t.applyTimezone(eventProps.end.time(0)); // will assign a 00:00 time\n\t\t\t}\n\t\t}\n\t}", "function normalizeEventTimes(eventProps) {\n\t\tif (eventProps.allDay == null) {\n\t\t\teventProps.allDay = !(eventProps.start.hasTime() || (eventProps.end && eventProps.end.hasTime()));\n\t\t}\n\n\t\tif (eventProps.allDay) {\n\t\t\teventProps.start.stripTime();\n\t\t\tif (eventProps.end) {\n\t\t\t\t// TODO: consider nextDayThreshold here? If so, will require a lot of testing and adjustment\n\t\t\t\teventProps.end.stripTime();\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif (!eventProps.start.hasTime()) {\n\t\t\t\teventProps.start = t.applyTimezone(eventProps.start.time(0)); // will assign a 00:00 time\n\t\t\t}\n\t\t\tif (eventProps.end && !eventProps.end.hasTime()) {\n\t\t\t\teventProps.end = t.applyTimezone(eventProps.end.time(0)); // will assign a 00:00 time\n\t\t\t}\n\t\t}\n\t}", "function normalizeEventTimes(eventProps) {\n\t\tif (eventProps.allDay == null) {\n\t\t\teventProps.allDay = !(eventProps.start.hasTime() || (eventProps.end && eventProps.end.hasTime()));\n\t\t}\n\n\t\tif (eventProps.allDay) {\n\t\t\teventProps.start.stripTime();\n\t\t\tif (eventProps.end) {\n\t\t\t\t// TODO: consider nextDayThreshold here? If so, will require a lot of testing and adjustment\n\t\t\t\teventProps.end.stripTime();\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif (!eventProps.start.hasTime()) {\n\t\t\t\teventProps.start = t.applyTimezone(eventProps.start.time(0)); // will assign a 00:00 time\n\t\t\t}\n\t\t\tif (eventProps.end && !eventProps.end.hasTime()) {\n\t\t\t\teventProps.end = t.applyTimezone(eventProps.end.time(0)); // will assign a 00:00 time\n\t\t\t}\n\t\t}\n\t}", "function normalizeEventTimes(eventProps) {\n\t\tif (eventProps.allDay == null) {\n\t\t\teventProps.allDay = !(eventProps.start.hasTime() || (eventProps.end && eventProps.end.hasTime()));\n\t\t}\n\n\t\tif (eventProps.allDay) {\n\t\t\teventProps.start.stripTime();\n\t\t\tif (eventProps.end) {\n\t\t\t\t// TODO: consider nextDayThreshold here? If so, will require a lot of testing and adjustment\n\t\t\t\teventProps.end.stripTime();\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif (!eventProps.start.hasTime()) {\n\t\t\t\teventProps.start = t.applyTimezone(eventProps.start.time(0)); // will assign a 00:00 time\n\t\t\t}\n\t\t\tif (eventProps.end && !eventProps.end.hasTime()) {\n\t\t\t\teventProps.end = t.applyTimezone(eventProps.end.time(0)); // will assign a 00:00 time\n\t\t\t}\n\t\t}\n\t}", "function normalizeEventTimes(eventProps) {\n\t\t\tif (eventProps.allDay == null) {\n\t\t\t\teventProps.allDay = !(eventProps.start.hasTime() || (eventProps.end && eventProps.end.hasTime()));\n\t\t\t}\n\n\t\t\tif (eventProps.allDay) {\n\t\t\t\teventProps.start.stripTime();\n\t\t\t\tif (eventProps.end) {\n\t\t\t\t\t// TODO: consider nextDayThreshold here? If so, will require a lot of testing and adjustment\n\t\t\t\t\teventProps.end.stripTime();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (!eventProps.start.hasTime()) {\n\t\t\t\t\teventProps.start = t.applyTimezone(eventProps.start.time(0)); // will assign a 00:00 time\n\t\t\t\t}\n\t\t\t\tif (eventProps.end && !eventProps.end.hasTime()) {\n\t\t\t\t\teventProps.end = t.applyTimezone(eventProps.end.time(0)); // will assign a 00:00 time\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function normalizeEventRange(props) {\n\n\t\tnormalizeEventRangeTimes(props);\n\n\t\tif (props.end && !props.end.isAfter(props.start)) {\n\t\t\tprops.end = null;\n\t\t}\n\n\t\tif (!props.end) {\n\t\t\tif (options.forceEventDuration) {\n\t\t\t\tprops.end = t.getDefaultEventEnd(props.allDay, props.start);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tprops.end = null;\n\t\t\t}\n\t\t}\n\t}", "function parseEventDef(raw, sourceId, allDay, hasEnd, calendar) {\n var leftovers = {};\n var def = pluckNonDateProps(raw, calendar, leftovers);\n def.defId = String(uid++);\n def.sourceId = sourceId;\n def.allDay = allDay;\n def.hasEnd = hasEnd;\n\n for (var _i = 0, _a = calendar.pluginSystem.hooks.eventDefParsers; _i < _a.length; _i++) {\n var eventDefParser = _a[_i];\n var newLeftovers = {};\n eventDefParser(def, leftovers, newLeftovers);\n leftovers = newLeftovers;\n }\n\n def.extendedProps = _assign(leftovers, def.extendedProps || {}); // help out EventApi from having user modify props\n\n Object.freeze(def.ui.classNames);\n Object.freeze(def.extendedProps);\n return def;\n }", "function datepicker_extendRemove(target, props) {\r\n\t$.extend(target, props);\r\n\tfor (var name in props) {\r\n\t\tif (props[name] == null) {\r\n\t\t\ttarget[name] = props[name];\r\n\t\t}\r\n\t}\r\n\treturn target;\r\n}", "function cleanProps(props) {\n /* eslint-disable no-unused-vars */\n var analyticsId = props.analyticsId,\n analyticsData = props.analyticsData,\n delegateAnalyticsEvent = props.delegateAnalyticsEvent,\n fireAnalyticsEvent = props.fireAnalyticsEvent,\n firePrivateAnalyticsEvent = props.firePrivateAnalyticsEvent,\n getParentAnalyticsData = props.getParentAnalyticsData,\n cleanedProps = _objectWithoutProperties(props, [\"analyticsId\", \"analyticsData\", \"delegateAnalyticsEvent\", \"fireAnalyticsEvent\", \"firePrivateAnalyticsEvent\", \"getParentAnalyticsData\"]);\n /* eslint-enable no-unused-vars */\n\n\n return cleanedProps;\n}", "function datepicker_extendRemove( target, props ) {\n $.extend( target, props );\n for ( var name in props ) {\n if ( props[ name ] == null ) {\n target[ name ] = props[ name ];\n }\n }\n return target;\n}", "function datepicker_extendRemove(target,props){$.extend(target,props);for(var name in props) {if(props[name] == null){target[name] = props[name];}}return target;}", "function datepicker_extendRemove(target,props){$.extend(target,props);for(var name in props) {if(props[name] == null){target[name] = props[name];}}return target;}", "function cleanProps(props: Object) {\n /* eslint-disable no-unused-vars */\n const {\n analyticsId,\n analyticsData,\n delegateAnalyticsEvent,\n fireAnalyticsEvent,\n firePrivateAnalyticsEvent,\n getParentAnalyticsData,\n ...cleanedProps\n } = props;\n /* eslint-enable no-unused-vars */\n return cleanedProps;\n}", "function datepicker_extendRemove(target, props) {\n\t$.extend(target, props);\n\tfor (var name in props) {\n\t\tif (props[name] == null) {\n\t\t\ttarget[name] = props[name];\n\t\t}\n\t}\n\treturn target;\n}", "function datepicker_extendRemove(target, props) {\n\t$.extend(target, props);\n\tfor (var name in props) {\n\t\tif (props[name] == null) {\n\t\t\ttarget[name] = props[name];\n\t\t}\n\t}\n\treturn target;\n}", "function datepicker_extendRemove(target, props) {\n\t$.extend(target, props);\n\tfor (var name in props) {\n\t\tif (props[name] == null) {\n\t\t\ttarget[name] = props[name];\n\t\t}\n\t}\n\treturn target;\n}", "function datepicker_extendRemove(target, props) {\n\t$.extend(target, props);\n\tfor (var name in props) {\n\t\tif (props[name] == null) {\n\t\t\ttarget[name] = props[name];\n\t\t}\n\t}\n\treturn target;\n}", "function datepicker_extendRemove(target, props) {\n\t$.extend(target, props);\n\tfor (var name in props) {\n\t\tif (props[name] == null) {\n\t\t\ttarget[name] = props[name];\n\t\t}\n\t}\n\treturn target;\n}", "function datepicker_extendRemove(target, props) {\n\t$.extend(target, props);\n\tfor (var name in props) {\n\t\tif (props[name] == null) {\n\t\t\ttarget[name] = props[name];\n\t\t}\n\t}\n\treturn target;\n}", "function datepicker_extendRemove(target, props) {\n\t$.extend(target, props);\n\tfor (var name in props) {\n\t\tif (props[name] == null) {\n\t\t\ttarget[name] = props[name];\n\t\t}\n\t}\n\treturn target;\n}", "function datepicker_extendRemove(target, props) {\n\t$.extend(target, props);\n\tfor (var name in props) {\n\t\tif (props[name] == null) {\n\t\t\ttarget[name] = props[name];\n\t\t}\n\t}\n\treturn target;\n}", "function datepicker_extendRemove(target, props) {\n\t$.extend(target, props);\n\tfor (var name in props) {\n\t\tif (props[name] == null) {\n\t\t\ttarget[name] = props[name];\n\t\t}\n\t}\n\treturn target;\n}", "function datepicker_extendRemove(target, props) {\n\t$.extend(target, props);\n\tfor (var name in props) {\n\t\tif (props[name] == null) {\n\t\t\ttarget[name] = props[name];\n\t\t}\n\t}\n\treturn target;\n}", "function datepicker_extendRemove(target, props) {\n\t$.extend(target, props);\n\tfor (var name in props) {\n\t\tif (props[name] == null) {\n\t\t\ttarget[name] = props[name];\n\t\t}\n\t}\n\treturn target;\n}", "function datepicker_extendRemove(target, props) {\n\t$.extend(target, props);\n\tfor (var name in props) {\n\t\tif (props[name] == null) {\n\t\t\ttarget[name] = props[name];\n\t\t}\n\t}\n\treturn target;\n}", "function datepicker_extendRemove(target, props) {\n\t$.extend(target, props);\n\tfor (var name in props) {\n\t\tif (props[name] == null) {\n\t\t\ttarget[name] = props[name];\n\t\t}\n\t}\n\treturn target;\n}", "function datepicker_extendRemove(target, props) {\n\t$.extend(target, props);\n\tfor (var name in props) {\n\t\tif (props[name] == null) {\n\t\t\ttarget[name] = props[name];\n\t\t}\n\t}\n\treturn target;\n}", "function datepicker_extendRemove(target, props) {\n\t$.extend(target, props);\n\tfor (var name in props) {\n\t\tif (props[name] == null) {\n\t\t\ttarget[name] = props[name];\n\t\t}\n\t}\n\treturn target;\n}", "function datepicker_extendRemove(target, props) {\n\t$.extend(target, props);\n\tfor (var name in props) {\n\t\tif (props[name] == null) {\n\t\t\ttarget[name] = props[name];\n\t\t}\n\t}\n\treturn target;\n}", "function datepicker_extendRemove(target, props) {\n\t$.extend(target, props);\n\tfor (var name in props) {\n\t\tif (props[name] == null) {\n\t\t\ttarget[name] = props[name];\n\t\t}\n\t}\n\treturn target;\n}", "function datepicker_extendRemove(target, props) {\n\t$.extend(target, props);\n\tfor (var name in props) {\n\t\tif (props[name] == null) {\n\t\t\ttarget[name] = props[name];\n\t\t}\n\t}\n\treturn target;\n}", "function datepicker_extendRemove(target, props) {\n\t$.extend(target, props);\n\tfor (var name in props) {\n\t\tif (props[name] == null) {\n\t\t\ttarget[name] = props[name];\n\t\t}\n\t}\n\treturn target;\n}", "function datepicker_extendRemove(target, props) {\n\t$.extend(target, props);\n\tfor (var name in props) {\n\t\tif (props[name] == null) {\n\t\t\ttarget[name] = props[name];\n\t\t}\n\t}\n\treturn target;\n}", "function parseEventDef(raw, sourceId, allDay, hasEnd, calendar) {\n var leftovers = {};\n var def = pluckNonDateProps(raw, calendar, leftovers);\n def.defId = String(uid++);\n def.sourceId = sourceId;\n def.allDay = allDay;\n def.hasEnd = hasEnd;\n for (var _i = 0, _a = calendar.pluginSystem.hooks.eventDefParsers; _i < _a.length; _i++) {\n var eventDefParser = _a[_i];\n var newLeftovers = {};\n eventDefParser(def, leftovers, newLeftovers);\n leftovers = newLeftovers;\n }\n def.extendedProps = __assign(leftovers, def.extendedProps || {});\n // help out EventApi from having user modify props\n Object.freeze(def.ui.classNames);\n Object.freeze(def.extendedProps);\n return def;\n}", "function normalizeEventRange(props) {\n\n normalizeEventRangeTimes(props);\n\n if (props.end && !props.end.isAfter(props.start)) {\n props.end = null;\n }\n\n if (!props.end) {\n if (options.forceEventDuration) {\n props.end = t.getDefaultEventEnd(props.allDay, props.start);\n }\n else {\n props.end = null;\n }\n }\n }", "function parseEventDef$1(raw, sourceId, allDay, hasEnd, calendar) {\n var leftovers = {};\n var def = pluckNonDateProps$1(raw, calendar, leftovers);\n def.defId = String(uid$4++);\n def.sourceId = sourceId;\n def.allDay = allDay;\n def.hasEnd = hasEnd;\n for (var _i = 0, _a = calendar.pluginSystem.hooks.eventDefParsers; _i < _a.length; _i++) {\n var eventDefParser = _a[_i];\n var newLeftovers = {};\n eventDefParser(def, leftovers, newLeftovers);\n leftovers = newLeftovers;\n }\n def.extendedProps = __assign$1(leftovers, def.extendedProps || {});\n // help out EventApi from having user modify props\n Object.freeze(def.ui.classNames);\n Object.freeze(def.extendedProps);\n return def;\n }", "function parseEventDef(raw, sourceId, allDay, hasEnd, calendar) {\n var leftovers = {};\n var def = pluckNonDateProps(raw, calendar, leftovers);\n def.defId = String(uid++);\n def.sourceId = sourceId;\n def.allDay = allDay;\n def.hasEnd = hasEnd;\n\n for (var _i = 0, _a = calendar.pluginSystem.hooks.eventDefParsers; _i < _a.length; _i++) {\n var eventDefParser = _a[_i];\n var newLeftovers = {};\n eventDefParser(def, leftovers, newLeftovers);\n leftovers = newLeftovers;\n }\n\n def.extendedProps = tslib_1.__assign(leftovers, def.extendedProps || {}); // help out EventApi from having user modify props\n\n Object.freeze(def.ui.classNames);\n Object.freeze(def.extendedProps);\n return def;\n }", "function datepicker_extendRemove( target, props ) {\r\n $.extend( target, props );\r\n for ( var name in props ) {\r\n if ( props[ name ] == null ) {\r\n target[ name ] = props[ name ];\r\n }\r\n }\r\n return target;\r\n }", "function datepicker_extendRemove( target, props ) {\n\t$.extend( target, props );\n\tfor ( var name in props ) {\n\t\tif ( props[ name ] == null ) {\n\t\t\ttarget[ name ] = props[ name ];\n\t\t}\n\t}\n\treturn target;\n}", "function datepicker_extendRemove( target, props ) {\n\t$.extend( target, props );\n\tfor ( var name in props ) {\n\t\tif ( props[ name ] == null ) {\n\t\t\ttarget[ name ] = props[ name ];\n\t\t}\n\t}\n\treturn target;\n}", "function datepicker_extendRemove( target, props ) {\n\t$.extend( target, props );\n\tfor ( var name in props ) {\n\t\tif ( props[ name ] == null ) {\n\t\t\ttarget[ name ] = props[ name ];\n\t\t}\n\t}\n\treturn target;\n}", "function datepicker_extendRemove( target, props ) {\n\t$.extend( target, props );\n\tfor ( var name in props ) {\n\t\tif ( props[ name ] == null ) {\n\t\t\ttarget[ name ] = props[ name ];\n\t\t}\n\t}\n\treturn target;\n}", "function datepicker_extendRemove( target, props ) {\n\t$.extend( target, props );\n\tfor ( var name in props ) {\n\t\tif ( props[ name ] == null ) {\n\t\t\ttarget[ name ] = props[ name ];\n\t\t}\n\t}\n\treturn target;\n}", "function datepicker_extendRemove( target, props ) {\n\t$.extend( target, props );\n\tfor ( var name in props ) {\n\t\tif ( props[ name ] == null ) {\n\t\t\ttarget[ name ] = props[ name ];\n\t\t}\n\t}\n\treturn target;\n}", "function datepicker_extendRemove( target, props ) {\n\t$.extend( target, props );\n\tfor ( var name in props ) {\n\t\tif ( props[ name ] == null ) {\n\t\t\ttarget[ name ] = props[ name ];\n\t\t}\n\t}\n\treturn target;\n}", "function datepicker_extendRemove( target, props ) {\n\t$.extend( target, props );\n\tfor ( var name in props ) {\n\t\tif ( props[ name ] == null ) {\n\t\t\ttarget[ name ] = props[ name ];\n\t\t}\n\t}\n\treturn target;\n}", "function datepicker_extendRemove( target, props ) {\n\t$.extend( target, props );\n\tfor ( var name in props ) {\n\t\tif ( props[ name ] == null ) {\n\t\t\ttarget[ name ] = props[ name ];\n\t\t}\n\t}\n\treturn target;\n}", "function datepicker_extendRemove( target, props ) {\n\t$.extend( target, props );\n\tfor ( var name in props ) {\n\t\tif ( props[ name ] == null ) {\n\t\t\ttarget[ name ] = props[ name ];\n\t\t}\n\t}\n\treturn target;\n}", "function datepicker_extendRemove( target, props ) {\n\t$.extend( target, props );\n\tfor ( var name in props ) {\n\t\tif ( props[ name ] == null ) {\n\t\t\ttarget[ name ] = props[ name ];\n\t\t}\n\t}\n\treturn target;\n}", "function datepicker_extendRemove( target, props ) {\n\t$.extend( target, props );\n\tfor ( var name in props ) {\n\t\tif ( props[ name ] == null ) {\n\t\t\ttarget[ name ] = props[ name ];\n\t\t}\n\t}\n\treturn target;\n}", "function datepicker_extendRemove( target, props ) {\n\t$.extend( target, props );\n\tfor ( var name in props ) {\n\t\tif ( props[ name ] == null ) {\n\t\t\ttarget[ name ] = props[ name ];\n\t\t}\n\t}\n\treturn target;\n}", "function datepicker_extendRemove( target, props ) {\n\t$.extend( target, props );\n\tfor ( var name in props ) {\n\t\tif ( props[ name ] == null ) {\n\t\t\ttarget[ name ] = props[ name ];\n\t\t}\n\t}\n\treturn target;\n}", "function datepicker_extendRemove( target, props ) {\n\t$.extend( target, props );\n\tfor ( var name in props ) {\n\t\tif ( props[ name ] == null ) {\n\t\t\ttarget[ name ] = props[ name ];\n\t\t}\n\t}\n\treturn target;\n}", "function datepicker_extendRemove( target, props ) {\n\t$.extend( target, props );\n\tfor ( var name in props ) {\n\t\tif ( props[ name ] == null ) {\n\t\t\ttarget[ name ] = props[ name ];\n\t\t}\n\t}\n\treturn target;\n}", "function datepicker_extendRemove( target, props ) {\n\t$.extend( target, props );\n\tfor ( var name in props ) {\n\t\tif ( props[ name ] == null ) {\n\t\t\ttarget[ name ] = props[ name ];\n\t\t}\n\t}\n\treturn target;\n}", "function datepicker_extendRemove( target, props ) {\n\t$.extend( target, props );\n\tfor ( var name in props ) {\n\t\tif ( props[ name ] == null ) {\n\t\t\ttarget[ name ] = props[ name ];\n\t\t}\n\t}\n\treturn target;\n}", "function datepicker_extendRemove( target, props ) {\n\t$.extend( target, props );\n\tfor ( var name in props ) {\n\t\tif ( props[ name ] == null ) {\n\t\t\ttarget[ name ] = props[ name ];\n\t\t}\n\t}\n\treturn target;\n}", "function datepicker_extendRemove( target, props ) {\n\t$.extend( target, props );\n\tfor ( var name in props ) {\n\t\tif ( props[ name ] == null ) {\n\t\t\ttarget[ name ] = props[ name ];\n\t\t}\n\t}\n\treturn target;\n}", "function datepicker_extendRemove( target, props ) {\n\t$.extend( target, props );\n\tfor ( var name in props ) {\n\t\tif ( props[ name ] == null ) {\n\t\t\ttarget[ name ] = props[ name ];\n\t\t}\n\t}\n\treturn target;\n}", "function datepicker_extendRemove( target, props ) {\n\t$.extend( target, props );\n\tfor ( var name in props ) {\n\t\tif ( props[ name ] == null ) {\n\t\t\ttarget[ name ] = props[ name ];\n\t\t}\n\t}\n\treturn target;\n}", "function datepicker_extendRemove( target, props ) {\n\t$.extend( target, props );\n\tfor ( var name in props ) {\n\t\tif ( props[ name ] == null ) {\n\t\t\ttarget[ name ] = props[ name ];\n\t\t}\n\t}\n\treturn target;\n}", "function datepicker_extendRemove(target,props){$.extend(target,props);for(var name in props){if(props[name]==null){target[name]=props[name];}}return target;}", "function datepicker_extendRemove(target,props){$.extend(target,props);for(var name in props){if(props[name]==null){target[name]=props[name];}}return target;}", "function datepicker_extendRemove(target,props){$.extend(target,props);for(var name in props){if(props[name]==null){target[name]=props[name];}}return target;}", "function processProps(props) {\n var title = props.title,\n label = props.label,\n key = props.key,\n value = props.value;\n\n var cloneProps = _extends({}, props); // Warning user not to use deprecated label prop.\n\n\n if (label && !title) {\n if (!warnDeprecatedLabel) {\n warning__WEBPACK_IMPORTED_MODULE_1___default()(false, \"'label' in treeData is deprecated. Please use 'title' instead.\");\n warnDeprecatedLabel = true;\n }\n\n cloneProps.title = label;\n }\n\n if (!key && (key === undefined || key === null)) {\n cloneProps.key = value;\n }\n\n return cloneProps;\n}", "function mutateEvent(event, newProps, largeUnit) {\n var miscProps = {};\n var oldProps;\n var clearEnd;\n var startDelta;\n var endDelta;\n var durationDelta;\n var undoFunc;\n\n // diffs the dates in the appropriate way, returning a duration\n function diffDates(date1, date0) { // date1 - date0\n if (largeUnit) {\n return diffByUnit(date1, date0, largeUnit);\n }\n else if (newProps.allDay) {\n return diffDay(date1, date0);\n }\n else {\n return diffDayTime(date1, date0);\n }\n }\n\n newProps = newProps || {};\n\n // normalize new date-related properties\n if (!newProps.start) {\n newProps.start = event.start.clone();\n }\n if (newProps.end === undefined) {\n newProps.end = event.end ? event.end.clone() : null;\n }\n if (newProps.allDay == null) { // is null or undefined?\n newProps.allDay = event.allDay;\n }\n normalizeEventRange(newProps);\n\n // create normalized versions of the original props to compare against\n // need a real end value, for diffing\n oldProps = {\n start: event._start.clone(),\n end: event._end ? event._end.clone() : t.getDefaultEventEnd(event._allDay, event._start),\n allDay: newProps.allDay // normalize the dates in the same regard as the new properties\n };\n normalizeEventRange(oldProps);\n\n // need to clear the end date if explicitly changed to null\n clearEnd = event._end !== null && newProps.end === null;\n\n // compute the delta for moving the start date\n startDelta = diffDates(newProps.start, oldProps.start);\n\n // compute the delta for moving the end date\n if (newProps.end) {\n endDelta = diffDates(newProps.end, oldProps.end);\n durationDelta = endDelta.subtract(startDelta);\n }\n else {\n durationDelta = null;\n }\n\n // gather all non-date-related properties\n $.each(newProps, function (name, val) {\n if (isMiscEventPropName(name)) {\n if (val !== undefined) {\n miscProps[name] = val;\n }\n }\n });\n\n // apply the operations to the event and all related events\n undoFunc = mutateEvents(\n clientEvents(event._id), // get events with this ID\n clearEnd,\n newProps.allDay,\n startDelta,\n durationDelta,\n miscProps\n );\n\n return {\n dateDelta: startDelta,\n durationDelta: durationDelta,\n undo: undoFunc\n };\n }", "function getMiscEventProps(event) {\n var props = {};\n\n $.each(event, function (name, val) {\n if (isMiscEventPropName(name)) {\n if (val !== undefined && isAtomic(val)) { // a defined non-object\n props[name] = val;\n }\n }\n });\n\n return props;\n }", "componentWillReceiveProps(nextProps) {\n //nextProps are the next set of props that this component will be rendered with\n //this.props is still the OLD set of props\n this.createDateSource(nextProps);\n }", "getCustomProps() {\n const {\n id,\n name,\n helperText,\n label,\n outlined,\n filled,\n required,\n errorMessage,\n disabled,\n readOnly,\n } = this.props;\n\n const customProps = {};\n\n customProps.isDisabled = disabled;\n customProps.readOnly = readOnly;\n customProps.isRequired = required || this.isRequired(name);\n customProps.hasError = !!this.context.submitted && this.context.hasError(name);\n\n const errorText = customProps.hasError && this.context.getError(name, errorMessage);\n customProps.helperText = errorText || helperText || null;\n\n customProps.ariaHelper = `input_${name}`;\n\n customProps.id = id || customProps.ariaHelper;\n customProps.label = label;\n\n if (outlined) {\n customProps.variant = 'outlined';\n customProps.labelWidth = this.labelRef ? this.labelRef.offsetWidth : 0;\n } else if (filled) {\n customProps.variant = 'filled';\n }\n\n return customProps;\n }", "function getMiscEventProps(event) {\n\t\t\tvar props = {};\n\n\t\t\t$.each(event, function(name, val) {\n\t\t\t\tif (isMiscEventPropName(name)) {\n\t\t\t\t\tif (val !== undefined && isAtomic(val)) { // a defined non-object\n\t\t\t\t\t\tprops[name] = val;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn props;\n\t\t}", "function getMiscEventProps(event) {\n\t\tvar props = {};\n\n\t\t$.each(event, function(name, val) {\n\t\t\tif (isMiscEventPropName(name)) {\n\t\t\t\tif (val !== undefined && isAtomic(val)) { // a defined non-object\n\t\t\t\t\tprops[name] = val;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\treturn props;\n\t}", "function getMiscEventProps(event) {\n\t\tvar props = {};\n\n\t\t$.each(event, function(name, val) {\n\t\t\tif (isMiscEventPropName(name)) {\n\t\t\t\tif (val !== undefined && isAtomic(val)) { // a defined non-object\n\t\t\t\t\tprops[name] = val;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\treturn props;\n\t}", "function getMiscEventProps(event) {\n\t\tvar props = {};\n\n\t\t$.each(event, function(name, val) {\n\t\t\tif (isMiscEventPropName(name)) {\n\t\t\t\tif (val !== undefined && isAtomic(val)) { // a defined non-object\n\t\t\t\t\tprops[name] = val;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\treturn props;\n\t}", "function getMiscEventProps(event) {\n\t\tvar props = {};\n\n\t\t$.each(event, function(name, val) {\n\t\t\tif (isMiscEventPropName(name)) {\n\t\t\t\tif (val !== undefined && isAtomic(val)) { // a defined non-object\n\t\t\t\t\tprops[name] = val;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\treturn props;\n\t}", "function getMiscEventProps(event) {\n\t\tvar props = {};\n\n\t\t$.each(event, function(name, val) {\n\t\t\tif (isMiscEventPropName(name)) {\n\t\t\t\tif (val !== undefined && isAtomic(val)) { // a defined non-object\n\t\t\t\t\tprops[name] = val;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\treturn props;\n\t}", "function getMiscEventProps(event) {\n\t\tvar props = {};\n\n\t\t$.each(event, function(name, val) {\n\t\t\tif (isMiscEventPropName(name)) {\n\t\t\t\tif (val !== undefined && isAtomic(val)) { // a defined non-object\n\t\t\t\t\tprops[name] = val;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\treturn props;\n\t}", "extend(props) {\r\n const clone = this.clone()\r\n\r\n Object.assign(clone.props, props)\r\n\r\n return clone\r\n }", "function mutateEvent(event, newProps, largeUnit) {\n\t\t\tvar miscProps = {};\n\t\t\tvar oldProps;\n\t\t\tvar clearEnd;\n\t\t\tvar startDelta;\n\t\t\tvar endDelta;\n\t\t\tvar durationDelta;\n\t\t\tvar undoFunc;\n\n\t\t\t// diffs the dates in the appropriate way, returning a duration\n\t\t\tfunction diffDates(date1, date0) { // date1 - date0\n\t\t\t\tif (largeUnit) {\n\t\t\t\t\treturn diffByUnit(date1, date0, largeUnit);\n\t\t\t\t}\n\t\t\t\telse if (newProps.allDay) {\n\t\t\t\t\treturn diffDay(date1, date0);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\treturn diffDayTime(date1, date0);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tnewProps = newProps || {};\n\n\t\t\t// normalize new date-related properties\n\t\t\tif (!newProps.start) {\n\t\t\t\tnewProps.start = event.start.clone();\n\t\t\t}\n\t\t\tif (newProps.end === undefined) {\n\t\t\t\tnewProps.end = event.end ? event.end.clone() : null;\n\t\t\t}\n\t\t\tif (newProps.allDay == null) { // is null or undefined?\n\t\t\t\tnewProps.allDay = event.allDay;\n\t\t\t}\n\t\t\tnormalizeEventDates(newProps);\n\n\t\t\t// create normalized versions of the original props to compare against\n\t\t\t// need a real end value, for diffing\n\t\t\toldProps = {\n\t\t\t\tstart: event._start.clone(),\n\t\t\t\tend: event._end ? event._end.clone() : t.getDefaultEventEnd(event._allDay, event._start),\n\t\t\t\tallDay: newProps.allDay // normalize the dates in the same regard as the new properties\n\t\t\t};\n\t\t\tnormalizeEventDates(oldProps);\n\n\t\t\t// need to clear the end date if explicitly changed to null\n\t\t\tclearEnd = event._end !== null && newProps.end === null;\n\n\t\t\t// compute the delta for moving the start date\n\t\t\tstartDelta = diffDates(newProps.start, oldProps.start);\n\n\t\t\t// compute the delta for moving the end date\n\t\t\tif (newProps.end) {\n\t\t\t\tendDelta = diffDates(newProps.end, oldProps.end);\n\t\t\t\tdurationDelta = endDelta.subtract(startDelta);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdurationDelta = null;\n\t\t\t}\n\n\t\t\t// gather all non-date-related properties\n\t\t\t$.each(newProps, function(name, val) {\n\t\t\t\tif (isMiscEventPropName(name)) {\n\t\t\t\t\tif (val !== undefined) {\n\t\t\t\t\t\tmiscProps[name] = val;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// apply the operations to the event and all related events\n\t\t\tundoFunc = mutateEvents(\n\t\t\t\tclientEvents(event._id), // get events with this ID\n\t\t\t\tclearEnd,\n\t\t\t\tnewProps.allDay,\n\t\t\t\tstartDelta,\n\t\t\t\tdurationDelta,\n\t\t\t\tmiscProps\n\t\t\t);\n\n\t\t\treturn {\n\t\t\t\tdateDelta: startDelta,\n\t\t\t\tdurationDelta: durationDelta,\n\t\t\t\tundo: undoFunc\n\t\t\t};\n\t\t}", "function mutateEvent(event, newProps, largeUnit) {\n\t\tvar miscProps = {};\n\t\tvar oldProps;\n\t\tvar clearEnd;\n\t\tvar startDelta;\n\t\tvar endDelta;\n\t\tvar durationDelta;\n\t\tvar undoFunc;\n\n\t\t// diffs the dates in the appropriate way, returning a duration\n\t\tfunction diffDates(date1, date0) { // date1 - date0\n\t\t\tif (largeUnit) {\n\t\t\t\treturn diffByUnit(date1, date0, largeUnit);\n\t\t\t}\n\t\t\telse if (newProps.allDay) {\n\t\t\t\treturn diffDay(date1, date0);\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn diffDayTime(date1, date0);\n\t\t\t}\n\t\t}\n\n\t\tnewProps = newProps || {};\n\n\t\t// normalize new date-related properties\n\t\tif (!newProps.start) {\n\t\t\tnewProps.start = event.start.clone();\n\t\t}\n\t\tif (newProps.end === undefined) {\n\t\t\tnewProps.end = event.end ? event.end.clone() : null;\n\t\t}\n\t\tif (newProps.allDay == null) { // is null or undefined?\n\t\t\tnewProps.allDay = event.allDay;\n\t\t}\n\t\tnormalizeEventDates(newProps);\n\n\t\t// create normalized versions of the original props to compare against\n\t\t// need a real end value, for diffing\n\t\toldProps = {\n\t\t\tstart: event._start.clone(),\n\t\t\tend: event._end ? event._end.clone() : t.getDefaultEventEnd(event._allDay, event._start),\n\t\t\tallDay: newProps.allDay // normalize the dates in the same regard as the new properties\n\t\t};\n\t\tnormalizeEventDates(oldProps);\n\n\t\t// need to clear the end date if explicitly changed to null\n\t\tclearEnd = event._end !== null && newProps.end === null;\n\n\t\t// compute the delta for moving the start date\n\t\tstartDelta = diffDates(newProps.start, oldProps.start);\n\n\t\t// compute the delta for moving the end date\n\t\tif (newProps.end) {\n\t\t\tendDelta = diffDates(newProps.end, oldProps.end);\n\t\t\tdurationDelta = endDelta.subtract(startDelta);\n\t\t}\n\t\telse {\n\t\t\tdurationDelta = null;\n\t\t}\n\n\t\t// gather all non-date-related properties\n\t\t$.each(newProps, function(name, val) {\n\t\t\tif (isMiscEventPropName(name)) {\n\t\t\t\tif (val !== undefined) {\n\t\t\t\t\tmiscProps[name] = val;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// apply the operations to the event and all related events\n\t\tundoFunc = mutateEvents(\n\t\t\tclientEvents(event._id), // get events with this ID\n\t\t\tclearEnd,\n\t\t\tnewProps.allDay,\n\t\t\tstartDelta,\n\t\t\tdurationDelta,\n\t\t\tmiscProps\n\t\t);\n\n\t\treturn {\n\t\t\tdateDelta: startDelta,\n\t\t\tdurationDelta: durationDelta,\n\t\t\tundo: undoFunc\n\t\t};\n\t}", "function mutateEvent(event, newProps, largeUnit) {\n\t\tvar miscProps = {};\n\t\tvar oldProps;\n\t\tvar clearEnd;\n\t\tvar startDelta;\n\t\tvar endDelta;\n\t\tvar durationDelta;\n\t\tvar undoFunc;\n\n\t\t// diffs the dates in the appropriate way, returning a duration\n\t\tfunction diffDates(date1, date0) { // date1 - date0\n\t\t\tif (largeUnit) {\n\t\t\t\treturn diffByUnit(date1, date0, largeUnit);\n\t\t\t}\n\t\t\telse if (newProps.allDay) {\n\t\t\t\treturn diffDay(date1, date0);\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn diffDayTime(date1, date0);\n\t\t\t}\n\t\t}\n\n\t\tnewProps = newProps || {};\n\n\t\t// normalize new date-related properties\n\t\tif (!newProps.start) {\n\t\t\tnewProps.start = event.start.clone();\n\t\t}\n\t\tif (newProps.end === undefined) {\n\t\t\tnewProps.end = event.end ? event.end.clone() : null;\n\t\t}\n\t\tif (newProps.allDay == null) { // is null or undefined?\n\t\t\tnewProps.allDay = event.allDay;\n\t\t}\n\t\tnormalizeEventDates(newProps);\n\n\t\t// create normalized versions of the original props to compare against\n\t\t// need a real end value, for diffing\n\t\toldProps = {\n\t\t\tstart: event._start.clone(),\n\t\t\tend: event._end ? event._end.clone() : t.getDefaultEventEnd(event._allDay, event._start),\n\t\t\tallDay: newProps.allDay // normalize the dates in the same regard as the new properties\n\t\t};\n\t\tnormalizeEventDates(oldProps);\n\n\t\t// need to clear the end date if explicitly changed to null\n\t\tclearEnd = event._end !== null && newProps.end === null;\n\n\t\t// compute the delta for moving the start date\n\t\tstartDelta = diffDates(newProps.start, oldProps.start);\n\n\t\t// compute the delta for moving the end date\n\t\tif (newProps.end) {\n\t\t\tendDelta = diffDates(newProps.end, oldProps.end);\n\t\t\tdurationDelta = endDelta.subtract(startDelta);\n\t\t}\n\t\telse {\n\t\t\tdurationDelta = null;\n\t\t}\n\n\t\t// gather all non-date-related properties\n\t\t$.each(newProps, function(name, val) {\n\t\t\tif (isMiscEventPropName(name)) {\n\t\t\t\tif (val !== undefined) {\n\t\t\t\t\tmiscProps[name] = val;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// apply the operations to the event and all related events\n\t\tundoFunc = mutateEvents(\n\t\t\tclientEvents(event._id), // get events with this ID\n\t\t\tclearEnd,\n\t\t\tnewProps.allDay,\n\t\t\tstartDelta,\n\t\t\tdurationDelta,\n\t\t\tmiscProps\n\t\t);\n\n\t\treturn {\n\t\t\tdateDelta: startDelta,\n\t\t\tdurationDelta: durationDelta,\n\t\t\tundo: undoFunc\n\t\t};\n\t}", "function mutateEvent(event, newProps, largeUnit) {\n\t\tvar miscProps = {};\n\t\tvar oldProps;\n\t\tvar clearEnd;\n\t\tvar startDelta;\n\t\tvar endDelta;\n\t\tvar durationDelta;\n\t\tvar undoFunc;\n\n\t\t// diffs the dates in the appropriate way, returning a duration\n\t\tfunction diffDates(date1, date0) { // date1 - date0\n\t\t\tif (largeUnit) {\n\t\t\t\treturn diffByUnit(date1, date0, largeUnit);\n\t\t\t}\n\t\t\telse if (newProps.allDay) {\n\t\t\t\treturn diffDay(date1, date0);\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn diffDayTime(date1, date0);\n\t\t\t}\n\t\t}\n\n\t\tnewProps = newProps || {};\n\n\t\t// normalize new date-related properties\n\t\tif (!newProps.start) {\n\t\t\tnewProps.start = event.start.clone();\n\t\t}\n\t\tif (newProps.end === undefined) {\n\t\t\tnewProps.end = event.end ? event.end.clone() : null;\n\t\t}\n\t\tif (newProps.allDay == null) { // is null or undefined?\n\t\t\tnewProps.allDay = event.allDay;\n\t\t}\n\t\tnormalizeEventDates(newProps);\n\n\t\t// create normalized versions of the original props to compare against\n\t\t// need a real end value, for diffing\n\t\toldProps = {\n\t\t\tstart: event._start.clone(),\n\t\t\tend: event._end ? event._end.clone() : t.getDefaultEventEnd(event._allDay, event._start),\n\t\t\tallDay: newProps.allDay // normalize the dates in the same regard as the new properties\n\t\t};\n\t\tnormalizeEventDates(oldProps);\n\n\t\t// need to clear the end date if explicitly changed to null\n\t\tclearEnd = event._end !== null && newProps.end === null;\n\n\t\t// compute the delta for moving the start date\n\t\tstartDelta = diffDates(newProps.start, oldProps.start);\n\n\t\t// compute the delta for moving the end date\n\t\tif (newProps.end) {\n\t\t\tendDelta = diffDates(newProps.end, oldProps.end);\n\t\t\tdurationDelta = endDelta.subtract(startDelta);\n\t\t}\n\t\telse {\n\t\t\tdurationDelta = null;\n\t\t}\n\n\t\t// gather all non-date-related properties\n\t\t$.each(newProps, function(name, val) {\n\t\t\tif (isMiscEventPropName(name)) {\n\t\t\t\tif (val !== undefined) {\n\t\t\t\t\tmiscProps[name] = val;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// apply the operations to the event and all related events\n\t\tundoFunc = mutateEvents(\n\t\t\tclientEvents(event._id), // get events with this ID\n\t\t\tclearEnd,\n\t\t\tnewProps.allDay,\n\t\t\tstartDelta,\n\t\t\tdurationDelta,\n\t\t\tmiscProps\n\t\t);\n\n\t\treturn {\n\t\t\tdateDelta: startDelta,\n\t\t\tdurationDelta: durationDelta,\n\t\t\tundo: undoFunc\n\t\t};\n\t}", "function mutateEvent(event, newProps, largeUnit) {\n\t\tvar miscProps = {};\n\t\tvar oldProps;\n\t\tvar clearEnd;\n\t\tvar startDelta;\n\t\tvar endDelta;\n\t\tvar durationDelta;\n\t\tvar undoFunc;\n\n\t\t// diffs the dates in the appropriate way, returning a duration\n\t\tfunction diffDates(date1, date0) { // date1 - date0\n\t\t\tif (largeUnit) {\n\t\t\t\treturn diffByUnit(date1, date0, largeUnit);\n\t\t\t}\n\t\t\telse if (newProps.allDay) {\n\t\t\t\treturn diffDay(date1, date0);\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn diffDayTime(date1, date0);\n\t\t\t}\n\t\t}\n\n\t\tnewProps = newProps || {};\n\n\t\t// normalize new date-related properties\n\t\tif (!newProps.start) {\n\t\t\tnewProps.start = event.start.clone();\n\t\t}\n\t\tif (newProps.end === undefined) {\n\t\t\tnewProps.end = event.end ? event.end.clone() : null;\n\t\t}\n\t\tif (newProps.allDay == null) { // is null or undefined?\n\t\t\tnewProps.allDay = event.allDay;\n\t\t}\n\t\tnormalizeEventDates(newProps);\n\n\t\t// create normalized versions of the original props to compare against\n\t\t// need a real end value, for diffing\n\t\toldProps = {\n\t\t\tstart: event._start.clone(),\n\t\t\tend: event._end ? event._end.clone() : t.getDefaultEventEnd(event._allDay, event._start),\n\t\t\tallDay: newProps.allDay // normalize the dates in the same regard as the new properties\n\t\t};\n\t\tnormalizeEventDates(oldProps);\n\n\t\t// need to clear the end date if explicitly changed to null\n\t\tclearEnd = event._end !== null && newProps.end === null;\n\n\t\t// compute the delta for moving the start date\n\t\tstartDelta = diffDates(newProps.start, oldProps.start);\n\n\t\t// compute the delta for moving the end date\n\t\tif (newProps.end) {\n\t\t\tendDelta = diffDates(newProps.end, oldProps.end);\n\t\t\tdurationDelta = endDelta.subtract(startDelta);\n\t\t}\n\t\telse {\n\t\t\tdurationDelta = null;\n\t\t}\n\n\t\t// gather all non-date-related properties\n\t\t$.each(newProps, function(name, val) {\n\t\t\tif (isMiscEventPropName(name)) {\n\t\t\t\tif (val !== undefined) {\n\t\t\t\t\tmiscProps[name] = val;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// apply the operations to the event and all related events\n\t\tundoFunc = mutateEvents(\n\t\t\tclientEvents(event._id), // get events with this ID\n\t\t\tclearEnd,\n\t\t\tnewProps.allDay,\n\t\t\tstartDelta,\n\t\t\tdurationDelta,\n\t\t\tmiscProps\n\t\t);\n\n\t\treturn {\n\t\t\tdateDelta: startDelta,\n\t\t\tdurationDelta: durationDelta,\n\t\t\tundo: undoFunc\n\t\t};\n\t}", "function mutateEvent(event, newProps, largeUnit) {\n\t\tvar miscProps = {};\n\t\tvar oldProps;\n\t\tvar clearEnd;\n\t\tvar startDelta;\n\t\tvar endDelta;\n\t\tvar durationDelta;\n\t\tvar undoFunc;\n\n\t\t// diffs the dates in the appropriate way, returning a duration\n\t\tfunction diffDates(date1, date0) { // date1 - date0\n\t\t\tif (largeUnit) {\n\t\t\t\treturn diffByUnit(date1, date0, largeUnit);\n\t\t\t}\n\t\t\telse if (newProps.allDay) {\n\t\t\t\treturn diffDay(date1, date0);\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn diffDayTime(date1, date0);\n\t\t\t}\n\t\t}\n\n\t\tnewProps = newProps || {};\n\n\t\t// normalize new date-related properties\n\t\tif (!newProps.start) {\n\t\t\tnewProps.start = event.start.clone();\n\t\t}\n\t\tif (newProps.end === undefined) {\n\t\t\tnewProps.end = event.end ? event.end.clone() : null;\n\t\t}\n\t\tif (newProps.allDay == null) { // is null or undefined?\n\t\t\tnewProps.allDay = event.allDay;\n\t\t}\n\t\tnormalizeEventDates(newProps);\n\n\t\t// create normalized versions of the original props to compare against\n\t\t// need a real end value, for diffing\n\t\toldProps = {\n\t\t\tstart: event._start.clone(),\n\t\t\tend: event._end ? event._end.clone() : t.getDefaultEventEnd(event._allDay, event._start),\n\t\t\tallDay: newProps.allDay // normalize the dates in the same regard as the new properties\n\t\t};\n\t\tnormalizeEventDates(oldProps);\n\n\t\t// need to clear the end date if explicitly changed to null\n\t\tclearEnd = event._end !== null && newProps.end === null;\n\n\t\t// compute the delta for moving the start date\n\t\tstartDelta = diffDates(newProps.start, oldProps.start);\n\n\t\t// compute the delta for moving the end date\n\t\tif (newProps.end) {\n\t\t\tendDelta = diffDates(newProps.end, oldProps.end);\n\t\t\tdurationDelta = endDelta.subtract(startDelta);\n\t\t}\n\t\telse {\n\t\t\tdurationDelta = null;\n\t\t}\n\n\t\t// gather all non-date-related properties\n\t\t$.each(newProps, function(name, val) {\n\t\t\tif (isMiscEventPropName(name)) {\n\t\t\t\tif (val !== undefined) {\n\t\t\t\t\tmiscProps[name] = val;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// apply the operations to the event and all related events\n\t\tundoFunc = mutateEvents(\n\t\t\tclientEvents(event._id), // get events with this ID\n\t\t\tclearEnd,\n\t\t\tnewProps.allDay,\n\t\t\tstartDelta,\n\t\t\tdurationDelta,\n\t\t\tmiscProps\n\t\t);\n\n\t\treturn {\n\t\t\tdateDelta: startDelta,\n\t\t\tdurationDelta: durationDelta,\n\t\t\tundo: undoFunc\n\t\t};\n\t}", "function mutateEvents(events, clearEnd, allDay, dateDelta, durationDelta, miscProps) {\n\t\tvar isAmbigTimezone = t.getIsAmbigTimezone();\n\t\tvar undoFunctions = [];\n\n\t\t// normalize zero-length deltas to be null\n\t\tif (dateDelta && !dateDelta.valueOf()) { dateDelta = null; }\n\t\tif (durationDelta && !durationDelta.valueOf()) { durationDelta = null; }\n\n\t\t$.each(events, function(i, event) {\n\t\t\tvar oldProps;\n\t\t\tvar newProps;\n\n\t\t\t// build an object holding all the old values, both date-related and misc.\n\t\t\t// for the undo function.\n\t\t\toldProps = {\n\t\t\t\tstart: event.start.clone(),\n\t\t\t\tend: event.end ? event.end.clone() : null,\n\t\t\t\tallDay: event.allDay\n\t\t\t};\n\t\t\t$.each(miscProps, function(name) {\n\t\t\t\toldProps[name] = event[name];\n\t\t\t});\n\n\t\t\t// new date-related properties. work off the original date snapshot.\n\t\t\t// ok to use references because they will be thrown away when backupEventDates is called.\n\t\t\tnewProps = {\n\t\t\t\tstart: event._start,\n\t\t\t\tend: event._end,\n\t\t\t\tallDay: allDay // normalize the dates in the same regard as the new properties\n\t\t\t};\n\t\t\tnormalizeEventRange(newProps); // massages start/end/allDay\n\n\t\t\t// strip or ensure the end date\n\t\t\tif (clearEnd) {\n\t\t\t\tnewProps.end = null;\n\t\t\t}\n\t\t\telse if (durationDelta && !newProps.end) { // the duration translation requires an end date\n\t\t\t\tnewProps.end = t.getDefaultEventEnd(newProps.allDay, newProps.start);\n\t\t\t}\n\n\t\t\tif (dateDelta) {\n\t\t\t\tnewProps.start.add(dateDelta);\n\t\t\t\tif (newProps.end) {\n\t\t\t\t\tnewProps.end.add(dateDelta);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (durationDelta) {\n\t\t\t\tnewProps.end.add(durationDelta); // end already ensured above\n\t\t\t}\n\n\t\t\t// if the dates have changed, and we know it is impossible to recompute the\n\t\t\t// timezone offsets, strip the zone.\n\t\t\tif (\n\t\t\t\tisAmbigTimezone &&\n\t\t\t\t!newProps.allDay &&\n\t\t\t\t(dateDelta || durationDelta)\n\t\t\t) {\n\t\t\t\tnewProps.start.stripZone();\n\t\t\t\tif (newProps.end) {\n\t\t\t\t\tnewProps.end.stripZone();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$.extend(event, miscProps, newProps); // copy over misc props, then date-related props\n\t\t\tbackupEventDates(event); // regenerate internal _start/_end/_allDay\n\n\t\t\tundoFunctions.push(function() {\n\t\t\t\t$.extend(event, oldProps);\n\t\t\t\tbackupEventDates(event); // regenerate internal _start/_end/_allDay\n\t\t\t});\n\t\t});\n\n\t\treturn function() {\n\t\t\tfor (var i = 0; i < undoFunctions.length; i++) {\n\t\t\t\tundoFunctions[i]();\n\t\t\t}\n\t\t};\n\t}", "function sanitizeChildProps(properties) {\n return (0, _omit2.default)(properties, (0, _keys2.default)(placeholderPropTypes));\n}", "function mutateEvent(event, newProps, largeUnit) {\n\t\tvar miscProps = {};\n\t\tvar oldProps;\n\t\tvar clearEnd;\n\t\tvar startDelta;\n\t\tvar endDelta;\n\t\tvar durationDelta;\n\t\tvar undoFunc;\n\n\t\t// diffs the dates in the appropriate way, returning a duration\n\t\tfunction diffDates(date1, date0) { // date1 - date0\n\t\t\tif (largeUnit) {\n\t\t\t\treturn diffByUnit(date1, date0, largeUnit);\n\t\t\t}\n\t\t\telse if (newProps.allDay) {\n\t\t\t\treturn diffDay(date1, date0);\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn diffDayTime(date1, date0);\n\t\t\t}\n\t\t}\n\n\t\tnewProps = newProps || {};\n\n\t\t// normalize new date-related properties\n\t\tif (!newProps.start) {\n\t\t\tnewProps.start = event.start.clone();\n\t\t}\n\t\tif (newProps.end === undefined) {\n\t\t\tnewProps.end = event.end ? event.end.clone() : null;\n\t\t}\n\t\tif (newProps.allDay == null) { // is null or undefined?\n\t\t\tnewProps.allDay = event.allDay;\n\t\t}\n\t\tnormalizeEventRange(newProps);\n\n\t\t// create normalized versions of the original props to compare against\n\t\t// need a real end value, for diffing\n\t\toldProps = {\n\t\t\tstart: event._start.clone(),\n\t\t\tend: event._end ? event._end.clone() : t.getDefaultEventEnd(event._allDay, event._start),\n\t\t\tallDay: newProps.allDay // normalize the dates in the same regard as the new properties\n\t\t};\n\t\tnormalizeEventRange(oldProps);\n\n\t\t// need to clear the end date if explicitly changed to null\n\t\tclearEnd = event._end !== null && newProps.end === null;\n\n\t\t// compute the delta for moving the start date\n\t\tstartDelta = diffDates(newProps.start, oldProps.start);\n\n\t\t// compute the delta for moving the end date\n\t\tif (newProps.end) {\n\t\t\tendDelta = diffDates(newProps.end, oldProps.end);\n\t\t\tdurationDelta = endDelta.subtract(startDelta);\n\t\t}\n\t\telse {\n\t\t\tdurationDelta = null;\n\t\t}\n\n\t\t// gather all non-date-related properties\n\t\t$.each(newProps, function(name, val) {\n\t\t\tif (isMiscEventPropName(name)) {\n\t\t\t\tif (val !== undefined) {\n\t\t\t\t\tmiscProps[name] = val;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// apply the operations to the event and all related events\n\t\tundoFunc = mutateEvents(\n\t\t\tclientEvents(event._id), // get events with this ID\n\t\t\tclearEnd,\n\t\t\tnewProps.allDay,\n\t\t\tstartDelta,\n\t\t\tdurationDelta,\n\t\t\tmiscProps\n\t\t);\n\n\t\treturn {\n\t\t\tdateDelta: startDelta,\n\t\t\tdurationDelta: durationDelta,\n\t\t\tundo: undoFunc\n\t\t};\n\t}", "function mutateEvents(events, clearEnd, allDay, dateDelta, durationDelta, miscProps) {\n\t\tvar isAmbigTimezone = t.getIsAmbigTimezone();\n\t\tvar undoFunctions = [];\n\n\t\t// normalize zero-length deltas to be null\n\t\tif (dateDelta && !dateDelta.valueOf()) { dateDelta = null; }\n\t\tif (durationDelta && !durationDelta.valueOf()) { durationDelta = null; }\n\n\t\t$.each(events, function(i, event) {\n\t\t\tvar oldProps;\n\t\t\tvar newProps;\n\n\t\t\t// build an object holding all the old values, both date-related and misc.\n\t\t\t// for the undo function.\n\t\t\toldProps = {\n\t\t\t\tstart: event.start.clone(),\n\t\t\t\tend: event.end ? event.end.clone() : null,\n\t\t\t\tallDay: event.allDay\n\t\t\t};\n\t\t\t$.each(miscProps, function(name) {\n\t\t\t\toldProps[name] = event[name];\n\t\t\t});\n\n\t\t\t// new date-related properties. work off the original date snapshot.\n\t\t\t// ok to use references because they will be thrown away when backupEventDates is called.\n\t\t\tnewProps = {\n\t\t\t\tstart: event._start,\n\t\t\t\tend: event._end,\n\t\t\t\tallDay: allDay // normalize the dates in the same regard as the new properties\n\t\t\t};\n\t\t\tnormalizeEventDates(newProps); // massages start/end/allDay\n\n\t\t\t// strip or ensure the end date\n\t\t\tif (clearEnd) {\n\t\t\t\tnewProps.end = null;\n\t\t\t}\n\t\t\telse if (durationDelta && !newProps.end) { // the duration translation requires an end date\n\t\t\t\tnewProps.end = t.getDefaultEventEnd(newProps.allDay, newProps.start);\n\t\t\t}\n\n\t\t\tif (dateDelta) {\n\t\t\t\tnewProps.start.add(dateDelta);\n\t\t\t\tif (newProps.end) {\n\t\t\t\t\tnewProps.end.add(dateDelta);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (durationDelta) {\n\t\t\t\tnewProps.end.add(durationDelta); // end already ensured above\n\t\t\t}\n\n\t\t\t// if the dates have changed, and we know it is impossible to recompute the\n\t\t\t// timezone offsets, strip the zone.\n\t\t\tif (\n\t\t\t\tisAmbigTimezone &&\n\t\t\t\t!newProps.allDay &&\n\t\t\t\t(dateDelta || durationDelta)\n\t\t\t) {\n\t\t\t\tnewProps.start.stripZone();\n\t\t\t\tif (newProps.end) {\n\t\t\t\t\tnewProps.end.stripZone();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$.extend(event, miscProps, newProps); // copy over misc props, then date-related props\n\t\t\tbackupEventDates(event); // regenerate internal _start/_end/_allDay\n\n\t\t\tundoFunctions.push(function() {\n\t\t\t\t$.extend(event, oldProps);\n\t\t\t\tbackupEventDates(event); // regenerate internal _start/_end/_allDay\n\t\t\t});\n\t\t});\n\n\t\treturn function() {\n\t\t\tfor (var i = 0; i < undoFunctions.length; i++) {\n\t\t\t\tundoFunctions[i]();\n\t\t\t}\n\t\t};\n\t}", "function mutateEvents(events, clearEnd, allDay, dateDelta, durationDelta, miscProps) {\n\t\tvar isAmbigTimezone = t.getIsAmbigTimezone();\n\t\tvar undoFunctions = [];\n\n\t\t// normalize zero-length deltas to be null\n\t\tif (dateDelta && !dateDelta.valueOf()) { dateDelta = null; }\n\t\tif (durationDelta && !durationDelta.valueOf()) { durationDelta = null; }\n\n\t\t$.each(events, function(i, event) {\n\t\t\tvar oldProps;\n\t\t\tvar newProps;\n\n\t\t\t// build an object holding all the old values, both date-related and misc.\n\t\t\t// for the undo function.\n\t\t\toldProps = {\n\t\t\t\tstart: event.start.clone(),\n\t\t\t\tend: event.end ? event.end.clone() : null,\n\t\t\t\tallDay: event.allDay\n\t\t\t};\n\t\t\t$.each(miscProps, function(name) {\n\t\t\t\toldProps[name] = event[name];\n\t\t\t});\n\n\t\t\t// new date-related properties. work off the original date snapshot.\n\t\t\t// ok to use references because they will be thrown away when backupEventDates is called.\n\t\t\tnewProps = {\n\t\t\t\tstart: event._start,\n\t\t\t\tend: event._end,\n\t\t\t\tallDay: allDay // normalize the dates in the same regard as the new properties\n\t\t\t};\n\t\t\tnormalizeEventDates(newProps); // massages start/end/allDay\n\n\t\t\t// strip or ensure the end date\n\t\t\tif (clearEnd) {\n\t\t\t\tnewProps.end = null;\n\t\t\t}\n\t\t\telse if (durationDelta && !newProps.end) { // the duration translation requires an end date\n\t\t\t\tnewProps.end = t.getDefaultEventEnd(newProps.allDay, newProps.start);\n\t\t\t}\n\n\t\t\tif (dateDelta) {\n\t\t\t\tnewProps.start.add(dateDelta);\n\t\t\t\tif (newProps.end) {\n\t\t\t\t\tnewProps.end.add(dateDelta);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (durationDelta) {\n\t\t\t\tnewProps.end.add(durationDelta); // end already ensured above\n\t\t\t}\n\n\t\t\t// if the dates have changed, and we know it is impossible to recompute the\n\t\t\t// timezone offsets, strip the zone.\n\t\t\tif (\n\t\t\t\tisAmbigTimezone &&\n\t\t\t\t!newProps.allDay &&\n\t\t\t\t(dateDelta || durationDelta)\n\t\t\t) {\n\t\t\t\tnewProps.start.stripZone();\n\t\t\t\tif (newProps.end) {\n\t\t\t\t\tnewProps.end.stripZone();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$.extend(event, miscProps, newProps); // copy over misc props, then date-related props\n\t\t\tbackupEventDates(event); // regenerate internal _start/_end/_allDay\n\n\t\t\tundoFunctions.push(function() {\n\t\t\t\t$.extend(event, oldProps);\n\t\t\t\tbackupEventDates(event); // regenerate internal _start/_end/_allDay\n\t\t\t});\n\t\t});\n\n\t\treturn function() {\n\t\t\tfor (var i = 0; i < undoFunctions.length; i++) {\n\t\t\t\tundoFunctions[i]();\n\t\t\t}\n\t\t};\n\t}", "function mutateEvents(events, clearEnd, allDay, dateDelta, durationDelta, miscProps) {\n\t\tvar isAmbigTimezone = t.getIsAmbigTimezone();\n\t\tvar undoFunctions = [];\n\n\t\t// normalize zero-length deltas to be null\n\t\tif (dateDelta && !dateDelta.valueOf()) { dateDelta = null; }\n\t\tif (durationDelta && !durationDelta.valueOf()) { durationDelta = null; }\n\n\t\t$.each(events, function(i, event) {\n\t\t\tvar oldProps;\n\t\t\tvar newProps;\n\n\t\t\t// build an object holding all the old values, both date-related and misc.\n\t\t\t// for the undo function.\n\t\t\toldProps = {\n\t\t\t\tstart: event.start.clone(),\n\t\t\t\tend: event.end ? event.end.clone() : null,\n\t\t\t\tallDay: event.allDay\n\t\t\t};\n\t\t\t$.each(miscProps, function(name) {\n\t\t\t\toldProps[name] = event[name];\n\t\t\t});\n\n\t\t\t// new date-related properties. work off the original date snapshot.\n\t\t\t// ok to use references because they will be thrown away when backupEventDates is called.\n\t\t\tnewProps = {\n\t\t\t\tstart: event._start,\n\t\t\t\tend: event._end,\n\t\t\t\tallDay: allDay // normalize the dates in the same regard as the new properties\n\t\t\t};\n\t\t\tnormalizeEventDates(newProps); // massages start/end/allDay\n\n\t\t\t// strip or ensure the end date\n\t\t\tif (clearEnd) {\n\t\t\t\tnewProps.end = null;\n\t\t\t}\n\t\t\telse if (durationDelta && !newProps.end) { // the duration translation requires an end date\n\t\t\t\tnewProps.end = t.getDefaultEventEnd(newProps.allDay, newProps.start);\n\t\t\t}\n\n\t\t\tif (dateDelta) {\n\t\t\t\tnewProps.start.add(dateDelta);\n\t\t\t\tif (newProps.end) {\n\t\t\t\t\tnewProps.end.add(dateDelta);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (durationDelta) {\n\t\t\t\tnewProps.end.add(durationDelta); // end already ensured above\n\t\t\t}\n\n\t\t\t// if the dates have changed, and we know it is impossible to recompute the\n\t\t\t// timezone offsets, strip the zone.\n\t\t\tif (\n\t\t\t\tisAmbigTimezone &&\n\t\t\t\t!newProps.allDay &&\n\t\t\t\t(dateDelta || durationDelta)\n\t\t\t) {\n\t\t\t\tnewProps.start.stripZone();\n\t\t\t\tif (newProps.end) {\n\t\t\t\t\tnewProps.end.stripZone();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$.extend(event, miscProps, newProps); // copy over misc props, then date-related props\n\t\t\tbackupEventDates(event); // regenerate internal _start/_end/_allDay\n\n\t\t\tundoFunctions.push(function() {\n\t\t\t\t$.extend(event, oldProps);\n\t\t\t\tbackupEventDates(event); // regenerate internal _start/_end/_allDay\n\t\t\t});\n\t\t});\n\n\t\treturn function() {\n\t\t\tfor (var i = 0; i < undoFunctions.length; i++) {\n\t\t\t\tundoFunctions[i]();\n\t\t\t}\n\t\t};\n\t}", "function mutateEvents(events, clearEnd, allDay, dateDelta, durationDelta, miscProps) {\n\t\tvar isAmbigTimezone = t.getIsAmbigTimezone();\n\t\tvar undoFunctions = [];\n\n\t\t// normalize zero-length deltas to be null\n\t\tif (dateDelta && !dateDelta.valueOf()) { dateDelta = null; }\n\t\tif (durationDelta && !durationDelta.valueOf()) { durationDelta = null; }\n\n\t\t$.each(events, function(i, event) {\n\t\t\tvar oldProps;\n\t\t\tvar newProps;\n\n\t\t\t// build an object holding all the old values, both date-related and misc.\n\t\t\t// for the undo function.\n\t\t\toldProps = {\n\t\t\t\tstart: event.start.clone(),\n\t\t\t\tend: event.end ? event.end.clone() : null,\n\t\t\t\tallDay: event.allDay\n\t\t\t};\n\t\t\t$.each(miscProps, function(name) {\n\t\t\t\toldProps[name] = event[name];\n\t\t\t});\n\n\t\t\t// new date-related properties. work off the original date snapshot.\n\t\t\t// ok to use references because they will be thrown away when backupEventDates is called.\n\t\t\tnewProps = {\n\t\t\t\tstart: event._start,\n\t\t\t\tend: event._end,\n\t\t\t\tallDay: allDay // normalize the dates in the same regard as the new properties\n\t\t\t};\n\t\t\tnormalizeEventDates(newProps); // massages start/end/allDay\n\n\t\t\t// strip or ensure the end date\n\t\t\tif (clearEnd) {\n\t\t\t\tnewProps.end = null;\n\t\t\t}\n\t\t\telse if (durationDelta && !newProps.end) { // the duration translation requires an end date\n\t\t\t\tnewProps.end = t.getDefaultEventEnd(newProps.allDay, newProps.start);\n\t\t\t}\n\n\t\t\tif (dateDelta) {\n\t\t\t\tnewProps.start.add(dateDelta);\n\t\t\t\tif (newProps.end) {\n\t\t\t\t\tnewProps.end.add(dateDelta);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (durationDelta) {\n\t\t\t\tnewProps.end.add(durationDelta); // end already ensured above\n\t\t\t}\n\n\t\t\t// if the dates have changed, and we know it is impossible to recompute the\n\t\t\t// timezone offsets, strip the zone.\n\t\t\tif (\n\t\t\t\tisAmbigTimezone &&\n\t\t\t\t!newProps.allDay &&\n\t\t\t\t(dateDelta || durationDelta)\n\t\t\t) {\n\t\t\t\tnewProps.start.stripZone();\n\t\t\t\tif (newProps.end) {\n\t\t\t\t\tnewProps.end.stripZone();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$.extend(event, miscProps, newProps); // copy over misc props, then date-related props\n\t\t\tbackupEventDates(event); // regenerate internal _start/_end/_allDay\n\n\t\t\tundoFunctions.push(function() {\n\t\t\t\t$.extend(event, oldProps);\n\t\t\t\tbackupEventDates(event); // regenerate internal _start/_end/_allDay\n\t\t\t});\n\t\t});\n\n\t\treturn function() {\n\t\t\tfor (var i = 0; i < undoFunctions.length; i++) {\n\t\t\t\tundoFunctions[i]();\n\t\t\t}\n\t\t};\n\t}", "function mutateEvents(events, clearEnd, allDay, dateDelta, durationDelta, miscProps) {\n\t\tvar isAmbigTimezone = t.getIsAmbigTimezone();\n\t\tvar undoFunctions = [];\n\n\t\t// normalize zero-length deltas to be null\n\t\tif (dateDelta && !dateDelta.valueOf()) { dateDelta = null; }\n\t\tif (durationDelta && !durationDelta.valueOf()) { durationDelta = null; }\n\n\t\t$.each(events, function(i, event) {\n\t\t\tvar oldProps;\n\t\t\tvar newProps;\n\n\t\t\t// build an object holding all the old values, both date-related and misc.\n\t\t\t// for the undo function.\n\t\t\toldProps = {\n\t\t\t\tstart: event.start.clone(),\n\t\t\t\tend: event.end ? event.end.clone() : null,\n\t\t\t\tallDay: event.allDay\n\t\t\t};\n\t\t\t$.each(miscProps, function(name) {\n\t\t\t\toldProps[name] = event[name];\n\t\t\t});\n\n\t\t\t// new date-related properties. work off the original date snapshot.\n\t\t\t// ok to use references because they will be thrown away when backupEventDates is called.\n\t\t\tnewProps = {\n\t\t\t\tstart: event._start,\n\t\t\t\tend: event._end,\n\t\t\t\tallDay: allDay // normalize the dates in the same regard as the new properties\n\t\t\t};\n\t\t\tnormalizeEventDates(newProps); // massages start/end/allDay\n\n\t\t\t// strip or ensure the end date\n\t\t\tif (clearEnd) {\n\t\t\t\tnewProps.end = null;\n\t\t\t}\n\t\t\telse if (durationDelta && !newProps.end) { // the duration translation requires an end date\n\t\t\t\tnewProps.end = t.getDefaultEventEnd(newProps.allDay, newProps.start);\n\t\t\t}\n\n\t\t\tif (dateDelta) {\n\t\t\t\tnewProps.start.add(dateDelta);\n\t\t\t\tif (newProps.end) {\n\t\t\t\t\tnewProps.end.add(dateDelta);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (durationDelta) {\n\t\t\t\tnewProps.end.add(durationDelta); // end already ensured above\n\t\t\t}\n\n\t\t\t// if the dates have changed, and we know it is impossible to recompute the\n\t\t\t// timezone offsets, strip the zone.\n\t\t\tif (\n\t\t\t\tisAmbigTimezone &&\n\t\t\t\t!newProps.allDay &&\n\t\t\t\t(dateDelta || durationDelta)\n\t\t\t) {\n\t\t\t\tnewProps.start.stripZone();\n\t\t\t\tif (newProps.end) {\n\t\t\t\t\tnewProps.end.stripZone();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$.extend(event, miscProps, newProps); // copy over misc props, then date-related props\n\t\t\tbackupEventDates(event); // regenerate internal _start/_end/_allDay\n\n\t\t\tundoFunctions.push(function() {\n\t\t\t\t$.extend(event, oldProps);\n\t\t\t\tbackupEventDates(event); // regenerate internal _start/_end/_allDay\n\t\t\t});\n\t\t});\n\n\t\treturn function() {\n\t\t\tfor (var i = 0; i < undoFunctions.length; i++) {\n\t\t\t\tundoFunctions[i]();\n\t\t\t}\n\t\t};\n\t}" ]
[ "0.59947246", "0.59789807", "0.59692705", "0.59692705", "0.5950584", "0.5950584", "0.57311106", "0.57311106", "0.57311106", "0.57311106", "0.57311106", "0.5709819", "0.56334805", "0.5550468", "0.5527125", "0.55047715", "0.5489118", "0.5481354", "0.5481354", "0.5481024", "0.54779476", "0.54779476", "0.54779476", "0.54779476", "0.54779476", "0.54779476", "0.54779476", "0.54779476", "0.54779476", "0.54779476", "0.54779476", "0.54779476", "0.54779476", "0.54779476", "0.54779476", "0.54779476", "0.54779476", "0.54779476", "0.54779476", "0.54779476", "0.5476714", "0.54728174", "0.546928", "0.54637223", "0.5432304", "0.5357487", "0.5357487", "0.5357487", "0.5357487", "0.5357487", "0.5357487", "0.5357487", "0.5357487", "0.5357487", "0.5357487", "0.5357487", "0.5357487", "0.5357487", "0.5357487", "0.5357487", "0.5357487", "0.5357487", "0.5357487", "0.5357487", "0.5357487", "0.5357487", "0.5357487", "0.5357487", "0.53186774", "0.53186774", "0.53186774", "0.52609354", "0.52196336", "0.52136743", "0.52113056", "0.51466286", "0.5128385", "0.5102837", "0.5102837", "0.5102837", "0.5102837", "0.5102837", "0.5102837", "0.50864965", "0.5082706", "0.5045817", "0.5045817", "0.5045817", "0.5045817", "0.5045817", "0.5039928", "0.50350654", "0.5034076", "0.5030071", "0.5030071", "0.5030071", "0.5030071", "0.5030071" ]
0.55435896
16
TODO: pass around as EventDefHash!!!
function parseBusinessHours(input, calendar) { return parseEvents(refineInputs(input), '', calendar); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function EventDict() {}", "function EventInfo() { }", "function EventInfo() { }", "function InternalEvent() {}", "function EventHelper (possibleEvents) {\n }", "function InternalEvent() { }", "function InternalEvent() { }", "function InternalEvent() { }", "function InternalEvent() { }", "function InternalEvent() { }", "function parseEventDef(raw, sourceId, allDay, hasEnd, calendar) {\n var leftovers = {};\n var def = pluckNonDateProps(raw, calendar, leftovers);\n def.defId = String(uid++);\n def.sourceId = sourceId;\n def.allDay = allDay;\n def.hasEnd = hasEnd;\n for (var _i = 0, _a = calendar.pluginSystem.hooks.eventDefParsers; _i < _a.length; _i++) {\n var eventDefParser = _a[_i];\n var newLeftovers = {};\n eventDefParser(def, leftovers, newLeftovers);\n leftovers = newLeftovers;\n }\n def.extendedProps = __assign(leftovers, def.extendedProps || {});\n // help out EventApi from having user modify props\n Object.freeze(def.ui.classNames);\n Object.freeze(def.extendedProps);\n return def;\n}", "function parseEventDef(raw, sourceId, allDay, hasEnd, calendar) {\n var leftovers = {};\n var def = pluckNonDateProps(raw, calendar, leftovers);\n def.defId = String(uid++);\n def.sourceId = sourceId;\n def.allDay = allDay;\n def.hasEnd = hasEnd;\n\n for (var _i = 0, _a = calendar.pluginSystem.hooks.eventDefParsers; _i < _a.length; _i++) {\n var eventDefParser = _a[_i];\n var newLeftovers = {};\n eventDefParser(def, leftovers, newLeftovers);\n leftovers = newLeftovers;\n }\n\n def.extendedProps = tslib_1.__assign(leftovers, def.extendedProps || {}); // help out EventApi from having user modify props\n\n Object.freeze(def.ui.classNames);\n Object.freeze(def.extendedProps);\n return def;\n }", "onEventCreated(newEventRecord) {}", "function parseEventDef(raw, sourceId, allDay, hasEnd, calendar) {\n var leftovers = {};\n var def = pluckNonDateProps(raw, calendar, leftovers);\n def.defId = String(uid++);\n def.sourceId = sourceId;\n def.allDay = allDay;\n def.hasEnd = hasEnd;\n for (var _i = 0, _a = calendar.pluginSystem.hooks.eventDefParsers; _i < _a.length; _i++) {\n var eventDefParser = _a[_i];\n var newLeftovers = {};\n eventDefParser(def, leftovers, newLeftovers);\n leftovers = newLeftovers;\n }\n def.extendedProps = __assign(leftovers, def.extendedProps || {});\n // help out EventApi from having user modify props\n Object.freeze(def.ui.classNames);\n Object.freeze(def.extendedProps);\n return def;\n }", "function parseEventDef(raw, sourceId, allDay, hasEnd, calendar) {\n var leftovers = {};\n var def = pluckNonDateProps(raw, calendar, leftovers);\n def.defId = String(uid++);\n def.sourceId = sourceId;\n def.allDay = allDay;\n def.hasEnd = hasEnd;\n for (var _i = 0, _a = calendar.pluginSystem.hooks.eventDefParsers; _i < _a.length; _i++) {\n var eventDefParser = _a[_i];\n var newLeftovers = {};\n eventDefParser(def, leftovers, newLeftovers);\n leftovers = newLeftovers;\n }\n def.extendedProps = __assign(leftovers, def.extendedProps || {});\n // help out EventApi from having user modify props\n Object.freeze(def.ui.classNames);\n Object.freeze(def.extendedProps);\n return def;\n }", "function parseEventDef(raw, sourceId, allDay, hasEnd, calendar) {\n var leftovers = {};\n var def = pluckNonDateProps(raw, calendar, leftovers);\n def.defId = String(uid++);\n def.sourceId = sourceId;\n def.allDay = allDay;\n def.hasEnd = hasEnd;\n for (var _i = 0, _a = calendar.pluginSystem.hooks.eventDefParsers; _i < _a.length; _i++) {\n var eventDefParser = _a[_i];\n var newLeftovers = {};\n eventDefParser(def, leftovers, newLeftovers);\n leftovers = newLeftovers;\n }\n def.extendedProps = __assign(leftovers, def.extendedProps || {});\n // help out EventApi from having user modify props\n Object.freeze(def.ui.classNames);\n Object.freeze(def.extendedProps);\n return def;\n }", "function defineEvent() {\n\tvar name = $(\"input[name='eventname']\").val().trim();\n\tvar nn = Number($(\"input[name='eventnn']\").val());\n\tvar en = Number($(\"input[name='eventen']\").val());\n\n\t// check it doesn't already exist\n\tvar e = {};\n\te.name = name;\n\te.nn = nn;\n\te.en = en;\n\taddEvent(e);\n}", "function EventClass() {}", "function parseEventDef(raw, sourceId, allDay, hasEnd, calendar) {\n var leftovers = {};\n var def = pluckNonDateProps(raw, calendar, leftovers);\n def.defId = String(uid++);\n def.sourceId = sourceId;\n def.allDay = allDay;\n def.hasEnd = hasEnd;\n\n for (var _i = 0, _a = calendar.pluginSystem.hooks.eventDefParsers; _i < _a.length; _i++) {\n var eventDefParser = _a[_i];\n var newLeftovers = {};\n eventDefParser(def, leftovers, newLeftovers);\n leftovers = newLeftovers;\n }\n\n def.extendedProps = _assign(leftovers, def.extendedProps || {}); // help out EventApi from having user modify props\n\n Object.freeze(def.ui.classNames);\n Object.freeze(def.extendedProps);\n return def;\n }", "function Event(a, b, type, idx) {\n this.a = a\n this.b = b\n this.type = type\n this.idx = idx\n}", "function Event(a, b, type, idx) {\n this.a = a\n this.b = b\n this.type = type\n this.idx = idx\n}", "function Event(a, b, type, idx) {\n this.a = a\n this.b = b\n this.type = type\n this.idx = idx\n}", "function parseEventDef(refined, extra, sourceId, allDay, hasEnd, context) {\n var def = {\n title: refined.title || '',\n groupId: refined.groupId || '',\n publicId: refined.id || '',\n url: refined.url || '',\n recurringDef: null,\n defId: guid(),\n sourceId: sourceId,\n allDay: allDay,\n hasEnd: hasEnd,\n ui: createEventUi(refined, context),\n extendedProps: __assign(__assign({}, (refined.extendedProps || {})), extra),\n };\n for (var _i = 0, _a = context.pluginHooks.eventDefMemberAdders; _i < _a.length; _i++) {\n var memberAdder = _a[_i];\n __assign(def, memberAdder(refined));\n }\n // help out EventApi from having user modify props\n Object.freeze(def.ui.classNames);\n Object.freeze(def.extendedProps);\n return def;\n }", "function Event(a, b, type, idx) {\n\t this.a = a\n\t this.b = b\n\t this.type = type\n\t this.idx = idx\n\t}", "function Event(a, b, type, idx) {\n\t this.a = a\n\t this.b = b\n\t this.type = type\n\t this.idx = idx\n\t}", "constructor() {\n this._events = {};\n this._eventsCount = 0;\n }", "function Event(name) {\n // Public properties, assigned to the instance ('this')\n this.name = name;\n /*this.datetime = datetime;\n this.description = description;\n this.location = location;\n this.invited = invited;\n this.messages = messages;\n this.attendenceStatus = attendenceStatus;*/\n }", "function parseEventDef$1(raw, sourceId, allDay, hasEnd, calendar) {\n var leftovers = {};\n var def = pluckNonDateProps$1(raw, calendar, leftovers);\n def.defId = String(uid$4++);\n def.sourceId = sourceId;\n def.allDay = allDay;\n def.hasEnd = hasEnd;\n for (var _i = 0, _a = calendar.pluginSystem.hooks.eventDefParsers; _i < _a.length; _i++) {\n var eventDefParser = _a[_i];\n var newLeftovers = {};\n eventDefParser(def, leftovers, newLeftovers);\n leftovers = newLeftovers;\n }\n def.extendedProps = __assign$1(leftovers, def.extendedProps || {});\n // help out EventApi from having user modify props\n Object.freeze(def.ui.classNames);\n Object.freeze(def.extendedProps);\n return def;\n }", "function getEventId () {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {\n const r = Math.random() * 16 | 0\n const v = c === 'x' ? r : (r & 0x3 | 0x8)\n return v.toString(16)\n })\n}", "function constroiEventos(){}", "_wrapEvent(runningEvent, log, listener) {\n const event = Object(properties_lib_esm[\"c\" /* deepCopy */])(log);\n event.removeListener = () => {\n if (!listener) {\n return;\n }\n runningEvent.removeListener(listener);\n this._checkRunningEvents(runningEvent);\n };\n event.getBlock = () => { return this.provider.getBlock(log.blockHash); };\n event.getTransaction = () => { return this.provider.getTransaction(log.transactionHash); };\n event.getTransactionReceipt = () => { return this.provider.getTransactionReceipt(log.transactionHash); };\n // This may throw if the topics and data mismatch the signature\n runningEvent.prepareEvent(event);\n return event;\n }", "function $getEventType(e) {\r\n\t\treturn e.type;\r\n\t}", "_wrapEvent(runningEvent, log, listener) {\n const event = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__ethersproject_properties__[\"b\" /* deepCopy */])(log);\n event.removeListener = () => {\n if (!listener) {\n return;\n }\n runningEvent.removeListener(listener);\n this._checkRunningEvents(runningEvent);\n };\n event.getBlock = () => { return this.provider.getBlock(log.blockHash); };\n event.getTransaction = () => { return this.provider.getTransaction(log.transactionHash); };\n event.getTransactionReceipt = () => { return this.provider.getTransactionReceipt(log.transactionHash); };\n // This may throw if the topics and data mismatch the signature\n runningEvent.prepareEvent(event);\n return event;\n }", "function deleteEvent() {\n return {\n type: DELETE_EVENT\n };\n}", "createEvent(text) {\n const id = Date.now(); // TODO not great\n this.events.push({\n id,\n text,\n complete: false,\n });\n\n this.emit(\"change\");\n }", "function getSingleEvent() {\n return {\n type: \"FETCH_SINGLE_EVENT\"\n };\n}", "function makeEvent(deploymentId, sourceId, sourceSequenceId, workbookName, dashboardName, projectName, eventKind, eventData) {\n if (!isValidEventKind(eventKind)) {\n throw new Error(`Not a valid event kind: ${eventKind}`);\n }\n let recordedAt = new Date().toISOString();\n projectName = ((typeof projectName === 'string' && projectName.length > 0) ? projectName : \"Default\" );\n return {\n deploymentId,\n sourceId,\n sourceSequenceId: sourceSequenceId.toString(),\n recordedAt,\n\n workbookName: workbookName,\n dashboardName: dashboardName,\n projectName,\n\n kind: eventKind,\n data: eventData,\n\n }\n }", "get eventId() {\n return this._eventData.id;\n }", "get eventId() {\n return this._eventData.id;\n }", "function HomeSeerEvent(eventConfig) {\r\n this.config = eventConfig;\r\n this.name = eventConfig.name || eventConfig.eventName\r\n this.model = \"HomeSeer Event\";\r\n\t\r\n\tconst \tonURL = new URL(globals.platformConfig[\"host\"]);\r\n\t\tonURL.password = globals.platformConfig[\"password\"] || \"default\";\r\n\t\tonURL.username = globals.platformConfig[\"login\"] || \"default\";\r\n\t\tonURL.pathname = \"JSON\";\r\n\t\tonURL.search = \"request=runevent&group=\" + encodeURIComponent(eventConfig.eventGroup) + \"&name=\" + encodeURIComponent(eventConfig.eventName)\r\n\r\n this.on_url = onURL.href;\r\n\r\n if (eventConfig.offEventGroup && eventConfig.offEventName) {\r\n\t\t\r\n\tconst \toffURL = new URL(globals.platformConfig[\"host\"]);\r\n\t\toffURL.password = globals.platformConfig[\"password\"] || \"default\";\r\n\t\toffURL.username = globals.platformConfig[\"login\"] || \"default\";\r\n\t\toffURL.pathname = \"JSON\";\r\n\t\toffURL.search = \"request=runevent&group=\" + encodeURIComponent(eventConfig.offEventGroup) + \"&name=\" + encodeURIComponent(eventConfig.offEventName)\r\n\t\t\r\n this.off_url = offURL.href;\r\n }\r\n\tthis.uuid_base = eventConfig.uuid_base || (this.name) ;\r\n}", "function peacefulNightEvent(id) {\n\n}", "function Event() { }", "function Event() { }", "function tl_get_event(t, msg, name) {\r\n if (name == undefined) name = '';\r\n e = events[t];\r\n if (e == undefined) {\r\n e = [0,0,0,0,0,0,0,0,0,0,0,0,msg,0,0,0,0,name];\r\n events[t]=e;\r\n } else {\r\n debug(d_low, \"An event already exists at this time!\");\r\n throw \"ERR_EVENT_OVERWRITE\";\r\n }\r\n return e;\r\n }", "constructor() {\n this._events = Object.create(null)\n }", "constructor(){\n this._events = {};\n }", "ADD_EVENT(state, event) {\n state.events.push(event);\n }", "function getEventName(event_id) {\n for(var i in event_reference) {\n var obj = event_reference[i];\n if(obj.id === event_id)\n return obj.name;\n }\n return undefined;\n}", "getEvents() {\n\t\treturn this.metadata.events || {};\n\t}", "static set EVENT( value ) {\n overtakenAdaptEvent = value;\n }", "eventExtras(type) {\n return {\n 'type': type,\n 'timestamp': new Date().getTime()\n };\n }", "function getEvent(target, event_name) {\r\n if (target.events === undefined) {\r\n target.events = {};\r\n }\r\n return target.events[event_name];\r\n }", "register_event(ev) {\n //console.log(\"register\", ev._, ev.time);\n if (this.app) {\n this.events.push(ev);\n // If it is older than the last event, reorder \n var i = this.events.length - 1;\n while (this.events[i-1] && this.events[i-1].time > this.events[i].time) {\n var prev = this.events[i-1];\n var next = this.events[i-0];\n prev.state = null;\n this.events[i-1] = next;\n this.events[i-0] = prev;\n --i;\n }\n // Frees memory of old events\n //if (this.events.length > 64) {\n //this.events[this.events.length - 64] = null;\n //}\n }\n }", "function vEvent() {\n this.id;\n this.calendarType = '';\n this.calendarIndex = 0;\n this.properties = new PropertyMap();\n this.regular;\n this.alarm = null;\n}", "asEvent() {\r\n return super.asEvent();\r\n }", "asEvent() {\r\n return super.asEvent();\r\n }", "asEvent() {\r\n return super.asEvent();\r\n }", "static get EVENT() {\n // Get the original event to call\n return overtakenAdaptEvent = overtakenAdaptEvent || function(name, description, event) {\n console.log( 'AdaptEvent: ', {\n name,\n description,\n event,\n } );\n };\n }", "function getHashEventSignature(evt){\n return web3.sha3(evt)\n}", "function EventReader() {}", "function eventCreate(listOfEvents, current, indJ) {\n listOfEvents[indJ] = {\n id: current.section,\n title: current.section,\n start: determineDay(current.days[indJ]) + current.start + \":00\",\n end: determineDay(current.days[indJ]) + current.end + \":00\",\n allDay: false,\n editable: true\n };\n }", "static initialize(obj, eventAt, event) { \n obj['event_at'] = eventAt;\n obj['event'] = event;\n }", "handleEventChange(key, value) {\n let newEvents = this.state.events;\n let event = newEvents[this.state.index];\n event[key] = value;\n newEvents[this.state.index] = event;\n this.setState({events: newEvents});\n }", "function getEventName(name) {\n var m = name.match(EVENT_NAME_PATTERN);\n var ret = m[1] ? \"change:\" : \"\";\n ret += m[2].toLowerCase() + m[3];\n return ret;\n }", "function dEventDataTransform(event) {\n event.start = event.startTime;\n event.end = event.endTime;\n event.title = 'ID: ' + event.practiceSessionID;\n return event;\n}", "*resolveEvent(eventID) {\n return this.events[eventID];\n }", "function buildPlatformEvent(event){\r\n //Object map that maps Twilio Field to Salesforce Field\r\n var eventToPEMap = {\r\n \"Body\":\"Body__c\",\r\n \"To\":\"To__c\",\r\n \"From\":\"From__c\",\r\n \"AccountSid\":\"AccountSid__c\",\r\n \"SmsSid\":\"MessageSid__c\",\r\n \"MessagingServiceSid\":\"MessagingServiceSid__c\",\r\n \"SmsStatus\":\"SmsStatus__c\",\r\n \"ErrorCode\":\"ErrorCode__c\"\r\n };\r\n\r\n var platformEvent = {};\r\n\r\n //Loop through event and build platform event\r\n for (var property in event) {\r\n if (eventToPEMap.hasOwnProperty(property)) {\r\n var eventProp;\r\n if(useNameSpace){\r\n eventProp = nameSpace + eventToPEMap[property];\r\n } else{\r\n eventProp = eventToPEMap[property];\r\n }\r\n platformEvent[eventProp] = event[property];\r\n }\r\n }\r\n return platformEvent;\r\n }", "function Eventable()\n{\n\n}", "function OpenEvent() {}", "addEvent(data) {\n Event.create({\n blockId: K.total_blocks,\n data: stringify(data)\n })\n }", "function peacefulDayEvent(id) {\n\n}", "getEvent(eventName) {\n return this.events.find((e) => e.title == eventName);\n }", "function anotherAddEventListener(typeOfEvent, callback) {\n\n\n//22. properties of Event\n\tvar eventThatHappened{\n\t\teventType: \"keydown\",\n\t\tkey: \"p\",\n\t\tdurationOfKeypress: 2,\n\t}\n}", "function NotificationEventFactory() {}", "function event_seen(evnt) {\n alert(\"Got event: \" + evnt.type);\n}", "function Event_Event(object, eventTriggered, data, object2, eventTriggered2, data2)\n{\n\t//set our values\n\tthis.InterpreterObject = object ? object : null;\n\tthis.Event = eventTriggered ? eventTriggered : __NEMESIS_EVENT_NOTHANDLED;\n\tthis.Datas = data ? typeof data === \"object\" ? data : [data] : [];\n\tthis.InterpreterObjectEx = object2 ? object2 : null;\n\tthis.EventEx = eventTriggered2 ? eventTriggered2 : __NEMESIS_EVENT_NOTHANDLED;\n\tthis.DatasEx = data2 ? typeof data2 === \"object\" ? data2 : [data2] : [];\n}", "function getEventName(name) {\n var m = name.match(EVENT_NAME_PATTERN);\n var ret = m[1] ? 'change:' : '';\n ret += m[2].toLowerCase() + m[3];\n return ret;\n }", "event(name, data = {}) {\n const eventObj = { event: name };\n for (const d in data) {\n const v = data[d];\n eventObj[d] = v;\n }\n logger.log('pushing event', eventObj);\n return window.criteo_q.push(eventObj);\n }", "function eventFunction(e){\n\t getSlot([q.id], allEvents).push(e);\n\t eventDurForeach(e, drawfn);\n\t}", "constructor(){\n this.events = new Map()\n this.events.set(1, new Event(1, \"StandUp\", new Date(), EVENT_STATUS.planned))\n this.events.set(2, new Event(2, \"Собеседование\", new Date(), EVENT_STATUS.planned))\n\n this.candidateEvent = [\n {\n candidateID:1,\n eventID:1\n }\n ]\n this.employeeEvent = [\n {\n employeeID:1,\n eventID:1\n }\n ]\n }", "getEvent(nameOrSignatureOrTopic) {\n if (Object(_ethersproject_bytes__WEBPACK_IMPORTED_MODULE_2__[/* isHexString */ \"l\"])(nameOrSignatureOrTopic)) {\n const topichash = nameOrSignatureOrTopic.toLowerCase();\n for (const name in this.events) {\n if (topichash === this.getEventTopic(name)) {\n return this.events[name];\n }\n }\n logger.throwArgumentError(\"no matching event\", \"topichash\", topichash);\n }\n // It is a bare name, look up the function (will return null if ambiguous)\n if (nameOrSignatureOrTopic.indexOf(\"(\") === -1) {\n const name = nameOrSignatureOrTopic.trim();\n const matching = Object.keys(this.events).filter((f) => (f.split(\"(\" /* fix:) */)[0] === name));\n if (matching.length === 0) {\n logger.throwArgumentError(\"no matching event\", \"name\", name);\n }\n else if (matching.length > 1) {\n logger.throwArgumentError(\"multiple matching events\", \"name\", name);\n }\n return this.events[matching[0]];\n }\n // Normlize the signature and lookup the function\n const result = this.events[_fragments__WEBPACK_IMPORTED_MODULE_7__[/* EventFragment */ \"c\"].fromString(nameOrSignatureOrTopic).format()];\n if (!result) {\n logger.throwArgumentError(\"no matching event\", \"signature\", nameOrSignatureOrTopic);\n }\n return result;\n }", "get event () {\n\t\treturn this._event;\n\t}", "getEvent(nameOrSignatureOrTopic) {\n if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__ethersproject_bytes__[\"f\" /* isHexString */])(nameOrSignatureOrTopic)) {\n const topichash = nameOrSignatureOrTopic.toLowerCase();\n for (const name in this.events) {\n if (topichash === this.getEventTopic(name)) {\n return this.events[name];\n }\n }\n logger.throwArgumentError(\"no matching event\", \"topichash\", topichash);\n }\n // It is a bare name, look up the function (will return null if ambiguous)\n if (nameOrSignatureOrTopic.indexOf(\"(\") === -1) {\n const name = nameOrSignatureOrTopic.trim();\n const matching = Object.keys(this.events).filter((f) => (f.split(\"(\" /* fix:) */)[0] === name));\n if (matching.length === 0) {\n logger.throwArgumentError(\"no matching event\", \"name\", name);\n }\n else if (matching.length > 1) {\n logger.throwArgumentError(\"multiple matching events\", \"name\", name);\n }\n return this.events[matching[0]];\n }\n // Normlize the signature and lookup the function\n const result = this.events[__WEBPACK_IMPORTED_MODULE_8__fragments__[\"b\" /* EventFragment */].fromString(nameOrSignatureOrTopic).format()];\n if (!result) {\n logger.throwArgumentError(\"no matching event\", \"signature\", nameOrSignatureOrTopic);\n }\n return result;\n }", "function _constructEventSystem(eventsObject, parent){\n\n var _events =[]\n var _parent = parent;\n\n var _callerId = \"undefined caller Obj\";\n if (typeof parent.uPhrase=== 'string')\n _callerId = parent.uPhrase\n else if (typeof parent.uPhrase=== 'function')\n _callerId = parent.uPhrase()\n\n function _raise (fn, event)\n {\n var title='';\n title+=(typeof event === 'object' && event.caller)?\n event.caller+ ' fired ':'';\n title+= (typeof event === 'object' && event.name)?\n event.name:'undefined event name';\n\n \n\n if (typeof event === 'object' && event.meta) title += meta\n\n _log( title , 3);\n\n var result = _execfn(fn,event);\n \n\n return result;\n }\n\n /**\n * returns the value of the event computation or undefined if no\n * computation happened. returns false if an error ocured\n */\n function _execfn(fn, event){\n// try{\n if (typeof fn === 'function')\n return fn(event);\n else if (typeof fn === 'string')\n {\n if ( event.object && event.object[\"fn\"] &&\n typeof event.object[\"fn\"] === 'function')\n return event.object[fn](event);\n else\n return eval(fn);\n }\n// }catch(e){\n// _log('event failed');\n// console.log(e);\n// return false;\n// }\n \n return undefined;\n }\n\n function _proxy(fn, args)\n {\n return eval(\"(\"+ fn+ \")\")(args);\n }\n\n /**\n * Raise the on`name` event eg: bop.event(\"Load\") -> onLoad\n *\n * will check metadata if an event position is specified (eg: 'BEFORE', \"after\")\n *\n * Returns either the return value of the event's function or undefined\n * if no function was defined or false if something went wrong\n * this is being executed in the parent's scope\n */\n function event (name, metadata){\n \n name = bop.ucFirst(name);\n\n if(_events['on'+name])\n {\n var event={\n 'meta':metadata,\n 'name':name,\n 'caller':_callerId,\n 'object':this,\n 'basiin':basiin, //allow alien scopes access to basiin\n 'proxy': _proxy\n }\n\n return _raise(_events['on'+name], event)\n }\n\n //if event doesn't exist\n _log( _callerId+ ' fired on'+name+ '. No hook!', 4);\n return undefined; //undefined events return undefined in stead of false\n }\n\n event.add = function(object, force)\n {\n //filter event properties out of the rest\n for (var p in object)\n if (p.substr(0,2) == 'on' && p.substr(2,1).match(/[A-Z]{1}/))\n {\n var eventName = p;\n\n //DEPRECATED: turn \"onLoad\" to \"onAfterLoad\"\n if (!bop.lcFirst(eventName).match(/^onAfter/) &&\n !bop.lcFirst(eventName).match(/^onBefore/))\n eventName= 'onAfter'+ bop.ucFirst(p.substr(2));\n\n //append if non existing or forced\n if ( object[p] && (events[eventName] === undefined || force) )\n _events[eventName] = object[p];\n }\n }\n\n event.exists = function(str) {return (_events[str] == undefined);}\n event.events = function (){\n var es = {}\n for(var e in _events) es[e] = _events[e];\n return es;\n }\n\n event.add(eventsObject);\n return event;\n }", "function onEvent(name, event) {\n //console.log(event);\n console.log(name, JSON.stringify(event, null, 2));\n}", "get event() {\n\t\treturn this.__event;\n\t}", "get event() {\n\t\treturn this.__event;\n\t}", "get event() {\n\t\treturn this.__event;\n\t}", "function Event() {\n let events = {};\n let last = undefined;\n this.on = function(evt, handler) {\n (events[evt] || (events[evt] = [])).push(handler);\n } \n this.emit = function(evt, ...arg) {\n last = evt;\n for(let item of events[evt])\n item(...arg);\n }\n\n this.removeLastEventHandler = function() {\n events[last].pop(); // delete event[last]\n }\n \n this.getEvents = function() {\n return {...events};\n }\n }", "getEvent(nameOrSignatureOrTopic) {\n if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__ethersproject_bytes__[\"f\" /* isHexString */])(nameOrSignatureOrTopic)) {\n const topichash = nameOrSignatureOrTopic.toLowerCase();\n for (const name in this.events) {\n if (topichash === this.getEventTopic(name)) {\n return this.events[name];\n }\n }\n logger.throwArgumentError(\"no matching event\", \"topichash\", topichash);\n }\n // It is a bare name, look up the function (will return null if ambiguous)\n if (nameOrSignatureOrTopic.indexOf(\"(\") === -1) {\n const name = nameOrSignatureOrTopic.trim();\n const matching = Object.keys(this.events).filter((f) => (f.split(\"(\" /* fix:) */)[0] === name));\n if (matching.length === 0) {\n logger.throwArgumentError(\"no matching event\", \"name\", name);\n }\n else if (matching.length > 1) {\n logger.throwArgumentError(\"multiple matching events\", \"name\", name);\n }\n return this.events[matching[0]];\n }\n // Normlize the signature and lookup the function\n const result = this.events[__WEBPACK_IMPORTED_MODULE_8__fragments__[\"a\" /* EventFragment */].fromString(nameOrSignatureOrTopic).format()];\n if (!result) {\n logger.throwArgumentError(\"no matching event\", \"signature\", nameOrSignatureOrTopic);\n }\n return result;\n }", "function xl_GetEventTarg(e) \n{\n\tvar EventObj; \n\tvar e = xl_GetEvent(e); \n\t\n\tif (e.target) EventObj = e.target;\n\telse if (e.srcElement) EventObj = e.srcElement;\n\t\n\treturn EventObj; \n}", "function Event(event) {\n\t\t// copy of event\n\t\tthis.origin = event;\t// pointer\n\n\t\t/*\n\t\t * PRIVATE\n\t\t * set type of this event\n\t\t * return 'normal'/'all'/'over'\n\t\t */\n\t\tvar setType = function() {\n\t\t\tif (event != null) {\t\t\t\t\n\t\t\t\tvar startDate = event.start.dateTime.getDate();\n\t\t\t\tvar endDate = event.end.dateTime.getDate();\n\t\t\t\n\t\t\t\tvar startHour = event.start.dateTime.getHours();\n\t\t\t\tvar startMin = event.start.dateTime.getMinutes();\n\t\t\t\tvar startSec = event.start.dateTime.getSeconds();\n\t\t\t\t\n\t\t\t\tvar endHour = event.end.dateTime.getHours();\n\t\t\t\tvar endMin = event.end.dateTime.getMinutes();\n\t\t\t\tvar endSec = event.end.dateTime.getSeconds();\n\t\t\t\n\t\t\t\t// check 'all'\n\t\t\t\tif (startDate == endDate && startHour == 0 && startMin == 0\n\t\t\t\t\t&& startSec == 0 && endHour == 23 && endMin == 59\n\t\t\t\t\t&& endSec == 59) {\n\t\t\t\t\treturn \"all\";\n\t\t\t\t}\n\t\t\t\t// check 'over'\n\t\t\t\telse if (!isNormal(event.start, event.end)) {\n\t\t\t\t\treturn \"over\";\n\t\t\t\t}\n\t\t\t\t// check 'normal'\n\t\t\t\telse {\n\t\t\t\t\treturn \"normal\";\n\t\t\t\t}\n\t\t\t} else return null;\n\t\t};\n\t\t\n\t\t/* \n\t\t * PRIVATE\n\t\t * set color\n\t\t */\n\t\tvar setColor = function() {\n\t\t\tif (event.colorId == null) {\n\t\t\t\treturn $rootScope.eventColor[0];\n\t\t\t} else {\n\t\t\t\treturn $rootScope.eventColor[event.colorId];\n\t\t\t}\n\t\t};\n\t\t\n\t\t// type of this event\n\t\t// \"normal\" / \"all\"/ \"over\"\n\t\tthis.type = setType();\n\t\t\n\t\tthis.color = setColor();\n\t}", "constructor() {\n\t\t/** @type {Map<Identifier, IEvent>} */\n\t\tthis._snapshots = new Map();\n\t}", "get event() {\n return contextEvent.get();\n }", "function storeEventHandler(dict, eventId, eventCallback) {\n let elementFound = false;\n for (let i = 0; i < dict.length; i++) {\n if (dict[i].key === eventId) {\n elementFound = true;\n break;\n }\n }\n\n if (!elementFound) {\n dict.push({\n key: eventId,\n handler: eventCallback\n });\n }\n}", "function formatEvent (event) {\n return {\n eventID: event.eventID,\n name: event.name,\n numRunners: event.numRunners,\n numCheckpoints: event.numCheckpoints,\n startTime: event.startTime,\n }\n}", "handleNewEvent(nEvent) {\n\t\tlet data = JSON.parse(nEvent.data)[\"TracerEvent\"];\n\t\tthis.setState((prevState, props) => {\n\t\t\tlet match = prevState.events.filter(n => n.ID === data.ID);\n\t\t\tif (match.length === 1) {\n\t\t\t\tmatch = match[0];\n\t\t\t\tObject.keys(data).map(n => {\n\t\t\t\t\tif (data[n] !== match[n]) {\n\t\t\t\t\t\tmatch[n] = data[n];\n\t\t\t\t\t\treturn n;\n\t\t\t\t\t}\n\t\t\t\t\treturn null;\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tprevState.events.push(data);\n\t\t\t\tprevState.pevents = this.parseVisibleEvents(prevState.events);\n\t\t\t}\n\t\t\treturn prevState;\n\t\t});\n\t}", "getTriggerEvents() {\n if (!this.contract) {\n return;\n }\n\n // Search the contract events for the hash in the event logs and show matching events.\n this.contract.getPastEvents(\n \"Trigger\",\n {\n filter: { _from: this.coinbase },\n fromBlock: 0,\n toBlock: \"latest\"\n },\n (error, events) => {\n for (let i = 0; i < events.length; i++) {\n var eventObj = events[i];\n console.log(`Triggered: `, eventObj);\n }\n }\n );\n }", "function Events() {}", "function Events() {}", "function Events() {}" ]
[ "0.7220342", "0.6360154", "0.6360154", "0.6247587", "0.61533606", "0.61468875", "0.61468875", "0.61468875", "0.61468875", "0.61468875", "0.6139239", "0.6128923", "0.6122797", "0.6094675", "0.6094675", "0.6094675", "0.6079078", "0.60606396", "0.6058764", "0.60245997", "0.60245997", "0.60245997", "0.5954839", "0.59416705", "0.59416705", "0.5930362", "0.591663", "0.59030473", "0.5888556", "0.5852252", "0.5832767", "0.582103", "0.581856", "0.5790615", "0.57745326", "0.5772209", "0.57665694", "0.5763087", "0.5763087", "0.57535946", "0.5724118", "0.57107633", "0.57107633", "0.57100904", "0.57074356", "0.5704725", "0.56802785", "0.5675152", "0.56751126", "0.5671581", "0.5669963", "0.5659205", "0.56577873", "0.5650149", "0.56471956", "0.56471956", "0.56471956", "0.56454784", "0.5642457", "0.5629757", "0.5628984", "0.5628882", "0.5624566", "0.5624365", "0.5624311", "0.562192", "0.5621072", "0.56176364", "0.56158394", "0.5604398", "0.5600467", "0.5592355", "0.5592279", "0.5585855", "0.5584217", "0.5565527", "0.5559221", "0.55396914", "0.55354327", "0.55331355", "0.55328435", "0.5530583", "0.55291253", "0.5527534", "0.5525245", "0.5522976", "0.5522976", "0.5522976", "0.55160654", "0.5513691", "0.54915744", "0.5476725", "0.54734355", "0.5466506", "0.5466322", "0.5460836", "0.5460833", "0.5456187", "0.5453422", "0.5453422", "0.5453422" ]
0.0
-1
Computes HTML classNames for a singleday element
function getDayClasses(date, dateProfile, context, noThemeHighlight) { var calendar = context.calendar, options = context.options, theme = context.theme, dateEnv = context.dateEnv; var classes = []; var todayStart; var todayEnd; if (!rangeContainsMarker(dateProfile.activeRange, date)) { classes.push('fc-disabled-day'); } else { classes.push('fc-' + DAY_IDS[date.getUTCDay()]); if (options.monthMode && dateEnv.getMonth(date) !== dateEnv.getMonth(dateProfile.currentRange.start)) { classes.push('fc-other-month'); } todayStart = startOfDay(calendar.getNow()); todayEnd = addDays(todayStart, 1); if (date < todayStart) { classes.push('fc-past'); } else if (date >= todayEnd) { classes.push('fc-future'); } else { classes.push('fc-today'); if (noThemeHighlight !== true) { classes.push(theme.getClass('today')); } } } return classes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getCSSClassesNames() {\n var classNames = 'article__textarea article__textarea--style';\n switch (this.state.cssCheck) {\n case 'OK':\n classNames += ' article__textarea--correct';\n break;\n case 'KO':\n classNames += ' article__textarea--wrong';\n break;\n default:\n classNames += ' article__textarea--idle';\n break;\n }\n return classNames;\n }", "function classNames(){for(var e=\"\",t,n=0;n<arguments.length;n++){if(!(t=arguments[n]))continue;if(\"string\"==typeof t||\"number\"==typeof t)e+=\" \"+t;else if(\"[object Array]\"===Object.prototype.toString.call(t))e+=\" \"+classNames.apply(null,t);else if(\"object\"==typeof t)for(var r in t){if(!t.hasOwnProperty(r)||!t[r])continue;e+=\" \"+r}}return e.substr(1)}", "function classNames(){for(var e=\"\",t,n=0;n<arguments.length;n++){if(!(t=arguments[n]))continue;if(\"string\"==typeof t||\"number\"==typeof t)e+=\" \"+t;else if(\"[object Array]\"===Object.prototype.toString.call(t))e+=\" \"+classNames.apply(null,t);else if(\"object\"==typeof t)for(var r in t){if(!t.hasOwnProperty(r)||!t[r])continue;e+=\" \"+r}}return e.substr(1)}", "function classNames(){for(var e=\"\",t,n=0;n<arguments.length;n++){if(!(t=arguments[n]))continue;if(\"string\"==typeof t||\"number\"==typeof t)e+=\" \"+t;else if(\"[object Array]\"===Object.prototype.toString.call(t))e+=\" \"+classNames.apply(null,t);else if(\"object\"==typeof t)for(var r in t){if(!t.hasOwnProperty(r)||!t[r])continue;e+=\" \"+r}}return e.substr(1)}", "function classNames(){for(var e=\"\",t,n=0;n<arguments.length;n++){if(!(t=arguments[n]))continue;if(\"string\"==typeof t||\"number\"==typeof t)e+=\" \"+t;else if(\"[object Array]\"===Object.prototype.toString.call(t))e+=\" \"+classNames.apply(null,t);else if(\"object\"==typeof t)for(var r in t){if(!t.hasOwnProperty(r)||!t[r])continue;e+=\" \"+r}}return e.substr(1)}", "function classNames(){for(var e=\"\",t,n=0;n<arguments.length;n++){if(!(t=arguments[n]))continue;if(\"string\"==typeof t||\"number\"==typeof t)e+=\" \"+t;else if(\"[object Array]\"===Object.prototype.toString.call(t))e+=\" \"+classNames.apply(null,t);else if(\"object\"==typeof t)for(var r in t){if(!t.hasOwnProperty(r)||!t[r])continue;e+=\" \"+r}}return e.substr(1)}", "function classList(element) {\n return (' ' + (element && element.className || '') + ' ').replace(/\\s+/gi, ' ');\n }", "function classList(element) {\n return (' ' + (element && element.className || '') + ' ').replace(/\\s+/gi, ' ');\n }", "function classList(element) {\n return (' ' + (element && element.className || '') + ' ').replace(/\\s+/gi, ' ');\n }", "function classList(element) {\n return (' ' + (element.className || '') + ' ').replace(/\\s+/gi, ' ');\n }", "function classList(element) {\n return (' ' + (element.className || '') + ' ').replace(/\\s+/gi, ' ');\n }", "function classList(element) {\n return (' ' + (element.className || '') + ' ').replace(/\\s+/gi, ' ');\n }", "function classList(element) {\n return (' ' + (element.className || '') + ' ').replace(/\\s+/gi, ' ');\n }", "function classList(element) {\n return (' ' + (element.className || '') + ' ').replace(/\\s+/gi, ' ');\n }", "function classList(element) {\n return (' ' + (element.className || '') + ' ').replace(/\\s+/gi, ' ');\n }", "function classList(element) {\n return (' ' + (element.className || '') + ' ').replace(/\\s+/gi, ' ');\n }", "function classList(element) {\n return (' ' + (element.className || '') + ' ').replace(/\\s+/gi, ' ');\n }", "function classList(element) {\n return (' ' + (element.className || '') + ' ').replace(/\\s+/gi, ' ');\n }", "function classList(element) {\n return (' ' + (element.className || '') + ' ').replace(/\\s+/gi, ' ');\n }", "function classList(element) {\n return (' ' + (element.className || '') + ' ').replace(/\\s+/gi, ' ');\n }", "function classList(element) {\n return (' ' + (element.className || '') + ' ').replace(/\\s+/gi, ' ');\n }", "function classList(element) {\n return (' ' + (element.className || '') + ' ').replace(/\\s+/gi, ' ');\n }", "function classList(element) {\n return (' ' + (element.className || '') + ' ').replace(/\\s+/gi, ' ');\n }", "function classList(element) {\n return (' ' + (element.className || '') + ' ').replace(/\\s+/gi, ' ');\n }", "function classList(element) {\n return (' ' + (element.className || '') + ' ').replace(/\\s+/gi, ' ');\n }", "function classList(element) {\n return (' ' + (element.className || '') + ' ').replace(/\\s+/gi, ' ');\n }", "function classList(element) {\n return (' ' + (element.className || '') + ' ').replace(/\\s+/gi, ' ');\n }", "function classList(element) {\n return (' ' + (element.className || '') + ' ').replace(/\\s+/gi, ' ');\n }", "function classList(element) {\n return (' ' + (element.className || '') + ' ').replace(/\\s+/gi, ' ');\n }", "function classList(element) {\n return (' ' + (element.className || '') + ' ').replace(/\\s+/gi, ' ');\n }", "function classList(element) {\n return (' ' + (element.className || '') + ' ').replace(/\\s+/gi, ' ');\n }", "function classList(element) {\n return (' ' + (element.className || '') + ' ').replace(/\\s+/gi, ' ');\n }", "function classList(element) {\n return (' ' + (element.className || '') + ' ').replace(/\\s+/gi, ' ');\n }", "function classList(element) {\n return (' ' + (element.className || '') + ' ').replace(/\\s+/gi, ' ');\n }", "function classList(element) {\n return (' ' + (element.className || '') + ' ').replace(/\\s+/gi, ' ');\n }", "function classList(element) {\n return (' ' + (element.className || '') + ' ').replace(/\\s+/gi, ' ');\n }", "function classList(element) {\n return (' ' + (element.className || '') + ' ').replace(/\\s+/gi, ' ');\n }", "function classList(element) {\n return (' ' + (element.className || '') + ' ').replace(/\\s+/gi, ' ');\n }", "function classList(element) {\n return (' ' + (element.className || '') + ' ').replace(/\\s+/gi, ' ');\n }", "function classList(element) {\n return (' ' + (element.className || '') + ' ').replace(/\\s+/gi, ' ');\n }", "function classList(element) {\n return (' ' + (element.className || '') + ' ').replace(/\\s+/gi, ' ');\n }", "function classList(element) {\n return (' ' + (element.className || '') + ' ').replace(/\\s+/gi, ' ');\n }", "function classList(element) {\n return (' ' + (element.className || '') + ' ').replace(/\\s+/gi, ' ');\n }", "function classList(element) {\n return (' ' + (element.className || '') + ' ').replace(/\\s+/gi, ' ');\n }", "function classList(element) {\n\t return (' ' + (element.className || '') + ' ').replace(/\\s+/gi, ' ');\n\t }", "function classList(element) {\n\t return (' ' + (element.className || '') + ' ').replace(/\\s+/gi, ' ');\n\t }", "function classList(element) {\n\t return (' ' + (element.className || '') + ' ').replace(/\\s+/gi, ' ');\n\t }", "function classList(element) {\n\t return (' ' + (element.className || '') + ' ').replace(/\\s+/gi, ' ');\n\t }", "function elementComponentIdsFromClasses (element) {\n return (element.className || '').split(' ');\n }", "getClassNames() {\n let classNames = ['thread-ListItem'];\n\n return classNames.join(' ');\n }", "_setClassNames() {\n const classNames = ['osjs-window', ...this.attributes.classNames];\n if (this.id) {\n classNames.push(`Window_${this.id}`);\n }\n\n classNames.filter(val => !!val)\n .forEach((val) => this.$element.classList.add(val));\n }", "function classNames() {\n\t\t\tvar classes = '';\n\t\t\tvar arg;\n\n\t\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\t\targ = arguments[i];\n\t\t\t\tif (!arg) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif ('string' === typeof arg || 'number' === typeof arg) {\n\t\t\t\t\tclasses += ' ' + arg;\n\t\t\t\t} else if (Object.prototype.toString.call(arg) === '[object Array]') {\n\t\t\t\t\tclasses += ' ' + classNames.apply(null, arg);\n\t\t\t\t} else if ('object' === typeof arg) {\n\t\t\t\t\tfor (var key in arg) {\n\t\t\t\t\t\tif (!arg.hasOwnProperty(key) || !arg[key]) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tclasses += ' ' + key;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn classes.substr(1);\n\t\t}", "function classNames() {\n\t\t\tvar classes = '';\n\t\t\tvar arg;\n\n\t\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\t\targ = arguments[i];\n\t\t\t\tif (!arg) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif ('string' === typeof arg || 'number' === typeof arg) {\n\t\t\t\t\tclasses += ' ' + arg;\n\t\t\t\t} else if (Object.prototype.toString.call(arg) === '[object Array]') {\n\t\t\t\t\tclasses += ' ' + classNames.apply(null, arg);\n\t\t\t\t} else if ('object' === typeof arg) {\n\t\t\t\t\tfor (var key in arg) {\n\t\t\t\t\t\tif (!arg.hasOwnProperty(key) || !arg[key]) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tclasses += ' ' + key;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn classes.substr(1);\n\t\t}", "function classNames() {\n\t\t\t\tvar classes = '';\n\t\t\t\tvar arg;\n\n\t\t\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\t\t\targ = arguments[i];\n\t\t\t\t\tif (!arg) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ('string' === typeof arg || 'number' === typeof arg) {\n\t\t\t\t\t\tclasses += ' ' + arg;\n\t\t\t\t\t} else if (Object.prototype.toString.call(arg) === '[object Array]') {\n\t\t\t\t\t\tclasses += ' ' + classNames.apply(null, arg);\n\t\t\t\t\t} else if ('object' === typeof arg) {\n\t\t\t\t\t\tfor (var key in arg) {\n\t\t\t\t\t\t\tif (!arg.hasOwnProperty(key) || !arg[key]) {\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tclasses += ' ' + key;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn classes.substr(1);\n\t\t\t}", "function classNames(CLASSES) {\n return function (attrs) {\n if (!attrs || (!attrs.class && !attrs.className)) {\n return;\n }\n var string = (attrs.class || attrs.className).trim();\n var split = string.split(' ');\n var str = '';\n for (var i = 0; i < split.length; i++) {\n var className = split[i];\n if (className) {\n var hash = CLASSES[className];\n str += ((hash == null) ? className : hash) + \" \";\n }\n }\n if (attrs.class) {\n attrs.class = str;\n }\n else {\n attrs.className = str;\n }\n };\n}", "getArticleClassesNames() {\n var classNames = 'cssnaming__article';\n if (this.state.showResult) {\n classNames += ' cssnaming__article--withResult';\n } else {\n classNames += ' cssnaming__article--withoutResult';\n }\n return classNames;\n }", "function classNames() {\n\tvar classes = '';\n\tvar arg;\n\n\tfor (var i = 0; i < arguments.length; i++) {\n\t\targ = arguments[i];\n\t\tif (!arg) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif ('string' === typeof arg || 'number' === typeof arg) {\n\t\t\tclasses += ' ' + arg;\n\t\t} else if (Object.prototype.toString.call(arg) === '[object Array]') {\n\t\t\tclasses += ' ' + classNames.apply(null, arg);\n\t\t} else if ('object' === typeof arg) {\n\t\t\tfor (var key in arg) {\n\t\t\t\tif (!arg.hasOwnProperty(key) || !arg[key]) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tclasses += ' ' + key;\n\t\t\t}\n\t\t}\n\t}\n\treturn classes.substr(1);\n}", "function classNames() {\n\tvar classes = '';\n\tvar arg;\n\n\tfor (var i = 0; i < arguments.length; i++) {\n\t\targ = arguments[i];\n\t\tif (!arg) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif ('string' === typeof arg || 'number' === typeof arg) {\n\t\t\tclasses += ' ' + arg;\n\t\t} else if (Object.prototype.toString.call(arg) === '[object Array]') {\n\t\t\tclasses += ' ' + classNames.apply(null, arg);\n\t\t} else if ('object' === typeof arg) {\n\t\t\tfor (var key in arg) {\n\t\t\t\tif (!arg.hasOwnProperty(key) || !arg[key]) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tclasses += ' ' + key;\n\t\t\t}\n\t\t}\n\t}\n\treturn classes.substr(1);\n}", "function classNames() {\n\t\tvar classes = '';\n\t\tvar arg;\n\t\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\targ = arguments[i];\n\t\t\tif (!arg) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\n\t\t\tif ('string' === typeof arg || 'number' === typeof arg) {\n\t\t\t\tclasses += ' ' + arg;\n\t\t\t} else if (Object.prototype.toString.call(arg) === '[object Array]') {\n\t\t\t\tclasses += ' ' + classNames.apply(null, arg);\n\t\t\t} else if ('object' === typeof arg) {\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (!arg.hasOwnProperty(key) || !arg[key]) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tclasses += ' ' + key;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn classes.substr(1);\n\t}", "function classNames() {\n\t\tvar classes = '';\n\t\tvar arg;\n\t\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\targ = arguments[i];\n\t\t\tif (!arg) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\n\t\t\tif ('string' === typeof arg || 'number' === typeof arg) {\n\t\t\t\tclasses += ' ' + arg;\n\t\t\t} else if (Object.prototype.toString.call(arg) === '[object Array]') {\n\t\t\t\tclasses += ' ' + classNames.apply(null, arg);\n\t\t\t} else if ('object' === typeof arg) {\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (!arg.hasOwnProperty(key) || !arg[key]) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tclasses += ' ' + key;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn classes.substr(1);\n\t}", "function classNames() {\n\t\tvar classes = '';\n\t\tvar arg;\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\targ = arguments[i];\n\t\t\tif (!arg) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ('string' === typeof arg || 'number' === typeof arg) {\n\t\t\t\tclasses += ' ' + arg;\n\t\t\t} else if (Object.prototype.toString.call(arg) === '[object Array]') {\n\t\t\t\tclasses += ' ' + classNames.apply(null, arg);\n\t\t\t} else if ('object' === typeof arg) {\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (!arg.hasOwnProperty(key) || !arg[key]) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tclasses += ' ' + key;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn classes.substr(1);\n\t}", "function classNames() {\n\t\tvar classes = '';\n\t\tvar arg;\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\targ = arguments[i];\n\t\t\tif (!arg) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ('string' === typeof arg || 'number' === typeof arg) {\n\t\t\t\tclasses += ' ' + arg;\n\t\t\t} else if (Object.prototype.toString.call(arg) === '[object Array]') {\n\t\t\t\tclasses += ' ' + classNames.apply(null, arg);\n\t\t\t} else if ('object' === typeof arg) {\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (!arg.hasOwnProperty(key) || !arg[key]) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tclasses += ' ' + key;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn classes.substr(1);\n\t}", "function get_classes(elem) {\n \"use strict\";\n return $(elem).attr('class').split(/\\s+/);\n}", "function classNamesFunction() {\n // TODO: memoize.\n return function (getStyles, styleProps) { return index_1.mergeStyleSets(getStyles && getStyles(styleProps)); };\n }", "render() {\n const state = Object.keys(this.state);\n const classname = Array.from(this.el.classList)\n .filter((cn) => !state.includes(cn))\n .concat(state.filter((cn) => this.state[cn]))\n .join(' ');\n\n this.el.className = classname;\n }", "_getClassNames(_id) {\n const _elem = this._elements[_id];\n if (this._isSVGElem(_elem)) {\n return _elem.className.baseVal;\n }\n else {\n return _elem.className;\n }\n }", "_getClassNames(_id) {\n const _elem = this._elements[_id];\n if (this._isSVGElem(_elem)) {\n return _elem.className.baseVal;\n }\n else {\n return _elem.className;\n }\n }", "function xphasclass($s) {\n return strcat(\"//*[contains(concat(' ',@class,' '),' \",$s,\" ')]\");\n}", "function myAddClass(element, name) {\n var i, arr1, arr2;\n arr1 = element.className.split(\" \");\n arr2 = name.split(\" \");\n for (i = 0; i < arr2.length; i++) {\n if (arr1.indexOf(arr2[i]) == -1) {element.className += \" \" + arr2[i];}\n }\n}", "getEnyoClassesNames() {\n var classNames = 'article__textarea article__textarea--html';\n switch (this.state.enyoCheck) {\n case 'OK':\n classNames += ' article__textarea--correct';\n break;\n case 'KO':\n classNames += ' article__textarea--wrong';\n break;\n default:\n classNames += ' article__textarea--idle';\n break;\n }\n return classNames;\n }", "function classNames () {\n\t\t'use strict';\n\n\t\tvar classes = '';\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif ('string' === argType || 'number' === argType) {\n\t\t\t\tclasses += ' ' + arg;\n\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tclasses += ' ' + classNames.apply(null, arg);\n\n\t\t\t} else if ('object' === argType) {\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (arg.hasOwnProperty(key) && arg[key]) {\n\t\t\t\t\t\tclasses += ' ' + key;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.substr(1);\n\t}", "function $c(a,b){var c=a.getAttribute(\"class\")||\"\";-1==(\" \"+c+\" \").indexOf(\" \"+b+\" \")&&(c&&(c+=\" \"),a.setAttribute(\"class\",c+b))}", "function $c(a,b){var c=a.getAttribute(\"class\")||\"\";-1==(\" \"+c+\" \").indexOf(\" \"+b+\" \")&&(c&&(c+=\" \"),a.setAttribute(\"class\",c+b))}", "getClasses() {\n let classes = ['indicator-pip'];\n\n if (this.props.final) {\n classes.push('final');\n }\n\n if (this.props.taken) {\n classes.push('taken');\n }\n\n return classes.join(' ');\n }", "function Ib(a,b){var c=a.getAttribute(\"class\")||\"\";-1==(\" \"+c+\" \").indexOf(\" \"+b+\" \")&&(c&&(c+=\" \"),a.setAttribute(\"class\",c+b))}", "function Vc(a,b){var c=a.getAttribute(\"class\")||\"\";-1==(\" \"+c+\" \").indexOf(\" \"+b+\" \")&&(c&&(c+=\" \"),a.setAttribute(\"class\",c+b))}", "function _getClasses($el){\n var cls = $el.attr('class')\n if (cls)\n return cls.split(/\\s+/)\n return []\n }", "function getClassNames(elem, depth) {\n\tconst classNames = [];\n\twhile(elem && depth--) {\n\t\tfor(const name of elem.classList) {\n\t\t\tclassNames.push(name);\n\t\t}\n\t\telem = elem.parentNode;\n\t}\n\treturn classNames;\n}", "function addClassName(elem, classNames) {\n var classes = elem.className.split(\" \");\n var newClasses = classNames.split(\" \");\n classes = concat$2(classes).call(classes, filter$2(newClasses).call(newClasses, function (className) {\n return indexOf$3(classes).call(classes, className) < 0;\n }));\n elem.className = classes.join(\" \");\n}", "function addClassName(elem, classNames) {\n var classes = elem.className.split(\" \");\n var newClasses = classNames.split(\" \");\n classes = concat$2(classes).call(classes, filter$2(newClasses).call(newClasses, function (className) {\n return indexOf$3(classes).call(classes, className) < 0;\n }));\n elem.className = classes.join(\" \");\n}", "function Wb(a,b){var c=a.getAttribute(\"class\")||\"\";-1==(\" \"+c+\" \").indexOf(\" \"+b+\" \")&&(c&&(c+=\" \"),a.setAttribute(\"class\",c+b))}", "function addClass(element, name) {\n var i, arr1, arr2;\n arr1 = element.className.split(\" \");\n arr2 = name.split(\" \");\n for (i = 0; i < arr2.length; i++) {\n if (arr1.indexOf(arr2[i]) == -1) \n element.className += \" \" + arr2[i];\n }\n}", "function Me(a,b){var c=a.getAttribute(\"class\")||\"\";-1==(\" \"+c+\" \").indexOf(\" \"+b+\" \")&&(c&&(c+=\" \"),a.setAttribute(\"class\",c+b))}", "get className() {\n return this.classList.toString();\n }", "function classNamesElementFilter(names) {\n return function(e) {\n let classAttr = e.getAttribute(\"class\");\n if (!classAttr) return false;\n let classes = classAttr.trim().split(/\\s+/);\n return every(names, function(n) {\n return A.indexOf(classes, n) !== -1;\n })\n }\n }", "function add_css_class(dom_ob, cl) {\n var classes=dom_ob.className.split(\" \");\n\n if(!in_array(cl, classes)) {\n classes.push(cl);\n }\n\n dom_ob.className=classes.join(\" \");\n\n return classes;\n}", "function addClassName(el, sClassName) {\n\tvar s = el.className;\n\tvar p = s.split(\" \");\n\tif (p.length == 1 && p[0] == \"\")\n\t\tp = [];\n\n\tvar l = p.length;\n\tfor (var i = 0; i < l; i++) {\n\t\tif (p[i] == sClassName)\n\t\t\treturn;\n\t}\n\tp[p.length] = sClassName;\n\tel.className = p.join(\" \");\n}", "function className(name) {\n\treturn document.getElementsByClassName(name);\n}", "function w3RemoveClass(element, name) {\r\n var i, arr1, arr2;\r\n arr1 = element.className.split(\" \");\r\n arr2 = name.split(\" \");\r\n for (i = 0; i < arr2.length; i++) {\r\n while (arr1.indexOf(arr2[i]) > -1) {\r\n arr1.splice(arr1.indexOf(arr2[i]), 1);\r\n }\r\n }\r\n element.className = arr1.join(\" \");\r\n}", "function getClassesOfElement(element){\n var tab = [];\n for(var i =0; i< element.length;i++){\n tab.push(element[i]);\n }\n return tab;\n}", "get classes() {\n const result = {};\n const element = this.nativeElement;\n // SVG elements return an `SVGAnimatedString` instead of a plain string for the `className`.\n const className = element.className;\n const classes = typeof className !== 'string' ? className.baseVal.split(' ') : className.split(' ');\n classes.forEach((value) => result[value] = true);\n return result;\n }", "function w3RemoveClass(element, name) {\n var i, arr1, arr2;\n arr1 = element.className.split(\" \");\n arr2 = name.split(\" \");\n for (i = 0; i < arr2.length; i++) {\n while (arr1.indexOf(arr2[i]) > -1) {\n arr1.splice(arr1.indexOf(arr2[i]), 1);\n }\n }\n element.className = arr1.join(\" \");\n}", "function w3RemoveClass(element, name) {\n var i, arr1, arr2;\n arr1 = element.className.split(\" \");\n arr2 = name.split(\" \");\n for (i = 0; i < arr2.length; i++) {\n while (arr1.indexOf(arr2[i]) > -1) {\n arr1.splice(arr1.indexOf(arr2[i]), 1);\n }\n }\n element.className = arr1.join(\" \");\n}", "function fetchClassName(e) {\n className.unshift(e.srcElement.className);\n console.log(className)\n oldClassName = className.pop();\n console.log(className)\n currentColor = className;\n setColor();\n }", "function w3RemoveClass(element, name) {\r\n var i, arr1, arr2;\r\n arr1 = element.className.split(\" \");\r\n arr2 = name.split(\" \");\r\n for (i = 0; i < arr2.length; i++) {\r\n while (arr1.indexOf(arr2[i]) > -1) {\r\n arr1.splice(arr1.indexOf(arr2[i]), 1); \r\n }\r\n }\r\n element.className = arr1.join(\" \");\r\n}", "function w3RemoveClass(element, name) {\r\n var i, arr1, arr2;\r\n arr1 = element.className.split(\" \");\r\n arr2 = name.split(\" \");\r\n for (i = 0; i < arr2.length; i++) {\r\n while (arr1.indexOf(arr2[i]) > -1) {\r\n arr1.splice(arr1.indexOf(arr2[i]), 1);\r\n }\r\n }\r\n element.className = arr1.join(\" \");\r\n}", "function w3RemoveClass(element, name) {\r\n var i, arr1, arr2;\r\n arr1 = element.className.split(\" \");\r\n arr2 = name.split(\" \");\r\n for (i = 0; i < arr2.length; i++) {\r\n while (arr1.indexOf(arr2[i]) > -1) {\r\n arr1.splice(arr1.indexOf(arr2[i]), 1);\r\n }\r\n }\r\n element.className = arr1.join(\" \");\r\n}", "function w3RemoveClass(element, name) {\r\n var i, arr1, arr2;\r\n arr1 = element.className.split(\" \");\r\n arr2 = name.split(\" \");\r\n for (i = 0; i < arr2.length; i++) {\r\n while (arr1.indexOf(arr2[i]) > -1) {\r\n arr1.splice(arr1.indexOf(arr2[i]), 1);\r\n }\r\n }\r\n element.className = arr1.join(\" \");\r\n}", "function getClass(element) {\n return Array.from(element.classList);\n}", "function w3RemoveClass(element, name) {\n var i, arr1, arr2;\n arr1 = element.className.split(\" \");\n arr2 = name.split(\" \");\n for (i = 0; i < arr2.length; i++) {\n while (arr1.indexOf(arr2[i]) > -1) {\n arr1.splice(arr1.indexOf(arr2[i]), 1); \n }\n }\n element.className = arr1.join(\" \");\n}", "function w3RemoveClass(element, name) {\n var i, arr1, arr2;\n arr1 = element.className.split(\" \");\n arr2 = name.split(\" \");\n for (i = 0; i < arr2.length; i++) {\n while (arr1.indexOf(arr2[i]) > -1) {\n arr1.splice(arr1.indexOf(arr2[i]), 1); \n }\n }\n element.className = arr1.join(\" \");\n}" ]
[ "0.6859277", "0.6847218", "0.6847218", "0.6847218", "0.6847218", "0.6847218", "0.67655474", "0.6733248", "0.6733248", "0.6713478", "0.6713478", "0.6713478", "0.6713478", "0.6713478", "0.6713478", "0.6713478", "0.6713478", "0.6713478", "0.6713478", "0.6713478", "0.6713478", "0.6713478", "0.6713478", "0.6713478", "0.6713478", "0.6713478", "0.6713478", "0.6713478", "0.6713478", "0.6713478", "0.6713478", "0.6713478", "0.6713478", "0.6713478", "0.6713478", "0.6713478", "0.6713478", "0.6713478", "0.6713478", "0.6713478", "0.6713478", "0.6713478", "0.6713478", "0.6674651", "0.66705394", "0.66705394", "0.66705394", "0.66705394", "0.66596144", "0.6633211", "0.64772254", "0.6454439", "0.6454439", "0.64543533", "0.64514273", "0.6441854", "0.6438642", "0.6438642", "0.64153874", "0.64153874", "0.64153284", "0.64153284", "0.63945305", "0.6381044", "0.6375813", "0.6373726", "0.6373726", "0.6373095", "0.634677", "0.6291009", "0.62873626", "0.62798405", "0.62798405", "0.6244687", "0.62179804", "0.618518", "0.6171152", "0.615958", "0.614029", "0.614029", "0.6136653", "0.6127884", "0.61276567", "0.6126702", "0.6119687", "0.6083946", "0.60799474", "0.60756344", "0.6057558", "0.60512334", "0.60509", "0.60481423", "0.60481423", "0.6043947", "0.60294396", "0.60284287", "0.60284287", "0.60284287", "0.60021555", "0.60020363", "0.60020363" ]
0.0
-1
given a function that resolves a result asynchronously. the function can either call passedin success and failure callbacks, or it can return a promise. if you need to pass additional params to func, bind them first.
function unpromisify(func, success, failure) { // guard against success/failure callbacks being called more than once // and guard against a promise AND callback being used together. var isResolved = false; var wrappedSuccess = function () { if (!isResolved) { isResolved = true; success.apply(this, arguments); } }; var wrappedFailure = function () { if (!isResolved) { isResolved = true; if (failure) { failure.apply(this, arguments); } } }; var res = func(wrappedSuccess, wrappedFailure); if (res && typeof res.then === 'function') { res.then(wrappedSuccess, wrappedFailure); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wrapFunction(func, args) {\n return new Promise((resolve, reject) => {\n func(args, (success) => resolve(success), (error) => reject(error))\n })\n}", "function wrapInPromise(func){\r\n var promise = new Promise((resolve, reject) => {\r\n resolve(func);\r\n });\r\n return promise;\r\n}", "async function thenify(fn) {\n return await new Promise(function(resolve, reject) {\n function callback(err, res) {\n if (err) return reject(err);\n return resolve(res);\n }\n\n fn(callback);\n });\n}", "function promisify(func) {\n return function(...args) {\n // return a wrapper function\n return new Promise((resolve, reject) => {\n function callback(error, result) {\n // our customj callback for func\n if (error) {\n return reject(error);\n } else {\n resolve(result);\n }\n }\n\n args.push(callback); // append our custom callback to the end of arguments\n\n func.call(this, ...args); // call the original function\n });\n };\n}", "function callback(context, func) {\n var deferred = defer(),\n offset = 1,\n args;\n if (typeof context === 'function') {\n func = context;\n context = null;\n } else if (typeof func === 'function') {\n offset = 2;\n } else {\n throw new Error('Not function provided to execute');\n }\n args = Array.prototype.slice.call(arguments, offset);\n args.push(onComplete);\n func.apply(context, args);\n return deferred.promise;\n\n /**\n * Called once the function execution is complete\n * @param err Error information if the process failed.\n * @param res The response data, on success.\n */\n function onComplete(err, res) {\n if (err) {\n deferred.reject(err);\n } else {\n deferred.resolve(res);\n }\n }\n }", "function wrap_cb (fn, P) {\n return function (params) {\n return new P(function (resolve, reject) {\n fn(params, function (err) { return !err ? resolve() : reject(err) })\n })\n }\n}", "do(func) {\n return async && data instanceof Promise\n ? using(data.then(func), async)\n : using(func(data), async)\n }", "function doRunAsync(fn, ...args) {\n if (fn.length === args.length + 1) { //expects callback\n let executed,\n executedErr,\n reject = err => {\n executedErr = err;\n },\n resolve = () => {\n };\n \n const callback = err => {\n if (executed)\n return;\n executed = true;\n\n if (err)\n reject(err);\n else\n resolve();\n };\n \n let result;\n switch (args.length) {\n case 0:\n result = fn(callback);\n break;\n \n case 1:\n result = fn(args[0], callback);\n break;\n \n case 2:\n result = fn(args[0], args[1], callback);\n break;\n \n default:\n throw new Error(`missing support for ${args.length} args`);\n }\n \n if (executed) { //callback was executed synchronously\n if (executedErr)\n throw executedErr;\n \n return result;\n \n } else { //callback was not executed synchronously, so it must be asynchronous\n return new Bluebird((...args2) => {\n resolve = args2[0];\n reject = args2[1];\n });\n }\n }\n \n //no callback, so either synchronous or returns a Promise\n switch (args.length) {\n case 0:\n return fn();\n \n case 1:\n return fn(args[0]);\n \n case 2:\n return fn(args[0], args[1]);\n \n default:\n throw new Error(`missing support for ${args.length} args`);\n }\n}", "function promise(func, res){\nsetTimeout(function(){func.then(dt => {res(dt)})},5000)\n}", "function wrap(func) {\n return _.wrap(func, function(_func) {\n var args = Array.prototype.slice.call(arguments, 1);\n return Q()\n .then(function() {\n return _func.apply(null, args);\n });\n });\n}", "function promisify(fn) {\n var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;\n\n var boundFn = fn.bind(context);\n\n return function (data) {\n return new Promise(function (resolve, reject) {\n boundFn(data, function (err, resp) {\n if (err) {\n reject(err);\n } else {\n resolve(resp);\n }\n });\n });\n };\n}", "function async_api(f, arg, cb, err) {\n err = err || function(e){ console.log(e); };\n var callback = function(a,b,c,d) {\n var e = api.runtime.lastError;\n if (e) {\n err(e);\n }\n else {\n cb(a,b,c,d);\n }\n };\n try {\n var promise = f.call(null, arg, callback);\n if (promise && promise.then) {\n promise.then(callback);\n }\n } catch(e) {\n err(e);\n }\n}", "function promisify(fn) {\n return function(...args) {\n return new Promise( function(resolve, reject) {\n function cb(result) {\n resolve(result)\n }\n\n fn.apply(this, args.concat(cb))\n })\n }\n }", "function async(f) {\n\t return function () {\n\t var argsToForward = [];\n\t for (var _i = 0; _i < arguments.length; _i++) {\n\t argsToForward[_i] = arguments[_i];\n\t }\n\t promiseimpl.resolve(true).then(function () {\n\t f.apply(null, argsToForward);\n\t });\n\t };\n\t}", "function async(fn, onError) {\n\t return function () {\n\t var args = [];\n\t for (var _i = 0; _i < arguments.length; _i++) {\n\t args[_i] = arguments[_i];\n\t }\n\t _promise.PromiseImpl.resolve(true).then(function () {\n\t fn.apply(void 0, args);\n\t }).catch(function (error) {\n\t if (onError) {\n\t onError(error);\n\t }\n\t });\n\t };\n\t}", "function async(f) {\n return function () {\n var argsToForward = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n argsToForward[_i] = arguments[_i];\n }\n resolve(true).then(function () {\n f.apply(null, argsToForward);\n });\n };\n}", "function async(f) {\n return function () {\n var argsToForward = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n argsToForward[_i] = arguments[_i];\n }\n resolve(true).then(function () {\n f.apply(null, argsToForward);\n });\n };\n}", "function promisify(func) {\n let deferred = $q.defer();\n\n func((response) => {\n if (response && response.error) {\n deferred.reject(response);\n } else {\n deferred.resolve(response);\n }\n\n $rootScope.$apply();\n });\n\n return deferred.promise;\n }", "function async(f) {\n return function () {\n var argsToForward = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n argsToForward[_i] = arguments[_i];\n }\n promiseimpl.resolve(true).then(function () {\n f.apply(null, argsToForward);\n });\n };\n}", "function async(f) {\n return function () {\n var argsToForward = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n argsToForward[_i] = arguments[_i];\n }\n promiseimpl.resolve(true).then(function () {\n f.apply(null, argsToForward);\n });\n };\n}", "function promisify(func) {\n return function promisified() {\n var args = Array.prototype.slice.call(arguments);\n var context = this;\n\n return new Promise(function(resolve, reject) {\n try {\n func.apply(context, args.concat(function(err, data) {\n if (err) {\n return reject(err);\n }\n\n resolve(data);\n }));\n } catch(err) {\n reject(err);\n }\n });\n };\n}", "function async(fn, onError) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n _promise.PromiseImpl.resolve(true).then(function () {\n fn.apply(void 0, args);\n }).catch(function (error) {\n if (onError) {\n onError(error);\n }\n });\n };\n}", "function async(fn, onError) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n _promise.PromiseImpl.resolve(true).then(function () {\n fn.apply(void 0, args);\n }).catch(function (error) {\n if (onError) {\n onError(error);\n }\n });\n };\n}", "function promisify(fn) {\n return () => {\n const { client } = this;\n const args = Array.prototype.slice.call(arguments);\n\n return new Promise((resolve, reject) => {\n args.push((err, result) => {\n if (err) reject(err);\n else resolve(result);\n });\n\n client[fn](...args);\n });\n };\n}", "function generalPromise(f, ...params){\n return new Promise( function(resolve, reject){\n let fnc = params.length > 0 ? f.bind(f, params, resolve) : f.bind(f, resolve);\n fnc();\n }).then(function(text=\"\"){\n return text;\n });\n}", "function async(f) {\n return function () {\n for (var _len = arguments.length, argsToForward = Array(_len), _key = 0; _key < _len; _key++) {\n argsToForward[_key] = arguments[_key];\n }\n\n promiseimpl.resolve(true).then(function () {\n f.apply(null, argsToForward);\n });\n };\n}", "function async(f) {\n return function () {\n for (var _len = arguments.length, argsToForward = Array(_len), _key = 0; _key < _len; _key++) {\n argsToForward[_key] = arguments[_key];\n }\n\n promiseimpl.resolve(true).then(function () {\n f.apply(null, argsToForward);\n });\n };\n}", "function wrapSync(func, cb) {\n if (typeof cb !== 'function') {\n return func();\n }\n\n process.nextTick(function () {\n var result;\n var error;\n\n try {\n result = func();\n } catch (err) {\n error = err;\n }\n\n return cb(error, result);\n });\n}", "function qnode(func) {\n return function() {\n var args = _.toArray(arguments);\n var cb = args.pop();\n var endFunc = _.partial(func, args);\n\n return endFunc()\n .then(\n _.partilal(cb, null)\n )\n .fail(cb);\n };\n}", "function async(f) {\n return function () {\n var argsToForward = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n argsToForward[_i] = arguments[_i];\n }\n __WEBPACK_IMPORTED_MODULE_0__promise_external__[\"b\" /* resolve */](true).then(function () {\n f.apply(null, argsToForward);\n });\n };\n}", "function async(f) {\n return function () {\n var argsToForward = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n argsToForward[_i] = arguments[_i];\n }\n __WEBPACK_IMPORTED_MODULE_0__promise_external__[\"b\" /* resolve */](true).then(function () {\n f.apply(null, argsToForward);\n });\n };\n}", "function async(fn, onError) {\r\n return function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n Promise.resolve(true)\r\n .then(function () {\r\n fn.apply(void 0, args);\r\n })\r\n .catch(function (error) {\r\n if (onError) {\r\n onError(error);\r\n }\r\n });\r\n };\r\n}", "function async(fn, onError) {\r\n return function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n Promise.resolve(true)\r\n .then(function () {\r\n fn.apply(void 0, args);\r\n })\r\n .catch(function (error) {\r\n if (onError) {\r\n onError(error);\r\n }\r\n });\r\n };\r\n}", "function async(fn, onError) {\r\n return function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n Promise.resolve(true)\r\n .then(function () {\r\n fn.apply(void 0, args);\r\n })\r\n .catch(function (error) {\r\n if (onError) {\r\n onError(error);\r\n }\r\n });\r\n };\r\n}", "function async(fn, onError) {\r\n return function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n Promise.resolve(true)\r\n .then(function () {\r\n fn.apply(void 0, args);\r\n })\r\n .catch(function (error) {\r\n if (onError) {\r\n onError(error);\r\n }\r\n });\r\n };\r\n}", "function async(fn, onError) {\r\n return function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n Promise.resolve(true)\r\n .then(function () {\r\n fn.apply(void 0, args);\r\n })\r\n .catch(function (error) {\r\n if (onError) {\r\n onError(error);\r\n }\r\n });\r\n };\r\n}", "function async(fn, onError) {\r\n return function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n Promise.resolve(true)\r\n .then(function () {\r\n fn.apply(void 0, args);\r\n })\r\n .catch(function (error) {\r\n if (onError) {\r\n onError(error);\r\n }\r\n });\r\n };\r\n}", "function async(fn, onError) {\r\n return function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n Promise.resolve(true)\r\n .then(function () {\r\n fn.apply(void 0, args);\r\n })\r\n .catch(function (error) {\r\n if (onError) {\r\n onError(error);\r\n }\r\n });\r\n };\r\n}", "function async(fn, onError) {\r\n return function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n Promise.resolve(true)\r\n .then(function () {\r\n fn.apply(void 0, args);\r\n })\r\n .catch(function (error) {\r\n if (onError) {\r\n onError(error);\r\n }\r\n });\r\n };\r\n}", "function async(fn, onError) {\r\n return function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n Promise.resolve(true)\r\n .then(function () {\r\n fn.apply(void 0, args);\r\n })\r\n .catch(function (error) {\r\n if (onError) {\r\n onError(error);\r\n }\r\n });\r\n };\r\n}", "function promisify(func) {\n var deferred = $q.defer();\n\n func(function(){\n deferred.resolve();\n });\n\n return deferred.promise;\n }", "function async_call(){\n\tvar args = Array.prototype.slice.call(arguments);\n\tif(args.length==1){\n\t\t// Promise\n\t\tvar p = args[0];\n\t\treturn new Promise(function(resolve, reject){\n\t\t\tp.then(function(record) {\n\t\t\t\tresolve({\n\t\t\t\t result : record\n\t\t\t\t});\n\t\t\t}).catch(function(error) {\n\t\t\t\tresolve({\n\t\t\t\t err : error\n\t\t\t\t});\n\t\t\t});\n\t\t});\t\t\n\t}\n\tvar obj = args.shift();\n\t\n\tvar func = obj instanceof Function ? obj : obj[args.shift()];\n\t//console.log('async_call',func);\n\treturn new Promise(function(resolve, reject){\n\t\ttry{\n\t\t\tif(func){\n\t\t\t\targs.push(function (err, replay){\n\t\t\t\t\tif (replay) {\n\t\t\t\t\t resolve({\n\t\t\t\t\t\t result : replay\n\t\t\t\t\t });\n\t\t\t\t\t} else {\n\t\t\t\t\t\tresolve({\n\t\t\t\t\t\t\terr: err\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tfunc.apply(obj, args);\n\t\t\t}\n\t\t\telse\n\t\t\t\tresolve({\n\t\t\t\t\terr : 'Not defined '+func\n\t\t\t\t});\n\t\t}catch(e){\n\t\t\tresolve({\n\t\t\t\terr:e\n\t\t\t});\n\t\t}\n\t\t\n\t});\n}", "function async(fn, onError) {\n return function () {\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n LocalPromise.resolve(true).then(function () {\n fn.apply(undefined, args);\n }).catch(function (error) {\n if (onError) {\n onError(error);\n }\n });\n };\n}", "function async(fn, onError) {\n return function () {\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n LocalPromise.resolve(true).then(function () {\n fn.apply(undefined, args);\n }).catch(function (error) {\n if (onError) {\n onError(error);\n }\n });\n };\n}", "function makeFunctionAPI(genFn) {\n\t const fns = {\n\t sync: function(...args) {\n\t return evaluateSync(genFn.apply(this, args));\n\t },\n\t async: function(...args) {\n\t return new Promise((resolve, reject) => {\n\t evaluateAsync(genFn.apply(this, args), resolve, reject);\n\t });\n\t },\n\t errback: function(...args) {\n\t const cb = args.pop();\n\t if (typeof cb !== \"function\") {\n\t throw makeError(\n\t \"Asynchronous function called without callback\",\n\t GENSYNC_ERRBACK_NO_CALLBACK\n\t );\n\t }\n\n\t let gen;\n\t try {\n\t gen = genFn.apply(this, args);\n\t } catch (err) {\n\t cb(err);\n\t return;\n\t }\n\n\t evaluateAsync(gen, val => cb(undefined, val), err => cb(err));\n\t },\n\t };\n\t return fns;\n\t}", "function async(f) {\n return function () {\n var argsToForward = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n argsToForward[_i] = arguments[_i];\n }\n __WEBPACK_IMPORTED_MODULE_0__promise_external__[\"c\" /* resolve */](true).then(function () {\n f.apply(null, argsToForward);\n });\n };\n}", "function async(f) {\n return function () {\n var argsToForward = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n argsToForward[_i] = arguments[_i];\n }\n __WEBPACK_IMPORTED_MODULE_0__promise_external__[\"c\" /* resolve */](true).then(function () {\n f.apply(null, argsToForward);\n });\n };\n}", "function async(fn, onError) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n Promise.resolve(true).then(function () {\n fn.apply(void 0, args);\n }).catch(function (error) {\n if (onError) {\n onError(error);\n }\n });\n };\n}", "function async(fn, onError) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n Promise.resolve(true).then(function () {\n fn.apply(void 0, args);\n }).catch(function (error) {\n if (onError) {\n onError(error);\n }\n });\n };\n}", "function async(fn, onError) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n Promise.resolve(true)\n .then(function () {\n fn.apply(void 0, args);\n })\n .catch(function (error) {\n if (onError) {\n onError(error);\n }\n });\n };\n}", "function async(fn, onError) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n Promise.resolve(true)\n .then(function () {\n fn.apply(void 0, args);\n })\n .catch(function (error) {\n if (onError) {\n onError(error);\n }\n });\n };\n}", "function async(fn, onError) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n Promise.resolve(true)\n .then(function () {\n fn.apply(void 0, args);\n })\n .catch(function (error) {\n if (onError) {\n onError(error);\n }\n });\n };\n}", "function async(fn, onError) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n Promise.resolve(true)\n .then(function () {\n fn.apply(void 0, args);\n })\n .catch(function (error) {\n if (onError) {\n onError(error);\n }\n });\n };\n}", "function async(fn, onError) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n Promise.resolve(true)\n .then(function () {\n fn.apply(void 0, args);\n })\n .catch(function (error) {\n if (onError) {\n onError(error);\n }\n });\n };\n}", "function async(fn, onError) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n Promise.resolve(true)\n .then(function () {\n fn.apply(void 0, args);\n })\n .catch(function (error) {\n if (onError) {\n onError(error);\n }\n });\n };\n}", "function async(fn, onError) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n Promise.resolve(true)\n .then(function () {\n fn.apply(void 0, args);\n })\n .catch(function (error) {\n if (onError) {\n onError(error);\n }\n });\n };\n}", "function async(fn, onError) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n Promise.resolve(true)\n .then(function () {\n fn.apply(void 0, args);\n })\n .catch(function (error) {\n if (onError) {\n onError(error);\n }\n });\n };\n}", "function async(fn, onError) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n Promise.resolve(true)\n .then(function () {\n fn.apply(void 0, args);\n })\n .catch(function (error) {\n if (onError) {\n onError(error);\n }\n });\n };\n}", "function async(fn, onError) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n Promise.resolve(true)\n .then(function () {\n fn.apply(void 0, args);\n })\n .catch(function (error) {\n if (onError) {\n onError(error);\n }\n });\n };\n}", "function async(fn, onError) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n Promise.resolve(true)\n .then(function () {\n fn.apply(void 0, args);\n })\n .catch(function (error) {\n if (onError) {\n onError(error);\n }\n });\n };\n}", "function async(fn, onError) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n Promise.resolve(true)\n .then(function () {\n fn.apply(void 0, args);\n })\n .catch(function (error) {\n if (onError) {\n onError(error);\n }\n });\n };\n}", "function async(fn, onError) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n Promise.resolve(true)\n .then(function () {\n fn.apply(void 0, args);\n })\n .catch(function (error) {\n if (onError) {\n onError(error);\n }\n });\n };\n}", "function async(fn, onError) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n Promise.resolve(true)\n .then(function () {\n fn.apply(void 0, args);\n })\n .catch(function (error) {\n if (onError) {\n onError(error);\n }\n });\n };\n}", "function async(fn, onError) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n Promise.resolve(true)\n .then(function () {\n fn.apply(void 0, args);\n })\n .catch(function (error) {\n if (onError) {\n onError(error);\n }\n });\n };\n}", "function async(fn, onError) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n Promise.resolve(true)\n .then(function () {\n fn.apply(void 0, args);\n })\n .catch(function (error) {\n if (onError) {\n onError(error);\n }\n });\n };\n}", "function doResolve(fn, onFulfilled, onRejected) {\n\t\tvar done = false;\n\t\ttry {\n\t\t\tfn(function (value) {\n\t\t\t\tif (done) return;\n\t\t\t\tdone = true;\n\t\t\t\tonFulfilled(value);\n\t\t\t}, function (reason) {\n\t\t\t\tif (done) return;\n\t\t\t\tdone = true;\n\t\t\t\tonRejected(reason);\n\t\t\t})\n\t\t} catch (ex) {\n\t\t\tif (done) return;\n\t\t\tdone = true;\n\t\t\tonRejected(ex);\n\t\t}\n\t}", "function doResolve(fn, onFulfilled, onRejected) {\n\t\tvar done = false;\n\t\ttry {\n\t\t\tfn(function (value) {\n\t\t\t\tif (done) return;\n\t\t\t\tdone = true;\n\t\t\t\tonFulfilled(value);\n\t\t\t}, function (reason) {\n\t\t\t\tif (done) return;\n\t\t\t\tdone = true;\n\t\t\t\tonRejected(reason);\n\t\t\t})\n\t\t} catch (ex) {\n\t\t\tif (done) return;\n\t\t\tdone = true;\n\t\t\tonRejected(ex);\n\t\t}\n\t}", "function doResolve(fn, onFulfilled, onRejected) {\n\t\tvar done = false;\n\t\ttry {\n\t\t\tfn(function (value) {\n\t\t\t\tif (done) return;\n\t\t\t\tdone = true;\n\t\t\t\tonFulfilled(value);\n\t\t\t}, function (reason) {\n\t\t\t\tif (done) return;\n\t\t\t\tdone = true;\n\t\t\t\tonRejected(reason);\n\t\t\t})\n\t\t} catch (ex) {\n\t\t\tif (done) return;\n\t\t\tdone = true;\n\t\t\tonRejected(ex);\n\t\t}\n\t}", "function doResolve(fn, onFulfilled, onRejected) {\n\t\tvar done = false;\n\t\ttry {\n\t\t\tfn(function (value) {\n\t\t\t\tif (done) return;\n\t\t\t\tdone = true;\n\t\t\t\tonFulfilled(value);\n\t\t\t}, function (reason) {\n\t\t\t\tif (done) return;\n\t\t\t\tdone = true;\n\t\t\t\tonRejected(reason);\n\t\t\t})\n\t\t} catch (ex) {\n\t\t\tif (done) return;\n\t\t\tdone = true;\n\t\t\tonRejected(ex);\n\t\t}\n\t}", "function doResolve(fn, onFulfilled, onRejected) {\n\t\tvar done = false;\n\t\ttry {\n\t\t\tfn(function (value) {\n\t\t\t\tif (done) return;\n\t\t\t\tdone = true;\n\t\t\t\tonFulfilled(value);\n\t\t\t}, function (reason) {\n\t\t\t\tif (done) return;\n\t\t\t\tdone = true;\n\t\t\t\tonRejected(reason);\n\t\t\t})\n\t\t} catch (ex) {\n\t\t\tif (done) return;\n\t\t\tdone = true;\n\t\t\tonRejected(ex);\n\t\t}\n\t}", "function async(fn, onError) {\n return function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n Promise.resolve(true).then(function () {\n fn.apply(void 0, args);\n }).catch(function (error) {\n if (onError) {\n onError(error);\n }\n });\n };\n}", "function wrapInPromiseAsync(asyncFunc){\r\n var promise = new Promise(async((resolve, reject) => {\r\n resolve(await(asyncFunc()));\r\n }));\r\n return promise;\r\n}", "async function asyncFunction(arg) {\r\n return arg;\r\n}", "function doResolve(fn, onFulfilled, onRejected) {\n\t\tvar done = false;\n\t\ttry {\n\t\t\tfn(function (value) {\n\t\t\t\tif (done) return;\n\t\t\t\tdone = true;\n\t\t\t\tonFulfilled(value);\n\t\t\t}, function (reason) {\n\t\t\t\tif (done) return;\n\t\t\t\tdone = true;\n\t\t\t\tonRejected(reason);\n\t\t\t});\n\t\t} catch (ex) {\n\t\t\tif (done) return;\n\t\t\tdone = true;\n\t\t\tonRejected(ex);\n\t\t}\n\t}", "function doResolve(fn, onFulfilled, onRejected) {\n\t\tvar done = false;\n\t\ttry {\n\t\t\tfn(function (value) {\n\t\t\t\tif (done) return;\n\t\t\t\tdone = true;\n\t\t\t\tonFulfilled(value);\n\t\t\t}, function (reason) {\n\t\t\t\tif (done) return;\n\t\t\t\tdone = true;\n\t\t\t\tonRejected(reason);\n\t\t\t});\n\t\t} catch (ex) {\n\t\t\tif (done) return;\n\t\t\tdone = true;\n\t\t\tonRejected(ex);\n\t\t}\n\t}", "function doResolve(fn, onFulfilled, onRejected) {\n\t\tvar done = false;\n\t\ttry {\n\t\t\tfn(function (value) {\n\t\t\t\tif (done) return;\n\t\t\t\tdone = true;\n\t\t\t\tonFulfilled(value);\n\t\t\t}, function (reason) {\n\t\t\t\tif (done) return;\n\t\t\t\tdone = true;\n\t\t\t\tonRejected(reason);\n\t\t\t});\n\t\t} catch (ex) {\n\t\t\tif (done) return;\n\t\t\tdone = true;\n\t\t\tonRejected(ex);\n\t\t}\n\t}", "function doResolve(fn, onFulfilled, onRejected) {\n\t\t\tvar done = false;\n\t\t\ttry {\n\t\t\t\tfn(function (value) {\n\t\t\t\t\tif (done) return;\n\t\t\t\t\tdone = true;\n\t\t\t\t\tonFulfilled(value);\n\t\t\t\t}, function (reason) {\n\t\t\t\t\tif (done) return;\n\t\t\t\t\tdone = true;\n\t\t\t\t\tonRejected(reason);\n\t\t\t\t})\n\t\t\t} catch (ex) {\n\t\t\t\tif (done) return;\n\t\t\t\tdone = true;\n\t\t\t\tonRejected(ex);\n\t\t\t}\n\t\t}", "function async(fn, onError) {\n return function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n Promise.resolve(true).then(function () {\n fn.apply(void 0, args);\n }).catch(function (error) {\n if (onError) {\n onError(error);\n }\n });\n };\n }", "function promisify(func, manyArgs = false) {\n return function(...args) {\n return new Promise((resolve, reject) => {\n function callback(error, ...results) {\n // our custom callback for func\n if (error) {\n return reject(error);\n } else {\n // resolve with all callback results if manyArgs is specified\n resolve(manyArgs ? results : results[0]);\n }\n }\n\n args.push(callback);\n\n func.call(this, ...args);\n });\n };\n}", "function doResolve(fn, promise) {\n var done = false;\n var res = tryCallTwo(fn, function (value) {\n if (done) return;\n done = true;\n resolve(promise, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(promise, reason);\n });\n\n if (!done && res === IS_ERROR) {\n done = true;\n reject(promise, LAST_ERROR);\n }\n }", "function resolveWrapper(nRes, nRej, pResFn) {\n return function (value) {\n if (!isFunction(pResFn)) {\n return nRes(value)\n }\n\n try {\n var ret = pResFn(value)\n if (isThenable(ret)) {\n ret.then(nRes, nRej)\n } else {\n nRes(ret)\n }\n } catch (e) {\n nRej(e)\n }\n }\n}", "denodeify(thisArg, fn) {\n return (...args) => {\n return new Promise((resolve, reject) => {\n args.push((error, result) => (error) ? reject(error) : resolve(result));\n fn.apply(thisArg, args);\n });\n };\n }", "function makeFunctionAPI(genFn) {\n const fns = {\n sync: function(...args) {\n return evaluateSync(genFn.apply(this, args));\n },\n async: function(...args) {\n return new Promise((resolve, reject) => {\n evaluateAsync(genFn.apply(this, args), resolve, reject);\n });\n },\n errback: function(...args) {\n const cb = args.pop();\n if (typeof cb !== \"function\") {\n throw makeError(\n \"Asynchronous function called without callback\",\n GENSYNC_ERRBACK_NO_CALLBACK\n );\n }\n\n let gen;\n try {\n gen = genFn.apply(this, args);\n } catch (err) {\n cb(err);\n return;\n }\n\n evaluateAsync(gen, val => cb(undefined, val), err => cb(err));\n },\n };\n return fns;\n}", "function makeFunctionAPI(genFn) {\n const fns = {\n sync: function(...args) {\n return evaluateSync(genFn.apply(this, args));\n },\n async: function(...args) {\n return new Promise((resolve, reject) => {\n evaluateAsync(genFn.apply(this, args), resolve, reject);\n });\n },\n errback: function(...args) {\n const cb = args.pop();\n if (typeof cb !== \"function\") {\n throw makeError(\n \"Asynchronous function called without callback\",\n GENSYNC_ERRBACK_NO_CALLBACK\n );\n }\n\n let gen;\n try {\n gen = genFn.apply(this, args);\n } catch (err) {\n cb(err);\n return;\n }\n\n evaluateAsync(gen, val => cb(undefined, val), err => cb(err));\n },\n };\n return fns;\n}", "function makeFunctionAPI(genFn) {\n const fns = {\n sync: function(...args) {\n return evaluateSync(genFn.apply(this, args));\n },\n async: function(...args) {\n return new Promise((resolve, reject) => {\n evaluateAsync(genFn.apply(this, args), resolve, reject);\n });\n },\n errback: function(...args) {\n const cb = args.pop();\n if (typeof cb !== \"function\") {\n throw makeError(\n \"Asynchronous function called without callback\",\n GENSYNC_ERRBACK_NO_CALLBACK\n );\n }\n\n let gen;\n try {\n gen = genFn.apply(this, args);\n } catch (err) {\n cb(err);\n return;\n }\n\n evaluateAsync(gen, val => cb(undefined, val), err => cb(err));\n },\n };\n return fns;\n}", "function makeFunctionAPI(genFn) {\n const fns = {\n sync: function(...args) {\n return evaluateSync(genFn.apply(this, args));\n },\n async: function(...args) {\n return new Promise((resolve, reject) => {\n evaluateAsync(genFn.apply(this, args), resolve, reject);\n });\n },\n errback: function(...args) {\n const cb = args.pop();\n if (typeof cb !== \"function\") {\n throw makeError(\n \"Asynchronous function called without callback\",\n GENSYNC_ERRBACK_NO_CALLBACK\n );\n }\n\n let gen;\n try {\n gen = genFn.apply(this, args);\n } catch (err) {\n cb(err);\n return;\n }\n\n evaluateAsync(gen, val => cb(undefined, val), err => cb(err));\n },\n };\n return fns;\n}", "function wrap(func) {\n if (func instanceof Function) {\n if (func.constructor.name === 'GeneratorFunction') {\n return asyncAdapter(func);\n }\n return func;\n }\n return null;\n }", "function SPromise(func){\n\t\t// simple/super/speedy/synchronous promise\n\t\tvar retVal, stage=0, thenFuncs = null, catchFuncs = null, finallies = null, retObj = new SPromise_construct(\n\t\t\tfunction(tFunc, cFunc){\n\t\t\t\tif (DEBUGMODE){\n\t\t\t\t\tif (tFunc != undefined && typeof tFunc !== \"function\"){\n\t\t\t\t\t\tconsole.warn(Object.prototype.toString.call(tFunc) + \" is not a valid function to be called after a successful promise\");\n\t\t\t\t\t}\n\t\t\t\t\tif (cFunc != undefined && typeof cFunc !== \"function\"){\n\t\t\t\t\t\tconsole.warn(Object.prototype.toString.call(cFunc) + \" is not a valid function to be called after a rejected promise\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (stage === 0){\n\t\t\t\t\t// promise has not yet completed...\n\t\t\t\t\treturn _NOCHECK_SPromise(function(accept, reject){\n\t\t\t\t\t\tvar finalAcceptor = typeof tFunc === \"function\" ? function(){accept(tFunc(retVal));} : accept;\n\t\t\t\t\t\tvar finalRejector = typeof cFunc === \"function\" ? function(){reject(cFunc(retVal));} : reject;\n\n\t\t\t\t\t\tif (thenFuncs !== null) {\n\t\t\t\t\t\t\tif (typeof thenFuncs === \"function\") {\n\t\t\t\t\t\t\t\tthenFuncs = [ thenFuncs, finalAcceptor ];\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthenFuncs.push(finalAcceptor);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else thenFuncs = finalAcceptor;\n\n\t\t\t\t\t\tif (catchFuncs !== null) {\n\t\t\t\t\t\t\tif (typeof catchFuncs === \"function\") {\n\t\t\t\t\t\t\t\tcatchFuncs = [ catchFuncs, finalRejector ];\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tcatchFuncs.push(finalRejector);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else catchFuncs = finalRejector;\n\t\t\t\t\t});\n\t\t\t\t} else try {\n\t\t\t\t\treturn stage === 2 ? (\n\t\t\t\t\t\ttypeof tFunc === \"function\" ? _NOCHECK_resolve( tFunc(retVal) ) : undefinedResolve\n\t\t\t\t\t) : (\n\t\t\t\t\t\ttypeof cFunc === \"function\" ? _NOCHECK_reject( cFunc(retVal) ) : undefinedResolve\n\t\t\t\t\t);\n\t\t\t\t} catch(e) {return _NOCHECK_reject(e);}\n\t\t\t},\n\t\t\tfunction(cFunc){\n\t\t\t\tif (DEBUGMODE){\n\t\t\t\t\tif (cFunc != undefined && typeof cFunc !== \"function\"){\n\t\t\t\t\t\tconsole.warn(Object.prototype.toString.call(cFunc) + \" is not a valid function to be called after a rejected promise\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (stage === 0){\n\t\t\t\t\t// promise has not yet completed...\n\t\t\t\t\treturn _NOCHECK_SPromise(function(accept){\n\t\t\t\t\t\tif (catchFuncs !== null) {\n\t\t\t\t\t\t\tif (typeof catchFuncs === \"function\") {\n\t\t\t\t\t\t\t\tcatchFuncs = [ catchFuncs, function(){accept(cFunc(retVal));} ];\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tcatchFuncs.push(function(){accept(cFunc(retVal));});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else catchFuncs = function(){accept(cFunc(retVal));};\n\t\t\t\t\t\tif (thenFuncs !== null) {\n\t\t\t\t\t\t\tif (typeof thenFuncs === \"function\") {\n\t\t\t\t\t\t\t\tthenFuncs = [ thenFuncs, accept ];\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthenFuncs.push(accept);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else thenFuncs = accept;\n\t\t\t\t\t});\n\t\t\t\t} else if (stage === 2) { // if success, then merely propagate the response transparently\n\t\t\t\t\treturn _NOCHECK_resolve(retVal);\n\t\t\t\t} else {\n\t\t\t\t\ttry {\n\t\t\t\t\t\treturn typeof cFunc === \"function\" ? _NOCHECK_resolve( cFunc(retVal) ) : undefinedResolve;\n\t\t\t\t\t} catch(e) {\n\t\t\t\t\t\treturn _NOCHECK_reject(e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction(fFunc){\n\t\t\t\tif (DEBUGMODE){\n\t\t\t\t\tif (fFunc != undefined && typeof fFunc !== \"function\"){\n\t\t\t\t\t\tconsole.warn(Object.prototype.toString.call(fFunc) + \" is not a valid function to be called 'finally' after promise\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (stage === 0) {\n\t\t\t\t\tif (finallies !== null) {\n\t\t\t\t\t\tif (typeof finallies === \"function\") {\n\t\t\t\t\t\t\tfinallies = [ finallies, fFunc ];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tfinallies.push(fFunc);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else finallies = fFunc;\n\t\t\t\t} else try {\n\t\t\t\t\tfFunc();\n\t\t\t\t} catch(e) {\n\t\t\t\t\treturn _NOCHECK_reject(e);\n\t\t\t\t}\n\t\t\t\treturn retObj;\n\t\t\t}\n\t\t);\n\t\t// stage undefined = unfulfilled\n\t\t// stage true = accepted\n\t\t// stage false = rejected\n\n\t\tfunction acceptP(x){\n\t\t\t// This specific order should allow for max GZip compression\n\t\t\tif (stage === 0) {\n\t\t\t\tif (isPromise(x)) {\n\t\t\t\t\tx.then(acceptP, rejectP); // wait for further commitment before resolving. [FYI: this takes a non-compliant shortcut]\n\t\t\t\t} else {\n\t\t\t\t\tretVal = x;\n\t\t\t\t\tstage = 2;\n\t\t\t\t\tif (thenFuncs !== null)\t{\n\t\t\t\t\t\tif (typeof thenFuncs === \"function\") {\n\t\t\t\t\t\t\tthenFuncs(x);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthenFuncs.forEach(proxy, x);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthenFuncs = null;\n\t\t\t\t\t}\n\t\t\t\t\tcatchFuncs = null;\n\t\t\t\t\tif (finallies !== null)\t{\n\t\t\t\t\t\tif (typeof finallies === \"function\") {\n\t\t\t\t\t\t\tfinallies();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tfinallies.forEach(exec);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfinallies = null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfunction rejectP(x){\n\t\t\tif (stage === 0) {\n\t\t\t\tretVal = x;\n\t\t\t\tstage = 1;\n\t\t\t\tif (catchFuncs !== null)\t{\n\t\t\t\t\tif (typeof catchFuncs === \"function\") {\n\t\t\t\t\t\tcatchFuncs(x);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcatchFuncs.forEach(proxy, x);\n\t\t\t\t\t}\n\t\t\t\t\tcatchFuncs = null;\n\t\t\t\t}\n\t\t\t\tthenFuncs = null;\n\t\t\t\tif (finallies !== null)\t{\n\t\t\t\t\tif (typeof finallies === \"function\") {\n\t\t\t\t\t\tfinallies();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfinallies.forEach(exec);\n\t\t\t\t\t}\n\t\t\t\t\tfinallies = null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// synchonously defered stacking allows for super performance\n\t\tif (isInsidePromise === true) {\n\t\t\tpersuadoStack.push(\n\t\t\t\tfunction(){\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfunc(acceptP, rejectP);\n\t\t\t\t\t} catch(e) {\n\t\t\t\t\t\trejectP(e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\t\t\tpStackLength = pStackLength + 1|0;//+= 3;\n\t\t} else {\n\t\t\tpromiseLevel = promiseLevel + 1|0;\n\t\t\tif (isInsidePromise = promiseLevel === promiseBufferLvl){\n\t\t\t\ttry {\n\t\t\t\t\tfunc(acceptP, rejectP);\n\t\t\t\t} catch(e) {\n\t\t\t\t\trejectP(e);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ttry {\n\t\t\t\t\tfunc(acceptP, rejectP);\n\t\t\t\t} catch(e) {\n\t\t\t\t\trejectP(e);\n\t\t\t\t}\n\t\t\t\tif (isInsidePromise === true && promiseLevel === 1) { // if this is the outermost promise\n\t\t\t\t\tresolvePends();\n\t\t\t\t}\n\t\t\t}\n\t\t\tpromiseLevel = promiseLevel - 1|0;\n\t\t}\n\t\treturn retObj;\n\t}", "function asynchronous(fn) {\n return function (done) {\n var returnValue = fn.call(this, done);\n returnValue\n .then(function () {\n done();\n })\n .catch(function (err) {\n done.fail(err);\n });\n $rootScope.$apply();\n return returnValue;\n };\n}", "function doResolve(fn, onFulfilled, onRejected) {\n var done = false;\n try {\n fn(function (value) {\n if (done) return;\n done = true;\n onFulfilled(value);\n }, function (reason) {\n if (done) return;\n done = true;\n onRejected(reason);\n });\n } catch (ex) {\n if (done) return;\n done = true;\n onRejected(ex);\n }\n }", "function wrap(func) {\n if (typeof func === 'function') {\n if (func.constructor.name === 'GeneratorFunction') {\n return asyncAdapter(func);\n }\n return func;\n }\n return null;\n }", "function async(fn, onError) {\r\n return (...args) => {\r\n Promise.resolve(true)\r\n .then(() => {\r\n fn(...args);\r\n })\r\n .catch((error) => {\r\n if (onError) {\r\n onError(error);\r\n }\r\n });\r\n };\r\n}", "function createValidateFunc (func, waitMs = 0) {\n let timer = null\n let lastPendingId = 0\n\n function run (args, doneFunc) {\n const currentPendingId = lastPendingId + 1\n const result = func(...args)\n\n lastPendingId = currentPendingId\n timer = null\n\n if (result && typeof result.then === 'function') {\n result.then((...args) => {\n if (lastPendingId === currentPendingId) {\n doneFunc(...args)\n }\n })\n } else {\n doneFunc(result)\n }\n }\n\n return (args, doneFunc, runImmediately = false) => {\n if (timer) window.clearTimeout(timer)\n\n if (waitMs === null || runImmediately) {\n run(args, doneFunc)\n } else {\n timer = window.setTimeout(() => run(args, doneFunc), waitMs)\n }\n }\n}", "function createValidateFunc (func, waitMs = 0) {\n let timer = null\n let lastPendingId = 0\n\n function run (args, doneFunc) {\n const currentPendingId = lastPendingId + 1\n const result = func(...args)\n\n lastPendingId = currentPendingId\n timer = null\n\n if (result && typeof result.then === 'function') {\n result.then((...args) => {\n if (lastPendingId === currentPendingId) {\n doneFunc(...args)\n }\n })\n } else {\n doneFunc(result)\n }\n }\n\n return (args, doneFunc, runImmediately = false) => {\n if (timer) window.clearTimeout(timer)\n\n if (waitMs === null || runImmediately) {\n run(args, doneFunc)\n } else {\n timer = window.setTimeout(() => run(args, doneFunc), waitMs)\n }\n }\n}", "function f(func, callback) {\n func(callback);\n}", "function promisify(fn) {\n //it must return a function\n //to let defer the execution\n return function() {\n //we need the arguments to feed fn when the time comes\n let args = Array.from(arguments);\n\n //we must return a Promise\n //because this is a promisification\n return new Promise(function(resolve, reject) {\n //call the callback-based function and let be notified\n //when it's finished\n //'this' belongs to the function call,\n //therefore it must be set explicitly.\n fn.call(null, ...args, (err, value) => {\n if (err) {\n reject(err);\n } else {\n resolve(value);\n }\n });\n });\n };\n}", "function sc_makePromise(proc) {\n var isResultReady = false;\n var result = undefined;\n return function() {\n\tif (!isResultReady) {\n\t var tmp = proc();\n\t if (!isResultReady) {\n\t\tisResultReady = true;\n\t\tresult = tmp;\n\t }\n\t}\n\treturn result;\n };\n}", "function doResolve(fn, promise) {\n\t var done = false;\n\t var res = tryCallTwo(fn, function (value) {\n\t if (done) return;\n\t done = true;\n\t resolve(promise, value);\n\t }, function (reason) {\n\t if (done) return;\n\t done = true;\n\t reject(promise, reason);\n\t })\n\t if (!done && res === IS_ERROR) {\n\t done = true;\n\t reject(promise, LAST_ERROR);\n\t }\n\t}", "function doResolve(fn, promise) {\n\t var done = false;\n\t var res = tryCallTwo(fn, function (value) {\n\t if (done) return;\n\t done = true;\n\t resolve(promise, value);\n\t }, function (reason) {\n\t if (done) return;\n\t done = true;\n\t reject(promise, reason);\n\t })\n\t if (!done && res === IS_ERROR) {\n\t done = true;\n\t reject(promise, LAST_ERROR);\n\t }\n\t}", "function doResolve(fn, promise) {\n\t var done = false;\n\t var res = tryCallTwo(fn, function (value) {\n\t if (done) return;\n\t done = true;\n\t resolve(promise, value);\n\t }, function (reason) {\n\t if (done) return;\n\t done = true;\n\t reject(promise, reason);\n\t })\n\t if (!done && res === IS_ERROR) {\n\t done = true;\n\t reject(promise, LAST_ERROR);\n\t }\n\t}", "function doResolve(fn, promise) {\n\t var done = false;\n\t var res = tryCallTwo(fn, function (value) {\n\t if (done) return;\n\t done = true;\n\t resolve(promise, value);\n\t }, function (reason) {\n\t if (done) return;\n\t done = true;\n\t reject(promise, reason);\n\t })\n\t if (!done && res === IS_ERROR) {\n\t done = true;\n\t reject(promise, LAST_ERROR);\n\t }\n\t}" ]
[ "0.68739843", "0.66578454", "0.6600192", "0.6565478", "0.64963", "0.64120704", "0.6393519", "0.63857806", "0.62969637", "0.6258028", "0.6121857", "0.60591346", "0.6023949", "0.6022415", "0.60093975", "0.59958893", "0.59958893", "0.59743434", "0.5956957", "0.5956957", "0.5919374", "0.5896949", "0.5896949", "0.5836206", "0.5819566", "0.5817745", "0.5817745", "0.58045304", "0.5793957", "0.5777466", "0.5777466", "0.5772126", "0.5772126", "0.5772126", "0.5772126", "0.5772126", "0.5772126", "0.5772126", "0.5772126", "0.5772126", "0.577072", "0.57625294", "0.5760785", "0.5760785", "0.5759175", "0.574216", "0.574216", "0.5732906", "0.5732906", "0.57166713", "0.57166713", "0.57166713", "0.57166713", "0.57166713", "0.57166713", "0.57166713", "0.57166713", "0.57166713", "0.57166713", "0.57166713", "0.57166713", "0.57166713", "0.57166713", "0.57166713", "0.57166713", "0.57118607", "0.57118607", "0.57118607", "0.57118607", "0.57118607", "0.57112825", "0.57100827", "0.5704227", "0.57020724", "0.57020724", "0.57020724", "0.5699956", "0.5699324", "0.568822", "0.56868076", "0.56809485", "0.5670556", "0.56696904", "0.56696904", "0.56696904", "0.56696904", "0.5665769", "0.5665453", "0.5652634", "0.5644189", "0.5638075", "0.56375855", "0.5621795", "0.5621795", "0.5620591", "0.5618548", "0.5615991", "0.5615538", "0.5615538", "0.5615538", "0.5615538" ]
0.0
-1
Reuses old values when equal. If anything is unequal, returns newProps asis. Great for PureComponent, but won't be feasible with React, so just eliminate and use React's DOM diffing.
function recycleProps(oldProps, newProps, equalityFuncs) { var comboProps = {}; // some old, some new var anyChanges = false; for (var key in newProps) { if (key in oldProps && (oldProps[key] === newProps[key] || (equalityFuncs[key] && equalityFuncs[key](oldProps[key], newProps[key])))) { // equal to old? use old prop comboProps[key] = oldProps[key]; } else { comboProps[key] = newProps[key]; anyChanges = true; } } for (var key in oldProps) { if (!(key in newProps)) { anyChanges = true; break; } } return { anyChanges: anyChanges, comboProps: comboProps }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function recycleProps(oldProps, newProps, equalityFuncs) {\n var comboProps = {}; // some old, some new\n\n var anyChanges = false;\n\n for (var key in newProps) {\n if (key in oldProps && (oldProps[key] === newProps[key] || equalityFuncs[key] && equalityFuncs[key](oldProps[key], newProps[key]))) {\n // equal to old? use old prop\n comboProps[key] = oldProps[key];\n } else {\n comboProps[key] = newProps[key];\n anyChanges = true;\n }\n }\n\n for (var key in oldProps) {\n if (!(key in newProps)) {\n anyChanges = true;\n break;\n }\n }\n\n return {\n anyChanges: anyChanges,\n comboProps: comboProps\n };\n }", "function recycleProps(oldProps, newProps, equalityFuncs) {\n var comboProps = {}; // some old, some new\n\n var anyChanges = false;\n\n for (var key in newProps) {\n if (key in oldProps && (oldProps[key] === newProps[key] || equalityFuncs[key] && equalityFuncs[key](oldProps[key], newProps[key]))) {\n // equal to old? use old prop\n comboProps[key] = oldProps[key];\n } else {\n comboProps[key] = newProps[key];\n anyChanges = true;\n }\n }\n\n for (var key in oldProps) {\n if (!(key in newProps)) {\n anyChanges = true;\n break;\n }\n }\n\n return {\n anyChanges: anyChanges,\n comboProps: comboProps\n };\n }", "function recycleProps(oldProps, newProps, equalityFuncs) {\n var comboProps = {}; // some old, some new\n var anyChanges = false;\n for (var key in newProps) {\n if (key in oldProps && (oldProps[key] === newProps[key] ||\n (equalityFuncs[key] && equalityFuncs[key](oldProps[key], newProps[key])))) {\n // equal to old? use old prop\n comboProps[key] = oldProps[key];\n }\n else {\n comboProps[key] = newProps[key];\n anyChanges = true;\n }\n }\n for (var key in oldProps) {\n if (!(key in newProps)) {\n anyChanges = true;\n break;\n }\n }\n return { anyChanges: anyChanges, comboProps: comboProps };\n}", "function recycleProps$1(oldProps, newProps, equalityFuncs) {\n var comboProps = {}; // some old, some new\n var anyChanges = false;\n for (var key in newProps) {\n if (key in oldProps && (oldProps[key] === newProps[key] ||\n (equalityFuncs[key] && equalityFuncs[key](oldProps[key], newProps[key])))) {\n // equal to old? use old prop\n comboProps[key] = oldProps[key];\n }\n else {\n comboProps[key] = newProps[key];\n anyChanges = true;\n }\n }\n for (var key in oldProps) {\n if (!(key in newProps)) {\n anyChanges = true;\n break;\n }\n }\n return { anyChanges: anyChanges, comboProps: comboProps };\n }", "diffProps(newProps, oldProps) {\n const changeFlags = diffProps(newProps, oldProps);\n\n // iterate over changedTriggers\n if (changeFlags.updateTriggersChanged) {\n for (const key in changeFlags.updateTriggersChanged) {\n if (changeFlags.updateTriggersChanged[key]) {\n this.invalidateAttribute(key);\n }\n }\n }\n\n // trigger uniform transitions\n if (changeFlags.transitionsChanged) {\n for (const key in changeFlags.transitionsChanged) {\n // prop changed and transition is enabled\n this.internalState.uniformTransitions.add(\n key,\n oldProps[key],\n newProps[key],\n newProps.transitions[key]\n );\n }\n }\n\n return this.setChangeFlags(changeFlags);\n }", "function areEqual(prevProps, nextProps) {\n var prevStyle = prevProps.style,\n prevRest = (0,objectWithoutPropertiesLoose/* default */.Z)(prevProps, [\"style\"]);\n\n var nextStyle = nextProps.style,\n nextRest = (0,objectWithoutPropertiesLoose/* default */.Z)(nextProps, [\"style\"]);\n\n return !shallowDiffers(prevStyle, nextStyle) && !shallowDiffers(prevRest, nextRest);\n}", "function diffDataProps(props, oldProps) {\n if (oldProps === null) {\n return 'oldProps is null, initial diff';\n }\n\n // Support optional app defined comparison of data\n var dataComparator = props.dataComparator;\n\n if (dataComparator) {\n if (!dataComparator(props.data, oldProps.data)) {\n return 'Data comparator detected a change';\n }\n // Otherwise, do a shallow equal on props\n } else if (props.data !== oldProps.data) {\n return 'A new data container was supplied';\n }\n\n return null;\n}", "shouldComponentUpdate(newProps, newState) {\n return (\n (JSON.stringify(this.state) != JSON.stringify(newState))\n || (JSON.stringify(this.props)) != JSON.stringify(newProps)\n );\n }", "function noChange(oldProps, newProps){\n let hoverDelta = oldProps.node.hovering !== newProps.node.hovering\n let draggingDelta = oldProps.node.dragging !== newProps.node.dragging\n let openDelta = oldProps.node.open !== newProps.node.open\n return(hoverDelta || draggingDelta || openDelta)\n}", "compareNewSettings(props) {\n const newSettings = extractSettings(props);\n const cell0 =\n this.settings &&\n this.settings.data &&\n this.settings.data[0][0] != newSettings.data[0][0];\n\n let changedSettings = {};\n if (this.settings) {\n Object.entries(newSettings).forEach(([k, v]) => {\n if (!isEqual(v, this.settings[k])) {\n this.settings[k] = v;\n changedSettings[k] = v;\n }\n });\n }\n if (Object.keys(changedSettings).length < 1) {\n changedSettings = false;\n }\n\n return {\n settings: changedSettings,\n cell0,\n };\n }", "function arePropsEqual(props, prevProps) {\n return _.isEqualWith(props, prevProps, _.after(2, (p1, p2, key) => {\n return (_.isFunction(p1) || _.isFunction(p2) || React.isValidElement(p1) || React.isValidElement(p2) ||\n _.includes(excludedProps, key)) ? true : undefined;\n }));\n}", "function shallowCompare(instance,nextProps,nextState){return!shallowEqual(instance.props,nextProps)||!shallowEqual(instance.state,nextState);}", "componentWillReceiveProps(nextProps) {\n this.setState({\n modified: !_.isEqual(this.state.initialValues, nextProps.values),\n });\n }", "static updated (elem, previousProps) {\n // The 'previousProps' will be undefined if it is the initial render.\n if (!previousProps) {\n return true;\n }\n\n // The 'previousProps' will always contain all of the keys.\n //\n // Use classic loop because:\n // 'for ... in' skips symbols and 'for ... of' is not working yet with IE!?\n // for (let nameOrSymbol of getPropNamesAndSymbols(previousProps)) {\n const namesAndSymbols = getPropNamesAndSymbols(previousProps);\n for (let i = 0; i < namesAndSymbols.length; i++) {\n const nameOrSymbol = namesAndSymbols[i];\n\n // With Object.is NaN is equal to NaN\n if (!objectIs(previousProps[nameOrSymbol], elem[nameOrSymbol])) {\n return true;\n }\n }\n\n return false;\n }", "static updated (elem, previousProps) {\n // The 'previousProps' will be undefined if it is the initial render.\n if (!previousProps) {\n return true;\n }\n\n // The 'previousProps' will always contain all of the keys.\n //\n // Use classic loop because:\n // 'for ... in' skips symbols and 'for ... of' is not working yet with IE!?\n // for (let nameOrSymbol of getPropNamesAndSymbols(previousProps)) {\n const namesAndSymbols = getPropNamesAndSymbols(previousProps);\n for (let i = 0; i < namesAndSymbols.length; i++) {\n const nameOrSymbol = namesAndSymbols[i];\n\n // With Object.is NaN is equal to NaN\n if (!objectIs(previousProps[nameOrSymbol], elem[nameOrSymbol])) {\n return true;\n }\n }\n\n return false;\n }", "shouldComponentUpdate(newProps) {\n return this.props.patientID !== newProps.patientID;\n // return true;\n }", "prepareUpdate(instance, type, oldProps, newProps, rootContainerInstance, hostContext) {\n log('TODO: prepareUpdate');\n //return null;\n //return diffProperties(instance, type, oldProps, newProps, rootContainerInstance, hostContext);\n return newProps;\n }", "shouldComponentUpdate(nextProps, nextState) {\n return JSON.stringify(nextProps) !== JSON.stringify(this.props);\n }", "update(props, oldProps) {\n\n // Example of how to update based on new props\n if (props.r !== oldProps) {\n this.circle.attr('r', props.r)\n }\n }", "shouldComponentUpdate(nextProps, nextState) {\n if (this.props.color !== nextProps.color) {\n return true;\n }\n if (this.props.hp !== nextProps.hp) {\n return true;\n }\n if (this.props.children !== nextProps.children) {\n return true;\n }\n return false;\n }", "componentWillUpdate(nextProps) {\n if (this.props.value !== nextProps.value) {\n this.setState({ value: this.props.value });\n }\n }", "shouldComponentUpdate(nextProps) {\n return !isEqual(this.props, nextProps);\n }", "shouldComponentUpdate(nextProps, nextState) {\n return shallowCompare(this, nextProps, nextState);\n }", "shouldComponentUpdate(nextProps, nextState) {\n // This guards against re-rendering before calls to the data sever alter the\n // state\n // TODO: Consider making shallow comparisons. Deep ones are expensive.\n // If immutable data objects are used (or functionally equivalently,\n // new data objects each time), then shallow comparison works.\n return !(\n _.isEqual(nextProps.meta, this.props.meta) &&\n _.isEqual(nextProps.area, this.props.area)\n );\n }", "shouldComponentUpdate(nextProps, nextState) {\n if (this.props != nextProps) {\n return true;\n }\n\n return false;\n }", "shouldComponentUpdate(nextProps, nextState) {\n if (this.props != nextProps) {\n return true;\n }\n\n return false;\n }", "shouldComponentUpdate(nextProps, nextState) {\n if (this.props != nextProps) {\n return true;\n }\n\n return false;\n }", "shouldComponentUpdate(nextProps, nextState) {\n\t\treturn JSON.stringify(nextProps) !== JSON.stringify(this.props);\n\t}", "function shallowCompare(instance, nextProps, nextState) {\n\t\t return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState);\n\t\t}", "shouldComponentUpdate(props, state) {\n return !reactEqual(this.props, props) || !reactEqual(this.state, state)\n }", "shouldComponentUpdate(nextProps, nextState) {\n if (this.props !== nextProps) {\n return true;\n }\n\n return false;\n }", "shouldComponentUpdate(nextProps, nextState) {\n if (this.props !== nextProps) {\n return true;\n }\n\n return false;\n }", "shouldComponentUpdate(nextProps, nextState) {\n if (this.props !== nextProps) {\n return true;\n }\n\n return false;\n }", "shouldComponentUpdate (nextProps, nextState) {\n const { props, state } = this\n\n // respect the case when user prohibits updates\n if (\n super.shouldComponentUpdate &&\n !super.shouldComponentUpdate(nextProps, nextState)\n ) {\n return false\n }\n\n // return true if it is a reactive render\n if (state.counter !== nextState.counter) {\n return true\n }\n\n // the component should update if any of its props shallowly changed value\n const keys = Object.keys(props)\n const nextKeys = Object.keys(nextProps)\n return (\n nextKeys.length !== keys.length ||\n nextKeys.some(key => props[key] !== nextProps[key])\n )\n }", "shouldComponentUpdate(nextProps, nextState) {\n\t\t// Check if the new props/state are different the current props/state\n\t\tif (!nextProps.coursesCntr.equals(this.props.coursesCntr)) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif (!nextProps.authors.equals(this.props.authors)) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif (nextProps.loading !== this.props.loading) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif (!nextProps.modalData.equals(this.props.modalData)) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif (!objectsMatch(nextState, this.state)) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "shouldComponentUpdate(nextProps) {\n const nonPointsAreEqual = Object.keys(propTypes).every(\n // eslint-disable-next-line react/destructuring-assignment\n prop => prop === 'points' || this.props[prop] === nextProps[prop],\n );\n const { points } = this.props;\n const pointsAreEqual =\n nextProps.points.length === points.length &&\n nextProps.points.every(point => points.indexOf(point) > -1);\n\n return !(pointsAreEqual && nonPointsAreEqual);\n }", "shouldComponentUpdate(nextProps, nextState) {\n return !_.isEqual(this.state, nextState) || !_.isEqual(this.props, nextProps);\n }", "function shallowCompare(instance, nextProps, nextState) {\n\t\t\treturn !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState);\n\t\t}", "shouldComponentUpdate(newProps) {\n let componentShouldUpdate = false;\n\n if (this.props.polls && newProps.polls) {\n if (this.props.polls.length !== newProps.polls.length) {\n return true;\n }\n\n this.props.polls.map((poll, key) => {\n if (poll._id !== newProps.polls[key]._id) {\n componentShouldUpdate = true;\n }\n });\n } else {\n return true;\n }\n\n return componentShouldUpdate;\n }", "shouldComponentUpdate(nextProps, nextState) {\n return this.props !== nextProps; //check if props have changed\n }", "function shouldComponentUpdate(nextProps, nextState) {\n\t return !shallowEqual(this.props, nextProps) || !shallowEqual(this.state, nextState);\n\t}", "function shouldComponentUpdate(nextProps, nextState) {\n\t return !shallowEqual(this.props, nextProps) || !shallowEqual(this.state, nextState);\n\t}", "shouldComponentUpdate(nextProps, nextState) {\n const {\n creature,\n active,\n focused,\n round,\n } = this.props;\n\n const {\n expanded,\n } = this.state;\n\n const shouldUpdate = JSON.stringify(nextProps.creature) !== JSON.stringify(creature)\n || nextProps.active !== active\n || nextProps.focused !== focused\n || nextState.expanded !== expanded\n || nextProps.round !== round;\n\n return shouldUpdate;\n }", "shouldComponentUpdate(nextProps) {\n return !isEqual(nextProps.data, this.props.data);\n }", "function shallowCompare(instance, nextProps, nextState) {\n\t return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState);\n\t}", "function shallowCompare(instance, nextProps, nextState) {\n\t return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState);\n\t}", "function shallowCompare(instance, nextProps, nextState) {\n\t return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState);\n\t}", "function shallowCompare(instance, nextProps, nextState) {\n\t return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState);\n\t}", "function shallowCompare(instance, nextProps, nextState) {\n\t return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState);\n\t}", "function shallowCompare(instance, nextProps, nextState) {\n\t return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState);\n\t}", "function shallowCompare(instance, nextProps, nextState) {\n\t return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState);\n\t}", "function shallowCompare(instance, nextProps, nextState) {\n\t return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState);\n\t}", "function shallowCompare(instance, nextProps, nextState) {\n\t return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState);\n\t}", "function shallowCompare(instance, nextProps, nextState) {\n\t return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState);\n\t}", "function shallowCompare(instance, nextProps, nextState) {\n\t return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState);\n\t}", "function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {\n {\n validatePropertiesInDevelopment(tag, nextRawProps);\n }\n\n var updatePayload = null;\n\n var lastProps = void 0;\n var nextProps = void 0;\n switch (tag) {\n case 'input':\n lastProps = getHostProps(domElement, lastRawProps);\n nextProps = getHostProps(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'option':\n lastProps = getHostProps$1(domElement, lastRawProps);\n nextProps = getHostProps$1(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'select':\n lastProps = getHostProps$2(domElement, lastRawProps);\n nextProps = getHostProps$2(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'textarea':\n lastProps = getHostProps$3(domElement, lastRawProps);\n nextProps = getHostProps$3(domElement, nextRawProps);\n updatePayload = [];\n break;\n default:\n lastProps = lastRawProps;\n nextProps = nextRawProps;\n if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(domElement);\n }\n break;\n }\n\n assertValidProps(tag, nextProps);\n\n var propKey = void 0;\n var styleName = void 0;\n var styleUpdates = null;\n for (propKey in lastProps) {\n if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {\n continue;\n }\n if (propKey === STYLE$1) {\n var lastStyle = lastProps[propKey];\n for (styleName in lastStyle) {\n if (lastStyle.hasOwnProperty(styleName)) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) {\n // Noop. This is handled by the clear text mechanism.\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (propKey === AUTOFOCUS) {\n // Noop. It doesn't work on updates anyway.\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" fiber pointer gets updated so we need a commit\n // to update this element.\n if (!updatePayload) {\n updatePayload = [];\n }\n } else {\n // For all other deleted properties we add it to the queue. We use\n // the whitelist in the commit phase instead.\n (updatePayload = updatePayload || []).push(propKey, null);\n }\n }\n for (propKey in nextProps) {\n var nextProp = nextProps[propKey];\n var lastProp = lastProps != null ? lastProps[propKey] : undefined;\n if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {\n continue;\n }\n if (propKey === STYLE$1) {\n {\n if (nextProp) {\n // Freeze the next style object so that we can assume it won't be\n // mutated. We have already warned for this in the past.\n Object.freeze(nextProp);\n }\n }\n if (lastProp) {\n // Unset styles on `lastProp` but not on `nextProp`.\n for (styleName in lastProp) {\n if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n // Update styles that changed since `lastProp`.\n for (styleName in nextProp) {\n if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = nextProp[styleName];\n }\n }\n } else {\n // Relies on `updateStylesByID` not mutating `styleUpdates`.\n if (!styleUpdates) {\n if (!updatePayload) {\n updatePayload = [];\n }\n updatePayload.push(propKey, styleUpdates);\n }\n styleUpdates = nextProp;\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n var nextHtml = nextProp ? nextProp[HTML] : undefined;\n var lastHtml = lastProp ? lastProp[HTML] : undefined;\n if (nextHtml != null) {\n if (lastHtml !== nextHtml) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextHtml);\n }\n } else {\n // TODO: It might be too late to clear this if we have children\n // inserted already.\n }\n } else if (propKey === CHILDREN) {\n if (lastProp !== nextProp && (typeof nextProp === 'string' || typeof nextProp === 'number')) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextProp);\n }\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n // We eagerly listen to this even though we haven't committed yet.\n if ( true && typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n ensureListeningTo(rootContainerElement, propKey);\n }\n if (!updatePayload && lastProp !== nextProp) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" props pointer gets updated so we need a commit\n // to update this element.\n updatePayload = [];\n }\n } else {\n // For any other property we always add it to the queue and then we\n // filter it out using the whitelist during the commit.\n (updatePayload = updatePayload || []).push(propKey, nextProp);\n }\n }\n if (styleUpdates) {\n (updatePayload = updatePayload || []).push(STYLE$1, styleUpdates);\n }\n return updatePayload;\n}", "function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {\n {\n validatePropertiesInDevelopment(tag, nextRawProps);\n }\n\n var updatePayload = null;\n\n var lastProps = void 0;\n var nextProps = void 0;\n switch (tag) {\n case 'input':\n lastProps = getHostProps(domElement, lastRawProps);\n nextProps = getHostProps(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'option':\n lastProps = getHostProps$1(domElement, lastRawProps);\n nextProps = getHostProps$1(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'select':\n lastProps = getHostProps$2(domElement, lastRawProps);\n nextProps = getHostProps$2(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'textarea':\n lastProps = getHostProps$3(domElement, lastRawProps);\n nextProps = getHostProps$3(domElement, nextRawProps);\n updatePayload = [];\n break;\n default:\n lastProps = lastRawProps;\n nextProps = nextRawProps;\n if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(domElement);\n }\n break;\n }\n\n assertValidProps(tag, nextProps);\n\n var propKey = void 0;\n var styleName = void 0;\n var styleUpdates = null;\n for (propKey in lastProps) {\n if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {\n continue;\n }\n if (propKey === STYLE$1) {\n var lastStyle = lastProps[propKey];\n for (styleName in lastStyle) {\n if (lastStyle.hasOwnProperty(styleName)) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) {\n // Noop. This is handled by the clear text mechanism.\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (propKey === AUTOFOCUS) {\n // Noop. It doesn't work on updates anyway.\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" fiber pointer gets updated so we need a commit\n // to update this element.\n if (!updatePayload) {\n updatePayload = [];\n }\n } else {\n // For all other deleted properties we add it to the queue. We use\n // the whitelist in the commit phase instead.\n (updatePayload = updatePayload || []).push(propKey, null);\n }\n }\n for (propKey in nextProps) {\n var nextProp = nextProps[propKey];\n var lastProp = lastProps != null ? lastProps[propKey] : undefined;\n if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {\n continue;\n }\n if (propKey === STYLE$1) {\n {\n if (nextProp) {\n // Freeze the next style object so that we can assume it won't be\n // mutated. We have already warned for this in the past.\n Object.freeze(nextProp);\n }\n }\n if (lastProp) {\n // Unset styles on `lastProp` but not on `nextProp`.\n for (styleName in lastProp) {\n if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n // Update styles that changed since `lastProp`.\n for (styleName in nextProp) {\n if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = nextProp[styleName];\n }\n }\n } else {\n // Relies on `updateStylesByID` not mutating `styleUpdates`.\n if (!styleUpdates) {\n if (!updatePayload) {\n updatePayload = [];\n }\n updatePayload.push(propKey, styleUpdates);\n }\n styleUpdates = nextProp;\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n var nextHtml = nextProp ? nextProp[HTML] : undefined;\n var lastHtml = lastProp ? lastProp[HTML] : undefined;\n if (nextHtml != null) {\n if (lastHtml !== nextHtml) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextHtml);\n }\n } else {\n // TODO: It might be too late to clear this if we have children\n // inserted already.\n }\n } else if (propKey === CHILDREN) {\n if (lastProp !== nextProp && (typeof nextProp === 'string' || typeof nextProp === 'number')) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextProp);\n }\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n // We eagerly listen to this even though we haven't committed yet.\n if ( true && typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n ensureListeningTo(rootContainerElement, propKey);\n }\n if (!updatePayload && lastProp !== nextProp) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" props pointer gets updated so we need a commit\n // to update this element.\n updatePayload = [];\n }\n } else {\n // For any other property we always add it to the queue and then we\n // filter it out using the whitelist during the commit.\n (updatePayload = updatePayload || []).push(propKey, nextProp);\n }\n }\n if (styleUpdates) {\n {\n validateShorthandPropertyCollisionInDev(styleUpdates, nextProps[STYLE$1]);\n }\n (updatePayload = updatePayload || []).push(STYLE$1, styleUpdates);\n }\n return updatePayload;\n}", "function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {\n {\n validatePropertiesInDevelopment(tag, nextRawProps);\n }\n\n var updatePayload = null;\n\n var lastProps = void 0;\n var nextProps = void 0;\n switch (tag) {\n case 'input':\n lastProps = getHostProps(domElement, lastRawProps);\n nextProps = getHostProps(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'option':\n lastProps = getHostProps$1(domElement, lastRawProps);\n nextProps = getHostProps$1(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'select':\n lastProps = getHostProps$2(domElement, lastRawProps);\n nextProps = getHostProps$2(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'textarea':\n lastProps = getHostProps$3(domElement, lastRawProps);\n nextProps = getHostProps$3(domElement, nextRawProps);\n updatePayload = [];\n break;\n default:\n lastProps = lastRawProps;\n nextProps = nextRawProps;\n if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(domElement);\n }\n break;\n }\n\n assertValidProps(tag, nextProps);\n\n var propKey = void 0;\n var styleName = void 0;\n var styleUpdates = null;\n for (propKey in lastProps) {\n if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {\n continue;\n }\n if (propKey === STYLE$1) {\n var lastStyle = lastProps[propKey];\n for (styleName in lastStyle) {\n if (lastStyle.hasOwnProperty(styleName)) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) {\n // Noop. This is handled by the clear text mechanism.\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (propKey === AUTOFOCUS) {\n // Noop. It doesn't work on updates anyway.\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" fiber pointer gets updated so we need a commit\n // to update this element.\n if (!updatePayload) {\n updatePayload = [];\n }\n } else {\n // For all other deleted properties we add it to the queue. We use\n // the whitelist in the commit phase instead.\n (updatePayload = updatePayload || []).push(propKey, null);\n }\n }\n for (propKey in nextProps) {\n var nextProp = nextProps[propKey];\n var lastProp = lastProps != null ? lastProps[propKey] : undefined;\n if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {\n continue;\n }\n if (propKey === STYLE$1) {\n {\n if (nextProp) {\n // Freeze the next style object so that we can assume it won't be\n // mutated. We have already warned for this in the past.\n Object.freeze(nextProp);\n }\n }\n if (lastProp) {\n // Unset styles on `lastProp` but not on `nextProp`.\n for (styleName in lastProp) {\n if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n // Update styles that changed since `lastProp`.\n for (styleName in nextProp) {\n if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = nextProp[styleName];\n }\n }\n } else {\n // Relies on `updateStylesByID` not mutating `styleUpdates`.\n if (!styleUpdates) {\n if (!updatePayload) {\n updatePayload = [];\n }\n updatePayload.push(propKey, styleUpdates);\n }\n styleUpdates = nextProp;\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n var nextHtml = nextProp ? nextProp[HTML] : undefined;\n var lastHtml = lastProp ? lastProp[HTML] : undefined;\n if (nextHtml != null) {\n if (lastHtml !== nextHtml) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextHtml);\n }\n } else {\n // TODO: It might be too late to clear this if we have children\n // inserted already.\n }\n } else if (propKey === CHILDREN) {\n if (lastProp !== nextProp && (typeof nextProp === 'string' || typeof nextProp === 'number')) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextProp);\n }\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n // We eagerly listen to this even though we haven't committed yet.\n if (true && typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n ensureListeningTo(rootContainerElement, propKey);\n }\n if (!updatePayload && lastProp !== nextProp) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" props pointer gets updated so we need a commit\n // to update this element.\n updatePayload = [];\n }\n } else {\n // For any other property we always add it to the queue and then we\n // filter it out using the whitelist during the commit.\n (updatePayload = updatePayload || []).push(propKey, nextProp);\n }\n }\n if (styleUpdates) {\n (updatePayload = updatePayload || []).push(STYLE$1, styleUpdates);\n }\n return updatePayload;\n}", "function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {\n {\n validatePropertiesInDevelopment(tag, nextRawProps);\n }\n\n var updatePayload = null;\n\n var lastProps = void 0;\n var nextProps = void 0;\n switch (tag) {\n case 'input':\n lastProps = getHostProps(domElement, lastRawProps);\n nextProps = getHostProps(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'option':\n lastProps = getHostProps$1(domElement, lastRawProps);\n nextProps = getHostProps$1(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'select':\n lastProps = getHostProps$2(domElement, lastRawProps);\n nextProps = getHostProps$2(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'textarea':\n lastProps = getHostProps$3(domElement, lastRawProps);\n nextProps = getHostProps$3(domElement, nextRawProps);\n updatePayload = [];\n break;\n default:\n lastProps = lastRawProps;\n nextProps = nextRawProps;\n if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(domElement);\n }\n break;\n }\n\n assertValidProps(tag, nextProps);\n\n var propKey = void 0;\n var styleName = void 0;\n var styleUpdates = null;\n for (propKey in lastProps) {\n if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {\n continue;\n }\n if (propKey === STYLE$1) {\n var lastStyle = lastProps[propKey];\n for (styleName in lastStyle) {\n if (lastStyle.hasOwnProperty(styleName)) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) {\n // Noop. This is handled by the clear text mechanism.\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (propKey === AUTOFOCUS) {\n // Noop. It doesn't work on updates anyway.\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" fiber pointer gets updated so we need a commit\n // to update this element.\n if (!updatePayload) {\n updatePayload = [];\n }\n } else {\n // For all other deleted properties we add it to the queue. We use\n // the whitelist in the commit phase instead.\n (updatePayload = updatePayload || []).push(propKey, null);\n }\n }\n for (propKey in nextProps) {\n var nextProp = nextProps[propKey];\n var lastProp = lastProps != null ? lastProps[propKey] : undefined;\n if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {\n continue;\n }\n if (propKey === STYLE$1) {\n {\n if (nextProp) {\n // Freeze the next style object so that we can assume it won't be\n // mutated. We have already warned for this in the past.\n Object.freeze(nextProp);\n }\n }\n if (lastProp) {\n // Unset styles on `lastProp` but not on `nextProp`.\n for (styleName in lastProp) {\n if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n // Update styles that changed since `lastProp`.\n for (styleName in nextProp) {\n if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = nextProp[styleName];\n }\n }\n } else {\n // Relies on `updateStylesByID` not mutating `styleUpdates`.\n if (!styleUpdates) {\n if (!updatePayload) {\n updatePayload = [];\n }\n updatePayload.push(propKey, styleUpdates);\n }\n styleUpdates = nextProp;\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n var nextHtml = nextProp ? nextProp[HTML] : undefined;\n var lastHtml = lastProp ? lastProp[HTML] : undefined;\n if (nextHtml != null) {\n if (lastHtml !== nextHtml) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextHtml);\n }\n } else {\n // TODO: It might be too late to clear this if we have children\n // inserted already.\n }\n } else if (propKey === CHILDREN) {\n if (lastProp !== nextProp && (typeof nextProp === 'string' || typeof nextProp === 'number')) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextProp);\n }\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n // We eagerly listen to this even though we haven't committed yet.\n if (true && typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n ensureListeningTo(rootContainerElement, propKey);\n }\n if (!updatePayload && lastProp !== nextProp) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" props pointer gets updated so we need a commit\n // to update this element.\n updatePayload = [];\n }\n } else {\n // For any other property we always add it to the queue and then we\n // filter it out using the whitelist during the commit.\n (updatePayload = updatePayload || []).push(propKey, nextProp);\n }\n }\n if (styleUpdates) {\n {\n validateShorthandPropertyCollisionInDev(styleUpdates, nextProps[STYLE$1]);\n }\n (updatePayload = updatePayload || []).push(STYLE$1, styleUpdates);\n }\n return updatePayload;\n}", "function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {\n {\n validatePropertiesInDevelopment(tag, nextRawProps);\n }\n\n var updatePayload = null;\n\n var lastProps = void 0;\n var nextProps = void 0;\n switch (tag) {\n case 'input':\n lastProps = getHostProps(domElement, lastRawProps);\n nextProps = getHostProps(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'option':\n lastProps = getHostProps$1(domElement, lastRawProps);\n nextProps = getHostProps$1(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'select':\n lastProps = getHostProps$2(domElement, lastRawProps);\n nextProps = getHostProps$2(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'textarea':\n lastProps = getHostProps$3(domElement, lastRawProps);\n nextProps = getHostProps$3(domElement, nextRawProps);\n updatePayload = [];\n break;\n default:\n lastProps = lastRawProps;\n nextProps = nextRawProps;\n if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(domElement);\n }\n break;\n }\n\n assertValidProps(tag, nextProps);\n\n var propKey = void 0;\n var styleName = void 0;\n var styleUpdates = null;\n for (propKey in lastProps) {\n if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {\n continue;\n }\n if (propKey === STYLE$1) {\n var lastStyle = lastProps[propKey];\n for (styleName in lastStyle) {\n if (lastStyle.hasOwnProperty(styleName)) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) {\n // Noop. This is handled by the clear text mechanism.\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (propKey === AUTOFOCUS) {\n // Noop. It doesn't work on updates anyway.\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" fiber pointer gets updated so we need a commit\n // to update this element.\n if (!updatePayload) {\n updatePayload = [];\n }\n } else {\n // For all other deleted properties we add it to the queue. We use\n // the whitelist in the commit phase instead.\n (updatePayload = updatePayload || []).push(propKey, null);\n }\n }\n for (propKey in nextProps) {\n var nextProp = nextProps[propKey];\n var lastProp = lastProps != null ? lastProps[propKey] : undefined;\n if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {\n continue;\n }\n if (propKey === STYLE$1) {\n {\n if (nextProp) {\n // Freeze the next style object so that we can assume it won't be\n // mutated. We have already warned for this in the past.\n Object.freeze(nextProp);\n }\n }\n if (lastProp) {\n // Unset styles on `lastProp` but not on `nextProp`.\n for (styleName in lastProp) {\n if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n // Update styles that changed since `lastProp`.\n for (styleName in nextProp) {\n if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = nextProp[styleName];\n }\n }\n } else {\n // Relies on `updateStylesByID` not mutating `styleUpdates`.\n if (!styleUpdates) {\n if (!updatePayload) {\n updatePayload = [];\n }\n updatePayload.push(propKey, styleUpdates);\n }\n styleUpdates = nextProp;\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n var nextHtml = nextProp ? nextProp[HTML] : undefined;\n var lastHtml = lastProp ? lastProp[HTML] : undefined;\n if (nextHtml != null) {\n if (lastHtml !== nextHtml) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextHtml);\n }\n } else {\n // TODO: It might be too late to clear this if we have children\n // inserted already.\n }\n } else if (propKey === CHILDREN) {\n if (lastProp !== nextProp && (typeof nextProp === 'string' || typeof nextProp === 'number')) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextProp);\n }\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n // We eagerly listen to this even though we haven't committed yet.\n if ( true && typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n ensureListeningTo(rootContainerElement, propKey);\n }\n if (!updatePayload && lastProp !== nextProp) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" props pointer gets updated so we need a commit\n // to update this element.\n updatePayload = [];\n }\n } else {\n // For any other property we always add it to the queue and then we\n // filter it out using the whitelist during the commit.\n (updatePayload = updatePayload || []).push(propKey, nextProp);\n }\n }\n if (styleUpdates) {\n {\n validateShorthandPropertyCollisionInDev(styleUpdates, nextProps[STYLE$1]);\n }\n (updatePayload = updatePayload || []).push(STYLE$1, styleUpdates);\n }\n return updatePayload;\n}", "function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {\n {\n validatePropertiesInDevelopment(tag, nextRawProps);\n }\n\n var updatePayload = null;\n\n var lastProps = void 0;\n var nextProps = void 0;\n switch (tag) {\n case 'input':\n lastProps = getHostProps(domElement, lastRawProps);\n nextProps = getHostProps(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'option':\n lastProps = getHostProps$1(domElement, lastRawProps);\n nextProps = getHostProps$1(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'select':\n lastProps = getHostProps$2(domElement, lastRawProps);\n nextProps = getHostProps$2(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'textarea':\n lastProps = getHostProps$3(domElement, lastRawProps);\n nextProps = getHostProps$3(domElement, nextRawProps);\n updatePayload = [];\n break;\n default:\n lastProps = lastRawProps;\n nextProps = nextRawProps;\n if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(domElement);\n }\n break;\n }\n\n assertValidProps(tag, nextProps);\n\n var propKey = void 0;\n var styleName = void 0;\n var styleUpdates = null;\n for (propKey in lastProps) {\n if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {\n continue;\n }\n if (propKey === STYLE$1) {\n var lastStyle = lastProps[propKey];\n for (styleName in lastStyle) {\n if (lastStyle.hasOwnProperty(styleName)) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) {\n // Noop. This is handled by the clear text mechanism.\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (propKey === AUTOFOCUS) {\n // Noop. It doesn't work on updates anyway.\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" fiber pointer gets updated so we need a commit\n // to update this element.\n if (!updatePayload) {\n updatePayload = [];\n }\n } else {\n // For all other deleted properties we add it to the queue. We use\n // the whitelist in the commit phase instead.\n (updatePayload = updatePayload || []).push(propKey, null);\n }\n }\n for (propKey in nextProps) {\n var nextProp = nextProps[propKey];\n var lastProp = lastProps != null ? lastProps[propKey] : undefined;\n if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {\n continue;\n }\n if (propKey === STYLE$1) {\n {\n if (nextProp) {\n // Freeze the next style object so that we can assume it won't be\n // mutated. We have already warned for this in the past.\n Object.freeze(nextProp);\n }\n }\n if (lastProp) {\n // Unset styles on `lastProp` but not on `nextProp`.\n for (styleName in lastProp) {\n if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n // Update styles that changed since `lastProp`.\n for (styleName in nextProp) {\n if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = nextProp[styleName];\n }\n }\n } else {\n // Relies on `updateStylesByID` not mutating `styleUpdates`.\n if (!styleUpdates) {\n if (!updatePayload) {\n updatePayload = [];\n }\n updatePayload.push(propKey, styleUpdates);\n }\n styleUpdates = nextProp;\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n var nextHtml = nextProp ? nextProp[HTML] : undefined;\n var lastHtml = lastProp ? lastProp[HTML] : undefined;\n if (nextHtml != null) {\n if (lastHtml !== nextHtml) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextHtml);\n }\n } else {\n // TODO: It might be too late to clear this if we have children\n // inserted already.\n }\n } else if (propKey === CHILDREN) {\n if (lastProp !== nextProp && (typeof nextProp === 'string' || typeof nextProp === 'number')) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextProp);\n }\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n // We eagerly listen to this even though we haven't committed yet.\n if (true && typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n ensureListeningTo(rootContainerElement, propKey);\n }\n if (!updatePayload && lastProp !== nextProp) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" props pointer gets updated so we need a commit\n // to update this element.\n updatePayload = [];\n }\n } else {\n // For any other property we always add it to the queue and then we\n // filter it out using the whitelist during the commit.\n (updatePayload = updatePayload || []).push(propKey, nextProp);\n }\n }\n if (styleUpdates) {\n {\n validateShorthandPropertyCollisionInDev(styleUpdates, nextProps[STYLE$1]);\n }\n (updatePayload = updatePayload || []).push(STYLE$1, styleUpdates);\n }\n return updatePayload;\n}", "function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {\n {\n validatePropertiesInDevelopment(tag, nextRawProps);\n }\n\n var updatePayload = null;\n\n var lastProps = void 0;\n var nextProps = void 0;\n switch (tag) {\n case 'input':\n lastProps = getHostProps(domElement, lastRawProps);\n nextProps = getHostProps(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'option':\n lastProps = getHostProps$1(domElement, lastRawProps);\n nextProps = getHostProps$1(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'select':\n lastProps = getHostProps$2(domElement, lastRawProps);\n nextProps = getHostProps$2(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'textarea':\n lastProps = getHostProps$3(domElement, lastRawProps);\n nextProps = getHostProps$3(domElement, nextRawProps);\n updatePayload = [];\n break;\n default:\n lastProps = lastRawProps;\n nextProps = nextRawProps;\n if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(domElement);\n }\n break;\n }\n\n assertValidProps(tag, nextProps);\n\n var propKey = void 0;\n var styleName = void 0;\n var styleUpdates = null;\n for (propKey in lastProps) {\n if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {\n continue;\n }\n if (propKey === STYLE$1) {\n var lastStyle = lastProps[propKey];\n for (styleName in lastStyle) {\n if (lastStyle.hasOwnProperty(styleName)) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) {\n // Noop. This is handled by the clear text mechanism.\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (propKey === AUTOFOCUS) {\n // Noop. It doesn't work on updates anyway.\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" fiber pointer gets updated so we need a commit\n // to update this element.\n if (!updatePayload) {\n updatePayload = [];\n }\n } else {\n // For all other deleted properties we add it to the queue. We use\n // the whitelist in the commit phase instead.\n (updatePayload = updatePayload || []).push(propKey, null);\n }\n }\n for (propKey in nextProps) {\n var nextProp = nextProps[propKey];\n var lastProp = lastProps != null ? lastProps[propKey] : undefined;\n if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {\n continue;\n }\n if (propKey === STYLE$1) {\n {\n if (nextProp) {\n // Freeze the next style object so that we can assume it won't be\n // mutated. We have already warned for this in the past.\n Object.freeze(nextProp);\n }\n }\n if (lastProp) {\n // Unset styles on `lastProp` but not on `nextProp`.\n for (styleName in lastProp) {\n if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n // Update styles that changed since `lastProp`.\n for (styleName in nextProp) {\n if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = nextProp[styleName];\n }\n }\n } else {\n // Relies on `updateStylesByID` not mutating `styleUpdates`.\n if (!styleUpdates) {\n if (!updatePayload) {\n updatePayload = [];\n }\n updatePayload.push(propKey, styleUpdates);\n }\n styleUpdates = nextProp;\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n var nextHtml = nextProp ? nextProp[HTML] : undefined;\n var lastHtml = lastProp ? lastProp[HTML] : undefined;\n if (nextHtml != null) {\n if (lastHtml !== nextHtml) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextHtml);\n }\n } else {\n // TODO: It might be too late to clear this if we have children\n // inserted already.\n }\n } else if (propKey === CHILDREN) {\n if (lastProp !== nextProp && (typeof nextProp === 'string' || typeof nextProp === 'number')) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextProp);\n }\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n // We eagerly listen to this even though we haven't committed yet.\n if ( true && typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n ensureListeningTo(rootContainerElement, propKey);\n }\n if (!updatePayload && lastProp !== nextProp) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" props pointer gets updated so we need a commit\n // to update this element.\n updatePayload = [];\n }\n } else {\n // For any other property we always add it to the queue and then we\n // filter it out using the whitelist during the commit.\n (updatePayload = updatePayload || []).push(propKey, nextProp);\n }\n }\n if (styleUpdates) {\n {\n validateShorthandPropertyCollisionInDev(styleUpdates, nextProps[STYLE$1]);\n }\n (updatePayload = updatePayload || []).push(STYLE$1, styleUpdates);\n }\n return updatePayload;\n}", "function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {\n {\n validatePropertiesInDevelopment(tag, nextRawProps);\n }\n\n var updatePayload = null;\n\n var lastProps = void 0;\n var nextProps = void 0;\n switch (tag) {\n case 'input':\n lastProps = getHostProps(domElement, lastRawProps);\n nextProps = getHostProps(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'option':\n lastProps = getHostProps$1(domElement, lastRawProps);\n nextProps = getHostProps$1(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'select':\n lastProps = getHostProps$2(domElement, lastRawProps);\n nextProps = getHostProps$2(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'textarea':\n lastProps = getHostProps$3(domElement, lastRawProps);\n nextProps = getHostProps$3(domElement, nextRawProps);\n updatePayload = [];\n break;\n default:\n lastProps = lastRawProps;\n nextProps = nextRawProps;\n if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(domElement);\n }\n break;\n }\n\n assertValidProps(tag, nextProps);\n\n var propKey = void 0;\n var styleName = void 0;\n var styleUpdates = null;\n for (propKey in lastProps) {\n if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {\n continue;\n }\n if (propKey === STYLE$1) {\n var lastStyle = lastProps[propKey];\n for (styleName in lastStyle) {\n if (lastStyle.hasOwnProperty(styleName)) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) {\n // Noop. This is handled by the clear text mechanism.\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (propKey === AUTOFOCUS) {\n // Noop. It doesn't work on updates anyway.\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" fiber pointer gets updated so we need a commit\n // to update this element.\n if (!updatePayload) {\n updatePayload = [];\n }\n } else {\n // For all other deleted properties we add it to the queue. We use\n // the whitelist in the commit phase instead.\n (updatePayload = updatePayload || []).push(propKey, null);\n }\n }\n for (propKey in nextProps) {\n var nextProp = nextProps[propKey];\n var lastProp = lastProps != null ? lastProps[propKey] : undefined;\n if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {\n continue;\n }\n if (propKey === STYLE$1) {\n {\n if (nextProp) {\n // Freeze the next style object so that we can assume it won't be\n // mutated. We have already warned for this in the past.\n Object.freeze(nextProp);\n }\n }\n if (lastProp) {\n // Unset styles on `lastProp` but not on `nextProp`.\n for (styleName in lastProp) {\n if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n // Update styles that changed since `lastProp`.\n for (styleName in nextProp) {\n if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = nextProp[styleName];\n }\n }\n } else {\n // Relies on `updateStylesByID` not mutating `styleUpdates`.\n if (!styleUpdates) {\n if (!updatePayload) {\n updatePayload = [];\n }\n updatePayload.push(propKey, styleUpdates);\n }\n styleUpdates = nextProp;\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n var nextHtml = nextProp ? nextProp[HTML] : undefined;\n var lastHtml = lastProp ? lastProp[HTML] : undefined;\n if (nextHtml != null) {\n if (lastHtml !== nextHtml) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextHtml);\n }\n } else {\n // TODO: It might be too late to clear this if we have children\n // inserted already.\n }\n } else if (propKey === CHILDREN) {\n if (lastProp !== nextProp && (typeof nextProp === 'string' || typeof nextProp === 'number')) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextProp);\n }\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n // We eagerly listen to this even though we haven't committed yet.\n if ( true && typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n ensureListeningTo(rootContainerElement, propKey);\n }\n if (!updatePayload && lastProp !== nextProp) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" props pointer gets updated so we need a commit\n // to update this element.\n updatePayload = [];\n }\n } else {\n // For any other property we always add it to the queue and then we\n // filter it out using the whitelist during the commit.\n (updatePayload = updatePayload || []).push(propKey, nextProp);\n }\n }\n if (styleUpdates) {\n {\n validateShorthandPropertyCollisionInDev(styleUpdates, nextProps[STYLE$1]);\n }\n (updatePayload = updatePayload || []).push(STYLE$1, styleUpdates);\n }\n return updatePayload;\n}", "function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {\n {\n validatePropertiesInDevelopment(tag, nextRawProps);\n }\n\n var updatePayload = null;\n\n var lastProps = void 0;\n var nextProps = void 0;\n switch (tag) {\n case 'input':\n lastProps = getHostProps(domElement, lastRawProps);\n nextProps = getHostProps(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'option':\n lastProps = getHostProps$1(domElement, lastRawProps);\n nextProps = getHostProps$1(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'select':\n lastProps = getHostProps$2(domElement, lastRawProps);\n nextProps = getHostProps$2(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'textarea':\n lastProps = getHostProps$3(domElement, lastRawProps);\n nextProps = getHostProps$3(domElement, nextRawProps);\n updatePayload = [];\n break;\n default:\n lastProps = lastRawProps;\n nextProps = nextRawProps;\n if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(domElement);\n }\n break;\n }\n\n assertValidProps(tag, nextProps);\n\n var propKey = void 0;\n var styleName = void 0;\n var styleUpdates = null;\n for (propKey in lastProps) {\n if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {\n continue;\n }\n if (propKey === STYLE$1) {\n var lastStyle = lastProps[propKey];\n for (styleName in lastStyle) {\n if (lastStyle.hasOwnProperty(styleName)) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) {\n // Noop. This is handled by the clear text mechanism.\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (propKey === AUTOFOCUS) {\n // Noop. It doesn't work on updates anyway.\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" fiber pointer gets updated so we need a commit\n // to update this element.\n if (!updatePayload) {\n updatePayload = [];\n }\n } else {\n // For all other deleted properties we add it to the queue. We use\n // the whitelist in the commit phase instead.\n (updatePayload = updatePayload || []).push(propKey, null);\n }\n }\n for (propKey in nextProps) {\n var nextProp = nextProps[propKey];\n var lastProp = lastProps != null ? lastProps[propKey] : undefined;\n if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {\n continue;\n }\n if (propKey === STYLE$1) {\n {\n if (nextProp) {\n // Freeze the next style object so that we can assume it won't be\n // mutated. We have already warned for this in the past.\n Object.freeze(nextProp);\n }\n }\n if (lastProp) {\n // Unset styles on `lastProp` but not on `nextProp`.\n for (styleName in lastProp) {\n if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n // Update styles that changed since `lastProp`.\n for (styleName in nextProp) {\n if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = nextProp[styleName];\n }\n }\n } else {\n // Relies on `updateStylesByID` not mutating `styleUpdates`.\n if (!styleUpdates) {\n if (!updatePayload) {\n updatePayload = [];\n }\n updatePayload.push(propKey, styleUpdates);\n }\n styleUpdates = nextProp;\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n var nextHtml = nextProp ? nextProp[HTML] : undefined;\n var lastHtml = lastProp ? lastProp[HTML] : undefined;\n if (nextHtml != null) {\n if (lastHtml !== nextHtml) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextHtml);\n }\n } else {\n // TODO: It might be too late to clear this if we have children\n // inserted already.\n }\n } else if (propKey === CHILDREN) {\n if (lastProp !== nextProp && (typeof nextProp === 'string' || typeof nextProp === 'number')) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextProp);\n }\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n // We eagerly listen to this even though we haven't committed yet.\n if (true && typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n ensureListeningTo(rootContainerElement, propKey);\n }\n if (!updatePayload && lastProp !== nextProp) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" props pointer gets updated so we need a commit\n // to update this element.\n updatePayload = [];\n }\n } else {\n // For any other property we always add it to the queue and then we\n // filter it out using the whitelist during the commit.\n (updatePayload = updatePayload || []).push(propKey, nextProp);\n }\n }\n if (styleUpdates) {\n {\n validateShorthandPropertyCollisionInDev(styleUpdates, nextProps[STYLE$1]);\n }\n (updatePayload = updatePayload || []).push(STYLE$1, styleUpdates);\n }\n return updatePayload;\n}", "function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {\n {\n validatePropertiesInDevelopment(tag, nextRawProps);\n }\n\n var updatePayload = null;\n\n var lastProps = void 0;\n var nextProps = void 0;\n switch (tag) {\n case 'input':\n lastProps = getHostProps(domElement, lastRawProps);\n nextProps = getHostProps(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'option':\n lastProps = getHostProps$1(domElement, lastRawProps);\n nextProps = getHostProps$1(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'select':\n lastProps = getHostProps$2(domElement, lastRawProps);\n nextProps = getHostProps$2(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'textarea':\n lastProps = getHostProps$3(domElement, lastRawProps);\n nextProps = getHostProps$3(domElement, nextRawProps);\n updatePayload = [];\n break;\n default:\n lastProps = lastRawProps;\n nextProps = nextRawProps;\n if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(domElement);\n }\n break;\n }\n\n assertValidProps(tag, nextProps);\n\n var propKey = void 0;\n var styleName = void 0;\n var styleUpdates = null;\n for (propKey in lastProps) {\n if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {\n continue;\n }\n if (propKey === STYLE$1) {\n var lastStyle = lastProps[propKey];\n for (styleName in lastStyle) {\n if (lastStyle.hasOwnProperty(styleName)) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) {\n // Noop. This is handled by the clear text mechanism.\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (propKey === AUTOFOCUS) {\n // Noop. It doesn't work on updates anyway.\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" fiber pointer gets updated so we need a commit\n // to update this element.\n if (!updatePayload) {\n updatePayload = [];\n }\n } else {\n // For all other deleted properties we add it to the queue. We use\n // the whitelist in the commit phase instead.\n (updatePayload = updatePayload || []).push(propKey, null);\n }\n }\n for (propKey in nextProps) {\n var nextProp = nextProps[propKey];\n var lastProp = lastProps != null ? lastProps[propKey] : undefined;\n if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {\n continue;\n }\n if (propKey === STYLE$1) {\n {\n if (nextProp) {\n // Freeze the next style object so that we can assume it won't be\n // mutated. We have already warned for this in the past.\n Object.freeze(nextProp);\n }\n }\n if (lastProp) {\n // Unset styles on `lastProp` but not on `nextProp`.\n for (styleName in lastProp) {\n if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n // Update styles that changed since `lastProp`.\n for (styleName in nextProp) {\n if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = nextProp[styleName];\n }\n }\n } else {\n // Relies on `updateStylesByID` not mutating `styleUpdates`.\n if (!styleUpdates) {\n if (!updatePayload) {\n updatePayload = [];\n }\n updatePayload.push(propKey, styleUpdates);\n }\n styleUpdates = nextProp;\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n var nextHtml = nextProp ? nextProp[HTML] : undefined;\n var lastHtml = lastProp ? lastProp[HTML] : undefined;\n if (nextHtml != null) {\n if (lastHtml !== nextHtml) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextHtml);\n }\n } else {\n // TODO: It might be too late to clear this if we have children\n // inserted already.\n }\n } else if (propKey === CHILDREN) {\n if (lastProp !== nextProp && (typeof nextProp === 'string' || typeof nextProp === 'number')) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextProp);\n }\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n // We eagerly listen to this even though we haven't committed yet.\n if ( true && typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n ensureListeningTo(rootContainerElement, propKey);\n }\n if (!updatePayload && lastProp !== nextProp) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" props pointer gets updated so we need a commit\n // to update this element.\n updatePayload = [];\n }\n } else {\n // For any other property we always add it to the queue and then we\n // filter it out using the whitelist during the commit.\n (updatePayload = updatePayload || []).push(propKey, nextProp);\n }\n }\n if (styleUpdates) {\n {\n validateShorthandPropertyCollisionInDev(styleUpdates, nextProps[STYLE$1]);\n }\n (updatePayload = updatePayload || []).push(STYLE$1, styleUpdates);\n }\n return updatePayload;\n}", "function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {\n {\n validatePropertiesInDevelopment(tag, nextRawProps);\n }\n\n var updatePayload = null;\n\n var lastProps = void 0;\n var nextProps = void 0;\n switch (tag) {\n case 'input':\n lastProps = getHostProps(domElement, lastRawProps);\n nextProps = getHostProps(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'option':\n lastProps = getHostProps$1(domElement, lastRawProps);\n nextProps = getHostProps$1(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'select':\n lastProps = getHostProps$2(domElement, lastRawProps);\n nextProps = getHostProps$2(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'textarea':\n lastProps = getHostProps$3(domElement, lastRawProps);\n nextProps = getHostProps$3(domElement, nextRawProps);\n updatePayload = [];\n break;\n default:\n lastProps = lastRawProps;\n nextProps = nextRawProps;\n if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(domElement);\n }\n break;\n }\n\n assertValidProps(tag, nextProps);\n\n var propKey = void 0;\n var styleName = void 0;\n var styleUpdates = null;\n for (propKey in lastProps) {\n if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {\n continue;\n }\n if (propKey === STYLE$1) {\n var lastStyle = lastProps[propKey];\n for (styleName in lastStyle) {\n if (lastStyle.hasOwnProperty(styleName)) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) {\n // Noop. This is handled by the clear text mechanism.\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (propKey === AUTOFOCUS) {\n // Noop. It doesn't work on updates anyway.\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" fiber pointer gets updated so we need a commit\n // to update this element.\n if (!updatePayload) {\n updatePayload = [];\n }\n } else {\n // For all other deleted properties we add it to the queue. We use\n // the whitelist in the commit phase instead.\n (updatePayload = updatePayload || []).push(propKey, null);\n }\n }\n for (propKey in nextProps) {\n var nextProp = nextProps[propKey];\n var lastProp = lastProps != null ? lastProps[propKey] : undefined;\n if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {\n continue;\n }\n if (propKey === STYLE$1) {\n {\n if (nextProp) {\n // Freeze the next style object so that we can assume it won't be\n // mutated. We have already warned for this in the past.\n Object.freeze(nextProp);\n }\n }\n if (lastProp) {\n // Unset styles on `lastProp` but not on `nextProp`.\n for (styleName in lastProp) {\n if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n // Update styles that changed since `lastProp`.\n for (styleName in nextProp) {\n if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = nextProp[styleName];\n }\n }\n } else {\n // Relies on `updateStylesByID` not mutating `styleUpdates`.\n if (!styleUpdates) {\n if (!updatePayload) {\n updatePayload = [];\n }\n updatePayload.push(propKey, styleUpdates);\n }\n styleUpdates = nextProp;\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n var nextHtml = nextProp ? nextProp[HTML] : undefined;\n var lastHtml = lastProp ? lastProp[HTML] : undefined;\n if (nextHtml != null) {\n if (lastHtml !== nextHtml) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextHtml);\n }\n } else {\n // TODO: It might be too late to clear this if we have children\n // inserted already.\n }\n } else if (propKey === CHILDREN) {\n if (lastProp !== nextProp && (typeof nextProp === 'string' || typeof nextProp === 'number')) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextProp);\n }\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n // We eagerly listen to this even though we haven't committed yet.\n if (true && typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n ensureListeningTo(rootContainerElement, propKey);\n }\n if (!updatePayload && lastProp !== nextProp) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" props pointer gets updated so we need a commit\n // to update this element.\n updatePayload = [];\n }\n } else {\n // For any other property we always add it to the queue and then we\n // filter it out using the whitelist during the commit.\n (updatePayload = updatePayload || []).push(propKey, nextProp);\n }\n }\n if (styleUpdates) {\n (updatePayload = updatePayload || []).push(STYLE$1, styleUpdates);\n }\n return updatePayload;\n}", "function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {\n {\n validatePropertiesInDevelopment(tag, nextRawProps);\n }\n\n var updatePayload = null;\n\n var lastProps = void 0;\n var nextProps = void 0;\n switch (tag) {\n case 'input':\n lastProps = getHostProps(domElement, lastRawProps);\n nextProps = getHostProps(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'option':\n lastProps = getHostProps$1(domElement, lastRawProps);\n nextProps = getHostProps$1(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'select':\n lastProps = getHostProps$2(domElement, lastRawProps);\n nextProps = getHostProps$2(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'textarea':\n lastProps = getHostProps$3(domElement, lastRawProps);\n nextProps = getHostProps$3(domElement, nextRawProps);\n updatePayload = [];\n break;\n default:\n lastProps = lastRawProps;\n nextProps = nextRawProps;\n if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(domElement);\n }\n break;\n }\n\n assertValidProps(tag, nextProps);\n\n var propKey = void 0;\n var styleName = void 0;\n var styleUpdates = null;\n for (propKey in lastProps) {\n if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {\n continue;\n }\n if (propKey === STYLE$1) {\n var lastStyle = lastProps[propKey];\n for (styleName in lastStyle) {\n if (lastStyle.hasOwnProperty(styleName)) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) {\n // Noop. This is handled by the clear text mechanism.\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (propKey === AUTOFOCUS) {\n // Noop. It doesn't work on updates anyway.\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" fiber pointer gets updated so we need a commit\n // to update this element.\n if (!updatePayload) {\n updatePayload = [];\n }\n } else {\n // For all other deleted properties we add it to the queue. We use\n // the whitelist in the commit phase instead.\n (updatePayload = updatePayload || []).push(propKey, null);\n }\n }\n for (propKey in nextProps) {\n var nextProp = nextProps[propKey];\n var lastProp = lastProps != null ? lastProps[propKey] : undefined;\n if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {\n continue;\n }\n if (propKey === STYLE$1) {\n {\n if (nextProp) {\n // Freeze the next style object so that we can assume it won't be\n // mutated. We have already warned for this in the past.\n Object.freeze(nextProp);\n }\n }\n if (lastProp) {\n // Unset styles on `lastProp` but not on `nextProp`.\n for (styleName in lastProp) {\n if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n // Update styles that changed since `lastProp`.\n for (styleName in nextProp) {\n if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = nextProp[styleName];\n }\n }\n } else {\n // Relies on `updateStylesByID` not mutating `styleUpdates`.\n if (!styleUpdates) {\n if (!updatePayload) {\n updatePayload = [];\n }\n updatePayload.push(propKey, styleUpdates);\n }\n styleUpdates = nextProp;\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n var nextHtml = nextProp ? nextProp[HTML] : undefined;\n var lastHtml = lastProp ? lastProp[HTML] : undefined;\n if (nextHtml != null) {\n if (lastHtml !== nextHtml) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextHtml);\n }\n } else {\n // TODO: It might be too late to clear this if we have children\n // inserted already.\n }\n } else if (propKey === CHILDREN) {\n if (lastProp !== nextProp && (typeof nextProp === 'string' || typeof nextProp === 'number')) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextProp);\n }\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n // We eagerly listen to this even though we haven't committed yet.\n if ( true && typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n ensureListeningTo(rootContainerElement, propKey);\n }\n if (!updatePayload && lastProp !== nextProp) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" props pointer gets updated so we need a commit\n // to update this element.\n updatePayload = [];\n }\n } else {\n // For any other property we always add it to the queue and then we\n // filter it out using the whitelist during the commit.\n (updatePayload = updatePayload || []).push(propKey, nextProp);\n }\n }\n if (styleUpdates) {\n {\n validateShorthandPropertyCollisionInDev(styleUpdates, nextProps[STYLE$1]);\n }\n (updatePayload = updatePayload || []).push(STYLE$1, styleUpdates);\n }\n return updatePayload;\n}", "function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {\n {\n validatePropertiesInDevelopment(tag, nextRawProps);\n }\n\n var updatePayload = null;\n\n var lastProps = void 0;\n var nextProps = void 0;\n switch (tag) {\n case 'input':\n lastProps = getHostProps(domElement, lastRawProps);\n nextProps = getHostProps(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'option':\n lastProps = getHostProps$1(domElement, lastRawProps);\n nextProps = getHostProps$1(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'select':\n lastProps = getHostProps$2(domElement, lastRawProps);\n nextProps = getHostProps$2(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'textarea':\n lastProps = getHostProps$3(domElement, lastRawProps);\n nextProps = getHostProps$3(domElement, nextRawProps);\n updatePayload = [];\n break;\n default:\n lastProps = lastRawProps;\n nextProps = nextRawProps;\n if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(domElement);\n }\n break;\n }\n\n assertValidProps(tag, nextProps);\n\n var propKey = void 0;\n var styleName = void 0;\n var styleUpdates = null;\n for (propKey in lastProps) {\n if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {\n continue;\n }\n if (propKey === STYLE$1) {\n var lastStyle = lastProps[propKey];\n for (styleName in lastStyle) {\n if (lastStyle.hasOwnProperty(styleName)) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) {\n // Noop. This is handled by the clear text mechanism.\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (propKey === AUTOFOCUS) {\n // Noop. It doesn't work on updates anyway.\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" fiber pointer gets updated so we need a commit\n // to update this element.\n if (!updatePayload) {\n updatePayload = [];\n }\n } else {\n // For all other deleted properties we add it to the queue. We use\n // the whitelist in the commit phase instead.\n (updatePayload = updatePayload || []).push(propKey, null);\n }\n }\n for (propKey in nextProps) {\n var nextProp = nextProps[propKey];\n var lastProp = lastProps != null ? lastProps[propKey] : undefined;\n if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {\n continue;\n }\n if (propKey === STYLE$1) {\n {\n if (nextProp) {\n // Freeze the next style object so that we can assume it won't be\n // mutated. We have already warned for this in the past.\n Object.freeze(nextProp);\n }\n }\n if (lastProp) {\n // Unset styles on `lastProp` but not on `nextProp`.\n for (styleName in lastProp) {\n if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n // Update styles that changed since `lastProp`.\n for (styleName in nextProp) {\n if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = nextProp[styleName];\n }\n }\n } else {\n // Relies on `updateStylesByID` not mutating `styleUpdates`.\n if (!styleUpdates) {\n if (!updatePayload) {\n updatePayload = [];\n }\n updatePayload.push(propKey, styleUpdates);\n }\n styleUpdates = nextProp;\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n var nextHtml = nextProp ? nextProp[HTML] : undefined;\n var lastHtml = lastProp ? lastProp[HTML] : undefined;\n if (nextHtml != null) {\n if (lastHtml !== nextHtml) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextHtml);\n }\n } else {\n // TODO: It might be too late to clear this if we have children\n // inserted already.\n }\n } else if (propKey === CHILDREN) {\n if (lastProp !== nextProp && (typeof nextProp === 'string' || typeof nextProp === 'number')) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextProp);\n }\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n // We eagerly listen to this even though we haven't committed yet.\n if ( true && typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n ensureListeningTo(rootContainerElement, propKey);\n }\n if (!updatePayload && lastProp !== nextProp) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" props pointer gets updated so we need a commit\n // to update this element.\n updatePayload = [];\n }\n } else {\n // For any other property we always add it to the queue and then we\n // filter it out using the whitelist during the commit.\n (updatePayload = updatePayload || []).push(propKey, nextProp);\n }\n }\n if (styleUpdates) {\n {\n validateShorthandPropertyCollisionInDev(styleUpdates, nextProps[STYLE$1]);\n }\n (updatePayload = updatePayload || []).push(STYLE$1, styleUpdates);\n }\n return updatePayload;\n}", "function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {\n {\n validatePropertiesInDevelopment(tag, nextRawProps);\n }\n\n var updatePayload = null;\n\n var lastProps = void 0;\n var nextProps = void 0;\n switch (tag) {\n case 'input':\n lastProps = getHostProps(domElement, lastRawProps);\n nextProps = getHostProps(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'option':\n lastProps = getHostProps$1(domElement, lastRawProps);\n nextProps = getHostProps$1(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'select':\n lastProps = getHostProps$2(domElement, lastRawProps);\n nextProps = getHostProps$2(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'textarea':\n lastProps = getHostProps$3(domElement, lastRawProps);\n nextProps = getHostProps$3(domElement, nextRawProps);\n updatePayload = [];\n break;\n default:\n lastProps = lastRawProps;\n nextProps = nextRawProps;\n if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(domElement);\n }\n break;\n }\n\n assertValidProps(tag, nextProps);\n\n var propKey = void 0;\n var styleName = void 0;\n var styleUpdates = null;\n for (propKey in lastProps) {\n if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {\n continue;\n }\n if (propKey === STYLE$1) {\n var lastStyle = lastProps[propKey];\n for (styleName in lastStyle) {\n if (lastStyle.hasOwnProperty(styleName)) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) {\n // Noop. This is handled by the clear text mechanism.\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (propKey === AUTOFOCUS) {\n // Noop. It doesn't work on updates anyway.\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" fiber pointer gets updated so we need a commit\n // to update this element.\n if (!updatePayload) {\n updatePayload = [];\n }\n } else {\n // For all other deleted properties we add it to the queue. We use\n // the whitelist in the commit phase instead.\n (updatePayload = updatePayload || []).push(propKey, null);\n }\n }\n for (propKey in nextProps) {\n var nextProp = nextProps[propKey];\n var lastProp = lastProps != null ? lastProps[propKey] : undefined;\n if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {\n continue;\n }\n if (propKey === STYLE$1) {\n {\n if (nextProp) {\n // Freeze the next style object so that we can assume it won't be\n // mutated. We have already warned for this in the past.\n Object.freeze(nextProp);\n }\n }\n if (lastProp) {\n // Unset styles on `lastProp` but not on `nextProp`.\n for (styleName in lastProp) {\n if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n // Update styles that changed since `lastProp`.\n for (styleName in nextProp) {\n if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = nextProp[styleName];\n }\n }\n } else {\n // Relies on `updateStylesByID` not mutating `styleUpdates`.\n if (!styleUpdates) {\n if (!updatePayload) {\n updatePayload = [];\n }\n updatePayload.push(propKey, styleUpdates);\n }\n styleUpdates = nextProp;\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n var nextHtml = nextProp ? nextProp[HTML] : undefined;\n var lastHtml = lastProp ? lastProp[HTML] : undefined;\n if (nextHtml != null) {\n if (lastHtml !== nextHtml) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextHtml);\n }\n } else {\n // TODO: It might be too late to clear this if we have children\n // inserted already.\n }\n } else if (propKey === CHILDREN) {\n if (lastProp !== nextProp && (typeof nextProp === 'string' || typeof nextProp === 'number')) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextProp);\n }\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n // We eagerly listen to this even though we haven't committed yet.\n if ( true && typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n ensureListeningTo(rootContainerElement, propKey);\n }\n if (!updatePayload && lastProp !== nextProp) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" props pointer gets updated so we need a commit\n // to update this element.\n updatePayload = [];\n }\n } else {\n // For any other property we always add it to the queue and then we\n // filter it out using the whitelist during the commit.\n (updatePayload = updatePayload || []).push(propKey, nextProp);\n }\n }\n if (styleUpdates) {\n {\n validateShorthandPropertyCollisionInDev(styleUpdates, nextProps[STYLE$1]);\n }\n (updatePayload = updatePayload || []).push(STYLE$1, styleUpdates);\n }\n return updatePayload;\n}", "function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {\n {\n validatePropertiesInDevelopment(tag, nextRawProps);\n }\n\n var updatePayload = null;\n\n var lastProps = void 0;\n var nextProps = void 0;\n switch (tag) {\n case 'input':\n lastProps = getHostProps(domElement, lastRawProps);\n nextProps = getHostProps(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'option':\n lastProps = getHostProps$1(domElement, lastRawProps);\n nextProps = getHostProps$1(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'select':\n lastProps = getHostProps$2(domElement, lastRawProps);\n nextProps = getHostProps$2(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'textarea':\n lastProps = getHostProps$3(domElement, lastRawProps);\n nextProps = getHostProps$3(domElement, nextRawProps);\n updatePayload = [];\n break;\n default:\n lastProps = lastRawProps;\n nextProps = nextRawProps;\n if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(domElement);\n }\n break;\n }\n\n assertValidProps(tag, nextProps);\n\n var propKey = void 0;\n var styleName = void 0;\n var styleUpdates = null;\n for (propKey in lastProps) {\n if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {\n continue;\n }\n if (propKey === STYLE$1) {\n var lastStyle = lastProps[propKey];\n for (styleName in lastStyle) {\n if (lastStyle.hasOwnProperty(styleName)) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) {\n // Noop. This is handled by the clear text mechanism.\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (propKey === AUTOFOCUS) {\n // Noop. It doesn't work on updates anyway.\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" fiber pointer gets updated so we need a commit\n // to update this element.\n if (!updatePayload) {\n updatePayload = [];\n }\n } else {\n // For all other deleted properties we add it to the queue. We use\n // the whitelist in the commit phase instead.\n (updatePayload = updatePayload || []).push(propKey, null);\n }\n }\n for (propKey in nextProps) {\n var nextProp = nextProps[propKey];\n var lastProp = lastProps != null ? lastProps[propKey] : undefined;\n if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {\n continue;\n }\n if (propKey === STYLE$1) {\n {\n if (nextProp) {\n // Freeze the next style object so that we can assume it won't be\n // mutated. We have already warned for this in the past.\n Object.freeze(nextProp);\n }\n }\n if (lastProp) {\n // Unset styles on `lastProp` but not on `nextProp`.\n for (styleName in lastProp) {\n if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n // Update styles that changed since `lastProp`.\n for (styleName in nextProp) {\n if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = nextProp[styleName];\n }\n }\n } else {\n // Relies on `updateStylesByID` not mutating `styleUpdates`.\n if (!styleUpdates) {\n if (!updatePayload) {\n updatePayload = [];\n }\n updatePayload.push(propKey, styleUpdates);\n }\n styleUpdates = nextProp;\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n var nextHtml = nextProp ? nextProp[HTML] : undefined;\n var lastHtml = lastProp ? lastProp[HTML] : undefined;\n if (nextHtml != null) {\n if (lastHtml !== nextHtml) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextHtml);\n }\n } else {\n // TODO: It might be too late to clear this if we have children\n // inserted already.\n }\n } else if (propKey === CHILDREN) {\n if (lastProp !== nextProp && (typeof nextProp === 'string' || typeof nextProp === 'number')) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextProp);\n }\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n // We eagerly listen to this even though we haven't committed yet.\n if (true && typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n ensureListeningTo(rootContainerElement, propKey);\n }\n if (!updatePayload && lastProp !== nextProp) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" props pointer gets updated so we need a commit\n // to update this element.\n updatePayload = [];\n }\n } else {\n // For any other property we always add it to the queue and then we\n // filter it out using the whitelist during the commit.\n (updatePayload = updatePayload || []).push(propKey, nextProp);\n }\n }\n if (styleUpdates) {\n (updatePayload = updatePayload || []).push(STYLE$1, styleUpdates);\n }\n return updatePayload;\n}", "function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {\n {\n validatePropertiesInDevelopment(tag, nextRawProps);\n }\n\n var updatePayload = null;\n\n var lastProps = void 0;\n var nextProps = void 0;\n switch (tag) {\n case 'input':\n lastProps = getHostProps(domElement, lastRawProps);\n nextProps = getHostProps(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'option':\n lastProps = getHostProps$1(domElement, lastRawProps);\n nextProps = getHostProps$1(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'select':\n lastProps = getHostProps$2(domElement, lastRawProps);\n nextProps = getHostProps$2(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'textarea':\n lastProps = getHostProps$3(domElement, lastRawProps);\n nextProps = getHostProps$3(domElement, nextRawProps);\n updatePayload = [];\n break;\n default:\n lastProps = lastRawProps;\n nextProps = nextRawProps;\n if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(domElement);\n }\n break;\n }\n\n assertValidProps(tag, nextProps);\n\n var propKey = void 0;\n var styleName = void 0;\n var styleUpdates = null;\n for (propKey in lastProps) {\n if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {\n continue;\n }\n if (propKey === STYLE$1) {\n var lastStyle = lastProps[propKey];\n for (styleName in lastStyle) {\n if (lastStyle.hasOwnProperty(styleName)) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) {\n // Noop. This is handled by the clear text mechanism.\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (propKey === AUTOFOCUS) {\n // Noop. It doesn't work on updates anyway.\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" fiber pointer gets updated so we need a commit\n // to update this element.\n if (!updatePayload) {\n updatePayload = [];\n }\n } else {\n // For all other deleted properties we add it to the queue. We use\n // the whitelist in the commit phase instead.\n (updatePayload = updatePayload || []).push(propKey, null);\n }\n }\n for (propKey in nextProps) {\n var nextProp = nextProps[propKey];\n var lastProp = lastProps != null ? lastProps[propKey] : undefined;\n if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {\n continue;\n }\n if (propKey === STYLE$1) {\n {\n if (nextProp) {\n // Freeze the next style object so that we can assume it won't be\n // mutated. We have already warned for this in the past.\n Object.freeze(nextProp);\n }\n }\n if (lastProp) {\n // Unset styles on `lastProp` but not on `nextProp`.\n for (styleName in lastProp) {\n if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n // Update styles that changed since `lastProp`.\n for (styleName in nextProp) {\n if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = nextProp[styleName];\n }\n }\n } else {\n // Relies on `updateStylesByID` not mutating `styleUpdates`.\n if (!styleUpdates) {\n if (!updatePayload) {\n updatePayload = [];\n }\n updatePayload.push(propKey, styleUpdates);\n }\n styleUpdates = nextProp;\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n var nextHtml = nextProp ? nextProp[HTML] : undefined;\n var lastHtml = lastProp ? lastProp[HTML] : undefined;\n if (nextHtml != null) {\n if (lastHtml !== nextHtml) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextHtml);\n }\n } else {\n // TODO: It might be too late to clear this if we have children\n // inserted already.\n }\n } else if (propKey === CHILDREN) {\n if (lastProp !== nextProp && (typeof nextProp === 'string' || typeof nextProp === 'number')) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextProp);\n }\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n // We eagerly listen to this even though we haven't committed yet.\n if ( true && typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n ensureListeningTo(rootContainerElement, propKey);\n }\n if (!updatePayload && lastProp !== nextProp) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" props pointer gets updated so we need a commit\n // to update this element.\n updatePayload = [];\n }\n } else {\n // For any other property we always add it to the queue and then we\n // filter it out using the whitelist during the commit.\n (updatePayload = updatePayload || []).push(propKey, nextProp);\n }\n }\n if (styleUpdates) {\n {\n validateShorthandPropertyCollisionInDev(styleUpdates, nextProps[STYLE$1]);\n }\n (updatePayload = updatePayload || []).push(STYLE$1, styleUpdates);\n }\n return updatePayload;\n}", "function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {\n {\n validatePropertiesInDevelopment(tag, nextRawProps);\n }\n\n var updatePayload = null;\n\n var lastProps = void 0;\n var nextProps = void 0;\n switch (tag) {\n case 'input':\n lastProps = getHostProps(domElement, lastRawProps);\n nextProps = getHostProps(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'option':\n lastProps = getHostProps$1(domElement, lastRawProps);\n nextProps = getHostProps$1(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'select':\n lastProps = getHostProps$2(domElement, lastRawProps);\n nextProps = getHostProps$2(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'textarea':\n lastProps = getHostProps$3(domElement, lastRawProps);\n nextProps = getHostProps$3(domElement, nextRawProps);\n updatePayload = [];\n break;\n default:\n lastProps = lastRawProps;\n nextProps = nextRawProps;\n if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(domElement);\n }\n break;\n }\n\n assertValidProps(tag, nextProps);\n\n var propKey = void 0;\n var styleName = void 0;\n var styleUpdates = null;\n for (propKey in lastProps) {\n if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {\n continue;\n }\n if (propKey === STYLE$1) {\n var lastStyle = lastProps[propKey];\n for (styleName in lastStyle) {\n if (lastStyle.hasOwnProperty(styleName)) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) {\n // Noop. This is handled by the clear text mechanism.\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (propKey === AUTOFOCUS) {\n // Noop. It doesn't work on updates anyway.\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" fiber pointer gets updated so we need a commit\n // to update this element.\n if (!updatePayload) {\n updatePayload = [];\n }\n } else {\n // For all other deleted properties we add it to the queue. We use\n // the whitelist in the commit phase instead.\n (updatePayload = updatePayload || []).push(propKey, null);\n }\n }\n for (propKey in nextProps) {\n var nextProp = nextProps[propKey];\n var lastProp = lastProps != null ? lastProps[propKey] : undefined;\n if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {\n continue;\n }\n if (propKey === STYLE$1) {\n {\n if (nextProp) {\n // Freeze the next style object so that we can assume it won't be\n // mutated. We have already warned for this in the past.\n Object.freeze(nextProp);\n }\n }\n if (lastProp) {\n // Unset styles on `lastProp` but not on `nextProp`.\n for (styleName in lastProp) {\n if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n // Update styles that changed since `lastProp`.\n for (styleName in nextProp) {\n if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = nextProp[styleName];\n }\n }\n } else {\n // Relies on `updateStylesByID` not mutating `styleUpdates`.\n if (!styleUpdates) {\n if (!updatePayload) {\n updatePayload = [];\n }\n updatePayload.push(propKey, styleUpdates);\n }\n styleUpdates = nextProp;\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n var nextHtml = nextProp ? nextProp[HTML] : undefined;\n var lastHtml = lastProp ? lastProp[HTML] : undefined;\n if (nextHtml != null) {\n if (lastHtml !== nextHtml) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextHtml);\n }\n } else {\n // TODO: It might be too late to clear this if we have children\n // inserted already.\n }\n } else if (propKey === CHILDREN) {\n if (lastProp !== nextProp && (typeof nextProp === 'string' || typeof nextProp === 'number')) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextProp);\n }\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n // We eagerly listen to this even though we haven't committed yet.\n if ( true && typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n ensureListeningTo(rootContainerElement, propKey);\n }\n if (!updatePayload && lastProp !== nextProp) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" props pointer gets updated so we need a commit\n // to update this element.\n updatePayload = [];\n }\n } else {\n // For any other property we always add it to the queue and then we\n // filter it out using the whitelist during the commit.\n (updatePayload = updatePayload || []).push(propKey, nextProp);\n }\n }\n if (styleUpdates) {\n {\n validateShorthandPropertyCollisionInDev(styleUpdates, nextProps[STYLE$1]);\n }\n (updatePayload = updatePayload || []).push(STYLE$1, styleUpdates);\n }\n return updatePayload;\n}", "function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {\n {\n validatePropertiesInDevelopment(tag, nextRawProps);\n }\n\n var updatePayload = null;\n\n var lastProps = void 0;\n var nextProps = void 0;\n switch (tag) {\n case 'input':\n lastProps = getHostProps(domElement, lastRawProps);\n nextProps = getHostProps(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'option':\n lastProps = getHostProps$1(domElement, lastRawProps);\n nextProps = getHostProps$1(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'select':\n lastProps = getHostProps$2(domElement, lastRawProps);\n nextProps = getHostProps$2(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'textarea':\n lastProps = getHostProps$3(domElement, lastRawProps);\n nextProps = getHostProps$3(domElement, nextRawProps);\n updatePayload = [];\n break;\n default:\n lastProps = lastRawProps;\n nextProps = nextRawProps;\n if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(domElement);\n }\n break;\n }\n\n assertValidProps(tag, nextProps);\n\n var propKey = void 0;\n var styleName = void 0;\n var styleUpdates = null;\n for (propKey in lastProps) {\n if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {\n continue;\n }\n if (propKey === STYLE$1) {\n var lastStyle = lastProps[propKey];\n for (styleName in lastStyle) {\n if (lastStyle.hasOwnProperty(styleName)) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) {\n // Noop. This is handled by the clear text mechanism.\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (propKey === AUTOFOCUS) {\n // Noop. It doesn't work on updates anyway.\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" fiber pointer gets updated so we need a commit\n // to update this element.\n if (!updatePayload) {\n updatePayload = [];\n }\n } else {\n // For all other deleted properties we add it to the queue. We use\n // the whitelist in the commit phase instead.\n (updatePayload = updatePayload || []).push(propKey, null);\n }\n }\n for (propKey in nextProps) {\n var nextProp = nextProps[propKey];\n var lastProp = lastProps != null ? lastProps[propKey] : undefined;\n if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {\n continue;\n }\n if (propKey === STYLE$1) {\n {\n if (nextProp) {\n // Freeze the next style object so that we can assume it won't be\n // mutated. We have already warned for this in the past.\n Object.freeze(nextProp);\n }\n }\n if (lastProp) {\n // Unset styles on `lastProp` but not on `nextProp`.\n for (styleName in lastProp) {\n if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n // Update styles that changed since `lastProp`.\n for (styleName in nextProp) {\n if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = nextProp[styleName];\n }\n }\n } else {\n // Relies on `updateStylesByID` not mutating `styleUpdates`.\n if (!styleUpdates) {\n if (!updatePayload) {\n updatePayload = [];\n }\n updatePayload.push(propKey, styleUpdates);\n }\n styleUpdates = nextProp;\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n var nextHtml = nextProp ? nextProp[HTML] : undefined;\n var lastHtml = lastProp ? lastProp[HTML] : undefined;\n if (nextHtml != null) {\n if (lastHtml !== nextHtml) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextHtml);\n }\n } else {\n // TODO: It might be too late to clear this if we have children\n // inserted already.\n }\n } else if (propKey === CHILDREN) {\n if (lastProp !== nextProp && (typeof nextProp === 'string' || typeof nextProp === 'number')) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextProp);\n }\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n // We eagerly listen to this even though we haven't committed yet.\n if ( true && typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n ensureListeningTo(rootContainerElement, propKey);\n }\n if (!updatePayload && lastProp !== nextProp) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" props pointer gets updated so we need a commit\n // to update this element.\n updatePayload = [];\n }\n } else {\n // For any other property we always add it to the queue and then we\n // filter it out using the whitelist during the commit.\n (updatePayload = updatePayload || []).push(propKey, nextProp);\n }\n }\n if (styleUpdates) {\n {\n validateShorthandPropertyCollisionInDev(styleUpdates, nextProps[STYLE$1]);\n }\n (updatePayload = updatePayload || []).push(STYLE$1, styleUpdates);\n }\n return updatePayload;\n}", "function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {\n {\n validatePropertiesInDevelopment(tag, nextRawProps);\n }\n\n var updatePayload = null;\n\n var lastProps = void 0;\n var nextProps = void 0;\n switch (tag) {\n case 'input':\n lastProps = getHostProps(domElement, lastRawProps);\n nextProps = getHostProps(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'option':\n lastProps = getHostProps$1(domElement, lastRawProps);\n nextProps = getHostProps$1(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'select':\n lastProps = getHostProps$2(domElement, lastRawProps);\n nextProps = getHostProps$2(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'textarea':\n lastProps = getHostProps$3(domElement, lastRawProps);\n nextProps = getHostProps$3(domElement, nextRawProps);\n updatePayload = [];\n break;\n default:\n lastProps = lastRawProps;\n nextProps = nextRawProps;\n if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(domElement);\n }\n break;\n }\n\n assertValidProps(tag, nextProps);\n\n var propKey = void 0;\n var styleName = void 0;\n var styleUpdates = null;\n for (propKey in lastProps) {\n if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {\n continue;\n }\n if (propKey === STYLE$1) {\n var lastStyle = lastProps[propKey];\n for (styleName in lastStyle) {\n if (lastStyle.hasOwnProperty(styleName)) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) {\n // Noop. This is handled by the clear text mechanism.\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (propKey === AUTOFOCUS) {\n // Noop. It doesn't work on updates anyway.\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" fiber pointer gets updated so we need a commit\n // to update this element.\n if (!updatePayload) {\n updatePayload = [];\n }\n } else {\n // For all other deleted properties we add it to the queue. We use\n // the whitelist in the commit phase instead.\n (updatePayload = updatePayload || []).push(propKey, null);\n }\n }\n for (propKey in nextProps) {\n var nextProp = nextProps[propKey];\n var lastProp = lastProps != null ? lastProps[propKey] : undefined;\n if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {\n continue;\n }\n if (propKey === STYLE$1) {\n {\n if (nextProp) {\n // Freeze the next style object so that we can assume it won't be\n // mutated. We have already warned for this in the past.\n Object.freeze(nextProp);\n }\n }\n if (lastProp) {\n // Unset styles on `lastProp` but not on `nextProp`.\n for (styleName in lastProp) {\n if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n // Update styles that changed since `lastProp`.\n for (styleName in nextProp) {\n if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = nextProp[styleName];\n }\n }\n } else {\n // Relies on `updateStylesByID` not mutating `styleUpdates`.\n if (!styleUpdates) {\n if (!updatePayload) {\n updatePayload = [];\n }\n updatePayload.push(propKey, styleUpdates);\n }\n styleUpdates = nextProp;\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n var nextHtml = nextProp ? nextProp[HTML] : undefined;\n var lastHtml = lastProp ? lastProp[HTML] : undefined;\n if (nextHtml != null) {\n if (lastHtml !== nextHtml) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextHtml);\n }\n } else {\n // TODO: It might be too late to clear this if we have children\n // inserted already.\n }\n } else if (propKey === CHILDREN) {\n if (lastProp !== nextProp && (typeof nextProp === 'string' || typeof nextProp === 'number')) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextProp);\n }\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n // We eagerly listen to this even though we haven't committed yet.\n if ( true && typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n ensureListeningTo(rootContainerElement, propKey);\n }\n if (!updatePayload && lastProp !== nextProp) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" props pointer gets updated so we need a commit\n // to update this element.\n updatePayload = [];\n }\n } else {\n // For any other property we always add it to the queue and then we\n // filter it out using the whitelist during the commit.\n (updatePayload = updatePayload || []).push(propKey, nextProp);\n }\n }\n if (styleUpdates) {\n {\n validateShorthandPropertyCollisionInDev(styleUpdates, nextProps[STYLE$1]);\n }\n (updatePayload = updatePayload || []).push(STYLE$1, styleUpdates);\n }\n return updatePayload;\n}", "function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {\n {\n validatePropertiesInDevelopment(tag, nextRawProps);\n }\n\n var updatePayload = null;\n\n var lastProps = void 0;\n var nextProps = void 0;\n switch (tag) {\n case 'input':\n lastProps = getHostProps(domElement, lastRawProps);\n nextProps = getHostProps(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'option':\n lastProps = getHostProps$1(domElement, lastRawProps);\n nextProps = getHostProps$1(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'select':\n lastProps = getHostProps$2(domElement, lastRawProps);\n nextProps = getHostProps$2(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'textarea':\n lastProps = getHostProps$3(domElement, lastRawProps);\n nextProps = getHostProps$3(domElement, nextRawProps);\n updatePayload = [];\n break;\n default:\n lastProps = lastRawProps;\n nextProps = nextRawProps;\n if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(domElement);\n }\n break;\n }\n\n assertValidProps(tag, nextProps);\n\n var propKey = void 0;\n var styleName = void 0;\n var styleUpdates = null;\n for (propKey in lastProps) {\n if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {\n continue;\n }\n if (propKey === STYLE$1) {\n var lastStyle = lastProps[propKey];\n for (styleName in lastStyle) {\n if (lastStyle.hasOwnProperty(styleName)) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) {\n // Noop. This is handled by the clear text mechanism.\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (propKey === AUTOFOCUS) {\n // Noop. It doesn't work on updates anyway.\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" fiber pointer gets updated so we need a commit\n // to update this element.\n if (!updatePayload) {\n updatePayload = [];\n }\n } else {\n // For all other deleted properties we add it to the queue. We use\n // the whitelist in the commit phase instead.\n (updatePayload = updatePayload || []).push(propKey, null);\n }\n }\n for (propKey in nextProps) {\n var nextProp = nextProps[propKey];\n var lastProp = lastProps != null ? lastProps[propKey] : undefined;\n if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {\n continue;\n }\n if (propKey === STYLE$1) {\n {\n if (nextProp) {\n // Freeze the next style object so that we can assume it won't be\n // mutated. We have already warned for this in the past.\n Object.freeze(nextProp);\n }\n }\n if (lastProp) {\n // Unset styles on `lastProp` but not on `nextProp`.\n for (styleName in lastProp) {\n if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n // Update styles that changed since `lastProp`.\n for (styleName in nextProp) {\n if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = nextProp[styleName];\n }\n }\n } else {\n // Relies on `updateStylesByID` not mutating `styleUpdates`.\n if (!styleUpdates) {\n if (!updatePayload) {\n updatePayload = [];\n }\n updatePayload.push(propKey, styleUpdates);\n }\n styleUpdates = nextProp;\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n var nextHtml = nextProp ? nextProp[HTML] : undefined;\n var lastHtml = lastProp ? lastProp[HTML] : undefined;\n if (nextHtml != null) {\n if (lastHtml !== nextHtml) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextHtml);\n }\n } else {\n // TODO: It might be too late to clear this if we have children\n // inserted already.\n }\n } else if (propKey === CHILDREN) {\n if (lastProp !== nextProp && (typeof nextProp === 'string' || typeof nextProp === 'number')) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextProp);\n }\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n // We eagerly listen to this even though we haven't committed yet.\n if ( true && typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n ensureListeningTo(rootContainerElement, propKey);\n }\n if (!updatePayload && lastProp !== nextProp) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" props pointer gets updated so we need a commit\n // to update this element.\n updatePayload = [];\n }\n } else {\n // For any other property we always add it to the queue and then we\n // filter it out using the whitelist during the commit.\n (updatePayload = updatePayload || []).push(propKey, nextProp);\n }\n }\n if (styleUpdates) {\n (updatePayload = updatePayload || []).push(STYLE$1, styleUpdates);\n }\n return updatePayload;\n}", "function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {\n {\n validatePropertiesInDevelopment(tag, nextRawProps);\n }\n\n var updatePayload = null;\n\n var lastProps = void 0;\n var nextProps = void 0;\n switch (tag) {\n case 'input':\n lastProps = getHostProps(domElement, lastRawProps);\n nextProps = getHostProps(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'option':\n lastProps = getHostProps$1(domElement, lastRawProps);\n nextProps = getHostProps$1(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'select':\n lastProps = getHostProps$2(domElement, lastRawProps);\n nextProps = getHostProps$2(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'textarea':\n lastProps = getHostProps$3(domElement, lastRawProps);\n nextProps = getHostProps$3(domElement, nextRawProps);\n updatePayload = [];\n break;\n default:\n lastProps = lastRawProps;\n nextProps = nextRawProps;\n if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(domElement);\n }\n break;\n }\n\n assertValidProps(tag, nextProps);\n\n var propKey = void 0;\n var styleName = void 0;\n var styleUpdates = null;\n for (propKey in lastProps) {\n if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {\n continue;\n }\n if (propKey === STYLE$1) {\n var lastStyle = lastProps[propKey];\n for (styleName in lastStyle) {\n if (lastStyle.hasOwnProperty(styleName)) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) {\n // Noop. This is handled by the clear text mechanism.\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (propKey === AUTOFOCUS) {\n // Noop. It doesn't work on updates anyway.\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" fiber pointer gets updated so we need a commit\n // to update this element.\n if (!updatePayload) {\n updatePayload = [];\n }\n } else {\n // For all other deleted properties we add it to the queue. We use\n // the whitelist in the commit phase instead.\n (updatePayload = updatePayload || []).push(propKey, null);\n }\n }\n for (propKey in nextProps) {\n var nextProp = nextProps[propKey];\n var lastProp = lastProps != null ? lastProps[propKey] : undefined;\n if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {\n continue;\n }\n if (propKey === STYLE$1) {\n {\n if (nextProp) {\n // Freeze the next style object so that we can assume it won't be\n // mutated. We have already warned for this in the past.\n Object.freeze(nextProp);\n }\n }\n if (lastProp) {\n // Unset styles on `lastProp` but not on `nextProp`.\n for (styleName in lastProp) {\n if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n // Update styles that changed since `lastProp`.\n for (styleName in nextProp) {\n if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = nextProp[styleName];\n }\n }\n } else {\n // Relies on `updateStylesByID` not mutating `styleUpdates`.\n if (!styleUpdates) {\n if (!updatePayload) {\n updatePayload = [];\n }\n updatePayload.push(propKey, styleUpdates);\n }\n styleUpdates = nextProp;\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n var nextHtml = nextProp ? nextProp[HTML] : undefined;\n var lastHtml = lastProp ? lastProp[HTML] : undefined;\n if (nextHtml != null) {\n if (lastHtml !== nextHtml) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextHtml);\n }\n } else {\n // TODO: It might be too late to clear this if we have children\n // inserted already.\n }\n } else if (propKey === CHILDREN) {\n if (lastProp !== nextProp && (typeof nextProp === 'string' || typeof nextProp === 'number')) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextProp);\n }\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n // We eagerly listen to this even though we haven't committed yet.\n if (true && typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n ensureListeningTo(rootContainerElement, propKey);\n }\n if (!updatePayload && lastProp !== nextProp) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" props pointer gets updated so we need a commit\n // to update this element.\n updatePayload = [];\n }\n } else {\n // For any other property we always add it to the queue and then we\n // filter it out using the whitelist during the commit.\n (updatePayload = updatePayload || []).push(propKey, nextProp);\n }\n }\n if (styleUpdates) {\n {\n validateShorthandPropertyCollisionInDev(styleUpdates, nextProps[STYLE$1]);\n }\n (updatePayload = updatePayload || []).push(STYLE$1, styleUpdates);\n }\n return updatePayload;\n}", "function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {\n {\n validatePropertiesInDevelopment(tag, nextRawProps);\n }\n\n var updatePayload = null;\n\n var lastProps = void 0;\n var nextProps = void 0;\n switch (tag) {\n case 'input':\n lastProps = getHostProps(domElement, lastRawProps);\n nextProps = getHostProps(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'option':\n lastProps = getHostProps$1(domElement, lastRawProps);\n nextProps = getHostProps$1(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'select':\n lastProps = getHostProps$2(domElement, lastRawProps);\n nextProps = getHostProps$2(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'textarea':\n lastProps = getHostProps$3(domElement, lastRawProps);\n nextProps = getHostProps$3(domElement, nextRawProps);\n updatePayload = [];\n break;\n default:\n lastProps = lastRawProps;\n nextProps = nextRawProps;\n if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(domElement);\n }\n break;\n }\n\n assertValidProps(tag, nextProps);\n\n var propKey = void 0;\n var styleName = void 0;\n var styleUpdates = null;\n for (propKey in lastProps) {\n if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {\n continue;\n }\n if (propKey === STYLE$1) {\n var lastStyle = lastProps[propKey];\n for (styleName in lastStyle) {\n if (lastStyle.hasOwnProperty(styleName)) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) {\n // Noop. This is handled by the clear text mechanism.\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (propKey === AUTOFOCUS) {\n // Noop. It doesn't work on updates anyway.\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" fiber pointer gets updated so we need a commit\n // to update this element.\n if (!updatePayload) {\n updatePayload = [];\n }\n } else {\n // For all other deleted properties we add it to the queue. We use\n // the whitelist in the commit phase instead.\n (updatePayload = updatePayload || []).push(propKey, null);\n }\n }\n for (propKey in nextProps) {\n var nextProp = nextProps[propKey];\n var lastProp = lastProps != null ? lastProps[propKey] : undefined;\n if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {\n continue;\n }\n if (propKey === STYLE$1) {\n {\n if (nextProp) {\n // Freeze the next style object so that we can assume it won't be\n // mutated. We have already warned for this in the past.\n Object.freeze(nextProp);\n }\n }\n if (lastProp) {\n // Unset styles on `lastProp` but not on `nextProp`.\n for (styleName in lastProp) {\n if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n // Update styles that changed since `lastProp`.\n for (styleName in nextProp) {\n if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = nextProp[styleName];\n }\n }\n } else {\n // Relies on `updateStylesByID` not mutating `styleUpdates`.\n if (!styleUpdates) {\n if (!updatePayload) {\n updatePayload = [];\n }\n updatePayload.push(propKey, styleUpdates);\n }\n styleUpdates = nextProp;\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n var nextHtml = nextProp ? nextProp[HTML] : undefined;\n var lastHtml = lastProp ? lastProp[HTML] : undefined;\n if (nextHtml != null) {\n if (lastHtml !== nextHtml) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextHtml);\n }\n } else {\n // TODO: It might be too late to clear this if we have children\n // inserted already.\n }\n } else if (propKey === CHILDREN) {\n if (lastProp !== nextProp && (typeof nextProp === 'string' || typeof nextProp === 'number')) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextProp);\n }\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n // We eagerly listen to this even though we haven't committed yet.\n if ( true && typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n ensureListeningTo(rootContainerElement, propKey);\n }\n if (!updatePayload && lastProp !== nextProp) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" props pointer gets updated so we need a commit\n // to update this element.\n updatePayload = [];\n }\n } else {\n // For any other property we always add it to the queue and then we\n // filter it out using the whitelist during the commit.\n (updatePayload = updatePayload || []).push(propKey, nextProp);\n }\n }\n if (styleUpdates) {\n {\n validateShorthandPropertyCollisionInDev(styleUpdates, nextProps[STYLE$1]);\n }\n (updatePayload = updatePayload || []).push(STYLE$1, styleUpdates);\n }\n return updatePayload;\n}", "function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {\n {\n validatePropertiesInDevelopment(tag, nextRawProps);\n }\n\n var updatePayload = null;\n\n var lastProps = void 0;\n var nextProps = void 0;\n switch (tag) {\n case 'input':\n lastProps = getHostProps(domElement, lastRawProps);\n nextProps = getHostProps(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'option':\n lastProps = getHostProps$1(domElement, lastRawProps);\n nextProps = getHostProps$1(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'select':\n lastProps = getHostProps$2(domElement, lastRawProps);\n nextProps = getHostProps$2(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'textarea':\n lastProps = getHostProps$3(domElement, lastRawProps);\n nextProps = getHostProps$3(domElement, nextRawProps);\n updatePayload = [];\n break;\n default:\n lastProps = lastRawProps;\n nextProps = nextRawProps;\n if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(domElement);\n }\n break;\n }\n\n assertValidProps(tag, nextProps);\n\n var propKey = void 0;\n var styleName = void 0;\n var styleUpdates = null;\n for (propKey in lastProps) {\n if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {\n continue;\n }\n if (propKey === STYLE$1) {\n var lastStyle = lastProps[propKey];\n for (styleName in lastStyle) {\n if (lastStyle.hasOwnProperty(styleName)) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) {\n // Noop. This is handled by the clear text mechanism.\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (propKey === AUTOFOCUS) {\n // Noop. It doesn't work on updates anyway.\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" fiber pointer gets updated so we need a commit\n // to update this element.\n if (!updatePayload) {\n updatePayload = [];\n }\n } else {\n // For all other deleted properties we add it to the queue. We use\n // the whitelist in the commit phase instead.\n (updatePayload = updatePayload || []).push(propKey, null);\n }\n }\n for (propKey in nextProps) {\n var nextProp = nextProps[propKey];\n var lastProp = lastProps != null ? lastProps[propKey] : undefined;\n if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {\n continue;\n }\n if (propKey === STYLE$1) {\n {\n if (nextProp) {\n // Freeze the next style object so that we can assume it won't be\n // mutated. We have already warned for this in the past.\n Object.freeze(nextProp);\n }\n }\n if (lastProp) {\n // Unset styles on `lastProp` but not on `nextProp`.\n for (styleName in lastProp) {\n if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n // Update styles that changed since `lastProp`.\n for (styleName in nextProp) {\n if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = nextProp[styleName];\n }\n }\n } else {\n // Relies on `updateStylesByID` not mutating `styleUpdates`.\n if (!styleUpdates) {\n if (!updatePayload) {\n updatePayload = [];\n }\n updatePayload.push(propKey, styleUpdates);\n }\n styleUpdates = nextProp;\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n var nextHtml = nextProp ? nextProp[HTML] : undefined;\n var lastHtml = lastProp ? lastProp[HTML] : undefined;\n if (nextHtml != null) {\n if (lastHtml !== nextHtml) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextHtml);\n }\n } else {\n // TODO: It might be too late to clear this if we have children\n // inserted already.\n }\n } else if (propKey === CHILDREN) {\n if (lastProp !== nextProp && (typeof nextProp === 'string' || typeof nextProp === 'number')) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextProp);\n }\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n // We eagerly listen to this even though we haven't committed yet.\n if (true && typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n ensureListeningTo(rootContainerElement, propKey);\n }\n if (!updatePayload && lastProp !== nextProp) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" props pointer gets updated so we need a commit\n // to update this element.\n updatePayload = [];\n }\n } else {\n // For any other property we always add it to the queue and then we\n // filter it out using the whitelist during the commit.\n (updatePayload = updatePayload || []).push(propKey, nextProp);\n }\n }\n if (styleUpdates) {\n (updatePayload = updatePayload || []).push(STYLE$1, styleUpdates);\n }\n return updatePayload;\n}", "function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {\n {\n validatePropertiesInDevelopment(tag, nextRawProps);\n }\n\n var updatePayload = null;\n\n var lastProps = void 0;\n var nextProps = void 0;\n switch (tag) {\n case 'input':\n lastProps = getHostProps(domElement, lastRawProps);\n nextProps = getHostProps(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'option':\n lastProps = getHostProps$1(domElement, lastRawProps);\n nextProps = getHostProps$1(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'select':\n lastProps = getHostProps$2(domElement, lastRawProps);\n nextProps = getHostProps$2(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'textarea':\n lastProps = getHostProps$3(domElement, lastRawProps);\n nextProps = getHostProps$3(domElement, nextRawProps);\n updatePayload = [];\n break;\n default:\n lastProps = lastRawProps;\n nextProps = nextRawProps;\n if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(domElement);\n }\n break;\n }\n\n assertValidProps(tag, nextProps);\n\n var propKey = void 0;\n var styleName = void 0;\n var styleUpdates = null;\n for (propKey in lastProps) {\n if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {\n continue;\n }\n if (propKey === STYLE$1) {\n var lastStyle = lastProps[propKey];\n for (styleName in lastStyle) {\n if (lastStyle.hasOwnProperty(styleName)) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) {\n // Noop. This is handled by the clear text mechanism.\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (propKey === AUTOFOCUS) {\n // Noop. It doesn't work on updates anyway.\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" fiber pointer gets updated so we need a commit\n // to update this element.\n if (!updatePayload) {\n updatePayload = [];\n }\n } else {\n // For all other deleted properties we add it to the queue. We use\n // the whitelist in the commit phase instead.\n (updatePayload = updatePayload || []).push(propKey, null);\n }\n }\n for (propKey in nextProps) {\n var nextProp = nextProps[propKey];\n var lastProp = lastProps != null ? lastProps[propKey] : undefined;\n if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {\n continue;\n }\n if (propKey === STYLE$1) {\n {\n if (nextProp) {\n // Freeze the next style object so that we can assume it won't be\n // mutated. We have already warned for this in the past.\n Object.freeze(nextProp);\n }\n }\n if (lastProp) {\n // Unset styles on `lastProp` but not on `nextProp`.\n for (styleName in lastProp) {\n if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n // Update styles that changed since `lastProp`.\n for (styleName in nextProp) {\n if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = nextProp[styleName];\n }\n }\n } else {\n // Relies on `updateStylesByID` not mutating `styleUpdates`.\n if (!styleUpdates) {\n if (!updatePayload) {\n updatePayload = [];\n }\n updatePayload.push(propKey, styleUpdates);\n }\n styleUpdates = nextProp;\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n var nextHtml = nextProp ? nextProp[HTML] : undefined;\n var lastHtml = lastProp ? lastProp[HTML] : undefined;\n if (nextHtml != null) {\n if (lastHtml !== nextHtml) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextHtml);\n }\n } else {\n // TODO: It might be too late to clear this if we have children\n // inserted already.\n }\n } else if (propKey === CHILDREN) {\n if (lastProp !== nextProp && (typeof nextProp === 'string' || typeof nextProp === 'number')) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextProp);\n }\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n // We eagerly listen to this even though we haven't committed yet.\n if ( true && typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n ensureListeningTo(rootContainerElement, propKey);\n }\n if (!updatePayload && lastProp !== nextProp) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" props pointer gets updated so we need a commit\n // to update this element.\n updatePayload = [];\n }\n } else {\n // For any other property we always add it to the queue and then we\n // filter it out using the whitelist during the commit.\n (updatePayload = updatePayload || []).push(propKey, nextProp);\n }\n }\n if (styleUpdates) {\n {\n validateShorthandPropertyCollisionInDev(styleUpdates, nextProps[STYLE$1]);\n }\n (updatePayload = updatePayload || []).push(STYLE$1, styleUpdates);\n }\n return updatePayload;\n}", "function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {\n {\n validatePropertiesInDevelopment(tag, nextRawProps);\n }\n\n var updatePayload = null;\n\n var lastProps = void 0;\n var nextProps = void 0;\n switch (tag) {\n case 'input':\n lastProps = getHostProps(domElement, lastRawProps);\n nextProps = getHostProps(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'option':\n lastProps = getHostProps$1(domElement, lastRawProps);\n nextProps = getHostProps$1(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'select':\n lastProps = getHostProps$2(domElement, lastRawProps);\n nextProps = getHostProps$2(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'textarea':\n lastProps = getHostProps$3(domElement, lastRawProps);\n nextProps = getHostProps$3(domElement, nextRawProps);\n updatePayload = [];\n break;\n default:\n lastProps = lastRawProps;\n nextProps = nextRawProps;\n if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(domElement);\n }\n break;\n }\n\n assertValidProps(tag, nextProps);\n\n var propKey = void 0;\n var styleName = void 0;\n var styleUpdates = null;\n for (propKey in lastProps) {\n if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {\n continue;\n }\n if (propKey === STYLE) {\n var lastStyle = lastProps[propKey];\n for (styleName in lastStyle) {\n if (lastStyle.hasOwnProperty(styleName)) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) {\n // Noop. This is handled by the clear text mechanism.\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (propKey === AUTOFOCUS) {\n // Noop. It doesn't work on updates anyway.\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" fiber pointer gets updated so we need a commit\n // to update this element.\n if (!updatePayload) {\n updatePayload = [];\n }\n } else {\n // For all other deleted properties we add it to the queue. We use\n // the whitelist in the commit phase instead.\n (updatePayload = updatePayload || []).push(propKey, null);\n }\n }\n for (propKey in nextProps) {\n var nextProp = nextProps[propKey];\n var lastProp = lastProps != null ? lastProps[propKey] : undefined;\n if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {\n continue;\n }\n if (propKey === STYLE) {\n {\n if (nextProp) {\n // Freeze the next style object so that we can assume it won't be\n // mutated. We have already warned for this in the past.\n Object.freeze(nextProp);\n }\n }\n if (lastProp) {\n // Unset styles on `lastProp` but not on `nextProp`.\n for (styleName in lastProp) {\n if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n // Update styles that changed since `lastProp`.\n for (styleName in nextProp) {\n if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = nextProp[styleName];\n }\n }\n } else {\n // Relies on `updateStylesByID` not mutating `styleUpdates`.\n if (!styleUpdates) {\n if (!updatePayload) {\n updatePayload = [];\n }\n updatePayload.push(propKey, styleUpdates);\n }\n styleUpdates = nextProp;\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n var nextHtml = nextProp ? nextProp[HTML] : undefined;\n var lastHtml = lastProp ? lastProp[HTML] : undefined;\n if (nextHtml != null) {\n if (lastHtml !== nextHtml) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextHtml);\n }\n } else {\n // TODO: It might be too late to clear this if we have children\n // inserted already.\n }\n } else if (propKey === CHILDREN) {\n if (lastProp !== nextProp && (typeof nextProp === 'string' || typeof nextProp === 'number')) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextProp);\n }\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n // We eagerly listen to this even though we haven't committed yet.\n if (true && typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n ensureListeningTo(rootContainerElement, propKey);\n }\n if (!updatePayload && lastProp !== nextProp) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" props pointer gets updated so we need a commit\n // to update this element.\n updatePayload = [];\n }\n } else {\n // For any other property we always add it to the queue and then we\n // filter it out using the whitelist during the commit.\n (updatePayload = updatePayload || []).push(propKey, nextProp);\n }\n }\n if (styleUpdates) {\n (updatePayload = updatePayload || []).push(STYLE, styleUpdates);\n }\n return updatePayload;\n}", "function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {\n {\n validatePropertiesInDevelopment(tag, nextRawProps);\n }\n\n var updatePayload = null;\n\n var lastProps = void 0;\n var nextProps = void 0;\n switch (tag) {\n case 'input':\n lastProps = getHostProps(domElement, lastRawProps);\n nextProps = getHostProps(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'option':\n lastProps = getHostProps$1(domElement, lastRawProps);\n nextProps = getHostProps$1(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'select':\n lastProps = getHostProps$2(domElement, lastRawProps);\n nextProps = getHostProps$2(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'textarea':\n lastProps = getHostProps$3(domElement, lastRawProps);\n nextProps = getHostProps$3(domElement, nextRawProps);\n updatePayload = [];\n break;\n default:\n lastProps = lastRawProps;\n nextProps = nextRawProps;\n if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(domElement);\n }\n break;\n }\n\n assertValidProps(tag, nextProps);\n\n var propKey = void 0;\n var styleName = void 0;\n var styleUpdates = null;\n for (propKey in lastProps) {\n if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {\n continue;\n }\n if (propKey === STYLE) {\n var lastStyle = lastProps[propKey];\n for (styleName in lastStyle) {\n if (lastStyle.hasOwnProperty(styleName)) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) {\n // Noop. This is handled by the clear text mechanism.\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (propKey === AUTOFOCUS) {\n // Noop. It doesn't work on updates anyway.\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" fiber pointer gets updated so we need a commit\n // to update this element.\n if (!updatePayload) {\n updatePayload = [];\n }\n } else {\n // For all other deleted properties we add it to the queue. We use\n // the whitelist in the commit phase instead.\n (updatePayload = updatePayload || []).push(propKey, null);\n }\n }\n for (propKey in nextProps) {\n var nextProp = nextProps[propKey];\n var lastProp = lastProps != null ? lastProps[propKey] : undefined;\n if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {\n continue;\n }\n if (propKey === STYLE) {\n {\n if (nextProp) {\n // Freeze the next style object so that we can assume it won't be\n // mutated. We have already warned for this in the past.\n Object.freeze(nextProp);\n }\n }\n if (lastProp) {\n // Unset styles on `lastProp` but not on `nextProp`.\n for (styleName in lastProp) {\n if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n // Update styles that changed since `lastProp`.\n for (styleName in nextProp) {\n if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = nextProp[styleName];\n }\n }\n } else {\n // Relies on `updateStylesByID` not mutating `styleUpdates`.\n if (!styleUpdates) {\n if (!updatePayload) {\n updatePayload = [];\n }\n updatePayload.push(propKey, styleUpdates);\n }\n styleUpdates = nextProp;\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n var nextHtml = nextProp ? nextProp[HTML] : undefined;\n var lastHtml = lastProp ? lastProp[HTML] : undefined;\n if (nextHtml != null) {\n if (lastHtml !== nextHtml) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextHtml);\n }\n } else {\n // TODO: It might be too late to clear this if we have children\n // inserted already.\n }\n } else if (propKey === CHILDREN) {\n if (lastProp !== nextProp && (typeof nextProp === 'string' || typeof nextProp === 'number')) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextProp);\n }\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n // We eagerly listen to this even though we haven't committed yet.\n if (true && typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n ensureListeningTo(rootContainerElement, propKey);\n }\n if (!updatePayload && lastProp !== nextProp) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" props pointer gets updated so we need a commit\n // to update this element.\n updatePayload = [];\n }\n } else {\n // For any other property we always add it to the queue and then we\n // filter it out using the whitelist during the commit.\n (updatePayload = updatePayload || []).push(propKey, nextProp);\n }\n }\n if (styleUpdates) {\n (updatePayload = updatePayload || []).push(STYLE, styleUpdates);\n }\n return updatePayload;\n}", "function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {\n {\n validatePropertiesInDevelopment(tag, nextRawProps);\n }\n\n var updatePayload = null;\n\n var lastProps = void 0;\n var nextProps = void 0;\n switch (tag) {\n case 'input':\n lastProps = getHostProps(domElement, lastRawProps);\n nextProps = getHostProps(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'option':\n lastProps = getHostProps$1(domElement, lastRawProps);\n nextProps = getHostProps$1(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'select':\n lastProps = getHostProps$2(domElement, lastRawProps);\n nextProps = getHostProps$2(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'textarea':\n lastProps = getHostProps$3(domElement, lastRawProps);\n nextProps = getHostProps$3(domElement, nextRawProps);\n updatePayload = [];\n break;\n default:\n lastProps = lastRawProps;\n nextProps = nextRawProps;\n if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(domElement);\n }\n break;\n }\n\n assertValidProps(tag, nextProps);\n\n var propKey = void 0;\n var styleName = void 0;\n var styleUpdates = null;\n for (propKey in lastProps) {\n if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {\n continue;\n }\n if (propKey === STYLE) {\n var lastStyle = lastProps[propKey];\n for (styleName in lastStyle) {\n if (lastStyle.hasOwnProperty(styleName)) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) {\n // Noop. This is handled by the clear text mechanism.\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (propKey === AUTOFOCUS) {\n // Noop. It doesn't work on updates anyway.\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" fiber pointer gets updated so we need a commit\n // to update this element.\n if (!updatePayload) {\n updatePayload = [];\n }\n } else {\n // For all other deleted properties we add it to the queue. We use\n // the whitelist in the commit phase instead.\n (updatePayload = updatePayload || []).push(propKey, null);\n }\n }\n for (propKey in nextProps) {\n var nextProp = nextProps[propKey];\n var lastProp = lastProps != null ? lastProps[propKey] : undefined;\n if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {\n continue;\n }\n if (propKey === STYLE) {\n {\n if (nextProp) {\n // Freeze the next style object so that we can assume it won't be\n // mutated. We have already warned for this in the past.\n Object.freeze(nextProp);\n }\n }\n if (lastProp) {\n // Unset styles on `lastProp` but not on `nextProp`.\n for (styleName in lastProp) {\n if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n // Update styles that changed since `lastProp`.\n for (styleName in nextProp) {\n if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = nextProp[styleName];\n }\n }\n } else {\n // Relies on `updateStylesByID` not mutating `styleUpdates`.\n if (!styleUpdates) {\n if (!updatePayload) {\n updatePayload = [];\n }\n updatePayload.push(propKey, styleUpdates);\n }\n styleUpdates = nextProp;\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n var nextHtml = nextProp ? nextProp[HTML] : undefined;\n var lastHtml = lastProp ? lastProp[HTML] : undefined;\n if (nextHtml != null) {\n if (lastHtml !== nextHtml) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextHtml);\n }\n } else {\n // TODO: It might be too late to clear this if we have children\n // inserted already.\n }\n } else if (propKey === CHILDREN) {\n if (lastProp !== nextProp && (typeof nextProp === 'string' || typeof nextProp === 'number')) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextProp);\n }\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n // We eagerly listen to this even though we haven't committed yet.\n if (true && typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n ensureListeningTo(rootContainerElement, propKey);\n }\n if (!updatePayload && lastProp !== nextProp) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" props pointer gets updated so we need a commit\n // to update this element.\n updatePayload = [];\n }\n } else {\n // For any other property we always add it to the queue and then we\n // filter it out using the whitelist during the commit.\n (updatePayload = updatePayload || []).push(propKey, nextProp);\n }\n }\n if (styleUpdates) {\n (updatePayload = updatePayload || []).push(STYLE, styleUpdates);\n }\n return updatePayload;\n}", "function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {\n {\n validatePropertiesInDevelopment(tag, nextRawProps);\n }\n\n var updatePayload = null;\n\n var lastProps = void 0;\n var nextProps = void 0;\n switch (tag) {\n case 'input':\n lastProps = getHostProps(domElement, lastRawProps);\n nextProps = getHostProps(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'option':\n lastProps = getHostProps$1(domElement, lastRawProps);\n nextProps = getHostProps$1(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'select':\n lastProps = getHostProps$2(domElement, lastRawProps);\n nextProps = getHostProps$2(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'textarea':\n lastProps = getHostProps$3(domElement, lastRawProps);\n nextProps = getHostProps$3(domElement, nextRawProps);\n updatePayload = [];\n break;\n default:\n lastProps = lastRawProps;\n nextProps = nextRawProps;\n if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(domElement);\n }\n break;\n }\n\n assertValidProps(tag, nextProps);\n\n var propKey = void 0;\n var styleName = void 0;\n var styleUpdates = null;\n for (propKey in lastProps) {\n if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {\n continue;\n }\n if (propKey === STYLE) {\n var lastStyle = lastProps[propKey];\n for (styleName in lastStyle) {\n if (lastStyle.hasOwnProperty(styleName)) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) {\n // Noop. This is handled by the clear text mechanism.\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (propKey === AUTOFOCUS) {\n // Noop. It doesn't work on updates anyway.\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" fiber pointer gets updated so we need a commit\n // to update this element.\n if (!updatePayload) {\n updatePayload = [];\n }\n } else {\n // For all other deleted properties we add it to the queue. We use\n // the whitelist in the commit phase instead.\n (updatePayload = updatePayload || []).push(propKey, null);\n }\n }\n for (propKey in nextProps) {\n var nextProp = nextProps[propKey];\n var lastProp = lastProps != null ? lastProps[propKey] : undefined;\n if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {\n continue;\n }\n if (propKey === STYLE) {\n {\n if (nextProp) {\n // Freeze the next style object so that we can assume it won't be\n // mutated. We have already warned for this in the past.\n Object.freeze(nextProp);\n }\n }\n if (lastProp) {\n // Unset styles on `lastProp` but not on `nextProp`.\n for (styleName in lastProp) {\n if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n // Update styles that changed since `lastProp`.\n for (styleName in nextProp) {\n if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = nextProp[styleName];\n }\n }\n } else {\n // Relies on `updateStylesByID` not mutating `styleUpdates`.\n if (!styleUpdates) {\n if (!updatePayload) {\n updatePayload = [];\n }\n updatePayload.push(propKey, styleUpdates);\n }\n styleUpdates = nextProp;\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n var nextHtml = nextProp ? nextProp[HTML] : undefined;\n var lastHtml = lastProp ? lastProp[HTML] : undefined;\n if (nextHtml != null) {\n if (lastHtml !== nextHtml) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextHtml);\n }\n } else {\n // TODO: It might be too late to clear this if we have children\n // inserted already.\n }\n } else if (propKey === CHILDREN) {\n if (lastProp !== nextProp && (typeof nextProp === 'string' || typeof nextProp === 'number')) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextProp);\n }\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n // We eagerly listen to this even though we haven't committed yet.\n if (true && typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n ensureListeningTo(rootContainerElement, propKey);\n }\n if (!updatePayload && lastProp !== nextProp) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" props pointer gets updated so we need a commit\n // to update this element.\n updatePayload = [];\n }\n } else {\n // For any other property we always add it to the queue and then we\n // filter it out using the whitelist during the commit.\n (updatePayload = updatePayload || []).push(propKey, nextProp);\n }\n }\n if (styleUpdates) {\n (updatePayload = updatePayload || []).push(STYLE, styleUpdates);\n }\n return updatePayload;\n}", "function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {\n {\n validatePropertiesInDevelopment(tag, nextRawProps);\n }\n\n var updatePayload = null;\n\n var lastProps = void 0;\n var nextProps = void 0;\n switch (tag) {\n case 'input':\n lastProps = getHostProps(domElement, lastRawProps);\n nextProps = getHostProps(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'option':\n lastProps = getHostProps$1(domElement, lastRawProps);\n nextProps = getHostProps$1(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'select':\n lastProps = getHostProps$2(domElement, lastRawProps);\n nextProps = getHostProps$2(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'textarea':\n lastProps = getHostProps$3(domElement, lastRawProps);\n nextProps = getHostProps$3(domElement, nextRawProps);\n updatePayload = [];\n break;\n default:\n lastProps = lastRawProps;\n nextProps = nextRawProps;\n if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(domElement);\n }\n break;\n }\n\n assertValidProps(tag, nextProps);\n\n var propKey = void 0;\n var styleName = void 0;\n var styleUpdates = null;\n for (propKey in lastProps) {\n if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {\n continue;\n }\n if (propKey === STYLE) {\n var lastStyle = lastProps[propKey];\n for (styleName in lastStyle) {\n if (lastStyle.hasOwnProperty(styleName)) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) {\n // Noop. This is handled by the clear text mechanism.\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (propKey === AUTOFOCUS) {\n // Noop. It doesn't work on updates anyway.\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" fiber pointer gets updated so we need a commit\n // to update this element.\n if (!updatePayload) {\n updatePayload = [];\n }\n } else {\n // For all other deleted properties we add it to the queue. We use\n // the whitelist in the commit phase instead.\n (updatePayload = updatePayload || []).push(propKey, null);\n }\n }\n for (propKey in nextProps) {\n var nextProp = nextProps[propKey];\n var lastProp = lastProps != null ? lastProps[propKey] : undefined;\n if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {\n continue;\n }\n if (propKey === STYLE) {\n {\n if (nextProp) {\n // Freeze the next style object so that we can assume it won't be\n // mutated. We have already warned for this in the past.\n Object.freeze(nextProp);\n }\n }\n if (lastProp) {\n // Unset styles on `lastProp` but not on `nextProp`.\n for (styleName in lastProp) {\n if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n // Update styles that changed since `lastProp`.\n for (styleName in nextProp) {\n if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = nextProp[styleName];\n }\n }\n } else {\n // Relies on `updateStylesByID` not mutating `styleUpdates`.\n if (!styleUpdates) {\n if (!updatePayload) {\n updatePayload = [];\n }\n updatePayload.push(propKey, styleUpdates);\n }\n styleUpdates = nextProp;\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n var nextHtml = nextProp ? nextProp[HTML] : undefined;\n var lastHtml = lastProp ? lastProp[HTML] : undefined;\n if (nextHtml != null) {\n if (lastHtml !== nextHtml) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextHtml);\n }\n } else {\n // TODO: It might be too late to clear this if we have children\n // inserted already.\n }\n } else if (propKey === CHILDREN) {\n if (lastProp !== nextProp && (typeof nextProp === 'string' || typeof nextProp === 'number')) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextProp);\n }\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n // We eagerly listen to this even though we haven't committed yet.\n if (true && typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n ensureListeningTo(rootContainerElement, propKey);\n }\n if (!updatePayload && lastProp !== nextProp) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" props pointer gets updated so we need a commit\n // to update this element.\n updatePayload = [];\n }\n } else {\n // For any other property we always add it to the queue and then we\n // filter it out using the whitelist during the commit.\n (updatePayload = updatePayload || []).push(propKey, nextProp);\n }\n }\n if (styleUpdates) {\n (updatePayload = updatePayload || []).push(STYLE, styleUpdates);\n }\n return updatePayload;\n}", "function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {\n {\n validatePropertiesInDevelopment(tag, nextRawProps);\n }\n\n var updatePayload = null;\n\n var lastProps = void 0;\n var nextProps = void 0;\n switch (tag) {\n case 'input':\n lastProps = getHostProps(domElement, lastRawProps);\n nextProps = getHostProps(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'option':\n lastProps = getHostProps$1(domElement, lastRawProps);\n nextProps = getHostProps$1(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'select':\n lastProps = getHostProps$2(domElement, lastRawProps);\n nextProps = getHostProps$2(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'textarea':\n lastProps = getHostProps$3(domElement, lastRawProps);\n nextProps = getHostProps$3(domElement, nextRawProps);\n updatePayload = [];\n break;\n default:\n lastProps = lastRawProps;\n nextProps = nextRawProps;\n if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(domElement);\n }\n break;\n }\n\n assertValidProps(tag, nextProps);\n\n var propKey = void 0;\n var styleName = void 0;\n var styleUpdates = null;\n for (propKey in lastProps) {\n if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {\n continue;\n }\n if (propKey === STYLE) {\n var lastStyle = lastProps[propKey];\n for (styleName in lastStyle) {\n if (lastStyle.hasOwnProperty(styleName)) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) {\n // Noop. This is handled by the clear text mechanism.\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (propKey === AUTOFOCUS) {\n // Noop. It doesn't work on updates anyway.\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" fiber pointer gets updated so we need a commit\n // to update this element.\n if (!updatePayload) {\n updatePayload = [];\n }\n } else {\n // For all other deleted properties we add it to the queue. We use\n // the whitelist in the commit phase instead.\n (updatePayload = updatePayload || []).push(propKey, null);\n }\n }\n for (propKey in nextProps) {\n var nextProp = nextProps[propKey];\n var lastProp = lastProps != null ? lastProps[propKey] : undefined;\n if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {\n continue;\n }\n if (propKey === STYLE) {\n {\n if (nextProp) {\n // Freeze the next style object so that we can assume it won't be\n // mutated. We have already warned for this in the past.\n Object.freeze(nextProp);\n }\n }\n if (lastProp) {\n // Unset styles on `lastProp` but not on `nextProp`.\n for (styleName in lastProp) {\n if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n // Update styles that changed since `lastProp`.\n for (styleName in nextProp) {\n if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = nextProp[styleName];\n }\n }\n } else {\n // Relies on `updateStylesByID` not mutating `styleUpdates`.\n if (!styleUpdates) {\n if (!updatePayload) {\n updatePayload = [];\n }\n updatePayload.push(propKey, styleUpdates);\n }\n styleUpdates = nextProp;\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n var nextHtml = nextProp ? nextProp[HTML] : undefined;\n var lastHtml = lastProp ? lastProp[HTML] : undefined;\n if (nextHtml != null) {\n if (lastHtml !== nextHtml) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextHtml);\n }\n } else {\n // TODO: It might be too late to clear this if we have children\n // inserted already.\n }\n } else if (propKey === CHILDREN) {\n if (lastProp !== nextProp && (typeof nextProp === 'string' || typeof nextProp === 'number')) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextProp);\n }\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n // We eagerly listen to this even though we haven't committed yet.\n if (true && typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n ensureListeningTo(rootContainerElement, propKey);\n }\n if (!updatePayload && lastProp !== nextProp) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" props pointer gets updated so we need a commit\n // to update this element.\n updatePayload = [];\n }\n } else {\n // For any other property we always add it to the queue and then we\n // filter it out using the whitelist during the commit.\n (updatePayload = updatePayload || []).push(propKey, nextProp);\n }\n }\n if (styleUpdates) {\n (updatePayload = updatePayload || []).push(STYLE, styleUpdates);\n }\n return updatePayload;\n}", "function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {\n {\n validatePropertiesInDevelopment(tag, nextRawProps);\n }\n\n var updatePayload = null;\n\n var lastProps = void 0;\n var nextProps = void 0;\n switch (tag) {\n case 'input':\n lastProps = getHostProps(domElement, lastRawProps);\n nextProps = getHostProps(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'option':\n lastProps = getHostProps$1(domElement, lastRawProps);\n nextProps = getHostProps$1(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'select':\n lastProps = getHostProps$2(domElement, lastRawProps);\n nextProps = getHostProps$2(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'textarea':\n lastProps = getHostProps$3(domElement, lastRawProps);\n nextProps = getHostProps$3(domElement, nextRawProps);\n updatePayload = [];\n break;\n default:\n lastProps = lastRawProps;\n nextProps = nextRawProps;\n if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(domElement);\n }\n break;\n }\n\n assertValidProps(tag, nextProps);\n\n var propKey = void 0;\n var styleName = void 0;\n var styleUpdates = null;\n for (propKey in lastProps) {\n if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {\n continue;\n }\n if (propKey === STYLE) {\n var lastStyle = lastProps[propKey];\n for (styleName in lastStyle) {\n if (lastStyle.hasOwnProperty(styleName)) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) {\n // Noop. This is handled by the clear text mechanism.\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (propKey === AUTOFOCUS) {\n // Noop. It doesn't work on updates anyway.\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" fiber pointer gets updated so we need a commit\n // to update this element.\n if (!updatePayload) {\n updatePayload = [];\n }\n } else {\n // For all other deleted properties we add it to the queue. We use\n // the whitelist in the commit phase instead.\n (updatePayload = updatePayload || []).push(propKey, null);\n }\n }\n for (propKey in nextProps) {\n var nextProp = nextProps[propKey];\n var lastProp = lastProps != null ? lastProps[propKey] : undefined;\n if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {\n continue;\n }\n if (propKey === STYLE) {\n {\n if (nextProp) {\n // Freeze the next style object so that we can assume it won't be\n // mutated. We have already warned for this in the past.\n Object.freeze(nextProp);\n }\n }\n if (lastProp) {\n // Unset styles on `lastProp` but not on `nextProp`.\n for (styleName in lastProp) {\n if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n // Update styles that changed since `lastProp`.\n for (styleName in nextProp) {\n if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = nextProp[styleName];\n }\n }\n } else {\n // Relies on `updateStylesByID` not mutating `styleUpdates`.\n if (!styleUpdates) {\n if (!updatePayload) {\n updatePayload = [];\n }\n updatePayload.push(propKey, styleUpdates);\n }\n styleUpdates = nextProp;\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n var nextHtml = nextProp ? nextProp[HTML] : undefined;\n var lastHtml = lastProp ? lastProp[HTML] : undefined;\n if (nextHtml != null) {\n if (lastHtml !== nextHtml) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextHtml);\n }\n } else {\n // TODO: It might be too late to clear this if we have children\n // inserted already.\n }\n } else if (propKey === CHILDREN) {\n if (lastProp !== nextProp && (typeof nextProp === 'string' || typeof nextProp === 'number')) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextProp);\n }\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n // We eagerly listen to this even though we haven't committed yet.\n if (true && typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n ensureListeningTo(rootContainerElement, propKey);\n }\n if (!updatePayload && lastProp !== nextProp) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" props pointer gets updated so we need a commit\n // to update this element.\n updatePayload = [];\n }\n } else {\n // For any other property we always add it to the queue and then we\n // filter it out using the whitelist during the commit.\n (updatePayload = updatePayload || []).push(propKey, nextProp);\n }\n }\n if (styleUpdates) {\n (updatePayload = updatePayload || []).push(STYLE, styleUpdates);\n }\n return updatePayload;\n}", "function shouldComponentUpdate(nextProps, nextState) {\n return !areEqual(this.props, nextProps) || shallowDiffers(this.state, nextState);\n}", "shouldComponentUpdate(newProps, newState) {\n console.log('Component Should UPDATE!', this.props);\n console.log('newProps: ', newProps);\n console.log('newState: ', newState);\n return true;\n }", "function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {\n {\n validatePropertiesInDevelopment(tag, nextRawProps);\n }\n\n var updatePayload = null;\n\n var lastProps = void 0;\n var nextProps = void 0;\n switch (tag) {\n case 'input':\n lastProps = getHostProps(domElement, lastRawProps);\n nextProps = getHostProps(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'option':\n lastProps = getHostProps$1(domElement, lastRawProps);\n nextProps = getHostProps$1(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'select':\n lastProps = getHostProps$2(domElement, lastRawProps);\n nextProps = getHostProps$2(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'textarea':\n lastProps = getHostProps$3(domElement, lastRawProps);\n nextProps = getHostProps$3(domElement, nextRawProps);\n updatePayload = [];\n break;\n default:\n lastProps = lastRawProps;\n nextProps = nextRawProps;\n if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(domElement);\n }\n break;\n }\n\n assertValidProps(tag, nextProps);\n\n var propKey = void 0;\n var styleName = void 0;\n var styleUpdates = null;\n for (propKey in lastProps) {\n if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {\n continue;\n }\n if (propKey === STYLE$1) {\n var lastStyle = lastProps[propKey];\n for (styleName in lastStyle) {\n if (lastStyle.hasOwnProperty(styleName)) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) {\n // Noop. This is handled by the clear text mechanism.\n } else if (enableFlareAPI && propKey === LISTENERS || propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (propKey === AUTOFOCUS) {\n // Noop. It doesn't work on updates anyway.\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" fiber pointer gets updated so we need a commit\n // to update this element.\n if (!updatePayload) {\n updatePayload = [];\n }\n } else {\n // For all other deleted properties we add it to the queue. We use\n // the whitelist in the commit phase instead.\n (updatePayload = updatePayload || []).push(propKey, null);\n }\n }\n for (propKey in nextProps) {\n var nextProp = nextProps[propKey];\n var lastProp = lastProps != null ? lastProps[propKey] : undefined;\n if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {\n continue;\n }\n if (propKey === STYLE$1) {\n {\n if (nextProp) {\n // Freeze the next style object so that we can assume it won't be\n // mutated. We have already warned for this in the past.\n Object.freeze(nextProp);\n }\n }\n if (lastProp) {\n // Unset styles on `lastProp` but not on `nextProp`.\n for (styleName in lastProp) {\n if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n // Update styles that changed since `lastProp`.\n for (styleName in nextProp) {\n if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = nextProp[styleName];\n }\n }\n } else {\n // Relies on `updateStylesByID` not mutating `styleUpdates`.\n if (!styleUpdates) {\n if (!updatePayload) {\n updatePayload = [];\n }\n updatePayload.push(propKey, styleUpdates);\n }\n styleUpdates = nextProp;\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n var nextHtml = nextProp ? nextProp[HTML] : undefined;\n var lastHtml = lastProp ? lastProp[HTML] : undefined;\n if (nextHtml != null) {\n if (lastHtml !== nextHtml) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextHtml);\n }\n } else {\n // TODO: It might be too late to clear this if we have children\n // inserted already.\n }\n } else if (propKey === CHILDREN) {\n if (lastProp !== nextProp && (typeof nextProp === 'string' || typeof nextProp === 'number')) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextProp);\n }\n } else if (enableFlareAPI && propKey === LISTENERS || propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n // We eagerly listen to this even though we haven't committed yet.\n if ( true && typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n ensureListeningTo(rootContainerElement, propKey);\n }\n if (!updatePayload && lastProp !== nextProp) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" props pointer gets updated so we need a commit\n // to update this element.\n updatePayload = [];\n }\n } else {\n // For any other property we always add it to the queue and then we\n // filter it out using the whitelist during the commit.\n (updatePayload = updatePayload || []).push(propKey, nextProp);\n }\n }\n if (styleUpdates) {\n {\n validateShorthandPropertyCollisionInDev(styleUpdates, nextProps[STYLE$1]);\n }\n (updatePayload = updatePayload || []).push(STYLE$1, styleUpdates);\n }\n return updatePayload;\n}", "function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {\n {\n validatePropertiesInDevelopment(tag, nextRawProps);\n }\n\n var updatePayload = null;\n\n var lastProps = void 0;\n var nextProps = void 0;\n switch (tag) {\n case 'input':\n lastProps = getHostProps(domElement, lastRawProps);\n nextProps = getHostProps(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'option':\n lastProps = getHostProps$1(domElement, lastRawProps);\n nextProps = getHostProps$1(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'select':\n lastProps = getHostProps$2(domElement, lastRawProps);\n nextProps = getHostProps$2(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'textarea':\n lastProps = getHostProps$3(domElement, lastRawProps);\n nextProps = getHostProps$3(domElement, nextRawProps);\n updatePayload = [];\n break;\n default:\n lastProps = lastRawProps;\n nextProps = nextRawProps;\n if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(domElement);\n }\n break;\n }\n\n assertValidProps(tag, nextProps);\n\n var propKey = void 0;\n var styleName = void 0;\n var styleUpdates = null;\n for (propKey in lastProps) {\n if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {\n continue;\n }\n if (propKey === STYLE$1) {\n var lastStyle = lastProps[propKey];\n for (styleName in lastStyle) {\n if (lastStyle.hasOwnProperty(styleName)) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) {\n // Noop. This is handled by the clear text mechanism.\n } else if (enableFlareAPI && propKey === LISTENERS || propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (propKey === AUTOFOCUS) {\n // Noop. It doesn't work on updates anyway.\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" fiber pointer gets updated so we need a commit\n // to update this element.\n if (!updatePayload) {\n updatePayload = [];\n }\n } else {\n // For all other deleted properties we add it to the queue. We use\n // the whitelist in the commit phase instead.\n (updatePayload = updatePayload || []).push(propKey, null);\n }\n }\n for (propKey in nextProps) {\n var nextProp = nextProps[propKey];\n var lastProp = lastProps != null ? lastProps[propKey] : undefined;\n if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {\n continue;\n }\n if (propKey === STYLE$1) {\n {\n if (nextProp) {\n // Freeze the next style object so that we can assume it won't be\n // mutated. We have already warned for this in the past.\n Object.freeze(nextProp);\n }\n }\n if (lastProp) {\n // Unset styles on `lastProp` but not on `nextProp`.\n for (styleName in lastProp) {\n if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n // Update styles that changed since `lastProp`.\n for (styleName in nextProp) {\n if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = nextProp[styleName];\n }\n }\n } else {\n // Relies on `updateStylesByID` not mutating `styleUpdates`.\n if (!styleUpdates) {\n if (!updatePayload) {\n updatePayload = [];\n }\n updatePayload.push(propKey, styleUpdates);\n }\n styleUpdates = nextProp;\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n var nextHtml = nextProp ? nextProp[HTML] : undefined;\n var lastHtml = lastProp ? lastProp[HTML] : undefined;\n if (nextHtml != null) {\n if (lastHtml !== nextHtml) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextHtml);\n }\n } else {\n // TODO: It might be too late to clear this if we have children\n // inserted already.\n }\n } else if (propKey === CHILDREN) {\n if (lastProp !== nextProp && (typeof nextProp === 'string' || typeof nextProp === 'number')) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextProp);\n }\n } else if (enableFlareAPI && propKey === LISTENERS || propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {\n // Noop\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n // We eagerly listen to this even though we haven't committed yet.\n if ( true && typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n ensureListeningTo(rootContainerElement, propKey);\n }\n if (!updatePayload && lastProp !== nextProp) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" props pointer gets updated so we need a commit\n // to update this element.\n updatePayload = [];\n }\n } else {\n // For any other property we always add it to the queue and then we\n // filter it out using the whitelist during the commit.\n (updatePayload = updatePayload || []).push(propKey, nextProp);\n }\n }\n if (styleUpdates) {\n {\n validateShorthandPropertyCollisionInDev(styleUpdates, nextProps[STYLE$1]);\n }\n (updatePayload = updatePayload || []).push(STYLE$1, styleUpdates);\n }\n return updatePayload;\n}", "function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {\n {\n validatePropertiesInDevelopment(tag, nextRawProps);\n }\n\n var updatePayload = null;\n\n var lastProps = void 0;\n var nextProps = void 0;\n switch (tag) {\n case 'input':\n lastProps = getHostProps(domElement, lastRawProps);\n nextProps = getHostProps(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'option':\n lastProps = getHostProps$1(domElement, lastRawProps);\n nextProps = getHostProps$1(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'select':\n lastProps = getHostProps$2(domElement, lastRawProps);\n nextProps = getHostProps$2(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'textarea':\n lastProps = getHostProps$3(domElement, lastRawProps);\n nextProps = getHostProps$3(domElement, nextRawProps);\n updatePayload = [];\n break;\n default:\n lastProps = lastRawProps;\n nextProps = nextRawProps;\n if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(domElement);\n }\n break;\n }\n\n assertValidProps(tag, nextProps);\n\n var propKey = void 0;\n var styleName = void 0;\n var styleUpdates = null;\n for (propKey in lastProps) {\n if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {\n continue;\n }\n if (propKey === STYLE$1) {\n var lastStyle = lastProps[propKey];\n for (styleName in lastStyle) {\n if (lastStyle.hasOwnProperty(styleName)) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) ; else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) ; else if (propKey === AUTOFOCUS) ; else if (registrationNameModules.hasOwnProperty(propKey)) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" fiber pointer gets updated so we need a commit\n // to update this element.\n if (!updatePayload) {\n updatePayload = [];\n }\n } else {\n // For all other deleted properties we add it to the queue. We use\n // the whitelist in the commit phase instead.\n (updatePayload = updatePayload || []).push(propKey, null);\n }\n }\n for (propKey in nextProps) {\n var nextProp = nextProps[propKey];\n var lastProp = lastProps != null ? lastProps[propKey] : undefined;\n if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {\n continue;\n }\n if (propKey === STYLE$1) {\n {\n if (nextProp) {\n // Freeze the next style object so that we can assume it won't be\n // mutated. We have already warned for this in the past.\n Object.freeze(nextProp);\n }\n }\n if (lastProp) {\n // Unset styles on `lastProp` but not on `nextProp`.\n for (styleName in lastProp) {\n if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = '';\n }\n }\n // Update styles that changed since `lastProp`.\n for (styleName in nextProp) {\n if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n styleUpdates[styleName] = nextProp[styleName];\n }\n }\n } else {\n // Relies on `updateStylesByID` not mutating `styleUpdates`.\n if (!styleUpdates) {\n if (!updatePayload) {\n updatePayload = [];\n }\n updatePayload.push(propKey, styleUpdates);\n }\n styleUpdates = nextProp;\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n var nextHtml = nextProp ? nextProp[HTML] : undefined;\n var lastHtml = lastProp ? lastProp[HTML] : undefined;\n if (nextHtml != null) {\n if (lastHtml !== nextHtml) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextHtml);\n }\n }\n } else if (propKey === CHILDREN) {\n if (lastProp !== nextProp && (typeof nextProp === 'string' || typeof nextProp === 'number')) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextProp);\n }\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) ; else if (registrationNameModules.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n // We eagerly listen to this even though we haven't committed yet.\n if (typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n ensureListeningTo(rootContainerElement, propKey);\n }\n if (!updatePayload && lastProp !== nextProp) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" props pointer gets updated so we need a commit\n // to update this element.\n updatePayload = [];\n }\n } else {\n // For any other property we always add it to the queue and then we\n // filter it out using the whitelist during the commit.\n (updatePayload = updatePayload || []).push(propKey, nextProp);\n }\n }\n if (styleUpdates) {\n {\n validateShorthandPropertyCollisionInDev(styleUpdates, nextProps[STYLE$1]);\n }\n (updatePayload = updatePayload || []).push(STYLE$1, styleUpdates);\n }\n return updatePayload;\n}", "function shouldComponentUpdate(nextProps, nextState) {\n return !shallowEqual(this.props, nextProps) || !shallowEqual(this.state, nextState);\n}", "function shallowCompare(instance, nextProps, nextState) {\n return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState);\n}", "function shallowCompare(instance, nextProps, nextState) {\n return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState);\n}", "function shallowCompare(instance, nextProps, nextState) {\n return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState);\n}", "function shallowCompare(instance, nextProps, nextState) {\n return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState);\n}", "function shallowCompare(instance, nextProps, nextState) {\n return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState);\n}", "function shallowCompare(instance, nextProps, nextState) {\n return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState);\n}" ]
[ "0.7148955", "0.71309936", "0.71008986", "0.7022676", "0.64896524", "0.62703806", "0.6210929", "0.61837065", "0.6136289", "0.6065854", "0.6040945", "0.6032967", "0.5946066", "0.5941736", "0.5941736", "0.5883722", "0.5865939", "0.5819483", "0.5808472", "0.58005476", "0.57924974", "0.5786849", "0.57070357", "0.5686444", "0.56855184", "0.56855184", "0.56855184", "0.5681874", "0.5667429", "0.5665437", "0.5664625", "0.5664625", "0.5664625", "0.5660717", "0.56428283", "0.5609831", "0.5604141", "0.5599393", "0.55897516", "0.5573502", "0.55686903", "0.55686903", "0.5566519", "0.55517757", "0.55487204", "0.55487204", "0.55487204", "0.55487204", "0.55487204", "0.55487204", "0.55487204", "0.55487204", "0.55487204", "0.55487204", "0.55487204", "0.55345786", "0.55345786", "0.55345786", "0.55345786", "0.55345786", "0.55345786", "0.55345786", "0.55345786", "0.55345786", "0.55345786", "0.55345786", "0.55345786", "0.55345786", "0.55345786", "0.55345786", "0.55345786", "0.55345786", "0.55345786", "0.55345786", "0.55345786", "0.55345786", "0.55345786", "0.55345786", "0.55345786", "0.5532767", "0.5532767", "0.5532767", "0.5532767", "0.5532767", "0.5532767", "0.5532767", "0.5515923", "0.5514337", "0.55126226", "0.55126226", "0.5491829", "0.54846317", "0.54709876", "0.54709876", "0.54709876", "0.54709876", "0.54709876", "0.54709876" ]
0.7121926
4
shortcoming: won't remove plugins
function handlePlugins(inputs, calendar) { calendar.addPluginInputs(inputs); // will gracefully handle duplicates }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "deletePlugin() {}", "initPlugins() {}", "initPlugins() {}", "function clearPluginList() {\n $(\"#plugin-list #plugin-list-item\").remove();\n}", "function removePlugins() {\n\tconsole.log(\"list existing plugins:\");\n\texec(\"cordova plugin list\", function (error, stdout, stderr){\n\t\tconsole.log(stdout);\n\t});\n\t\t\n\t\t\n\tvar packageJSON = require('../../package.json');\n\t\n\tdelete packageJSON.cordovaPlugins;\n\t\n\n\tfs.writeFile('package.json', JSON.stringify(packageJSON, null, 2));\t\n\t\t\n\t\t\n\t\t\n\tvar rimraf = require(\"rimraf\");\n pluginlist.forEach(function(plug) {\n\t\tconsole.log(\"remove plugin \" + plug);\n\t\t/*\n\t\texec(\"cordova plugin rm \" + plug, function (error, stdout, stderr) {\n\t\t\tconsole.log(stdout);\n\t\t\tif (stderr != \"\") {\n\t\t\t\tconsole.log('stderr1 ' + stderr);\n\t\t\t\t//process.exit(1);\n\t\t\t} \n\t\t})\n\t\t*/\n\t\t//manually removing just to make sure\n\t\trimraf('plugins/'+plug, function() {\n \tconsole.log(\"Deleted plugin\");\n\t\t});\n\t});\n\t//cleanup plugins config(just to be safe)\n\trimraf('plugins/ios.json', function() {\n console.log(\"Deleted ios plugins config file\");\n });\n rimraf('plugins/android.json', function() {\n console.log(\"Deleted android plugins config file\");\n });\n \n\tcallback();\n \n\t\n}", "function clearPlugins() {\n\tlogger.entry(\"pluginLoader.clearPlugins\");\n\t\n\t// empty array\n\tplugins = [];\n\t\n\tlogger.exit(\"pluginLoader.clearPlugins\");\n}", "function pluginUnload() {\n\t\n\t\t\t// List of plugins that require detachment\n\t\t\tvar pluginList = ['.datepicker', '.rangepicker', '.colorpicker', '.rgbapicker', '.timepicker', '#graph'];\n\t\t\t\n\t\t\t// Cycle through each plugin and detach its handler\n\t\t\t$.each(pluginList, function(i, e) {\n\t\t\t\tif ($(e).length) {\n\t\t\t\t $(e).detach();\n\t\t\t\t};\n\t\t\t});\n\t\t}", "Destroy() {\n for (const key in this.plugins) {\n if (this.plugins.hasOwnProperty(key)) {\n const plugin = this.plugins[key];\n if(plugin.destroy){\n plugin.destroy();\n }\n }\n }\n }", "function UninstallPlugin()\n{\n let txt = \"¿Está seguro de querer desinstalar este plugin?\";\n let conf = confirm(txt);\n \n if(conf)\n {\n $.post(\"api/\",{uninstall_plugin: $(this).attr(\"plugin\")}).done(function(info)\n {\n console.log(info);\n if(info!=\"false\")\n toastInfo(\"Plugin desinstalado con éxito\")\n else\n toastInfo(\"No se pudo desinstalar el plugin\")\n $.get(\"api/?plugin_info\").done(function(data)\n {\n $(\".infoPlugin\").html(data);\n $(\".btn.side.plugin\").remove();\n var a = 0;\n let html = \"\";\n for(pl of JSON.parse(data))\n {\n if(pl.instance != undefined)\n {\n html += \"<button idPlugin=\"+a+\" class='btn side plugin'>\"+pl.name+\"</button>\"\n }\n a++;\n }\n $(\".infoPlugin\").after(html);\n Plugin();\n $(\".btn.side.plugin\").click(Clique);\n });\n });\n }\n}", "function clean() {\n wrappers.splice(0, wrappers.length);\n plugins.splice(0, plugins.length);\n}", "disablePlugin() {\n super.disablePlugin();\n }", "orderPlugins() {\r\n debug('orderPlugins:before', this.pluginNames);\r\n const runLast = this._plugins\r\n .filter(p => p.requirements.has('runLast'))\r\n .map(p => p.name);\r\n for (const name of runLast) {\r\n const index = this._plugins.findIndex(p => p.name === name);\r\n this._plugins.push(this._plugins.splice(index, 1)[0]);\r\n }\r\n debug('orderPlugins:after', this.pluginNames);\r\n }", "function removeAll() {\n data.components = {};\n data.plugins = [];\n}", "function finishPluginLoading() {\n channel.onPluginsReady.fire();\n}", "removePlugin(plugin) {\n const installedPlugin = this.plugins[plugin.id];\n if (!installedPlugin) {\n this.error(`Can't remove plugin - no plugin with this ID is installed: ${plugin.id}`);\n return;\n }\n if (installedPlugin !== plugin) {\n this.error(`Can't remove plugin - a different plugin is installed with this ID: ${plugin.id}`);\n return;\n }\n if (installedPlugin.clear) {\n installedPlugin.clear();\n }\n delete this.plugins[plugin.id];\n this.log(`Removed plugin: ${plugin.id}`);\n }", "discoverAddons(){\n this._super.discoverAddons.apply(this, arguments);\n delete this.addonPackages[\"in-repo-addon\"];\n delete this.addonPackages[\"in-repo-engine\"];\n delete this.addonPackages[\"in-repo-lazy-engine\"];\n }", "function unload() {\n // clean up any globals or other cruft before being removed before i get killed.\n console.log('unload layout plugin');\n }", "static plugin(...newPlugins) {\n var _a;\n\n const currentPlugins = this.plugins;\n const NewOctokit = (_a = class extends this {}, _a.plugins = currentPlugins.concat(newPlugins.filter(plugin => !currentPlugins.includes(plugin))), _a);\n return NewOctokit;\n }", "static plugin(...newPlugins) {\n var _a;\n\n const currentPlugins = this.plugins;\n const NewOctokit = (_a = class extends this {}, _a.plugins = currentPlugins.concat(newPlugins.filter(plugin => !currentPlugins.includes(plugin))), _a);\n return NewOctokit;\n }", "static plugin(...newPlugins) {\n var _a;\n\n const currentPlugins = this.plugins;\n const NewOctokit = (_a = class extends this {}, _a.plugins = currentPlugins.concat(newPlugins.filter(plugin => !currentPlugins.includes(plugin))), _a);\n return NewOctokit;\n }", "static plugin(...newPlugins) {\n var _a;\n\n const currentPlugins = this.plugins;\n const NewOctokit = (_a = class extends this {}, _a.plugins = currentPlugins.concat(newPlugins.filter(plugin => !currentPlugins.includes(plugin))), _a);\n return NewOctokit;\n }", "static plugin(...newPlugins) {\n var _a;\n\n const currentPlugins = this.plugins;\n const NewOctokit = (_a = class extends this {}, _a.plugins = currentPlugins.concat(newPlugins.filter(plugin => !currentPlugins.includes(plugin))), _a);\n return NewOctokit;\n }", "static plugin(...newPlugins) {\n var _a;\n\n const currentPlugins = this.plugins;\n const NewOctokit = (_a = class extends this {}, _a.plugins = currentPlugins.concat(newPlugins.filter(plugin => !currentPlugins.includes(plugin))), _a);\n return NewOctokit;\n }", "static plugin(...newPlugins) {\n var _a;\n\n const currentPlugins = this.plugins;\n const NewOctokit = (_a = class extends this {}, _a.plugins = currentPlugins.concat(newPlugins.filter(plugin => !currentPlugins.includes(plugin))), _a);\n return NewOctokit;\n }", "static plugin(...newPlugins) {\n var _a;\n\n const currentPlugins = this.plugins;\n const NewOctokit = (_a = class extends this {}, _a.plugins = currentPlugins.concat(newPlugins.filter(plugin => !currentPlugins.includes(plugin))), _a);\n return NewOctokit;\n }", "static plugin(...newPlugins) {\n var _a;\n\n const currentPlugins = this.plugins;\n const NewOctokit = (_a = class extends this {}, _a.plugins = currentPlugins.concat(newPlugins.filter(plugin => !currentPlugins.includes(plugin))), _a);\n return NewOctokit;\n }", "static plugin(...newPlugins) {\n var _a;\n\n const currentPlugins = this.plugins;\n const NewOctokit = (_a = class extends this {}, _a.plugins = currentPlugins.concat(newPlugins.filter(plugin => !currentPlugins.includes(plugin))), _a);\n return NewOctokit;\n }", "static plugin(...newPlugins) {\n var _a;\n\n const currentPlugins = this.plugins;\n const NewOctokit = (_a = class extends this {}, _a.plugins = currentPlugins.concat(newPlugins.filter(plugin => !currentPlugins.includes(plugin))), _a);\n return NewOctokit;\n }", "delete() {\n delete Plugin._plugins[this.id];\n\n Promise.all([\n db.delete(\"Plugins\", {\n id: this.id\n })\n ]).then(() => {\n global.discotron.triggerEvent(\"plugin-deleted\", this.id);\n });\n }", "_initPlugins() {\n this.plugins.forEach(plugin => {\n if (plugin === 'ubiety-custom-texture' && !this.customTextureModule) {\n this.customTextureModule = new UbietyCustomTexture('ubiety-custom-texture', this, 'umjs-texture-factory');\n }\n else if (plugin === 'ubiety-text-editor' && !this.customTextEditorModule) {\n this.customTextEditorModule = new UbietyCustomTexture('ubiety-text-editor', this, 'umjs-text-image-factory');\n }\n else {\n console.error('Ubiety:: Either a plugin can\\'t be recognised, or it already exists.');\n }\n });\n }", "function BuildCleanerWebpackPlugin() {}", "_handleMigrations(jsPlugins, htmlPlugins) {\n return jsPlugins.filter(url => {\n const counterpart = url.replace(/\\.js$/, '.html');\n return !htmlPlugins.includes(counterpart);\n });\n }", "static plugin(...newPlugins) {\n var _a;\n const currentPlugins = this.plugins;\n const NewOctokit = (_a = class extends this {\n },\n _a.plugins = currentPlugins.concat(newPlugins.filter((plugin) => !currentPlugins.includes(plugin))),\n _a);\n return NewOctokit;\n }", "function getPlugins() {\n return plugins;\n}", "function initPlugin(state) {\n //console.log('state is back');\n var keys = Object.keys(__ocau_plugin.observers);\n \n keys.forEach(function(key) {\n var observer = __ocau_plugin.observers[key];\n if(!state[observer.state]) {\n //console.log('deleting', key);\n delete __ocau_plugin.observers[key];\n } else {\n //console.log('keeping', key);\n }\n });\n\n __ocau_plugin.loaded = true;\n}", "executePlugins() {\n if (this.executedPlugins) {\n this.plugins.forEach(({ fn, options }) => {\n if (options && options.recurring) {\n fn(this, false, options);\n }\n });\n }\n else {\n this.executedPlugins = true;\n this.plugins.forEach(({ fn, options }) => {\n fn(this, true, options);\n });\n }\n }", "resolvePluginDependencies() {\r\n // Request missing dependencies from all plugins and flatten to a single Set\r\n const missingPlugins = this._plugins\r\n .map(p => p._getMissingDependencies(this._plugins))\r\n .reduce((combined, list) => {\r\n return new Set([...combined, ...list]);\r\n }, new Set());\r\n if (!missingPlugins.size) {\r\n debug('no dependencies are missing');\r\n return;\r\n }\r\n debug('dependencies missing', missingPlugins);\r\n // Loop through all dependencies declared missing by plugins\r\n for (let name of [...missingPlugins]) {\r\n // Check if the dependency hasn't been registered as plugin already.\r\n // This might happen when multiple plugins have nested dependencies.\r\n if (this.pluginNames.includes(name)) {\r\n debug(`ignoring dependency '${name}', which has been required already.`);\r\n continue;\r\n }\r\n // We follow a plugin naming convention, but let's rather enforce it <3\r\n name = name.startsWith('puppeteer-extra-plugin')\r\n ? name\r\n : `puppeteer-extra-plugin-${name}`;\r\n // In case a module sub resource is requested print out the main package name\r\n // e.g. puppeteer-extra-plugin-stealth/evasions/console.debug => puppeteer-extra-plugin-stealth\r\n const packageName = name.split('/')[0];\r\n let dep = null;\r\n try {\r\n // Try to require and instantiate the stated dependency\r\n dep = require(name)();\r\n // Register it with `puppeteer-extra` as plugin\r\n this.use(dep);\r\n }\r\n catch (err) {\r\n console.warn(`\n A plugin listed '${name}' as dependency,\n which is currently missing. Please install it:\n\n yarn add ${packageName}\n\n Note: You don't need to require the plugin yourself,\n unless you want to modify it's default settings.\n `);\r\n throw err;\r\n }\r\n // Handle nested dependencies :D\r\n if (dep.dependencies.size) {\r\n this.resolvePluginDependencies();\r\n }\r\n }\r\n }", "function plugin_remove(id, checkboxes) {\n\tBootstrapDialog.confirm({\n\t\ttitle: 'Please confirm',\n\t\tmessage: 'Are you sure you want to remove the selected plugins?', \n\t\ttype: BootstrapDialog.TYPE_WARNING,\n\t\tcallback: function(result) {\n\t\t\tif (result) {\n\t\t\t\tplugin_emit(id, checkboxes, 'remove');\n\t\t\t}\n\t\t}\n\t});\n}", "cleanup() {\n installed = false;\n }", "unregisterPlugin(nameOrPluginKey) {\n if (this.isDestroyed) {\n return;\n }\n const name = typeof nameOrPluginKey === \"string\" ? `${nameOrPluginKey}$` : nameOrPluginKey.key;\n const state = this.state.reconfigure({\n // @ts-ignore\n plugins: this.state.plugins.filter((plugin) => !plugin.key.startsWith(name))\n });\n this.view.updateState(state);\n }", "close() {\n this.log(`Closing Uppy instance ${this.opts.id}: removing all files and uninstalling plugins`);\n this.reset();\n\n _classPrivateFieldLooseBase(this, _storeUnsubscribe)[_storeUnsubscribe]();\n\n this.iteratePlugins(plugin => {\n this.removePlugin(plugin);\n });\n\n if (typeof window !== 'undefined' && window.removeEventListener) {\n window.removeEventListener('online', _classPrivateFieldLooseBase(this, _updateOnlineStatus)[_updateOnlineStatus]);\n window.removeEventListener('offline', _classPrivateFieldLooseBase(this, _updateOnlineStatus)[_updateOnlineStatus]);\n }\n }", "_setPlugins() {\n\t\tvar currentIndex = this._browserifyPlugins.length - 1;\n\n\t\twhile (currentIndex >= 0) {\n\t\t\tconst currentPlugin = this._browserifyPlugins[currentIndex];\n\t\t\tcurrentIndex--;\n\t\t\tif (!currentPlugin ||\n\t\t\t\ttypeof (currentPlugin) !== 'object' ||\n\t\t\t\ttypeof (currentPlugin.plugin) !== 'function') {\n\t\t\t\tthis._eventBus.emit('warn', 'The browserify plugin has an incorrect interface, skipping...');\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tthis._appBundler.plugin(\n\t\t\t\tcurrentPlugin.plugin, currentPlugin.options\n\t\t\t);\n\t\t}\n\t}", "_setPlugins() {\n\t\tvar currentIndex = this._browserifyPlugins.length - 1;\n\n\t\twhile (currentIndex >= 0) {\n\t\t\tconst currentPlugin = this._browserifyPlugins[currentIndex];\n\t\t\tcurrentIndex--;\n\t\t\tif (!currentPlugin ||\n\t\t\t\ttypeof (currentPlugin) !== 'object' ||\n\t\t\t\ttypeof (currentPlugin.plugin) !== 'function') {\n\t\t\t\tthis._eventBus.emit('warn', 'The browserify plugin has an incorrect interface, skipping...');\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tthis._bundler.plugin(\n\t\t\t\tcurrentPlugin.plugin, currentPlugin.options\n\t\t\t);\n\t\t}\n\t}", "function pluginloaded()\n{\r\n}", "destroy() {\n this.currentPlugin.destroy();\n $(window).off('.zf.ResponsiveMenu');\n Foundation.unregisterPlugin(this);\n }", "function uuplugin() { // @return Array: [\"plugin-name\", ...]\r\n return uukeys(uuplugin);\r\n}", "function gbViewDidDisappear ()\n{\n\tpluginDidDisappear = true;\n}", "function ES7Plugin () { \n this.tags = undefined;\n}", "registerPlugins() {\r\n _(this.plugins)\r\n .pickBy(plugin => {\r\n return plugin.register;\r\n })\r\n .forEach(plugin => {\r\n this.slickGrid.registerPlugin(plugin.plugin);\r\n });\r\n }", "_addPlugins() {\n return cordova.cordova.raw.plugin('add', this.answers.plugins, { save: true })\n .then(() => {\n console.log(`add plugins ${this.answers.plugins}`);\n return true;\n })\n .catch((err) => {\n console.log(err.message);\n // process.exit();\n return err;\n });\n }", "function deactivate() {\n console.log('Plugin deactivated');\n}", "function handlePlugins(inputs, calendar) {\n calendar.addPluginInputs(inputs); // will gracefully handle duplicates\n}", "static deregister() {\n delete __WEBPACK_IMPORTED_MODULE_0__common_plugin__[\"a\" /* PLUGINS */][\"FSStorage\"];\n }", "function installPluginHiddenJS(){\n jQuery(\".hiddenActive\").each(function(){\n jQuery(this).click(function(){plugin_hidden_flip(this, false)});\n });\n\n jQuery(\".hiddenSinceBeginning\").each(function(){\n plugin_hidden_flip(this, true);\n });\n\n jQuery(\".hiddenSwitch\").each(function(){\n jQuery(this).click(function(){plugin_hidden_flipAll()});\n });\n}", "exit () {\n console.log('Loaded plugins')\n console.log('----------')\n }", "unregisterAllParts() {\n parts = [];\n }", "addPlugins() {\n const pm = PluginManager.getInstance();\n pm.addPlugin(new ElectronPlugin());\n }", "function movePluginListBack() {\n loadCurrentPageFromHTML();\n\n if (pluginListPage == 1) {\n return;\n }\n\n loadPluginListPage(pluginListPage - 1);\n}", "_useDefaultCacheabilityPluginIfNeeded() {\n let defaultPluginIndex = null;\n let cacheWillUpdatePluginCount = 0;\n\n for (const [index, plugin] of this.plugins.entries()) {\n // Ignore the copy redirected plugin when determining what to do.\n if (plugin === PrecacheStrategy.copyRedirectedCacheableResponsesPlugin) {\n continue;\n } // Save the default plugin's index, in case it needs to be removed.\n\n\n if (plugin === PrecacheStrategy.defaultPrecacheCacheabilityPlugin) {\n defaultPluginIndex = index;\n }\n\n if (plugin.cacheWillUpdate) {\n cacheWillUpdatePluginCount++;\n }\n }\n\n if (cacheWillUpdatePluginCount === 0) {\n this.plugins.push(PrecacheStrategy.defaultPrecacheCacheabilityPlugin);\n } else if (cacheWillUpdatePluginCount > 1 && defaultPluginIndex !== null) {\n // Only remove the default plugin; multiple custom plugins are allowed.\n this.plugins.splice(defaultPluginIndex, 1);\n } // Nothing needs to be done if cacheWillUpdatePluginCount is 1\n\n }", "destroy() {\n if (this.currentPlugin) this.currentPlugin.destroy();\n $(window).off('.zf.ResponsiveAccordionTabs');\n Foundation.unregisterPlugin(this);\n }", "function unuseAllThemes() {\n _Registry__WEBPACK_IMPORTED_MODULE_1__[\"registry\"].themes = [];\n}", "_checkMediaQueries() {\n var matchedMq, _this = this;\n // Iterate through each rule and find the last matching rule\n $.each(this.rules, function(key) {\n if (Foundation.MediaQuery.atLeast(key)) {\n matchedMq = key;\n }\n });\n\n // No match? No dice\n if (!matchedMq) return;\n\n // Plugin already initialized? We good\n if (this.currentPlugin instanceof this.rules[matchedMq].plugin) return;\n\n // Remove existing plugin-specific CSS classes\n $.each(MenuPlugins, function(key, value) {\n _this.$element.removeClass(value.cssClass);\n });\n\n // Add the CSS class for the new plugin\n this.$element.addClass(this.rules[matchedMq].cssClass);\n\n // Create an instance of the new plugin\n if (this.currentPlugin) {\n //don't know why but on nested elements data zfPlugin get's lost\n if (!this.currentPlugin.$element.data('zfPlugin') && this.storezfData) this.currentPlugin.$element.data('zfPlugin',this.storezfData);\n this.currentPlugin.destroy();\n }\n this._handleMarkup(this.rules[matchedMq].cssClass);\n this.currentPlugin = new this.rules[matchedMq].plugin(this.$element, {});\n this.storezfData = this.currentPlugin.$element.data('zfPlugin');\n\n }", "remove () {\n // cleanup\n }", "function s_postPlugins(s){if(typeof(s_meta)!=\"undefined\"){if(s_meta.access==\"gated\"){s.events=\"event19\";s.eVar27=s.pageName;}}if(s.pageName.indexOf(\"ocom:mobile\")!=-1&&location.href.indexOf(\"m.oracle.com/partners\")!=-1){s.pageName=s.pageName.replace(\"/\",\"/partners/\");}if(s.pageName.indexOf(\"ocom:mobile\")!=-1&&location.href.indexOf(\"m.oracle.com/technetwork\")!=-1){s.pageName=s.pageName.replace(\"/\",\"/technetwork/\");}}", "get plugins () {\n return this._chain.reduce(\n (plugins, {config}) => config.plugins\n ? plugins.concat(config.plugins)\n : plugins,\n []\n )\n }", "function build_pluginsjs(cb)\n{\n\t\tlet plugins = require('./src/js/plugins_draft.js');\n\t \n\t /** Filter minified files using gulp-if */\n\t return gulp.src(plugins)\n\t\t\t.pipe(sourcemaps.init({ loadMaps: true }))\n\t\t\t.pipe(filterif(['*', '!.min.'], uglify({ output: { comments: /^!/i } })))\n\t\t\t.pipe(concat('plugins.min.js'), { newLine: '\\r\\n' })\n\t\t\t.pipe(sourcemaps.write('./'))\n\t\t .pipe(gulp.dest('./public_html/js/'));\n \n\tcb();\n}", "_useDefaultCacheabilityPluginIfNeeded() {\n let defaultPluginIndex = null;\n let cacheWillUpdatePluginCount = 0;\n for (const [index, plugin] of this.plugins.entries()) {\n // Ignore the copy redirected plugin when determining what to do.\n if (plugin === PrecacheStrategy.copyRedirectedCacheableResponsesPlugin) {\n continue;\n }\n // Save the default plugin's index, in case it needs to be removed.\n if (plugin === PrecacheStrategy.defaultPrecacheCacheabilityPlugin) {\n defaultPluginIndex = index;\n }\n if (plugin.cacheWillUpdate) {\n cacheWillUpdatePluginCount++;\n }\n }\n if (cacheWillUpdatePluginCount === 0) {\n this.plugins.push(PrecacheStrategy.defaultPrecacheCacheabilityPlugin);\n }\n else if (cacheWillUpdatePluginCount > 1 && defaultPluginIndex !== null) {\n // Only remove the default plugin; multiple custom plugins are allowed.\n this.plugins.splice(defaultPluginIndex, 1);\n }\n // Nothing needs to be done if cacheWillUpdatePluginCount is 1\n }", "removed() {}", "removed() {}", "order() {\n debug('order:before', this.names);\n const runLast = this._plugins\n .filter(p => p.requirements.has('runLast'))\n .map(p => p.name);\n for (const name of runLast) {\n const index = this._plugins.findIndex(p => p.name === name);\n this._plugins.push(this._plugins.splice(index, 1)[0]);\n }\n debug('order:after', this.names);\n }", "static set PLUGINS(plugins) {\n PLUGINS = plugins;\n }", "function ckeLoadPlugins() {\n\tfor(var name in ProcessWire.config.InputfieldCKEditor.plugins) {\n\t\tvar file = ProcessWire.config.InputfieldCKEditor.plugins[name];\n\t\tCKEDITOR.plugins.addExternal(name, file, '');\n\t}\n}", "resolveDependencies() {\n var _a;\n debug('resolveDependencies');\n const pluginNames = new Set(this._plugins.map((p) => p.name));\n // Handle `plugins` stanza\n this._plugins\n .filter(p => 'plugins' in p && p.plugins.length)\n .map(p => p)\n .forEach(parent => {\n parent.plugins\n .filter(p => !pluginNames.has(p.name))\n .forEach(p => {\n debug('adding missing plugin', p.name);\n // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n if (parent.filter && !p.filter) {\n // Make child plugins inherit the parents filter if they don't have anything specified\n Object.defineProperty(p, 'filter', {\n get() {\n return parent.filter;\n }\n });\n }\n this.add(p);\n });\n });\n // Handle `dependencies` stanza\n const allDeps = new Map();\n this._plugins\n // Skip plugins without dependencies\n .filter(p => 'dependencies' in p && p.dependencies.size)\n .map(p => p.dependencies)\n .forEach(deps => {\n if (deps instanceof Set) {\n deps.forEach(k => allDeps.set(k, {}));\n }\n if (deps instanceof Map) {\n deps.forEach((v, k) => {\n allDeps.set(k, v); // Note: k,v => v,k\n });\n }\n });\n const missingDeps = new Map([...allDeps].filter(([k]) => !pluginNames.has(k)));\n if (!missingDeps.size) {\n debug('no dependencies are missing');\n return;\n }\n debug('dependencies missing', missingDeps);\n // Loop through all dependencies declared missing by plugins\n for (const [name, opts] of [...missingDeps]) {\n // Check if the dependency hasn't been registered as plugin already.\n // This might happen when multiple plugins have nested dependencies.\n if (this.names.includes(name)) {\n debug(`ignoring dependency '${name}', which has been required already.`);\n continue;\n }\n const hasFullName = name.startsWith('puppeteer-extra-plugin') ||\n name.startsWith('automation-extra-plugin');\n // We follow a plugin naming convention, but let's rather enforce it <3\n const requireNames = hasFullName\n ? [name]\n : [`automation-extra-plugin-${name}`, `puppeteer-extra-plugin-${name}`];\n const pkg = requirePackages(requireNames);\n if (!pkg) {\n throw new Error(`\n A plugin listed '${name}' as dependency,\n which is currently missing. Please install it:\n\n${requireNames\n .map(name => {\n return `yarn add ${name.split('/')[0]}`;\n })\n .join(`\\n or:\\n`)}\n\n Note: You don't need to require the plugin yourself,\n unless you want to modify it's default settings.\n `);\n }\n const plugin = pkg(opts);\n this.add(plugin);\n // Handle nested dependencies :D\n if ((_a = plugin.dependencies) === null || _a === void 0 ? void 0 : _a.size) {\n this.resolveDependencies();\n }\n }\n }", "function optimizePluginsArray(plugins) {\n return plugins.map(item => [item]).reduce((arr, item) => {\n const last = arr[arr.length - 1];\n\n if (last && item[0].type === last[0].type) {\n last.push(item[0]);\n }\n else {\n arr.push(item);\n }\n return arr;\n }, []);\n}", "function preparePluginList(list)\n {\n const result = [];\n for (let index = 0; index < list.length; index++)\n {\n if (list[index].postcssPlugin)\n {\n result.push(list[index].postcssPlugin);\n }\n else\n {\n const source = list[index].toString();\n if (source.indexOf('only partially supported by') > -1)\n {\n result.push('doiuse');\n }\n else if (source.indexOf('if ( config.imports ) { style.walkAtRules( updateImport ); }') > -1)\n {\n result.push('urlrewrite');\n }\n else\n {\n console.log('Not found', source);\n }\n }\n }\n return result;\n }", "handlePreregisteredExtensions() {\n window.MIP = window.MIP || {};\n window.MIP.push = extensions => {\n if (extensions && typeof extensions.func === 'function') {\n extensions.func();\n }\n };\n let preregisteredExtensions = window.MIP.extensions;\n if (preregisteredExtensions && preregisteredExtensions.length) {\n for (let i = 0; i < preregisteredExtensions.length; i++) {\n let curExtensionObj = preregisteredExtensions[i];\n if (curExtensionObj && typeof curExtensionObj.func === 'function') {\n curExtensionObj.func();\n }\n }\n }\n }", "function i(e,t,n){return e.registerPlugin=function(r,i){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e.prototype._children[r]||o.replace){if(e.prototype._children[r]=i,o.proxies)throw new Error(\"Proxies are not currently supported for private plugins\");if(o.interceptors&&(0,c.default)(o.interceptors).forEach(function(e){n[e]=o.interceptors[e]}),o.config&&(0,f.default)(t,o.config),(0,_.default)(o,\"payloadTransformer.predicates\")&&(t.payloadTransformer.predicates=t.payloadTransformer.predicates.concat((0,w.default)(o,\"payloadTransformer.predicates\"))),(0,_.default)(o,\"payloadTransformer.transforms\")&&(t.payloadTransformer.transforms=t.payloadTransformer.transforms.concat((0,w.default)(o,\"payloadTransformer.transforms\"))),o.onBeforeLogout){t.onBeforeLogout=t.onBeforeLogout||[];((0,y.default)(o.onBeforeLogout)?o.onBeforeLogout:[o.onBeforeLogout]).forEach(function(e){return t.onBeforeLogout.push({plugin:r,fn:e})})}if(i.prototype._definition.ready){var s=e.prototype._derived.ready,u=s.fn,l=s.depList,d={deps:l.concat(r+\".ready\"),fn:u};a(e.prototype,\"ready\",d)}}},e}", "function IGNORE() {\r\n //Do not delete.\r\n }", "addPlugins(...plugins) {\n InstancePlugin.initPlugins(this, ...plugins);\n }", "function update_REMOVEALL() {\n\n }", "destroyAll(...data) {\n return Promise.resolve().then(() => {\n const _destroyPlugin = (i = this.plugins.length - 1) => {\n return -1 < i ? Promise.resolve().then(() => {\n const pluginName = this.plugins[i].name;\n // emit event\n return this.plugins[i].destroy().then(() => {\n this.emit(\"destroyed\", pluginName, ...data);\n return Promise.resolve();\n // loop\n }).then(() => {\n return _destroyPlugin(i - 1);\n });\n }) : Promise.resolve();\n };\n return _destroyPlugin();\n // end\n }).then(() => {\n this.plugins = [];\n this.emit(\"alldestroyed\", ...data);\n return Promise.resolve();\n // remove all external resources\n }).then(() => {\n return (0, rmdirp_1.default)(this.externalRessourcesDirectory);\n });\n }", "addPlugins(...plugins) {\n InstancePlugin.initPlugins(this, ...plugins);\n }", "function o(){ne.removeEventListener(\"DOMContentLoaded\",o),_.removeEventListener(\"load\",o),me.ready()}", "function initPlugins() {\n Vue.use(Vuex);\n Vue.use(VueRouter);\n Vue.use(VueI18n);\n Vue.use(DeviceHelper);\n Vue.use(VueMeta);\n Vue.use(SanitizePlugin);\n }", "function clean() {\n\t\tvar settings = config.script.clean;\n\n\t\tplugins.del( settings.src ).then( function () {\n\t\t\tplugins.util.log( plugins.util.colors.bgGreen( 'Scripts are now clean....[clean()]' ) );\n\t\t\tconcat();\n\t\t} );\n\t}", "static deregister() {\n delete __WEBPACK_IMPORTED_MODULE_0__common_plugin__[\"a\" /* PLUGINS */][\"MemoryStorage\"];\n }", "pluginNameUnique(p) {\n return !(p.name === p.category\n || this.plugins.has(p.name)\n || this.categories.has(p.name));\n }", "arcPlugins() {\n return [\n \"bold\", \"italic\", \"h1\", \"h2\", \"h3\", \"center\", \"quote\", \"link\",\n \"list\", \"section\", \"code\", \"image\", \"youtube\"\n ];\n }", "function gbPluginDidLoad ()\n{\n\trefresh ();\n}", "function handlePlugins$1(inputs, calendar) {\n calendar.addPluginInputs(inputs); // will gracefully handle duplicates\n }", "function pluginsTask() {\n return all(\n\n // Swiper\n src(['node_modules/swiper/css/swiper.css', 'node_modules/swiper/css/swiper.min.css']).pipe(dest(`${pluginsFolder}/swiper`)),\n src(['node_modules/swiper/js/swiper.js', 'node_modules/swiper/js/swiper.min.js']).pipe(dest(`${pluginsFolder}/swiper`)),\n\n // noUiSlider\n src('node_modules/nouislider/distribute/**/*').pipe(dest(`${pluginsFolder}nouislider`)),\n\n // Noty\n src('node_modules/noty/lib/*.js').pipe(dest(`${pluginsFolder}noty`)),\n src('node_modules/noty/lib/noty.css').pipe(dest(`${pluginsFolder}noty`))\n .pipe(cleanCSS()).pipe(rename({ suffix: '.min' })).pipe(dest(`${pluginsFolder}noty`)),\n src('node_modules/noty/lib/themes/*.css').pipe(dest(`${pluginsFolder}noty/themes`))\n .pipe(cleanCSS()).pipe(rename({ suffix: '.min' })).pipe(dest(`${pluginsFolder}noty/themes`)),\n\n // Card (credit card for checkout)\n src('node_modules/card/dist/**/*').pipe(dest(`${pluginsFolder}card`)),\n src('node_modules/card/dist/jquery.card.js').pipe(uglify()).pipe(rename({ suffix: '.min' })).pipe(dest(`${pluginsFolder}card`)),\n\n // Chart.js\n src('node_modules/chart.js/dist/*.js').pipe(dest(`${pluginsFolder}chart.js`)),\n\n // jQuery Sparkline\n src(['node_modules/jquery-sparkline/jquery.sparkline.js', 'node_modules/jquery-sparkline/jquery.sparkline.min.js']).pipe(dest(`${pluginsFolder}jquery-sparkline`)),\n\n // Bootbox\n src('node_modules/bootbox/dist/bootbox.min.js').pipe(dest(`${pluginsFolder}bootbox`)),\n\n // Sortablejs\n src(['node_modules/sortablejs/Sortable.js', 'node_modules/sortablejs/Sortable.min.js']).pipe(dest(`${pluginsFolder}sortablejs`)),\n\n // Datatables\n src('node_modules/datatables.net/js/**/*').pipe(dest(`${pluginsFolder}datatables`)),\n src('node_modules/datatables.net-bs4/css/**/*').pipe(dest(`${pluginsFolder}datatables`)),\n src('node_modules/datatables.net-bs4/js/**/*').pipe(dest(`${pluginsFolder}datatables`)),\n\n // Datatables Responsive\n src('node_modules/datatables.net-responsive/js/**/*').pipe(dest(`${pluginsFolder}datatables`)),\n src('node_modules/datatables.net-responsive-bs4/css/**/*').pipe(dest(`${pluginsFolder}datatables`)),\n src('node_modules/datatables.net-responsive-bs4/js/**/*').pipe(dest(`${pluginsFolder}datatables`)),\n\n // Concat Datatable bootstrap4 responsive for easy to use\n // ref: https://datatables.net/extensions/responsive/examples/styling/bootstrap4.html\n src([\n 'node_modules/datatables.net/js/jquery.dataTables.js',\n 'node_modules/datatables.net-bs4/js/dataTables.bootstrap4.js',\n 'node_modules/datatables.net-responsive/js/dataTables.responsive.js',\n 'node_modules/datatables.net-responsive-bs4/js/responsive.bootstrap4.js'\n ])\n .pipe(concat('jquery.dataTables.bootstrap4.responsive.js'))\n .pipe(dest(`${pluginsFolder}datatables`))\n .pipe(rename('jquery.dataTables.bootstrap4.responsive.min.js'))\n .pipe(uglify())\n .pipe(dest(`${pluginsFolder}datatables`)),\n\n // jqvmap\n src('node_modules/jqvmap/dist/**/*').pipe(dest(`${pluginsFolder}jqvmap`)),\n\n // Input Mask\n src(['node_modules/inputmask/dist/jquery.inputmask.js', 'node_modules/inputmask/dist/jquery.inputmask.min.js']).pipe(dest(`${pluginsFolder}inputmask`)),\n\n // Flatpickr\n src('node_modules/flatpickr/dist/**/*').pipe(dest(`${pluginsFolder}flatpickr`)),\n\n // Bootstrap-select\n src('node_modules/bootstrap-select/dist/css/**/*').pipe(dest(`${pluginsFolder}bootstrap-select`)),\n src('node_modules/bootstrap-select/dist/js/**/*').pipe(dest(`${pluginsFolder}bootstrap-select`)),\n\n // Clock Picker\n src('node_modules/clockpicker/dist/**/*').pipe(dest(`${pluginsFolder}clockpicker`)),\n\n // Bootstrap Touchspin\n src('node_modules/bootstrap-touchspin/dist/*.*').pipe(dest(`${pluginsFolder}bootstrap-touchspin`)),\n\n // Summernote\n src('node_modules/summernote/dist/**/*').pipe(dest(`${pluginsFolder}summernote`)),\n\n // Autosize\n src(['node_modules/autosize/dist/autosize.js', 'node_modules/autosize/dist/autosize.min.js']).pipe(dest(`${pluginsFolder}autosize`)),\n\n // Photoswipe\n src('node_modules/photoswipe/dist/photoswipe.css').pipe(dest(`${pluginsFolder}photoswipe`)).pipe(cleanCSS()).pipe(rename({ suffix: '.min' })).pipe(dest(`${pluginsFolder}photoswipe`)),\n src('node_modules/photoswipe/dist/default-skin/*.*').pipe(dest(`${pluginsFolder}photoswipe/photoswipe-default-skin`)),\n src('node_modules/photoswipe/dist/default-skin/default-skin.css').pipe(cleanCSS()).pipe(rename({ suffix: '.min' })).pipe(dest(`${pluginsFolder}photoswipe/photoswipe-default-skin`)),\n src('node_modules/photoswipe/dist/*.js').pipe(dest(`${pluginsFolder}photoswipe`)),\n\n // Bootstrap Color Picker\n src(['node_modules/bootstrap-colorpicker/dist/css/*.css', 'node_modules/bootstrap-colorpicker/dist/js/*.js']).pipe(dest(`${pluginsFolder}bootstrap-colorpicker`)),\n\n // Fullcalendar\n src([\n 'node_modules/@fullcalendar/core/main.css',\n 'node_modules/@fullcalendar/core/main.min.css',\n 'node_modules/@fullcalendar/core/main.js',\n 'node_modules/@fullcalendar/core/main.min.js',\n 'node_modules/@fullcalendar/core/locales-all.js',\n 'node_modules/@fullcalendar/core/locales-all.min.js',\n ]).pipe(dest(`${pluginsFolder}fullcalendar/core`)),\n src([\n 'node_modules/@fullcalendar/daygrid/main.css',\n 'node_modules/@fullcalendar/daygrid/main.min.css',\n 'node_modules/@fullcalendar/daygrid/main.js',\n 'node_modules/@fullcalendar/daygrid/main.min.js',\n ]).pipe(dest(`${pluginsFolder}fullcalendar/daygrid`)),\n src([\n 'node_modules/@fullcalendar/timegrid/main.css',\n 'node_modules/@fullcalendar/timegrid/main.min.css',\n 'node_modules/@fullcalendar/timegrid/main.js',\n 'node_modules/@fullcalendar/timegrid/main.min.js',\n ]).pipe(dest(`${pluginsFolder}fullcalendar/timegrid`)),\n src([\n 'node_modules/@fullcalendar/list/main.css',\n 'node_modules/@fullcalendar/list/main.min.css',\n 'node_modules/@fullcalendar/list/main.js',\n 'node_modules/@fullcalendar/list/main.min.js',\n ]).pipe(dest(`${pluginsFolder}fullcalendar/list`)),\n src([\n 'node_modules/@fullcalendar/bootstrap/main.css',\n 'node_modules/@fullcalendar/bootstrap/main.min.css',\n 'node_modules/@fullcalendar/bootstrap/main.js',\n 'node_modules/@fullcalendar/bootstrap/main.min.js',\n ]).pipe(dest(`${pluginsFolder}fullcalendar/bootstrap`)),\n src([\n 'node_modules/@fullcalendar/interaction/main.js',\n 'node_modules/@fullcalendar/interaction/main.min.js',\n ]).pipe(dest(`${pluginsFolder}fullcalendar/interaction`)),\n\n // Markdown it\n src([\n 'node_modules/markdown-it/dist/markdown-it.js',\n 'node_modules/markdown-it/dist/markdown-it.min.js',\n ]).pipe(dest(`${pluginsFolder}markdown-it`)),\n\n // Fontawesome free\n src('node_modules/@fortawesome/fontawesome-free/css/**/*').pipe(dest(`${pluginsFolder}fontawesome-free/css`)),\n src('node_modules/@fortawesome/fontawesome-free/webfonts/**/*').pipe(dest(`${pluginsFolder}fontawesome-free/webfonts`)),\n\n // Material icons\n src('node_modules/material-design-icons-iconfont/dist/**/*').pipe(dest(`${pluginsFolder}material-design-icons-iconfont`)),\n src('node_modules/material-design-icons-iconfont/dist/material-design-icons.css')\n .pipe(cleanCSS()).pipe(rename({ suffix: '.min' })).pipe(dest(`${pluginsFolder}material-design-icons-iconfont`)),\n\n )\n}", "destroy() {\n this._pluginsManager.beforeAppDestroy(this);\n for (let module of this._modulesOrder) {\n module.destroy();\n }\n }", "destroy() {\n this.logger.warning('Destroying plugin');\n this.disconnect();\n this.view.removeElement();\n }", "_setPlugins() {\n this.config.plugins = {\n // Systems\n global: [\n { key: 'RoomSystem', plugin: Systems.RoomSystem, start: false, mapping: 'rooms' },\n { key: 'CursorSystem', plugin: Systems.CursorSystem, start: false, mapping: 'cursors' }\n ],\n // Managers\n scene: [\n { key: 'UpdateManager', plugin: Managers.UpdateManager, mapping: 'updates' },\n { key: 'LightSourceManager', plugin: Managers.LightSourceManager, mapping: 'lightSources' },\n { key: 'LayerManager', plugin: Managers.LayerManager, mapping: 'layers' }\n ]\n };\n }", "get plugins() {\n return this._plugins;\n }", "addMetricsPlugins() {}", "static getPlugins() {\r\n var plugins = {};\r\n\r\n //for framerate and timescale values in the overlay, this plugin is used. If you do not include this plugin, those 2 values will not be displayed. \r\n //frameRateTimecodeCalculator\r\n plugins.frameRateTimecodeCalculator = {\r\n default: 30.123, // Optional: default frame rate value to use if calculation fails; if not provided, the default value is 30\r\n timeScale: 10000000, // Optional: default time scale value to use if client manifest parsing fails: if not provided, the default value is 10000000\r\n dropFrame: true // Optional: flag to determine whether to use drop frame timecode or not for 29.97fps; if not provided, the default value is false (non-drop frame timecode)\r\n };\r\n\r\n //diagnoverlay\r\n plugins.diagnoverlay = {\r\n title: \"\", //overlay title\r\n x: \"left\", //overlay position \r\n y: \"top\",\r\n opacity: 0.6, //overlay background opacity\r\n bgColor: \"Black\", //overlay background color\r\n image: \"img/AMSLogo.png\" //image URL. Skip it if do not need image\r\n }\r\n\r\n return plugins;\r\n }", "disablePlugin() {\n const clearColHeader = (column, TH) => {\n const headerSpanElement = getHeaderSpanElement(TH);\n\n if (isFirstLevelColumnHeader(column, TH) === false || headerSpanElement === null) {\n return;\n }\n\n this.updateHeaderClasses(headerSpanElement);\n };\n\n // Changing header width and removing indicator.\n this.hot.addHook('afterGetColHeader', clearColHeader);\n this.hot.addHookOnce('afterRender', () => {\n this.hot.removeHook('afterGetColHeader', clearColHeader);\n });\n\n this.rowsMapper.clearMap();\n\n super.disablePlugin();\n }" ]
[ "0.76378304", "0.6961709", "0.6961709", "0.6931631", "0.68965787", "0.6792424", "0.67370474", "0.6627023", "0.6521384", "0.6490166", "0.648618", "0.6441604", "0.6341382", "0.62808794", "0.6222282", "0.6209466", "0.6172541", "0.6159131", "0.6159131", "0.6159131", "0.6159131", "0.6159131", "0.6159131", "0.6159131", "0.6159131", "0.6159131", "0.6159131", "0.6159131", "0.6148912", "0.6137948", "0.609591", "0.6093466", "0.60468054", "0.60459495", "0.6034606", "0.60248345", "0.6006976", "0.59817284", "0.5964225", "0.5952826", "0.59359294", "0.5889107", "0.5880944", "0.58663225", "0.5860642", "0.58577895", "0.5842735", "0.583249", "0.58232063", "0.5806379", "0.5763155", "0.5745811", "0.5742866", "0.5741796", "0.57314193", "0.57246816", "0.57152116", "0.5709515", "0.5703676", "0.5701127", "0.56937104", "0.5688702", "0.5682418", "0.5672323", "0.5670077", "0.56599116", "0.56443506", "0.5626097", "0.5626097", "0.5617903", "0.56147206", "0.56073046", "0.5599606", "0.5594153", "0.55871475", "0.55776393", "0.5565497", "0.5563604", "0.5562064", "0.55572325", "0.55344343", "0.55311733", "0.5530866", "0.55225104", "0.5522484", "0.5521408", "0.5518283", "0.55167615", "0.55110615", "0.55099374", "0.55093926", "0.5507767", "0.550756", "0.5507538", "0.55053115", "0.5504679", "0.5486863", "0.54805356" ]
0.5735734
56
Merges an array of option objects into a single object
function mergeOptions(optionObjs) { return mergeProps(optionObjs, complexOptions); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mergeOptions(optionObjs){return util_1.mergeProps(optionObjs,complexOptions);}", "function combineOpts() {\n var opts = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n opts[_i] = arguments[_i];\n }\n var validOpts = [];\n for (var i = 0, size = opts.length; i < size; i++) {\n if (opts[i] != null) {\n validOpts.push(opts[i]);\n }\n }\n if (validOpts.length < 2) {\n return validOpts[0];\n }\n else {\n validOpts.unshift({});\n return Object.assign.apply(null, validOpts);\n }\n }", "function mergeOptions() {\n\t\tvar $s = [];\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (arg) {\n\t\t\t\t$s.push(arguments[i].$);\n\t\t\t}\n\t\t}\n\n\t\t/* Correct the first element, as if it is null or undefined the merge will throw an exception */\n\t\tif (!$s[0]) {\n\t\t\t$s[0] = {};\n\t\t}\n\n\t\tvar result = merge.apply(this, arguments);\n\t\tresult.$ = merge.apply(this, $s);\n\t\treturn result;\n\t}", "function mergeOptions(optionObjs) {\n return mergeProps(optionObjs, complexOptions);\n } // TODO: move this stuff to a \"plugin\"-related file...", "function mergeOptions(optionObjs) {\n return util_1.mergeProps(optionObjs, complexOptions);\n}", "function mergeOptions(optionObjs) {\n return util_1.mergeProps(optionObjs, complexOptions);\n}", "function mergeOptions(optionObjs) {\n return util_1.mergeProps(optionObjs, complexOptions);\n}", "function mergeOptions(optionObjs) {\n return util_1.mergeProps(optionObjs, complexOptions);\n}", "function mergeOptions(optionObjs) {\n return mergeProps(optionObjs, complexOptions);\n}", "function mergeOptions(obj1,obj2){var obj3={};var attrname;for(attrname in obj1){obj3[attrname]=obj1[attrname];}for(attrname in obj2){obj3[attrname]=obj2[attrname];}return obj3;}", "function mergeOptions(optionObjs) {\n return object_1.mergeProps(optionObjs, complexOptions);\n }", "function mergeOptions(optionObjs) {\n\treturn mergeProps(optionObjs, complexOptions);\n}", "function mergeOptions(optionObjs) {\n\treturn mergeProps(optionObjs, complexOptions);\n}", "function mergeOptions(optionObjs) {\n\treturn mergeProps(optionObjs, complexOptions);\n}", "function mergeOptions(optionObjs) {\n\treturn mergeProps(optionObjs, complexOptions);\n}", "function mergeOptions(optionObjs) {\n\treturn mergeProps(optionObjs, complexOptions);\n}", "function mergeOptions(optionObjs) {\n\treturn mergeProps(optionObjs, complexOptions);\n}", "function mergeOptions(optionObjs) {\n\treturn mergeProps(optionObjs, complexOptions);\n}", "function mergeOptions(optionObjs) {\n\treturn mergeProps(optionObjs, complexOptions);\n}", "function mergeOptions() {\n var mergedOptions = {};\n var args = arguments;\n // Iterate over all specified options objects and add all properties to the new options object\n for (var i = 0; i < args[_LENGTH_]; i++) {\n var argument = args[i];\n for (var key in argument) {\n if (argument.hasOwnProperty(key)) {\n mergedOptions[key] = argument[key];\n }\n }\n }\n return mergedOptions;\n }", "function mergeOptions() {\n var mergedOptions = {};\n var args = arguments;\n // Iterate over all specified options objects and add all properties to the new options object\n for (var i = 0; i < args[_LENGTH_]; i++) {\n var argument = args[i];\n for (var key in argument) {\n if (argument.hasOwnProperty(key)) {\n mergedOptions[key] = argument[key];\n }\n }\n }\n return mergedOptions;\n }", "function mergeOptions(optionObjs) {\n\t\treturn mergeProps(optionObjs, complexOptions);\n\t}", "function mergeOptions() {\n var chain = Array.prototype.slice.call(arguments); // convert to a real array\n var complexVals = {}; // hash for each complex option's combined values\n var i, name;\n var combinedVal;\n var j;\n var val;\n\n // for each complex option, loop through each option-hash and accumulate the combined values\n for (i = 0; i < complexOptions.length; i++) {\n name = complexOptions[i];\n combinedVal = null; // an object holding the merge of all the values\n\n for (j = 0; j < chain.length; j++) {\n val = chain[j][name];\n\n if ($.isPlainObject(val)) {\n combinedVal = $.extend(combinedVal || {}, val); // merge new properties\n }\n else if (val != null) { // a non-null non-undefined atomic option\n combinedVal = null; // signal to use the atomic value\n }\n }\n\n // if not null, the final value was a combination of other objects. record it\n if (combinedVal !== null) {\n complexVals[name] = combinedVal;\n }\n }\n\n chain.unshift({}); // $.extend will mutate this with the result\n chain.push(complexVals); // computed complex values are applied last\n return $.extend.apply($, chain); // combine\n }", "function mergeOptions(target) {\n\t\tfunction mergeIntoTarget(name,value) {\n\t\t\tif($.isPlainObject(value) && $.isPlainObject(target[name]) && !isForcedAtomicOption(name)) {\n\t\t\t\t// merge into a new object to avoid destruction\n\t\t\t\ttarget[name] = mergeOptions({}, target[name], value); // combine. `value` object takes precedence\n\t\t\t} else if (value !== undefined) { // only use values that are set and not undefined\n\t\t\t\ttarget[name] = value;\n\t\t\t}//END if\n\t\t}//END function mergeIntoTarget\n\n\t\tfor(var i=1;i<arguments.length;i++) { $.each(arguments[i],mergeIntoTarget); }\n\t\treturn target;\n\t}//END function mergeOptions", "function mergeOpts(allOptions, targetType) {\n var finalOpts = {};\n var name;\n\n for (name in allOptions) {\n if (name !== targetType) {\n finalOpts[name] = allOptions[name];\n }\n }\n\n //merge in the per type settings for the targetType\n if (targetType in allOptions) {\n for (name in allOptions[targetType]) {\n finalOpts[name] = allOptions[targetType][name];\n }\n }\n return finalOpts;\n}", "function mergeOpts(allOptions, targetType) {\n var finalOpts = {};\n var name;\n\n for (name in allOptions) {\n if (name !== targetType) {\n finalOpts[name] = allOptions[name];\n }\n }\n\n //merge in the per type settings for the targetType\n if (targetType in allOptions) {\n for (name in allOptions[targetType]) {\n finalOpts[name] = allOptions[targetType][name];\n }\n }\n return finalOpts;\n}", "function mergeOpts(allOptions, targetType) {\n var finalOpts = {};\n var name;\n\n for (name in allOptions) {\n if (name !== targetType) {\n finalOpts[name] = allOptions[name];\n }\n }\n\n //merge in the per type settings for the targetType\n if (targetType in allOptions) {\n for (name in allOptions[targetType]) {\n finalOpts[name] = allOptions[targetType][name];\n }\n }\n return finalOpts;\n}", "function mergeOptions(target) {\n\n\tfunction mergeIntoTarget(name, value) {\n\t\tif ($.isPlainObject(value) && $.isPlainObject(target[name]) && !isForcedAtomicOption(name)) {\n\t\t\t// merge into a new object to avoid destruction\n\t\t\ttarget[name] = mergeOptions({}, target[name], value); // combine. `value` object takes precedence\n\t\t}\n\t\telse if (value !== undefined) { // only use values that are set and not undefined\n\t\t\ttarget[name] = value;\n\t\t}\n\t}\n\n\tfor (var i=1; i<arguments.length; i++) {\n\t\t$.each(arguments[i], mergeIntoTarget);\n\t}\n\n\treturn target;\n}", "function mergeOptions(target) {\n\n\tfunction mergeIntoTarget(name, value) {\n\t\tif ($.isPlainObject(value) && $.isPlainObject(target[name]) && !isForcedAtomicOption(name)) {\n\t\t\t// merge into a new object to avoid destruction\n\t\t\ttarget[name] = mergeOptions({}, target[name], value); // combine. `value` object takes precedence\n\t\t}\n\t\telse if (value !== undefined) { // only use values that are set and not undefined\n\t\t\ttarget[name] = value;\n\t\t}\n\t}\n\n\tfor (var i=1; i<arguments.length; i++) {\n\t\t$.each(arguments[i], mergeIntoTarget);\n\t}\n\n\treturn target;\n}", "function mergeOptions(target) {\n\n\tfunction mergeIntoTarget(name, value) {\n\t\tif ($.isPlainObject(value) && $.isPlainObject(target[name]) && !isForcedAtomicOption(name)) {\n\t\t\t// merge into a new object to avoid destruction\n\t\t\ttarget[name] = mergeOptions({}, target[name], value); // combine. `value` object takes precedence\n\t\t}\n\t\telse if (value !== undefined) { // only use values that are set and not undefined\n\t\t\ttarget[name] = value;\n\t\t}\n\t}\n\n\tfor (var i=1; i<arguments.length; i++) {\n\t\t$.each(arguments[i], mergeIntoTarget);\n\t}\n\n\treturn target;\n}", "function mergeOptions$1(optionObjs) {\n return mergeProps$1(optionObjs, complexOptions$1);\n }", "function merge_options(obj1){\n for (var attrname in obj1) { defaults[attrname] = obj1[attrname]; }\n return defaults;\n}", "function _mergeOptions(obj1,obj2) {\n\t var obj3 = {};\n\t for (var attrname in obj1) { obj3[attrname] = obj1[attrname]; }\n\t for (var attrname in obj2) { obj3[attrname] = obj2[attrname]; }\n\t return obj3;\n\t }", "function mergeOptions (obj1, obj2) {\n var obj3 = {}\n for (var attrname in obj1) { obj3[attrname] = obj1[attrname] }\n for (var attrname2 in obj2) { obj3[attrname2] = obj2[attrname2] }\n return obj3\n}", "function mergeOptions(obj1, obj2) {\n let obj3 = {};\n for (let attr1 in obj1) { obj3[attr1] = obj1[attr1]; }\n for (let attr2 in obj2) { obj3[attr2] = obj2[attr2]; }\n return obj3;\n }", "function _mergeOptions (obj1, obj2) {\n var obj3 = {};\n for (var attrname in obj1) { obj3[attrname] = obj1[attrname]; }\n for (var attrname in obj2) { obj3[attrname] = obj2[attrname]; }\n return obj3;\n }", "function mergeOptions(obj1,obj2){\n var obj3 = {};\n for (var attrname in obj1) { obj3[attrname] = obj1[attrname]; }\n for (var attrname in obj2) { obj3[attrname] = obj2[attrname]; }\n return obj3;\n }", "function mergeOptions(obj1,obj2){\n var obj3 = {};\n for (var attrname in obj1) { obj3[attrname] = obj1[attrname]; }\n for (var attrname in obj2) { obj3[attrname] = obj2[attrname]; }\n return obj3;\n }", "function _mergeOptions(obj1,obj2) {\n var obj3 = {};\n for (var attrname in obj1) { obj3[attrname] = obj1[attrname]; }\n for (var attrname in obj2) { obj3[attrname] = obj2[attrname]; }\n return obj3;\n }", "function _mergeOptions(obj1,obj2) {\n var obj3 = {};\n for (var attrname in obj1) { obj3[attrname] = obj1[attrname]; }\n for (var attrname in obj2) { obj3[attrname] = obj2[attrname]; }\n return obj3;\n }", "function _mergeOptions(obj1,obj2) {\n var obj3 = {};\n for (var attrname in obj1) { obj3[attrname] = obj1[attrname]; }\n for (var attrname in obj2) { obj3[attrname] = obj2[attrname]; }\n return obj3;\n }", "function _mergeOptions(obj1,obj2) {\n var obj3 = {};\n for (var attrname in obj1) { obj3[attrname] = obj1[attrname]; }\n for (var attrname in obj2) { obj3[attrname] = obj2[attrname]; }\n return obj3;\n }", "function _mergeOptions(obj1,obj2) {\n var obj3 = {};\n for (var attrname in obj1) { obj3[attrname] = obj1[attrname]; }\n for (var attrname in obj2) { obj3[attrname] = obj2[attrname]; }\n return obj3;\n }", "function merge() {\n const result = {};\n\n for (const obj of arguments) {\n _.forOwn(obj, (value, key) => {\n if (typeof value !== 'undefined') {\n if (!result[key]) {\n result[key] = value;\n } else if (_.isPlainObject(value) && _.isPlainObject(result[key])) {\n result[key] = merge(result[key], value);\n } else if (Array.isArray(value) && Array.isArray(result[key])) {\n result[key] = value.concat(result[key]);\n } else {\n result[key] = value;\n }\n }\n });\n }\n\n return result;\n}", "function merge_options(obj1,obj2){\n var obj3 = {};\n for (var attrname in obj1) { obj3[attrname] = obj1[attrname]; }\n for (var attrname in obj2) { obj3[attrname] = obj2[attrname]; }\n return obj3;\n}", "function merge_options(obj1,obj2){\n var obj3 = {};\n for (var attrname in obj1) { obj3[attrname] = obj1[attrname]; }\n for (var attrname in obj2) { obj3[attrname] = obj2[attrname]; }\n return obj3;\n}", "function merge_options(obj1,obj2){\n var obj3 = {};\n for (var attrname in obj1) { obj3[attrname] = obj1[attrname]; }\n for (var attrname in obj2) { obj3[attrname] = obj2[attrname]; }\n return obj3;\n}", "function concatOptions(options) {\n return options.reduce(function (arr, opt) {\n return foldOption(function (value) {\n return arr.concat([value]);\n })(arr)(opt);\n }, []);\n}", "function merge_options(obj1,obj2){\n var obj3 = {};\n for (var attrname in obj1) { obj3[attrname] = obj1[attrname]; }\n for (var attrname in obj2) { obj3[attrname] = obj2[attrname]; }\n return obj3;\n }", "function _mergeOptions(obj1,obj2) {\n var obj3 = {};\n for (var attrname in obj1) { obj3[attrname] = obj1[attrname]; }\n for (var attrname in obj2) { obj3[attrname] = obj2[attrname]; }\n return obj3;\n }", "function _mergeOptions(obj1, obj2) {\n var obj3 = {};\n for (var attrname in obj1) {\n obj3[attrname] = obj1[attrname];\n }\n for (var attrname in obj2) {\n obj3[attrname] = obj2[attrname];\n }\n return obj3;\n }", "function mergeOptions(defaultOptions, userOptions, object) {\n if(!userOptions)\n userOptions = {};\n \n for(option in defaultOptions) {\n if(userOptions[option] != undefined)\n object[option] = userOptions[option];\n else\n object[option] = defaultOptions[option];\n }\n}", "function mergeOptions(a, b) {\n if (a == null) return b\n if (b == null) return a\n\n if (Array.isArray(a)) {\n return a.concat(b)\n }\n\n if (typeof a === 'object' && !(a instanceof RegExp)) {\n const res = {}\n mergedKeys(a, b).forEach(key => {\n res[key] = mergeOptions(a[key], b[key])\n })\n return res\n }\n\n return b\n}", "function merge() {\n var i,\n args = arguments,\n len,\n ret = {},\n doCopy = function (copy, original) {\n var value, key;\n \n // An object is replacing a primitive\n if (typeof copy !== 'object') {\n copy = {};\n }\n \n for (key in original) {\n if (original.hasOwnProperty(key)) {\n value = original[key];\n \n // Copy the contents of objects, but not arrays or DOM nodes\n if (value && typeof value === 'object' && Object.prototype.toString.call(value) !== '[object Array]'\n && key !== 'renderTo' && typeof value.nodeType !== 'number') {\n copy[key] = doCopy(copy[key] || {}, value);\n \n // Primitives and arrays are copied over directly\n } else {\n copy[key] = original[key];\n }\n }\n }\n return copy;\n };\n \n // If first argument is true, copy into the existing object. Used in setOptions.\n if (args[0] === true) {\n ret = args[1];\n args = Array.prototype.slice.call(args, 2);\n }\n \n // For each argument, extend the return\n len = args.length;\n for (i = 0; i < len; i++) {\n ret = doCopy(ret, args[i]);\n }\n \n return ret;\n }", "function merge() {\n var i,\n args = arguments,\n len,\n ret = {},\n doCopy = function (copy, original) {\n var value, key;\n\n // An object is replacing a primitive\n if (typeof copy !== 'object') {\n copy = {};\n }\n\n for (key in original) {\n if (original.hasOwnProperty(key)) {\n value = original[key];\n\n // Copy the contents of objects, but not arrays or DOM nodes\n if (value && typeof value === 'object' && Object.prototype.toString.call(value) !== '[object Array]' &&\n key !== 'renderTo' && typeof value.nodeType !== 'number') {\n copy[key] = doCopy(copy[key] || {}, value);\n\n // Primitives and arrays are copied over directly\n } else {\n copy[key] = original[key];\n }\n }\n }\n return copy;\n };\n\n // If first argument is true, copy into the existing object. Used in setOptions.\n if (args[0] === true) {\n ret = args[1];\n args = Array.prototype.slice.call(args, 2);\n }\n\n // For each argument, extend the return\n len = args.length;\n for (i = 0; i < len; i++) {\n ret = doCopy(ret, args[i]);\n }\n\n return ret;\n }", "function merge() {\n var i,\n args = arguments,\n len,\n ret = {},\n doCopy = function (copy, original) {\n var value, key;\n\n // An object is replacing a primitive\n if (typeof copy !== 'object') {\n copy = {};\n }\n\n for (key in original) {\n if (original.hasOwnProperty(key)) {\n value = original[key];\n\n // Copy the contents of objects, but not arrays or DOM nodes\n if (value && typeof value === 'object' && Object.prototype.toString.call(value) !== '[object Array]' &&\n key !== 'renderTo' && typeof value.nodeType !== 'number') {\n copy[key] = doCopy(copy[key] || {}, value);\n\n // Primitives and arrays are copied over directly\n } else {\n copy[key] = original[key];\n }\n }\n }\n return copy;\n };\n\n // If first argument is true, copy into the existing object. Used in setOptions.\n if (args[0] === true) {\n ret = args[1];\n args = Array.prototype.slice.call(args, 2);\n }\n\n // For each argument, extend the return\n len = args.length;\n for (i = 0; i < len; i++) {\n ret = doCopy(ret, args[i]);\n }\n\n return ret;\n }", "__merge(opt,optDef){\n\t\tif(!opt || typeof opt !== 'object' ) opt = {};\n\t\tfor(var i in optDef){\n\t\t\tif(typeof optDef[i] == 'object' ) opt[i] = this.__merge(opt[i],optDef[i]);\n\t\t\telse if(typeof opt[i]=='undefined') opt[i] = optDef[i];\n\t\t}\n\t\treturn opt;\n\t}", "function mergeOption(oldOption,newOption){newOption = newOption || {};each(newOption,function(newCptOpt,mainType){if(newCptOpt == null){return;}var oldCptOpt=oldOption[mainType];if(!ComponentModel.hasClass(mainType)){oldOption[mainType] = merge(oldCptOpt,newCptOpt,true);}else {newCptOpt = modelUtil.normalizeToArray(newCptOpt);oldCptOpt = modelUtil.normalizeToArray(oldCptOpt);var mapResult=modelUtil.mappingToExists(oldCptOpt,newCptOpt);oldOption[mainType] = map(mapResult,function(item){return item.option && item.exist?merge(item.exist,item.option,true):item.exist || item.option;});}});}", "function merge() {\n\tvar i,\n\t\targs = arguments,\n\t\tlen,\n\t\tret = {},\n\t\tdoCopy = function (copy, original) {\n\t\t\tvar value, key;\n\n\t\t\t// An object is replacing a primitive\n\t\t\tif (typeof copy !== 'object') {\n\t\t\t\tcopy = {};\n\t\t\t}\n\n\t\t\tfor (key in original) {\n\t\t\t\tif (original.hasOwnProperty(key)) {\n\t\t\t\t\tvalue = original[key];\n\n\t\t\t\t\t// Copy the contents of objects, but not arrays or DOM nodes\n\t\t\t\t\tif (value && typeof value === 'object' && Object.prototype.toString.call(value) !== '[object Array]' &&\n\t\t\t\t\t\t\tkey !== 'renderTo' && typeof value.nodeType !== 'number') {\n\t\t\t\t\t\tcopy[key] = doCopy(copy[key] || {}, value);\n\t\t\t\t\n\t\t\t\t\t// Primitives and arrays are copied over directly\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcopy[key] = original[key];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn copy;\n\t\t};\n\n\t// If first argument is true, copy into the existing object. Used in setOptions.\n\tif (args[0] === true) {\n\t\tret = args[1];\n\t\targs = Array.prototype.slice.call(args, 2);\n\t}\n\n\t// For each argument, extend the return\n\tlen = args.length;\n\tfor (i = 0; i < len; i++) {\n\t\tret = doCopy(ret, args[i]);\n\t}\n\n\treturn ret;\n}", "function merge() {\n\t\tvar i,\n\t\t\targs = arguments,\n\t\t\tlen,\n\t\t\tret = {},\n\t\t\tdoCopy = function (copy, original) {\n\t\t\t\tvar value, key;\n\n\t\t\t\t// An object is replacing a primitive\n\t\t\t\tif (typeof copy !== 'object') {\n\t\t\t\t\tcopy = {};\n\t\t\t\t}\n\n\t\t\t\tfor (key in original) {\n\t\t\t\t\tif (original.hasOwnProperty(key)) {\n\t\t\t\t\t\tvalue = original[key];\n\n\t\t\t\t\t\t// Copy the contents of objects, but not arrays or DOM nodes\n\t\t\t\t\t\tif (value && typeof value === 'object' && Object.prototype.toString.call(value) !== '[object Array]'\n\t\t\t\t\t\t\t\t&& key !== 'renderTo' && typeof value.nodeType !== 'number') {\n\t\t\t\t\t\t\tcopy[key] = doCopy(copy[key] || {}, value);\n\t\t\t\t\t\n\t\t\t\t\t\t// Primitives and arrays are copied over directly\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcopy[key] = original[key];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn copy;\n\t\t\t};\n\n\t\t// If first argument is true, copy into the existing object. Used in setOptions.\n\t\tif (args[0] === true) {\n\t\t\tret = args[1];\n\t\t\targs = Array.prototype.slice.call(args, 2);\n\t\t}\n\n\t\t// For each argument, extend the return\n\t\tlen = args.length;\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tret = doCopy(ret, args[i]);\n\t\t}\n\n\t\treturn ret;\n\t}", "function mergeDefaultOptions(opts) {\n const copy = {};\n copyKeys(copy, _defaultOptions);\n copyKeys(copy, opts);\n Object.keys(_defaultOptions).forEach((key) => {\n const obj = _defaultOptions[key];\n if (typeof obj === 'object') {\n const objCopy = {};\n copyKeys(objCopy, obj);\n copyKeys(objCopy, copy[key]);\n copy[key] = objCopy;\n }\n });\n return copy;\n}", "function merge() {\n\t\tvar i,\n\t\t\targs = arguments,\n\t\t\tlen,\n\t\t\tret = {},\n\t\t\tdoCopy = function (copy, original) {\n\t\t\t\tvar value, key;\n\n\t\t\t\t// An object is replacing a primitive\n\t\t\t\tif (typeof copy !== 'object') {\n\t\t\t\t\tcopy = {};\n\t\t\t\t}\n\n\t\t\t\tfor (key in original) {\n\t\t\t\t\tif (original.hasOwnProperty(key)) {\n\t\t\t\t\t\tvalue = original[key];\n\n\t\t\t\t\t\t// Copy the contents of objects, but not arrays or DOM nodes\n\t\t\t\t\t\tif (value && typeof value === 'object' && Object.prototype.toString.call(value) !== '[object Array]' &&\n\t\t\t\t\t\t\t\tkey !== 'renderTo' && typeof value.nodeType !== 'number') {\n\t\t\t\t\t\t\tcopy[key] = doCopy(copy[key] || {}, value);\n\t\t\t\t\t\n\t\t\t\t\t\t// Primitives and arrays are copied over directly\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcopy[key] = original[key];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn copy;\n\t\t\t};\n\n\t\t// If first argument is true, copy into the existing object. Used in setOptions.\n\t\tif (args[0] === true) {\n\t\t\tret = args[1];\n\t\t\targs = Array.prototype.slice.call(args, 2);\n\t\t}\n\n\t\t// For each argument, extend the return\n\t\tlen = args.length;\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tret = doCopy(ret, args[i]);\n\t\t}\n\n\t\treturn ret;\n\t}", "function mergeInto(options, defaultOptions) {\n\tfor (var key in options) {\n\t\tdefaultOptions[key] = options[key];\n\t}\n\treturn defaultOptions;\n}", "function merge() {\n var result = {};\n _.each(arguments, function(obj) {\n if (!obj)\n return;\n _.each(obj, function(val, key) {\n var oldValue = result[key];\n if (_.isObject(oldValue) && _.isObject(val)) {\n val = merge(oldValue, val);\n }\n result[key] = val;\n });\n });\n return result;\n}", "mergeOptions (options, notMerge, lazyUpdate) {\n this.delegateMethod('setOption', options, notMerge, lazyUpdate)\n }", "function mergeOption(oldOption, newOption) {\n newOption = newOption || {};\n each(newOption, function (newCptOpt, mainType) {\n if (newCptOpt == null) {\n return;\n }\n\n var oldCptOpt = oldOption[mainType];\n\n if (!ComponentModel.hasClass(mainType)) {\n oldOption[mainType] = merge(oldCptOpt, newCptOpt, true);\n } else {\n newCptOpt = modelUtil.normalizeToArray(newCptOpt);\n oldCptOpt = modelUtil.normalizeToArray(oldCptOpt);\n var mapResult = modelUtil.mappingToExists(oldCptOpt, newCptOpt);\n oldOption[mainType] = map(mapResult, function (item) {\n return item.option && item.exist ? merge(item.exist, item.option, true) : item.exist || item.option;\n });\n }\n });\n}", "function mergeOption(oldOption, newOption) {\n newOption = newOption || {};\n each(newOption, function (newCptOpt, mainType) {\n if (newCptOpt == null) {\n return;\n }\n\n var oldCptOpt = oldOption[mainType];\n\n if (!ComponentModel.hasClass(mainType)) {\n oldOption[mainType] = merge(oldCptOpt, newCptOpt, true);\n } else {\n newCptOpt = modelUtil.normalizeToArray(newCptOpt);\n oldCptOpt = modelUtil.normalizeToArray(oldCptOpt);\n var mapResult = modelUtil.mappingToExists(oldCptOpt, newCptOpt);\n oldOption[mainType] = map(mapResult, function (item) {\n return item.option && item.exist ? merge(item.exist, item.option, true) : item.exist || item.option;\n });\n }\n });\n}", "function mergeOption(oldOption, newOption) {\n newOption = newOption || {};\n each(newOption, function (newCptOpt, mainType) {\n if (newCptOpt == null) {\n return;\n }\n\n var oldCptOpt = oldOption[mainType];\n\n if (!ComponentModel.hasClass(mainType)) {\n oldOption[mainType] = merge(oldCptOpt, newCptOpt, true);\n } else {\n newCptOpt = modelUtil.normalizeToArray(newCptOpt);\n oldCptOpt = modelUtil.normalizeToArray(oldCptOpt);\n var mapResult = modelUtil.mappingToExists(oldCptOpt, newCptOpt);\n oldOption[mainType] = map(mapResult, function (item) {\n return item.option && item.exist ? merge(item.exist, item.option, true) : item.exist || item.option;\n });\n }\n });\n}", "function mergeOption(oldOption, newOption) {\n newOption = newOption || {};\n each(newOption, function (newCptOpt, mainType) {\n if (newCptOpt == null) {\n return;\n }\n\n var oldCptOpt = oldOption[mainType];\n\n if (!ComponentModel.hasClass(mainType)) {\n oldOption[mainType] = merge(oldCptOpt, newCptOpt, true);\n } else {\n newCptOpt = modelUtil.normalizeToArray(newCptOpt);\n oldCptOpt = modelUtil.normalizeToArray(oldCptOpt);\n var mapResult = modelUtil.mappingToExists(oldCptOpt, newCptOpt);\n oldOption[mainType] = map(mapResult, function (item) {\n return item.option && item.exist ? merge(item.exist, item.option, true) : item.exist || item.option;\n });\n }\n });\n}", "function mergeOption(oldOption, newOption) {\n newOption = newOption || {};\n each(newOption, function (newCptOpt, mainType) {\n if (newCptOpt == null) {\n return;\n }\n\n var oldCptOpt = oldOption[mainType];\n\n if (!ComponentModel.hasClass(mainType)) {\n oldOption[mainType] = merge(oldCptOpt, newCptOpt, true);\n } else {\n newCptOpt = modelUtil.normalizeToArray(newCptOpt);\n oldCptOpt = modelUtil.normalizeToArray(oldCptOpt);\n var mapResult = modelUtil.mappingToExists(oldCptOpt, newCptOpt);\n oldOption[mainType] = map(mapResult, function (item) {\n return item.option && item.exist ? merge(item.exist, item.option, true) : item.exist || item.option;\n });\n }\n });\n}", "function mergeOption(oldOption, newOption) {\n newOption = newOption || {};\n each(newOption, function (newCptOpt, mainType) {\n if (newCptOpt == null) {\n return;\n }\n\n var oldCptOpt = oldOption[mainType];\n\n if (!ComponentModel.hasClass(mainType)) {\n oldOption[mainType] = merge(oldCptOpt, newCptOpt, true);\n } else {\n newCptOpt = modelUtil.normalizeToArray(newCptOpt);\n oldCptOpt = modelUtil.normalizeToArray(oldCptOpt);\n var mapResult = modelUtil.mappingToExists(oldCptOpt, newCptOpt);\n oldOption[mainType] = map(mapResult, function (item) {\n return item.option && item.exist ? merge(item.exist, item.option, true) : item.exist || item.option;\n });\n }\n });\n}", "function mergeOption(oldOption, newOption) {\n newOption = newOption || {};\n each(newOption, function (newCptOpt, mainType) {\n if (newCptOpt == null) {\n return;\n }\n\n var oldCptOpt = oldOption[mainType];\n\n if (!ComponentModel.hasClass(mainType)) {\n oldOption[mainType] = merge(oldCptOpt, newCptOpt, true);\n } else {\n newCptOpt = modelUtil.normalizeToArray(newCptOpt);\n oldCptOpt = modelUtil.normalizeToArray(oldCptOpt);\n var mapResult = modelUtil.mappingToExists(oldCptOpt, newCptOpt);\n oldOption[mainType] = map(mapResult, function (item) {\n return item.option && item.exist ? merge(item.exist, item.option, true) : item.exist || item.option;\n });\n }\n });\n}", "function mergeOption(oldOption, newOption) {\n newOption = newOption || {};\n each(newOption, function (newCptOpt, mainType) {\n if (newCptOpt == null) {\n return;\n }\n\n var oldCptOpt = oldOption[mainType];\n\n if (!ComponentModel.hasClass(mainType)) {\n oldOption[mainType] = merge(oldCptOpt, newCptOpt, true);\n } else {\n newCptOpt = modelUtil.normalizeToArray(newCptOpt);\n oldCptOpt = modelUtil.normalizeToArray(oldCptOpt);\n var mapResult = modelUtil.mappingToExists(oldCptOpt, newCptOpt);\n oldOption[mainType] = map(mapResult, function (item) {\n return item.option && item.exist ? merge(item.exist, item.option, true) : item.exist || item.option;\n });\n }\n });\n}", "static merge() {\n let result = {};\n if (!arguments || !arguments.length) {\n return result;\n }\n\n for (let i = 0; i < arguments.length; i++) {\n let currentArg = arguments[i];\n if (!currentArg) {\n continue;\n }\n Object.keys(currentArg).forEach(key => {\n if (Utility.isObject(currentArg[key]) && result[key] && Utility.isObject(result[key])) {\n result[key] = Utility.merge(result[key], currentArg[key]);\n } else {\n result[key] = currentArg[key];\n }\n });\n }\n return result;\n }", "function mergeOption(oldOption, newOption) {\n newOption = newOption || {};\n\n each(newOption, function (newCptOpt, mainType) {\n if (newCptOpt == null) {\n return;\n }\n\n var oldCptOpt = oldOption[mainType];\n\n if (!ComponentModel.hasClass(mainType)) {\n oldOption[mainType] = merge(oldCptOpt, newCptOpt, true);\n } else {\n newCptOpt = modelUtil.normalizeToArray(newCptOpt);\n oldCptOpt = modelUtil.normalizeToArray(oldCptOpt);\n\n var mapResult = modelUtil.mappingToExists(oldCptOpt, newCptOpt);\n\n oldOption[mainType] = map(mapResult, function (item) {\n return item.option && item.exist ? merge(item.exist, item.option, true) : item.exist || item.option;\n });\n }\n });\n}", "function mergeOptions(options, defaults) {\n if (options != null && typeof options === 'object') {\n for (var key in defaults) {\n if (!options.hasOwnProperty(key)) {\n options[key] = defaults[key];\n continue;\n }\n\n var custom_ = options[key],\n default_ = defaults[key];\n\n if (custom_ === null || custom_ === undefined) {\n options[key] = default_;\n continue;\n }\n\n if (typeof default_ != typeof custom_) {\n if (typeof default_ == 'string') {\n options[key] = custom_.join('');\n } else if (typeof default_ == 'object') {\n options[key] = [custom_.toString()];\n }\n }\n }\n\n return options;\n } else {\n return defaults;\n }\n}", "function mergeInto(options, defaultOptions) {\n for (var key in options) {\n defaultOptions[key] = options[key];\n }\n return defaultOptions;\n }", "function mergeOption(oldOption, newOption) {\n\t newOption = newOption || {};\n\n\t each(newOption, function (newCptOpt, mainType) {\n\t if (newCptOpt == null) {\n\t return;\n\t }\n\n\t var oldCptOpt = oldOption[mainType];\n\n\t if (!ComponentModel.hasClass(mainType)) {\n\t oldOption[mainType] = merge(oldCptOpt, newCptOpt, true);\n\t } else {\n\t newCptOpt = modelUtil.normalizeToArray(newCptOpt);\n\t oldCptOpt = modelUtil.normalizeToArray(oldCptOpt);\n\n\t var mapResult = modelUtil.mappingToExists(oldCptOpt, newCptOpt);\n\n\t oldOption[mainType] = map(mapResult, function (item) {\n\t return item.option && item.exist ? merge(item.exist, item.option, true) : item.exist || item.option;\n\t });\n\t }\n\t });\n\t}", "function mergeOption(oldOption, newOption) {\n newOption = newOption || {};\n\n each(newOption, function (newCptOpt, mainType) {\n if (newCptOpt == null) {\n return;\n }\n\n var oldCptOpt = oldOption[mainType];\n\n if (!ComponentModel.hasClass(mainType)) {\n oldOption[mainType] = merge(oldCptOpt, newCptOpt, true);\n }\n else {\n newCptOpt = modelUtil.normalizeToArray(newCptOpt);\n oldCptOpt = modelUtil.normalizeToArray(oldCptOpt);\n\n var mapResult = modelUtil.mappingToExists(oldCptOpt, newCptOpt);\n\n oldOption[mainType] = map(mapResult, function (item) {\n return (item.option && item.exist)\n ? merge(item.exist, item.option, true)\n : (item.exist || item.option);\n });\n }\n });\n }", "function mergeOption(oldOption, newOption) {\n newOption = newOption || {};\n\n each(newOption, function (newCptOpt, mainType) {\n if (newCptOpt == null) {\n return;\n }\n\n var oldCptOpt = oldOption[mainType];\n\n if (!ComponentModel.hasClass(mainType)) {\n oldOption[mainType] = merge(oldCptOpt, newCptOpt, true);\n }\n else {\n newCptOpt = modelUtil.normalizeToArray(newCptOpt);\n oldCptOpt = modelUtil.normalizeToArray(oldCptOpt);\n\n var mapResult = modelUtil.mappingToExists(oldCptOpt, newCptOpt);\n\n oldOption[mainType] = map(mapResult, function (item) {\n return (item.option && item.exist)\n ? merge(item.exist, item.option, true)\n : (item.exist || item.option);\n });\n }\n });\n }", "function merge (obj) {\n for (var i = 1; i < arguments.length; i++) {\n var def = arguments[i]\n for (var n in def) {\n if (obj[n] === undefined) obj[n] = def[n]\n }\n }\n return obj\n }", "function merge (obj) {\n for (var i = 1; i < arguments.length; i++) {\n var def = arguments[i]\n for (var n in def) {\n if (obj[n] === undefined) obj[n] = def[n]\n }\n }\n return obj\n }", "function merge (obj) {\n for (var i = 1; i < arguments.length; i++) {\n var def = arguments[i]\n for (var n in def) {\n if (obj[n] === undefined) obj[n] = def[n]\n }\n }\n return obj\n }", "function merge (obj) {\n for (var i = 1; i < arguments.length; i++) {\n var def = arguments[i]\n for (var n in def) {\n if (obj[n] === undefined) obj[n] = def[n]\n }\n }\n return obj\n }", "function merge (obj) {\n for (var i = 1; i < arguments.length; i++) {\n var def = arguments[i]\n for (var n in def) {\n if (obj[n] === undefined) obj[n] = def[n]\n }\n }\n return obj\n }", "function merge (obj) {\n for (var i = 1; i < arguments.length; i++) {\n var def = arguments[i]\n for (var n in def) {\n if (obj[n] === undefined) obj[n] = def[n]\n }\n }\n return obj\n }", "function merge (obj) {\n for (var i = 1; i < arguments.length; i++) {\n var def = arguments[i]\n for (var n in def) {\n if (obj[n] === undefined) obj[n] = def[n]\n }\n }\n return obj\n }", "function merge (obj) {\n for (var i = 1; i < arguments.length; i++) {\n var def = arguments[i]\n for (var n in def) {\n if (obj[n] === undefined) obj[n] = def[n]\n }\n }\n return obj\n }", "function $merge(){\r\n var mix = {};\r\n for (var i = 0; i < arguments.length; i++) {\r\n for (var property in arguments[i]) {\r\n var ap = arguments[i][property];\r\n var mp = mix[property];\r\n if (mp && $type(ap) == 'object' && $type(mp) == 'object') \r\n mix[property] = $merge(mp, ap);\r\n else \r\n mix[property] = ap;\r\n }\r\n }\r\n return mix;\r\n }", "merge() {\n var args = Array.prototype.slice.call(arguments);\n var result = {};\n\n for (var arg of args) {\n if (!util.isObject(arg)) {\n continue;\n }\n\n for (var key of Object.keys(arg)) {\n // Merge objects, not arrays.\n if (util.isObject(result[key]) && !Array.isArray(result[key])) {\n if (util.isObject(arg[key]) && !Array.isArray(arg[key])) {\n result[key] = module.exports.merge(result[key], arg[key]);\n } else {\n result[key] = arg[key];\n }\n } else {\n result[key] = arg[key];\n }\n }\n }\n\n return result;\n }", "function merge(obj) {\n for (var i=1; i < arguments.length; i++) {\n var def = arguments[i]\n for (var n in def)\n if (obj[n] === undefined) obj[n] = def[n]\n }\n return obj\n }", "function merge(obj) {\n for (var i=1; i < arguments.length; i++) {\n var def = arguments[i]\n for (var n in def)\n if (obj[n] === undefined) obj[n] = def[n]\n }\n return obj\n }", "function merge(obj) {\n for (var i=1; i < arguments.length; i++) {\n var def = arguments[i]\n for (var n in def)\n if (obj[n] === undefined) obj[n] = def[n]\n }\n return obj\n }", "function merge(obj) {\n for (var i=1; i < arguments.length; i++) {\n var def = arguments[i]\n for (var n in def)\n if (obj[n] === undefined) obj[n] = def[n]\n }\n return obj\n }", "function merge(obj) {\n for (var i=1; i < arguments.length; i++) {\n var def = arguments[i]\n for (var n in def)\n if (obj[n] === undefined) obj[n] = def[n]\n }\n return obj\n }", "function merge(obj) {\n for (var i=1; i < arguments.length; i++) {\n var def = arguments[i]\n for (var n in def)\n if (obj[n] === undefined) obj[n] = def[n]\n }\n return obj\n }", "function merge(obj) {\n for (var i=1; i < arguments.length; i++) {\n var def = arguments[i]\n for (var n in def)\n if (obj[n] === undefined) obj[n] = def[n]\n }\n return obj\n }", "function merge(obj) {\n for (var i=1; i < arguments.length; i++) {\n var def = arguments[i]\n for (var n in def)\n if (obj[n] === undefined) obj[n] = def[n]\n }\n return obj\n }" ]
[ "0.74278957", "0.73415136", "0.7241968", "0.723458", "0.72201705", "0.72201705", "0.72201705", "0.72201705", "0.72200483", "0.71633273", "0.71632963", "0.71536505", "0.71536505", "0.71536505", "0.71536505", "0.71536505", "0.71536505", "0.71536505", "0.71536505", "0.71286154", "0.7102273", "0.7019625", "0.6983423", "0.6940519", "0.6935899", "0.6935899", "0.6935899", "0.68590224", "0.68590224", "0.68590224", "0.6797763", "0.6648504", "0.663438", "0.6607321", "0.65978795", "0.6563009", "0.6551337", "0.6551337", "0.65405613", "0.65405613", "0.65405613", "0.65405613", "0.65405613", "0.65383166", "0.652671", "0.652671", "0.652671", "0.652127", "0.64941895", "0.6473923", "0.6441535", "0.63928086", "0.639232", "0.63474387", "0.62744415", "0.62717193", "0.6245407", "0.62235373", "0.6219652", "0.6194734", "0.6192188", "0.6185342", "0.60855293", "0.606136", "0.6056038", "0.6043891", "0.6043891", "0.6043891", "0.6043891", "0.6043891", "0.6043891", "0.6043891", "0.6043891", "0.60355616", "0.6016028", "0.601277", "0.59857124", "0.5974489", "0.5900228", "0.5900228", "0.5860972", "0.5860972", "0.5860972", "0.5860972", "0.5860972", "0.5860972", "0.5860972", "0.5860972", "0.58564496", "0.5855599", "0.58534545", "0.58534545", "0.58534545", "0.58534545", "0.58534545", "0.58534545", "0.58534545", "0.58534545" ]
0.7006645
24
TODO: find a way to avoid comparing DateProfiles. it's tedious
function isDateProfilesEqual(p0, p1) { return rangesEqual(p0.validRange, p1.validRange) && rangesEqual(p0.activeRange, p1.activeRange) && rangesEqual(p0.renderRange, p1.renderRange) && durationsEqual(p0.minTime, p1.minTime) && durationsEqual(p0.maxTime, p1.maxTime); /* TODO: compare more? currentRange: DateRange currentRangeUnit: string isRangeAllDay: boolean isValid: boolean dateIncrement: Duration */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isDateProfilesEqual(p0, p1) {\n return rangesEqual(p0.activeRange, p1.activeRange) &&\n rangesEqual(p0.validRange, p1.validRange) &&\n durationsEqual(p0.minTime, p1.minTime) &&\n durationsEqual(p0.maxTime, p1.maxTime);\n }", "function isDateProfilesEqual(p0, p1) {\n return rangesEqual(p0.validRange, p1.validRange) && rangesEqual(p0.activeRange, p1.activeRange) && rangesEqual(p0.renderRange, p1.renderRange) && durationsEqual(p0.minTime, p1.minTime) && durationsEqual(p0.maxTime, p1.maxTime);\n /*\n TODO: compare more?\n currentRange: DateRange\n currentRangeUnit: string\n isRangeAllDay: boolean\n isValid: boolean\n dateIncrement: Duration\n */\n }", "function isDateProfilesEqual(p0, p1) {\n return rangesEqual(p0.validRange, p1.validRange) &&\n rangesEqual(p0.activeRange, p1.activeRange) &&\n rangesEqual(p0.renderRange, p1.renderRange) &&\n durationsEqual(p0.minTime, p1.minTime) &&\n durationsEqual(p0.maxTime, p1.maxTime);\n /*\n TODO: compare more?\n currentRange: DateRange\n currentRangeUnit: string\n isRangeAllDay: boolean\n isValid: boolean\n dateIncrement: Duration\n */\n}", "function isDateProfilesEqual$1(p0, p1) {\n return rangesEqual$1(p0.validRange, p1.validRange) &&\n rangesEqual$1(p0.activeRange, p1.activeRange) &&\n rangesEqual$1(p0.renderRange, p1.renderRange) &&\n durationsEqual$1(p0.minTime, p1.minTime) &&\n durationsEqual$1(p0.maxTime, p1.maxTime);\n /*\n TODO: compare more?\n currentRange: DateRange\n currentRangeUnit: string\n isRangeAllDay: boolean\n isValid: boolean\n dateIncrement: Duration\n */\n }", "compareTwoObjectsByDate(a,b) {\n let x = a.approach_date;\n let y = b.approach_date;\n if (x < y) {return -1;}\n if (x > y) {return 1;}\n return 0;\n }", "function computeDateVars(dateProfile) {\n var dayStart = marker_1.startOfDay(dateProfile.renderRange.start);\n var viewEnd = dateProfile.renderRange.end;\n var dayDates = [];\n var dayRanges = [];\n\n while (dayStart < viewEnd) {\n dayDates.push(dayStart);\n dayRanges.push({\n start: dayStart,\n end: marker_1.addDays(dayStart, 1)\n });\n dayStart = marker_1.addDays(dayStart, 1);\n }\n\n return {\n dayDates: dayDates,\n dayRanges: dayRanges\n };\n }", "function computeDateVars(dateProfile) {\n var dayStart = core.startOfDay(dateProfile.renderRange.start);\n var viewEnd = dateProfile.renderRange.end;\n var dayDates = [];\n var dayRanges = [];\n while (dayStart < viewEnd) {\n dayDates.push(dayStart);\n dayRanges.push({\n start: dayStart,\n end: core.addDays(dayStart, 1)\n });\n dayStart = core.addDays(dayStart, 1);\n }\n return { dayDates: dayDates, dayRanges: dayRanges };\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 }", "#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 }", "function subtractDates(date1,date0){if(largeUnit){return util_1.diffByUnit(date1,date0,largeUnit);// poorly named\n}else if(dateProfile1.isAllDay()){return util_1.diffDay(date1,date0);// poorly named\n}else{return util_1.diffDayTime(date1,date0);// poorly named\n}}", "function computeDateVars(dateProfile) {\n var dayStart = Object(_fullcalendar_core__WEBPACK_IMPORTED_MODULE_0__[\"startOfDay\"])(dateProfile.renderRange.start);\n var viewEnd = dateProfile.renderRange.end;\n var dayDates = [];\n var dayRanges = [];\n while (dayStart < viewEnd) {\n dayDates.push(dayStart);\n dayRanges.push({\n start: dayStart,\n end: Object(_fullcalendar_core__WEBPACK_IMPORTED_MODULE_0__[\"addDays\"])(dayStart, 1)\n });\n dayStart = Object(_fullcalendar_core__WEBPACK_IMPORTED_MODULE_0__[\"addDays\"])(dayStart, 1);\n }\n return { dayDates: dayDates, dayRanges: dayRanges };\n}", "dateShallowIntersectsDate(date1, date2) {\n if (date1.isDate) {\n return date2.isDate ? date1.dateTime === date2.dateTime : this.dateShallowIncludesDate(date2, date1);\n }\n\n if (date2.isDate) {\n return this.dateShallowIncludesDate(date1, date2);\n } // Both ranges\n\n\n if (date1.start && date2.end && date1.start > date2.end) {\n return false;\n }\n\n if (date1.end && date2.start && date1.end < date2.start) {\n return false;\n }\n\n return true;\n }", "dateShallowIntersectsDate(date1, date2) {\n if (date1.isDate) {\n return date2.isDate ? date1.dateTime === date2.dateTime : this.dateShallowIncludesDate(date2, date1);\n }\n\n if (date2.isDate) {\n return this.dateShallowIncludesDate(date1, date2);\n } // Both ranges\n\n\n if (date1.start && date2.end && date1.start > date2.end) {\n return false;\n }\n\n if (date1.end && date2.start && date1.end < date2.start) {\n return false;\n }\n\n return true;\n }", "compareDate(a, b) {\n if (a.startDate < b.startDate) return -1\n if (a.startDate > b.startDate) return 1\n else return 0\n }", "function parseByDate(models) {\n var tempShared = [];\n var initial_time = new Date(models[models.length - 1].attributes.date);\n for (var i = models.length - 1; i >= 0; i--) {\n var compare_against = new Date(models[i].attributes.date);\n if(initial_time.getFullYear() == compare_against.getFullYear()) {\n if (initial_time.getMonth() == compare_against.getMonth()) {\n if (initial_time.getDate() == compare_against.getDate()) {\n // console.log(models[i]);\n tempShared.push([compare_against, models[i].attributes]);\n models.splice(i, 1);\n };\n };\n };\n };\n crime_by_date.push(tempShared);\n if (models.length > 0) {\n parseByDate(models);\n }\n else {\n // console.log(crime_by_date);\n };\n}", "testCase1_2() {\n let _verdict = false;\n let _tc1 = this._helperModule.calculateNewDateBasedOnPivotDate(new Date(\"2016-09-03\"), 2);\n if (Number(_tc1) == Number(new Date(\"2016-09-05\"))) {\n // passed the test\n _verdict = true;\n }\n\n return _verdict;\n }", "function getPropertiesDate(obj) {\n return obj.properties.date.getValue();\n}", "function findProfiles() {}", "function filterDataByDate(sample){\r\n\t\t\treturn (Date.parse(sample.date_local) == Date.parse(dateselector.node().value));\r\n\t\t\t}", "function compare_date( a, b ) {\n if ( a.date < b.date){\n return -1;\n }\n if ( a.date > b.date ){\n return 1;\n }\n return 0;\n}", "function CompareBirthdays(a, b)\r\n {\r\n return a[\"nextBirthday\"] - b[\"nextBirthday\"];\r\n }", "function computeActiveRange(dateProfile) {\n var range = dateProfile.activeRange; // return range;\n\n return {\n start: marker_1.addMs(range.start, dateProfile.minTime.milliseconds),\n end: marker_1.addMs(range.end, dateProfile.maxTime.milliseconds - 864e5) // 864e5 = ms in a day\n\n };\n }", "function getActiveByDays() {\r\n for (country in DATA) {\r\n DATA[country]['activeByDays'] = {};\r\n for (date in DATA[country]['totalByDays']) {\r\n DATA[country]['activeByDays'][date] = ((DATA[country]['totalByDays'][date] - DATA[country]['deathsByDays'][date]) - DATA[country]['recoveredByDays'][date]);\r\n //console.log(DATA[i][country]['activeByDays'][date]);\r\n }\r\n var dayDate = Object.keys(DATA[country]['totalByDays']),\r\n lastDay = dayDate[dayDate.length - 1]\r\n DATA[country]['active'] = ((DATA[country]['totalByDays'][lastDay] - DATA[country]['deathsByDays'][lastDay]) - DATA[country]['recoveredByDays'][lastDay]);\r\n }\r\n}", "function date_checker() {\n // If date is new, added to date_tracker array\n date_only = DateTime.substr(0, 10);\n if (!date_tracker.includes(date_only)) {\n date_tracker.push(date_only);\n\n // Completes auto_transfers before CSV input transactions if date_only is new\n amendment_check(false);\n }\n }", "function compareDateFunction(date1,date2){\r\n\tvar leftDate;\r\n\tvar rightDate;\r\n\tif(typeof(date1) == \"object\"){\r\n\t\tleftDate = date1;\r\n\t}else{\r\n\t\tleftDate = convertStr2Date(date1);\r\n\t}\r\n\tif(typeof(date2) == \"object\"){\r\n\t\trightDate = date2;\r\n\t}else{\r\n\t\trightDate = convertStr2Date(date2);\r\n\t}\r\n\treturn compareDate(leftDate,rightDate,0);\r\n}", "fillTheLeftOutDates() {\n let count = 0;\n this.props.eventObj.dateArray.map((date, i) => {\n for (let key in this.props.personalizedDateSelection) {\n if (this.props.personalizedDateSelection.hasOwnProperty(key)) {\n if (date === key ) {\n count = 1;\n }\n }\n }\n if (count === 0) {\n this.props.dispatch(storePersonalizedDateSelection(date, 'busy'));\n }\n count = 0;\n });\n }", "function subtractDates(date1, date0) { // date1 - date0\n\t\tif (largeUnit) {\n\t\t\treturn diffByUnit(date1, date0, largeUnit); // poorly named\n\t\t}\n\t\telse if (dateProfile1.isAllDay()) {\n\t\t\treturn diffDay(date1, date0); // poorly named\n\t\t}\n\t\telse {\n\t\t\treturn diffDayTime(date1, date0); // poorly named\n\t\t}\n\t}", "function subtractDates(date1, date0) { // date1 - date0\n\t\tif (largeUnit) {\n\t\t\treturn diffByUnit(date1, date0, largeUnit); // poorly named\n\t\t}\n\t\telse if (dateProfile1.isAllDay()) {\n\t\t\treturn diffDay(date1, date0); // poorly named\n\t\t}\n\t\telse {\n\t\t\treturn diffDayTime(date1, date0); // poorly named\n\t\t}\n\t}", "if (nextProps.dates !== this.props.dates) {\n this.props.retrieveActivityLog(nextProps.dates[0].unix(),nextProps.dates[1].unix());\n }", "function compareDates(a,b) {\n if(a.attributes.date.isBefore(b.attributes.date)) {return -1;}\n if(b.attributes.date.isBefore(a.attributes.date)) {return 1;}\n return 0;\n}", "sameDate(dateA, dateB) {\n return ((dateA.getDate() === dateB.getDate()) && (dateA.getMonth() === dateB.getMonth()) && (dateA.getFullYear() === dateB.getFullYear()));\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}", "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 dateCompare(date1, date2) {\n\t\tif (date1.getDate() === date2.getDate() && date1.getMonth() === date2.getMonth() && date1.getFullYear() === date2.getFullYear()) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t}", "function compareDateDetail(partsIndex, date1, date2) {\n let r = 0;\n for (let i = partsIndex; r === 0 && i >= 0; i -= 1) {\n const a = date1[`get${parts[i][0]}`]();\n const b = date2[`get${parts[i][0]}`]();\n r = compare(a, b);\n }\n\n return r;\n }", "function subtractDates(date1, date0) {\n if (largeUnit) {\n return util_1.diffByUnit(date1, date0, largeUnit); // poorly named\n }\n else if (dateProfile1.isAllDay()) {\n return util_1.diffDay(date1, date0); // poorly named\n }\n else {\n return util_1.diffDayTime(date1, date0); // poorly named\n }\n }", "function subtractDates(date1, date0) {\n if (largeUnit) {\n return util_1.diffByUnit(date1, date0, largeUnit); // poorly named\n }\n else if (dateProfile1.isAllDay()) {\n return util_1.diffDay(date1, date0); // poorly named\n }\n else {\n return util_1.diffDayTime(date1, date0); // poorly named\n }\n }", "function subtractDates(date1, date0) {\n if (largeUnit) {\n return util_1.diffByUnit(date1, date0, largeUnit); // poorly named\n }\n else if (dateProfile1.isAllDay()) {\n return util_1.diffDay(date1, date0); // poorly named\n }\n else {\n return util_1.diffDayTime(date1, date0); // poorly named\n }\n }", "function subtractDates(date1, date0) {\n if (largeUnit) {\n return util_1.diffByUnit(date1, date0, largeUnit); // poorly named\n }\n else if (dateProfile1.isAllDay()) {\n return util_1.diffDay(date1, date0); // poorly named\n }\n else {\n return util_1.diffDayTime(date1, date0); // poorly named\n }\n }", "function checkFileTrackerUpToDate() {\n let currentDate = getDate();\n let keys = Object.keys(roomsFileTracker);\n \n keys.forEach(function(key) {\n console.log(\"Key: \" + key);\n let sample = roomsFileTracker[key].date;\n if((typeof(date) !== 'undefined') && (currentDate !== sample)) {\n populateRoomsFileTracker();\n return false;\n }\n });\n return true;\n}", "static sortAscending() {\r\n const profiles = Store.getProfiles();\r\n profiles.sort(({ monthTime: a }, { monthTime: b }) => a - b);\r\n localStorage.setItem('profiles', JSON.stringify(profiles));\r\n }", "function computeTitleFormat(dateProfile) {\n var currentRangeUnit = dateProfile.currentRangeUnit;\n\n if (currentRangeUnit === 'year') {\n return {\n year: 'numeric'\n };\n } else if (currentRangeUnit === 'month') {\n return {\n year: 'numeric',\n month: 'long'\n }; // like \"September 2014\"\n } else {\n var days = marker_1.diffWholeDays(dateProfile.currentRange.start, dateProfile.currentRange.end);\n\n if (days !== null && days > 1) {\n // multi-day range. shorter, like \"Sep 9 - 10 2014\"\n return {\n year: 'numeric',\n month: 'short',\n day: 'numeric'\n };\n } else {\n // one day. longer, like \"September 9 2014\"\n return {\n year: 'numeric',\n month: 'long',\n day: 'numeric'\n };\n }\n }\n } // Plugin", "function compareDates(a, b) {\n\t\tif (b.transaction_date < a.transaction_date) {\n\t\t\treturn -1\n\t\t}\n\t\tif (b.transaction_date > a.transaction_date) {\n\t\t\treturn 1\n\t\t}\n\t\treturn 0\n\t}", "function compareDates(a, b) {\n\t\tif (b.transaction_date < a.transaction_date) {\n\t\t\treturn -1\n\t\t}\n\t\tif (b.transaction_date > a.transaction_date) {\n\t\t\treturn 1\n\t\t}\n\t\treturn 0\n\t}", "function compareDate(a,b) {\n if (a.date < b.date)\n return -1;\n else if (a.date > b.date)\n return 1;\n else\n return 0;\n }", "function date_check(date){\n\tfor (var i = 0; i < ufo_data.length; i++){\n\t\tif (ufo_data[i].datetime === date){\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}", "function compareDates(date_One, date_Two) {\n if (date_One.getFullYear() > date_Two.getFullYear())\n return 1;\n else if (date_One.getFullYear() < date_Two.getFullYear())\n return -1;\n else {\n if (date_One.getMonth() > date_Two.getMonth())\n return 1;\n else if (date_One.getMonth() < date_Two.getMonth())\n return -1;\n else {\n if (date_One.getDate() > date_Two.getDate())\n return 1;\n else if (date_One.getDate() < date_Two.getDate())\n return -1;\n else\n return 0;\n }\n }\n}", "shallowIntersectsDate(other) {\n return this.dateShallowIntersectsDate(this, other.isDate ? other : new dateInfo_DateInfo(other, this.opts));\n }", "shallowIntersectsDate(other) {\n return this.dateShallowIntersectsDate(this, other.isDate ? other : new dateInfo_DateInfo(other, this.opts));\n }", "testCase1_1() {\n let _verdict = false;\n let _tc1 = this._helperModule.calculateNewDateBasedOnPivotDate(new Date(\"2016-09-03\"), -2);\n if (Number(_tc1) == Number(new Date(\"2016-09-01\"))) {\n // passed the test\n _verdict = true;\n }\n\n return _verdict;\n }", "updatedDate(state) {\n let recipe = state.recipe;\n let pd =\n (recipe.publishedDate || recipe.creationDate) &&\n new Date(recipe.publishedDate || recipe.creationDate);\n let ud = pd && recipe.updatedDate && new Date(recipe.updatedDate);\n if (\n ud &&\n ud > new Date(pd.getFullYear(), pd.getMonth(), pd.getDate() + 3)\n ) {\n return ud;\n }\n }", "hasActivePolicyInYear(policies, minYear, maxYear) {\n // console.log(policies)\n // console.log(minYear)\n if (policies) {\n for (let i = 0; i < policies.length; i++) {\n let start = policies[i][\"Year of establishment\"]\n let end = policies[i][\"Year of disestablishment\"]\n if (start !== \"Nil\" && start !== undefined && end !== undefined) {\n if (parseInt(start.substr(0,4) < maxYear && (end === \"Nil\" || parseInt(end.substr(0, 4)) > minYear))) {\n console.log(\"yay\")\n return true\n }\n }\n }\n }\n return false\n \n}", "function normalizeDate(date, tDateProfile, dateEnv) {\n var normalDate = date;\n if (!tDateProfile.isTimeScale) {\n normalDate = core.startOfDay(normalDate);\n if (tDateProfile.largeUnit) {\n normalDate = dateEnv.startOf(normalDate, tDateProfile.largeUnit);\n }\n }\n return normalDate;\n }", "shallowIncludesDate(other) {\n return this.dateShallowIncludesDate(this, other.isDate ? other : new dateInfo_DateInfo(other, this.opts));\n }", "shallowIncludesDate(other) {\n return this.dateShallowIncludesDate(this, other.isDate ? other : new dateInfo_DateInfo(other, this.opts));\n }", "function computeTitleFormat(dateProfile) {\n var currentRangeUnit = dateProfile.currentRangeUnit;\n\n if (currentRangeUnit === 'year') {\n return {\n year: 'numeric'\n };\n } else if (currentRangeUnit === 'month') {\n return {\n year: 'numeric',\n month: 'long'\n }; // like \"September 2014\"\n } else {\n var days = diffWholeDays(dateProfile.currentRange.start, dateProfile.currentRange.end);\n\n if (days !== null && days > 1) {\n // multi-day range. shorter, like \"Sep 9 - 10 2014\"\n return {\n year: 'numeric',\n month: 'short',\n day: 'numeric'\n };\n } else {\n // one day. longer, like \"September 9 2014\"\n return {\n year: 'numeric',\n month: 'long',\n day: 'numeric'\n };\n }\n }\n } // Plugin", "function checkChange(dateOne, dateTwo, unit, utc) {\n dateOne = new Date(dateOne.getTime());\n dateTwo = new Date(dateTwo.getTime());\n var timeZoneOffset1 = 0;\n var timeZoneOffset2 = 0;\n if (!utc && unit != \"millisecond\") {\n timeZoneOffset1 = dateOne.getTimezoneOffset();\n dateOne.setUTCMinutes(dateOne.getUTCMinutes() - timeZoneOffset1);\n timeZoneOffset2 = dateTwo.getTimezoneOffset();\n dateTwo.setUTCMinutes(dateTwo.getUTCMinutes() - timeZoneOffset2);\n }\n var changed = false;\n switch (unit) {\n case \"year\":\n if (dateOne.getUTCFullYear() != dateTwo.getUTCFullYear()) {\n changed = true;\n }\n break;\n case \"month\":\n if (dateOne.getUTCFullYear() != dateTwo.getUTCFullYear()) {\n changed = true;\n }\n else if (dateOne.getUTCMonth() != dateTwo.getUTCMonth()) {\n changed = true;\n }\n break;\n case \"day\":\n if (dateOne.getUTCMonth() != dateTwo.getUTCMonth()) {\n changed = true;\n }\n else if (dateOne.getUTCDate() != dateTwo.getUTCDate()) {\n changed = true;\n }\n break;\n case \"hour\":\n if (dateOne.getUTCHours() != dateTwo.getUTCHours()) {\n changed = true;\n }\n break;\n case \"minute\":\n if (dateOne.getUTCMinutes() != dateTwo.getUTCMinutes()) {\n changed = true;\n }\n break;\n case \"second\":\n if (dateOne.getUTCSeconds() != dateTwo.getUTCSeconds()) {\n changed = true;\n }\n break;\n case \"millisecond\":\n if (dateOne.getTime() != dateTwo.getTime()) {\n changed = true;\n }\n break;\n }\n if (changed) {\n return true;\n }\n var nextUnit = getNextUnit(unit);\n if (nextUnit) {\n dateOne.setUTCMinutes(dateOne.getUTCMinutes() + timeZoneOffset1);\n dateTwo.setUTCMinutes(dateTwo.getUTCMinutes() + timeZoneOffset2);\n return checkChange(dateOne, dateTwo, nextUnit, utc);\n }\n else {\n return false;\n }\n}", "function getDates(callback) {\n var d = new Date();\n var queryObject = {};\n\n //check already there is one year data in db\n if (initialResults.data != null) {\n d.setDate(d.getDate());\n if (initialResults.data.updated < new Date()) {\n var endDate = initialResults.data.updated;\n endDate.setDate(endDate.getDate() + 1);\n var updated = moment(endDate).format('YYYY-MM-DD');\n d.setDate(d.getDate() + 1);\n var now = moment(d).format('YYYY-MM-DD');\n var query = initialResults.object.channelObjectId + \"/insights/\" + initialResults.metric.objectTypes[0].meta.fbMetricName + \"?since=\" + updated + \"&until=\" + now;\n queryObject = {\n query: query, metricId: initialResults.metric._id, metric: initialResults.metric,\n startDate: updated,\n endDate: now\n };\n callback(null, queryObject);\n }\n else {\n var endDate = initialResults.data.updated;\n endDate.setDate(endDate.getDate() + 1);\n var updated = moment(endDate).format('YYYY-MM-DD');\n d.setDate(d.getDate() + 1);\n var now = moment(d).format('YYYY-MM-DD');\n queryObject = {\n query: 'DataFromDb', metricId: initialResults.metric._id, metric: initialResults.metric,\n startDate: updated,\n endDate: now\n };\n callback(null, queryObject);\n }\n\n }\n }", "_isRestricted(date) {\n const restrictedDates = this.restrictedDates;\n let isRestricted = false;\n\n for (let i = 0; i < restrictedDates.length; i++) {\n if (date.equalDateParts(restrictedDates[i])) {\n isRestricted = true;\n break;\n }\n }\n\n return isRestricted;\n }", "function compareDate(dos, rd) {\n\n }", "function compareDate(a, b) {\r\n if (a.date > b.date) return 1;\r\n if (b.date > a.date) return -1;\r\n return 0;\r\n}", "function compareDatePart(date1, date2) {\n return getDatePartHashValue(date1) - getDatePartHashValue(date2);\n}", "function computeActiveRange(dateProfile, isComponentAllDay) {\n var range = dateProfile.activeRange;\n\n if (isComponentAllDay) {\n return range;\n }\n\n return {\n start: addMs(range.start, dateProfile.minTime.milliseconds),\n end: addMs(range.end, dateProfile.maxTime.milliseconds - 864e5) // 864e5 = ms in a day\n\n };\n } // exports", "testCase1_3() {\n let _verdict = false;\n let _tc1 = this._helperModule.calculateNewDateBasedOnPivotDate(new Date(\"2016-09-03\"), 0);\n if (Number(_tc1) == Number(new Date(\"2016-09-03\"))) {\n // passed the test\n _verdict = true;\n }\n\n return _verdict;\n }", "function compareSortDates(first, second)\n{\n return first.eventSD - second.eventSD;\n}", "function compareByDateDESC(a, b) {\n\tif (!('date' in a)) {\n\t\treturn 1;\n\t}\n\tif (!('date' in b)) {\n\t\treturn -1;\n\t}\n\t\n\tif (parseInt(a.date) < parseInt(b.date)) {\n\t\treturn 1;\n\t}\n\tif (parseInt(a.date) > parseInt(b.date)) {\n\t\treturn -1;\n\t}\n\treturn 0;\n}", "function less(a,b) {\r\n return a.date < b.date;\r\n}", "function computeActiveRange(dateProfile, isComponentAllDay) {\n var range = dateProfile.activeRange;\n if (isComponentAllDay) {\n return range;\n }\n return {\n start: addMs(range.start, dateProfile.minTime.milliseconds),\n end: addMs(range.end, dateProfile.maxTime.milliseconds - 864e5) // 864e5 = ms in a day\n };\n }", "function computeActiveRange(dateProfile, isComponentAllDay) {\n var range = dateProfile.activeRange;\n if (isComponentAllDay) {\n return range;\n }\n return {\n start: addMs(range.start, dateProfile.minTime.milliseconds),\n end: addMs(range.end, dateProfile.maxTime.milliseconds - 864e5) // 864e5 = ms in a day\n };\n }", "function isSame(date1, date2, period){\n if (period) {\n date1 = startOf(date1, period);\n date2 = startOf(date2, period);\n }\n return Number(date1) === Number(date2);\n }", "function compare2Json(json1, json2) {\r\n if (json1.length == undefined || json2 == undefined) {\r\n Ext.Msg.alert('JSON ERROR', 'site or zip file not exists');\r\n return;\r\n }\r\n if (json1.length != json2.length) {\r\n Ext.Msg.alert('Error', 'Error JSON jsonSite.length(' + json1.length + ')!=jsonZip.length(' + json2.length + ')');\r\n return;\r\n }\r\n else {\r\n var json = { success: true, files: [] }\r\n for (var i = 0; i < json1.length; i++) {\r\n // cause datetime in zip is greater than datetime on site one second for odd number ( not even)\r\n var dateSite = new Date(json1[i][\"modifiedDate\"]);\r\n dateSite.setSeconds(0);\r\n var dateZip = new Date(json2[i][\"modifiedDate\"].replace(', ', ' '));\r\n dateZip.setSeconds(0);\r\n\r\n // Malaysia Time & Vietnam Time\r\n var hourMalaysia = dateSite.getHours();\r\n dateSite.setHours(hourMalaysia - 1);\r\n\r\n // fix one minute\r\n if (dateSite.getHours() == dateZip.getHours() && dateSite.getSeconds() == dateZip.getSeconds())\r\n if (dateZip.getMinutes() - dateSite.getMinutes() == 1) {\r\n var minute = dateSite.getMinutes() + 1;\r\n dateSite.setMinutes(minute, 0, 0);\r\n }\r\n\r\n if (dateSite.toLocaleString() != dateZip.toLocaleString()) {\r\n if (dateSite.toLocaleDateString() == dateZip.toLocaleDateString() && dateSite.getHours() < dateZip.getHours() && dateSite.getMinutes() == dateZip.getMinutes()) {\r\n console.log('server setup Vietnam TimeZone');\r\n }\r\n else {\r\n json[\"success\"] = false;\r\n json[\"files\"].push(json1[i][\"fileName\"] + '(' + dateSite.toLocaleString() + ')')\r\n }\r\n }\r\n }\r\n return json;\r\n }\r\n}", "static sortDescending() {\r\n const profiles = Store.getProfiles();\r\n profiles.sort(({ monthTime: a }, { monthTime: b }) => b - a);\r\n localStorage.setItem('profiles', JSON.stringify(profiles));\r\n }", "prepLoadProfile() {\n // loadProfile.json created by running yarn run loadProfile.\n fs.readFile('./sourceData/loadProfile.json', 'utf8', (err, data) => {\n if (err) {\n // @TODO handle\n } else {\n const loadProfileFromSourceData = JSON.parse(data);\n const outputLoadProfile = {};\n\n loadProfileFromSourceData.forEach((loadDateHour) => {\n const dateTimeArray = loadDateHour['Date/Time'].split(' ');\n const date = dateTimeArray[0].trim();\n const hour = dateTimeArray[1];\n\n // @TODO likely to make more sense to pull the time out and create an array\n // length 365 for each time of day.\n const newObj = {\n date,\n kwh: loadDateHour['Electricity:Facility [kWh](Hourly)'],\n };\n\n if (!outputLoadProfile[hour]) {\n outputLoadProfile[hour] = [];\n }\n\n // @ TODO need to also break out by month?\n\n outputLoadProfile[hour].push(newObj);\n });\n\n this.loadProfile = outputLoadProfile;\n\n this.app.get('/data/loadProfile', (request, response) => {\n response.send(JSON.stringify(this.loadProfile));\n });\n }\n });\n }", "function myFunction(date1, date2) {\n return (\n date1.getYear() === date2.getYear() &&\n date1.getMonth() === date2.getMonth() &&\n date1.getDate() === date2.getDate()\n );\n}", "function ageMatches(profile, preferences) {\n if (preferences.age['min'] < profile.age < preferences.age['max']) return true\n return false\n }", "function filterDate() {\r\n var startDate = new Date(\"2015-08-04\");\r\n var endDate = new Date(\"2015-08-12\");\r\n\r\n var resultProductData = product_data.filter(function(a) {\r\n var hitDates = a.ProductHits || {};\r\n // extract all date strings\r\n hitDates = Object.keys(hitDates);\r\n // improvement: use some. this is an improment because .map()\r\n // and .filter() are walking through all elements.\r\n // .some() stops this process if one item is found that returns true in the callback function and returns true for the whole expression\r\n hitDateMatchExists = hitDates.some(function(dateStr) {\r\n var date = new Date(dateStr);\r\n return date >= startDate && date <= endDate\r\n });\r\n return hitDateMatchExists;\r\n });\r\n console.log(resultProductData);\r\n}", "function sights(data){\n return data.datetime == date; \n}", "function calendar_helper_dateEquals(date1, date2){\n if (date1.getFullYear() == date2.getFullYear())\n if (date1.getMonth() == date2.getMonth())\n if (date1.getDate() == date2.getDate())\n return true;\n return false;\n}", "function howOldwhenjoined(person) {\r\n\r\n return person.joinedAt.getFullYear() - person.dateOfbirth.getFullYear()\r\n\r\n}", "function computeActiveRange(dateProfile, isComponentAllDay) {\n var range = dateProfile.activeRange;\n if (isComponentAllDay) {\n return range;\n }\n return {\n start: addMs$1(range.start, dateProfile.minTime.milliseconds),\n end: addMs$1(range.end, dateProfile.maxTime.milliseconds - 864e5) // 864e5 = ms in a day\n };\n }", "function computeTitleFormat(dateProfile) {\n var currentRangeUnit = dateProfile.currentRangeUnit;\n if (currentRangeUnit === 'year') {\n return { year: 'numeric' };\n }\n else if (currentRangeUnit === 'month') {\n return { year: 'numeric', month: 'long' }; // like \"September 2014\"\n }\n else {\n var days = diffWholeDays(dateProfile.currentRange.start, dateProfile.currentRange.end);\n if (days !== null && days > 1) {\n // multi-day range. shorter, like \"Sep 9 - 10 2014\"\n return { year: 'numeric', month: 'short', day: 'numeric' };\n }\n else {\n // one day. longer, like \"September 9 2014\"\n return { year: 'numeric', month: 'long', day: 'numeric' };\n }\n }\n }", "function computeTitleFormat(dateProfile) {\n var currentRangeUnit = dateProfile.currentRangeUnit;\n if (currentRangeUnit === 'year') {\n return { year: 'numeric' };\n }\n else if (currentRangeUnit === 'month') {\n return { year: 'numeric', month: 'long' }; // like \"September 2014\"\n }\n else {\n var days = diffWholeDays(dateProfile.currentRange.start, dateProfile.currentRange.end);\n if (days !== null && days > 1) {\n // multi-day range. shorter, like \"Sep 9 - 10 2014\"\n return { year: 'numeric', month: 'short', day: 'numeric' };\n }\n else {\n // one day. longer, like \"September 9 2014\"\n return { year: 'numeric', month: 'long', day: 'numeric' };\n }\n }\n }", "function computeTitleFormat(dateProfile) {\n var currentRangeUnit = dateProfile.currentRangeUnit;\n if (currentRangeUnit === 'year') {\n return { year: 'numeric' };\n }\n else if (currentRangeUnit === 'month') {\n return { year: 'numeric', month: 'long' }; // like \"September 2014\"\n }\n else {\n var days = diffWholeDays(dateProfile.currentRange.start, dateProfile.currentRange.end);\n if (days !== null && days > 1) {\n // multi-day range. shorter, like \"Sep 9 - 10 2014\"\n return { year: 'numeric', month: 'short', day: 'numeric' };\n }\n else {\n // one day. longer, like \"September 9 2014\"\n return { year: 'numeric', month: 'long', day: 'numeric' };\n }\n }\n }", "function computeActiveRange(dateProfile, isComponentAllDay) {\n var range = dateProfile.activeRange;\n if (isComponentAllDay) {\n return range;\n }\n return {\n start: addMs(range.start, dateProfile.minTime.milliseconds),\n end: addMs(range.end, dateProfile.maxTime.milliseconds - 864e5) // 864e5 = ms in a day\n };\n}", "function currentRecord(date) {\n var daybefore = new Date(date);\n daybefore.setHours(0, 0);\n return patient['json']['effective_time'] > daybefore / 1000;\n }", "function compareDates(date1, date2) {\n if (!date1 && !date2) {\n return true;\n }\n else if (!date1 || !date2) {\n return false;\n }\n else {\n return (date1.getFullYear() === date2.getFullYear() &&\n date1.getMonth() === date2.getMonth() &&\n date1.getDate() === date2.getDate());\n }\n}", "function compareDates(a, b) {\n var aDate = a.date;\n var bDate = b.date;\n\n let comparison = 0;\n if (aDate > bDate) {\n comparison = 1;\n } \n else if (aDate < bDate) {\n comparison = -1;\n }\n \n return comparison;\n}", "parseHistoricalComparisons(data, comparisonCurrency) {\n let results = {};\n data.forEach(year => {\n for (let rate in year.rates) {\n if (rate === comparisonCurrency) {\n results[year.date] = year.rates[rate];\n }\n }\n });\n return results;\n }", "static isSameDate(dateA, dateB) {\n return (\n dateA.getFullYear() === dateB.getFullYear()\n && dateA.getMonth() === dateB.getMonth()\n && dateA.getDate() === dateB.getDate()\n );\n }", "removeHeadlines(propsDate) {\n if (this.headline !== null) {\n // something to remove\n\n let headline = this.headline;\n let startDate = this.dateMap.get(headline);\n\n let endDate = new Date(\n `${headline.endYear}/${headline.endMonth}/${headline.endDay}`\n );\n\n if (propsDate <= startDate || propsDate >= endDate) {\n this.headline = null;\n this.props.updateProps({\n paused: false\n });\n }\n }\n }", "function buildTitleFormat(dateProfile) {\n var currentRangeUnit = dateProfile.currentRangeUnit;\n if (currentRangeUnit === 'year') {\n return { year: 'numeric' };\n }\n if (currentRangeUnit === 'month') {\n return { year: 'numeric', month: 'long' }; // like \"September 2014\"\n }\n var days = diffWholeDays(dateProfile.currentRange.start, dateProfile.currentRange.end);\n if (days !== null && days > 1) {\n // multi-day range. shorter, like \"Sep 9 - 10 2014\"\n return { year: 'numeric', month: 'short', day: 'numeric' };\n }\n // one day. longer, like \"September 9 2014\"\n return { year: 'numeric', month: 'long', day: 'numeric' };\n }", "static compare(date1, date2) {\n let d1 = this.reverseGregorian(date1);\n let d2 = this.reverseGregorian(date2);\n\n return d1.localeCompare(d2);\n }", "function datesAreEquivalent(date1,date2){\n return (date1.getMonth() == date2.getMonth()) && (date1.getFullYear() == date2.getFullYear()) && (date1.getDate() == date2.getDate()) ;\n}", "function compareDatesWH(date1, date2){\n var comp = DATES_EQUALS; // Son iguales\n if(date1.getFullYear() < date2.getFullYear()){\n comp = DATES_LOWER; // Date 1 es menor que date 2\n }\n else if(date1.getFullYear() > date2.getFullYear()){\n comp = DATES_HIGHER; // Date 1 es mayor que Date 2\n }\n else{\n if(date1.getFullYear() == date2.getFullYear() && date1.getMonth() < date2.getMonth()){\n comp = DATES_LOWER;\n }\n else if(date1.getFullYear() == date2.getFullYear() && date1.getMonth() > date2.getMonth()){\n comp = DATES_HIGHER; // Date 1 es mayor que Date 2\n }\n else{\n if(date1.getFullYear() == date2.getFullYear() && date1.getMonth() == date2.getMonth() && date1.getDate() < date2.getDate()){\n comp = DATES_LOWER;\n }\n else{\n if(date1.getFullYear() == date2.getFullYear() && date1.getMonth() == date2.getMonth() && date1.getDate() > date2.getDate()){\n comp = DATES_HIGHER; // Date 1 es mayor que Date 2\n }\n }\n }\n }\n return comp;\n }", "function compareDates(post){\n\tvar currentDate = new Date()\n\tcurrentDate.setDate(currentDate.getDate() -7);\n\n\tvar postDate = post.date\n\n\tif(new Date(currentDate) < new Date(postDate)){\n\t\treturn true\n\t}else{\n\t\treturn false\n\t}\n \n}", "function computeTitleFormat(dateProfile) {\n var currentRangeUnit = dateProfile.currentRangeUnit;\n if (currentRangeUnit === 'year') {\n return { year: 'numeric' };\n }\n else if (currentRangeUnit === 'month') {\n return { year: 'numeric', month: 'long' }; // like \"September 2014\"\n }\n else {\n var days = diffWholeDays(dateProfile.currentRange.start, dateProfile.currentRange.end);\n if (days !== null && days > 1) {\n // multi-day range. shorter, like \"Sep 9 - 10 2014\"\n return { year: 'numeric', month: 'short', day: 'numeric' };\n }\n else {\n // one day. longer, like \"September 9 2014\"\n return { year: 'numeric', month: 'long', day: 'numeric' };\n }\n }\n}" ]
[ "0.70069826", "0.69912595", "0.68671584", "0.65773696", "0.57456386", "0.5635219", "0.5573025", "0.55383563", "0.55383563", "0.55370533", "0.550376", "0.54983395", "0.5423133", "0.5423133", "0.5367248", "0.5354451", "0.5335503", "0.5323803", "0.5323346", "0.5313888", "0.5293732", "0.5292286", "0.52725744", "0.5263056", "0.52573633", "0.52015316", "0.5192288", "0.5183743", "0.5183743", "0.5176723", "0.5165954", "0.5163989", "0.5161392", "0.51506424", "0.51506424", "0.51506424", "0.5147318", "0.51364005", "0.512418", "0.512418", "0.512418", "0.512418", "0.51200485", "0.5108286", "0.50903416", "0.5078047", "0.5078047", "0.5075699", "0.5070302", "0.50663", "0.50614357", "0.50614357", "0.5060023", "0.50477064", "0.50409126", "0.5015973", "0.5007413", "0.5007413", "0.5004435", "0.49950126", "0.4984111", "0.4983493", "0.49824274", "0.49817842", "0.4980557", "0.4974814", "0.49744684", "0.49743095", "0.4973245", "0.49591845", "0.49558368", "0.49558368", "0.49469215", "0.49460897", "0.49358702", "0.49300727", "0.4925886", "0.49228263", "0.49219108", "0.49194187", "0.49124584", "0.49074343", "0.49051946", "0.49020636", "0.49020636", "0.49020636", "0.48859596", "0.48791176", "0.4873455", "0.48689583", "0.4866422", "0.48591515", "0.48472342", "0.4845483", "0.48411822", "0.48386914", "0.48294437", "0.4829149", "0.4826256" ]
0.6989276
3
TODO: somehow combine with parseRange? Will return null if the start/end props were present but parsed invalidly.
function parseOpenDateSpan(raw, dateEnv) { var leftovers = {}; var standardProps = refineProps(raw, STANDARD_PROPS, {}, leftovers); var startMeta = standardProps.start ? dateEnv.createMarkerMeta(standardProps.start) : null; var endMeta = standardProps.end ? dateEnv.createMarkerMeta(standardProps.end) : null; var allDay = standardProps.allDay; if (allDay == null) { allDay = (startMeta && startMeta.isTimeUnspecified) && (!endMeta || endMeta.isTimeUnspecified); } // use this leftover object as the selection object leftovers.range = { start: startMeta ? startMeta.marker : null, end: endMeta ? endMeta.marker : null }; leftovers.allDay = allDay; return leftovers; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parseRange(text) {\n\t\t\tvar dateFormat = options.altFormat,\n\t\t\t range = null;\n\t\t\tif (text) {\n\t\t\t\ttry {\n\t\t\t\t\trange = JSON.parse(text, function (key, value) {\n\t\t\t\t\t\treturn key ? $.datepicker.parseDate(dateFormat, value) : value;\n\t\t\t\t\t});\n\t\t\t\t} catch (e) {}\n\t\t\t}\n\t\t\treturn range;\n\t\t}", "function parseRange(text) {\n\t\t\tvar dateFormat = options.altFormat,\n\t\t\t\trange = null;\n\t\t\tif (text) {\n\t\t\t\ttry {\n\t\t\t\t\trange = JSON.parse(text, function(key, value) {\n\t\t\t\t\t\treturn key ? $.datepicker.parseDate(dateFormat, value) : value;\n\t\t\t\t\t});\n\t\t\t\t} catch (e) {\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn range;\n\t\t}", "parseProps(offset) {\n const {\n inFlow,\n parent,\n src\n } = this;\n const props = [];\n let lineHasProps = false;\n offset = this.atLineStart ? PlainValue.Node.endOfIndent(src, offset) : PlainValue.Node.endOfWhiteSpace(src, offset);\n let ch = src[offset];\n\n while (ch === PlainValue.Char.ANCHOR || ch === PlainValue.Char.COMMENT || ch === PlainValue.Char.TAG || ch === '\\n') {\n if (ch === '\\n') {\n const lineStart = offset + 1;\n const inEnd = PlainValue.Node.endOfIndent(src, lineStart);\n const indentDiff = inEnd - (lineStart + this.indent);\n const noIndicatorAsIndent = parent.type === PlainValue.Type.SEQ_ITEM && parent.context.atLineStart;\n if (!PlainValue.Node.nextNodeIsIndented(src[inEnd], indentDiff, !noIndicatorAsIndent)) break;\n this.atLineStart = true;\n this.lineStart = lineStart;\n lineHasProps = false;\n offset = inEnd;\n } else if (ch === PlainValue.Char.COMMENT) {\n const end = PlainValue.Node.endOfLine(src, offset + 1);\n props.push(new PlainValue.Range(offset, end));\n offset = end;\n } else {\n let end = PlainValue.Node.endOfIdentifier(src, offset + 1);\n\n if (ch === PlainValue.Char.TAG && src[end] === ',' && /^[a-zA-Z0-9-]+\\.[a-zA-Z0-9-]+,\\d\\d\\d\\d(-\\d\\d){0,2}\\/\\S/.test(src.slice(offset + 1, end + 13))) {\n // Let's presume we're dealing with a YAML 1.0 domain tag here, rather\n // than an empty but 'foo.bar' private-tagged node in a flow collection\n // followed without whitespace by a plain string starting with a year\n // or date divided by something.\n end = PlainValue.Node.endOfIdentifier(src, end + 5);\n }\n\n props.push(new PlainValue.Range(offset, end));\n lineHasProps = true;\n offset = PlainValue.Node.endOfWhiteSpace(src, end);\n }\n\n ch = src[offset];\n } // '- &a : b' has an anchor on an empty node\n\n\n if (lineHasProps && ch === ':' && PlainValue.Node.atBlank(src, offset + 1, true)) offset -= 1;\n const type = ParseContext.parseType(src, offset, inFlow);\n return {\n props,\n type,\n valueStart: offset\n };\n }", "parseProps(offset) {\n const {\n inFlow,\n parent,\n src\n } = this;\n const props = [];\n let lineHasProps = false;\n offset = this.atLineStart ? PlainValue.Node.endOfIndent(src, offset) : PlainValue.Node.endOfWhiteSpace(src, offset);\n let ch = src[offset];\n\n while (ch === PlainValue.Char.ANCHOR || ch === PlainValue.Char.COMMENT || ch === PlainValue.Char.TAG || ch === '\\n') {\n if (ch === '\\n') {\n let inEnd = offset;\n let lineStart;\n\n do {\n lineStart = inEnd + 1;\n inEnd = PlainValue.Node.endOfIndent(src, lineStart);\n } while (src[inEnd] === '\\n');\n\n const indentDiff = inEnd - (lineStart + this.indent);\n const noIndicatorAsIndent = parent.type === PlainValue.Type.SEQ_ITEM && parent.context.atLineStart;\n if (src[inEnd] !== '#' && !PlainValue.Node.nextNodeIsIndented(src[inEnd], indentDiff, !noIndicatorAsIndent)) break;\n this.atLineStart = true;\n this.lineStart = lineStart;\n lineHasProps = false;\n offset = inEnd;\n } else if (ch === PlainValue.Char.COMMENT) {\n const end = PlainValue.Node.endOfLine(src, offset + 1);\n props.push(new PlainValue.Range(offset, end));\n offset = end;\n } else {\n let end = PlainValue.Node.endOfIdentifier(src, offset + 1);\n\n if (ch === PlainValue.Char.TAG && src[end] === ',' && /^[a-zA-Z0-9-]+\\.[a-zA-Z0-9-]+,\\d\\d\\d\\d(-\\d\\d){0,2}\\/\\S/.test(src.slice(offset + 1, end + 13))) {\n // Let's presume we're dealing with a YAML 1.0 domain tag here, rather\n // than an empty but 'foo.bar' private-tagged node in a flow collection\n // followed without whitespace by a plain string starting with a year\n // or date divided by something.\n end = PlainValue.Node.endOfIdentifier(src, end + 5);\n }\n\n props.push(new PlainValue.Range(offset, end));\n lineHasProps = true;\n offset = PlainValue.Node.endOfWhiteSpace(src, end);\n }\n\n ch = src[offset];\n } // '- &a : b' has an anchor on an empty node\n\n\n if (lineHasProps && ch === ':' && PlainValue.Node.atBlank(src, offset + 1, true)) offset -= 1;\n const type = ParseContext.parseType(src, offset, inFlow);\n return {\n props,\n type,\n valueStart: offset\n };\n }", "parseProps(offset) {\n const {\n inFlow,\n parent,\n src\n } = this;\n const props = [];\n let lineHasProps = false;\n offset = this.atLineStart ? PlainValueEc8e588e.Node.endOfIndent(src, offset) : PlainValueEc8e588e.Node.endOfWhiteSpace(src, offset);\n let ch = src[offset];\n\n while (ch === PlainValueEc8e588e.Char.ANCHOR || ch === PlainValueEc8e588e.Char.COMMENT || ch === PlainValueEc8e588e.Char.TAG || ch === '\\n') {\n if (ch === '\\n') {\n const lineStart = offset + 1;\n const inEnd = PlainValueEc8e588e.Node.endOfIndent(src, lineStart);\n const indentDiff = inEnd - (lineStart + this.indent);\n const noIndicatorAsIndent = parent.type === PlainValueEc8e588e.Type.SEQ_ITEM && parent.context.atLineStart;\n if (!PlainValueEc8e588e.Node.nextNodeIsIndented(src[inEnd], indentDiff, !noIndicatorAsIndent)) break;\n this.atLineStart = true;\n this.lineStart = lineStart;\n lineHasProps = false;\n offset = inEnd;\n } else if (ch === PlainValueEc8e588e.Char.COMMENT) {\n const end = PlainValueEc8e588e.Node.endOfLine(src, offset + 1);\n props.push(new PlainValueEc8e588e.Range(offset, end));\n offset = end;\n } else {\n let end = PlainValueEc8e588e.Node.endOfIdentifier(src, offset + 1);\n\n if (ch === PlainValueEc8e588e.Char.TAG && src[end] === ',' && /^[a-zA-Z0-9-]+\\.[a-zA-Z0-9-]+,\\d\\d\\d\\d(-\\d\\d){0,2}\\/\\S/.test(src.slice(offset + 1, end + 13))) {\n // Let's presume we're dealing with a YAML 1.0 domain tag here, rather\n // than an empty but 'foo.bar' private-tagged node in a flow collection\n // followed without whitespace by a plain string starting with a year\n // or date divided by something.\n end = PlainValueEc8e588e.Node.endOfIdentifier(src, end + 5);\n }\n\n props.push(new PlainValueEc8e588e.Range(offset, end));\n lineHasProps = true;\n offset = PlainValueEc8e588e.Node.endOfWhiteSpace(src, end);\n }\n\n ch = src[offset];\n } // '- &a : b' has an anchor on an empty node\n\n\n if (lineHasProps && ch === ':' && PlainValueEc8e588e.Node.atBlank(src, offset + 1, true)) offset -= 1;\n const type = ParseContext.parseType(src, offset, inFlow);\n return {\n props,\n type,\n valueStart: offset\n };\n }", "function parseDateRange(str) {\n\t\tstr = \"\"+str;\n\n\t\tvar m = str.match(/^\\s*(\\d\\d)\\/(\\d\\d)\\/(\\d{4})\\s*-\\s*(\\d\\d)\\/(\\d\\d)\\/(\\d{4})\\s*$/)\n\n\t\treturn {\n\t\t\tstart: new Date(parseInt(m[3]), parseInt(m[2]) - 1, parseInt(m[1])),\n\t\t\tend: new Date(parseInt(m[6]), parseInt(m[5]) - 1, parseInt(m[4]) + 1),\n\t\t};\n\t}", "parseProps(offset) {\n const {\n inFlow,\n parent,\n src\n } = this;\n const props = [];\n let lineHasProps = false;\n offset = this.atLineStart ? PlainValueEc8e588e.Node.endOfIndent(src, offset) : PlainValueEc8e588e.Node.endOfWhiteSpace(src, offset);\n let ch = src[offset];\n\n while (ch === PlainValueEc8e588e.Char.ANCHOR || ch === PlainValueEc8e588e.Char.COMMENT || ch === PlainValueEc8e588e.Char.TAG || ch === '\\n') {\n if (ch === '\\n') {\n let inEnd = offset;\n let lineStart;\n\n do {\n lineStart = inEnd + 1;\n inEnd = PlainValueEc8e588e.Node.endOfIndent(src, lineStart);\n } while (src[inEnd] === '\\n');\n\n const indentDiff = inEnd - (lineStart + this.indent);\n const noIndicatorAsIndent = parent.type === PlainValueEc8e588e.Type.SEQ_ITEM && parent.context.atLineStart;\n if (src[inEnd] !== '#' && !PlainValueEc8e588e.Node.nextNodeIsIndented(src[inEnd], indentDiff, !noIndicatorAsIndent)) break;\n this.atLineStart = true;\n this.lineStart = lineStart;\n lineHasProps = false;\n offset = inEnd;\n } else if (ch === PlainValueEc8e588e.Char.COMMENT) {\n const end = PlainValueEc8e588e.Node.endOfLine(src, offset + 1);\n props.push(new PlainValueEc8e588e.Range(offset, end));\n offset = end;\n } else {\n let end = PlainValueEc8e588e.Node.endOfIdentifier(src, offset + 1);\n\n if (ch === PlainValueEc8e588e.Char.TAG && src[end] === ',' && /^[a-zA-Z0-9-]+\\.[a-zA-Z0-9-]+,\\d\\d\\d\\d(-\\d\\d){0,2}\\/\\S/.test(src.slice(offset + 1, end + 13))) {\n // Let's presume we're dealing with a YAML 1.0 domain tag here, rather\n // than an empty but 'foo.bar' private-tagged node in a flow collection\n // followed without whitespace by a plain string starting with a year\n // or date divided by something.\n end = PlainValueEc8e588e.Node.endOfIdentifier(src, end + 5);\n }\n\n props.push(new PlainValueEc8e588e.Range(offset, end));\n lineHasProps = true;\n offset = PlainValueEc8e588e.Node.endOfWhiteSpace(src, end);\n }\n\n ch = src[offset];\n } // '- &a : b' has an anchor on an empty node\n\n\n if (lineHasProps && ch === ':' && PlainValueEc8e588e.Node.atBlank(src, offset + 1, true)) offset -= 1;\n const type = ParseContext.parseType(src, offset, inFlow);\n return {\n props,\n type,\n valueStart: offset\n };\n }", "function validateStartEnd(start, end) {\n if (!start || !start.isValid) {\n return new Invalid(\"missing or invalid start\");\n } else if (!end || !end.isValid) {\n return new Invalid(\"missing or invalid end\");\n } else if (end < start) {\n return new Invalid(\"end before start\", \"The end of an interval must be after its start, but you had start=\" + start.toISO() + \" and end=\" + end.toISO());\n } else {\n return null;\n }\n}", "get start() {\n return this.ranges.length ? this.ranges[0].start : null;\n }", "function validateStartEnd(start, end) {\n if (!start || !start.isValid) {\n return Interval.invalid(\"missing or invalid start\");\n } else if (!end || !end.isValid) {\n return Interval.invalid(\"missing or invalid end\");\n } else if (end < start) {\n return Interval.invalid(\"end before start\", \"The end of an interval must be after its start, but you had start=\" + start.toISO() + \" and end=\" + end.toISO());\n } else {\n return null;\n }\n }", "get ipRange() {\n if (this.ipRangeInner) {\n return {\n end: this.ipRangeInner.end,\n start: this.ipRangeInner.start,\n };\n }\n return undefined;\n }", "get ipRange() {\n if (this.ipRangeInner) {\n return {\n end: this.ipRangeInner.end,\n start: this.ipRangeInner.start,\n };\n }\n return undefined;\n }", "function normalizeEventRange(props) {\n\n\t\tnormalizeEventRangeTimes(props);\n\n\t\tif (props.end && !props.end.isAfter(props.start)) {\n\t\t\tprops.end = null;\n\t\t}\n\n\t\tif (!props.end) {\n\t\t\tif (options.forceEventDuration) {\n\t\t\t\tprops.end = t.getDefaultEventEnd(props.allDay, props.start);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tprops.end = null;\n\t\t\t}\n\t\t}\n\t}", "constructor(stringRange) {\n stringRange = stringRange.trim();\n this.range = [];\n // if the last char is a +, the range includes all indexes greater than the last one parsed\n this.forever = false;\n if (stringRange.slice(-1) === '+') {\n this.forever = true;\n stringRange = stringRange.slice(0, -1);\n }\n if (stringRange.length) {\n stringRange.split(',').forEach(el => {\n let dashRange = el.split('-');\n if (dashRange.length === 1) {\n this.range.push(parseInt(el));\n } else {\n let from = parseInt(dashRange[0]);\n let to = parseInt(dashRange[1]);\n if (to >= from) {\n for (let i = from; i <= to; ++i) {\n this.range.push(i);\n }\n } else {\n console.error(`range a-b with a > b \"${from}-${to}\"`);\n }\n }\n });\n }\n }", "function validateStartEnd(start, end) {\n if (!start || !start.isValid) {\n return Interval.invalid(\"missing or invalid start\");\n } else if (!end || !end.isValid) {\n return Interval.invalid(\"missing or invalid end\");\n } else if (end < start) {\n return Interval.invalid(\"end before start\", `The end of an interval must be after its start, but you had start=${start.toISO()} and end=${end.toISO()}`);\n } else {\n return null;\n }\n}", "function validateStartEnd(start, end) {\n if (!start || !start.isValid) {\n return Interval.invalid(\"missing or invalid start\");\n } else if (!end || !end.isValid) {\n return Interval.invalid(\"missing or invalid end\");\n } else if (end < start) {\n return Interval.invalid(\"end before start\", `The end of an interval must be after its start, but you had start=${start.toISO()} and end=${end.toISO()}`);\n } else {\n return null;\n }\n}", "function validateStartEnd(start, end) {\n if (!start || !start.isValid) {\n return Interval.invalid(\"missing or invalid start\");\n } else if (!end || !end.isValid) {\n return Interval.invalid(\"missing or invalid end\");\n } else if (end < start) {\n return Interval.invalid(\"end before start\", \"The end of an interval must be after its start, but you had start=\" + start.toISO() + \" and end=\" + end.toISO());\n } else {\n return null;\n }\n}", "function validateStartEnd(start, end) {\n if (!start || !start.isValid) {\n return Interval.invalid(\"missing or invalid start\");\n } else if (!end || !end.isValid) {\n return Interval.invalid(\"missing or invalid end\");\n } else if (end < start) {\n return Interval.invalid(\"end before start\", \"The end of an interval must be after its start, but you had start=\" + start.toISO() + \" and end=\" + end.toISO());\n } else {\n return null;\n }\n}", "function validateStartEnd(start, end) {\n if (!start || !start.isValid) {\n return Interval.invalid(\"missing or invalid start\");\n } else if (!end || !end.isValid) {\n return Interval.invalid(\"missing or invalid end\");\n } else if (end < start) {\n return Interval.invalid(\"end before start\", \"The end of an interval must be after its start, but you had start=\" + start.toISO() + \" and end=\" + end.toISO());\n } else {\n return null;\n }\n}", "function validateStartEnd(start, end) {\n if (!start || !start.isValid) {\n return Interval.invalid(\"missing or invalid start\");\n } else if (!end || !end.isValid) {\n return Interval.invalid(\"missing or invalid end\");\n } else if (end < start) {\n return Interval.invalid(\"end before start\", \"The end of an interval must be after its start, but you had start=\" + start.toISO() + \" and end=\" + end.toISO());\n } else {\n return null;\n }\n}", "function getValue(doc, start, end) {\n var s = doc.indexOf(start);\n if (s < 0) return null;\n s = s + start.length;\n if (end !== null) {\n var e = doc.indexOf(end, s);\n if (e < 0) return null;\n return doc.substr(s, e - s);\n }\n return doc.substr(s);\n }", "prevMatchInRange(state, from, to) {\n for (let pos = to;;) {\n let start = Math.max(from, pos - 10000 /* ChunkSize */ - this.spec.unquoted.length);\n let cursor = stringCursor(this.spec, state, start, pos), range = null;\n while (!cursor.nextOverlapping().done)\n range = cursor.value;\n if (range)\n return range;\n if (start == from)\n return null;\n pos -= 10000 /* ChunkSize */;\n }\n }", "function normalizeEventRange(props) {\n\n normalizeEventRangeTimes(props);\n\n if (props.end && !props.end.isAfter(props.start)) {\n props.end = null;\n }\n\n if (!props.end) {\n if (options.forceEventDuration) {\n props.end = t.getDefaultEventEnd(props.allDay, props.start);\n }\n else {\n props.end = null;\n }\n }\n }", "function getValue(doc, start, end) {\n var s = doc.indexOf(start);\n if (s < 0) return null;\n\n s = s + start.length;\n\n if (end != null) {\n var e = doc.indexOf(end, s);\n if (e < 0) return null;\n\n return doc.substr(s, e - s);\n }\n\n return doc.substr(s);\n }", "function validatePositions(start, end) {\n if (!start || start === 'none' || !end || end === 'none') {\n return 'Start or end position is unassigned.';\n }\n\n if (start === end) {\n return 'Start and end positions can\\'t be the same.'\n }\n\n if (start > end) {\n return 'Start position can\\'t be after end position.';\n }\n\n return null;\n}", "function validateStartEnd(start, end) {\n return !!start && !!end && start.isValid && end.isValid && start <= end;\n}", "function parseTimelineRangeOffset(value, defaultValue) {\n if(!value) return defaultValue;\n\n // Extract parts from the passed in value.\n let { rangeName, offset } = defaultValue;\n\n // Author passed in something like `{ rangeName: 'cover', offset: CSS.percent(100) }`\n if (value instanceof Object) {\n if (value.rangeName != undefined) {\n rangeName = value.rangeName;\n };\n\n if (value.offset !== undefined) {\n offset = value.offset;\n }\n }\n // Author passed in something like `\"cover 100%\"`\n else {\n const parts = value.split(' ');\n\n rangeName = parts[0];\n\n if (parts.length == 2) {\n offset = parts[1];\n }\n }\n\n // Validate rangeName\n if (!ANIMATION_RANGE_NAMES.includes(rangeName)) {\n throw TypeError(\"Invalid range name\");\n }\n\n // Validate and process offset\n // TODO: support more than % and px. Don’t forget about calc() along with that.\n if (!(offset instanceof Object)) {\n if (!offset.endsWith('%') && !offset.endsWith('px')) {\n throw TypeError(\"Invalid range offset. Only % and px are supported (for now)\");\n }\n\n const parsedValue = parseFloat(offset);\n\n if (offset.endsWith('%')) {\n offset = CSS.percent(parsedValue);\n } else if (offset.endsWith('px')) {\n offset = CSS.px(parsedValue);\n }\n\n }\n\n return { rangeName, offset };\n}", "function parseRangeValue(value, min, max, display_label, decimals) {\n\tif (!value && value.length !== 2) {\n\t\treturn false;\n\t}\n\n\tvar returnVal = display_label;\n\tvar start_val = value[0] ? value[0] : min;\n\tvar end_val = value[1] ? value[1] : max;\n\n\tstart_val = !decimals ? Math.round(start_val) : start_val;\n\tend_val = !decimals ? Math.round(end_val) : end_val;\n\n\treturnVal = returnVal.replace(\"{start}\", \"<span class=\\\"alm-range-start\\\">\" + start_val + \"</span>\");\n\treturnVal = returnVal.replace(\"{end}\", \"<span class=\\\"alm-range-end\\\">\" + end_val + \"</span>\");\n\n\treturn returnVal;\n}", "function extractRange(ranges, coord) {\n var axis, from, to, key, axes = plot.getAxes();\n\n for (var k in axes) {\n axis = axes[k];\n if (axis.direction == coord) {\n key = coord + axis.n + \"axis\";\n if (!ranges[key] && axis.n == 1)\n key = coord + \"axis\"; // support x1axis as xaxis\n if (ranges[key]) {\n from = ranges[key].from;\n to = ranges[key].to;\n break;\n }\n }\n }\n\n // backwards-compat stuff - to be removed in future\n if (!ranges[key]) {\n axis = coord == \"x\" ? plot.getXAxes()[0] : plot.getYAxes()[0];\n from = ranges[coord + \"1\"];\n to = ranges[coord + \"2\"];\n }\n\n // auto-reverse as an added bonus\n if (from != null && to != null && from > to) {\n var tmp = from;\n from = to;\n to = tmp;\n }\n \n return { from: from, to: to, axis: axis };\n }", "function extractRange(ranges, coord) {\n var axis, from, to, key, axes = plot.getAxes();\n\n for (var k in axes) {\n axis = axes[k];\n if (axis.direction == coord) {\n key = coord + axis.n + \"axis\";\n if (!ranges[key] && axis.n == 1)\n key = coord + \"axis\"; // support x1axis as xaxis\n if (ranges[key]) {\n from = ranges[key].from;\n to = ranges[key].to;\n break;\n }\n }\n }\n\n // backwards-compat stuff - to be removed in future\n if (!ranges[key]) {\n axis = coord == \"x\" ? plot.getXAxes()[0] : plot.getYAxes()[0];\n from = ranges[coord + \"1\"];\n to = ranges[coord + \"2\"];\n }\n\n // auto-reverse as an added bonus\n if (from != null && to != null && from > to) {\n var tmp = from;\n from = to;\n to = tmp;\n }\n \n return { from: from, to: to, axis: axis };\n }", "function parseTimeRange(str) {\n\t\tstr = \"\"+str;\n\n\t\tvar m = str.match(/^\\s*(Su|Mo|Tu|We|Th|Fr|Sa)\\s*(\\d\\d?):(\\d\\d)\\s*(AM|PM)\\s*-\\s*(\\d\\d?):(\\d\\d)\\s*(AM|PM)\\s*$/);\n\n\t\treturn {\n\t\t\tday: ({\"Su\": 0, \"Mo\": 1, \"Tu\": 2, \"We\": 3, \"Th\": 4, \"Fr\": 5, \"Sa\": 6})[m[1]],\n\t\t\tstart: {\n\t\t\t\thours: (m[2] == 12 ? 0 : parseInt(m[2])) + (m[4] == \"PM\" ? 12 : 0),\n\t\t\t\tminutes: parseInt(m[3]),\n\t\t\t},\n\t\t\tend: {\n\t\t\t\thours: (m[5] == 12 ? 0 : parseInt(m[5])) + (m[7] == \"PM\" ? 12 : 0),\n\t\t\t\tminutes: parseInt(m[6]),\n\t\t\t},\n\t\t}\n\t}", "function isStart(value, start, end) {\n return end !== null && start !== end && value < end && value === start;\n}", "function isStart(value, start, end) {\n return end !== null && start !== end && value < end && value === start;\n}", "function isStart(value, start, end) {\n return end !== null && start !== end && value < end && value === start;\n}", "startParse(input, fragments, ranges) {\n if (typeof input == \"string\")\n input = new StringInput(input);\n ranges = !ranges ? [new Range(0, input.length)] : ranges.length ? ranges.map(r => new Range(r.from, r.to)) : [new Range(0, 0)];\n return this.createParse(input, fragments || [], ranges);\n }", "function rangeFromTokens(start, end) {\n if (!end) {\n end = start;\n }\n return util_1.default.createRange(start.startLine - 1, start.startColumn - 1, end.endLine - 1, end.endColumn);\n}", "get(input, start, end){\n start = start || 0\n end = end || input.length\n if( typeof input === 'string' )\n input = new Source(input)\n var t = this.match(input,start,end)\n if(t.isError()) throw t.stringify()\n return t.value\n }", "function validRange(potentialRange) {\n if (potentialRange.indexOf(`:`) !== -1)\n return null;\n let range = rangesCache.get(potentialRange);\n if (typeof range !== `undefined`)\n return range;\n try {\n range = new semver_1.default.Range(potentialRange);\n }\n catch (_a) {\n range = null;\n }\n rangesCache.set(potentialRange, range);\n return range;\n}", "function getRange(cmpStr) {\n if (cmpStr == \"\") { return {}; }\n var compareArr = cmpStr.split(\",\");\n var maxDate = null;\n var minDate = null;\n for (var i = 0; i < compareArr.length; i++) {\n if (compareArr[i] == 'g.today') {\n minDate = new Date();\n }\n else if (compareArr[i] == 'l.today') {\n maxDate = new Date();\n }\n }\n return { minDate: minDate, maxDate: maxDate };\n}", "match(input, start, end){\n start = start || 0\n end = end || input.length\n if(typeof input === 'string') input = new Source(input)\n if(!this.startsWith(input.get(start)))\n return this.error(input, start, start)\n var n = end\n end=start+1\n while(end<n && Character.isDigit(input.get(end))) end++\n if(end==n) \n return this.token(input, start, end, Number.parseInt(input.substring(start,end)))\n var integer = true\n if(input.get(end)=='.'){\n integer = false\n end++\n var s=end\n while(end<n && Character.isDigit(input.get(end))) end++\n if(end==n) \n return this.token(input, start, end, Number.parseFloat(input.substring(start,end)))\n if(end==s) return this.error(input, start, end)\n }\n if(input.get(end)=='E' || input.get(end)=='e'){\n integer = false\n end++\n if(end==n) return this.error(input, start, end)\n if(this.isSign(input.get(end))) end++\n if(end==n) return this.error(input, start, end)\n var s = end\n while(end<n && Character.isDigit(input.get(end))) end++\n if(end==s) return this.error(input, start, end)\n }\n if( integer ) return this.token(input, start, end, Number.parseInt(input.substring(start,end)))\n return this.token(input, start, end, Number.parseFloat(input.substring(start,end)))\n }", "function rangeOrIndividual(start, end) {\n if (end - start === 1) {\n return start;\n }\n else {\n return [start, end];\n }\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}", "function range(start, end) {\n //Input sanitization\n if (!start && !end) return \"Please provide both start and end points\";\n if (!end) return \"Please provide an endpoint\";\n if (isNaN(start) || isNaN(end))\n return \"Both start and end points must be numbers\";\n\n let arr = [];\n while (start <= end) {\n arr.push(start);\n start++;\n }\n return arr;\n}", "getConvertLocation(start, end) {\n return {\n range: [start, end],\n loc: {\n start: this.getLocFromIndex(start),\n end: this.getLocFromIndex(end),\n },\n };\n }", "function ParseSourceSpan(start, end) {\n var fullStart = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : start;\n var details = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;\n\n Object(C_Users_Abid_Loqmen_Desktop_NGforce_thesis_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_12__[\"default\"])(this, ParseSourceSpan);\n\n this.start = start;\n this.end = end;\n this.fullStart = fullStart;\n this.details = details;\n }", "function parseAnimationRange(value) {\n const animationRange = {\n start: defaultAnimationRangeStart(),\n end: defaultAnimationRangeEnd()\n };\n\n if (!value)\n return animationRange;\n\n // Format:\n // <start-name> <start-offset> <end-name> <end-offset>\n // <name> --> <name> 0% <name> 100%\n // <name> <start-offset> <end-offset> --> <name> <start-offset>\n // <name> <end-offset>\n // <start-offset> <end-offset> --> cover <start-offset> cover <end-offset>\n // TODO: Support all formatting options once ratified in the spec.\n const parts = value.split(' ');\n const rangeNames = [];\n const offsets = [];\n\n parts.forEach(part => {\n if (part.endsWith('%'))\n offsets.push(parseFloat(part));\n else\n rangeNames.push(part);\n });\n\n if (rangeNames.length > 2 || offsets.length > 2 || offsets.length == 1) {\n throw TypeError(\"Invalid time range or unsupported time range format.\");\n }\n\n if (rangeNames.length) {\n animationRange.start.rangeName = rangeNames[0];\n animationRange.end.rangeName = rangeNames.length > 1 ? rangeNames[1] : rangeNames[0];\n }\n\n // TODO: allow calc() in the offsets\n if (offsets.length > 1) {\n animationRange.start.offset = CSS.percent(offsets[0]);\n animationRange.end.offset = CSS.percent(offsets[1]);\n }\n\n return animationRange;\n}", "function loc(parser, start) {\n if (parser.options.noLocation) {\n return null;\n }\n if (parser.options.noSource) {\n return { start: start, end: parser.prevEnd };\n }\n return { start: start, end: parser.prevEnd, source: parser.source };\n}", "_isRangeStart(value) {\n return isStart(value, this.startValue, this.endValue);\n }", "_isRangeStart(value) {\n return isStart(value, this.startValue, this.endValue);\n }", "function strToRange(str) {\r\n /* Clean String */\r\n if (typeof str != 'undefined') {\r\n str = str.replace(/%|\\$/ig,'');\r\n\r\n var obj = {\r\n min: parseInt(Math.round(str)),\r\n max: parseInt(Math.round(str))\r\n };\r\n\r\n if (str.split(',').length > 1) {\r\n obj.min = parseInt(Math.round(str.split(',')[0]));\r\n obj.max = parseInt(Math.round(str.split(',')[1]));\r\n }\r\n\r\n return obj;\r\n }\r\n}", "function RangeFromStr(str) {\n\tvals = str.split('-');\n\t\n\tthis.low = vals[0];\n\tthis.high = vals[1];\n}", "getRange(start, end) {\n return Array.from(\n {\n length: (parseInt(end, 10) + 1) - parseInt(start, 10)\n },\n (v, k) => k + parseInt(start, 10)\n );\n }", "function parseDateRange(input) {\n var dateRange = input.split(\"..\");\n\n if(dateRange.length != 2) { dateRange = [dateRange[0], dateRange[0]]; }\n\n return dateRange;\n }", "function parse_value_str (str) {\n\t// either a single number, a range \"a..b\" or a set \"3, 5, 8, 10\"\n\tvar result;\n\n // range\n\tif (str.indexOf('..') > -1) { \n\t\tvar arr = str.split('..').map(Number);\n\t\tif (arr.length == 2 && !arr.some(isNaN)) {\n\t\t\tresult = {min:arr[0], max:arr[1]}\n\t\t}\n\t}\n\n\t// set\n\telse if (str.indexOf(',') > -1) {\n\t\tvar arr = str.replace(/[^0-9-,]/gi, '').split(',').map(Number);\n\t\tif (!arr.some(isNaN)) { result = arr }\n\t}\n\n // single value\n\telse result = Number(str);\n\n\t// error check\n\tif (result == NaN) { return null } else { return result }\n}", "normalize(prop) {\n return prop.replace('-start', '')\n }", "function loc(parser, start) {\n\t if (parser.options.noLocation) {\n\t return null;\n\t }\n\t if (parser.options.noSource) {\n\t return { start: start, end: parser.prevEnd };\n\t }\n\t return { start: start, end: parser.prevEnd, source: parser.source };\n\t}", "getStartValue() {\n return this.value ? this.value.start : null;\n }", "getStartValue() {\n return this.value ? this.value.start : null;\n }", "function getClippedInterval(entity, intervalStart, intervalEnd) {\n let startTime = parseTimings(entity.begin);\n let endTime = parseTimings(entity.end);\n startTime = clipStartTime(startTime, intervalStart);\n endTime = clipEndTime(endTime, intervalEnd);\n if (typeof intervalStart !== 'undefined' && typeof intervalEnd !== 'undefined') {\n if (endTime < intervalStart || startTime > intervalEnd) {\n log('TTML: Cue ' + startTime + '-' + endTime + ' outside interval ' +\n intervalStart + '-' + intervalEnd);\n return null;\n }\n }\n return [startTime, endTime];\n }", "function fillBlankError(err, start, end) {\n return Object.assign({}, err, {\n range: {\n start,\n end\n }\n });\n}", "function getClippedInterval(entity, intervalStart, intervalEnd) {\n var startTime = parseTimings(entity.begin);\n var endTime = parseTimings(entity.end);\n startTime = clipStartTime(startTime, intervalStart);\n endTime = clipEndTime(endTime, intervalEnd);\n if (typeof intervalStart !== 'undefined' && typeof intervalEnd !== 'undefined') {\n if (endTime < intervalStart || startTime > intervalEnd) {\n log('TTML: Cue ' + startTime + '-' + endTime + ' outside interval ' + intervalStart + '-' + intervalEnd);\n return null;\n }\n }\n return [startTime, endTime];\n }", "start(range) {\n var [start] = Range.edges(range);\n return start;\n }", "start(range) {\n var [start] = Range.edges(range);\n return start;\n }", "validate(node) {\n const helper = new misc_functions_1.ReturnHelper();\n\n if (doc_walker_util_1.isTypedInfo(node)) {\n const actualType = node.node.type;\n\n if (!ranges.hasOwnProperty(actualType)) {\n return helper.mergeChain(this.sameType(node, \"number\")).succeed();\n }\n\n const typeInfo = ranges[actualType];\n\n if (typeof this.value === \"boolean\") {\n if (!typeInfo.bool) {\n helper.addErrors(exceptions.BOOL_SHORTHAND.create(this.range.start, this.range.end, this.value.toString(), actualType));\n }\n\n return helper.succeed();\n } else {\n if (typeInfo.min > this.value) {\n helper.addErrors(exceptions.TOO_LOW.create(this.range.start, this.range.end, actualType, typeInfo.min.toString(), this.value.toString()));\n } else if (typeInfo.max < this.value) {\n helper.addErrors(exceptions.TOO_BIG.create(this.range.start, this.range.end, actualType, typeInfo.min.toString(), this.value.toString()));\n }\n\n if (this.float && !typeInfo.float) {\n helper.addErrors(exceptions.FLOAT.create(this.range.start, this.range.end, actualType));\n }\n\n if (this.suffix) {\n if (this.suffix !== typeInfo.suffix) {\n helper.addErrors(exceptions.SUFFIX.create(this.range.end - 1, this.range.end, typeInfo.suffix, actualType, this.suffix));\n }\n } else if (this.endsString) {\n helper.addSuggestion(this.range.end, typeInfo.suffix);\n }\n\n return helper.succeed();\n }\n } else {\n // Will always add the error in this case\n return helper.mergeChain(this.sameType(node)).succeed();\n }\n }", "function resolveRangeToAnnotationOffsets(range, paragraph, resolve_to = \"start\") {\n let pointer = paragraph.firstChild;\n let offset = 0;\n\n // while (pointer !== null && !range.intersectsNode(pointer)) {\n let resolve_pointer = null;\n switch (resolve_to) {\n case \"start\":\n default:\n resolve_pointer = range.startContainer;\n break;\n case \"end\":\n resolve_pointer = range.endContainer;\n break;\n }\n while (pointer !== null && pointer !== resolve_pointer && pointer !== resolve_pointer.parentNode) {\n offset += pointer.textContent.length;\n pointer = pointer.nextSibling;\n }\n\n switch (resolve_to) {\n case \"start\":\n offset += range.startOffset;\n break;\n case \"end\":\n offset += range.endOffset\n }\n return offset;\n }", "GetRange() {\n\n }", "function nextRangeStart(range, existingEvents)\n {\n for (var j = 0; j < existingEvents.length; j++)\n {\n if (range.overlaps(existingEvents[j]))\n {\n return moment(existingEvents[j].end);\n }\n }\n return null;\n }", "function dataRangeError(start,end){\n let s=start.replace(\":\",\" \");\n let e=end.replace(\":\",\" \");\n \n s=Date.parse(s);\n e=Date.parse(e);\n if(e<s) // end date is before start date\n return true;\n return false;\n}", "function removableRangeForStatement(node: Node, source: string): { start: number, end: number }", "getStartIndices(props) {\n props = props || this.props;\n\n // First Check if startIndices is provided as an explicit value\n if (props.startIndices !== undefined) {\n return props.startIndices;\n }\n\n // Second check if the layer has set its own value\n if (this.state && this.state.startIndices) {\n return this.state.startIndices;\n }\n\n return null;\n }", "constructor(start, v1, v2, end) {\n this.start = start;\n this.v1 = v1;\n this.v2 = v2;\n this.end = end;\n }", "function getRangeWithZipString(zipString) {\n if(typeof zipString != 'string') {\n return ;\n }\n var cellsZipString = zipString.split(':');\n var range;\n if(cellsZipString.length == 1) {\n var cell = getCellWithZipString(cellsZipString[0]);\n if(cell) {\n range = {\n from: cell,\n to: cell\n };\n }\n }else if(cellsZipString.length == 2) {\n var from = getCellWithZipString(cellsZipString[0]);\n var to = getCellWithZipString(cellsZipString[1]);\n if(from && to) {\n range = {\n from: from,\n to: to\n };\n }\n }\n return range;\n }", "parseRange(from2, to, base2 = 0) {\n if (this.children.length == 0)\n return { node: this.contentDOM, from: from2, to, fromOffset: 0, toOffset: this.contentDOM.childNodes.length };\n let fromOffset = -1, toOffset = -1;\n for (let offset = base2, i = 0; ; i++) {\n let child = this.children[i], end = offset + child.size;\n if (fromOffset == -1 && from2 <= end) {\n let childBase = offset + child.border;\n if (from2 >= childBase && to <= end - child.border && child.node && child.contentDOM && this.contentDOM.contains(child.contentDOM))\n return child.parseRange(from2, to, childBase);\n from2 = offset;\n for (let j = i; j > 0; j--) {\n let prev = this.children[j - 1];\n if (prev.size && prev.dom.parentNode == this.contentDOM && !prev.emptyChildAt(1)) {\n fromOffset = domIndex(prev.dom) + 1;\n break;\n }\n from2 -= prev.size;\n }\n if (fromOffset == -1)\n fromOffset = 0;\n }\n if (fromOffset > -1 && (end > to || i == this.children.length - 1)) {\n to = end;\n for (let j = i + 1; j < this.children.length; j++) {\n let next = this.children[j];\n if (next.size && next.dom.parentNode == this.contentDOM && !next.emptyChildAt(-1)) {\n toOffset = domIndex(next.dom);\n break;\n }\n to += next.size;\n }\n if (toOffset == -1)\n toOffset = this.contentDOM.childNodes.length;\n break;\n }\n offset = end;\n }\n return { node: this.contentDOM, from: from2, to, fromOffset, toOffset };\n }", "getContentRange() {\n let range = this.getRange();\n const startOffset = this.document.offsetAt(range.start);\n let raw = this.document.getText().substring(startOffset, this.document.offsetAt(range.end));\n let start = -1;\n let end = -1;\n // skip the first # symbol\n for (let i = 1; i < raw.length; i++) {\n if (!util_1.Util.isWhitespace(raw.charAt(i))) {\n start = i;\n break;\n }\n }\n if (start === -1) {\n return null;\n }\n // go backwards up to the first # symbol\n for (let i = raw.length - 1; i >= 1; i--) {\n if (!util_1.Util.isWhitespace(raw.charAt(i))) {\n end = i + 1;\n break;\n }\n }\n return vscode_languageserver_types_1.Range.create(this.document.positionAt(startOffset + start), this.document.positionAt(startOffset + end));\n }", "match(input, start, end) {\n start = start || 0\n end = end || input.length\n if(typeof input === 'string') input = new Source(input)\n if( !this.startsWith(input.get(start)) )\n return this.error(input, start, start+1)\n var n = end\n end=start+1\n while(end<n && this.startsWith(input.get(end))) end++\n return this.token(input,start,end,\" \")\n }", "get range() {\n\t\treturn this.range$.slice(0, 2);\n\t}", "function parseStartVerseNumber(verseNumberOrRange) {\n return +verseNumberOrRange.match(/^\\d*/)[0];\n}", "function t$1(t,n){if(!t)return null;const e=n.featureAdapter,{startTimeField:u,endTimeField:r}=t;let l=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;if(u&&r)n.forEach((t=>{const n=e.getAttribute(t,u),o=e.getAttribute(t,r);null==n||isNaN(n)||(l=Math.min(l,n)),null==o||isNaN(o)||(i=Math.max(i,o));}));else {const t=u||r;n.forEach((n=>{const u=e.getAttribute(n,t);null==u||isNaN(u)||(l=Math.min(l,u),i=Math.max(i,u));}));}return {start:l,end:i}}", "constructor(start, end, fullStart = start, details = null) {\n this.start = start;\n this.end = end;\n this.fullStart = fullStart;\n this.details = details;\n }", "constructor(start, end, fullStart = start, details = null) {\n this.start = start;\n this.end = end;\n this.fullStart = fullStart;\n this.details = details;\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 t(t,n){if(!t)return null;const e=n.featureAdapter,{startTimeField:u,endTimeField:l}=t;let r=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;if(u&&l)n.forEach((t=>{const n=e.getAttribute(t,u),o=e.getAttribute(t,l);null==n||isNaN(n)||(r=Math.min(r,n)),null==o||isNaN(o)||(i=Math.max(i,o));}));else {const t=u||l;n.forEach((n=>{const u=e.getAttribute(n,t);null==u||isNaN(u)||(r=Math.min(r,u),i=Math.max(i,u));}));}return {start:r,end:i}}", "function getRange() {\n\t if (__.nullValueSeparator == 'bottom') {\n\t return [h() + 1 - __.nullValueSeparatorPadding.bottom - __.nullValueSeparatorPadding.top, 1];\n\t } else if (__.nullValueSeparator == 'top') {\n\t return [h() + 1, 1 + __.nullValueSeparatorPadding.bottom + __.nullValueSeparatorPadding.top];\n\t }\n\t return [h() + 1, 1];\n\t }", "positionsToRange(model, [start, end]) {\n console.log('positionsToRange', start, end);\n // start and end should always be defined, but if not:\n start = start || 1;\n end = end || model.getLineCount();\n\n // convert to [startLine, startColumn, endLine, endColumn]\n const range = new this._monaco.Range(start, 1, end, 1);\n\n // Protect against ranges that extend outside the editor\n const startLineNumber = Math.max(1, range.startLineNumber);\n const endLineNumber = Math.min(model.getLineCount(), range.endLineNumber);\n const endColumnText = model.getLineContent(endLineNumber);\n // NOTE: the end column is incremented by 2 so that the dangerous range\n // extends far enough to capture new text added to the end.\n // NOTE: according to the spec, it should only need to be +1, but in\n // practice that's not enough.\n return range\n .setStartPosition(startLineNumber, 1)\n .setEndPosition(range.endLineNumber, endColumnText.length + 2);\n }", "match(input, start, end) {\n start = start || 0\n end = end || input.length\n if(typeof input === 'string') input = new Source(input)\n if(this.startsWith(input.get(start)))\n return this.token(input,start,start+1,input.get(start))\n else \n return this.error(input,start,start+1)\n }", "function isEnd(value, start, end) {\n return start !== null && start !== end && value >= start && value === end;\n}", "match(input, start, end){\n start = start || 0\n end = end || input.length\n if(typeof input === 'string') input = new Source(input)\n if(!this.startsWith(input.get(start)))\n return this.error(input,start,start+1)\n var n=end\n end=start+1\n while(end<n && this.valid(input.get(end))) end++\n var s = (this.useStarter)?start+1:start\n var m = (end-s)%4\n if(s==end || m==1) return this.error(input,start,end)\n if(m>0) {\n while(end<n && m<4 && input.get(end)=='=') {\n end++\n m++\n }\n if(m<4) return this.error(input,start,end)\n }\n return this.token(input,start,end,Base64.decode(input.substring(s,end)))\n }", "function getIndexRange( start, end ) {\n let startIndex = 0;\n let endIndex = 10000000000;\n let startSet = false;\n let endSet = false;\n for (let i = 0; i < data.length; i++) {\n let d = data[i];\n if (d.seconds >= start && startSet == false) {\n startSet = true;\n startIndex = i;\n } \n else if (d.seconds >= end && endSet == false) {\n endSet = true;\n endIndex = i-1;\n break;\n }\n }\n return [startIndex, endIndex]\n}", "constructor(startToken, endToken, source) {\n this.start = startToken.start;\n this.end = endToken.end;\n this.startToken = startToken;\n this.endToken = endToken;\n this.source = source;\n }", "function isEnd(value, start, end) {\n return start !== null && start !== end && value >= start && value === end;\n}", "function isEnd(value, start, end) {\n return start !== null && start !== end && value >= start && value === end;\n}", "function parse(value, length, defaultStart) {\n\t\tvar i = value.indexOf(\" \"),\n\t\t\ts, e;\n\t\tif (i === -1) {\n\t\t\ts = defaultStart !== undefined ? defaultStart + \"\" : value;\n\t\t\te = value;\n\t\t} else {\n\t\t\ts = value.substr(0, i);\n\t\t\te = value.substr(i+1);\n\t\t}\n\t\ts = (s.indexOf(\"%\") !== -1) ? (parseFloat(s) / 100) * length : parseFloat(s);\n\t\te = (e.indexOf(\"%\") !== -1) ? (parseFloat(e) / 100) * length : parseFloat(e);\n\t\treturn (s > e) ? [e, s] : [s, e];\n\t}", "parse() {\n if (this.end) {\n return;\n }\n\n const val = this.parseValue (this.pos);\n\n if (this.end) {\n return this.parseError (USON.error.unexpectedToken, this.pos);\n }\n\n /* Prevent from calling again */\n this.end = true;\n return val;\n}", "get $from() {\n return this.ranges[0].$from;\n }", "function valid_range(obj_name, start,end, msg) {\n\tif (!valid_digit(obj_name)) {\n\t\tif (msg)\n\t\t\talert(msg);\n\t\treturn false;\n\t}\n\td = parseInt(obj_name, 10);\n\tif ( !(d<=end && d>=start) ) {\n\t\tif (msg)\n\t\t\talert(msg);\n\t\treturn false;\n\t}\n\treturn true;\n}", "function rangeFromTokenValue(token) {\n if (!token) {\n return undefined;\n }\n return util_1.default.createRange(token.startLine - 1, token.startColumn, token.endLine - 1, token.endColumn - 1);\n}", "readRangeSingleMillimeters(){\n\n\t}", "match(input, start, end){}", "function sideParse(side_num, start_p, end_p) {\r\n var temp = [];\r\n // Horizontal case\r\n if (start_p[1] == end_p[1]) {\r\n var sub_len = (side_num != 0) ? (end_p[0] - start_p[0]) / (side_num + 1) : 0;\r\n var pos = start_p[0];\r\n for (var i = 0; i < side_num; i++) {\r\n pos += sub_len;\r\n temp.push([pos, start_p[1]]);\r\n };\r\n }\r\n // Vertical case\r\n else {\r\n var sub_len = (side_num != 0) ? (end_p[1] - start_p[1]) / (side_num + 1) : 0;\r\n var pos = start_p[1];\r\n for (var i = 0; i < side_num; i++) {\r\n pos += sub_len;\r\n temp.push([start_p[0], pos]);\r\n };\r\n };\r\n return temp;\r\n }", "function i(e,n){return{start:e.start,end:e.end,index:n}}" ]
[ "0.6514588", "0.64976966", "0.62338793", "0.6220001", "0.6104322", "0.6081215", "0.6059758", "0.6041337", "0.5999766", "0.58622545", "0.5855005", "0.5855005", "0.5839032", "0.5823618", "0.5784511", "0.5784511", "0.5771456", "0.5771456", "0.5771456", "0.5771456", "0.577073", "0.57578546", "0.5748541", "0.5726776", "0.5720795", "0.57167846", "0.5701331", "0.5634277", "0.56261736", "0.56261736", "0.56235075", "0.5591984", "0.5574951", "0.5574951", "0.55145574", "0.5511376", "0.55112803", "0.5505322", "0.54944265", "0.5461379", "0.54566485", "0.54533464", "0.54417676", "0.5437807", "0.543348", "0.54127127", "0.54051316", "0.53757435", "0.53757435", "0.53743035", "0.5372582", "0.5361817", "0.5355249", "0.5349268", "0.53259224", "0.532166", "0.53145576", "0.53145576", "0.53057665", "0.53034335", "0.5302161", "0.5301212", "0.5301212", "0.5287887", "0.52868927", "0.5278648", "0.5260381", "0.5253018", "0.5235932", "0.52309686", "0.5228352", "0.5225224", "0.51971215", "0.5178154", "0.5151232", "0.51444596", "0.5143503", "0.51416564", "0.5135659", "0.5135659", "0.51292557", "0.51292557", "0.51153004", "0.5106562", "0.5098367", "0.5097266", "0.5092873", "0.50896776", "0.5087911", "0.5084701", "0.5080128", "0.5080128", "0.50630534", "0.5051629", "0.50400394", "0.5035519", "0.502924", "0.5027529", "0.5027205", "0.50164104", "0.5014664" ]
0.0
-1
Title and Date Formatting Computes what the title at the top of the calendar should be for this view
function computeTitle(dateProfile, viewOptions) { var range; // for views that span a large unit of time, show the proper interval, ignoring stray days before and after if (/^(year|month)$/.test(dateProfile.currentRangeUnit)) { range = dateProfile.currentRange; } else { // for day units or smaller, use the actual day range range = dateProfile.activeRange; } return this.context.dateEnv.formatRange(range.start, range.end, createFormatter(viewOptions.titleFormat || computeTitleFormat(dateProfile), viewOptions.titleRangeSeparator), { isEndExclusive: dateProfile.isRangeAllDay }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setTitle2(date) {\n let currentDate = new Date();\n currentDate.setHours(0, 0, 0, 0);\n let cpd = new Date(date);\n cpd.setHours(0, 0, 0, 0);\n let diff = (currentDate.getTime() - cpd.getTime()) / (1000 * 3600 * 24);\n let t = '';\n if (diff == 0) t = \"Today\";else if (diff == 1) t = \"Yesterday\";else if (diff == -1) t = \"Tomorrow\";else t = cpd.toLocaleString('default', {\n weekday: 'long'\n }) + ', ' + cpd.toLocaleString('default', {\n month: 'long'\n }).substr(0, 3) + ' ' + cpd.getDate();\n return t;\n }", "renderDateTitle(date) {\n return moment(date).format(\"dddd\") + \", \" + moment(date).format(\"MMMM Do\");\n }", "getTitle() {\n return IsMorning(this.date) ? \"Sunrise - \" + this.date.toLocaleString() : \"Sunset - \" + this.date.toLocaleString();\n }", "function setTitle() {\n dt = formatDate(myDateFormat, appstate.date);\n dtextra = (appstate.date2 === null) ? '' : ' to ' + formatDate(myDateFormat, appstate.date2);\n $('#maptitle').html(\"Viewing \" + vartitle[appstate.ltype] +\n \" for \" + dt + \" \" + dtextra);\n $('#variable_desc').html(vardesc[appstate.ltype]);\n}", "function reposTitle() {\n\t\t\tconsole.info(\"reposTitle\");\n\t\t\tif(jQuery(window).width() < 450) {\n\t\t\t\tif(!jQuery('.fc-header-title').is(':visible')) {\n\t\t\t\t\tif(jQuery('h3.calTitle').length == 0) {\n\t\t\t\t\t\tvar m = jQuery('.fc-header-title h2').text();\n\t\t\t\t\t\tjQuery('<h3 class=\"calTitle\">'+m+'</h3>').insertBefore('#calendar table.fc-header');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tjQuery('h3.calTitle').remove();\n\t\t\t}\n\t\t}", "function computeTitle(dateProfile, viewOptions) {\n var range; // for views that span a large unit of time, show the proper interval, ignoring stray days before and after\n\n if (/^(year|month)$/.test(dateProfile.currentRangeUnit)) {\n range = dateProfile.currentRange;\n } else {\n // for day units or smaller, use the actual day range\n range = dateProfile.activeRange;\n }\n\n return this.dateEnv.formatRange(range.start, range.end, formatting_1.createFormatter(viewOptions.titleFormat || computeTitleFormat(dateProfile), viewOptions.titleRangeSeparator), {\n isEndExclusive: dateProfile.isRangeAllDay\n });\n } // Generates the format string that should be used to generate the title for the current date range.", "_refreshHeaderTitle() {\n const that = this;\n let date;\n\n function preFormatDate() {\n if (that.displayMode !== 'month') {\n if (that.displayModeView === 'list' && that.$.listViewContainer.selectedValues[0]) {\n let items = that.$.listViewContainer.items;\n\n date = that.displayMode === 'year' ?\n new Date(that.$.listViewContainer.getItem(that.$.listViewContainer.selectedValues[0]).value).getFullYear() :\n new Date(items[0].value).getFullYear() + ' - ' + new Date(items[items.length - 1].value).getFullYear();\n }\n else if (that.$.dateViewContainer.children[0].value) {\n let dateViewItems = that._animationStarted ? that.$.nextMonthsContainer.children : that.$.dateViewContainer.children;\n\n date = that.displayMode === 'year' ? dateViewItems[0].value.getFullYear() :\n dateViewItems[1].value.getFullYear() + ' - ' + dateViewItems[dateViewItems.length - 2].value.getFullYear();\n }\n\n if (date) {\n return date;\n }\n }\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 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 return date;\n }\n\n if (that.calendarMode === 'default') {\n that.$.defaultHeaderDate.innerHTML = preFormatDate();\n }\n\n if (typeof that.headerTemplate === 'function' || !that._layoutTemplates) {\n return;\n }\n\n let layoutTemplate = that._layoutTemplates.filter(template => template.selector === that.$.header)[0];\n\n if (!layoutTemplate) {\n return;\n }\n\n let clone = document.importNode(layoutTemplate.template.content, true);\n\n if (layoutTemplate.bindings.length > 0) {\n const bindingHolderElement = clone.childNodes[layoutTemplate.bindings[0].childNodeIndex];\n\n layoutTemplate.selector.childNodes[layoutTemplate.bindings[0].childNodeIndex].innerHTML =\n bindingHolderElement.innerHTML.replace(layoutTemplate.bindings[0].bindingString, that.dateFormatFunction ? that.dateFormatFunction(that._viewDates) : preFormatDate());\n }\n }", "function computeTitle(dateProfile, viewOptions) {\n var range; // for views that span a large unit of time, show the proper interval, ignoring stray days before and after\n\n if (/^(year|month)$/.test(dateProfile.currentRangeUnit)) {\n range = dateProfile.currentRange;\n } else {\n // for day units or smaller, use the actual day range\n range = dateProfile.activeRange;\n }\n\n return this.dateEnv.formatRange(range.start, range.end, createFormatter(viewOptions.titleFormat || computeTitleFormat(dateProfile), viewOptions.titleRangeSeparator), {\n isEndExclusive: dateProfile.isRangeAllDay\n });\n } // Generates the format string that should be used to generate the title for the current date range.", "dailyNoteTitle() {\n\t\treturn moment( new Date() ).format( 'MMMM Do, YYYY' );\n\t}", "updateCalendarHeader() {\n this.uiComponents.calendarBody.innerHTML = this.templateText(\n this.calendarBodyTemplateText,\n {\n month: this.months()[this.dateObject.month].name,\n year: this.dateObject.year,\n },\n );\n }", "getFormattedTitle() {\n return this.info.title.toUpperCase();\n }", "function calendar_helper_setTitleAndBackground(cal_event){\n if (cal_event!=null){\n if (cal_event.is_valid)\n directions_api_addTravelTimeToTitle(cal_event);\n else\n calendar_helper_updateCalEventTitleAndBackground(cal_event, openingHoursToString(cal_event.available_destination_id, cal_event.start)); \n }\n}", "function buildTitle(dateProfile, viewOptions, dateEnv) {\n var range;\n // for views that span a large unit of time, show the proper interval, ignoring stray days before and after\n if (/^(year|month)$/.test(dateProfile.currentRangeUnit)) {\n range = dateProfile.currentRange;\n }\n else { // for day units or smaller, use the actual day range\n range = dateProfile.activeRange;\n }\n return dateEnv.formatRange(range.start, range.end, createFormatter(viewOptions.titleFormat || buildTitleFormat(dateProfile)), {\n isEndExclusive: dateProfile.isRangeAllDay,\n defaultSeparator: viewOptions.titleRangeSeparator,\n });\n }", "function computeTitle(dateProfile, viewOptions) {\n var range;\n // for views that span a large unit of time, show the proper interval, ignoring stray days before and after\n if (/^(year|month)$/.test(dateProfile.currentRangeUnit)) {\n range = dateProfile.currentRange;\n }\n else { // for day units or smaller, use the actual day range\n range = dateProfile.activeRange;\n }\n return this.dateEnv.formatRange(range.start, range.end, createFormatter(viewOptions.titleFormat || computeTitleFormat(dateProfile), viewOptions.titleRangeSeparator), { isEndExclusive: dateProfile.isRangeAllDay });\n }", "getFormattedTitle(){\n //.....this key word used to apply conversion logic to code (uppercase letter)\n return this.info.title.toUpperCase()\n }", "formatEventDate(dateText) {\n if (this.today === dateText) {\n return new XDate(dateText).toString(this.today_format).toUpperCase();\n } else if (this.tomorrow === dateText) {\n return new XDate(dateText).toString(this.tomorrow_format).toUpperCase();\n } else {\n return new XDate(dateText).toString(this.date_format).toUpperCase();\n }\n }", "function computeTitle(dateProfile, viewOptions) {\n var range;\n // for views that span a large unit of time, show the proper interval, ignoring stray days before and after\n if (/^(year|month)$/.test(dateProfile.currentRangeUnit)) {\n range = dateProfile.currentRange;\n }\n else { // for day units or smaller, use the actual day range\n range = dateProfile.activeRange;\n }\n return this.context.dateEnv.formatRange(range.start, range.end, createFormatter(viewOptions.titleFormat || computeTitleFormat(dateProfile), viewOptions.titleRangeSeparator), { isEndExclusive: dateProfile.isRangeAllDay });\n}", "function computeTitleFormat(dateProfile) {\n var currentRangeUnit = dateProfile.currentRangeUnit;\n\n if (currentRangeUnit === 'year') {\n return {\n year: 'numeric'\n };\n } else if (currentRangeUnit === 'month') {\n return {\n year: 'numeric',\n month: 'long'\n }; // like \"September 2014\"\n } else {\n var days = marker_1.diffWholeDays(dateProfile.currentRange.start, dateProfile.currentRange.end);\n\n if (days !== null && days > 1) {\n // multi-day range. shorter, like \"Sep 9 - 10 2014\"\n return {\n year: 'numeric',\n month: 'short',\n day: 'numeric'\n };\n } else {\n // one day. longer, like \"September 9 2014\"\n return {\n year: 'numeric',\n month: 'long',\n day: 'numeric'\n };\n }\n }\n } // Plugin", "function computeTitle$1(dateProfile, viewOptions) {\n var range;\n // for views that span a large unit of time, show the proper interval, ignoring stray days before and after\n if (/^(year|month)$/.test(dateProfile.currentRangeUnit)) {\n range = dateProfile.currentRange;\n }\n else { // for day units or smaller, use the actual day range\n range = dateProfile.activeRange;\n }\n return this.context.dateEnv.formatRange(range.start, range.end, createFormatter$1(viewOptions.titleFormat || computeTitleFormat$1(dateProfile), viewOptions.titleRangeSeparator), { isEndExclusive: dateProfile.isRangeAllDay });\n }", "function setCalendarHeader(){\n let indexOfToday = $('.today').index(); \n switch (indexOfToday) {\n case 1:\n $(dayName[indexOfToday]).text(today.toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday + 1]).text(new Date((new Date()).valueOf() + 1000 * 3600 * 24).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday + 2]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 2)).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday + 3]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 3)).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday + 4]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 4)).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday + 5]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 5)).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday - 1]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 6)).toLocaleString('en-us', { weekday: 'long' }));\n FridayController(dayName[indexOfToday])\n SaturdayController(dayName[indexOfToday + 1])\n SundayController(dayName[indexOfToday +2 ])\n MondayController(dayName[indexOfToday + 3])\n TuesdayController(dayName[indexOfToday + 4])\n WednesdayController(dayName[indexOfToday + 5])\n ThursdayController(dayName[indexOfToday - 1])\n break;\n \n case 2:\n $(dayName[indexOfToday]).text(today.toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday + 1]).text(new Date((new Date()).valueOf() + 1000 * 3600 * 24).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday + 2]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 2)).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday + 3]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 3)).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday + 4]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 4)).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday - 2]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 5)).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday - 1]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 6)).toLocaleString('en-us', { weekday: 'long' }));\n FridayController(dayName[indexOfToday -1])\n SaturdayController(dayName[indexOfToday])\n SundayController(dayName[indexOfToday + 1])\n MondayController(dayName[indexOfToday + 2])\n TuesdayController(dayName[indexOfToday + 3])\n WednesdayController(dayName[indexOfToday + 4])\n ThursdayController(dayName[indexOfToday - 2])\n break;\n \n case 3:\n $(dayName[indexOfToday]).text(today.toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday + 1]).text(new Date((new Date()).valueOf() + 1000 * 3600 * 24).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday + 2]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 2)).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday + 3]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 3)).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday - 3]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 4)).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday - 2]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 5)).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday - 1]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 6)).toLocaleString('en-us', { weekday: 'long' }));\n FridayController(dayName[indexOfToday - 2])\n SaturdayController(dayName[indexOfToday - 1])\n SundayController(dayName[indexOfToday])\n MondayController(dayName[indexOfToday + 1])\n TuesdayController(dayName[indexOfToday + 2])\n WednesdayController(dayName[indexOfToday + 3])\n ThursdayController(dayName[indexOfToday - 3])\n break;\n \n case 4:\n $(dayName[indexOfToday]).text(today.toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday + 1]).text(new Date((new Date()).valueOf() + 1000 * 3600 * 24).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday + 2]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 2)).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday - 4]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 3)).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday - 3]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 4)).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday - 2]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 5)).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday - 1]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 6)).toLocaleString('en-us', { weekday: 'long' }));\n FridayController(dayName[indexOfToday - 3])\n SaturdayController(dayName[indexOfToday - 2])\n SundayController(dayName[indexOfToday - 1])\n MondayController(dayName[indexOfToday])\n TuesdayController(dayName[indexOfToday + 1])\n WednesdayController(dayName[indexOfToday + 2])\n ThursdayController(dayName[indexOfToday - 4])\n break;\n \n case 5:\n $(dayName[indexOfToday]).text(today.toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday + 1]).text(new Date((new Date()).valueOf() + 1000 * 3600 * 24).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday - 5]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 2)).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday - 4]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 3)).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday - 3]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 4)).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday - 2]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 5)).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday - 1]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 6)).toLocaleString('en-us', { weekday: 'long' }));\n FridayController(dayName[indexOfToday - 4])\n SaturdayController(dayName[indexOfToday - 3])\n SundayController(dayName[indexOfToday - 2])\n MondayController(dayName[indexOfToday - 1])\n TuesdayController(dayName[indexOfToday])\n WednesdayController(dayName[indexOfToday + 1])\n ThursdayController(dayName[indexOfToday - 5])\n break;\n \n case 6:\n $(dayName[indexOfToday]).text(today.toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday - 6]).text(new Date((new Date()).valueOf() + 1000 * 3600 * 24).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday - 5]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 2)).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday - 4]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 3)).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday - 3]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 4)).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday - 2]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 5)).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday - 1]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 6)).toLocaleString('en-us', { weekday: 'long' }));\n FridayController(dayName[indexOfToday - 5])\n SaturdayController(dayName[indexOfToday - 4])\n SundayController(dayName[indexOfToday - 3])\n MondayController(dayName[indexOfToday - 2])\n TuesdayController(dayName[indexOfToday -1])\n WednesdayController(dayName[indexOfToday])\n ThursdayController(dayName[indexOfToday - 6])\n break;\n \n default:\n $(dayName[indexOfToday]).text(today.toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday + 1]).text(new Date((new Date()).valueOf() + 1000 * 3600 * 24).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday + 2]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 2)).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday + 3]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 3)).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday + 4]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 4)).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday + 5]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 5)).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday + 6]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 6)).toLocaleString('en-us', { weekday: 'long' }));\n FridayController(dayName[indexOfToday + 1])\n SaturdayController(dayName[indexOfToday + 2])\n SundayController(dayName[indexOfToday + 3])\n MondayController(dayName[indexOfToday + 4])\n TuesdayController(dayName[indexOfToday + 5])\n WednesdayController(dayName[indexOfToday + 6])\n ThursdayController(dayName[indexOfToday])\n break;\n }\n }", "function updateTitleText(newDateArray) {\n if (!newDateArray) {\n title.text(\"NYC Crimes (select a time range)\");\n } else {\n var from = (newDateArray[0].getMonth() + 1) + \"/\" +\n (newDateArray[0].getDay() + 1) + \"/\" +\n newDateArray[0].getFullYear(),\n to = (newDateArray[1].getMonth() + 1) + \"/\" +\n (newDateArray[1].getDay() + 1) + \"/\" +\n newDateArray[1].getFullYear();\n title.text(\"NYC Crimes \" + from + \" - \" + to);\n }\n}", "function setTodayTitle(el) {\n var subTitleEl = el.querySelector('.topNav-title');\n var innerText = subTitleEl.innerText;\n\n innerText = innerText.replace(\"--WEEK_DAY_NAME--\", utils.getWeekDay());\n innerText = innerText.replace(\"--MONTH_NAME--\", utils.getMonthName());\n subTitleEl.innerText = innerText;\n }", "function renderHeader() {\n\n var today = new Date();\n //alert(\"today: \" + today);\n var day = moment(today).date();\n\n var month = getMonth(moment(today).month());\n //var year = moment(today).year();\n\n var year = moment(today).year();\n \n // create today's date to be used as a key for storing the work schedule on local storage\n todayDate = day + \"/\" + month + \"/\" + year;\n //alert(\"todayDate: \" + todayDate);\n \n var weekDay = getWeekDay(moment(today).weekday());\n\n var currentDayVal = weekDay + \", \" + month + \" \" + day;\n $(\"#currentDay\").text(currentDayVal);\n}", "function buildTitleFormat(dateProfile) {\n var currentRangeUnit = dateProfile.currentRangeUnit;\n if (currentRangeUnit === 'year') {\n return { year: 'numeric' };\n }\n if (currentRangeUnit === 'month') {\n return { year: 'numeric', month: 'long' }; // like \"September 2014\"\n }\n var days = diffWholeDays(dateProfile.currentRange.start, dateProfile.currentRange.end);\n if (days !== null && days > 1) {\n // multi-day range. shorter, like \"Sep 9 - 10 2014\"\n return { year: 'numeric', month: 'short', day: 'numeric' };\n }\n // one day. longer, like \"September 9 2014\"\n return { year: 'numeric', month: 'long', day: 'numeric' };\n }", "function computeTitleFormat(dateProfile) {\n var currentRangeUnit = dateProfile.currentRangeUnit;\n\n if (currentRangeUnit === 'year') {\n return {\n year: 'numeric'\n };\n } else if (currentRangeUnit === 'month') {\n return {\n year: 'numeric',\n month: 'long'\n }; // like \"September 2014\"\n } else {\n var days = diffWholeDays(dateProfile.currentRange.start, dateProfile.currentRange.end);\n\n if (days !== null && days > 1) {\n // multi-day range. shorter, like \"Sep 9 - 10 2014\"\n return {\n year: 'numeric',\n month: 'short',\n day: 'numeric'\n };\n } else {\n // one day. longer, like \"September 9 2014\"\n return {\n year: 'numeric',\n month: 'long',\n day: 'numeric'\n };\n }\n }\n } // Plugin", "function buildWeekTitle( start_date ){\r\n\r\n var week_from = moment( start_date ).startOf( 'week' ).add( 1, 'days' );\r\n var week_to = moment( start_date ).endOf( 'week' ).add( 1, 'days' );\r\n\r\n var week_title = week_from.format( 'Do' ) + ' - '\r\n + week_to.format( 'Do MMMM' );\r\n\r\n return '<div class=\"week-title-wrap\"><div class=\"week-title\">'\r\n + week_title\r\n + '</div></div>';\r\n\r\n }", "function setTitle() {\n var dateString = dateFormat(new Date(), 'HH:MM:ss');\n document.title = title + ' - ' + APP_PACKAGE_INFO.version;\n }", "function Calendar_calHeader()\n{\nvar vCode = \"\";\nvar dow = new Array()\nvar i, j\n// Adjust for different first day of the week...\nfor( i = 0; i < 7; i++ )\n// dow[i] = this.Dow[( ( i + Calendar.firstDow ) % 7 )]\ndow[i] = df[( ( i + Calendar.firstDow ) % 7 )]\nvCode = vCode + \"<tr bgcolor='\" + Calendar.headerBgColor + \"'>\";\nvCode = vCode + \"<td width='14%' class='header'>\" + dow[0] + \"</td>\";\nvCode = vCode + \"<td width='14%' class='header'>\" + dow[1] + \"</td>\";\nvCode = vCode + \"<td width='14%' class='header'>\" + dow[2] + \"</td>\";\nvCode = vCode + \"<td width='14%' class='header'>\" + dow[3] + \"</td>\";\nvCode = vCode + \"<td width='14%' class='header'>\" + dow[4] + \"</td>\";\nvCode = vCode + \"<td width='14%' class='header'>\" + dow[5] + \"</td>\";\nvCode = vCode + \"<td width='14%' class='header'>\" + dow[6] + \"</td>\";\nvCode = vCode + \"</tr>\";\nreturn vCode;\n}", "renderDate(value) {\n 'use strict';\n\n if (value) {\n return `<span title=\"${value.full}\">${value.shortest}</span>`;\n }\n return '-';\n }", "function computeTitleFormat(dateProfile) {\n var currentRangeUnit = dateProfile.currentRangeUnit;\n if (currentRangeUnit === 'year') {\n return { year: 'numeric' };\n }\n else if (currentRangeUnit === 'month') {\n return { year: 'numeric', month: 'long' }; // like \"September 2014\"\n }\n else {\n var days = diffWholeDays(dateProfile.currentRange.start, dateProfile.currentRange.end);\n if (days !== null && days > 1) {\n // multi-day range. shorter, like \"Sep 9 - 10 2014\"\n return { year: 'numeric', month: 'short', day: 'numeric' };\n }\n else {\n // one day. longer, like \"September 9 2014\"\n return { year: 'numeric', month: 'long', day: 'numeric' };\n }\n }\n }", "function computeTitleFormat(dateProfile) {\n var currentRangeUnit = dateProfile.currentRangeUnit;\n if (currentRangeUnit === 'year') {\n return { year: 'numeric' };\n }\n else if (currentRangeUnit === 'month') {\n return { year: 'numeric', month: 'long' }; // like \"September 2014\"\n }\n else {\n var days = diffWholeDays(dateProfile.currentRange.start, dateProfile.currentRange.end);\n if (days !== null && days > 1) {\n // multi-day range. shorter, like \"Sep 9 - 10 2014\"\n return { year: 'numeric', month: 'short', day: 'numeric' };\n }\n else {\n // one day. longer, like \"September 9 2014\"\n return { year: 'numeric', month: 'long', day: 'numeric' };\n }\n }\n }", "function computeTitleFormat(dateProfile) {\n var currentRangeUnit = dateProfile.currentRangeUnit;\n if (currentRangeUnit === 'year') {\n return { year: 'numeric' };\n }\n else if (currentRangeUnit === 'month') {\n return { year: 'numeric', month: 'long' }; // like \"September 2014\"\n }\n else {\n var days = diffWholeDays(dateProfile.currentRange.start, dateProfile.currentRange.end);\n if (days !== null && days > 1) {\n // multi-day range. shorter, like \"Sep 9 - 10 2014\"\n return { year: 'numeric', month: 'short', day: 'numeric' };\n }\n else {\n // one day. longer, like \"September 9 2014\"\n return { year: 'numeric', month: 'long', day: 'numeric' };\n }\n }\n }", "function calCaption(calDate) {\r\n var monthName = [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"];\r\n\r\n var thisMonth = calDate.getMonth();\r\n\r\n var thisYear = calDate.getFullYear();\r\n\r\n return \"<caption>\" + monthName[thisMonth] + \" \" + thisYear + \"</caption>\";\r\n}", "function getTitle() {\n return chalk.blue(\n figlet.textSync(\"Weather app\", {\n horizontalLayout: \"full\",\n font: \"banner\",\n })\n );\n}", "function ScreedTodoTaskTitle() {\n}", "function renderDate() {\n dateDiv.text(todaysDate)\n}", "function computeTitleFormat(dateProfile) {\n var currentRangeUnit = dateProfile.currentRangeUnit;\n if (currentRangeUnit === 'year') {\n return { year: 'numeric' };\n }\n else if (currentRangeUnit === 'month') {\n return { year: 'numeric', month: 'long' }; // like \"September 2014\"\n }\n else {\n var days = diffWholeDays(dateProfile.currentRange.start, dateProfile.currentRange.end);\n if (days !== null && days > 1) {\n // multi-day range. shorter, like \"Sep 9 - 10 2014\"\n return { year: 'numeric', month: 'short', day: 'numeric' };\n }\n else {\n // one day. longer, like \"September 9 2014\"\n return { year: 'numeric', month: 'long', day: 'numeric' };\n }\n }\n}", "function getTitle() {\r\n var carrier = story.getFrameValue();\r\n var index = carriers.indexOf(carrier) + 1;\r\n return \"#\" + (\"0\" + index).slice(-2)+ \" - \" + carrier;\r\n }", "function calendar_helper_updateCalEventTitleAndBackground(cal_event, new_title){\n if (cal_event.title != new_title){\n cal_event.title = new_title;\n $(\"#calendar\").weekCalendar(\"updateEvent\", cal_event);\n }\n setEventBackground(cal_event);\n}", "function headerDate() {\n var currentHeaderDate = moment().format('dddd, MMMM Do');\n $(\"#currentDay\").text(currentHeaderDate);\n}", "function renderHeader() {\n let label;\n\n if (view === 'year') {\n const yearPeriod = getYearPeriod(year);\n label = (\n <a className=\"sp-calender__view-control\">\n {yearPeriod[0]} - {yearPeriod[1]}\n </a>\n );\n }\n\n if (view === 'month') {\n const typeIsTheSame = view === type;\n label = (\n <a onClick={typeIsTheSame ? undefined : changeViewToYear} className=\"sp-calender__view-control\">{ year }</a>\n );\n }\n\n if (view === 'day') {\n const typeIsTheSame = view === type;\n label = (\n <>\n <a \n onClick={typeIsTheSame ? undefined : changeViewToMonth} \n className=\"sp-calender__view-control\"\n >\n { zeroPad(month, 2) }\n </a> \n <a \n onClick={typeIsTheSame ? undefined : changeViewToYear} \n className=\"sp-calender__view-control\"\n >\n { year }\n </a>\n </>\n );\n }\n \n return(\n <div className=\"sp-calender__header\">\n <button \n onClick={handlePreviousClick}\n className=\"sp-calender__arrow sp-calender__arrow--left\"\n >\n <Icon name=\"ARROW_LEFT\" />\n </button>\n\n <div className=\"sp-calender__current-title\">\n { label }\n </div>\n\n <button \n onClick={handleNextClick}\n className=\"sp-calender__arrow sp-calender__arrow--right\"\n >\n <Icon name=\"ARROW_RIGHT\" /> \n </button>\n </div>\n );\n }", "function getTitle() {\r\n\tvar d = new Date();\r\n\tvar fileName = d.getFullYear() + \"-\" + (1+d.getMonth()) + \"-\" + d.getDate();\r\n\tfileName += \"_\" + d.getHours() + \"-\" + d.getMinutes() + \"-\" + d.getSeconds();\r\n\treturn fileName;\r\n}", "function shortDateDescription(entryDate) {\n // zapisuję do zmiennej pobrany z obiektu z datą dzień/ miesiąc (miesiące są w obiekcie zapisane w zakresie 0..11, więc należy dodać 1)\n var dayMonth = `${entryDate.getDate()}/${entryDate.getMonth() + 1}`;\n chartDescription.innerHTML += `<span class=\"chart__barDescription\">${dayMonth}</span>`;\n}", "function getTitle(t) {\n // console.log('getTitle t:',t)\n // title content for mouseover\n\n // var _dbotype = t.dbotype || \"\";\n // var _group = t.group || \"\";\n var _name = t.data.name || \"\";\n var _label = t.data.label || _name;\n var _description = t.data.description || \"\";\n var _datavalues = t.data.datavalues || \"\";\n // // var _startdate = t.startdate || \"\";\n // // var _status = t.status || \"\";\n // //var _colour = t.colour || \"\";\n // var _color = t.color || \"\" ;\n // var _id = t.id || \"\";\n\n // var _title = _group + \": \" + _label + \"\\n\" + _description + _color + \"\\n\" ;\n var _title = _label + \": \" + _description + ' ' + _datavalues + \"\\n\";\n // console.log('_title', _title)\n return _title\n }", "function calCaption(calDate) {\r\n // monthName array contains list of month names\r\n var monthName = [\"January\", \"Febuary\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"Decenber\"];\r\n //determine the current month from calDate value\r\n var thisMonth = calDate.getMonth();\r\n\r\n // determine the current year from calDate value \r\n var thisYear = calDate.getFullYear();\r\n\r\n //build a string for <caption> element and return that string \r\n return \"<caption>\" + monthName[thisMonth] + \"\" + thisYear + \"</caption>\"\r\n}", "function showDayNameHeaders() {\n var str = '';\n var start = HOUR_LISTING_WIDTH + 1;\n var idstr = '';\n var calcDay = null;\n\n // Spacer to align with the timeline that displays hours below\n // for the timed event canvas\n str += '<div id=\"dayListSpacer\" class=\"dayListDayDiv\"' +\n ' style=\"left:0px; width:' +\n (HOUR_LISTING_WIDTH - 1) + 'px; height:' +\n (DAY_LIST_DIV_HEIGHT-1) +\n 'px;\">&nbsp;</div>';\n\n // Do a week's worth of day cols with day name and date\n for (var i = 0; i < 7; i++) {\n calcDay = cosmo.datetime.Date.add(viewStart, cosmo.datetime.util.dateParts.DAY, i);\n // Subtract one pixel of height for 1px border per retarded CSS spec\n str += '<div class=\"dayListDayDiv\" id=\"dayListDiv' + i +\n '\" style=\"left:' + start + 'px; width:' + (self.dayUnitWidth-1) +\n 'px; height:' + (DAY_LIST_DIV_HEIGHT-1) + 'px;';\n str += '\">';\n str += cosmo.datetime.abbrWeekday[i] + '&nbsp;' + calcDay.getDate();\n str += '</div>\\n';\n start += self.dayUnitWidth;\n }\n dayNameHeadersNode.innerHTML = str;\n return true;\n }", "function calCaption(calDate) {\r\n //monthName array contains a list of month names\r\n const monthName = [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"];\r\n\r\n //Determines the current month\r\n let thisMonth = calDate.getMonth();\r\n\r\n //Determines the current year\r\n let thisYear = calDate.getFullYear();\r\n\r\n //Write the caption\r\n return \"<caption>\" + monthName[thisMonth] + \" \" + thisYear + \"</caption>\";\r\n}", "function setup_calendar_title_and_nav_buttons() {\n // Calendar month title\n document.getElementById(\"month_title\").innerHTML = formatted_date(calendar_date);\n\n // Previous month arrow button on click event\n document.getElementById(\"previous_month\").addEventListener(\"click\", function () {\n advance_month(-1);\n })\n\n // Next month arrow button on click event\n document.getElementById(\"next_month\").addEventListener(\"click\", function () {\n advance_month(1);\n })\n}", "formatPublishedDate() {\n // Only format the published date if one is available\n if (this.props.book.publishedDate) {\n // Split up the published date. Using the length of this array,\n // figure out how much information to display in the final, newly\n // formated date\n let publishedDateSplitUp = this.props.book.publishedDate.split('-');\n // Convert the published date into a date object\n let publishedDate = new Date(this.props.book.publishedDate);\n // To store the date formatting options based on how information is available\n let dateFormattingOptions;\n // Show only the year\n if (publishedDateSplitUp.length === 1) {\n dateFormattingOptions = {\n year: 'numeric'\n };\n }\n // Show the month and year\n else if (publishedDateSplitUp === 2) {\n dateFormattingOptions = {\n year: 'numeric',\n month: 'short'\n };\n }\n // Show the day, month, and year\n else {\n dateFormattingOptions = {\n year: 'numeric',\n month: 'short',\n day: 'numeric'\n };\n }\n // Convert and return the date\n return publishedDate.toLocaleString('en-us', dateFormattingOptions);\n }\n }", "function displayDate(dValue) {\n var title = \"\";\n if (dValue != \"\") {\n dateCalculate.push(dValue);\n if (dateCalculate.length > 1) {\n if ((dateCalculate[0].getTime()) < (dateCalculate[1].getTime())) {\n resultArray['STARTDATE'] = (dateCalculate[0].getMonth() + 1) + \"/\" + dateCalculate[0].getDate() + \"/\" + dateCalculate[0].getFullYear();\n resultArray['DUEDATE'] = (dateCalculate[1].getMonth() + 1) + \"/\" + dateCalculate[1].getDate() + \"/\" + dateCalculate[1].getFullYear();\n }\n }\n if (dateCalculate.length == 1) {\n resultArray['DUEDATE'] = (dateCalculate[0].getMonth() + 1) + \"/\" + dateCalculate[0].getDate() + \"/\" + dateCalculate[0].getFullYear();\n }\n taskName = str.toUpperCase().trim().split(\" \");\n // Priority text is stripped\n if (priority) {\n var index = taskName.indexOf(\"+\" + priority);\n if (index != -1) {\n taskName.splice(index, 1);\n }\n }\n // Percentage text is stripped\n if (percentage) {\n var index = taskName.indexOf(percentage + \"%\");\n if (index != -1) {\n taskName.splice(index, 1);\n }\n }\n // Description text is stripped\n if (desc) {\n var decrip = cap.substring(cap.lastIndexOf(\"[\") + 1, cap.lastIndexOf(\"]\"));\n var desArr = decrip.split(\" \");\n var index = taskName.indexOf(\"[\" + desArr[0]);\n var index1 = taskName.indexOf(desArr[(desArr.length) - 1] + \"]\");\n var index2 = taskName.indexOf(\"[\" + desArr[0] + \"]\");\n if (index != -1) {\n taskName.splice(index, 1);\n }\n if (index1 != -1) {\n taskName.splice(index1, 1);\n }\n if (index2 != -1) {\n taskName.splice(index2, 1);\n }\n var diff = index1 - index;\n for (var h = 1; h <= diff; h++) {\n taskName.splice(index, 1);\n }\n }\n\n // Time related text is stripped\n for (var b = 0; b <= time.length; b++) {\n\n var index = taskName.indexOf(time[b]);\n if (index != -1) {\n taskName.splice(index, 1);\n }\n }\n // Time adjective text is stripped\n for (var c = 0; c <= timeAdj.length; c++) {\n\n var index = taskName.indexOf(timeAdj[c]);\n if (index != -1) {\n taskName.splice(index, 1);\n }\n }\n // Other text is stripped\n for (var e = 0; e <= misc.length; e++) {\n\n var index = taskName.indexOf(misc[e]);\n if (index != -1) {\n taskName.splice(index, 1);\n }\n }\n // Exact date text is stripped\n for (var i = 0; i < 2; i++) {\n if (dateText[i].indexOf('/') != -1) {\n var index = taskName.indexOf(dateText[i].substr(dateText[i].indexOf('/') - 2, 10));\n if (index != -1) {\n taskName.splice(index, 1);\n }\n }\n }\n // Title is assigned from the taskName array\n for (var d = 0; d < taskName.length; d++) {\n title = title + \" \" + taskName[d];\n }\n title = title.trim();\n title = title.substring(0, 1).toUpperCase() + title.substring(1).toLowerCase();\n resultArray['TITLE'] = title;\n }\n}", "function computeTitleFormat$1(dateProfile) {\n var currentRangeUnit = dateProfile.currentRangeUnit;\n if (currentRangeUnit === 'year') {\n return { year: 'numeric' };\n }\n else if (currentRangeUnit === 'month') {\n return { year: 'numeric', month: 'long' }; // like \"September 2014\"\n }\n else {\n var days = diffWholeDays$1(dateProfile.currentRange.start, dateProfile.currentRange.end);\n if (days !== null && days > 1) {\n // multi-day range. shorter, like \"Sep 9 - 10 2014\"\n return { year: 'numeric', month: 'short', day: 'numeric' };\n }\n else {\n // one day. longer, like \"September 9 2014\"\n return { year: 'numeric', month: 'long', day: 'numeric' };\n }\n }\n }", "function calCaption(calDate){\n //month array contains the list of month names\n var monthName = [\"January\",\"February\", \"March\", \"April\",\"May\",\"June\",\n \"July\",\"Augast\",\"Sebtember\", \"October\",\"Novmber\",\"December\"];\n\n // current month\n var thisMonth = calDate.getMonth(); //0,1,2,3,11\n // the current year\n var thisYear = calDate.getFullYear(); // 2021 \n\n //write the caption\n return \"<caption>\" + monthName[thisMonth] + \" \" + thisYear + \"</caption>\"; \n }", "header() {\n const month = this.months[this.monthIndex];\n return {\n month: month,\n year: this.year.toString(),\n shortYear: this.year.toString().substring(2, 4),\n label: month.label + ' ' + this.year,\n };\n }", "render() {\n const formattedDate = getFormattedDate(this.props.date);\n return (\n <div className=\"formatted-date\">\n <h3 className=\"formatted-date-text\">{formattedDate}</h3>\n </div>\n );\n }", "updateHeader(date, header) {\n var monthText = this.settings.months[date.getMonth()];\n monthText += this.settings.displayYear ? ' <div class=\"year\">' + date.getFullYear() : '</div>';\n header.querySelector('.month');\n header.querySelector('.month').innerHTML = monthText;\n }", "function formatHeadline(text) {\n const categories = addCategory();\n const timeStamp = formatTimeAndDate(countryCode);\n const header = `<h4><a id=\"${timeStamp[1]}\" name=\"${timeStamp[1]}\"></a>${text} - ${timeStamp[0]} ${categories}</h4>`;\n return header;\n}", "function getHeaderDate() {\n //create a variable for the current date\n var currentDate = now.format(\"dddd, MMMM Do\");\n // Set date to Current day ID\n $(\"#currentDay\").text(currentDate);\n}", "function my_title_format (window) {\n return '{'+get_current_profile()+'} '+window.buffers.current.description;\n}", "title() { return this.owner.name + \" - \" + this.label.replace('\\n', ' ') }", "function getDateDisplay(start, end) {\n var dayStart = start.getDate();\n var dayEnd = end.getDate();\n\n var monthStart = start.getMonth();\n var monthEnd = end.getMonth();\n\n var yearStart = start.getFullYear();\n var yearEnd = end.getFullYear();\n\n if (monthStart != monthEnd || yearStart != yearEnd)\n return dayStart + '. <small>' + MONTHS[monthStart] + ' ' + yearStart + '</small> - ' +\n dayEnd + '. <small>' + MONTHS[monthEnd] + ' ' + yearEnd + '</small>';\n\n return dayStart + '. - ' + dayEnd + '. <small>' + MONTHS[monthStart] + ' ' + yearStart + '</small>';\n }", "function displayDateSearch() {\n var template = HtmlService.createTemplateFromFile('displayDateSearch');\n var rawDate = SpreadsheetApp.getActive().getSheetByName('Infrastructure').getRange(8, 2).getValue().toString();\n var date = rawDate.substring(0, 15);\n var headerString = '🔎 Search results for ' + date;\n template.automationInfo = searchDate();\n var html = template.evaluate().setTitle('🔎 Search by Date Results')\n .setWidth(800)\n .setHeight(800);\n SpreadsheetApp.getUi() \n .showModalDialog(html, headerString);\n}", "function generateTitle(ref, enfermedad) {\n var tituloFormat = '<h4 class=\"page-head-line\">DATOS DE LA ENFERMEDAD ' + '(' + enfermedad.name + ')</h4>';\n ref.innerHTML = tituloFormat;\n}", "tipDateFormat(event) {\n var dateFormat = $('[data-date-format]').data('date-format'),\n timeFormat = $('[data-time-format]').data('time-format'),\n //format = dateFormat + \" \" + timeFormat,\n startDate = moment(event.start),\n endDate = moment(event.end),\n output = \"\";\n // Moment JS format Crafts Locale formats don't match up to PHP's date formst.\n let format = \"MMM D, YYYY h:m a\";\n\n //console.log(format);\n\n\n if (event.allDay) {\n if (event.multiDay) {\n //output += Craft.t(\"All Day from\");\n //output += \" \" + startDate.format(format) + \" \" + Craft.t(\"to\") + \" \" + endDate.format(format);\n output += \"<div><strong>\" + Craft.t(\"venti\", \"Begins\") + \":</strong> \" + startDate.format(format);\n output += \"</div><div>\";\n output += \"<strong>\" + Craft.t(\"venti\", \"Ends\") + \":</strong> \" + endDate.format(format);\n output += \"</div>\";\n } else {\n //output += Craft.t(\"All Day from\");\n //output += \" \" + startDate.format(format) + \" \" + Craft.t(\"to\") + \" \" + endDate.format(timeFormat);\n output += \"<strong>\" + Craft.t(\"venti\", \"Begins\") + \":</strong> \" + startDate.format(format);\n output += \"</div><div>\";\n output += \"<strong>\" + Craft.t(\"venti\", \"Ends\") + \":</strong> \" + endDate.format(timeFormat);\n output += \"</div>\";\n }\n } else {\n if (event.multiDay) {\n //output += \" \" + startDate.format(format) + \" \" + Craft.t(\"to\") + \" \" + endDate.format(format);\n output += \"<div><strong>\" + Craft.t(\"venti\", \"Begins\") + \":</strong> \" + startDate.format(format);\n output += \"</div><div>\";\n output += \"<strong>\" + Craft.t(\"venti\", \"Ends\") + \":</strong> \" + endDate.format(format);\n output += \"</div>\";\n } else {\n //output += \" \" + startDate.format(format) + \" \" + Craft.t(\"to\") + \" \" + endDate.format(timeFormat);\n output += \"<div><strong>\" + Craft.t(\"venti\", \"Begins\") + \":</strong> \" + startDate.format(format);\n output += \"</div><div>\";\n output += \"<strong>\" + Craft.t(\"venti\", \"Ends\") + \":</strong> \" + endDate.format(timeFormat);\n output += \"</div>\";\n }\n }\n\n return output;\n }", "function getTitle() {\n if ($scope.ShowMode != null && $scope.ShowMode == 'edit') {\n return 'Edicion: ' + $scope.WorkCliente.Nombre;\n }\n else {\n //alert($scope.WorkCliente.Nombre + \" - \" + $scope.WorkCliente.IdDescuento + \" - \" + $scope.WorkCliente.IdUsuario);\n return 'Nuevo Cliente';\n }\n }", "function titleSetup() {\n\t\t\t\t\tif(scope.title !== undefined) {\n\t\t\t\t\t\t// For now we don't display the title\n\t\t\t\t\t\t// sel.select(\"span.list-title\").text(scope.title);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsel.select(\"span.list-title\").text(null);\n\t\t\t\t\t}\n\t\t\t\t}", "function dateChanged(ev)\n{\n let value = this.value;\n\n // add a space anytime a digit is followed by a letter or vice-versa\n value = value.replace(/([a-zA-Z])(\\d)/g,\"$1 $2\");\n this.value = value.replace(/(\\d)([a-zA-Z])/g,\"$1 $2\");\n\n // expand abbreviations if required\n if (this.abbrTbl)\n expAbbr(this,\n this.abbrTbl);\n else\n if (this.value == '[')\n this.value = '[Blank]';\n\n if (this.checkfunc)\n this.checkfunc();\n\n // if the page title is empty, modify it to include the name fields\n // that have been filled in so far\n if ((this.name == 'BirthDate' || this.name == 'DeathDate') && updateTitle)\n {\n let form = this.form;\n let newName = '';\n let givennameElt = form.GivenName;\n if (givennameElt)\n newName += givennameElt.value;\n let surnameElt = form.Surname;\n if (surnameElt)\n newName += ' ' + surnameElt.value;\n newName += ' (';\n let birthElt = form.BirthDate;\n if (birthElt)\n newName += birthElt.value;\n newName += \"\\u2014\"; // m-dash\n let deathElt = form.DeathDate;\n if (deathElt)\n newName += deathElt.value;\n newName += ')';\n let titleElement = document.getElementById('title');\n titleElement.innerHTML = titlePrefix + newName;\n } // update title\n}", "function _title() {\n var title = \"\";\n\n title =\n \"\" +\n \" ----------------- ----------------- \\n\" +\n \"| A | | 7 |\\n\" +\n \"| | | |\\n\" +\n \"| | | /\\\\ /\\\\ |\\n\" +\n \"| | | \\\\/ \\\\/ |\\n\" +\n \"| / \\\\ | | /\\\\ /\\\\ /\\\\ |\\n\" +\n \"| (_ _) | VS | \\\\/ \\\\/ \\\\/ |\\n\" +\n \"| /_\\\\ | | /\\\\ /\\\\ |\\n\" +\n \"| | | \\\\/ \\\\/ |\\n\" +\n \"| | | |\\n\" +\n \"| A | | 7 |\\n\" +\n \" ----------------- ----------------- \\n\" +\n \"\\n\" +\n \" The Game of War \\n\" +\n \" Game: \" +\n _gameID +\n \" \\n\";\n\n _log(title);\n }", "function createCalendar(){\n // display the current month and year at the top of the calendar\n calendarHeader.innerHTML = `<h1>${monthInfo[dateInfo.currentMonth][0]} ${dateInfo.currentYear}</h1>`;\n checkLeapYear();\n addDaysFromPastMonth();\n addDaysFromCurrentMonth();\n addDaysFromNextMonth();\n}", "function getHeaderDate() {\n var currentHeaderDate = moment().format('MMMM Do YYYY, h:mm:ss a');\n $(\"#currentDay\").text(currentHeaderDate);\n}", "function showMonthHeader() {\n return true;\n var vS = viewStart;\n var vE = viewEnd;\n var mS = vS.getMonth();\n var mE = vE.getMonth();\n var headerDiv = monthHeaderNode;\n var str = '';\n\n // Format like 'March-April, 2006'\n if (mS < mE) {\n str += dojox.date.posix.strftime(vS, '%B-');\n str += dojox.date.posix.strftime(vE, '%B %Y');\n }\n // Format like 'December 2006-January 2007'\n else if (mS > mE) {\n str += dojox.date.posix.strftime(vS, '%B %Y-');\n str += dojox.date.posix.strftime(vE, '%B %Y');\n }\n // Format like 'April 2-8, 2006'\n else {\n str += dojox.date.posix.strftime(vS, '%B %Y');\n }\n if (headerDiv.firstChild) {\n headerDiv.removeChild(headerDiv.firstChild);\n }\n headerDiv.appendChild(document.createTextNode(str));\n }", "customDateHtml(date){\n\t\treturn moment(date).date(); //day of month\n\t}", "function display() {\n var thisDay = today.getDay();// lấy thứ theo số thứ tự của mảng 0-6, lưu giá trị hiển thị\n var thisMonth = today.getMonth();// lấy tháng theo index 0-11, lưu giá trị hiển thị\n var thisYear = today.getFullYear();// lấy năm đủ 4 chữ số, lưu giá trị hiển thị\n var thisDate = today.getDate();// lấy ra ngày 1-31, lưu giá trị hiển thị\n var nowDate = now.getDate();// lay ngay\n console.log(nowDate);\n var nowMonth = now.getMonth();// lay thang\n var nowYear = now.getFullYear();// lay nam\n var text = \"\";\n\n if (nowYear % 4 == 0) month_day[1]=29;\n console.log(nowYear);\n var first_date = new Date(thisYear, thisMonth, 1);// trả về kết quả đầy đủ h, ngày 1 tháng năm ở thời điểm được trỏ tới\n var first_day = first_date.getDay();// trả về thứ của ngày mùng 1 = so\n console.log(first_day);\n title = month_name[thisMonth] + ' ' + thisYear;\n document.getElementById('title').innerHTML = title;\n text += '<table border = 2 style=\"height: 300px;width: 440px;\">';\n text += '<tr><td style=\"color: orangered;\">' + \"Sunday\" + '</td><td style=\"color: orangered;\">' + \"Monday\" + '</td><td style=\"color: orangered;\">' + \"Tuesday\" + '</td><td style=\"color: orangered;\">' + \"Wednesday\" + '</td><td style=\"color: orangered;\">' + \"Thursday\" + '</td><td style=\"color: orangered;\">' + \"Friday\" + '</td><td style=\"color: orangered;\">' + \"Saturday\" + '</td></tr>';\n text+='<tr>';\n for (i = 0; i < first_day; i++) {\n console.log(i);\n console.log(first_day);\n text += \"<td> </td>\";\n }\n date = 1;\n while (date <= month_day[nowMonth]){\n for (j = first_day; j < 7; j++) {\n if ( date <= month_day[thisMonth]){\n if (nowDate == date && nowMonth == thisMonth && nowYear == thisYear){\n text +='<td id = \"nowDate\"><b style=\"color: orangered;\">' + date + '</b></td>';\n }else {\n text +='<td class = \"date\">' + date + '</td>';\n }\n } else {\n text += \"&nbsp\";\n }\n date++;\n }\n text += '</tr>';\n first_day = 0;\n }\n text += '</table>';\n document.getElementById(\"display\").innerHTML = text;\n}", "function getSectionTitle(title) {\n // section title layout\n return title;\n}", "render(){\n\n const {title, desc} = this.props\n const fullDate = new Date();\n const date = fullDate.getDate() + \"/\" + fullDate.getMonth() + \"/\"+ fullDate.getFullYear();\n\n return (\n <div>\n <div className=\"card-style\">\n {/* <h3>{this.props.title}</h3>\n <p>{this.props.desc}</p> */}\n <h3>{title}</h3>\n <p>{desc}</p>\n <p>{date}</p>\n </div> \n </div>\n )\n }", "function pageTitles() {\n\n // Edit the page headings with the totalShifts\n $(\"#totalShifts\").append(results.Collections.Total);\n $(\"#totalCollectors\").append(results.Collectors.Total);\n\n }", "function titleize() {\n\n}", "renderHeader() {\n const dateFormat = \"yyyy-MM\";\n \n return (\n <div className=\"header row flex-middle\">\n <div className=\"col col-start\">\n <div className=\"icon\" onClick={this.prevMonth}>\n chevron_left\n </div>\n </div>\n <div className=\"col col-center\">\n <span>{format(this.state.currentMonth, dateFormat)}</span>\n </div>\n <div className=\"col col-end\" onClick={this.nextMonth}>\n <div className=\"icon\">chevron_right</div>\n </div>\n </div>\n );\n }", "function title() {\n var elm\n \n elm = d.find(\"title\");\n elm.innerText = g.title;\n \n elm = d.tags(\"title\");\n elm[0].innerText = g.title;\n }", "function displayDate() {\r\n currentDate.innerHTML = daysInWeek[currentDayInWeek] + ', ' + currentDay + 'th';\r\n}", "function getTitle()\n {\n\n var title = d(Posting.TITLE);\n var address = d(Posting.URL);\n\n if (title) {\n var sTitle = title.value;\n if (address && address.value.length>0) {\n sTitle = \"<a target=\\\"new\\\" href=\\\"\"\n +address.value\n +\"\\\">\"\n +sTitle\n +\"</a>\";\n }\n }\n\n return sTitle;\n }", "function getHeader() {\n return This.headerTpl({\n date: date,\n teams: teams\n });\n }", "function createCalendar(calDate) {\r\n var calendarHTML = \"<table id = 'calendar_table'>\";\r\n calendarHTML += calCaption(calDate);\r\n calendarHTML += \"</table>\";\r\n return calendarHTML;\r\n}", "_formatTitle(name) {\n let title = \"\"\n let titleWords = name.split(\"-\");\n\n for(let i = 0; i < titleWords.length; ++i) {\n let word = titleWords[i];\n\n title += word.charAt(0).toUpperCase() + word.slice(1) + \" \";\n }\n\n return title\n }", "function renderCalendar() {\n // render month title\n renderMonthTitle(currentMonth, monthTitleEl);\n\n // render days\n renderDays(currentMonth, daysContainerEl);\n }", "drawTimeAreaTitle() {\n const ctx = this.context;\n const padding = this.options.padding;\n const timeLabel = ['Hour', 'Min', 'Sec'];\n timeLabel.forEach((v, idx) => {\n this.dynamicDraw(\n ctx,\n this.baseCanvas.width / 2,\n padding.top + ((this.coordinate.timeArea.total.height / 3) * idx),\n this.options.timeArea.titleWidth,\n this.coordinate.timeArea.total.height / 3,\n {\n fillText: {\n show: true,\n text: v,\n },\n align: 'center',\n padding: {\n bottom: 27,\n },\n font: '12px Roboto Condensed',\n },\n );\n });\n }", "function day_title(day_name){\n document.write(\"<TD ALIGN=center WIDTH=35>\"+day_name+\"</TD>\")\n}", "getTitle() {\n return `Title is: ${this.title}`;\n }", "function displayDate() {\n var currentDay = new Date();\n var month;\n var date = currentDay.getDate();\n var year = currentDay.getFullYear();\n \n switch (currentDay.getMonth()) {\n case 0:\n month = \"January\";\n break;\n case 1:\n month = \"February\";\n break;\n case 2:\n month = \"March\";\n break;\n case 3:\n month = \"April\";\n break;\n case 4:\n month = \"May\";\n break;\n case 5:\n month = \"June\";\n break;\n case 6:\n month = \"July\";\n break;\n case 7:\n month = \"August\";\n break;\n case 8:\n month = \"September\";\n break;\n case 9:\n month = \"October\";\n break;\n case 10:\n month = \"November\";\n break;\n case 11:\n month = \"December\";\n break;\n }\n var dateDiv = document.getElementById('date');\n dateDiv.innerText = month + \" \" + date + \", \" + year;\n }", "getTodayText() {\n return moment().format(\"dddd, MMMM Do\");\n }", "function formatDateLabel(date){\n\tvar month = date.substring(5, 7);\n\tvar day = date.substring(8, 10);\n\tvar monthStr = getMonthStr(parseInt(month));\n\treturn (monthStr + ' ' + day);\n}", "function displayDate() {\n // variable for date formatted day, month, day, year\n var date = now.format(\"dddd, MMMM Do YYYY\");\n // update text to show date\n currentDayEl.text(date);\n}", "function colorHeaders() {\n\tvar eventDivs = $(\".fc-event-title\");\n\tfor (var i = 0; i < itinerary.length; i++) {\n\t\tfor (var j = 0; j < eventDivs.length; j++) {\n\t\t\tif ($(eventDivs[j]).html() == \"Travel Time\" || $($(eventDivs[j]).parent().parent().children()[0]).html().indexOf(\"Travel Time\") != -1) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (getItem(itinerary[i]).data.start >= calBegin && getItem(itinerary[i]).value == $(eventDivs[j]).html()) {\n\t\t\t\t$($(eventDivs[j]).parent().parent().children()[0]).css(\"background-color\", \"#CCCCCC\");\n\t\t\t}\n\t\t}\n\t}\n}", "colorTableTitle(title) {\n return `{black-fg,blue-bg,bold}${title}{/black-fg,blue-bg,bold}`\n }", "function sortDates() {\n sortUsingNestedDate($('#projectIndexBig'), \"span\", $(\"button.btnSortDate\").data(\"sortKey\"));\n\n //ADDING UNDERLINE CLASSES\n if ($(\"#name\").hasClass(\"underline\")) {\n $(\"#name\").removeClass(\"underline\");\n $(\"#date\").addClass(\"underline\");\n } else {\n $(\"#date\").addClass(\"underline\");\n }\n }", "function init (){\n todayEl.text(today.format(\"DD-MMM-YYYY\"));\n buildBody();\n buildList();\n}", "function formatTitle(title) {\n\t\tvar title = title.replace(/[^\\w\\s]/gi, '')\n return title.slice(0, 1).toUpperCase() + title.slice(1).replace(/_/g, ' ');\n }", "function runClock (){\r\n//7. display date\r\n\r\nvar currentDay = new Date();\r\nvar date = currentDay.toLocaleDateString();\r\nvar time = currentDay.toLocaleTimeString();\r\n//display current time\r\ndocument.getElementById(\"header_title\").innerHTML = document.title +\"<br/>\" + date + \"<br/>\" + time;\r\n}", "function getTitle() {\n return document.getElementById( \"eow-title\" ).title;\n}", "function datenya(a){a(\".datex .time\").each(function(){var d=a(this).attr(\"title\");var b=[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"];if(d!=\"\"){var g=d.substring(0,10),h=g.substring(0,4),f=g.substring(5,7),e=g.substring(8,10),c=b[parseInt(f,10)-1]}a(this).html('<strong>'+e+'</strong><span>'+c+'</span><span>'+h+'</span>')})}" ]
[ "0.7253568", "0.71165115", "0.7083522", "0.69508946", "0.68761724", "0.68477166", "0.6827454", "0.6805223", "0.67304003", "0.6695786", "0.6685525", "0.66567934", "0.66482526", "0.6564499", "0.6530174", "0.64815193", "0.64802957", "0.64749545", "0.6450433", "0.64376086", "0.64297795", "0.6390813", "0.63805306", "0.6356941", "0.63477933", "0.6303846", "0.62790895", "0.6221748", "0.620937", "0.62059367", "0.62059367", "0.62059367", "0.6183189", "0.61764723", "0.6164614", "0.6116183", "0.61095506", "0.6072877", "0.6069418", "0.60185874", "0.60132134", "0.6007707", "0.5991704", "0.5984613", "0.5973161", "0.5950396", "0.59389234", "0.5932518", "0.592642", "0.5910373", "0.5898087", "0.58872634", "0.5884046", "0.5859276", "0.5859069", "0.5855338", "0.58372986", "0.58352214", "0.5834784", "0.5820375", "0.58116436", "0.5798892", "0.57982844", "0.57973063", "0.57906127", "0.57885545", "0.57791877", "0.57747024", "0.5763665", "0.57509506", "0.57471263", "0.57282376", "0.5723797", "0.5720976", "0.5720498", "0.5715762", "0.5706899", "0.5700209", "0.56949717", "0.56849486", "0.5670407", "0.5667733", "0.5667349", "0.56553155", "0.5645894", "0.56347483", "0.56265074", "0.561914", "0.5617972", "0.56151485", "0.56116116", "0.5607955", "0.5599654", "0.5595552", "0.55940014", "0.55929494", "0.55886966", "0.5585532", "0.55843735" ]
0.6548306
15
Generates the format string that should be used to generate the title for the current date range. Attempts to compute the most appropriate format if not explicitly specified with `titleFormat`.
function computeTitleFormat(dateProfile) { var currentRangeUnit = dateProfile.currentRangeUnit; if (currentRangeUnit === 'year') { return { year: 'numeric' }; } else if (currentRangeUnit === 'month') { return { year: 'numeric', month: 'long' }; // like "September 2014" } else { var days = diffWholeDays(dateProfile.currentRange.start, dateProfile.currentRange.end); if (days !== null && days > 1) { // multi-day range. shorter, like "Sep 9 - 10 2014" return { year: 'numeric', month: 'short', day: 'numeric' }; } else { // one day. longer, like "September 9 2014" return { year: 'numeric', month: 'long', day: 'numeric' }; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function computeTitle(dateProfile, viewOptions) {\n var range; // for views that span a large unit of time, show the proper interval, ignoring stray days before and after\n\n if (/^(year|month)$/.test(dateProfile.currentRangeUnit)) {\n range = dateProfile.currentRange;\n } else {\n // for day units or smaller, use the actual day range\n range = dateProfile.activeRange;\n }\n\n return this.dateEnv.formatRange(range.start, range.end, createFormatter(viewOptions.titleFormat || computeTitleFormat(dateProfile), viewOptions.titleRangeSeparator), {\n isEndExclusive: dateProfile.isRangeAllDay\n });\n } // Generates the format string that should be used to generate the title for the current date range.", "function computeTitle(dateProfile, viewOptions) {\n var range; // for views that span a large unit of time, show the proper interval, ignoring stray days before and after\n\n if (/^(year|month)$/.test(dateProfile.currentRangeUnit)) {\n range = dateProfile.currentRange;\n } else {\n // for day units or smaller, use the actual day range\n range = dateProfile.activeRange;\n }\n\n return this.dateEnv.formatRange(range.start, range.end, formatting_1.createFormatter(viewOptions.titleFormat || computeTitleFormat(dateProfile), viewOptions.titleRangeSeparator), {\n isEndExclusive: dateProfile.isRangeAllDay\n });\n } // Generates the format string that should be used to generate the title for the current date range.", "function buildTitleFormat(dateProfile) {\n var currentRangeUnit = dateProfile.currentRangeUnit;\n if (currentRangeUnit === 'year') {\n return { year: 'numeric' };\n }\n if (currentRangeUnit === 'month') {\n return { year: 'numeric', month: 'long' }; // like \"September 2014\"\n }\n var days = diffWholeDays(dateProfile.currentRange.start, dateProfile.currentRange.end);\n if (days !== null && days > 1) {\n // multi-day range. shorter, like \"Sep 9 - 10 2014\"\n return { year: 'numeric', month: 'short', day: 'numeric' };\n }\n // one day. longer, like \"September 9 2014\"\n return { year: 'numeric', month: 'long', day: 'numeric' };\n }", "function buildTitle(dateProfile, viewOptions, dateEnv) {\n var range;\n // for views that span a large unit of time, show the proper interval, ignoring stray days before and after\n if (/^(year|month)$/.test(dateProfile.currentRangeUnit)) {\n range = dateProfile.currentRange;\n }\n else { // for day units or smaller, use the actual day range\n range = dateProfile.activeRange;\n }\n return dateEnv.formatRange(range.start, range.end, createFormatter(viewOptions.titleFormat || buildTitleFormat(dateProfile)), {\n isEndExclusive: dateProfile.isRangeAllDay,\n defaultSeparator: viewOptions.titleRangeSeparator,\n });\n }", "function computeTitleFormat(dateProfile) {\n var currentRangeUnit = dateProfile.currentRangeUnit;\n\n if (currentRangeUnit === 'year') {\n return {\n year: 'numeric'\n };\n } else if (currentRangeUnit === 'month') {\n return {\n year: 'numeric',\n month: 'long'\n }; // like \"September 2014\"\n } else {\n var days = diffWholeDays(dateProfile.currentRange.start, dateProfile.currentRange.end);\n\n if (days !== null && days > 1) {\n // multi-day range. shorter, like \"Sep 9 - 10 2014\"\n return {\n year: 'numeric',\n month: 'short',\n day: 'numeric'\n };\n } else {\n // one day. longer, like \"September 9 2014\"\n return {\n year: 'numeric',\n month: 'long',\n day: 'numeric'\n };\n }\n }\n } // Plugin", "function computeTitleFormat(dateProfile) {\n var currentRangeUnit = dateProfile.currentRangeUnit;\n\n if (currentRangeUnit === 'year') {\n return {\n year: 'numeric'\n };\n } else if (currentRangeUnit === 'month') {\n return {\n year: 'numeric',\n month: 'long'\n }; // like \"September 2014\"\n } else {\n var days = marker_1.diffWholeDays(dateProfile.currentRange.start, dateProfile.currentRange.end);\n\n if (days !== null && days > 1) {\n // multi-day range. shorter, like \"Sep 9 - 10 2014\"\n return {\n year: 'numeric',\n month: 'short',\n day: 'numeric'\n };\n } else {\n // one day. longer, like \"September 9 2014\"\n return {\n year: 'numeric',\n month: 'long',\n day: 'numeric'\n };\n }\n }\n } // Plugin", "function computeTitleFormat(dateProfile) {\n var currentRangeUnit = dateProfile.currentRangeUnit;\n if (currentRangeUnit === 'year') {\n return { year: 'numeric' };\n }\n else if (currentRangeUnit === 'month') {\n return { year: 'numeric', month: 'long' }; // like \"September 2014\"\n }\n else {\n var days = diffWholeDays(dateProfile.currentRange.start, dateProfile.currentRange.end);\n if (days !== null && days > 1) {\n // multi-day range. shorter, like \"Sep 9 - 10 2014\"\n return { year: 'numeric', month: 'short', day: 'numeric' };\n }\n else {\n // one day. longer, like \"September 9 2014\"\n return { year: 'numeric', month: 'long', day: 'numeric' };\n }\n }\n}", "function computeTitle(dateProfile, viewOptions) {\n var range;\n // for views that span a large unit of time, show the proper interval, ignoring stray days before and after\n if (/^(year|month)$/.test(dateProfile.currentRangeUnit)) {\n range = dateProfile.currentRange;\n }\n else { // for day units or smaller, use the actual day range\n range = dateProfile.activeRange;\n }\n return this.context.dateEnv.formatRange(range.start, range.end, createFormatter(viewOptions.titleFormat || computeTitleFormat(dateProfile), viewOptions.titleRangeSeparator), { isEndExclusive: dateProfile.isRangeAllDay });\n }", "function computeTitle(dateProfile, viewOptions) {\n var range;\n // for views that span a large unit of time, show the proper interval, ignoring stray days before and after\n if (/^(year|month)$/.test(dateProfile.currentRangeUnit)) {\n range = dateProfile.currentRange;\n }\n else { // for day units or smaller, use the actual day range\n range = dateProfile.activeRange;\n }\n return this.context.dateEnv.formatRange(range.start, range.end, createFormatter(viewOptions.titleFormat || computeTitleFormat(dateProfile), viewOptions.titleRangeSeparator), { isEndExclusive: dateProfile.isRangeAllDay });\n }", "function computeTitle(dateProfile, viewOptions) {\n var range;\n // for views that span a large unit of time, show the proper interval, ignoring stray days before and after\n if (/^(year|month)$/.test(dateProfile.currentRangeUnit)) {\n range = dateProfile.currentRange;\n }\n else { // for day units or smaller, use the actual day range\n range = dateProfile.activeRange;\n }\n return this.dateEnv.formatRange(range.start, range.end, createFormatter(viewOptions.titleFormat || computeTitleFormat(dateProfile), viewOptions.titleRangeSeparator), { isEndExclusive: dateProfile.isRangeAllDay });\n }", "function computeTitle(dateProfile, viewOptions) {\n var range;\n // for views that span a large unit of time, show the proper interval, ignoring stray days before and after\n if (/^(year|month)$/.test(dateProfile.currentRangeUnit)) {\n range = dateProfile.currentRange;\n }\n else { // for day units or smaller, use the actual day range\n range = dateProfile.activeRange;\n }\n return this.context.dateEnv.formatRange(range.start, range.end, createFormatter(viewOptions.titleFormat || computeTitleFormat(dateProfile), viewOptions.titleRangeSeparator), { isEndExclusive: dateProfile.isRangeAllDay });\n}", "function computeTitle$1(dateProfile, viewOptions) {\n var range;\n // for views that span a large unit of time, show the proper interval, ignoring stray days before and after\n if (/^(year|month)$/.test(dateProfile.currentRangeUnit)) {\n range = dateProfile.currentRange;\n }\n else { // for day units or smaller, use the actual day range\n range = dateProfile.activeRange;\n }\n return this.context.dateEnv.formatRange(range.start, range.end, createFormatter$1(viewOptions.titleFormat || computeTitleFormat$1(dateProfile), viewOptions.titleRangeSeparator), { isEndExclusive: dateProfile.isRangeAllDay });\n }", "renderDateTitle(date) {\n return moment(date).format(\"dddd\") + \", \" + moment(date).format(\"MMMM Do\");\n }", "function computeTitleFormat$1(dateProfile) {\n var currentRangeUnit = dateProfile.currentRangeUnit;\n if (currentRangeUnit === 'year') {\n return { year: 'numeric' };\n }\n else if (currentRangeUnit === 'month') {\n return { year: 'numeric', month: 'long' }; // like \"September 2014\"\n }\n else {\n var days = diffWholeDays$1(dateProfile.currentRange.start, dateProfile.currentRange.end);\n if (days !== null && days > 1) {\n // multi-day range. shorter, like \"Sep 9 - 10 2014\"\n return { year: 'numeric', month: 'short', day: 'numeric' };\n }\n else {\n // one day. longer, like \"September 9 2014\"\n return { year: 'numeric', month: 'long', day: 'numeric' };\n }\n }\n }", "function my_title_format (window) {\n return '{'+get_current_profile()+'} '+window.buffers.current.description;\n}", "function initTitle() {\n if (Vue.prototype.hasOwnProperty('$createTitle')) {\n return;\n }\n\n /**\n * Generates the document title out of the given VueComponent and parameters\n *\n * @param {String} [identifier = null]\n * @param {...String} additionalParams\n * @returns {string}\n */\n Vue.prototype.$createTitle = function createTitle(identifier = null, ...additionalParams) {\n const baseTitle = this.$tc('global.sw-admin-menu.textShopwareAdmin');\n const pageTitle = this.$tc(this.$route.meta.$module.title);\n\n const params = [baseTitle, pageTitle, identifier, ...additionalParams].filter((item) => {\n return item !== null && item.trim() !== '';\n });\n\n return params.reverse().join(' | ');\n };\n }", "getTitle() {\n return IsMorning(this.date) ? \"Sunrise - \" + this.date.toLocaleString() : \"Sunset - \" + this.date.toLocaleString();\n }", "setTitle2(date) {\n let currentDate = new Date();\n currentDate.setHours(0, 0, 0, 0);\n let cpd = new Date(date);\n cpd.setHours(0, 0, 0, 0);\n let diff = (currentDate.getTime() - cpd.getTime()) / (1000 * 3600 * 24);\n let t = '';\n if (diff == 0) t = \"Today\";else if (diff == 1) t = \"Yesterday\";else if (diff == -1) t = \"Tomorrow\";else t = cpd.toLocaleString('default', {\n weekday: 'long'\n }) + ', ' + cpd.toLocaleString('default', {\n month: 'long'\n }).substr(0, 3) + ' ' + cpd.getDate();\n return t;\n }", "function formatTitle(title) {\n\t\tvar title = title.replace(/[^\\w\\s]/gi, '')\n return title.slice(0, 1).toUpperCase() + title.slice(1).replace(/_/g, ' ');\n }", "function buildWeekTitle( start_date ){\r\n\r\n var week_from = moment( start_date ).startOf( 'week' ).add( 1, 'days' );\r\n var week_to = moment( start_date ).endOf( 'week' ).add( 1, 'days' );\r\n\r\n var week_title = week_from.format( 'Do' ) + ' - '\r\n + week_to.format( 'Do MMMM' );\r\n\r\n return '<div class=\"week-title-wrap\"><div class=\"week-title\">'\r\n + week_title\r\n + '</div></div>';\r\n\r\n }", "getFormattedTitle() {\n return this.info.title.toUpperCase();\n }", "getFormattedTitle(){\n //.....this key word used to apply conversion logic to code (uppercase letter)\n return this.info.title.toUpperCase()\n }", "function getTitle() {\r\n\tvar d = new Date();\r\n\tvar fileName = d.getFullYear() + \"-\" + (1+d.getMonth()) + \"-\" + d.getDate();\r\n\tfileName += \"_\" + d.getHours() + \"-\" + d.getMinutes() + \"-\" + d.getSeconds();\r\n\treturn fileName;\r\n}", "function titleTemplate({\n title,\n level,\n config\n}) {\n const beforeTitleContent = level <= 2 ? `${config.lineBreak}[${lineTemplate({\n config\n })}](${getTitleLink(title)})${config.lineBreak}${config.lineBreak}` : \"\";\n return `${beforeTitleContent}${Array(level).fill(\"#\").join(\"\")} ${getTitle({\n title,\n level,\n config\n })}`;\n}", "function _title() {\n var title = \"\";\n\n title =\n \"\" +\n \" ----------------- ----------------- \\n\" +\n \"| A | | 7 |\\n\" +\n \"| | | |\\n\" +\n \"| | | /\\\\ /\\\\ |\\n\" +\n \"| | | \\\\/ \\\\/ |\\n\" +\n \"| / \\\\ | | /\\\\ /\\\\ /\\\\ |\\n\" +\n \"| (_ _) | VS | \\\\/ \\\\/ \\\\/ |\\n\" +\n \"| /_\\\\ | | /\\\\ /\\\\ |\\n\" +\n \"| | | \\\\/ \\\\/ |\\n\" +\n \"| | | |\\n\" +\n \"| A | | 7 |\\n\" +\n \" ----------------- ----------------- \\n\" +\n \"\\n\" +\n \" The Game of War \\n\" +\n \" Game: \" +\n _gameID +\n \" \\n\";\n\n _log(title);\n }", "title() {\n if (arguments.length) {\n title = arguments[0];\n return column;\n }\n return purifyHtml(title || name);\n }", "function generateTitle() {\n const title = [\n 'Summer', 'Winter', 'Fall', 'Spring'];\n return title[Math.floor(Math.random() * title.length)];\n}", "colorTableTitle(title) {\n return `{black-fg,blue-bg,bold}${title}{/black-fg,blue-bg,bold}`\n }", "dailyNoteTitle() {\n\t\treturn moment( new Date() ).format( 'MMMM Do, YYYY' );\n\t}", "function tooltip(title) {\n if (!renamedHeadingToOrigField.has(title)) return '';\n return `title=\"${renamedHeadingToOrigField.get(title)}\"`;\n }", "formatDate(date, format) {\n if (!date) {\n return '';\n }\n let iFormat;\n const lookAhead = (match) => {\n const matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match);\n if (matches) {\n iFormat++;\n }\n return matches;\n }, formatNumber = (match, value, len) => {\n let num = '' + value;\n if (lookAhead(match)) {\n while (num.length < len) {\n num = '0' + num;\n }\n }\n return num;\n }, formatName = (match, value, shortNames, longNames) => {\n return (lookAhead(match) ? longNames[value] : shortNames[value]);\n };\n let output = '';\n let literal = false;\n if (date) {\n for (iFormat = 0; iFormat < format.length; iFormat++) {\n if (literal) {\n if (format.charAt(iFormat) === '\\'' && !lookAhead('\\'')) {\n literal = false;\n }\n else {\n output += format.charAt(iFormat);\n }\n }\n else {\n switch (format.charAt(iFormat)) {\n case 'd':\n output += formatNumber('d', date.getDate(), 2);\n break;\n case 'D':\n output += formatName('D', date.getDay(), this.getTranslation(primeng_api__WEBPACK_IMPORTED_MODULE_6__[\"TranslationKeys\"].DAY_NAMES_SHORT), this.getTranslation(primeng_api__WEBPACK_IMPORTED_MODULE_6__[\"TranslationKeys\"].DAY_NAMES));\n break;\n case 'o':\n output += formatNumber('o', Math.round((new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime() -\n new Date(date.getFullYear(), 0, 0).getTime()) / 86400000), 3);\n break;\n case 'm':\n output += formatNumber('m', date.getMonth() + 1, 2);\n break;\n case 'M':\n output += formatName('M', date.getMonth(), this.getTranslation(primeng_api__WEBPACK_IMPORTED_MODULE_6__[\"TranslationKeys\"].MONTH_NAMES_SHORT), this.getTranslation(primeng_api__WEBPACK_IMPORTED_MODULE_6__[\"TranslationKeys\"].MONTH_NAMES));\n break;\n case 'y':\n output += lookAhead('y') ? date.getFullYear() : (date.getFullYear() % 100 < 10 ? '0' : '') + (date.getFullYear() % 100);\n break;\n case '@':\n output += date.getTime();\n break;\n case '!':\n output += date.getTime() * 10000 + this.ticksTo1970;\n break;\n case '\\'':\n if (lookAhead('\\'')) {\n output += '\\'';\n }\n else {\n literal = true;\n }\n break;\n default:\n output += format.charAt(iFormat);\n }\n }\n }\n }\n return output;\n }", "_formatTitle(name) {\n let title = \"\"\n let titleWords = name.split(\"-\");\n\n for(let i = 0; i < titleWords.length; ++i) {\n let word = titleWords[i];\n\n title += word.charAt(0).toUpperCase() + word.slice(1) + \" \";\n }\n\n return title\n }", "getPickerTitleOutputString(propName, pickerName) {\n if (this.sharedService.gridOptions && this.sharedService.gridOptions.enableTranslate && (!this.translate || !this.translate.instant)) {\n throw new Error('[Angular-Slickgrid] requires \"ngx-translate\" to be installed and configured when the grid option \"enableTranslate\" is enabled.');\n }\n let output = '';\n const picker = this.sharedService.gridOptions && this.sharedService.gridOptions[pickerName] || {};\n const enableTranslate = this.sharedService.gridOptions && this.sharedService.gridOptions.enableTranslate || false;\n // get locales provided by user in forRoot or else use default English locales via the Constants\n const locales = this.sharedService && this.sharedService.gridOptions && this.sharedService.gridOptions.locales || Constants.locales;\n const title = picker && picker[propName];\n const titleKey = picker && picker[`${propName}Key`];\n if (titleKey && this.translate && this.translate.currentLang && this.translate.instant) {\n output = this.translate.instant(titleKey || ' ');\n }\n else {\n switch (propName) {\n case 'customTitle':\n output = title || enableTranslate && this.translate && this.translate.currentLang && this.translate.instant && this.translate.instant('COMMANDS' ) || locales && locales.TEXT_COMMANDS;\n break;\n case 'columnTitle':\n output = title || enableTranslate && this.translate && this.translate.currentLang && this.translate.instant && this.translate.instant('COLUMNS' ) || locales && locales.TEXT_COLUMNS;\n break;\n case 'forceFitTitle':\n output = title || enableTranslate && this.translate && this.translate.currentLang && this.translate.instant && this.translate.instant('FORCE_FIT_COLUMNS' ) || locales && locales.TEXT_FORCE_FIT_COLUMNS;\n break;\n case 'syncResizeTitle':\n output = title || enableTranslate && this.translate && this.translate.currentLang && this.translate.instant && this.translate.instant('SYNCHRONOUS_RESIZE' ) || locales && locales.TEXT_SYNCHRONOUS_RESIZE;\n break;\n default:\n output = title;\n break;\n }\n }\n return output;\n }", "function setTitle() {\n dt = formatDate(myDateFormat, appstate.date);\n dtextra = (appstate.date2 === null) ? '' : ' to ' + formatDate(myDateFormat, appstate.date2);\n $('#maptitle').html(\"Viewing \" + vartitle[appstate.ltype] +\n \" for \" + dt + \" \" + dtextra);\n $('#variable_desc').html(vardesc[appstate.ltype]);\n}", "static make_show_window_title(data, show_window_options){\n let title\n if(show_window_options && show_window_options.title) { title = show_window_options.title }\n else {\n if(data instanceof Job){\n title = \"Path of Job.\" + data.name\n }\n else if (data === Job){\n title = \"Paths of all defined Jobs\"\n }\n else if (this.number_of_jobs_in_array(data) > 0){\n title = \"\"\n for(let job_maybe of data){\n if(job_maybe instanceof Job){\n title += ((title === \"\") ? \"Plot of \" : \", \")\n title += \"Job.\" + job_maybe.name\n }\n }\n }\n else if (this.is_1d_array(data)){\n title = \"1D array of \" + data.length + \" points\"\n }\n else if (this.is_2d_array(data)){\n title = \"2D array of \" + data[0].length + \" points\"\n }\n else if (this.is_3d_array(data)){\n title = \"3D array of \" + data[0].length + \" points\"\n }\n else if(Array.isArray(data) && Array.isArray(data[0].z)){\n title = \"3D array of \" + data[0].z.length + \" points\"\n }\n else if(Array.isArray(data) && Array.isArray(data[0].y)){\n title = \"(\" + data.length + \")\" + \" 2D traces.\"\n }\n else {\n title = \"Plot of data\"\n }\n if((title.length > 32) && !title.includes(\"<\")) { //if it has hhtm in the title, it could well be longer than 32 chars bu still display shorter. Just allow titles with > to be any length\n title = title.substring(0, 32) + \"...\"\n }\n }\n return title\n }", "function updateTitleText(newDateArray) {\n if (!newDateArray) {\n title.text(\"NYC Crimes (select a time range)\");\n } else {\n var from = (newDateArray[0].getMonth() + 1) + \"/\" +\n (newDateArray[0].getDay() + 1) + \"/\" +\n newDateArray[0].getFullYear(),\n to = (newDateArray[1].getMonth() + 1) + \"/\" +\n (newDateArray[1].getDay() + 1) + \"/\" +\n newDateArray[1].getFullYear();\n title.text(\"NYC Crimes \" + from + \" - \" + to);\n }\n}", "function getTitle(value) {\n\tvar formalized = \"\";\n\tswitch (value) {\n\t\tcase 'major_advisor': formalized = \"Major Advisor\"; break;\n\t\tcase 'co_advisor': formalized = \"Co-Major Advisor\"; break;\n\t\tcase 'minor_advisor': formalized = \"Minor Advisor\"; break;\n\t\tcase 'gcr': formalized = \"GCR\"; break;\n\t\tcase 'committee': \n\t\tdefault: formalized = \"Committee\";\n\t}\n\t\n\treturn formalized;\n}", "renderDate(value) {\n 'use strict';\n\n if (value) {\n return `<span title=\"${value.full}\">${value.shortest}</span>`;\n }\n return '-';\n }", "_createTitle(obj) {\n let res = \"\";\n for (let p in obj) {\n res += `${p}=${obj[p]},`;\n }\n return res.substr(0, res.length - 1);\n }", "function getFormat(options) {\n return '<% if (date) { %>' + $.gray('${date}') + '<% } %>' +\n options.name + ' ' +\n '<% if (padding) { %>' + $.gray('${padding}') + '<% } %>' +\n (options.message || '${message}') +\n '<% if (debug) { %>' + $.gray('${debug}') + '<% } %>';\n}", "function setTitle() {\n var dateString = dateFormat(new Date(), 'HH:MM:ss');\n document.title = title + ' - ' + APP_PACKAGE_INFO.version;\n }", "function getTitle()\n {\n\n var title = d(Posting.TITLE);\n var address = d(Posting.URL);\n\n if (title) {\n var sTitle = title.value;\n if (address && address.value.length>0) {\n sTitle = \"<a target=\\\"new\\\" href=\\\"\"\n +address.value\n +\"\\\">\"\n +sTitle\n +\"</a>\";\n }\n }\n\n return sTitle;\n }", "function generateWebTitle(title) {\n title = !title || title == \"Untitled\" ? \"HackMD - Collaborative notes\" : title + \" - HackMD\";\n return title;\n}", "function setTitle () {\n\t\tvar min = 0;\n\t\tvar max = 4;\n\t\tvar random = Math.floor(Math.random() * (max - min + 1)) + min;\n\t\tvar titleSet = [\n\t\t\t\"Love it if We Made it\",\n\t\t\t\"Another Day in Paradise\",\n\t\t\t\"Business of Misdemeanors\",\n\t\t\t\"The Poetry is in the Streets\",\n\t\t\t\"Truth is only Hearsay\",\n\t\t\t\"It Dies in Darkness\"\n\t\t];\n\t\ttitle = titleSet[random];\n\t\tdocument.title = title;\n\t}", "function generateResourceFileName(title, type, date, fileName) {\n const safeTitle = slugify(title).replace(/[^a-zA-Z0-9-]/g, '');\n if (title.length >= 100) console.log(fileName);\n return `${date}-${type}-${safeTitle}.md`;\n}", "function getTitle({\n title,\n level,\n config\n}) {\n const prefix = config.headingPrefix[level] || \"\";\n return `${prefix}${title}`;\n}", "function getFormattedTitle (message) {\n return `<p>${message.title}</p>`;\n}", "function formatTitle(title, currentArray, currentIndex, currentOpts) {\n return '<div id=\"group-title\">' + (title && title.length ? '<b>' + title + '</b>' : '' ) + 'Image ' + (currentIndex + 1) + ' of ' + currentArray.length + '</div>';\n}", "_refreshHeaderTitle() {\n const that = this;\n let date;\n\n function preFormatDate() {\n if (that.displayMode !== 'month') {\n if (that.displayModeView === 'list' && that.$.listViewContainer.selectedValues[0]) {\n let items = that.$.listViewContainer.items;\n\n date = that.displayMode === 'year' ?\n new Date(that.$.listViewContainer.getItem(that.$.listViewContainer.selectedValues[0]).value).getFullYear() :\n new Date(items[0].value).getFullYear() + ' - ' + new Date(items[items.length - 1].value).getFullYear();\n }\n else if (that.$.dateViewContainer.children[0].value) {\n let dateViewItems = that._animationStarted ? that.$.nextMonthsContainer.children : that.$.dateViewContainer.children;\n\n date = that.displayMode === 'year' ? dateViewItems[0].value.getFullYear() :\n dateViewItems[1].value.getFullYear() + ' - ' + dateViewItems[dateViewItems.length - 2].value.getFullYear();\n }\n\n if (date) {\n return date;\n }\n }\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 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 return date;\n }\n\n if (that.calendarMode === 'default') {\n that.$.defaultHeaderDate.innerHTML = preFormatDate();\n }\n\n if (typeof that.headerTemplate === 'function' || !that._layoutTemplates) {\n return;\n }\n\n let layoutTemplate = that._layoutTemplates.filter(template => template.selector === that.$.header)[0];\n\n if (!layoutTemplate) {\n return;\n }\n\n let clone = document.importNode(layoutTemplate.template.content, true);\n\n if (layoutTemplate.bindings.length > 0) {\n const bindingHolderElement = clone.childNodes[layoutTemplate.bindings[0].childNodeIndex];\n\n layoutTemplate.selector.childNodes[layoutTemplate.bindings[0].childNodeIndex].innerHTML =\n bindingHolderElement.innerHTML.replace(layoutTemplate.bindings[0].bindingString, that.dateFormatFunction ? that.dateFormatFunction(that._viewDates) : preFormatDate());\n }\n }", "function getTitle(record, item) {\n\t\tvar titleTag = record.getFieldSubfields(\"200\");\n\t\tif (titleTag) {\n\t\t\ttitleTag = titleTag[0];\n\t\t\tvar titleText = titleTag.a;\n\t\t\tif (titleTag.e) {\n\t\t\t\tif (!/^[,\\.:;-]/.exec(titleTag.e)) {\n\t\t\t\t\ttitleText += \": \";\n\t\t\t\t}\n\t\t\t\ttitleText += titleTag.e;\n\t\t\t}\n\t\t\tif (titleTag.h) {\n\t\t\t\ttitleText += \", \" + titleTag.h;\n\t\t\t\tif (titleTag.i) {\n\t\t\t\t\ttitleText += \": \" + titleTag.i;\n\t\t\t\t}\n\t\t\t} else if (titleTag.i) {\n\t\t\t\ttitleText += \", \" + titleTag.i;\n\t\t\t}\n\t\t\titem.title = titleText;\n\t\t}\n\t}", "function buildTitle(options) {\n html += `<!DOCTYPE html>\n\n <head>\n <title>\"${options[0]}\"</title>\n <link rel=\"stylesheet\" src=\"css/reset.css\" type=\"text/css\" />\n <link rel=\"stylesheet\" src=\"css/style.css\" type=\"text/css\" />\n\n </head>\n\n <html>\n <body>\n `;\n}", "function setTitle(title) {\r\n d3.select(\".timelapse-chart-title\")\r\n .attr(\"x\", chartSettings.width / 2)\r\n .attr(\"y\", -chartSettings.padding / 2)\r\n .text(title);\r\n\r\n return this;\r\n }", "function generateTitle() {\n // randomize title here.\n }", "function getTitle(t) {\n // console.log('getTitle t:',t)\n // title content for mouseover\n\n // var _dbotype = t.dbotype || \"\";\n // var _group = t.group || \"\";\n var _name = t.data.name || \"\";\n var _label = t.data.label || _name;\n var _description = t.data.description || \"\";\n var _datavalues = t.data.datavalues || \"\";\n // // var _startdate = t.startdate || \"\";\n // // var _status = t.status || \"\";\n // //var _colour = t.colour || \"\";\n // var _color = t.color || \"\" ;\n // var _id = t.id || \"\";\n\n // var _title = _group + \": \" + _label + \"\\n\" + _description + _color + \"\\n\" ;\n var _title = _label + \": \" + _description + ' ' + _datavalues + \"\\n\";\n // console.log('_title', _title)\n return _title\n }", "showTitle() {\n this.log(_consts.SEPARATOR);\n\n if (!this.options.title) {\n const title = `${_consts.GENERATOR_NAME} v${_package.version}`;\n const subTitle = 'Add hook to existing API';\n this.log(\n _yosay(\n `Helm Chart Generator.\\n${_chalk.red(\n title\n )}\\n${_chalk.yellow(subTitle)}`\n )\n );\n } else {\n this.log(this.options.title);\n }\n }", "function generateTitle() {\n const titles = [\n 'Fashion', 'Sports', 'Weather', 'Politics', 'Travel'];\n return titles[Math.floor(Math.random() * titles.length)];\n}", "function generateTitleName() {\n const titles = [\n 'Hakuna Matata', 'Sick Sad World', 'Zippy Doo Dah'];\n return titles[Math.floor(Math.random() * titles.length)];\n }", "function generateTitle(ref, enfermedad) {\n var tituloFormat = '<h4 class=\"page-head-line\">DATOS DE LA ENFERMEDAD ' + '(' + enfermedad.name + ')</h4>';\n ref.innerHTML = tituloFormat;\n}", "function createTitle() {\n return new Title(Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__[\"ɵɵinject\"])(_angular_common__WEBPACK_IMPORTED_MODULE_1__[\"DOCUMENT\"]));\n}", "function generateTitle() {\n const title = [\n 'Title1', 'Title2', 'Title3', 'Title4', 'Title5'];\n return title[Math.floor(Math.random() * title.length)];\n}", "getTitle() {\n let title = ''\n let pageConfig = Config.pages[this.page] || {}\n\n if(this.isBlogPost) {\n title = `${Config.baseUrl}: ${this.post.frontmatter.title}`\n }\n else {\n title = pageConfig.title || Config.title\n }\n \n return title\n }", "function get_well_formated_title(title) {\n //setp 1 upper case\n title = title.toLowerCase();\n //remove all the white space and put the space\n title=title.replace(new RegExp(' ', 'g'), '-');\n //remove single quote to normal\n title = title.replace(new RegExp(\"'\", 'g'), '');\n //remove & to and\n title = title.replace(new RegExp(\"&\", 'g'), 'and');\n return title;\n}", "get title() {\n this._logger.trace(\"[getter] title\");\n\n return this._title;\n }", "function createTitlePages() {\n let titleInfo = [\n { num:'1', title:'General Provisions' },\n { num:'2', title:'Elections'},\n { num:'3', title:'Legislature'},\n { num:'4', title:'State Organization and Administration, Generally'},\n { num:'5', title:'State Financial Administration'},\n { num:'6', title:'County Organization and Administration'},\n { num:'7', title:'Public Officers and Employees'},\n { num:'8', title:'Public Proceedings and Records'},\n { num:'9', title:'Public Property, Purchasing and Contracting'},\n { num:'10', title:'Public Safety and Internal Security'},\n { num:'11', title:'Agriculture and Animals'},\n { num:'12', title:'Conservation and Resources'},\n { num:'13', title:'Planning and Economic Development'},\n { num:'14', title:'Taxation'},\n { num:'15', title:'Transportation and Utilities'},\n { num:'16', title:'Intoxicating Liquor'},\n { num:'17', title:'Motor and Other Vehicles'},\n { num:'18', title:'Education'},\n { num:'19', title:'Health'},\n { num:'20', title:'Social Services'},\n { num:'21', title:'Labor and Industrial Relations'},\n { num:'22', title:'Banks and Financial Institutions'},\n { num:'23', title:'Corporations and Partnerships'},\n { num:'23a', title:'Other Business Entities'},\n { num:'24', title:'Insurance'},\n { num:'25', title:'Professions and Occupations'},\n { num:'25a', title:'General Business Provisions'},\n { num:'26', title:'Trade Regulation and Practice'},\n { num:'27', title:'Uniform Commercial Code'},\n { num:'28', title:'Property'},\n { num:'29', title:'Decedents\\' Estates'},\n { num:'30', title:'Guardians and Trustees'},\n { num:'30a', title:'Uniform Probate Code'},\n { num:'31', title:'Family'},\n { num:'32', title:'Courts and Court Officers'},\n { num:'33', title:'Evidence'},\n { num:'34', title:'Pleadings and Procedure'},\n { num:'35', title:'Appeal and Error'},\n { num:'36', title:'Civil Remedies and Defenses and Special Proceedings'},\n { num:'37', title:'Hawaii Penal Code'},\n { num:'38', title:'Procedural and Supplementary Provisions'}\n ];\n\n let re = new RegExp(/^([0-9]+)/i);\n\n let allPromises = [];\n\n //loop thru titles\n for (let i=0; i<titleInfo.length; i++) {\n\n let division = '';\n let volume = '';\n\n let r = titleInfo[i].num.match(re);\n let titleNumOnly = parseInt(r[1]);\n \n if (titleNumOnly < 22) division = '1';\n else if (titleNumOnly < 28) division = '2';\n else if (titleNumOnly < 32) division = '3';\n else if (titleNumOnly < 37) division = '4';\n else division = '5';\n\n if (titleNumOnly < 6) volume = '1';\n else if (titleNumOnly < 10) volume = '2';\n else if (titleNumOnly < 13) volume = '3';\n else if (titleNumOnly < 15) volume = '4';\n else if (titleNumOnly < 19) volume = '5';\n else if (titleNumOnly < 20) volume = '6';\n else if (titleNumOnly < 22) volume = '7';\n else if (titleNumOnly < 24) volume = '8';\n else if (titleNumOnly < 25) volume = '9';\n else if (titleNumOnly < 26) volume = '10';\n else if (titleNumOnly < 27) volume = '11';\n else if (titleNumOnly < 32) volume = '12';\n else if (titleNumOnly < 37) volume = '13';\n else volume = '14';\n\n // Create meta\n let meta = {\n hrs_structure: {\n division: division,\n volume: volume,\n title: titleInfo[i].num,\n chapter: '',\n section: ''\n },\n type: 'title',\n menu: {\n hrs: {\n identifier: `title${titleInfo[i].num}`,\n name: `Title ${titleInfo[i].num}. ${titleInfo[i].title}`\n }\n },\n weight: (5 * (i + 1)),\n title: titleInfo[i].title,\n full_title: `Title ${titleInfo[i].num}. ${titleInfo[i].title}`\n };\n let allMeta = Object.assign({}, meta, addCustomMetaAllFiles);\n\n //write file\n let path = Path.join(destFileDir, `title-${titleInfo[i].num}`, '_index.md');\n allPromises.push(writeFile(path, \"---\\n\" + yaml.safeDump(allMeta) + \"---\\n\"));\n \n } \n\n return Promise.all(allPromises).then((val)=>val);\n}", "function getTitle() {\r\n var carrier = story.getFrameValue();\r\n var index = carriers.indexOf(carrier) + 1;\r\n return \"#\" + (\"0\" + index).slice(-2)+ \" - \" + carrier;\r\n }", "getShortTitle() {\n \n let showDetails = this.get('showDetails');\n // Good enough for two lines max\n let limit = showDetails ? 80 : 40;\n let title = this.get('taskCard.title');\n if(title.length < limit) {\n return title;\n }\n \n return `${title.slice(0, limit)}...`;\n }", "function setTodayTitle(el) {\n var subTitleEl = el.querySelector('.topNav-title');\n var innerText = subTitleEl.innerText;\n\n innerText = innerText.replace(\"--WEEK_DAY_NAME--\", utils.getWeekDay());\n innerText = innerText.replace(\"--MONTH_NAME--\", utils.getMonthName());\n subTitleEl.innerText = innerText;\n }", "static title(_title) {\n document.title = _title;\n }", "function matter_title(t, m) {\n t = t.replace(/\\s\\s+/g, ' '); // replaces multiple spaces with single spaces\n t = t.replace(/[ \\t]+$/g, ''); // removes trailing spaces from title\n var title = escapeHtml(t) +'-'+ m;\n return title;\n }", "formatEventDate(dateText) {\n if (this.today === dateText) {\n return new XDate(dateText).toString(this.today_format).toUpperCase();\n } else if (this.tomorrow === dateText) {\n return new XDate(dateText).toString(this.tomorrow_format).toUpperCase();\n } else {\n return new XDate(dateText).toString(this.date_format).toUpperCase();\n }\n }", "function title() {\n var elm\n \n elm = d.find(\"title\");\n elm.innerText = g.title;\n \n elm = d.tags(\"title\");\n elm[0].innerText = g.title;\n }", "function getTitle() {\n return chalk.blue(\n figlet.textSync(\"Weather app\", {\n horizontalLayout: \"full\",\n font: \"banner\",\n })\n );\n}", "function UpdateTitle() {\r\n if (isCustomTitleUpdate) {\r\n isCustomTitleUpdate = false;\r\n return;\r\n }\r\n //x++;\r\n var strAppTitle = document.title.replace(/.+ \\[/i, '').replace(\"\\]\", '');\r\n var strFeedTitle = strAppTitle;\r\n //Get the feed or folder title from the 'chrome-title' element\r\n if (document.getElementById('chrome').className.search(/\\bhidden\\b/i) == -1) {\r\n strFeedTitle = document.getElementById('chrome-title').innerHTML;\r\n strFeedTitle = strFeedTitle.replace(/<a.+?>/i, ''); \r\n strFeedTitle = strFeedTitle.replace(/ <span.+/i, '');\r\n strFeedTitle = strFeedTitle.replace(/<.+?>/g, '');\r\n //Decode the HTML so ampersands, etc. display properly\r\n var div = document.createElement('div');\r\n div.innerHTML = strFeedTitle;\r\n strFeedTitle = div.firstChild.nodeValue;\r\n //Append Google Reader app name onto the end\r\n strFeedTitle = strFeedTitle + ' - [' + strAppTitle + ']';\r\n }\r\n //strFeedTitle = strFeedTitle + ':: ' + x.toString();\r\n isCustomTitleUpdate = true;\r\n document.title = strFeedTitle;\r\n}", "function printSectionTitle(title, count = 20) {\n let dashes = '-';\n print(dashes.repeat(count) + title + dashes.repeat(count), 'blue');\n}", "formatPublishedDate() {\n // Only format the published date if one is available\n if (this.props.book.publishedDate) {\n // Split up the published date. Using the length of this array,\n // figure out how much information to display in the final, newly\n // formated date\n let publishedDateSplitUp = this.props.book.publishedDate.split('-');\n // Convert the published date into a date object\n let publishedDate = new Date(this.props.book.publishedDate);\n // To store the date formatting options based on how information is available\n let dateFormattingOptions;\n // Show only the year\n if (publishedDateSplitUp.length === 1) {\n dateFormattingOptions = {\n year: 'numeric'\n };\n }\n // Show the month and year\n else if (publishedDateSplitUp === 2) {\n dateFormattingOptions = {\n year: 'numeric',\n month: 'short'\n };\n }\n // Show the day, month, and year\n else {\n dateFormattingOptions = {\n year: 'numeric',\n month: 'short',\n day: 'numeric'\n };\n }\n // Convert and return the date\n return publishedDate.toLocaleString('en-us', dateFormattingOptions);\n }\n }", "getTitle() {\n return `Title is: ${this.title}`;\n }", "function formatTitle(title) {\n if (title === undefined) {\n return;\n }\n if (title.includes('.mp3')) {\n return title.split('.mp3')[0];\n }\n if (title.includes('.m4a')) {\n return title.split('.m4a')[0];\n }\n if (title.includes('.flac')) {\n return title.split('.flac')[0];\n }\n }", "function generateTitle(title) {\n var hasKey = this.$te('route.' + title);\n\n if (hasKey) {\n // $t :this method from vue-i18n, inject in @/lang/index.js\n var translatedTitle = this.$t('route.' + title);\n\n return translatedTitle;\n }\n return title;\n}", "function generateUrlTitle (title) {\n if (title) {\n // Remueve todos los caracteres no-alfanuméricos \n // y hace a los espacios guiones bajos. \n return title.replace(/\\s+/g, '_').replace(/\\W/g, '');\n } else {\n // Generá de forma aleatoria un string de 5 caracteres\n return Math.random().toString(36).substring(2, 7);\n }\n }", "static formatDate (date, format) {\n let year = date.getFullYear(),\n month = Timer.zero(date.getMonth()+1),\n day = Timer.zero(date.getDate()),\n hours = Timer.zero(date.getHours()),\n minute = Timer.zero(date.getMinutes()),\n second = Timer.zero(date.getSeconds()),\n week = date.getDay();\n return format.replace(/yyyy/g, year)\n .replace(/MM/g, month)\n .replace(/dd/g, day)\n .replace(/hh/g, hours)\n .replace(/mm/g, minute)\n .replace(/ss/g, second)\n .replace(/ww/g, Timer.weekName(week));\n }", "function titleSetup() {\n\t\t\t\t\tif(scope.title !== undefined) {\n\t\t\t\t\t\t// For now we don't display the title\n\t\t\t\t\t\t// sel.select(\"span.list-title\").text(scope.title);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsel.select(\"span.list-title\").text(null);\n\t\t\t\t\t}\n\t\t\t\t}", "function create_page_title(title)\n{\n return `\n <h1 class=\"page_title\">\n ${title}\n </h1>\n <hr>\n `;\n}", "updateWindowTitle() {\n if (this.win) {\n const {translatableFlat} = this.core.make('osjs/locale');\n const prefix = translatableFlat(this.proc.metadata.title);\n const title = this._createTitle(prefix);\n\n this.win.setTitle(title);\n }\n }", "setTitle(newTitle) {\n this._doc.title = newTitle || '';\n }", "setTitle(newTitle) {\n this._doc.title = newTitle || '';\n }", "setTitle(newTitle) {\n this._doc.title = newTitle || '';\n }", "setTitle(newTitle) {\n this._doc.title = newTitle || '';\n }", "setTitle(newTitle) {\n this._doc.title = newTitle || '';\n }", "function getStandardTitle ()\n// ---------------------------------------------------------------------\n{\n // Build the title for the offline web client\n if (g_aSettings.offline)\n {\n return g_aSettings.productData.productName + \" \"+getString(\"axw_html_publishing_window_title\");\n }\n \n // If we have no product data yet (because the aserver is not available yet),\n // just show the current window title.\n if (!g_aSettings.productData)\n {\n return document.title;\n }\n var sTitle = g_aSettings.productData.productName + \" \";\n sTitle+= \"Web Client\" + (g_aSettings.user && g_aSettings.user.loginName ? \" (\"+g_aSettings.user.loginName+\")\" : \"\");\n return sTitle;\n}", "function reposTitle() {\n\t\t\tconsole.info(\"reposTitle\");\n\t\t\tif(jQuery(window).width() < 450) {\n\t\t\t\tif(!jQuery('.fc-header-title').is(':visible')) {\n\t\t\t\t\tif(jQuery('h3.calTitle').length == 0) {\n\t\t\t\t\t\tvar m = jQuery('.fc-header-title h2').text();\n\t\t\t\t\t\tjQuery('<h3 class=\"calTitle\">'+m+'</h3>').insertBefore('#calendar table.fc-header');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tjQuery('h3.calTitle').remove();\n\t\t\t}\n\t\t}", "updateTitle() {\n let numReports = this.reports.length\n if(numReports >= 101) {\n this.title = 'Bestest Manager'\n } else if(numReports >= 51) {\n this.title = 'Manager Plus'\n } else if(numReports >= 11) {\n this.title = 'Manager'\n } else if(numReports >= 4) {\n this.title = 'Mostly Manager'\n } else if(numReports >= 1) {\n this.title = 'Barely Manager'\n } else {\n this.title = 'Not a Manager'\n }\n }", "function createTitle(targetData){\n\t//define chart constants\n\tlet svg = d3.select(\".chart\");\n\n\tlet title = svg.append(\"g\")\n\t\t.attr(\"class\", \"chart-title\");\n\ttitle.append(\"text\")\n\t\t.attr(\"x\", 50)\n\t\t.attr(\"y\", 30)\n\t\t.attr(\"text-anchor\", \"center\")\n\t\t.style(\"font\", \"19px Archivo\")\n\t\t.text(targetData.title);\n}", "function getSectionTitle(title) {\n // section title layout\n return title;\n}", "colorRadioSetTitle(title) {\n return `{black-fg,blue-bg}${title}{/black-fg,blue-bg}`\n }", "static get title() {\n return 'Oops! You weren\\'t supposed to see this...';\n }", "updateTitle(){ \n let title = '';\n const { head, instance } = this.entry;\n\n if (head.hasOwnProperty('title')){\n let prop = head.title;\n\n title = head.title\n if (typeof prop === 'function'){\n title = head.title.apply(instance);\n }\n }\n\n if (title && title.length > 0){\n document.title = title;\n }\n }", "function title(writer, value) {\n return stringify(value).replace(/\\w\\S*/g, function (word) {\n return word.charAt(0).toUpperCase() + word.substr(1).toLowerCase();\n });\n}", "function titleize() {\n\n}" ]
[ "0.6709017", "0.6700918", "0.66948307", "0.6687392", "0.6499849", "0.6409251", "0.6343078", "0.61702216", "0.61702216", "0.6164502", "0.61305416", "0.60829943", "0.59611887", "0.59603775", "0.58671", "0.58123463", "0.5805132", "0.5787246", "0.5778863", "0.5706741", "0.5704804", "0.56890047", "0.5677041", "0.56593496", "0.5637965", "0.5602134", "0.56005144", "0.55943656", "0.55721295", "0.55474204", "0.54748106", "0.5462539", "0.5452975", "0.5435291", "0.5406381", "0.53995436", "0.5384865", "0.53526926", "0.53419256", "0.53346944", "0.5329108", "0.5303996", "0.5302029", "0.52765805", "0.5271557", "0.52663195", "0.5265498", "0.5263527", "0.52530843", "0.5248537", "0.5244972", "0.52034926", "0.51987153", "0.5188886", "0.51813775", "0.51626587", "0.5159582", "0.51555276", "0.51133204", "0.51130533", "0.5101643", "0.5097548", "0.5093352", "0.50810534", "0.5079674", "0.5078804", "0.50758016", "0.5068167", "0.5065243", "0.5063618", "0.5061171", "0.5052306", "0.5051843", "0.50509816", "0.5043734", "0.50380373", "0.50308985", "0.5030057", "0.50180256", "0.50168973", "0.5000231", "0.49908587", "0.4978497", "0.497788", "0.497788", "0.497788", "0.497788", "0.497788", "0.4969372", "0.49671686", "0.4966442", "0.4958237", "0.49519825", "0.493991", "0.49197537", "0.49119326", "0.4908167", "0.49070433" ]
0.63512546
8
build a context scoped to the view
function buildComponentContext(context, viewSpec, view) { return context.extend(viewSpec.options, view); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Context(view, parentContext) {\n this.view = view;\n this.cache = {\n '.': this.view,\n '@each': function each() {\n var returns = [];\n for (var k in this) {\n returns.push({ '@key': k, '@value': this[k] });\n }\n return returns;\n }\n };\n this.parent = parentContext;\n }", "function Context (view, parentContext) {\n this.view = view;\n this.cache = { '.': this.view };\n this.parent = parentContext;\n }", "function Context (view, parentContext) {\n this.view = view;\n this.cache = { '.': this.view };\n this.parent = parentContext;\n }", "function Context (view, parentContext) {\n this.view = view;\n this.cache = { '.': this.view };\n this.parent = parentContext;\n }", "function Context (view, parentContext) {\n this.view = view;\n this.cache = { '.': this.view };\n this.parent = parentContext;\n }", "function Context (view, parentContext) {\n this.view = view;\n this.cache = { '.': this.view };\n this.parent = parentContext;\n }", "function Context (view, parentContext) {\n this.view = view;\n this.cache = { '.': this.view };\n this.parent = parentContext;\n }", "function Context (view, parentContext) {\n this.view = view;\n this.cache = { '.': this.view };\n this.parent = parentContext;\n }", "function Context (view, parentContext) {\n this.view = view;\n this.cache = { '.': this.view };\n this.parent = parentContext;\n }", "function Context (view, parentContext) {\n this.view = view;\n this.cache = { '.': this.view };\n this.parent = parentContext;\n }", "function Context (view, parentContext) {\n this.view = view;\n this.cache = { '.': this.view };\n this.parent = parentContext;\n }", "function Context (view, parentContext) {\n this.view = view;\n this.cache = { '.': this.view };\n this.parent = parentContext;\n }", "function Context (view, parentContext) {\n this.view = view;\n this.cache = { '.': this.view };\n this.parent = parentContext;\n }", "function Context (view, parentContext) {\n this.view = view;\n this.cache = { '.': this.view };\n this.parent = parentContext;\n }", "function Context (view, parentContext) {\n this.view = view;\n this.cache = { '.': this.view };\n this.parent = parentContext;\n }", "function Context (view, parentContext) {\n this.view = view;\n this.cache = { '.': this.view };\n this.parent = parentContext;\n }", "function Context (view, parentContext) {\n this.view = view;\n this.cache = { '.': this.view };\n this.parent = parentContext;\n }", "function Context (view, parentContext) {\n this.view = view;\n this.cache = { '.': this.view };\n this.parent = parentContext;\n }", "function Context(view, parentContext) {\n this.view = view;\n this.cache = { '.': this.view };\n this.parent = parentContext;\n }", "function Context(view, parentContext) {\n this.view = view;\n this.cache = { '.': this.view };\n this.parent = parentContext;\n }", "function Context (view, parentContext) {\n\t this.view = view;\n\t this.cache = { '.': this.view };\n\t this.parent = parentContext;\n\t }", "function Context (view, parentContext) {\n\t this.view = view;\n\t this.cache = { '.': this.view };\n\t this.parent = parentContext;\n\t }", "function Context (view, parentContext) {\r\n this.view = view;\r\n this.cache = { '.': this.view };\r\n this.parent = parentContext;\r\n }", "function Context(view, parentContext) {\n this.view = view == null ? {} : view;\n this.cache = { '.': this.view };\n this.parent = parentContext;\n }", "function Context(view, parentContext) {\n this.view = view == null ? {} : view;\n this.cache = { '.': this.view };\n this.parent = parentContext;\n }", "function Context(view, parentContext) {\n this.view = view == null ? {} : view;\n this.cache = { '.': this.view };\n this.parent = parentContext;\n }", "function Context(view, parentContext) {\n this.view = view == null ? {} : view;\n this.cache = { '.': this.view };\n this.parent = parentContext;\n }", "function Context(view, parentContext) {\n this.view = view == null ? {} : view;\n this.cache = { '.': this.view };\n this.parent = parentContext;\n }", "function Context(view, parentContext) {\n this.view = view == null ? {} : view;\n this.cache = { '.': this.view };\n this.parent = parentContext;\n }", "function Context(view, parentContext) {\r\n this.view = view == null ? {} : view;\r\n this.cache = { '.': this.view };\r\n this.parent = parentContext;\r\n }", "function buildComponentContext(context, viewSpec, view) {\n return context.extend(viewSpec.options, view);\n}", "createContext() {\n return new VaccineContext();\n }", "function ViewContext(context, mappings, template) {\n ViewContext.super_.apply(this, arguments);\n\n // Initialize (gets optimized by v8)\n this._viewContext = context || this;\n this._viewMappings = mappings || this._viewMappings;\n this._viewTemplate = template || this._viewTemplate;\n}", "function createContext(vnode) {\n const {\n data: {\n context\n }\n } = vnode;\n\n if (isUndefined$3(context)) {\n return;\n }\n\n const elm = vnode.elm;\n const vm = getAssociatedVMIfPresent$1(elm);\n\n if (!isUndefined$3(vm)) {\n assign$2(vm.context, context);\n }\n }", "createContext() {\n const context = new RenderContext({\n renderers: this.renderers,\n theme: this.theme,\n });\n\n return context;\n }", "function buildContextVariables(context) {\n var cache = { };\n var callbacks = context.__setup_properties__;\n var container = context.container;\n var factory = context.factory;\n \n Ember.keys(callbacks).filter(function(key){\n // ignore the default setup/teardown keys\n return key !== 'setup' && key !== 'teardown';\n }).forEach(function(key){\n context[key] = function(options) {\n if (cache[key]) { return cache[key]; }\n\n var result = callbacks[key](options, factory(), container);\n cache[key] = result;\n return result;\n };\n });\n }", "function buildComponentContext$2(context, viewSpec, view) {\n return context.extend(viewSpec.options, view);\n }", "function setContext() {\n\n $context = $( Config.get( 'context' ) );\n\n }", "function createContext() {\n return _.cloneDeep(defaultContext); // deep clone\n}", "function ContextClosure(template, context) {\n this.template = template;\n this.context = context;\n}", "function createLContext(lView,nodeIndex,_native2){return{lView:lView,nodeIndex:nodeIndex,\"native\":_native2,component:undefined,directives:undefined,localRefs:undefined};}", "function getContext(_, ctx) {\n return ctx;\n }", "function getContext(_, ctx) {\n return ctx;\n }", "createContext() {\n return new HospitalContext();\n }", "function get_context()\n\t{\n\t\treturn os_ctx;\n\t\t//return ctx;\n\t}", "addContext (context) {\n this.context = context\n return this\n }", "createContext() {\n return new SmartContext();\n }", "listTodos(){\n //this context works fine here.\n renderTodoList(getTodos(this.key), this.listContainer);\n }", "function createLContext(lView, nodeIndex, native) {\n return {\n lView: lView,\n nodeIndex: nodeIndex,\n native: native,\n component: undefined,\n directives: undefined,\n localRefs: undefined\n };\n}", "function getContext(_, ctx) {\n return ctx;\n}", "function getContext(_, ctx) {\n return ctx;\n}", "createContext() {\n return new BallotContext();\n }", "function emitContext (env, scope, context) {\n\t var shared = env.shared;\n\t var CONTEXT = shared.context;\n\t\n\t var contextEnter = env.scope();\n\t\n\t Object.keys(context).forEach(function (name) {\n\t scope.save(CONTEXT, '.' + name);\n\t var defn = context[name];\n\t contextEnter(CONTEXT, '.', name, '=', defn.append(env, scope), ';');\n\t });\n\t\n\t scope(contextEnter);\n\t }", "static get() { return currentContext; }", "function createLContext(lView, nodeIndex, native) {\n return {\n lView: lView,\n nodeIndex: nodeIndex,\n native: native,\n component: undefined,\n directives: undefined,\n localRefs: undefined,\n };\n}", "function createLContext(lView, nodeIndex, native) {\n return {\n lView: lView,\n nodeIndex: nodeIndex,\n native: native,\n component: undefined,\n directives: undefined,\n localRefs: undefined,\n };\n}", "function createLContext(lView, nodeIndex, native) {\n return {\n lView: lView,\n nodeIndex: nodeIndex,\n native: native,\n component: undefined,\n directives: undefined,\n localRefs: undefined,\n };\n}", "function createLContext(lView, nodeIndex, native) {\n return {\n lView,\n nodeIndex,\n native,\n component: undefined,\n directives: undefined,\n localRefs: undefined,\n };\n}", "function createLContext(lView, nodeIndex, native) {\n return {\n lView,\n nodeIndex,\n native,\n component: undefined,\n directives: undefined,\n localRefs: undefined,\n };\n}", "function createLContext(lView, nodeIndex, native) {\n return {\n lView,\n nodeIndex,\n native,\n component: undefined,\n directives: undefined,\n localRefs: undefined,\n };\n}", "function createLContext(lView, nodeIndex, native) {\n return {\n lView,\n nodeIndex,\n native,\n component: undefined,\n directives: undefined,\n localRefs: undefined,\n };\n}", "function createLContext(lView, nodeIndex, native) {\n return {\n lView,\n nodeIndex,\n native,\n component: undefined,\n directives: undefined,\n localRefs: undefined,\n };\n}", "function createLContext(lView, nodeIndex, native) {\n return {\n lView,\n nodeIndex,\n native,\n component: undefined,\n directives: undefined,\n localRefs: undefined,\n };\n}", "get context () {\n\t\treturn this._context;\n\t}", "get context () {\n\t\treturn this._context;\n\t}", "get context () {\n\t\treturn this._context;\n\t}", "get context() {\n\t\treturn this.__context;\n\t}", "get context() {\n\t\treturn this.__context;\n\t}", "get context() {\n\t\treturn this.__context;\n\t}", "function createLContext(lViewData, nodeIndex, native) {\n return {\n lViewData: lViewData,\n nodeIndex: nodeIndex, native: native,\n component: undefined,\n directives: undefined,\n localRefs: undefined,\n };\n}", "function createContext() {\n const context = Object.assign({}, baseGlobals);\n context.global = context;\n return context;\n}", "getChildContext() {\n return {\n // story is passed along context to handle entities rendering\n story: this.state.story,\n // dimensions are the dimensions of the wrapper\n dimensions: this.state.dimensions\n };\n }", "function emitContext (env, scope, context) {\n var shared = env.shared\n var CONTEXT = shared.context\n\n var contextEnter = env.scope()\n\n Object.keys(context).forEach(function (name) {\n scope.save(CONTEXT, '.' + name)\n var defn = context[name]\n contextEnter(CONTEXT, '.', name, '=', defn.append(env, scope), ';')\n })\n\n scope(contextEnter)\n }", "function createLContext(lView, nodeIndex, _native4) {\n return {\n lView: lView,\n nodeIndex: nodeIndex,\n \"native\": _native4,\n component: undefined,\n directives: undefined,\n localRefs: undefined\n };\n }", "function LContext() {}", "function LContext() {}", "function LContext() {}", "constructor(parentContext) {\n // for minification\n const self = this;\n self._currentContext = parentContext ? new Map(parentContext) : new Map();\n self.getValue = (key) => self._currentContext.get(key);\n self.setValue = (key, value) => {\n const context = new BaseContext(self._currentContext);\n context._currentContext.set(key, value);\n return context;\n };\n self.deleteValue = (key) => {\n const context = new BaseContext(self._currentContext);\n context._currentContext.delete(key);\n return context;\n };\n }", "getChildContext() {\n\t\treturn {\n\t\t\troute: this.state.route,\n\t\t\tlinkHandler: this.handleLinkClick\n\t\t}\n\t}", "ShowAsContext() {}", "function emitContext (env, scope, context) {\n var shared = env.shared\n var CONTEXT = shared.context\n\n var contextEnter = env.scope()\n\n Object.keys(context).forEach(function (name) {\n scope.save(CONTEXT, '.' + name)\n var defn = context[name]\n var value = defn.append(env, scope)\n if (Array.isArray(value)) {\n contextEnter(CONTEXT, '.', name, '=[', value.join(), '];')\n } else {\n contextEnter(CONTEXT, '.', name, '=', value, ';')\n }\n })\n\n scope(contextEnter)\n }", "function getContext(key) {\n return get_current_component().$$.context.get(key);\n}", "render() {\n return (\n <div>\n I am Comp #3 - Accessing Context using STATIC variable - {this.context}\n </div>\n )\n }", "function LContext(){}", "get context() {\n return this.object\n }", "function emitContext (env, scope, context) {\n var shared = env.shared;\n var CONTEXT = shared.context;\n\n var contextEnter = env.scope();\n\n Object.keys(context).forEach(function (name) {\n scope.save(CONTEXT, '.' + name);\n var defn = context[name];\n contextEnter(CONTEXT, '.', name, '=', defn.append(env, scope), ';');\n });\n\n scope(contextEnter);\n }", "function emitContext (env, scope, context) {\n var shared = env.shared;\n var CONTEXT = shared.context;\n\n var contextEnter = env.scope();\n\n Object.keys(context).forEach(function (name) {\n scope.save(CONTEXT, '.' + name);\n var defn = context[name];\n contextEnter(CONTEXT, '.', name, '=', defn.append(env, scope), ';');\n });\n\n scope(contextEnter);\n }", "function emitContext (env, scope, context) {\n var shared = env.shared;\n var CONTEXT = shared.context;\n\n var contextEnter = env.scope();\n\n Object.keys(context).forEach(function (name) {\n scope.save(CONTEXT, '.' + name);\n var defn = context[name];\n contextEnter(CONTEXT, '.', name, '=', defn.append(env, scope), ';');\n });\n\n scope(contextEnter);\n }", "function emitContext (env, scope, context) {\n var shared = env.shared;\n var CONTEXT = shared.context;\n\n var contextEnter = env.scope();\n\n Object.keys(context).forEach(function (name) {\n scope.save(CONTEXT, '.' + name);\n var defn = context[name];\n contextEnter(CONTEXT, '.', name, '=', defn.append(env, scope), ';');\n });\n\n scope(contextEnter);\n }", "function emitContext (env, scope, context) {\n var shared = env.shared;\n var CONTEXT = shared.context;\n\n var contextEnter = env.scope();\n\n Object.keys(context).forEach(function (name) {\n scope.save(CONTEXT, '.' + name);\n var defn = context[name];\n contextEnter(CONTEXT, '.', name, '=', defn.append(env, scope), ';');\n });\n\n scope(contextEnter);\n }", "function emitContext (env, scope, context) {\n var shared = env.shared;\n var CONTEXT = shared.context;\n\n var contextEnter = env.scope();\n\n Object.keys(context).forEach(function (name) {\n scope.save(CONTEXT, '.' + name);\n var defn = context[name];\n contextEnter(CONTEXT, '.', name, '=', defn.append(env, scope), ';');\n });\n\n scope(contextEnter);\n }", "function emitContext (env, scope, context) {\n var shared = env.shared;\n var CONTEXT = shared.context;\n\n var contextEnter = env.scope();\n\n Object.keys(context).forEach(function (name) {\n scope.save(CONTEXT, '.' + name);\n var defn = context[name];\n contextEnter(CONTEXT, '.', name, '=', defn.append(env, scope), ';');\n });\n\n scope(contextEnter);\n }", "constructor(){\n\t\tthis.util = new Util();\n\t\tthis.currentContextIdIndex = -1;\n\t}", "function emitContext (env, scope, context) {\n var shared = env.shared;\n var CONTEXT = shared.context;\n\n var contextEnter = env.scope();\n\n Object.keys(context).forEach(function (name) {\n scope.save(CONTEXT, '.' + name);\n var defn = context[name];\n var value = defn.append(env, scope);\n if (Array.isArray(value)) {\n contextEnter(CONTEXT, '.', name, '=[', value.join(), '];');\n } else {\n contextEnter(CONTEXT, '.', name, '=', value, ';');\n }\n });\n\n scope(contextEnter);\n }", "getContext() {\n return Object.assign({}, this._traceContext, { tags: JSON.parse(JSON.stringify(this.tags)) });\n }", "function LContext() { }", "function LContext() { }", "function storeCleanupWithContext(view, context, cleanupFn) {\n if (!view)\n view = viewData;\n getCleanup(view).push(context);\n if (view[TVIEW].firstTemplatePass) {\n getTViewCleanup(view).push(cleanupFn, view[CLEANUP].length - 1);\n }\n}", "function context(data) {\n return serialize(globalContext);\n }" ]
[ "0.67516714", "0.66615003", "0.66615003", "0.66615003", "0.66615003", "0.66615003", "0.66615003", "0.66615003", "0.66615003", "0.66615003", "0.66615003", "0.66615003", "0.66615003", "0.66615003", "0.66615003", "0.66615003", "0.66615003", "0.66615003", "0.66227895", "0.66227895", "0.6619199", "0.6619199", "0.6577703", "0.6533245", "0.6533245", "0.6533245", "0.6533245", "0.6533245", "0.6533245", "0.647156", "0.6277745", "0.61725116", "0.604705", "0.6007551", "0.599874", "0.58648884", "0.5811567", "0.5801103", "0.5764596", "0.5749563", "0.5698577", "0.5633784", "0.5633784", "0.56319165", "0.5618628", "0.5615527", "0.55963755", "0.5587016", "0.5584243", "0.5581848", "0.5581848", "0.55784893", "0.55451816", "0.5543139", "0.5508206", "0.5508206", "0.5508206", "0.55014634", "0.55014634", "0.55014634", "0.55014634", "0.55014634", "0.55014634", "0.5491352", "0.5491352", "0.5491352", "0.54760605", "0.54760605", "0.54760605", "0.5458887", "0.5458134", "0.5454991", "0.54343885", "0.54204863", "0.53964794", "0.53964794", "0.53964794", "0.5392028", "0.5391667", "0.5389328", "0.53856546", "0.53830904", "0.53818554", "0.5374605", "0.5367316", "0.5361756", "0.5361756", "0.5361756", "0.5361756", "0.5361756", "0.5361756", "0.5361756", "0.5354443", "0.5336437", "0.5322012", "0.53173196", "0.53173196", "0.531524", "0.5313412" ]
0.64101183
31
returns a object with all primitive props that can be compared
function buildSegCompareObj(seg) { var eventDef = seg.eventRange.def; var range = seg.eventRange.instance.range; var start = range.start ? range.start.valueOf() : 0; // TODO: better support for open-range events var end = range.end ? range.end.valueOf() : 0; // " return __assign({}, eventDef.extendedProps, eventDef, { id: eventDef.publicId, start: start, end: end, duration: end - start, allDay: Number(eventDef.allDay), _seg: seg // for later retrieval }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_computeProps() {\n\t for (let i=0; i<this.attributes.length; i++) {\n\t\t const attr = this.attributes[i];\n\t\t if ( ! attr.value) {\n\t\t\t // the attribute has no value but it is present\n\t\t\t // so we assume the prop value is true\n\t\t\t this.props[__camelize(attr.name)] = true\n\t\t\t continue;\n\t\t }\n\t\t // cast the value\n\t\t this.props[__camelize(attr.name)] = __autoCast(attr.value);\n\t }\n\n\t // handle physicalProps\n\t for (let key in this.props) {\n\t\t const value = this.props[key];\n\t\t // handle physical props\n\t\t this._handlePhysicalProps(key, value);\n\t }\n\t}", "_getCompoundMatchProps() {\n return [];\n }", "getAttrs(){\n let properties = new Set()\n let currentObj = this\n do {\n Object.getOwnPropertyNames(currentObj).map(item => properties.add(item))\n } while ((currentObj = Object.getPrototypeOf(currentObj)))\n return {attributes: [...properties.keys()].sort().filter(item => typeof this[item] !== 'function')};\n }", "static validate(obj, props) {\n let isValid = true;\n const missingProps = [];\n const propsWithoutValue = [];\n props.forEach((prop) => {\n let propHasValue;\n const propFound = (Object.prototype.hasOwnProperty.call(obj, prop));\n if (propFound) {\n propHasValue = (obj[prop] !== '' && (obj[prop].trim().length !== 0));\n }\n if (!propFound) {\n missingProps.push(prop);\n isValid = false;\n }\n if (propFound && !propHasValue) {\n propsWithoutValue.push(prop);\n isValid = false;\n }\n });\n return { isValid, missingProps, propsWithoutValue };\n }", "function shallowCompare(a, b) {\r\n return checkProperties(a, b) && checkProperties(b, a);\r\n}", "function shallowCompare(a, b) {\r\n return checkProperties(a, b) && checkProperties(b, a);\r\n}", "static get physicalProps() {\n\t return [];\n\t}", "function shallowCompare(a, b) {\n return checkProperties(a, b) && checkProperties(b, a);\n}", "function shallowCompare(a, b) {\n return checkProperties(a, b) && checkProperties(b, a);\n}", "function shallowCompare(a, b) {\n return checkProperties(a, b) && checkProperties(b, a);\n}", "function shallowCompare(a, b) {\n return checkProperties(a, b) && checkProperties(b, a);\n}", "function compareProps(obj1, obj2) {\n for (let prop in obj1) {\n /////// if ne demek istiyorr!(......)\n if (!(prop in obj2) || obj1[prop] !== obj2[prop]) {\n return false;\n }\n }\n return true;\n}", "function getNativeProps(\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nprops, allowedPropNames, excludedPropNames) {\n // It'd be great to properly type this while allowing 'aria-` and 'data-' attributes like TypeScript does for\n // JSX attributes, but that ability is hardcoded into the TS compiler with no analog in TypeScript typings.\n // Then we'd be able to enforce props extends native props (including aria- and data- attributes), and then\n // return native props.\n // We should be able to do this once this PR is merged: https://github.com/microsoft/TypeScript/pull/26797\n var isArray = Array.isArray(allowedPropNames);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var result = {};\n var keys = Object.keys(props);\n for (var _i = 0, keys_2 = keys; _i < keys_2.length; _i++) {\n var key = keys_2[_i];\n var isNativeProp = (!isArray && allowedPropNames[key]) ||\n (isArray && allowedPropNames.indexOf(key) >= 0) ||\n key.indexOf('data-') === 0 ||\n key.indexOf('aria-') === 0;\n if (isNativeProp && (!excludedPropNames || (excludedPropNames === null || excludedPropNames === void 0 ? void 0 : excludedPropNames.indexOf(key)) === -1)) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n result[key] = props[key];\n }\n }\n return result;\n}", "function getNativeProps(\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nprops, allowedPropNames, excludedPropNames) {\n // It'd be great to properly type this while allowing 'aria-` and 'data-' attributes like TypeScript does for\n // JSX attributes, but that ability is hardcoded into the TS compiler with no analog in TypeScript typings.\n // Then we'd be able to enforce props extends native props (including aria- and data- attributes), and then\n // return native props.\n // We should be able to do this once this PR is merged: https://github.com/microsoft/TypeScript/pull/26797\n var isArray = Array.isArray(allowedPropNames);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var result = {};\n var keys = Object.keys(props);\n for (var _i = 0, keys_2 = keys; _i < keys_2.length; _i++) {\n var key = keys_2[_i];\n var isNativeProp = (!isArray && allowedPropNames[key]) ||\n (isArray && allowedPropNames.indexOf(key) >= 0) ||\n key.indexOf('data-') === 0 ||\n key.indexOf('aria-') === 0;\n if (isNativeProp && (!excludedPropNames || (excludedPropNames === null || excludedPropNames === void 0 ? void 0 : excludedPropNames.indexOf(key)) === -1)) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n result[key] = props[key];\n }\n }\n return result;\n}", "function h$allProps(o) {\n var a = [], i = 0;\n for(var p in o) a[i++] = p;\n return a;\n}", "function h$allProps(o) {\n var a = [], i = 0;\n for(var p in o) a[i++] = p;\n return a;\n}", "function h$allProps(o) {\n var a = [], i = 0;\n for(var p in o) a[i++] = p;\n return a;\n}", "function h$allProps(o) {\n var a = [], i = 0;\n for(var p in o) a[i++] = p;\n return a;\n}", "function h$allProps(o) {\n var a = [], i = 0;\n for(var p in o) a[i++] = p;\n return a;\n}", "function getNativeProps(props, allowedPropNames, excludedPropNames) {\r\n return Object(object[\"b\" /* filteredAssign */])(function (propName) {\r\n return ((!excludedPropNames || excludedPropNames.indexOf(propName) < 0) &&\r\n (propName.indexOf('data-') === 0 || propName.indexOf('aria-') === 0 || allowedPropNames.indexOf(propName) >= 0));\r\n }, {}, props);\r\n}", "function getNativeProps(props, allowedPropNames, excludedPropNames) {\r\n return Object(object[\"b\" /* filteredAssign */])(function (propName) {\r\n return ((!excludedPropNames || excludedPropNames.indexOf(propName) < 0) &&\r\n (propName.indexOf('data-') === 0 || propName.indexOf('aria-') === 0 || allowedPropNames.indexOf(propName) >= 0));\r\n }, {}, props);\r\n}", "missing_props(obj, props = []) {\n if (!this.is_object(obj)) return false;\n if (!this.is_array(props)) props = [props];\n var obj = this.lower_props(obj);\n var result = [];\n for (var i = 0; i < props.length; i++) {\n var prop = props[i].toLowerCase();\n if (!obj.hasOwnProperty(prop)) {\n result.push(props);\n }\n }\n return result;\n }", "function findLooseMatchingPrimitives(prim) {\n switch (_typeof(prim)) {\n case 'undefined':\n return null;\n\n case 'object':\n // Only pass in null as object!\n return undefined;\n\n case 'symbol':\n return false;\n\n case 'string':\n prim = +prim;\n // Loose equal entries exist only if the string is possible to convert to\n // a regular number and not NaN.\n // Fall through\n\n case 'number':\n if (numberIsNaN(prim)) {\n return false;\n }\n\n }\n\n return true;\n}", "function findLooseMatchingPrimitives(prim) {\n switch (_typeof(prim)) {\n case 'undefined':\n return null;\n\n case 'object':\n // Only pass in null as object!\n return undefined;\n\n case 'symbol':\n return false;\n\n case 'string':\n prim = +prim;\n // Loose equal entries exist only if the string is possible to convert to\n // a regular number and not NaN.\n // Fall through\n\n case 'number':\n if (numberIsNaN(prim)) {\n return false;\n }\n\n }\n\n return true;\n}", "function allProps(object) {\n return ownProps(object).concat(ownProps(proto(object)));\n}", "function getRedundantProps(a, b) {\n const result = Object.create(null);\n\n // short-circuit iteration if either object is empty\n if (Object.keys(a).length === 0 || Object.keys(b).length === 0) {\n return result;\n }\n\n for (let prop of Object.keys(a)) {\n if (b[prop] && a[prop].value === b[prop].value &&\n a[prop].important === b[prop].important) {\n result[prop] = Object.create(null);\n result[prop].value = a[prop].value;\n result[prop].important = a[prop].important;\n }\n }\n\n return result;\n}", "function compare(a, b) {\r\n\t\t\t\tvar prop;\r\n\t\t\t\tif (props) {\r\n\t\t\t\t\tfor (var j = 0; j < props.length; j++) {\r\n\t\t\t\t\t\tprop = props[j];\r\n\r\n\t\t\t\t\t\tif (a[prop] != b[prop]) return false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else {\r\n\t\t\t\t\tfor (prop in a) {\r\n\t\t\t\t\t\tif (a[prop] != b[prop]) return false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn true;\r\n\t\t\t}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (false) {}\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (false) {}\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (false) {}\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (false) {}\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (false) {}\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (false) {}\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (false) {}\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (false) {}\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (false) {}\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (false) {}\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (false) {}\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (false) {}\n options.props = res;\n}", "function isPrimitiveLike (o) {\n if (o === null || (typeof o === 'object' && typeof o.toJSON !== 'undefined') ||\n typeof o === 'string' || typeof o === 'boolean' || typeof o === 'number') {\n return true\n }\n\n if (!Array.isArray(o)) {\n return false\n } else {\n let keys = Object.keys(o)\n if (keys.length !== o.length) { \n return false /* sparse array or named props */\n }\n }\n\n for (let i = 0; i < o.length; i++) {\n if (!isPrimitiveLike(o[i])) {\n return false\n }\n }\n\n return true\n}", "function getNativeProps(props, allowedPropNames, excludedPropNames) {\n return Object(__WEBPACK_IMPORTED_MODULE_0__object__[\"b\" /* filteredAssign */])(function (propName) {\n return ((!excludedPropNames || excludedPropNames.indexOf(propName) < 0) &&\n (propName.indexOf('data-') === 0 || propName.indexOf('aria-') === 0 || allowedPropNames.indexOf(propName) >= 0));\n }, {}, props);\n}", "function normalizeProps(options) {\n\t\t var props = options.props;\n\t\t if (!props) return;\n\t\t var res = {};\n\t\t var i = void 0,\n\t\t val = void 0,\n\t\t name = void 0;\n\t\t if (Array.isArray(props)) {\n\t\t i = props.length;\n\t\t while (i--) {\n\t\t val = props[i];\n\t\t if (typeof val === 'string') {\n\t\t name = camelize(val);\n\t\t res[name] = { type: null };\n\t\t } else if (false) {\n\t\t warn('props must be strings when using array syntax.');\n\t\t }\n\t\t }\n\t\t } else if (isPlainObject(props)) {\n\t\t for (var key in props) {\n\t\t val = props[key];\n\t\t name = camelize(key);\n\t\t res[name] = isPlainObject(val) ? val : { type: val };\n\t\t }\n\t\t }\n\t\t options.props = res;\n\t\t}", "function getNativeProps(props, allowedPropNames, excludedPropNames) {\n return object_1.filteredAssign(function (propName) {\n return ((!excludedPropNames || excludedPropNames.indexOf(propName) < 0) && ((propName.indexOf('data-') === 0) ||\n (propName.indexOf('aria-') === 0) ||\n (allowedPropNames.indexOf(propName) >= 0)));\n }, {}, props);\n}", "function getNativeProps(props, allowedPropNames, excludedPropNames) {\n return object_1.filteredAssign(function (propName) {\n return ((!excludedPropNames || excludedPropNames.indexOf(propName) < 0) && ((propName.indexOf('data-') === 0) ||\n (propName.indexOf('aria-') === 0) ||\n (allowedPropNames.indexOf(propName) >= 0)));\n }, {}, props);\n}", "isObjectEqual(a, b) {\n return a && b && a.foo === b.foo;\n }", "static get observedAttributes () {\n const attrsOnCtor = this.hasOwnProperty(ctorObservedAttributes) ? this[ctorObservedAttributes] : [];\n const propDefs = getPropsMap(this);\n\n // Use Object.keys to skips symbol props since they have no linked attributes\n const attrsFromLinkedProps = Object.keys(propDefs).map(propName =>\n propDefs[propName].attrSource).filter(Boolean);\n\n const all = attrsFromLinkedProps.concat(attrsOnCtor).concat(super.observedAttributes);\n return all.filter((item, index) =>\n all.indexOf(item) === index);\n }", "static get observedAttributes () {\n const attrsOnCtor = this.hasOwnProperty($ctorObservedAttributes) ? this[$ctorObservedAttributes] : [];\n const propDefs = getPropsMap(this);\n\n // Use Object.keys to skips symbol props since they have no linked attributes\n const attrsFromLinkedProps = Object.keys(propDefs).map(propName =>\n propDefs[propName].attrSource).filter(Boolean);\n\n const all = attrsFromLinkedProps.concat(attrsOnCtor).concat(super.observedAttributes);\n return all.filter((item, index) =>\n all.indexOf(item) === index);\n }", "function sanitizeWrapperProps(properties) {\n return omit(properties, Object.keys(ratingPropTypes));\n}", "function componentProps(){\n\t\tvar props = {};\n\t\tlog(arguments);\n\t\tfor(var i = 0; i< arguments.length; i++){\n\t\t\tvar arg = arguments[i];\n\t\t\tlog(arg);\n\t\t\tvar prop = String.prototype.split.call(arg,\"=\"); // key value pairs\n\t\t\tif(prop.length > 1) {\n\t\t\t\tprops[prop[0]] = prop[1];\n\t\t\t} else {\n\t\t\t\tprops[prop[0]] = null; // properties like selected, disabled, etc.\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn props;\n\t}", "function normalizeProps (options) {\n\t var props = options.props;\n\t if (!props) { return }\n\t var res = {};\n\t var i, val, name;\n\t if (Array.isArray(props)) {\n\t i = props.length;\n\t while (i--) {\n\t val = props[i];\n\t if (typeof val === 'string') {\n\t name = camelize(val);\n\t res[name] = { type: null };\n\t } else if (process.env.NODE_ENV !== 'production') {\n\t warn('props must be strings when using array syntax.');\n\t }\n\t }\n\t } else if (isPlainObject(props)) {\n\t for (var key in props) {\n\t val = props[key];\n\t name = camelize(key);\n\t res[name] = isPlainObject(val)\n\t ? val\n\t : { type: val };\n\t }\n\t }\n\t options.props = res;\n\t}", "function normalizeProps (options) {\n\t var props = options.props;\n\t if (!props) { return }\n\t var res = {};\n\t var i, val, name;\n\t if (Array.isArray(props)) {\n\t i = props.length;\n\t while (i--) {\n\t val = props[i];\n\t if (typeof val === 'string') {\n\t name = camelize(val);\n\t res[name] = { type: null };\n\t } else if (process.env.NODE_ENV !== 'production') {\n\t warn('props must be strings when using array syntax.');\n\t }\n\t }\n\t } else if (isPlainObject(props)) {\n\t for (var key in props) {\n\t val = props[key];\n\t name = camelize(key);\n\t res[name] = isPlainObject(val)\n\t ? val\n\t : { type: val };\n\t }\n\t }\n\t options.props = res;\n\t}", "function getNativeProps(props, allowedPropNames, excludedPropNames) {\n return Object(_object__WEBPACK_IMPORTED_MODULE_0__[\"filteredAssign\"])(function (propName) {\n return ((!excludedPropNames || excludedPropNames.indexOf(propName) < 0) &&\n (propName.indexOf('data-') === 0 || propName.indexOf('aria-') === 0 || allowedPropNames.indexOf(propName) >= 0));\n }, {}, props);\n}", "function normalizeProps(options, vm) {\n var props = options.props;\n\n if (!props) {\n return;\n }\n\n var res = {};\n var i, val, name;\n\n if (Array.isArray(props)) {\n i = props.length;\n\n while (i--) {\n val = props[i];\n\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = {\n type: null\n };\n } else if (false) {}\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val) ? val : {\n type: val\n };\n }\n } else if (false) {}\n\n options.props = res;\n}", "function normalizeProps(options, vm) {\n var props = options.props;\n\n if (!props) {\n return;\n }\n\n var res = {};\n var i, val, name;\n\n if (Array.isArray(props)) {\n i = props.length;\n\n while (i--) {\n val = props[i];\n\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = {\n type: null\n };\n } else if (false) {}\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val) ? val : {\n type: val\n };\n }\n } else if (false) {}\n\n options.props = res;\n}", "function normalizeProps (options) {\n\t var props = options.props\n\t if (!props) { return }\n\t var res = {}\n\t var i, val, name\n\t if (Array.isArray(props)) {\n\t i = props.length\n\t while (i--) {\n\t val = props[i]\n\t if (typeof val === 'string') {\n\t name = camelize(val)\n\t res[name] = { type: null }\n\t } else if (process.env.NODE_ENV !== 'production') {\n\t warn('props must be strings when using array syntax.')\n\t }\n\t }\n\t } else if (isPlainObject(props)) {\n\t for (var key in props) {\n\t val = props[key]\n\t name = camelize(key)\n\t res[name] = isPlainObject(val)\n\t ? val\n\t : { type: val }\n\t }\n\t }\n\t options.props = res\n\t}", "static get requiredProps() {\n\t\treturn [];\n\t}", "extract_props(obj, keys = []) {\n if (!this.is_object(obj)) return false;\n var result = [];\n if (typeof(keys) === 'string') {\n keys = [keys];\n }\n keys.forEach(key => {\n var key = key.toLowerCase();\n if (obj.hasOwnProperty(key)) {\n result.push(obj[key]);\n } else {\n result.push(undefined);\n }\n });\n if (result.length == 1) {\n return result[0];\n }\n return result;\n }", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n }", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n }", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n }", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n }", "function normalizeProps (options) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (process.env.NODE_ENV !== 'production') {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n }\n options.props = res;\n}", "function normalizeProps (options) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (process.env.NODE_ENV !== 'production') {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n }\n options.props = res;\n}", "function normalizeProps (options) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (process.env.NODE_ENV !== 'production') {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n }\n options.props = res;\n}", "function normalizeProps (options) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (process.env.NODE_ENV !== 'production') {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n }\n options.props = res;\n}", "function normalizeProps (options) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (process.env.NODE_ENV !== 'production') {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n }\n options.props = res;\n}", "function normalizeProps (options) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (process.env.NODE_ENV !== 'production') {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n }\n options.props = res;\n}", "function normalizeProps (options) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (process.env.NODE_ENV !== 'production') {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n }\n options.props = res;\n}", "function normalizeProps (options) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (process.env.NODE_ENV !== 'production') {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n }\n options.props = res;\n}", "function normalizeProps (options) {\n\t var props = options.props;\n\t if (!props) { return }\n\t var res = {};\n\t var i, val, name;\n\t if (Array.isArray(props)) {\n\t i = props.length;\n\t while (i--) {\n\t val = props[i];\n\t if (typeof val === 'string') {\n\t name = camelize(val);\n\t res[name] = { type: null };\n\t } else if (true) {\n\t warn('props must be strings when using array syntax.');\n\t }\n\t }\n\t } else if (isPlainObject(props)) {\n\t for (var key in props) {\n\t val = props[key];\n\t name = camelize(key);\n\t res[name] = isPlainObject(val)\n\t ? val\n\t : { type: val };\n\t }\n\t }\n\t options.props = res;\n\t}", "function normalizeProps (options) {\n\t var props = options.props;\n\t if (!props) { return }\n\t var res = {};\n\t var i, val, name;\n\t if (Array.isArray(props)) {\n\t i = props.length;\n\t while (i--) {\n\t val = props[i];\n\t if (typeof val === 'string') {\n\t name = camelize(val);\n\t res[name] = { type: null };\n\t } else {\n\t warn('props must be strings when using array syntax.');\n\t }\n\t }\n\t } else if (isPlainObject(props)) {\n\t for (var key in props) {\n\t val = props[key];\n\t name = camelize(key);\n\t res[name] = isPlainObject(val)\n\t ? val\n\t : { type: val };\n\t }\n\t }\n\t options.props = res;\n\t}", "function normalizeProps (options) {\n\t var props = options.props;\n\t if (!props) { return }\n\t var res = {};\n\t var i, val, name;\n\t if (Array.isArray(props)) {\n\t i = props.length;\n\t while (i--) {\n\t val = props[i];\n\t if (typeof val === 'string') {\n\t name = camelize(val);\n\t res[name] = { type: null };\n\t } else {\n\t warn('props must be strings when using array syntax.');\n\t }\n\t }\n\t } else if (isPlainObject(props)) {\n\t for (var key in props) {\n\t val = props[key];\n\t name = camelize(key);\n\t res[name] = isPlainObject(val)\n\t ? val\n\t : { type: val };\n\t }\n\t }\n\t options.props = res;\n\t}", "function normalizeProps (options) {\n\t var props = options.props;\n\t if (!props) { return }\n\t var res = {};\n\t var i, val, name;\n\t if (Array.isArray(props)) {\n\t i = props.length;\n\t while (i--) {\n\t val = props[i];\n\t if (typeof val === 'string') {\n\t name = camelize(val);\n\t res[name] = { type: null };\n\t } else {\n\t warn('props must be strings when using array syntax.');\n\t }\n\t }\n\t } else if (isPlainObject(props)) {\n\t for (var key in props) {\n\t val = props[key];\n\t name = camelize(key);\n\t res[name] = isPlainObject(val)\n\t ? val\n\t : { type: val };\n\t }\n\t }\n\t options.props = res;\n\t}", "function normalizeProps (options) {\n\t var props = options.props;\n\t if (!props) { return }\n\t var res = {};\n\t var i, val, name;\n\t if (Array.isArray(props)) {\n\t i = props.length;\n\t while (i--) {\n\t val = props[i];\n\t if (typeof val === 'string') {\n\t name = camelize(val);\n\t res[name] = { type: null };\n\t } else {\n\t warn('props must be strings when using array syntax.');\n\t }\n\t }\n\t } else if (isPlainObject(props)) {\n\t for (var key in props) {\n\t val = props[key];\n\t name = camelize(key);\n\t res[name] = isPlainObject(val)\n\t ? val\n\t : { type: val };\n\t }\n\t }\n\t options.props = res;\n\t}", "function normalizeProps(options, vm) {\n var props = options.props;\n if (!props) return;\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === \"string\") {\n name = camelize(val);\n res[name] = { type: null };\n } else {\n warn(\"props must be strings when using array syntax.\");\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val) ? val : { type: val };\n }\n } else {\n warn(\n 'Invalid value for option \"props\": expected an Array or an Object, ' +\n \"but got \" + (toRawType(props)) + \".\",\n vm,\n );\n }\n options.props = res;\n }", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (true) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n }", "function recycleProps(oldProps, newProps, equalityFuncs) {\n var comboProps = {}; // some old, some new\n var anyChanges = false;\n for (var key in newProps) {\n if (key in oldProps && (oldProps[key] === newProps[key] ||\n (equalityFuncs[key] && equalityFuncs[key](oldProps[key], newProps[key])))) {\n // equal to old? use old prop\n comboProps[key] = oldProps[key];\n }\n else {\n comboProps[key] = newProps[key];\n anyChanges = true;\n }\n }\n for (var key in oldProps) {\n if (!(key in newProps)) {\n anyChanges = true;\n break;\n }\n }\n return { anyChanges: anyChanges, comboProps: comboProps };\n }", "function recycleProps(oldProps, newProps, equalityFuncs) {\n var comboProps = {}; // some old, some new\n var anyChanges = false;\n for (var key in newProps) {\n if (key in oldProps && (oldProps[key] === newProps[key] ||\n (equalityFuncs[key] && equalityFuncs[key](oldProps[key], newProps[key])))) {\n // equal to old? use old prop\n comboProps[key] = oldProps[key];\n }\n else {\n comboProps[key] = newProps[key];\n anyChanges = true;\n }\n }\n for (var key in oldProps) {\n if (!(key in newProps)) {\n anyChanges = true;\n break;\n }\n }\n return { anyChanges: anyChanges, comboProps: comboProps };\n }", "function recycleProps(oldProps, newProps, equalityFuncs) {\n var comboProps = {}; // some old, some new\n var anyChanges = false;\n for (var key in newProps) {\n if (key in oldProps && (oldProps[key] === newProps[key] ||\n (equalityFuncs[key] && equalityFuncs[key](oldProps[key], newProps[key])))) {\n // equal to old? use old prop\n comboProps[key] = oldProps[key];\n }\n else {\n comboProps[key] = newProps[key];\n anyChanges = true;\n }\n }\n for (var key in oldProps) {\n if (!(key in newProps)) {\n anyChanges = true;\n break;\n }\n }\n return { anyChanges: anyChanges, comboProps: comboProps };\n }", "function diffObj(a, b, props) {\n const diffs = {};\n\n // TODO: maybe implement two versions of this algo, one if props is present, one if it isn't,\n // because it's probably faster to outerloop props if it is present\n\n for (const prop in a) {\n if (!a.hasOwnProperty(prop) || (props && !props[prop])) {\n continue;\n }\n\n const av = a[prop],\n bv = b[prop];\n\n if (!Tyr.isEqual(av, bv)) {\n if (bv === undefined) {\n diffs[prop] = O_DELETE;\n } else {\n if (isArray(av)) {\n if (isArray(bv)) {\n diffs[prop] = [T_ARRAY, diffArr(av, bv)];\n } else {\n diffs[prop] = [bv];\n }\n } else if (isArray(bv)) {\n diffs[prop] = [bv];\n } else if (Tyr.isObject(av) && Tyr.isObject(bv)) {\n diffs[prop] = [T_OBJECT, diffObj(av, bv)];\n } else {\n diffs[prop] = [bv];\n }\n }\n }\n }\n\n for (const prop in b) {\n if (!b.hasOwnProperty(prop) || (props && !props[prop])) {\n continue;\n }\n\n if (!(prop in a)) {\n const bv = b[prop];\n\n diffs[prop] = [bv];\n }\n }\n\n return diffs;\n}", "function PropertyDetection() {}", "function normalizeProps (options) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (false) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n }\n options.props = res;\n}", "function normalizeProps (options) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (false) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n }\n options.props = res;\n}", "function normalizeProps (options) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (false) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n }\n options.props = res;\n}", "function normalizeProps (options) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (false) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n }\n options.props = res;\n}", "function normalizeProps (options) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (false) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n }\n options.props = res;\n}", "function normalizeProps (options) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (false) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n }\n options.props = res;\n}", "function normalizeProps (options) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (true) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n }\n options.props = res;\n}", "function normalizeProps (options) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (true) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n }\n options.props = res;\n}", "function recycleProps(oldProps, newProps, equalityFuncs) {\n var comboProps = {}; // some old, some new\n var anyChanges = false;\n for (var key in newProps) {\n if (key in oldProps && (oldProps[key] === newProps[key] ||\n (equalityFuncs[key] && equalityFuncs[key](oldProps[key], newProps[key])))) {\n // equal to old? use old prop\n comboProps[key] = oldProps[key];\n }\n else {\n comboProps[key] = newProps[key];\n anyChanges = true;\n }\n }\n for (var key in oldProps) {\n if (!(key in newProps)) {\n anyChanges = true;\n break;\n }\n }\n return { anyChanges: anyChanges, comboProps: comboProps };\n}", "function objectProperties(a, b) {\n\tvar key;\n\tfor (key in b) {\n\t\tif (a[key] !== b[key]) return false;\n\t}\n\treturn true;\n}", "function recycleProps(oldProps, newProps, equalityFuncs) {\n var comboProps = {}; // some old, some new\n\n var anyChanges = false;\n\n for (var key in newProps) {\n if (key in oldProps && (oldProps[key] === newProps[key] || equalityFuncs[key] && equalityFuncs[key](oldProps[key], newProps[key]))) {\n // equal to old? use old prop\n comboProps[key] = oldProps[key];\n } else {\n comboProps[key] = newProps[key];\n anyChanges = true;\n }\n }\n\n for (var key in oldProps) {\n if (!(key in newProps)) {\n anyChanges = true;\n break;\n }\n }\n\n return {\n anyChanges: anyChanges,\n comboProps: comboProps\n };\n }", "function normalizeProps (options) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n }\n options.props = res;\n}", "function normalizeProps (options) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n }\n options.props = res;\n}", "function normalizeProps (options) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n }\n options.props = res;\n}", "function normalizeProps (options) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n }\n options.props = res;\n}", "function normalizeProps (options) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n }\n options.props = res;\n}", "function normalizeProps (options) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n }\n options.props = res;\n}", "function normalizeProps (options) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n }\n options.props = res;\n}", "validateProps() {\n\t\tif (!this.props.nodeInfo) return false;\n\n\t\tif (!this.props.nodeInfo.nodeName) return false;\n\t\tif (typeof this.props.nodeInfo.nodeName !== \"string\") return false;\n\n\t\tif (!this.props.nodeInfo.nodeCapacity) return false;\n\t\tif (typeof this.props.nodeInfo.nodeCapacity !== \"object\") return false;\n\t\tif (\n\t\t\t!this.props.nodeInfo.nodeCapacity.cpu ||\n\t\t\ttypeof this.props.nodeInfo.nodeCapacity.cpu !== \"string\"\n\t\t)\n\t\t\treturn false;\n\t\tif (\n\t\t\t!this.props.nodeInfo.nodeCapacity.memory ||\n\t\t\ttypeof this.props.nodeInfo.nodeCapacity.memory !== \"string\"\n\t\t)\n\t\t\treturn false;\n\n\t\tif (\n\t\t\t!this.props.nodeInfo.nodeCapacity.pods ||\n\t\t\ttypeof this.props.nodeInfo.nodeCapacity.pods !== \"string\"\n\t\t)\n\t\t\treturn false;\n\t\tif (\n\t\t\t!this.props.nodeInfo.nodeCapacity[\"ephemeral-storage\"] ||\n\t\t\ttypeof this.props.nodeInfo.nodeCapacity[\"ephemeral-storage\"] !==\n\t\t\t\t\"string\"\n\t\t)\n\t\t\treturn false;\n\n\t\treturn true;\n\t}", "function normalizeProps (options) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if ('production' !== 'production') {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n }\n options.props = res;\n}", "function props(o) {\n var result = \"\"\n var a=new Array();\n var i=0\n for (var prop in o) {\n a[i]= prop + \"\\t\"; // + \" = \" + o[prop]\n i++;\n }\n a.sort();\n return a;\n}", "function normalizeProps(options) {\n\t var props = options.props;\n\t if (!props) {\n\t return;\n\t }\n\t var res = {};\n\t var i, val, name;\n\t if (Array.isArray(props)) {\n\t i = props.length;\n\t while (i--) {\n\t val = props[i];\n\t if (typeof val === 'string') {\n\t name = camelize(val);\n\t res[name] = { type: null };\n\t } else if (process.env.NODE_ENV !== 'production') {\n\t warn('props must be strings when using array syntax.');\n\t }\n\t }\n\t } else if (isPlainObject(props)) {\n\t for (var key in props) {\n\t val = props[key];\n\t name = camelize(key);\n\t res[name] = isPlainObject(val) ? val : { type: val };\n\t }\n\t }\n\t options.props = res;\n\t}", "function normalizeProps(options) {\n\t var props = options.props;\n\t if (!props) {\n\t return;\n\t }\n\t var res = {};\n\t var i, val, name;\n\t if (Array.isArray(props)) {\n\t i = props.length;\n\t while (i--) {\n\t val = props[i];\n\t if (typeof val === 'string') {\n\t name = camelize(val);\n\t res[name] = { type: null };\n\t } else if (process.env.NODE_ENV !== 'production') {\n\t warn('props must be strings when using array syntax.');\n\t }\n\t }\n\t } else if (isPlainObject(props)) {\n\t for (var key in props) {\n\t val = props[key];\n\t name = camelize(key);\n\t res[name] = isPlainObject(val) ? val : { type: val };\n\t }\n\t }\n\t options.props = res;\n\t}", "function normalizeProps(options) {\n\t var props = options.props;\n\t if (!props) {\n\t return;\n\t }\n\t var res = {};\n\t var i, val, name;\n\t if (Array.isArray(props)) {\n\t i = props.length;\n\t while (i--) {\n\t val = props[i];\n\t if (typeof val === 'string') {\n\t name = camelize(val);\n\t res[name] = { type: null };\n\t } else if (process.env.NODE_ENV !== 'production') {\n\t warn('props must be strings when using array syntax.');\n\t }\n\t }\n\t } else if (isPlainObject(props)) {\n\t for (var key in props) {\n\t val = props[key];\n\t name = camelize(key);\n\t res[name] = isPlainObject(val) ? val : { type: val };\n\t }\n\t }\n\t options.props = res;\n\t}", "function normalizeProps(options, vm) {\n var props = options.props;\n if (!props) {\n return;\n }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val) ? val : { type: val };\n }\n } else {\n warn(\"Invalid value for option \\\"props\\\": expected an Array or an Object, \" + \"but got \" + toRawType(props) + \".\", vm);\n }\n options.props = res;\n }", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (process.env.NODE_ENV !== 'production') {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (process.env.NODE_ENV !== 'production') {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}" ]
[ "0.59689367", "0.58157927", "0.5705963", "0.56940496", "0.56593007", "0.56593007", "0.5583846", "0.55661565", "0.55661565", "0.55661565", "0.55661565", "0.55446625", "0.54885584", "0.54885584", "0.54128736", "0.54128736", "0.54128736", "0.54128736", "0.54128736", "0.5386847", "0.5386847", "0.5369041", "0.5354224", "0.5354224", "0.5326453", "0.53120965", "0.53101516", "0.5302965", "0.5302965", "0.5302965", "0.5302965", "0.5302965", "0.5302965", "0.52985865", "0.52922815", "0.5267895", "0.52502537", "0.52502537", "0.5243947", "0.52438444", "0.523819", "0.522081", "0.52081215", "0.5206886", "0.5206886", "0.51924574", "0.5190205", "0.5190205", "0.51850975", "0.5182873", "0.5174817", "0.51698667", "0.51698667", "0.51698667", "0.51698667", "0.51617974", "0.51617974", "0.51617974", "0.51617974", "0.51617974", "0.51617974", "0.51617974", "0.51617974", "0.51553243", "0.5152458", "0.5152458", "0.5152458", "0.5152458", "0.51523364", "0.5151931", "0.51448524", "0.51448524", "0.51448524", "0.5141448", "0.51392436", "0.51312184", "0.51312184", "0.51312184", "0.51312184", "0.51312184", "0.51312184", "0.51263785", "0.51263785", "0.5126275", "0.5124616", "0.51218426", "0.5119065", "0.5119065", "0.5119065", "0.5119065", "0.5119065", "0.5119065", "0.5119065", "0.5109923", "0.5108746", "0.5107569", "0.51057315", "0.51057315", "0.51057315", "0.51055276", "0.51053184" ]
0.0
-1
TODO: more DRY and optimized
function buildDateEnv$1(settings) { var locale = buildLocale(settings.locale || 'en', parseRawLocales([]).map); // TODO: don't hardcode 'en' everywhere // ensure required settings settings = __assign({ timeZone: globalDefaults.timeZone, calendarSystem: 'gregory' }, settings, { locale: locale }); return new DateEnv(settings); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "private public function m246() {}", "protected internal function m252() {}", "transient private protected internal function m182() {}", "obtain(){}", "static private internal function m121() {}", "transient protected internal function m189() {}", "transient final protected internal function m174() {}", "transient private internal function m185() {}", "static private protected internal function m118() {}", "static final private internal function m106() {}", "static transient final private internal function m43() {}", "static transient final protected internal function m47() {}", "transient final private protected internal function m167() {}", "static transient private protected internal function m55() {}", "function _____SHARED_functions_____(){}", "transient final private internal function m170() {}", "transient private protected public internal function m181() {}", "__previnit(){}", "static transient final protected public internal function m46() {}", "prepare() {}", "static transient final private protected internal function m40() {}", "_firstRendered() { }", "static final private protected internal function m103() {}", "getResult() {}", "apply () {}", "static transient private protected public internal function m54() {}", "function AeUtil() {}", "function DWRUtil() { }", "function customHandling() { }", "transient private public function m183() {}", "static protected internal function m125() {}", "function Utils() {}", "function Utils() {}", "static private protected public internal function m117() {}", "function comportement (){\n\t }", "static transient private internal function m58() {}", "static transient private public function m56() {}", "static transform() {}", "function PathSearchResultCollector() {\n\n}", "static rendered () {}", "static rendered () {}", "getImages() {\n let data = '';\n if (this.props.currentEditor === editorsIds.AFFILIATE_CHANNELS) {\n data = this.props.data[editorsIds.AFFILIATES][this.props.currentAffiliate];\n return {\n coverImg: data ? data.coverImg : '',\n logoImg: data ? data.logoImg : '',\n };\n } else if (this.props.currentEditor === editorsIds.AFFILIATE_CHAT) {\n data = this.props.affiliateIds[0] ?\n this.props.data[editorsIds.AFFILIATES][this.props.affiliateIds[0]] : null;\n return {\n coverImg: data ? data.coverImg : '',\n logoImg: data ? data.logoImg : '',\n };\n }\n return {\n coverImg: this.props.data.coverImg,\n logoImg: this.props.data.logoImg,\n };\n }", "function Utils(){}", "function SeleneseMapper() {\n}", "static transient final protected function m44() {}", "transient final private protected public internal function m166() {}", "function ea(){}", "_applyInstanceProperties(){// Use forEach so this works even if for/of loops are compiled to for loops\n// expecting arrays\n// tslint:disable-next-line:no-any\nthis._instanceProperties.forEach((v,p)=>this[p]=v);this._instanceProperties=undefined;}", "build_paths() {\n return {\n items: {\n list: { // Returns a list of items\n method: \"GET\",\n path: \"items\", \n }, \n item: { // Returns a single item with ID %%\n method: \"GET\",\n path: \"items/%%\"\n }, \n item_metadata: { // Returns metadata for item %%\n method: \"GET\",\n path: \"items/%%/metadata\", \n }, \n item_bitstreams: { // Returns available bitstreams for item %%\n method: \"GET\",\n path: \"items/%%/bitstreams\" \n },\n find_by_metadata: { // Returns items based on specified metadata value\n method: \"POST\",\n path: \"items/find-by-metadata-field\"\n } \n },\n query: { \n filtered_items: { // Returns items based on chosen filters\n method: \"GET\",\n path: \"filtered-items\", \n }, \n filtered_collections: { // Returns collections based on chosen filters\n method: \"GET\",\n path: \"filtered-collections\",\n }, \n collection: { // Returns collection with ID %%\n method: \"GET\",\n path: \"filtered-collections/%%\",\n } \n },\n bitstreams: { \n list: { // Returns all bitstreams in DSpace\n method: \"GET\",\n path: \"bitsreams\"\n },\n item: { // Returns an item with bitstream ID %%\n method: \"GET\",\n path: \"bitstreams/{%%}\"\n },\n item_policy: { // Returns the policy for a bitstream with ID %%\n method: \"GET\",\n path: \"bitstreams/%%/policy\"\n },\n content: { // Retrieve content for a bitstream with ID %%\n method: \"GET\",\n path: \"bitstreams/%%/retrieve\"\n }\n },\n schemas: {\n list: { // Returns a list of all schemas\n method: \"GET\",\n path: \"registries/schema\"\n },\n item: { // Returns a metadata schema with schema prefix %%\n method: \"GET\",\n path: \"registries/schema/%%\"\n },\n field: { // Returns a metadata schema with field ID %%\n method: \"GET\",\n path: \"registries/metadata-fields/%%\"\n }\n }\n };\n }", "build_paths() {\n return {\n items: {\n list: { // Returns a list of items\n method: \"GET\",\n path: \"[path]\", \n }, \n item: { // Returns a single item with ID %%\n method: \"GET\",\n path: \"[path]/%%\"\n }, \n item_metadata: { // Returns metadata for item %%\n method: \"GET\",\n path: \"[path]/%%/[key]\", \n }, \n find_by_metadata: { // Returns items based on specified metadata value\n method: \"POST\",\n path: \"[path]\"\n } \n },\n query: { \n filtered_items: { // Returns items based on chosen filters\n method: \"GET\",\n path: \"[path]\", \n }, \n filtered_collections: { // Returns collections based on chosen filters\n method: \"GET\",\n path: \"[path]\",\n }, \n collection: { // Returns collection with ID %%\n method: \"GET\",\n path: \"[path]/%%\",\n } \n }\n };\n }", "static transient final private public function m41() {}", "constructur() {}", "getDataFromId(results) {\n const pageId = this.props.propData.match.params.id;\n results.forEach(result => {\n if (result.sys.id === pageId) {\n\n let bodyHtml = this.convertMarkdownToHtml(result.fields.body);\n\n this.setState({\n headPhoto: result.fields.headPhoto.fields.file.url,\n additionalPhotos: result.fields.additionalPhotos,\n title: result.fields.title,\n body: bodyHtml,\n reverbLink: result.fields.reverbLink,\n youtubeEmbedLink: result.fields.youtubeEmbedLink,\n paypalLink: result.fields.paypalNumber\n });\n }\n });\n }", "static final private public function m104() {}", "function MatchData() {}", "build () {}", "static final private protected public internal function m102() {}", "static transient final private protected public internal function m39() {}", "function miFuncion (){}", "function fm(){}", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "function find() {}", "add(...args){ \n // value.constuctor.name; - return Class name \"Track,Artist,Album\";\n // value.name - return class.name \"Linkin park exemple\";\n // IF :for classes! if one value - this CLASS. if more value: first - Class, nexts - parameters this Class;\n //ELSE: For class parameters. If we have more then one parameters = > [new Class,...parametrs for this class ];\n let myArguments = [];\n myArguments.push(...args); \n // TRACK \n if(myArguments[0].constructor.name === \"Track\"){\n if(myArguments.length === 1){\n this.Track.push(myArguments[0]); \n }\n //FOR TRACK WE DON'T HAVE NECESSARY ADD ADDITIONAL PARAMETERS. IT'S NOT LOGICAL\n else{ return \"Pls using update for Track.\" } \n };\n\n // ALBUM\n if(myArguments[0].constructor.name === \"Album\"){\n if(myArguments.length === 1){\n this.Album.push(myArguments[0]);\n }\n else{\n this.Album.forEach(element => {\n if(element === myArguments[0]){\n for(let i = 1; i < myArguments.length; i++){\n if(Array.isArray(myArguments[i])){\n if(myArguments[i][i-1].constructor.name === \"Track\" ){ \n element.traks = element.traks.concat(myArguments[i]);\n } \n }\n if(myArguments[i].constructor.name === \"Track\"){\n element.traks.push(myArguments[i]);\n } \n }\n } \n });\n } \n };\n //ARTIST\n if(myArguments[0].constructor.name === \"Artist\"){\n if(myArguments.length === 1){\n this.Artist.push(myArguments[0]);\n }\n else{\n this.Artist.forEach(element => {\n if(element === myArguments[0]){\n for(let i = 1; i < myArguments.length; i++){\n if(Array.isArray(myArguments[i])){\n if(myArguments[i][i-1].constructor.name === \"Track\" ){ \n element.traks = element.traks.concat(myArguments[i]);\n }\n if(myArguments[i][i-1].constructor.name === \"Album\"){\n element.albums = element.albums.concat(myArguments[i]);\n } \n }\n if(myArguments[i].constructor.name === \"Track\"){\n element.traks.push(myArguments[i]);\n }\n if(myArguments[i].constructor.name === \"Album\"){\n element.albums.push(myArguments[i]);\n }\n \n }\n } \n });\n } \n }; \n }", "function Helper() {}" ]
[ "0.6013705", "0.5974352", "0.58496135", "0.5534971", "0.54541767", "0.54532677", "0.5404893", "0.5324127", "0.53050864", "0.5216274", "0.5194364", "0.5120933", "0.50673854", "0.5006476", "0.49746144", "0.4956971", "0.49246246", "0.49142396", "0.4887098", "0.48696885", "0.4855188", "0.48469985", "0.4798815", "0.47986475", "0.47913143", "0.47545227", "0.47428206", "0.47279364", "0.47196037", "0.47066665", "0.47039825", "0.46645358", "0.46550587", "0.46550587", "0.4634723", "0.46304524", "0.4627598", "0.46176884", "0.45978105", "0.45888114", "0.45689717", "0.45689717", "0.45580426", "0.45479313", "0.45286313", "0.45266804", "0.4515627", "0.45130548", "0.45097592", "0.4502726", "0.4502348", "0.44953787", "0.4495265", "0.4492649", "0.4490802", "0.4490185", "0.44873604", "0.44858098", "0.44827768", "0.4478552", "0.44743904", "0.44556245", "0.44556245", "0.44556245", "0.44556245", "0.44556245", "0.44556245", "0.44556245", "0.44556245", "0.44556245", "0.44556245", "0.44556245", "0.44556245", "0.44556245", "0.44556245", "0.44556245", "0.44556245", "0.44556245", "0.44556245", "0.44556245", "0.44556245", "0.44556245", "0.44556245", "0.44556245", "0.44556245", "0.44556245", "0.44556245", "0.44556245", "0.44556245", "0.44556245", "0.44556245", "0.44556245", "0.44556245", "0.44556245", "0.44556245", "0.44556245", "0.44556245", "0.44556245", "0.44545484", "0.44493657", "0.44366792" ]
0.0
-1
Computes a default column header formatting string if `colFormat` is not explicitly defined
function computeFallbackHeaderFormat(datesRepDistinctDays, dayCnt) { // if more than one week row, or if there are a lot of columns with not much space, // put just the day numbers will be in each cell if (!datesRepDistinctDays || dayCnt > 10) { return { weekday: 'short' }; // "Sat" } else if (dayCnt > 1) { return { weekday: 'short', month: 'numeric', day: 'numeric', omitCommas: true }; // "Sat 11/12" } else { return { weekday: 'long' }; // "Saturday" } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_createDefaultHeaderText() {\n const name = this.name;\n if (!name && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getTableTextColumnMissingNameError();\n }\n if (this._options && this._options.defaultHeaderTextTransform) {\n return this._options.defaultHeaderTextTransform(name);\n }\n return name[0].toUpperCase() + name.slice(1);\n }", "function getDefaultFormatter(colName) {\n\t\treturn function(o) {\n\t\t\treturn o[colName];\n\t\t};\n\t}", "_get_header_formatter() { return \"to_hex\" }", "function formatColumns(colName) {\n var colNm = colName.replace(/ /g,'');\n return colNm.replace(/\\./g,'');\n}", "function formatColumns(colName) {\n\tvar colNm = colName.replace(/ /g,'');\n\treturn colNm.replace(/\\./g,'');\n}", "function MatSortHeaderColumnDef() {}", "function getHeaderClass(table, column) {\n\n // Default class\n var cls = column.cls || '';\n // Sortable\n cls += column.sortable === false ? '' : 'sortable';\n\n if (table.view && table.view.sort && (table.view.sort[column.name] || table.view.sort[column.sort])) {\n cls += ' sorted-' + (table.view.sort[column.sort] || table.view.sort[column.name]);\n } else {\n // Leave as is\n }\n return cls;\n\n}", "function computeFallbackHeaderFormat(datesRepDistinctDays, dayCnt) {\n // if more than one week row, or if there are a lot of columns with not much space,\n // put just the day numbers will be in each cell\n if (!datesRepDistinctDays || dayCnt > 10) {\n return createFormatter({ weekday: 'short' }); // \"Sat\"\n }\n if (dayCnt > 1) {\n return createFormatter({ weekday: 'short', month: 'numeric', day: 'numeric', omitCommas: true }); // \"Sat 11/12\"\n }\n return createFormatter({ weekday: 'long' }); // \"Saturday\"\n }", "function prettyColumnHeading(propName) {\n\n if (propName.length === 0) {\n return \"\";\n }\n\n // studentId --> Student Id\n // capitalize first letter\n var newHdg = propName.charAt(0).toUpperCase();\n // iterate through all characters, inserting space before any capital letters.\n for (var i = 1; i < propName.length; i++) {\n if (propName.charAt(i) < \"a\") {\n newHdg += \" \";\n }\n newHdg += propName.charAt(i);\n }\n\n return newHdg;\n } // prettyColumnHeading", "appendColHeader(col, TH) {\n if (TH.firstChild) {\n const container = TH.firstChild;\n\n if (hasClass(container, 'relative')) {\n this.updateCellHeader(container.querySelector('.colHeader'), col, this.instance.getColHeader);\n } else {\n empty(TH);\n this.appendColHeader(col, TH);\n }\n\n } else {\n const { rootDocument } = this.instance;\n const div = rootDocument.createElement('div');\n const span = rootDocument.createElement('span');\n\n div.className = 'relative';\n span.className = 'colHeader';\n this.updateCellHeader(span, col, this.instance.getColHeader);\n\n div.appendChild(span);\n TH.appendChild(div);\n }\n\n this.instance.runHooks('afterGetColHeader', col, TH);\n }", "function computeFallbackHeaderFormat(datesRepDistinctDays, dayCnt) {\n // if more than one week row, or if there are a lot of columns with not much space,\n // put just the day numbers will be in each cell\n if (!datesRepDistinctDays || dayCnt > 10) {\n return {\n weekday: 'short'\n }; // \"Sat\"\n } else if (dayCnt > 1) {\n return {\n weekday: 'short',\n month: 'numeric',\n day: 'numeric',\n omitCommas: true\n }; // \"Sat 11/12\"\n } else {\n return {\n weekday: 'long'\n }; // \"Saturday\"\n }\n }", "_configureColumnHeader (column) {\n if (column.action) {\n return column.title;\n }\n var result = [];\n /*var filterView;\n for (var type in this.dataTypeToFilterTypeMapping) {\n if (type === column.dataType) {\n filterView = this.dataTypeToFilterTypeMapping[type];\n }\n }*/\n\n /*if (column.groupText) {\n result[0] = { content:\"columnGroup\", closed:true, batch: column.batch, groupText: column.groupText, colspan:12};\n }*/\n result[result.length] = column.title;\n\n return result;\n }", "function getNewColDefs() {\n return [\n {headerName: \"Id\", field: \"id\", width: 50, filter: 'number'},\n {headerName: \"Interaction Type\", field: \"intType\", width: 150},\n {headerName: \"Int Tags\", field: \"intTag\", width: 100},\n {headerName: \"Note\", field: \"note\", width: 150, filter: 'text'},\n {headerName: \"Subject Kingdom\", field: \"subjKngdm\", width: 150},\n {headerName: \"Subject Taxon\", field: \"subjTaxon\", width: 200, filter: 'text'},\n {headerName: \"Object Kingdom\", field: \"objKngdm\", width: 150},\n {headerName: \"Object Taxon\", field: \"objTaxon\", width: 200, filter: 'text'},\n {headerName: \"Habitat Type\", field: \"habType\", width: 150},\n {headerName: \"Region\", field: \"region\", width: 150},\n {headerName: \"Country\", field: \"country\", width: 150},\n {headerName: \"Location Description\", field: \"locDesc\", width: 150, filter: 'text'},\n {headerName: \"Latitude\", field: \"lat\", width: 100, filter: 'number'},\n {headerName: \"Longitude\", field: \"long\", width: 100, filter: 'number'},\n {headerName: \"Elevation\", field: \"elev\", width: 100, filter: 'number'},\n {headerName: \"Elev. Max\", field: \"elevRangeMax\", width: 100, filter: 'number'},\n {headerName: \"Citation Short Description\", field: \"citShortDesc\", width: 300, filter: 'text'},\n {headerName: \"Title\", field: \"title\", width: 400, filter: 'text'},\n {headerName: \"Authors\", field: \"authors\", width: 300, filter: 'text'},\n {headerName: \"Publication\", field: \"pubTitle\", width: 500, filter: 'text'},\n {headerName: \"Publisher\", field: \"publisher\", width: 100, filter: 'text'},\n {headerName: \"Type\", field: \"pubType\", width: 100, filter: 'text'},\n {headerName: \"Vol.\", field: \"vol\", width: 50, filter: 'number'},\n {headerName: \"Issue\", field: \"issue\", width: 50, filter: 'number'},\n {headerName: \"Pages\", field: \"pgs\", width: 100, filter: 'number'},\n ];\n }", "function computeFallbackHeaderFormat(datesRepDistinctDays, dayCnt) {\n // if more than one week row, or if there are a lot of columns with not much space,\n // put just the day numbers will be in each cell\n if (!datesRepDistinctDays || dayCnt > 10) {\n return { weekday: 'short' }; // \"Sat\"\n }\n else if (dayCnt > 1) {\n return { weekday: 'short', month: 'numeric', day: 'numeric', omitCommas: true }; // \"Sat 11/12\"\n }\n else {\n return { weekday: 'long' }; // \"Saturday\"\n }\n}", "function defaultHeaderRenderer(_ref) {\n var columnData = _ref.columnData;\n var dataKey = _ref.dataKey;\n var disableSort = _ref.disableSort;\n var label = _ref.label;\n var sortBy = _ref.sortBy;\n var sortDirection = _ref.sortDirection;\n\n var showSortIndicator = sortBy === dataKey;\n var children = [_react2.default.createElement(\n 'span',\n {\n className: 'ReactVirtualized__Table__headerTruncatedText',\n key: 'label',\n title: label\n },\n label\n )];\n\n if (showSortIndicator) {\n children.push(_react2.default.createElement(_SortIndicator2.default, {\n key: 'SortIndicator',\n sortDirection: sortDirection\n }));\n }\n\n return children;\n}", "function contentHeader(format, jsonpCallbackName, ndjson) {\n if(format === 'csv') {\n return 'text/csv; charset=UTF-8';\n }\n else if (jsonpCallbackName) {\n return \"application/javascript; charset=UTF-8\";\n }\n else if (ndjson) {\n return \"application/x-ndjson; charset=UTF-8\";\n }\n else {\n return 'application/json; charset=UTF-8';\n }\n}", "function getHeader(field){\r\n\tvar head='<thead>';\r\n\tfor(var i=1;i<field.length;i++){ \t\r\n\t\thead+='<td class=\"query-header\">'+field[i].column+'</td>'; \t\r\n\t}\r\n\treturn head+'</thead>';\r\n}", "getColProps() {\n const { colProps, tableData, colHeaders } = this.props;\n if (colProps) return colprops;\n\n const headers = Array.isArray(colHeaders)\n ? colHeaders\n : Object.entries(tableData[0]).map(\n header => (Array.isArray(header) ? header[0] : header)\n );\n\n return headers.map(header => ({\n label: header,\n dataKey: header,\n width: 400,\n flexGrow: 1,\n cellRenderer: ({ cellData }) => (\n <Text>{cellData && cellData.toString()}</Text>\n ),\n headerRenderer: ({ label }) => <Text>{label && label.toString()}</Text>,\n }));\n }", "function build_csv_header() {\n\n let ret_string = \"\";\n\n for(let i=0; i<headers.length; i++) {\n ret_string += headers[i]\n\n if (i === headers.length - 1) {\n ret_string += \"\\n\";\n } else {\n ret_string += \",\";\n }\n }\n return ret_string\n }", "columns(defaultCol) {\n\t\treturn (this.width ? this.width : defaultCol);\n\t}", "function getTableHeaders(columns) {\n return [..._.map(columns, 'header'), ''];\n}", "getColProps() {\n const { colProps, tableData, colHeaders } = this.props;\n if (colProps) return colProps;\n\n const headers = Array.isArray(colHeaders)\n ? colHeaders\n : Object.entries(tableData[0]).map(\n header => (Array.isArray(header) ? header[0] : header)\n );\n\n return headers.map(header => ({\n label: header,\n dataKey: header,\n width: 400,\n flexGrow: 1,\n cellRenderer: ({ cellData = '' }) => {\n // wrap strings in text components\n if (typeof cellData === 'string') return <Text>{cellData}</Text>;\n // allow for custom react components to be returned\n return cellData;\n },\n headerRenderer: ({ label }) => <Text>{label && label.toString()}</Text>,\n }));\n }", "function addColumnHeadings(el, header) {\n var headerRow = $('<tr/>').appendTo(header);\n var breakpointsByIdx = [];\n var srcSettings = el.settings.sourceObject.settings;\n var aggInfo = srcSettings.aggregation;\n if (el.settings.autoResponsiveCols) {\n // Build list of breakpoints to use by column position.\n $.each(el.settings.responsiveOptions.breakpoints, function eachPoint(name, point) {\n var i;\n for (i = Math.round(point / 100); i < el.settings.columns.length; i++) {\n while (breakpointsByIdx.length < i + 1) {\n breakpointsByIdx.push([]);\n }\n breakpointsByIdx[i].push(name);\n }\n });\n }\n if (el.settings.responsive) {\n $('<th class=\"footable-toggle-col\" data-sort-ignore=\"true\"></th>').appendTo(headerRow);\n }\n $.each(el.settings.columns, function eachColumn(idx) {\n var colDef = el.settings.availableColumnInfo[this.field];\n var heading = colDef.caption;\n var footableExtras = '';\n var sortableField = false;\n // Tolerate hyphen or camelCase.\n var hideBreakpoints = colDef.hideBreakpoints || colDef['hide-breakpoints'];\n var dataType = colDef.dataType || colDef['data-type'];\n if (srcSettings.mode === 'docs') {\n // Either a standard field, or a special field which provides an\n // associated sort field.\n sortableField = (indiciaData.esMappings[this.field] && indiciaData.esMappings[this.field].sort_field) ||\n indiciaData.fieldConvertorSortFields[this.field.simpleFieldName()];\n } else if (srcSettings.mode === 'compositeAggregation') {\n // CompositeAggregation can sort on any field column, not aggregations.\n sortableField = !(aggInfo[this.field] || this.field === 'doc_count');\n } else if (srcSettings.mode === 'termAggregation') {\n // Term aggregations allow sort on the aggregation cols, or fields if\n // numeric or date, but not normal text fields.\n sortableField = aggInfo[this.field] || this.field === 'doc_count' ||\n (indiciaData.esMappings[this.field] && !indiciaData.esMappings[this.field].type.match(/^(text|keyword)$/));\n }\n if (el.settings.sortable !== false && sortableField) {\n heading += '<span class=\"sort fas fa-sort\"></span>';\n }\n // Extra data attrs to support footable.\n if (el.settings.autoResponsiveCols) {\n footableExtras = ' data-hide=\"' + breakpointsByIdx[idx].join(',') + '\"';\n } else if (hideBreakpoints) {\n footableExtras = ' data-hide=\"' + hideBreakpoints + '\"';\n }\n if (dataType) {\n footableExtras += ' data-type=\"' + dataType + '\"';\n }\n $('<th class=\"col-' + idx + '\" data-field=\"' + this.field + '\"' + footableExtras + '>' + heading + '</th>')\n .appendTo(headerRow);\n });\n if (el.settings.actions.length) {\n $('<th class=\"col-actions\"></th>').appendTo(headerRow);\n }\n if (el.settings.tbodyHasScrollBar) {\n // Spacer in header to allow for scrollbar in body.\n $('<th class=\"scroll-spacer\"></th>').appendTo(headerRow);\n }\n }", "fixHeaderWidths() {\n this.fixCellWidths();\n }", "fixHeaderWidths() {\n this.fixCellWidths();\n }", "function formatHeader(headerLabel)\n{\n function upperToHyphenLower(match)\n {\n return match.toUpperCase();\n }\n return headerLabel.replace(/^.|(\\-.)/g, upperToHyphenLower);\n}", "function default_txt_c( col )\n\n // Set or return default text colour\n //\n // col: Default colour\n{\n if ( typeof col === \"undefined\" ) {\t// No new value provided?\n return dflt_txt_col;\t\t// Return value\n } else {\n dflt_txt_col = col;\t\t\t// Set value\n }\n}\t\t\t\t\t// End function default_txt_c", "getSummaryHeader(){\n\t//=================================\n\t//get contents\n\tvar add_header = Object.keys(this.summaryColumns);\n\t//append the datasource id\n\tadd_header = add_header.map(element => element + \" [\" + this.short_id + \"]\")\n\treturn add_header;\n\t}", "function getFormat(options) {\n return '<% if (date) { %>' + $.gray('${date}') + '<% } %>' +\n options.name + ' ' +\n '<% if (padding) { %>' + $.gray('${padding}') + '<% } %>' +\n (options.message || '${message}') +\n '<% if (debug) { %>' + $.gray('${debug}') + '<% } %>';\n}", "function computeFallbackHeaderFormat$1(datesRepDistinctDays, dayCnt) {\n // if more than one week row, or if there are a lot of columns with not much space,\n // put just the day numbers will be in each cell\n if (!datesRepDistinctDays || dayCnt > 10) {\n return { weekday: 'short' }; // \"Sat\"\n }\n else if (dayCnt > 1) {\n return { weekday: 'short', month: 'numeric', day: 'numeric', omitCommas: true }; // \"Sat 11/12\"\n }\n else {\n return { weekday: 'long' }; // \"Saturday\"\n }\n }", "function printRowSepAscii(header, noSep) {\n var out = \"+\";\n Object.keys(header).forEach(function(field) {\n var width = header[field];\n out += new Array(width + 3).join(\"-\");\n out += noSep ? \"-\" : \"+\";\n });\n out = noSep ? out.substring(0, out.length - 1) + \"+\" : out;\n print(out);\n }", "function buildHeader(rowData) {\n var cells = [];\n for (var key in rowData) {\n if (key != \"DataCmd\" && key != \"DataId\" && key != \"DataHash\" && key != \"DataParam\")\n cells.push(\"number\" == typeof(key) ? rowData[key] : key);\n }\n return tableGen.headerRow(cells);\n}", "function summaryTableHeader(header) {\r\n var newRow = header.insertRow(-1);\r\n newRow.className = \"tablesorter-no-sort\";\r\n var cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 1;\r\n cell.innerHTML = \"Requests\";\r\n newRow.appendChild(cell);\r\n\r\n cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 3;\r\n cell.innerHTML = \"Executions\";\r\n newRow.appendChild(cell);\r\n\r\n cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 7;\r\n cell.innerHTML = \"Response Times (ms)\";\r\n newRow.appendChild(cell);\r\n\r\n cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 1;\r\n cell.innerHTML = \"Throughput\";\r\n newRow.appendChild(cell);\r\n\r\n cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 2;\r\n cell.innerHTML = \"Network (KB/sec)\";\r\n newRow.appendChild(cell);\r\n}", "function summaryTableHeader(header) {\r\n var newRow = header.insertRow(-1);\r\n newRow.className = \"tablesorter-no-sort\";\r\n var cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 1;\r\n cell.innerHTML = \"Requests\";\r\n newRow.appendChild(cell);\r\n\r\n cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 3;\r\n cell.innerHTML = \"Executions\";\r\n newRow.appendChild(cell);\r\n\r\n cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 7;\r\n cell.innerHTML = \"Response Times (ms)\";\r\n newRow.appendChild(cell);\r\n\r\n cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 1;\r\n cell.innerHTML = \"Throughput\";\r\n newRow.appendChild(cell);\r\n\r\n cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 2;\r\n cell.innerHTML = \"Network (KB/sec)\";\r\n newRow.appendChild(cell);\r\n}", "function summaryTableHeader(header) {\r\n var newRow = header.insertRow(-1);\r\n newRow.className = \"tablesorter-no-sort\";\r\n var cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 1;\r\n cell.innerHTML = \"Requests\";\r\n newRow.appendChild(cell);\r\n\r\n cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 3;\r\n cell.innerHTML = \"Executions\";\r\n newRow.appendChild(cell);\r\n\r\n cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 7;\r\n cell.innerHTML = \"Response Times (ms)\";\r\n newRow.appendChild(cell);\r\n\r\n cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 1;\r\n cell.innerHTML = \"Throughput\";\r\n newRow.appendChild(cell);\r\n\r\n cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 2;\r\n cell.innerHTML = \"Network (KB/sec)\";\r\n newRow.appendChild(cell);\r\n}", "function summaryTableHeader(header) {\r\n var newRow = header.insertRow(-1);\r\n newRow.className = \"tablesorter-no-sort\";\r\n var cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 1;\r\n cell.innerHTML = \"Requests\";\r\n newRow.appendChild(cell);\r\n\r\n cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 3;\r\n cell.innerHTML = \"Executions\";\r\n newRow.appendChild(cell);\r\n\r\n cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 6;\r\n cell.innerHTML = \"Response Times (ms)\";\r\n newRow.appendChild(cell);\r\n\r\n cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 1;\r\n cell.innerHTML = \"Throughput\";\r\n newRow.appendChild(cell);\r\n\r\n cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 2;\r\n cell.innerHTML = \"Network (KB/sec)\";\r\n newRow.appendChild(cell);\r\n}", "function change_col_headers(){\r\n\t//col headers row\r\n\tdetails_td = header_tr.getElementsByTagName(\"td\")[0]; \r\n\tdetails_td.innerHTML = '<font size=\\'2\\' color=\"#FFFFFF\" face=\"Arial\"><b>Detail</b></font>';\r\n\r\n\tvisit_td = header_tr.getElementsByTagName(\"td\")[2]; \r\n\tvisit_td.innerHTML = '<font size=\\'2\\' color=\"#FFFFFF\" face=\"Arial\"><b>Visit Time</b></font>';\r\n\t//set colspan to 1 as we are removing the date column\r\n\tvisit_td.setAttribute(\"colspan\", \"1\");\r\n\r\n\tpages_td = header_tr.getElementsByTagName(\"td\")[3]; \r\n\tpages_td.innerHTML = '<font size=\\'2\\' color=\"#FFFFFF\" face=\"Arial\"><b>Pages</b></font>';\r\n\r\n\tlength_td = header_tr.getElementsByTagName(\"td\")[4]; \r\n\tlength_td.innerHTML = '<font size=\\'2\\' color=\"#FFFFFF\" face=\"Arial\"><b>Length</b></font>';\r\n}", "function subHeader(schema, concat) {\n colspan = Object.keys(schema.tree).reduce(function(memo, key){\n return memo+addToHeader(key, path+concat+key, schema.tree[key], level+1)\n }, 0);\n if (typeof schema.options.strict === 'boolean' && !schema.options.strict) {\n colspan += 1;\n // add special column for mixed objects\n headers[level+1].push({name: name+concat+'*', colspan: 1, nested:false, path: name+concat+'*'})\n }\n nested = true;\n return colspan;\n }", "function printRowSepUnicode(header, noSep, rowStyle) {\n var out = rowStyle === \"bottom\" ? \"╚\" : \"╟\";\n Object.keys(header).forEach(function(field) {\n var width = header[field];\n var joinChar = rowStyle === \"bottom\" ? \"═\" : \"─\";\n out += new Array(width + 3).join(joinChar);\n var sep = rowStyle === \"bottom\" ? \"╧\" : \"┼\";\n out += noSep ? \"─\" : sep;\n });\n out = out.substring(0, out.length - 1);\n out += rowStyle === \"bottom\" ? \"╝\" : \"╢\";\n print(out);\n }", "function columnate(...columnGroupOpts) {\n const columnGroups = columnGroupOpts.map(([label, list]) => ({\n label,\n width: 0,\n list: list.reverse(),\n columns: [],\n }))\n\n while (!columnGroups.every(group => !group.list.length)) {\n columnGroups.forEach(group => {\n while (group.list.length) {\n const column = {\n width: 0,\n rows: [],\n }\n group.columns.push(column)\n\n // HEADER + SPACE\n for (let rowIndex = 0; rowIndex < tableHeight - 1 - PADDING_V; rowIndex++) {\n if (!group.list.length) break\n const item = group.list.pop()\n column.rows.push(item)\n if (item.length > column.width) column.width = item.length\n }\n\n group.width += column.width + PADDING_H\n }\n })\n }\n\n // print headers\n columnGroups.forEach(group => {\n // if label is wider than all this group's columns, add some space to the last column\n const labelOverhang = group.label.length + PADDING_H - group.width\n if (labelOverhang > 0) {\n group.width += labelOverhang\n group.columns[group.columns.length - 1].width += labelOverhang\n }\n\n // print label\n process.stdout.write(group.label)\n let remainingSpace = group.width - group.label.length\n while (remainingSpace-- > 0) process.stdout.write(' ')\n })\n const headerHeight = PADDING_V + 1\n for (let i = 0; i < headerHeight; i++) process.stdout.write('\\n')\n\n // print content\n for (let rowIndex = 0; rowIndex < tableHeight - headerHeight; rowIndex++) {\n columnGroups.forEach(group => group.columns.forEach((column, columnIndex) => {\n let remainingSpace = column.width + PADDING_H\n const cell = column.rows[rowIndex]\n if (cell) {\n process.stdout.write(cell || '')\n remainingSpace -= cell.length\n }\n while (remainingSpace-- > 0) process.stdout.write(' ')\n }))\n process.stdout.write('\\n')\n }\n}", "function makeFMT(name) {\n return name + \" \" + name + \".\";\n }", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 6;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 6;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 6;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 6;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 6;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 6;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 6;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 6;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 6;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 6;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 6;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 6;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 6;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 6;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 6;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function buildHeaders(component) {\n var headerColumns = component.state.columnDefs.map(function (columnDef) {\n var styles = {\n \"text-align\": (columnDef.format == 'number') ? \"right\" : \"left\"\n };\n return (\n\n <th style={styles} key={columnDef.colTag}>\n <a className=\"btn-link\" onClick={component.handleSort.bind(component, columnDef)}>{columnDef.text}</a>\n <a className=\"btn-link\" onClick={component.handleRemove.bind(component, columnDef)}>\n <span className=\"pull-right glyphicon glyphicon-remove\"></span>\n </a>\n </th>\n\n );\n });\n return (\n <thead>\n <tr>{headerColumns}</tr>\n </thead>\n );\n}", "function writeTableHeader() {\n // noinspection HtmlDeprecatedAttribute\n $('#tableData').html(String.format('<table id=\"mainTable\" class=\"display\" width=\"100%\" cellspacing=\"0\"><thead><tr><th>{0}</th><th>{1}</th><th>{2}</th><th>{3}</th><th>{4}</th><th>{5}</th></tr></thead><tfoot><tr><th>{0}</th><th>{1}</th><th>{2}</th><th>{3}</th><th>{4}</th><th>{5}</th></tr></tfoot><tbody id=\"tableMem\"></tbody></table>', tableDataNameCols[0], tableDataNameCols[1], tableDataNameCols[2], tableDataNameCols[3], tableDataNameCols[4], tableDataNameCols[5]));\n}", "function formatTableAsCsv(tbl, startCol) {\r\n var rowCount = tbl.rows.length;\r\n var vCSVTxt = \"\";\r\n if (startCol == null) {\r\n startCol = 0;\r\n }\r\n for (var i = 1; i < rowCount; i++) {\r\n var rowCells = getCellsInRow(tbl.rows(i));\r\n for (var j = 0; j < exportVisibleColumnIds.length; j++) {\r\n if (j > 0) {\r\n vCSVTxt += \",\";\r\n }\r\n vCSVTxt += generateTableCellData(rowCells, exportVisibleColumnIds[j]);\r\n }\r\n if (isFullyExport) {\r\n for (var k = 0; k < exportHideColumnIds.length; k++) {\r\n vCSVTxt += \",\";\r\n vCSVTxt += generateTableCellData(rowCells, exportHideColumnIds[k]);\r\n }\r\n }\r\n vCSVTxt += \"\\n\";\r\n }\r\n return vCSVTxt;\r\n}", "function standardizeCols(columns) {\n\n\t/**\n\t * Gets the default column name\n\t */\n\tfunction getDefaultFormatter(colName) {\n\t\treturn function(o) {\n\t\t\treturn o[colName];\n\t\t};\n\t}\n\n\t/**\n\t * Gets the default column sorter\n\t */\n\tfunction getDefaultSorter(colName) {\n\t\treturn function(a, b, dir){\n\n\t\t\tvar \n\t\t\t\tfirstRec = dir == 'asc' ? a : b,\n\t\t\t\tsecondRec = dir == 'asc' ? b : a,\n\n\t\t\t\tfA = firstRec[colName].toLowerCase(),\n\t\t\t\tfB = secondRec[colName].toLowerCase();\n\n\t\t\t// Handle numbers\n\t\t\tif (fA<fB) return -1\n\t\t\tif (fA>fB) return +1\n\t\t\treturn 0\n\t\t};\n\t}\n\n\n\tfor (var i in columns) {\n\t\tvar column = columns[i];\n\n\t\tif (typeof column == \"string\") {\n\t\t\tcolumn = {name: column};\n\t\t}\n\n\t\tcolumn.dir = column.sortDir || 'asc';\n\t\tcolumn.formatter = column.formatter || getDefaultFormatter(column.key || column.name);\n\t\tcolumn.sorter = column.sorter || getDefaultSorter(column.key || column.name);\n\n\t\tcolumns[i] = column;\n\t}\n\treturn columns;\n}", "renderHeader() {\r\n const hasCustomColumnsWidth = this.columnsWidth.length > 0;\r\n const dataColumns = this.getVisibleColumns().map((column) => {\r\n // filter\r\n let filter = null;\r\n if (this.showFilters) {\r\n let filterValue = '';\r\n if (this.filters && this.filters[column.name]) {\r\n filterValue = this.filters[column.name];\r\n }\r\n filter = (h(\"div\", null,\r\n h(\"kup-text-input\", { class: \"datatable-filter\", initialValue: filterValue, \"data-col\": column.name, onKetchupTextInputUpdated: (e) => {\r\n this.onFilterChange(e, column.name);\r\n } })));\r\n }\r\n // sort\r\n let sort = null;\r\n if (this.sortEnabled) {\r\n sort = (h(\"span\", { class: \"column-sort\" },\r\n h(\"span\", { role: \"button\", \"aria-label\": \"Sort column\" // TODO\r\n , class: 'mdi ' + this.getSortIcon(column.name), onClick: (e) => this.onColumnSort(e, column.name) })));\r\n }\r\n let thStyle = null;\r\n if (hasCustomColumnsWidth) {\r\n for (let i = 0; i < this.columnsWidth.length; i++) {\r\n const currentCol = this.columnsWidth[i];\r\n if (currentCol.column === column.name) {\r\n const width = currentCol.width.toString() + 'px';\r\n thStyle = {\r\n width,\r\n minWidth: width,\r\n maxWidth: width,\r\n };\r\n break;\r\n }\r\n }\r\n }\r\n const columnMenuItems = [];\r\n // adding grouping\r\n const group = this.getGroupByName(column.name);\r\n const groupLabel = group != null\r\n ? 'Disattiva raggruppamento'\r\n : 'Attiva raggruppamento';\r\n columnMenuItems.push(h(\"li\", { role: \"menuitem\", onClick: () => this.switchColumnGroup(group, column.name) },\r\n h(\"span\", { class: \"mdi mdi-book\" }),\r\n groupLabel));\r\n columnMenuItems.push(h(\"li\", { role: \"menuitem\", onClick: () => this.kupAddColumn.emit({ column: column.name }) },\r\n h(\"span\", { class: \"mdi mdi-table-column-plus-after\" }),\r\n \"Aggiungi colonna\"));\r\n let columnMenu = null;\r\n if (columnMenuItems.length !== 0) {\r\n const menuClass = this.openedMenu === column.name ? 'open' : 'closed';\r\n columnMenu = (h(\"div\", { class: `column-menu ${menuClass}` },\r\n h(\"ul\", { role: \"menubar\" }, columnMenuItems)));\r\n }\r\n // Check if columns are droppable and sets their handlers\r\n // TODO set better typing.\r\n let dragHandlers = {};\r\n if (this.enableSortableColumns) {\r\n // Reference for drag events and what they permit or not\r\n // https://html.spec.whatwg.org/multipage/dnd.html#concept-dnd-p\r\n dragHandlers = {\r\n draggable: true,\r\n onDragStart: (e) => {\r\n // Sets drag data and the type of drag\r\n e.dataTransfer.setData(KupDataTableColumnDragType, JSON.stringify(column));\r\n e.dataTransfer.effectAllowed = 'move';\r\n // Remember that the current target is different from the one print out in the console\r\n // Sets which element has started the drag\r\n e.target.setAttribute(this.dragStarterAttribute, '');\r\n this.theadRef.setAttribute(this.dragFlagAttribute, '');\r\n this.columnsAreBeingDragged = true;\r\n },\r\n onDragLeave: (e) => {\r\n if (e.dataTransfer.types.indexOf(KupDataTableColumnDragType) >= 0) {\r\n e.target.removeAttribute(this.dragOverAttribute);\r\n }\r\n },\r\n onDragOver: (e) => {\r\n if (e.dataTransfer.types.indexOf(KupDataTableColumnDragType) >= 0) {\r\n const overElement = e.target;\r\n overElement.setAttribute(this.dragOverAttribute, '');\r\n // If element can have a drop effect\r\n if (!overElement.hasAttribute(this.dragStarterAttribute) &&\r\n this.columnsAreBeingDragged) {\r\n e.preventDefault(); // Mandatory to allow drop\r\n e.dataTransfer.effectAllowed = 'move';\r\n }\r\n else {\r\n e.dataTransfer.effectAllowed = 'none';\r\n }\r\n }\r\n },\r\n onDragEnd: (e) => {\r\n // When the drag has ended, checks if the element still exists or it was destroyed by the JSX\r\n const dragStarter = e.target;\r\n if (dragStarter) {\r\n // IF it still exists, removes the attribute so that it can perform a new drag again\r\n dragStarter.removeAttribute(this.dragStarterAttribute);\r\n }\r\n this.theadRef.removeAttribute(this.dragFlagAttribute);\r\n this.columnsAreBeingDragged = false;\r\n },\r\n onDrop: (e) => {\r\n if (e.dataTransfer.types.indexOf(KupDataTableColumnDragType) >= 0) {\r\n const transferredData = JSON.parse(e.dataTransfer.getData(KupDataTableColumnDragType));\r\n e.preventDefault();\r\n e.target.removeAttribute(this.dragOverAttribute);\r\n // We are sure the tables have been dropped in a valid location -> starts sorting the columns\r\n this.handleColumnSort(column, transferredData);\r\n }\r\n },\r\n };\r\n }\r\n let columnClass = {};\r\n if (column.obj) {\r\n columnClass = {\r\n number: isNumber(column.obj),\r\n };\r\n }\r\n return (h(\"th\", Object.assign({ class: columnClass, style: thStyle, onMouseEnter: () => this.onColumnMouseEnter(column.name), onMouseLeave: () => this.onColumnMouseLeave(column.name) }, dragHandlers),\r\n h(\"span\", { class: \"column-title\" }, column.title),\r\n sort,\r\n filter,\r\n columnMenu));\r\n });\r\n let multiSelectColumn = null;\r\n if (this.multiSelection) {\r\n const style = {\r\n width: '30px',\r\n margin: '0 auto',\r\n };\r\n multiSelectColumn = (h(\"th\", { style: style },\r\n h(\"input\", { type: \"checkbox\", onChange: (e) => this.onSelectAll(e), title: `selectedRow: ${this.selectedRows.length} - renderedRows: ${this.renderedRows.length}`, checked: this.selectedRows.length > 0 &&\r\n this.selectedRows.length ===\r\n this.renderedRows.length })));\r\n }\r\n let groupColumn = null;\r\n if (this.isGrouping() && this.hasTotals()) {\r\n groupColumn = h(\"th\", null);\r\n }\r\n let actionsColumn = null;\r\n if (this.hasRowActions()) {\r\n actionsColumn = h(\"th\", null);\r\n }\r\n return [multiSelectColumn, groupColumn, actionsColumn, ...dataColumns];\r\n }", "getColumnHeaders(columns) {\n if (!columns || !Array.isArray(columns) || columns.length === 0) {\n return null;\n }\n const columnHeaders = [];\n // Populate the Column Header, pull the name defined\n columns.forEach((columnDef) => {\n let headerTitle = '';\n if ((columnDef.headerKey || columnDef.nameKey) && this._gridOptions.enableTranslate && this.translate && this.translate.currentLang && this.translate.instant) {\n headerTitle = this.translate.instant((columnDef.headerKey || columnDef.nameKey));\n }\n else {\n headerTitle = columnDef.name || titleCase(columnDef.field);\n }\n const skippedField = columnDef.excludeFromExport || false;\n // if column width is 0, then we consider that field as a hidden field and should not be part of the export\n if ((columnDef.width === undefined || columnDef.width > 0) && !skippedField) {\n columnHeaders.push({\n key: columnDef.field || columnDef.id,\n title: headerTitle\n });\n }\n });\n return columnHeaders;\n }", "getColumnHeaders(columns) {\n if (!columns || !Array.isArray(columns) || columns.length === 0) {\n return null;\n }\n const columnHeaders = [];\n // Populate the Column Header, pull the name defined\n columns.forEach((columnDef) => {\n let headerTitle = '';\n if ((columnDef.headerKey || columnDef.nameKey) && this._gridOptions.enableTranslate && this.translate && this.translate.currentLang && this.translate.instant) {\n headerTitle = this.translate.instant((columnDef.headerKey || columnDef.nameKey));\n }\n else {\n headerTitle = columnDef.name || titleCase(columnDef.field);\n }\n const skippedField = columnDef.excludeFromExport || false;\n // if column width is 0, then we consider that field as a hidden field and should not be part of the export\n if ((columnDef.width === undefined || columnDef.width > 0) && !skippedField) {\n columnHeaders.push({\n key: columnDef.field || columnDef.id,\n title: headerTitle\n });\n }\n });\n return columnHeaders;\n }", "buildDataTableHeaderHtml() {\n\t\tgetComponentElementById(this,'DataTableHeaderHtml').html(\n\t\t\t'<th id=\"'+this.getUid()+'_MultiSelectColumn\" class=\"data_table_header\" scope=\"col\">\\n' +\n\t\t\t'<input id=\"'+this.getUid()+'_MultiSelectAll\" type=\"checkbox\" name=\"all\" value=\"all\">\\n' +\n\t\t\t'</th>');\n\n\t\tthis.included_attribute_array.forEach(function(attribute) {\n\t\t\tthis.column_name_obj[attribute] = attribute.replace(/([a-z0-9])([A-Z])/g, '$1 $2');\n\t\t\tgetComponentElementById(this,'DataTableHeaderHtml').append(\n\t\t\t\t'<th id=\"'+this.getUid()+'_SortBy'+attribute+'\" class=\"data_table_header\" scope=\"col\">'+this.column_name_obj[attribute]+'</th>'\n\t\t\t);\n\t\t}.bind(this));\n\t\tthis.included_relationship_array.forEach(function(relationship) {\n\t\t\tthis.column_name_obj[relationship] = relationship.replace(/([a-z0-9])([A-Z])/g, '$1 $2');\n\t\t\tgetComponentElementById(this,'DataTableHeaderHtml').append(\n\t\t\t\t'<th id=\"'+this.getUid()+'_SortBy'+relationship+'\" class=\"data_table_header\" scope=\"col\">'+this.column_name_obj[relationship]+'</th>'\n\t\t\t)\n\t\t}.bind(this));\n\t}", "function createHeader(layout) {\n\n\t\tvar columns = [],\n\t\t\t$thead = $('<thead />');\n\n\t\tlayout.qHyperCube.qDimensionInfo.forEach(function(d) {\n\t\t\tcolumns.push(capitalizeFirstLetter(d.qFallbackTitle));\n\t\t})\n\n\t\tcolumns.push(layout.qHyperCube.qMeasureInfo[0].qFallbackTitle);\n\n\t\tcolumns.forEach(function(d, i) {\n\t\t\tif (i == 1) {\n\t\t\t\t$('<th colspan=\"2\" class=\"col col' + (i + 1) + '\">' + d + '</th>').appendTo($thead);\n\t\t\t} else {\n\t\t\t\t$('<th class=\"col col' + (i + 1) + '\">' + d + '</th>').appendTo($thead);\n\t\t\t}\n\t\t})\n\t\treturn $thead;\n\t}", "function defaultHeaderRenderer(_ref) {\n\t var dataKey = _ref.dataKey,\n\t label = _ref.label,\n\t sortBy = _ref.sortBy,\n\t sortDirection = _ref.sortDirection;\n\n\t var showSortIndicator = sortBy === dataKey;\n\t var children = [React.createElement(\n\t 'span',\n\t {\n\t className: 'ReactVirtualized__Table__headerTruncatedText',\n\t key: 'label',\n\t title: label },\n\t label\n\t )];\n\n\t if (showSortIndicator) {\n\t children.push(React.createElement(_SortIndicator2.default, { key: 'SortIndicator', sortDirection: sortDirection }));\n\t }\n\n\t return children;\n\t}", "function create_thead() {\n var schema = _store.active_columns();\n var total = _store.active_rows()['total'];\n var html = [ '<tr>' ];\n\n // create header\n schema.forEach( function ( column ) {\n html.push( '<td class=\"', column['key'], ' ' );\n html.push( column['type'], '\">' );\n html.push( column['label'] );\n html.push( '</td>' );\n });\n\n html.push( '</tr>' );\n\n // create total row\n if( !!total ) {\n html.push( '<tr style=\"background-color: #3b3b3b\">' );\n\n schema.forEach( function ( column ) {\n html.push( '<td class=\"', column['key'], ' ' );\n html.push( column['type'], '\">' );\n html.push( total['data'][ column['key'] ] );\n html.push( '</td>' );\n });\n\n html.push( '</tr>' );\n }\n $('#data-table > thead').append( html.join('') );\n }", "get defaultColumn() {\r\n if (this.columns.length < 1) {\r\n this.addColumn(12);\r\n }\r\n return this.columns[0];\r\n }", "function setFormat(string,columns,values){\n\tvar rtn = string;\n\tfor (var i = 0; i < columns.length; i++) {\n\t\trtn += \" ?? = ? \";\n\t\tif(i < columns.length - 1){ rtn += \",\"}\n\t}\n\treturn rtn;\n}", "_configureColumnClassCss (value, obj){\n if (obj.checkbox && obj.$group) {\n return 'rowGroupHeaderSelect';\n }\n if (obj.checkbox && !obj.$group) {\n return 'rowSelect';\n }\n if (!obj.checkbox && obj.$group) {\n return 'rowGroupHeader';\n }\n return \"\";\n }", "function GridColumnsDefaultFormatForQuotationTask(grid,gridColKey)\r\n{\r\n\twith (grid) {\r\n\t ColWidth(ColIndex(gridColKey.QuotationButtonA)) = 600;\r\n\t ColWidth(ColIndex(gridColKey.QuotationButtonB)) = 600;\r\n\t ColWidth(ColIndex(gridColKey.QuotationButtonC)) = 600;\r\n\t ColWidth(ColIndex(gridColKey.QuotationButtonD)) = 600;\r\n\t\tColWidth(ColIndex(gridColKey.Quotation)) = 2000;\r\n\t\tColWidth(ColIndex(gridColKey.Item)) = 1000; \r\n\t\tColWidth(ColIndex(gridColKey.Time)) = 1100;\r\n\t\tColWidth(ColIndex(gridColKey.Count)) = 650;\r\n\t\tColWidth(ColIndex(gridColKey.Source)) = 980;\r\n\t\tColWidth(ColIndex(gridColKey.Last)) = 980;\r\n\t\tColWidth(ColIndex(gridColKey.Diff)) = 980;\r\n\t\tColWidth(ColIndex(gridColKey.Bid)) = 980;\r\n\t\tColWidth(ColIndex(gridColKey.Ask)) = 980;\r\n\t\tColWidth(ColIndex(gridColKey.Lot)) = 600;\r\n\t\tColWidth(ColIndex(gridColKey.ClientCode)) = 980;\r\n\t}\r\n}", "format(value, format) {\n format = format || this.dateInputFormat + ' ' + this.timeInputFormat;\n return value ? this.moment(value).format(format) : '';\n }", "function column(headers, header, firstCol, startZero)\n{\n var index = headers.indexOf(header);\n if(index < 0)\n {\n throw new Error(\"Pas de colonne dont la clé est \" + header + \" dans \" + headers);\n }\n \n return index + firstCol - (startZero?firstCol:0);\n}", "function buildGridHeader( columnHeaderRowId ){\n\t\n\tvar columnHeaderRow = $( '#' + columnHeaderRowId );\n\n\t// this will provide the headers for each column in the grid (i.e. number for each beat/subbeat) \n\tfor(var i = 0; i < numberOfMeasures * subdivision + 1; i++){\n\t\tvar columnHeader = document.createElement('div');\n\t\tcolumnHeader.id = \"col_\" + (i - 1); // the - 1 here is important! \n\t\tcolumnHeader.style.display = \"inline-block\";\n\t\tcolumnHeader.style.margin = \"0 auto\";\n\t\tif(i > 0){\n\t\t\tcolumnHeader.style.borderRight = \"1px solid #000\";\n\t\t\tcolumnHeader.style.textAlign = \"center\";\n\t\t\t\n\t\t\tif(i < subdivision + 1){\n\t\t\t\tif(i === subdivision){\n\t\t\t\t\tcolumnHeader.style.borderRight = '3px solid #000';\n\t\t\t\t}\n\t\t\t\tcolumnHeader.textContent = i;\n\t\t\t}else if(i !== numberOfMeasures * subdivision + 1){\n\t\t\t\t// subdiv goes from 1 to 16. if more than 16, start at 1 again. \n\t\t\t\tvar subdiv = (i % subdivision) === 0 ? subdivision : (i % subdivision);\n\t\t\t\tif(subdivision === subdiv){\n\t\t\t\t\tcolumnHeader.style.borderRight = '3px solid #000';\n\t\t\t\t}\n\t\t\t\tcolumnHeader.textContent = subdiv; \n\t\t\t}\n\t\t}\n\t\t\n\t\tif(i === 0){\n\t\t\tcolumnHeader.style.width = '50px';\n\t\t\tcolumnHeader.style.height = '12px';\n\t\t\tcolumnHeader.style.border = '1px solid #000';\n\t\t}else{\n\t\t\tcolumnHeader.style.width = '40px';\n\t\t\tcolumnHeader.style.height = '12px';\n\t\t\tcolumnHeader.style.fontSize = '10px';\n\t\t}\n\t\t\n\t\t// 0 == false; i.e. does not have a note in the column\n\t\tcolumnHeader.setAttribute(\"hasNote\", 0); \n\t\t\n\t\tcolumnHeaderRow.append(columnHeader);\n\t}\n\n\t// can't pass in a jquery selected element\n\tappendDummyElement(document.getElementById(columnHeaderRowId));\n}", "formatter(params) { return params.name; }", "function addAllColumnHeaders(data){\n /* Uses columnSet to create table headers */\n var headerTr$ = $('<tr/>');\n for (var i = 0 ; i < columnSet.length; i++){\n headerTr$.append($('<th/>').html(columnSet[i]));\n }\n $(params.table_name).append(headerTr$);\n }" ]
[ "0.6629276", "0.63437927", "0.59950995", "0.5975986", "0.59356874", "0.57671523", "0.56975234", "0.5680987", "0.5678322", "0.5566068", "0.55608535", "0.5555714", "0.5520117", "0.54572755", "0.5372534", "0.5315968", "0.52629995", "0.52458084", "0.52457035", "0.5220479", "0.5219326", "0.52151525", "0.517764", "0.5171814", "0.5171814", "0.51591635", "0.5155515", "0.51458126", "0.5130139", "0.5128046", "0.5116933", "0.51137495", "0.51017797", "0.51017797", "0.51017797", "0.5097809", "0.5095554", "0.5084321", "0.5070285", "0.50702137", "0.50676394", "0.50646985", "0.50646985", "0.50646985", "0.50646985", "0.50646985", "0.50646985", "0.50646985", "0.50646985", "0.50646985", "0.50646985", "0.50646985", "0.50646985", "0.50646985", "0.5061508", "0.5061508", "0.5061508", "0.5061508", "0.5061508", "0.5061508", "0.5061508", "0.5061508", "0.5061508", "0.50599074", "0.50599074", "0.50599074", "0.50599074", "0.50599074", "0.50599074", "0.50599074", "0.50599074", "0.50599074", "0.50599074", "0.50599074", "0.50599074", "0.50599074", "0.50599074", "0.50599074", "0.5057595", "0.5055202", "0.5034652", "0.50325227", "0.5023416", "0.5022383", "0.5022383", "0.50126237", "0.5009325", "0.4976251", "0.4966686", "0.49501437", "0.49387228", "0.49215877", "0.49162942", "0.4891098", "0.48812962", "0.48805335", "0.48777035", "0.48710173" ]
0.5468727
15
for incorporating minTime/maxTime if appropriate TODO: should be part of DateProfile! TimelineDateProfile already does this btw
function computeActiveRange(dateProfile, isComponentAllDay) { var range = dateProfile.activeRange; if (isComponentAllDay) { return range; } return { start: addMs(range.start, dateProfile.minTime.milliseconds), end: addMs(range.end, dateProfile.maxTime.milliseconds - 864e5) // 864e5 = ms in a day }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_homogonizeMinMaxTimestamps () {\n const minTimes = this.tierNameList.map(tierName => this.tierDict[tierName].minTimestamp);\n const maxTimes = this.tierNameList.map(tierName => this.tierDict[tierName].maxTimestamp);\n\n const minTimestamp = Math.min(...minTimes);\n const maxTimestamp = Math.max(...maxTimes);\n\n this.minTimestamp = minTimestamp;\n for (let i = 0; i < this.tierNameList.length; i++) {\n const tierName = this.tierNameList[i];\n this.tierDict[tierName].minTimestamp = minTimestamp;\n }\n\n this.maxTimestamp = maxTimestamp;\n for (let i = 0; i < this.tierNameList.length; i++) {\n const tierName = this.tierNameList[i];\n this.tierDict[tierName].maxTimestamp = maxTimestamp;\n }\n }", "setTimeLimits(startTime, endTime) {\n if (startTime && endTime) {\n if (typeof startTime == \"object\" && typeof endTime == \"object\") {\n this.startTime = h.toTimestamp(startTime);\n this.endTime = h.toTimestamp(endTime);\n } else {\n this.startTime = startTime;\n this.endTime = endTime;\n }\n } else {\n this.startTime = ''\n this.endTime = ''\n }\n }", "function timeRange() {\n let date = new Date(),\n year = date.getFullYear(),\n month = date.getMonth() + 1,\n day = date.getDate()\n\n if (month < 10) {\n month = `0${month}`\n }\n\n if (day < 10) {\n day = `0${day}`\n }\n\n return {\n min: moment\n .tz(`${year}-${month}-${day}T00:00:00`, 'America/New_York')\n .format(),\n max: moment\n .tz(`${year}-${month}-${day}T23:59:59`, 'America/New_York')\n .format()\n }\n}", "function setMinutes() {\n if (minNow <= 5 || minNow >= 55) {\n min = arrMins[0];\n }\n else if (minNow <=10 || minNow >= 50) {\n min = arrMins[1];\n }\n else if (minNow <=10 || minNow >= 50) {\n min = arrMins[1];\n }\n else if (minNow <=15 || minNow >= 45) {\n min = arrMins[2];\n }\n else if (minNow < 30 || minNow > 30) {\n min = arrMins[3];\n }\n return min;\n}", "function get_time_range(x) {\r\n min = 99999999999999;\r\n max = 0;\r\n for(var time in x) {\r\n for(var timestamp in x[time]['timestamps']) {\r\n if(x[time]['timestamps'][timestamp]['start'] < min)\r\n min = x[time]['timestamps'][timestamp]['start'];\r\n if(x[time]['timestamps'][timestamp]['finish'] > max)\r\n max = x[time]['timestamps'][timestamp]['finish'];\r\n }\r\n }\r\n\r\n return [min, max];\r\n }", "getTimeRange(){\n let start = this.props.startTime instanceof IntegerTime ? this.props.startTime: IntegerTime.fromArmyTime(this.props.startTime);\n let end = this.props.endTime instanceof IntegerTime ? this.props.endTime: IntegerTime.fromArmyTime(this.props.endTime);\n return new IntegerTimeInterval(start, end);\n }", "function getTimeframe(max, min) {\n //const max = Math.max(...dates.map(d => d.getTime()));\n //const min = Math.min(...dates.map(d => d.getTime()));\n const rangePerDay = (max - min) / msPerDay;\n console.log('getTimeframe range --> ', rangePerDay);\n\n if(rangePerDay >= 1080) {\n return 'year';\n } else if(rangePerDay >= 360) {\n return 'quarter';\n } else if(rangePerDay >= 90) {\n return 'month';\n } else if(rangePerDay >= 21) {\n return 'week';\n } else {\n return 'day';\n }\n}", "validate() {\n this._super();\n\n //restore the correct object type for time values\n if (this.scale && this.scaleType == \"time\") {\n const obj = {};\n if (this.zoomedMin != null && !utils.isDate(this.zoomedMin)) obj.zoomedMin = this._space.time.parse(this.zoomedMin.toString());\n if (this.zoomedMax != null && !utils.isDate(this.zoomedMax)) obj.zoomedMax = this._space.time.parse(this.zoomedMax.toString());\n this.set(obj);\n }\n\n }", "function init_timeslider(data){\r\n\t\tconsole.log(\"init_timeslider\");\r\n\t\tvar minDatum = data[0][selectedOptions.dateField];\r\n\t\tvar maxDatum = data[data.length-1][selectedOptions.dateField];\r\n\t\tdocument.getElementById(\"time_slider\").setAttribute(\"max\", data.length-1);\r\n\t}", "function t(t,n){if(!t)return null;const e=n.featureAdapter,{startTimeField:u,endTimeField:l}=t;let r=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;if(u&&l)n.forEach((t=>{const n=e.getAttribute(t,u),o=e.getAttribute(t,l);null==n||isNaN(n)||(r=Math.min(r,n)),null==o||isNaN(o)||(i=Math.max(i,o));}));else {const t=u||l;n.forEach((n=>{const u=e.getAttribute(n,t);null==u||isNaN(u)||(r=Math.min(r,u),i=Math.max(i,u));}));}return {start:r,end:i}}", "minTimeBetweenSimilarHistoryEvents() { return 400; }", "generateHourLimits() {\n const { availableHourRange } = this.props;\n return {\n top: availableHourRange.start * HOUR_IN_PIXELS, // top blocker\n bottom: availableHourRange.end * HOUR_IN_PIXELS,\n bottomHeight: (24 - availableHourRange.end) * HOUR_IN_PIXELS, // bottom height\n difference: ((availableHourRange.end - availableHourRange.start) * HOUR_IN_PIXELS)\n + (MINUTE_IN_PIXELS * 14),\n };\n }", "function getCurveAxisMaxMinTimeStamps(axis, timestamps) {\n\n timestamps.max = axis.times[axis.times.length - 1] > timestamps.max ? axis.times[axis.times.length - 1] : timestamps.max;\n timestamps.min = axis.times[0] < timestamps.min ? axis.times[0] : timestamps.min;\n\n }", "function setHoursFromInputs() {\n if (self.hourElement === undefined || self.minuteElement === undefined)\n return;\n var hours = (parseInt(self.hourElement.value.slice(-2), 10) || 0) % 24, minutes = (parseInt(self.minuteElement.value, 10) || 0) % 60, seconds = self.secondElement !== undefined\n ? (parseInt(self.secondElement.value, 10) || 0) % 60\n : 0;\n if (self.amPM !== undefined) {\n hours = ampm2military(hours, self.amPM.textContent);\n }\n var limitMinHours = self.config.minTime !== undefined ||\n (self.config.minDate &&\n self.minDateHasTime &&\n self.latestSelectedDateObj &&\n compareDates(self.latestSelectedDateObj, self.config.minDate, true) ===\n 0);\n var limitMaxHours = self.config.maxTime !== undefined ||\n (self.config.maxDate &&\n self.maxDateHasTime &&\n self.latestSelectedDateObj &&\n compareDates(self.latestSelectedDateObj, self.config.maxDate, true) ===\n 0);\n if (limitMaxHours) {\n var maxTime = self.config.maxTime !== undefined\n ? self.config.maxTime\n : self.config.maxDate;\n hours = Math.min(hours, maxTime.getHours());\n if (hours === maxTime.getHours())\n minutes = Math.min(minutes, maxTime.getMinutes());\n if (minutes === maxTime.getMinutes())\n seconds = Math.min(seconds, maxTime.getSeconds());\n }\n if (limitMinHours) {\n var minTime = self.config.minTime !== undefined\n ? self.config.minTime\n : self.config.minDate;\n hours = Math.max(hours, minTime.getHours());\n if (hours === minTime.getHours())\n minutes = Math.max(minutes, minTime.getMinutes());\n if (minutes === minTime.getMinutes())\n seconds = Math.max(seconds, minTime.getSeconds());\n }\n setHours(hours, minutes, seconds);\n }", "function setHoursFromInputs() {\n if (self.hourElement === undefined || self.minuteElement === undefined)\n return;\n var hours = (parseInt(self.hourElement.value.slice(-2), 10) || 0) % 24, minutes = (parseInt(self.minuteElement.value, 10) || 0) % 60, seconds = self.secondElement !== undefined\n ? (parseInt(self.secondElement.value, 10) || 0) % 60\n : 0;\n if (self.amPM !== undefined) {\n hours = ampm2military(hours, self.amPM.textContent);\n }\n var limitMinHours = self.config.minTime !== undefined ||\n (self.config.minDate &&\n self.minDateHasTime &&\n self.latestSelectedDateObj &&\n compareDates(self.latestSelectedDateObj, self.config.minDate, true) ===\n 0);\n var limitMaxHours = self.config.maxTime !== undefined ||\n (self.config.maxDate &&\n self.maxDateHasTime &&\n self.latestSelectedDateObj &&\n compareDates(self.latestSelectedDateObj, self.config.maxDate, true) ===\n 0);\n if (limitMaxHours) {\n var maxTime = self.config.maxTime !== undefined\n ? self.config.maxTime\n : self.config.maxDate;\n hours = Math.min(hours, maxTime.getHours());\n if (hours === maxTime.getHours())\n minutes = Math.min(minutes, maxTime.getMinutes());\n if (minutes === maxTime.getMinutes())\n seconds = Math.min(seconds, maxTime.getSeconds());\n }\n if (limitMinHours) {\n var minTime = self.config.minTime !== undefined\n ? self.config.minTime\n : self.config.minDate;\n hours = Math.max(hours, minTime.getHours());\n if (hours === minTime.getHours())\n minutes = Math.max(minutes, minTime.getMinutes());\n if (minutes === minTime.getMinutes())\n seconds = Math.max(seconds, minTime.getSeconds());\n }\n setHours(hours, minutes, seconds);\n }", "function setHoursFromInputs() {\n if (self.hourElement === undefined || self.minuteElement === undefined)\n return;\n var hours = (parseInt(self.hourElement.value.slice(-2), 10) || 0) % 24, minutes = (parseInt(self.minuteElement.value, 10) || 0) % 60, seconds = self.secondElement !== undefined\n ? (parseInt(self.secondElement.value, 10) || 0) % 60\n : 0;\n if (self.amPM !== undefined) {\n hours = ampm2military(hours, self.amPM.textContent);\n }\n var limitMinHours = self.config.minTime !== undefined ||\n (self.config.minDate &&\n self.minDateHasTime &&\n self.latestSelectedDateObj &&\n compareDates(self.latestSelectedDateObj, self.config.minDate, true) ===\n 0);\n var limitMaxHours = self.config.maxTime !== undefined ||\n (self.config.maxDate &&\n self.maxDateHasTime &&\n self.latestSelectedDateObj &&\n compareDates(self.latestSelectedDateObj, self.config.maxDate, true) ===\n 0);\n if (limitMaxHours) {\n var maxTime = self.config.maxTime !== undefined\n ? self.config.maxTime\n : self.config.maxDate;\n hours = Math.min(hours, maxTime.getHours());\n if (hours === maxTime.getHours())\n minutes = Math.min(minutes, maxTime.getMinutes());\n if (minutes === maxTime.getMinutes())\n seconds = Math.min(seconds, maxTime.getSeconds());\n }\n if (limitMinHours) {\n var minTime = self.config.minTime !== undefined\n ? self.config.minTime\n : self.config.minDate;\n hours = Math.max(hours, minTime.getHours());\n if (hours === minTime.getHours())\n minutes = Math.max(minutes, minTime.getMinutes());\n if (minutes === minTime.getMinutes())\n seconds = Math.max(seconds, minTime.getSeconds());\n }\n setHours(hours, minutes, seconds);\n }", "function setHoursFromInputs() {\n if (self.hourElement === undefined || self.minuteElement === undefined)\n return;\n var hours = (parseInt(self.hourElement.value.slice(-2), 10) || 0) % 24, minutes = (parseInt(self.minuteElement.value, 10) || 0) % 60, seconds = self.secondElement !== undefined\n ? (parseInt(self.secondElement.value, 10) || 0) % 60\n : 0;\n if (self.amPM !== undefined) {\n hours = ampm2military(hours, self.amPM.textContent);\n }\n var limitMinHours = self.config.minTime !== undefined ||\n (self.config.minDate &&\n self.minDateHasTime &&\n self.latestSelectedDateObj &&\n compareDates(self.latestSelectedDateObj, self.config.minDate, true) ===\n 0);\n var limitMaxHours = self.config.maxTime !== undefined ||\n (self.config.maxDate &&\n self.maxDateHasTime &&\n self.latestSelectedDateObj &&\n compareDates(self.latestSelectedDateObj, self.config.maxDate, true) ===\n 0);\n if (limitMaxHours) {\n var maxTime = self.config.maxTime !== undefined\n ? self.config.maxTime\n : self.config.maxDate;\n hours = Math.min(hours, maxTime.getHours());\n if (hours === maxTime.getHours())\n minutes = Math.min(minutes, maxTime.getMinutes());\n if (minutes === maxTime.getMinutes())\n seconds = Math.min(seconds, maxTime.getSeconds());\n }\n if (limitMinHours) {\n var minTime = self.config.minTime !== undefined\n ? self.config.minTime\n : self.config.minDate;\n hours = Math.max(hours, minTime.getHours());\n if (hours === minTime.getHours())\n minutes = Math.max(minutes, minTime.getMinutes());\n if (minutes === minTime.getMinutes())\n seconds = Math.max(seconds, minTime.getSeconds());\n }\n setHours(hours, minutes, seconds);\n }", "function setHoursFromInputs() {\n if (self.hourElement === undefined || self.minuteElement === undefined)\n return;\n var hours = (parseInt(self.hourElement.value.slice(-2), 10) || 0) % 24, minutes = (parseInt(self.minuteElement.value, 10) || 0) % 60, seconds = self.secondElement !== undefined\n ? (parseInt(self.secondElement.value, 10) || 0) % 60\n : 0;\n if (self.amPM !== undefined) {\n hours = ampm2military(hours, self.amPM.textContent);\n }\n var limitMinHours = self.config.minTime !== undefined ||\n (self.config.minDate &&\n self.minDateHasTime &&\n self.latestSelectedDateObj &&\n compareDates(self.latestSelectedDateObj, self.config.minDate, true) ===\n 0);\n var limitMaxHours = self.config.maxTime !== undefined ||\n (self.config.maxDate &&\n self.maxDateHasTime &&\n self.latestSelectedDateObj &&\n compareDates(self.latestSelectedDateObj, self.config.maxDate, true) ===\n 0);\n if (limitMaxHours) {\n var maxTime = self.config.maxTime !== undefined\n ? self.config.maxTime\n : self.config.maxDate;\n hours = Math.min(hours, maxTime.getHours());\n if (hours === maxTime.getHours())\n minutes = Math.min(minutes, maxTime.getMinutes());\n if (minutes === maxTime.getMinutes())\n seconds = Math.min(seconds, maxTime.getSeconds());\n }\n if (limitMinHours) {\n var minTime = self.config.minTime !== undefined\n ? self.config.minTime\n : self.config.minDate;\n hours = Math.max(hours, minTime.getHours());\n if (hours === minTime.getHours())\n minutes = Math.max(minutes, minTime.getMinutes());\n if (minutes === minTime.getMinutes())\n seconds = Math.max(seconds, minTime.getSeconds());\n }\n setHours(hours, minutes, seconds);\n }", "function setHoursFromInputs() {\n if (self.hourElement === undefined || self.minuteElement === undefined)\n return;\n var hours = (parseInt(self.hourElement.value.slice(-2), 10) || 0) % 24,\n minutes = (parseInt(self.minuteElement.value, 10) || 0) % 60, seconds = self.secondElement !== undefined\n ? (parseInt(self.secondElement.value, 10) || 0) % 60\n : 0;\n if (self.amPM !== undefined) {\n hours = ampm2military(hours, self.amPM.textContent);\n }\n var limitMinHours = self.config.minTime !== undefined ||\n (self.config.minDate &&\n self.minDateHasTime &&\n self.latestSelectedDateObj &&\n compareDates(self.latestSelectedDateObj, self.config.minDate, true) ===\n 0);\n var limitMaxHours = self.config.maxTime !== undefined ||\n (self.config.maxDate &&\n self.maxDateHasTime &&\n self.latestSelectedDateObj &&\n compareDates(self.latestSelectedDateObj, self.config.maxDate, true) ===\n 0);\n if (limitMaxHours) {\n var maxTime = self.config.maxTime !== undefined\n ? self.config.maxTime\n : self.config.maxDate;\n hours = Math.min(hours, maxTime.getHours());\n if (hours === maxTime.getHours())\n minutes = Math.min(minutes, maxTime.getMinutes());\n if (minutes === maxTime.getMinutes())\n seconds = Math.min(seconds, maxTime.getSeconds());\n }\n if (limitMinHours) {\n var minTime = self.config.minTime !== undefined\n ? self.config.minTime\n : self.config.minDate;\n hours = Math.max(hours, minTime.getHours());\n if (hours === minTime.getHours() && minutes < minTime.getMinutes())\n minutes = minTime.getMinutes();\n if (minutes === minTime.getMinutes())\n seconds = Math.max(seconds, minTime.getSeconds());\n }\n setHours(hours, minutes, seconds);\n }", "function setHoursFromInputs() {\n if (self.hourElement === undefined || self.minuteElement === undefined)\n return;\n var hours = (parseInt(self.hourElement.value.slice(-2), 10) || 0) % 24, minutes = (parseInt(self.minuteElement.value, 10) || 0) % 60, seconds = self.secondElement !== undefined\n ? (parseInt(self.secondElement.value, 10) || 0) % 60\n : 0;\n if (self.amPM !== undefined) {\n hours = ampm2military(hours, self.amPM.textContent);\n }\n var limitMinHours = self.config.minTime !== undefined ||\n (self.config.minDate &&\n self.minDateHasTime &&\n self.latestSelectedDateObj &&\n compareDates(self.latestSelectedDateObj, self.config.minDate, true) ===\n 0);\n var limitMaxHours = self.config.maxTime !== undefined ||\n (self.config.maxDate &&\n self.maxDateHasTime &&\n self.latestSelectedDateObj &&\n compareDates(self.latestSelectedDateObj, self.config.maxDate, true) ===\n 0);\n if (limitMaxHours) {\n var maxTime = self.config.maxTime !== undefined\n ? self.config.maxTime\n : self.config.maxDate;\n hours = Math.min(hours, maxTime.getHours());\n if (hours === maxTime.getHours())\n minutes = Math.min(minutes, maxTime.getMinutes());\n if (minutes === maxTime.getMinutes())\n seconds = Math.min(seconds, maxTime.getSeconds());\n }\n if (limitMinHours) {\n var minTime = self.config.minTime !== undefined\n ? self.config.minTime\n : self.config.minDate;\n hours = Math.max(hours, minTime.getHours());\n if (hours === minTime.getHours())\n minutes = Math.max(minutes, minTime.getMinutes());\n if (minutes === minTime.getMinutes())\n seconds = Math.max(seconds, minTime.getSeconds());\n }\n setHours(hours, minutes, seconds);\n }", "getTimeline(start = Date.now(), end = -1) {\n let cards = this.cards.filter(card => {\n if (end > -1) {\n end = Math.min(end, 7 * 24 * 60 * 60 * 1000)\n return card.enabled && card.timestamp >= start && card.timestamp <= end\n }\n return card.enabled && card.timestamp >= start\n })\n cards.sort((a, b) => {\n return b.timestamp < a.timestamp\n })\n let timeline = []\n cards.forEach(card => {\n let day = dayFromTime(card.timestamp)\n let hour = hourFromTime(card.timestamp)\n\n timeline[day] = timeline[day] || []\n timeline[day][hour] = timeline[day][hour] || []\n timeline[day][hour].push(card)\n })\n\n // Remove empty elements\n timeline.forEach((day, i) => {\n timeline[i] = day.filter(hour => hour != null)\n })\n timeline = timeline.filter(day => day != null)\n\n return timeline\n }", "function TimeRangeInput(obj)\n{\n\t// defaults\n\tthat = this;\n\tthis.ds = 19; // half-hour size in px\n\tthis.base = this.ds;\n\t\n\tfunction initialize()\n\t{\n\t\t// remove use of jQuery\n\t\tthat.input = this;\n\t\tthat.timeline = $(this).find(\".timeline\")[0];\n\t\tthat.range = $(this).find(\".selected-time\")[0];\n\t\t\n\t\t// reference time inputs\n\t\tthat.start_time_input = $(that.input).children(\"input[name$=\\\"(2s)\\\"]\");\n\t\tthat.end_time_input = $(that.input).children(\"input[name$=\\\"(3s)\\\"]\");\n\t\t\n\t\t// reference day markers containers\n\t\tthat.days_containers = $(that.input).find(\".sorties .day\");\n\t\t\n\t\t// init dragging for selected time\n\t\tthat.limiter = $(this).find(\".frame\")[0];\n\t\tvar baseEnd = that.timeline.scrollWidth - that.ds;\n\t\t\n\t\t// which day is initially selected?\n\t\tvar day = $(\".day-tabs label.active input\").val();\n\t\t\n\t\t// associate map\n\t\tthat.map = $('#map_canvas')[0].mj_map;\n\t\t\n\t\t// associate markers\n\t\tthat.days_containers.find(\".sortie\").each(function() {\n\t\t\tthis.mj_map_marker = that.map.p.date_markers[\"date-\"+this.getAttribute(\"data-date-id\")];\n\t\t});\n\t\t\n\t\t// init date markers: show those of the current selected day\n\t\tthat.selectDayMarkers(day);\n\t\t\n\t\t// TODO: set cursor when dragging\n\t\t// TODO: implement keyboard nav\n\t\t\n\t\tthat.initDrag(that.range, {\n\t\t\tlimitRef: function() { return parseInt(that.dragged.style.left); },\n\t\t\tlimitLow: that.base,\n\t\t\tlimitHigh: function() { return baseEnd - parseInt(that.dragged.style.width); },\n\t\t\thandler: function(m) {\n\t\t\t\tthat.dragged.style.left = parseInt(that.dragged.style.left) + m + \"px\";\n\t\t\t}\n\t\t});\n\t\tthat.initDrag($(that.range).find(\".stop-hand\")[0], {\n\t\t\tlimitRef: function() { return parseInt(that.dragged.parentElement.style.width); },\n\t\t\tlimitLow: 2 * that.ds, // select a 1 hour range minimum\n\t\t\tlimitHigh: function() { return baseEnd - parseInt(that.dragged.parentElement.style.left); },\n\t\t\thandler: function(m) {\n\t\t\t\tthat.dragged.parentElement.style.width = parseInt(that.dragged.parentElement.style.width) + m + \"px\";\n\t\t\t}\n\t\t});\n\t\t// TODO: implement double-limit: add width limit\n\t\tthat.initDrag($(that.range).find(\".start-hand\")[0], {\n\t\t\tlimitRef: function() { return parseInt(that.dragged.parentElement.style.left); },\n\t\t\tlimitLow: that.base,\n\t\t\tlimitHigh: function() { return baseEnd; },\n\t\t\thandler: function(m) {\n\t\t\t\tthat.dragged.parentElement.style.left = parseInt(that.dragged.parentElement.style.left) + m + \"px\";\n\t\t\t\tthat.dragged.parentElement.style.width = parseInt(that.dragged.parentElement.style.width) - m + \"px\";\n\t\t\t}\n\t\t});\n\t\t\n\t\t$(\".day-tabs label\").click(that.selectDay);\n\t}\n\t\n\tthis.selectDay = function()\n\t{\n\t\tif (!$(this).hasClass(\"active\")){\n\t\t\t\n\t\t\tvar tabs = $(this.parentNode).children();\n\t\t\tvar timebar = $(that.timeline).find(\".elapsed-and-current-time\");\n\t\t\t\n\t\t\t// disable/enable elapsed time bar\n\t\t\tif (tabs.index(this) == 0)\n\t\t\t\ttimebar.show();\n\t\t\telse\n\t\t\t\ttimebar.hide();\n\t\t\t\n\t\t\t// de-activate former tab, activate *this\n\t\t\ttabs.filter(\".active\").removeClass(\"active\");\n\t\t\t$(this).addClass(\"active\");\n\t\t\t\n\t\t\t// select markers\n\t\t\tvar day = $(this).find(\"input\").val();\n\t\t\tthat.selectDayMarkers(day);\n\t\t}\n\t}\n\t\n\tthis.selectDayMarkers = function(day)\n\t{\n\t\tvar thisDay = that.days_containers.filter('[data-day=\"'+day+'\"]');\n\t\t\n\t\t// hide previosuly shown markers\n\t\tthat.days_containers.filter(\":visible\").hide();\n\t\t\n\t\t// show current day markers\n\t\tthisDay.show();\n\t\t\n\t\t// update highlighted markers\n\t\tthat.updateScopedMarkers();\n\t\t\n\t\t// do the same for shown map markers\n\t\tthat.updateShownMapMarkers(thisDay);\n\t}\n\t\n\tthis.updateScopedMarkers = function()\n\t{\n\t\tvar start_hour = Lib.readTime(that.start_time_input.val());\n\t\tvar end_hour = Lib.readTime(that.end_time_input.val());\n\t\t\n\t\tthat.days_containers.filter(\":visible\").find(\".sortie\").each(function() {\n\t\t\t\n\t\t\tvar time = Lib.readTime($(this).attr(\"data-time\"));\n\t\t\t\n\t\t\tif (time >= start_hour && time <= end_hour)\n\t\t\t\t$(this).addClass(\"scoped\");\n\t\t\telse\n\t\t\t\t$(this).removeClass(\"scoped\");\n\t\t});\n\t\t\n\t\t// also update scoped map markers\n\t\tthat.updateResultsAndMapScope();\n\t}\n\t\n\tthis.updateShownMapMarkers = function(markers)\n\t{\n\t\t// hide all map markers\n\t\tfor (var i = 0; i < that.map.visible_markers.length; i++) {\n\t\t\tthat.map.visible_markers[i].setVisible(false);\n\t\t}\n\t\tthat.map.visible_markers = [];\n\t\t\n\t\t// only show map markers for that day\n\t\tmarkers.find(\".sortie\").each(function() {\n\t\t\tthis.mj_map_marker.setVisible(true);\n\t\t\tthat.map.visible_markers.push(this.mj_map_marker);\n\t\t});\n\t}\n\t\n\tthis.updateResultsAndMapScope = function()\n\t{\n\t\t// hide results\n\t\t$(\".date-results .mj-sortie:visible\").hide();\n\t\t\n\t\t// update scoped map markers:\n\t\t// - unscope previous\n\t\tfor (var i = 0; i < that.map.scoped_markers.length; i++) {\n\t\t\tthat.map.scoped_markers[i].setIcon(that.map.marker_images.unscoped);\n\t\t}\n\t\tthat.map.scoped_markers = [];\n\t\t\n\t\t// - scope new\n\t\tthat.days_containers.filter(\":visible\").find(\".sortie.scoped\").each(function() {\n\t\t\tthis.mj_map_marker.setIcon(that.map.marker_images.scoped);\n\t\t\tthat.map.scoped_markers.push(this.mj_map_marker);\n\t\t\t\n\t\t\t// show new results here:\n\t\t\t$(\"#date-\"+this.getAttribute(\"data-date-id\")).show();\n\t\t\t\n\t\t});\n\t}\n\t\n\tthis.updateTimeInputs = function()\n\t{\n\t\t// start_time: 06:00 + 1h per each 2 * ds in left pos (-base)\n\t\t// end_time: + 1h per each 2 * ds in width\n\t\t\n\t\tvar left = parseInt($(that.range).css(\"left\"));\n\t\tvar width = parseInt($(that.range).css(\"width\"));\n\t\t\n\t\tvar start_hour = ((left - that.base) / (2 * that.ds)) + 6;\n\t\tvar end_hour = start_hour + (width / (2 * that.ds));\n\t\t\n\t\t// set\n\t\tthat.start_time_input.val(Lib.formatTime(start_hour));\n\t\tthat.end_time_input.val(Lib.formatTime(end_hour));\n\t\t\n\t\t// update highlighted markers\n\t\tthat.updateScopedMarkers();\n\t}\n\t\n\t// drag support, may be namespaced\n\tthis.initDrag = function(el, spec)\n\t{\n\t\t// using standard limiter\n\t\t\n\t\t// assign spec\n\t\tel.mj_drag_spec = spec;\n\t\t\n\t\t$(el).bind('mousedown', that.startDrag);\n\t}\n\tthis.startDrag = function(e)\n\t{\n\t\tthat.dragged = this;\n\t\t\n\t\tthat.limiter.mj_drag_startPos = e.pageX; // we only need horizontal\n\t\t\n\t\t$(that.limiter).mouseup(that.endDrag)\n\t\t .mouseleave(that.endDrag)\n\t\t .mousemove(that.moveDrag); // dragging\n\t\t\n\t\tdocument.onselectstart = that.preventSelect;\n\t\t\n\t\t// prevent default\n\t\t//e.preventDefault();\n\t\t// stop bubbling\n\t\te.stopPropagation();\n\t}\n\tthis.moveDrag = function(e)\n\t{\n\t\tvar delta = e.pageX - this.mj_drag_startPos;\n\t\tvar increments = Math.round(Math.abs(delta / that.ds));\n\t\tvar direction = (delta < 0)? -1 : 1;\n\t\t\n\t\tif (increments > 0)\n\t\t{\n\t\t\tvar move = direction * increments * that.ds;\n\t\t\t\n\t\t\t// use spec\n\t\t\tvar limitLow = that.dragged.mj_drag_spec.limitLow;\n\t\t\tvar limitHigh = that.dragged.mj_drag_spec.limitHigh();\n\t\t\tvar current = that.dragged.mj_drag_spec.limitRef();\n\t\t\t\n\t\t\tif (limitLow !== undefined && current + move < limitLow)\n\t\t\t\tmove = -(current - limitLow);\n\t\t\telse if (limitHigh !== undefined && current + move > limitHigh)\n\t\t\t\tmove = limitHigh - current;\n\t\t\t\n\t\t\t// action\n\t\t\tthat.dragged.mj_drag_spec.handler(move);\n\t\t\t\n\t\t\tthis.mj_drag_startPos += move;\n\t\t}\n\t}\n\tthis.preventSelect = function(e)\n\t{\n\t\te.preventDefault();\n\t\treturn false;\n\t}\n\tthis.endDrag = function(e)\n\t{\n\t\tdocument.onselectstart = undefined;\n\t\t\n\t\t$(this).unbind('mousemove')\n\t\t .unbind('mouseleave')\n\t\t .unbind('mouseup');\n\t\t\n\t\tthis.mj_drag_startPos = undefined;\n\t\t\n\t\tthat.dragged = undefined;\n\t\t\n\t\t// update inputs\n\t\tthat.updateTimeInputs();\n\t}\n\t\n\t// constructor\n\tinitialize.call(obj);\n}", "function setHoursFromInputs() {\n if (self.hourElement === undefined || self.minuteElement === undefined)\n return;\n var hours = (parseInt(self.hourElement.value.slice(-2), 10) || 0) % 24, minutes = (parseInt(self.minuteElement.value, 10) || 0) % 60, seconds = self.secondElement !== undefined\n ? (parseInt(self.secondElement.value, 10) || 0) % 60\n : 0;\n if (self.amPM !== undefined) {\n hours = ampm2military(hours, self.amPM.textContent);\n }\n var limitMinHours = self.config.minTime !== undefined ||\n (self.config.minDate &&\n self.minDateHasTime &&\n self.latestSelectedDateObj &&\n compareDates(self.latestSelectedDateObj, self.config.minDate, true) ===\n 0);\n var limitMaxHours = self.config.maxTime !== undefined ||\n (self.config.maxDate &&\n self.maxDateHasTime &&\n self.latestSelectedDateObj &&\n compareDates(self.latestSelectedDateObj, self.config.maxDate, true) ===\n 0);\n if (limitMaxHours) {\n var maxTime = self.config.maxTime !== undefined\n ? self.config.maxTime\n : self.config.maxDate;\n hours = Math.min(hours, maxTime.getHours());\n if (hours === maxTime.getHours())\n minutes = Math.min(minutes, maxTime.getMinutes());\n if (minutes === maxTime.getMinutes())\n seconds = Math.min(seconds, maxTime.getSeconds());\n }\n if (limitMinHours) {\n var minTime = self.config.minTime !== undefined\n ? self.config.minTime\n : self.config.minDate;\n hours = Math.max(hours, minTime.getHours());\n if (hours === minTime.getHours())\n minutes = Math.max(minutes, minTime.getMinutes());\n if (minutes === minTime.getMinutes())\n seconds = Math.max(seconds, minTime.getSeconds());\n }\n setHours(hours, minutes, seconds);\n }", "function computeActiveRange(dateProfile) {\n var range = dateProfile.activeRange; // return range;\n\n return {\n start: marker_1.addMs(range.start, dateProfile.minTime.milliseconds),\n end: marker_1.addMs(range.end, dateProfile.maxTime.milliseconds - 864e5) // 864e5 = ms in a day\n\n };\n }", "function setHoursFromInputs() {\n if (self.hourElement === undefined || self.minuteElement === undefined) return;\n var hours = (parseInt(self.hourElement.value.slice(-2), 10) || 0) % 24,\n minutes = (parseInt(self.minuteElement.value, 10) || 0) % 60,\n seconds = self.secondElement !== undefined ? (parseInt(self.secondElement.value, 10) || 0) % 60 : 0;\n\n if (self.amPM !== undefined) {\n hours = ampm2military(hours, self.amPM.textContent);\n }\n\n var limitMinHours = self.config.minTime !== undefined || self.config.minDate && self.minDateHasTime && self.latestSelectedDateObj && compareDates(self.latestSelectedDateObj, self.config.minDate, true) === 0;\n var limitMaxHours = self.config.maxTime !== undefined || self.config.maxDate && self.maxDateHasTime && self.latestSelectedDateObj && compareDates(self.latestSelectedDateObj, self.config.maxDate, true) === 0;\n\n if (limitMaxHours) {\n var maxTime = self.config.maxTime !== undefined ? self.config.maxTime : self.config.maxDate;\n hours = Math.min(hours, maxTime.getHours());\n if (hours === maxTime.getHours()) minutes = Math.min(minutes, maxTime.getMinutes());\n if (minutes === maxTime.getMinutes()) seconds = Math.min(seconds, maxTime.getSeconds());\n }\n\n if (limitMinHours) {\n var minTime = self.config.minTime !== undefined ? self.config.minTime : self.config.minDate;\n hours = Math.max(hours, minTime.getHours());\n if (hours === minTime.getHours()) minutes = Math.max(minutes, minTime.getMinutes());\n if (minutes === minTime.getMinutes()) seconds = Math.max(seconds, minTime.getSeconds());\n }\n\n setHours(hours, minutes, seconds);\n }", "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 setTimerangeControlsAndShow(start, end) {\n\n var start_el = $(\"ul.criteria-container > li#timing input#start\");\n var end_el = $(\"ul.criteria-container > li#timing input#end\");\n\n start_el.attr(\"min\", start);\n start_el.attr(\"max\", end);\n end_el.attr(\"min\", start);\n end_el.attr(\"max\", end);\n\n if(start_el.val() == \"\") {\n start_el.val(start);\n }\n\n if(end_el.val() == \"\") {\n end_el.val(end);\n }\n\n $(\"ul.criteria-container > li#timing\").slideDown();\n}", "function t$1(t,n){if(!t)return null;const e=n.featureAdapter,{startTimeField:u,endTimeField:r}=t;let l=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;if(u&&r)n.forEach((t=>{const n=e.getAttribute(t,u),o=e.getAttribute(t,r);null==n||isNaN(n)||(l=Math.min(l,n)),null==o||isNaN(o)||(i=Math.max(i,o));}));else {const t=u||r;n.forEach((n=>{const u=e.getAttribute(n,t);null==u||isNaN(u)||(l=Math.min(l,u),i=Math.max(i,u));}));}return {start:l,end:i}}", "function setAgtTimePeriod(d){\n var minDate = parseDate(newMinDay);\n var maxDate = parseDate(newMaxDay);\n var agmtDat = d.Dat;\n if ((agmtDat >= minDate) && (agmtDat <= maxDate)){\n return d;\n }\n }", "setTimeLimit() {\nvar lastframe;\n//-----------\nif (this.fCount === 0) {\nreturn this.tLimit = 0;\n} else {\nlastframe = this.frameAt(this.fCount - 1);\nreturn this.tLimit = (lastframe.getTime()) + (lastframe.getDuration());\n}\n}", "function initTimeBar(){\n if($scope.valuesTodayAggregated[0]){\n $scope.currentTime = 0;\n $scope.minTime = 0; //set the min index of the timebar\n $scope.maxTime = $scope.valuesTodayAggregated[0][0].length-1; //set the max index of the timebar\n //make a function that translates an index to a string containing the time\n $scope.translateTime = function(currentTime){\n return new Date($scope.timesDict[0][$scope.valuesTodayAggregated[0][0][currentTime]].name).toString();\n };\n }\n //if times are not correctly loaded use standard values.\n else {\n $scope.minTime = 0; //set the min index of the timebar\n $scope.maxTime = 10000; //set the max index of the timebar\n //inform the user no times have been loaded.\n $scope.translateTime = function(currentTime){\n return \"no time loaded\"; \n };\n }\n }", "function updateVisualsTimeChange(start, end) {\n minDate = new Date(Date.parse(start));\n maxDate = new Date(Date.parse(end));\n updatePieChart(pieDataAllApps.report.data, currMetric);\n totals = {};\n totals['visits'] = pieData['totalVisits'];\n totals['views'] = pieData['totalViews'];\n updateTables(barGroup, pieDataAllApps.report.data, ['App', 'Raw', 'Perc'], ['Total Views', 'Total Visits'], currMetric, totals);\n updateBarChart(barGroup, currColor, browserType, browserData, currMetric);\n updateBarChart(barGroup, currColor, osType, osData, currMetric);\n updateHourlyBarChart(barGroup, currColor, currMetric);\n}", "function initTimelineToolbar() {\n\t// Toolbar\n\ttimelineToolContainer = document.getElementById('timelineToolbarContainer');\n\n\t// Wrapper for layout\n\tlet minWrapper = document.createElement('div'); \n\tminWrapper.setAttribute('class', \"minSlider\");\n\tminWrapper.setAttribute('id', \"minWrapper\");\n\n\tlet maxWrapper = document.createElement('div'); \n\tmaxWrapper.setAttribute('class', \"maxSlider\");\n\tmaxWrapper.setAttribute('id', \"maxWrapper\");\n\n\t// Range slider for time-filtering, lower bound\n\tlet rangeSliderMin = document.createElement('input');\n\trangeSliderMin.setAttribute('type', \"range\");\n\trangeSliderMin.setAttribute('class', \"slider\");\n\trangeSliderMin.setAttribute('id', \"minRange\");\n\trangeSliderMin.setAttribute('min', \"1\");\n\trangeSliderMin.setAttribute('max', \"10\");\n\trangeSliderMin.setAttribute('step', \"1\");\n\trangeSliderMin.setAttribute('value', 4);\n\trangeSliderMin.addEventListener('change', onchangeMin);\n\trangeSliderMin.addEventListener('input', updateFilterPositionMin);\n\n\t// Range slider for time-filtering, upper bound\n\tlet rangeSliderMax = document.createElement('input');\n\trangeSliderMax.setAttribute('type', \"range\");\n\trangeSliderMax.setAttribute('class', \"slider\");\n\trangeSliderMax.setAttribute('id', \"maxRange\");\n\trangeSliderMax.setAttribute('min', \"1\");\n\trangeSliderMax.setAttribute('max', \"10\");\n\trangeSliderMax.setAttribute('step', \"1\");\n\trangeSliderMax.setAttribute('value', 6);\n\trangeSliderMax.addEventListener('change', onchangeMax);\n\trangeSliderMax.addEventListener('input', updateFilterPositionMax);\n\n\t// Time related text field\n\tlet minDate, minTime, maxDate, maxTime;\n\tminDate = document.createElement('input'); minDate.setAttribute('id', \"minDate\"); minDate.setAttribute('type', \"date\");\n\tminTime = document.createElement('input'); minTime.setAttribute('id', \"minTime\"); minTime.setAttribute('type', \"time\");\n\tmaxDate = document.createElement('input'); maxDate.setAttribute('id', \"maxDate\"); maxDate.setAttribute('type', \"date\");\n\tmaxTime = document.createElement('input'); maxTime.setAttribute('id', \"maxTime\"); maxTime.setAttribute('type', \"time\");\n\n\t// Update if needed (for example the user might input a time using date and time but not the range)\n\tlet btnDrawAll = document.createElement('button');\n\tbtnDrawAll.innerText = \"Draw\\nAll\";\n\tbtnDrawAll.setAttribute(\"style\", \"position:absolute; height:36px; width:80px; left:80%\");\n\tbtnDrawAll.addEventListener('click', timelineDrawAll);\n\n\tlet btnUpdateAll = document.createElement('button');\n\tbtnUpdateAll.innerText = \"Update\\nAll\";\n\tbtnUpdateAll.setAttribute(\"style\", \"position:absolute; height:36px; width:80px; left:80%; top:36px\");\n\tbtnUpdateAll.addEventListener('click', timelineUpdateAll);\n\n\t// Append to wrappers\n\tminWrapper.appendChild(minDate);\n\tminWrapper.appendChild(minTime);\n\tminWrapper.appendChild(rangeSliderMin);\n\t\n\tmaxWrapper.appendChild(maxDate);\n\tmaxWrapper.appendChild(maxTime);\n\tmaxWrapper.appendChild(rangeSliderMax);\n\n\t// Append to containers\n\ttimelineToolContainer.appendChild(minWrapper);\n\ttimelineToolContainer.appendChild(maxWrapper);\n\ttimelineToolContainer.appendChild(btnDrawAll);\n\ttimelineToolContainer.appendChild(btnUpdateAll);\n\n\t// Vertical line as filter\n\tlet minLine = buildAxisTimeline(new THREE.Vector3(timelineWidth / 3, 0, 0), new THREE.Vector3(timelineWidth / 3, 10000, 0), 0x000000, false); minLine.name = \"minLine\";\n\tlet maxLine = buildAxisTimeline(new THREE.Vector3(timelineWidth / 3 * 2, 0, 0), new THREE.Vector3(timelineWidth / 3 * 2, 10000, 0), 0x000000, false); maxLine.name = \"maxLine\";\n\ttimelineScene.add(minLine);\n\ttimelineScene.add(maxLine);\n}", "overTime(){\n\t\t//\n\t}", "function fillTimes() {\n let now = new Date();\n startTime.value = now.toLocaleDateString(\"en-US\") +\" \"+ now.toTimeString().slice(0,8);\n endTime.value = now.toLocaleDateString(\"en-US\") +\" \"+ now.toTimeString().slice(0,8);\n}", "function calculateMins(child, trainTime) {\n let trainSched = child.val();\n trainTime.startTime = moment(baseDate + \" \" + trainSched.starttime);\n trainTime.currentTime = moment(baseDate + \" \" + now);\n trainTime.freq = parseInt(trainSched.frequency);\n trainTime.diffNowStart = trainTime.currentTime.diff(trainTime.startTime, \"minutes\");\n trainTime.ratio = trainTime.diffNowStart / trainTime.freq;\n //3 scenarios\n //- where the current time is before the train starts for the day\n if (trainTime.diffNowStart < 0) {\n trainSched.nexttrain = trainTime.startTime;\n trainSched.minutes = Math.abs(trainTime.diffNowStart);\n }\n //- where the train start time has passed but only the first train has left for the day\n else if (trainTime.ratio < 1) {\n trainSched.nexttrain = moment(trainTime.startTime).add(trainTime.freq, \"minutes\");\n trainSched.minutes = moment(trainSched.nexttrain.diff(trainTime.currentTime)).format(\"m\");\n }\n //- where the train start time has passed and several trains have left for the day\n else {\n trainSched.nexttrain = trainTime.startTime.add(Math.ceil(trainTime.ratio) * trainTime.freq, \"minutes\");\n trainSched.minutes = moment(trainSched.nexttrain.diff(trainTime.currentTime)).format(\"m\");\n }\n trainSched.nexttrain = trainSched.nexttrain.format(\"HH:mm\");\n updateMinsDisp(trainSched); \n}", "displayTimeRange() {\n return timewindow.displayTimeRange(_.get(_.get(this.state, this.nodes[0]), 'timeRange'));\n }", "parseStatsTime() {\r\n this._time_played = this.convertTime(this._datas_str[\"lifeTimeStats\"][13][\"value\"]);\r\n this._time_avg = this.convertTime(this._datas_str[\"lifeTimeStats\"][14][\"value\"]); \r\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 }", "function setMinAndMaxDate() {\n let currentDate=new Date();\n let minDate=currentDate.getFullYear()+'-'+appendLeadingZeroes((currentDate.getMonth()+1))+'-'+appendLeadingZeroes(currentDate.getDate());\n let maxDate=new Date(currentDate.getFullYear(),currentDate.getMonth(),currentDate.getDate()+15);\n maxDate=maxDate.getFullYear()+'-'+appendLeadingZeroes((maxDate.getMonth()+1))+'-'+appendLeadingZeroes(maxDate.getDate());\n document.getElementById('travelStartDate').setAttribute('min',minDate);\n document.getElementById('travelStartDate').setAttribute('max',maxDate);\n document.getElementById('travelEndDate').setAttribute('min',minDate);\n}", "function sliderChanged(offsets) {\n var min = new Date(slider.timeMin + (offsets[0] / 100) * (slider.timeMax - slider.timeMin));\n var max = new Date(slider.timeMin + (offsets[1] / 100) * (slider.timeMax - slider.timeMin));\n\n var tw = document.getElementById( 'timeWindow' );\n tw.innerHTML = min.toString() + \" -> \" + max.toString();\n\n mapstraction.removeAllFilters();\n mapstraction.addFilter('date', 'ge', min );\n mapstraction.addFilter('date', 'le', max );\n mapstraction.doFilter();\n\n}", "function snapMinDate(min, max, incr) {\n\t\t// get ts of 12am on day of i0 timestamp\n\t\tvar minDate = new Date(min * 1000);\n\t\tvar min00 = +(new Date(minDate[getFullYear](), minDate[getMonth](), minDate[getDate]())) / 1000;\n\t\tvar offset = min - min00;\n\t\tvar newMin = min00 + incrRoundUp(offset, incr);\n\t\treturn [newMin, max];\n\t}", "function TimeSlider(){\n if($('.time-slider').length) {\n \n\n $(\".time-slider\").slider({\n min: 0,\n max: 1440,\n step: 1,\n create:function(event,ui){\n var $this = $(this),\n\n start = parseInt($this.attr('data-start'), 10),\n\n end = parseInt($this.attr('data-end'), 10),\n\n hours_start = Math.floor(start / 60);\n\n if(isNaN(end)==false){\n\n $this.slider(\"option\",\"range\", true);\n\n $this.slider(\"values\", [start,end]);\n\n var hours_end=Math.floor(end / 60),\n\n time_end=TimeSlide(hours_end,end - (hours_end*60),true),\n\n time_start=TimeSlide(hours_start, start - (hours_start*60),true);\n\n $this.prepend(\"<label class='label-min'>\"+time_start+\"</label>\");\n\n $this.append(\"<label class='label-max'>\"+time_end+\"</label>\");\n\n $this.find('.range').attr('value',time_start+','+time_end);\n\n } else {\n var time_start=TimeSlide(hours_start, start - (hours_start*60),false);\n\n $this.slider(\"value\",start);\n\n $this.slider(\"option\",\"range\", \"min\");\n\n $this.append(\"<label class='label-max'>\"+time_start+\"</label>\");\n\n $this.find('.range').attr('value',time_start);\n\n }\n \n \n },\n slide: function(event, ui) {\n\n var $this=$(this),\n\n rager=$this.slider(\"option\", \"range\"),\n\n values, hours_start, hours_end, time_start, time_end;\n\n if(rager==true) {\n\n values=ui.values;\n\n hours_start=Math.floor(values[0] / 60);\n\n hours_end=Math.floor(values[1] / 60);\n\n time_start=TimeSlide(hours_start, values[0] - (hours_start*60),true);\n\n time_end=TimeSlide(hours_end,values[1] - (hours_end*60),true);\n\n $this.find('.label-min').text(time_start);\n\n $this.find('.label-max').text(time_end);\n\n $this.find('.range').attr('value',time_start+','+time_end);\n\n } else {\n\n values=ui.value;\n\n hours_start=Math.floor(values / 60);\n\n time_start=TimeSlide(hours_start, values - (hours_start*60),false);\n\n $this.find('.label-max').text(time_start);\n\n $this.find('.range').attr('value',time_start);\n }\n }\n });\n }\n }", "function checkInitialTime() {\n if (moment().format('HHmm') > 1700 && (moment().format('HHmm') < 0900)) {\n $('#eventText').addClass('past');\n $('#eventText').attr(\"readonly\", \"readonly\");\n }\n }", "function setTimeRange( params ) {\n var\n begin, end;\n switch( params.duration ) {\n case 'day':\n begin = moment( params.dateFrom ).startOf( 'day' );\n end = moment( params.dateFrom ).endOf( 'day' );\n break;\n case 'week':\n begin = moment( params.dateFrom ).startOf( 'week' );\n end = moment( params.dateFrom ).endOf( 'week' );\n break;\n case 'month':\n begin = moment( params.dateFrom ).startOf( 'month' );\n end = moment( params.dateFrom ).endOf( 'month' );\n break;\n case 'all':\n begin = moment( params.dateFrom );\n break;\n }\n // overwrite any current value\n params.dateFrom = begin;\n params.dateTo = end;\n }", "get dateRange() {\n const {\n scheduler\n } = this;\n let bottomDate = scheduler.getDateFromCoordinate(Math.min(scheduler.scrollTop + scheduler.bodyHeight + scheduler.tickSize - 1, (scheduler.virtualScrollHeight || scheduler.scrollable.scrollHeight) - 1)); // Might end up below time axis (out of ticks)\n // TODO: Change call order on refresh to make sure this is not needed?\n\n if (!bottomDate) {\n bottomDate = scheduler.timeAxis.last.endDate;\n }\n\n let topDate = scheduler.getDateFromCoordinate(Math.max(scheduler.scrollTop - scheduler.tickSize, 0)); // Might end up above time axis when reconfiguring (since this happens as part of rendering)\n\n if (!topDate) {\n topDate = scheduler.timeAxis.first.startDate;\n bottomDate = scheduler.getDateFromCoordinate(scheduler.bodyHeight + scheduler.tickSize - 1);\n }\n\n return {\n topDate,\n bottomDate\n };\n }", "setClockTime() {\n const [min, hr] = getCurrentMinutesHrs();\n const finalTime = [];\n for (const elem of minMappings[min]) {\n finalTime.push(elem);\n }\n finalTime.push(hrMappings[hr]);\n this.setState({time: finalTime});\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}", "generateTimeline() {\r\n return (\r\n <Row\r\n id={this.componentName + \"RowTimeline\"}>\r\n <Col\r\n md={12}\r\n className='textLabel label'>\r\n <InputRange\r\n draggableTrack\r\n step ={31536000 * 1000}\r\n maxValue ={this.state.latestDate}\r\n minValue ={this.state.earliestDate}\r\n value ={this.state.value}\r\n onChange ={value => this.validateRange(value)}\r\n //onChangeComplete={value => this.showSectionInRange(value)}\r\n formatLabel={value => new Date(value).toLocaleDateString(\"en-US\", {year: 'numeric'})}/>\r\n </Col>\r\n </Row>\r\n );\r\n }", "function cb_stat(start, end) {\n stat_dt_start = start.format('YYYY-MM-DD') + ' ' + String(moment().hour())+':00',\n stat_dt_end = end.format('YYYY-MM-DD') + ' ' + String(moment().hour()+1)+':00';\n\n if (moment(stat_dt_start).hour() == 0) {\n stat_dt_start = start.format('YYYY-MM-DD') + ' ' + '00:00'; \n };\n if (moment(stat_dt_end).hour() == 0) {\n stat_dt_end = end.format('YYYY-MM-DD') + ' ' + '00:00'; \n };\n \n $('#statdaterange span').html(stat_dt_start + ' - ' + stat_dt_end);\n }", "function occurs_between(x, min, max) {\r\n var count = 0;\r\n if(x.timestamps.length > 0) {\r\n for(var timestamp in x.timestamps) {\r\n if(x.timestamps[timestamp].finish > min && x.timestamps[timestamp].start < max ||\r\n x.timestamps[timestamp].start < max && x.timestamps[timestamp].finish > min) {\r\n count++;\r\n }\r\n }\r\n }\r\n if($('#timeframe_filter')[0].children.length > 0)\r\n if(!$('#only_show_entities_with_time')[0].checked) {\r\n count += (x.value - x.timestamps.length);\r\n }\r\n\r\n return {'passed': count > 0,\r\n 'value': count}\r\n }", "function tpStartSelect( time, endTimePickerInst ) {\n $('#eventEndTime').timepicker('option', {\n minTime: {\n hour: endTimePickerInst.hours,\n minute: endTimePickerInst.minutes\n }\n });\n}", "limits() {\n var keys = Object.keys(this.data);\n var min = parseInt(this.data[keys[0]]); // ignoring case of empty list for conciseness\n var max = parseInt(this.data[keys[0]]);\n var i;\n for (i = 1; i < keys.length; i++) {\n var value = parseInt(this.data[keys[i]]);\n if (value < min) min = value;\n if (value > max) max = value;\n }\n this.yMin =min - Math.round(min/4);\n if(this.yMin <= 0)\n this.yMin=0;\n this.yMax = max + Math.round(max/4);\n\n }", "function plotChart_time(uberPool_time, uberX_time, uberXL_time, black_time,\n\t\t\t\t\tlyft_line_time, lyft_time, lyft_plus_time, lyft_lux_time) {\n\tconsole.log(\"--jiayi time----------\")\n\tconsole.log(uberPool_time, uberX_time, uberXL_time, black_time,\n\t\t\t\t\tlyft_line_time, lyft_time, lyft_plus_time, lyft_lux_time)\n\tdocument.getElementById('uberPool_time').value = uberPool_time;\n document.getElementById('uberX_time').value = uberX_time;\n document.getElementById('uberXL_time').value = uberXL_time;\n document.getElementById('black_time').value = black_time;\n// document.getElementById('uberlower_time').value = Math.min(uberPool_time, uberX_time, uberXL_time, black_time);\n\n document.getElementById('lyft_line_time').value = lyft_line_time;\n document.getElementById('lyft_time').value = lyft_time;\n document.getElementById('lyft_plus_time').value = lyft_plus_time;\n document.getElementById('lyft_lux_time').value = lyft_lux_time;\n// document.getElementById('lyftlower_time').value = Math.min(lyft_line_time, lyft_time, lyft_plus_time, lyft_lux_time);\n\n $('#tripmap').show();\n\t$('#rateChart').show();\n}", "setProperties() {\n this.minTime = this.dom.el.dataset.minTime || 0;\n }", "function vectorTimerMin(time, minOn, minOff){\n print('[iOLED-FIRMWARE][vectorTimerHour] Build Minute vector timer ...');\n\n let minOn = JSON.parse(minOn);\n let minOff = JSON.parse(minOff);\n\n if (minOff > minOn){\n for(let i = 0; i < 60; i++){\n yMin[i] = 0;\n if (time[i] >= minOn && time[i] < minOff){\n yMin[i] = 1;\n }\n }\n }\n\n if (minOn > minOff){\n for(let i = 0; i < 60; i++){\n yMin[i] = 1;\n if (time[i] >= minOff && time[i] < minOn){\n yMin[i] = 0;\n }\n }\n }\n\n return yMin\n}", "function customRange(input)\n {\n return {\n minDate: $('#edate').val()\n };\n }", "function setMinEnd() {\n var startInput = $('#startTime').val();\n var minEndHoursI = parseInt(startInput.substr(0,2)) + 1;\n var minEndHours = minEndHoursI.toString();\n var minEnd = minEndHours + ':00';\n\n if(minEndHoursI < 10) {\n minEnd = '0' + minEnd;\n }\n\n $('#endTime').attr('min', minEnd);\n}", "function extractminortimes (profile) {\n var t1 = unnest([profile], \"fragmentProfile\", \"ma\");\n var t2 = unnest(t1, \"ma.minorFragmentProfile\", \"mi\");\n\n var timetable = $.map(t2, function (record, index) {\n var newrec = {\n \"name\" : record.ma.majorFragmentId + \"-\" +\n record.mi.minorFragmentId,\n \"category\" : record.ma.majorFragmentId,\n \"start\" : (record.mi.startTime - record.start) / 1000.0,\n \"end\" : (record.mi.endTime - record.start) / 1000.0\n };\n return newrec;\n });\n\n timetable.sort(function (r1, r2) {\n if (r1.category == r2.category) {\n //return r1.name > r2.name;\n return r1.end - r1.start > r2.end - r2.start ? 1 : -1;\n }\n else return r1.category > r2.category ? 1 : -1;\n\n });\n return timetable;\n }", "function onTimeChange() {\r\n if(hr*60+min>=range[1]) {\r\n onHourChange();\r\n }\r\n else {\r\n updateTimer();\r\n } \r\n }", "function TimeRange(start, end) {\n // Time user may start task work\n this.start = start;\n // Time user must finish task work\n this.end = end;\n}", "function OpenTimeSection(props) {\n // const { data: records } = props;\n if (props.data.length) {\n // const weekdays = records.reduce(\n // (days, record) => [...days, ...record.weekdays],\n // [],\n // );\n // const maxRange = records.reduce((range, record) => {\n // const recordRange = {\n // start: moment.utc(record.start).local(),\n // until: moment.utc(record.until).local(),\n // };\n // if (!range) {\n // return recordRange;\n // }\n // return {\n // start: early(range.start, recordRange.start),\n // until: late(range.until, recordRange.until),\n // };\n // }, undefined);\n const opentimes = props.data.reduce((init, current) => {\n if (\n init.length === 0 ||\n init[init.length - 1].weekdays.toString() !==\n current.weekdays.toString()\n ) {\n init.push({\n weekdays: current.weekdays,\n rangeTime: [{ start: current.start, until: current.until }],\n });\n } else if (\n init[init.length - 1].weekdays.toString() ===\n current.weekdays.toString()\n ) {\n init[init.length - 1].rangeTime.push({\n start: current.start,\n until: current.until,\n });\n }\n return init;\n }, []);\n\n // const renturnRange = (start, until) => {\n // const Range = {\n // start: moment.utc(start).local(),\n // until: moment.utc(until).local(),\n // };\n // return Range;\n // };\n\n // 合并星期数\n const weeks = opentimes\n .map((item) => item.weekdays)\n .reduce((acc, cur) => acc.concat(cur), []);\n // // 设置初始的星期数\n // const [timeIndex, setTimeIndex] = useState(Math.min(...weeks));\n // // 设置初始的大时间段\n // const [weekday, setWeekday] = useState(\n // opentimes.find((d) => d.weekdays.includes(timeIndex)).weekdays,\n // );\n\n const returnMinMaxRange = () => {\n const allStart = [];\n const allUntil = [];\n opentimes.forEach((opentime) => {\n opentime.rangeTime.forEach((range) => {\n allStart.push(moment(range.start));\n allUntil.push(moment(range.until));\n });\n });\n\n return {\n start: moment.min(allStart).local(),\n until: moment.max(allUntil).local(),\n };\n };\n\n const minMaxRange = returnMinMaxRange();\n return (\n <FtBlock\n title={\n <span className=\"padding_x_5\">\n <TranslatableMessage message={intlMessages.sectionTitle} />\n </span>\n }\n className=\"ViewOpenTime\"\n noPadding\n >\n <div className=\"padding_t_5\">\n <WeekdayWidget selected={weeks} />\n <div className=\"ViewOpenTime__rangeLabel\">\n {`${minMaxRange.start.format(\n 'HH:mm',\n )} -- ${minMaxRange.until.format('HH:mm')}`}\n </div>\n </div>\n\n {/* 多时段显示 */}\n {/* {opentimes.map((time, i) => (\n <div key={i} className=\"padding_t_5 ViewOpenTime__range\">\n <WeekdayWidget selected={time.weekdays} />\n {time.rangeTime.map((range, index) => (\n <div key={index} className=\"ViewOpenTime__rangeLabel\">\n {`${renturnRange(range.start, range.until).start.format(\n 'HH:mm',\n )} -- ${renturnRange(range.start, range.until).until.format(\n 'HH:mm',\n )}`}\n </div>\n ))}\n </div>\n ))} */}\n\n {/* 整合多时段显示 */}\n {/* <div className=\"ViewOpenTime__block\">\n {[...new Array(7)].map((_, i) => (\n <SvgIcon\n key={i}\n icon={`weekday-${i}`}\n className={classNames('ViewOpenTime__item', {\n 'is-selected': weeks && weeks.indexOf(i) > -1,\n 'is-show': weekday.includes(i),\n })}\n disabled={weeks && weeks.indexOf(i) === -1}\n onClick={() => {\n setTimeIndex(i);\n setWeekday(\n opentimes.find((d) => d.weekdays.includes(i)).weekdays,\n );\n }}\n />\n ))}\n </div>\n <div className=\"ViewOpenTime__range\">\n {opentimes.map(\n (item) =>\n item.weekdays.includes(timeIndex) && (\n <>\n {item.rangeTime.map((range, index) => (\n <div key={index} className=\"ViewOpenTime__rangeLabel\">\n {`${renturnRange(range.start, range.until).start.format(\n 'HH:mm',\n )} -- ${renturnRange(\n range.start,\n range.until,\n ).until.format('HH:mm')}`}\n </div>\n ))}\n </>\n ),\n )}\n </div> */}\n </FtBlock>\n );\n }\n return null;\n}", "setRange(startX, endX) {\n // swap the range if needed\n if (startX > endX) {\n let xbuf = startX;\n startX = endX;\n endX = xbuf;\n }\n\n // correct the range\n startX = Math.max(startX, this.timeRange.startTime);\n endX = Math.min(endX, this.timeRange.endTime);\n\n // apply the new range\n if (startX !== endX) {\n let isZoomed = startX > this.timeRange.startTime || endX < this.timeRange.endTime;\n this._xAxisTag.min = startX;\n this._xAxisTag.max = endX;\n this._xAxisTag.alignToGrid = isZoomed;\n this._zoomMode = isZoomed;\n this._calcAllYRanges();\n this.draw();\n }\n }", "function setupDefaultRange() {\n scope.threeLetterTimezoneLabel = service.browserTimezone();\n var timeResolution;\n // If it was initialized with a range, it will try to use it as a default setup\n if (scope.setRange && scope.setRange.label) {\n const option = _.find(scope.dictionary, { label: scope.setRange.label }) || scope.dictionary[0];\n timeResolution = TimeResolution.timeResolutionFromLocal(option);\n } else if (scope.setRange && scope.setRange.duration && scope.setRange.from) {\n const toHelper = moment(scope.setRange.from).add(scope.setRange.duration.value, scope.setRange.duration.unit);\n const helper = new TimeResolution(scope.setRange.from, toHelper.valueOf());\n const suggestion = helper.suggestedRange();\n timeResolution = new TimeResolution(suggestion.from, suggestion.to, helper.suggestedTimeUnit());\n } else if (scope.setRange && scope.setRange.duration) {\n const option = _.find(scope.dictionary, { duration: scope.setRange.duration });\n if (option) {\n timeResolution = TimeResolution.timeResolutionFromLocal(option);\n } else {\n timeResolution = TimeResolution.timeResolutionFromLocal({ duration: scope.setRange.duration }, scope.setRange.duration.unit);\n timeResolution.selectedRange = { label: 'Custom Range', custom: true };\n }\n } else if (scope.setRange && scope.mode == 'absolute' && scope.setRange.from && scope.setRange.to) {\n const from = moment(scope.setRange.from).seconds(0).milliseconds(0).valueOf();\n const to = moment(scope.setRange.to).seconds(0).milliseconds(0).valueOf();\n timeResolution = new TimeResolution(from, to);\n } else {\n timeResolution = TimeResolution.timeResolutionFromLocal(scope.dictionary[0]);\n }\n scope.internalRange = timeResolution;\n scope.observer.emit('dateTimePicker', timeResolution);\n buildRangeToSave();\n }", "function changeScaleText(ui) {\n\tui = $('#slider-range').slider('option');\n\tvar dateMin = new Date(ui.values[0]);\n\tvar dateMax = new Date(ui.values[1]);\n\n\tvar minMoment = \"From <tt>\" + dateMin.format('d-MM-yyyy hh:mm') + \"</tt>\";\n\tvar maxMoment = \"to <tt>\" + dateMax.format('d-MM-yyyy hh:mm') + \"</tt>\";\n\t\n\t$('#timespan').html(minMoment + \" \" + maxMoment);\n}", "function updateTime() {\n\t\tvar dateTime = tizen.time.getCurrentDateTime(), secondToday = dateTime.getSeconds() + dateTime.getMinutes() * 60 + dateTime.getHours() * 3600,\n\t\tminDigitLeft = document.querySelector(\"#time-min-digit-left\"),\n\t\tminDigitRight = document.querySelector(\"#time-min-digit-right\"),\n\t\thourDigitLeft = document.querySelector(\"#time-hour-digit-left\"), \n\t\thourDigitRight = document.querySelector(\"#time-hour-digit-right\");\n\n\t\tvar minutesNow = (secondToday % 3600) / 60;\n\t\tvar hourNow = (secondToday / 3600);\n\t\tslideDigit(minDigitRight, minutesNow % 10.0);\n\t\tslideDigit(minDigitLeft, minutesNow / 10.0);\n\t\tslideDigit(hourDigitRight, hourNow % 10.0);\n\t\tslideDigit(hourDigitLeft, hourNow / 10.0);\n\t}", "calculateTime(newTime, oldTime) {\n let { startHr, startMin, startType } = this.state;\n \n const { hr: newHr = 0, min: newMin = 0 } = newTime || {};\n const { hr: oldHr = 0, min: oldMin = 0 } = oldTime || {};\n\n let totalHr = newHr - oldHr;\n let totalMin = newMin - oldMin;\n\n // convert extra minutes into hours\n totalHr += (totalMin >= 0 ? (Math.floor(totalMin / 60)) : (Math.ceil(totalMin / 60)));\n totalMin = (totalMin % 60);\n\n // if the total hrs > 12, figure out the 12/24 cycles so that we can just change switch between 'AM' or 'PM'\n // ex. if total hrs is 12, and our end time is 1 PM, then we can set start to 1 AM\n if (Math.abs(totalHr) >= 12) {\n if (Math.floor(Math.abs(totalHr)/12) % 2 == 1) { // if odd, then switch time type\n startType = ((startType === 'PM') ? 'AM' : 'PM');\n }\n totalHr = totalHr % 12;\n }\n\n // Update start hour\n if (totalHr < 0) { // we want to increase start time by totalHrs\n // add total hrs to start time\n startHr += (totalHr * -1);\n if (startHr >= 12) {\n startType = ((startType === 'PM') ? 'AM' : 'PM');\n startHr -= 12;\n }\n } else if (totalHr > 0) { // we want to decrease start time by totalHrs\n if (startHr == 12) {\n startType = ((startType === 'PM') ? 'AM' : 'PM');\n }\n // subtract total hrs from start time\n startHr -= totalHr;\n if (startHr <= 0) {\n if (startHr < 0) {\n startType = ((startType === 'PM') ? 'AM' : 'PM');\n }\n startHr += 12;\n }\n }\n\n // Update start min\n if (totalMin < 0) { // we want to increase start time by totalMin\n // subtract total min from start time \n startMin += (totalMin * -1);\n if (startMin >= 60) {\n startHr++;\n if (startHr == 13) {\n startHr = 1;\n } else if (startHr == 12) {\n startType = ((startType === 'PM') ? 'AM' : 'PM');\n }\n startMin -= 60;\n }\n } else if (totalMin > 0) { // we want to increase start time by totalMin\n // subtract total min from start time \n startMin -= totalMin;\n if (startMin < 0) {\n startHr--;\n if (startHr == 0) {\n startHr = 12;\n } else if (startHr == 11) {\n startType = ((startType === 'PM') ? 'AM' : 'PM');\n }\n startMin += 60;\n }\n }\n\n this.setState({ startHr, startMin, startType });\n }", "function multiTimeFunc(content) {\n var timeToPred = 0;\n times.push(content);\n if (times.length == startStations.length) {\n for (var a = 0; a < times.length; a++) {\n timeToPred += times[a];\n }\n for (let y = 0; y < startEndTimes.length; y++) {\n timeToPred+=startEndTimes[y];\n }\n timeToPred = Math.floor(timeToPred);\n document.getElementById('time' + routeChosen).innerHTML = timeToPred + \" minutes\";\n }\n }", "function getTimefieldTimeBegin() {\n return parseFloat($('#clipBegin').timefield('option', 'value'));\n}", "function MinMaxValidateDateTime(sender, eventArgs)\r\n{\r\n // To avoid a plethora of validation error message, don't do min max validation\r\n // if the target string does not parse as a DateTime. Another validator handles\r\n // that circumstance.\r\n \r\n var dateTimeRegExpValidator = /^((((((0?[13578])|(1[02]))[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\\-\\/\\s]?((0?[1-9])|([1-2][0-9]))))[\\-\\/\\s]?\\d{2}(([02468][048])|([13579][26])))|(((((0?[13578])|(1[02]))[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\\-\\/\\s]?((0?[1-9])|(1[0-9])|(2[0-8]))))[\\-\\/\\s]?\\d{2}(([02468][1235679])|([13579][01345789]))))(\\s(((0?[1-9])|(1[0-2]))\\:([0-5][0-9])((\\s)|(\\:([0-5][0-9])\\s))([AM|PM|am|pm]{2,2})))?$/;\r\n if (eventArgs.Value.match(dateTimeRegExpValidator))\r\n {\r\n var prospectiveDate = Date.parse(eventArgs.Value);\r\n var minDTStr = sender.attributes[\"MinValue\"].value;\r\n var maxDTStr = sender.attributes[\"MaxValue\"].value; \r\n var minDT = Date.parse(minDTStr);\r\n var maxDT = Date.parse(maxDTStr);\r\n eventArgs.IsValid = (minDT <= prospectiveDate) && (maxDT >= prospectiveDate);\r\n }\r\n}", "dateProps(course) {\n const startDate = parseISO(course.start);\n const props = {\n end: {\n minDate: startDate\n },\n timeline_start: {\n minDate: startDate,\n maxDate: parseISO(course.timeline_end)\n },\n timeline_end: {\n minDate: parseISO(course.timeline_start),\n maxDate: parseISO(course.end)\n }\n };\n return props;\n }", "static get minAttackTimeRange()\n {\n return utilities.sec2ms( MultichannelCompressorNode.minAttack );\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}", "extendToCover(min, max) {\r\n let x = this.min;\r\n while (min < x) {\r\n x = DateTimeSequence.ADD_INTERVAL(x, -this.interval, this.unit);\r\n this.sequence.splice(0, 0, x);\r\n }\r\n this.min = x;\r\n x = this.max;\r\n while (x < max) {\r\n x = DateTimeSequence.ADD_INTERVAL(x, this.interval, this.unit);\r\n this.sequence.push(x);\r\n }\r\n this.max = x;\r\n }", "static get minReleaseTimeRange()\n {\n return utilities.sec2ms( MultichannelCompressorNode.minRelease );\n }", "function MakeGeneralTimeManager(dataset){\n //Append the HTML:\n let TimeManager = d3.select(\"#toolbar\").append('div').style(\"display\", \"inline-block\");\n TimeManager.html(\"<label for='from'>From</label>\"\n +\"<input type='text' id='fromTime' name='from' readonly>\"\n +\"<label for='to'>to</label>\"\n +\"<input type='text' id='toTime' name='to' readonly>\");\n\n //Retrieve date range from curent dataset:\n d3.csv(dataset).then(function(data) {\n //convert to numbers:\n data.forEach(function(d) {\n d.fromId = +d.fromId; \n d.sentiment = +d.sentiment;\n d.toId = +d.toId; \n \n //Add the d.time to get a representative variable for slicing:\n let timeData = d.date.split(\"-\");\n d.year = +timeData[0];\n d.month = +timeData[1];\n d.day = +timeData[2];\n });\n \n //now, find min and max dates:\n //We take the maximum (safe) integers in order to make sure our comparisons will pass all tests.\n let minDay = Number.MAX_SAFE_INTEGER;\n let minMonth = Number.MAX_SAFE_INTEGER;\n let minYear = Number.MAX_SAFE_INTEGER;\n //Similairly, we take the minimum (safe) integers for the max:\n let maxDay = Number.MIN_SAFE_INTEGER;\n let maxMonth = Number.MIN_SAFE_INTEGER;\n let maxYear = Number.MIN_SAFE_INTEGER; \n \n data.forEach(function(d) {\n //Check for minimum\n //Check years:\n if (d.year < minYear) {\n minYear = d.year;\n //Check months:\n if (d.month < minMonth) {\n minMonth = d.month;\n //Check days:\n if (d.day < minDay) {\n minDay = d.day;\n }\n }\n }\n \n //Check for maximum\n //Check years:\n if (d.year > maxYear) {\n maxYear = d.year;\n //Check months:\n if (d.month > maxMonth) {\n maxMonth = d.month;\n //Check days:\n if (d.day > maxDay) {\n maxDay = d.day;\n }\n }\n }\n });\n \n //Load the HTML elements:\n let fromField = document.getElementById(\"fromTime\");\n let toField = document.getElementById(\"toTime\");\n\n $( function() {\n var dateFormat = \"dd/mm/yy\",\n from = $( \"#fromTime\" )\n .datepicker({\n dateFormat : \"dd/mm/yy\" ,\n defaultDate: new Date(minYear, minMonth, minDay),\n changeMonth: true,\n numberOfMonths: 1,\n minDate: new Date(minYear, minMonth, minDay), \n maxDate: new Date(maxYear, maxMonth, maxDay),\n showAnim: \"fadeIn\",\n showWeek: true,\n firstDay: 1,\n changeYear: true,\n setDate: $.datepicker.formatDate('dd/mm/yy', new Date(minYear, minMonth, minDay))\n })\n .on( \"change\", function() {\n to.datepicker( \"option\", \"minDate\", fromField.value );\n AlertVisualisationsDate();\n }),\n to = $( \"#toTime\" ).datepicker({\n dateFormat : 'dd/mm/yy' ,\n defaultDate: new Date(maxYear, maxMonth, maxDay),\n changeMonth: true,\n numberOfMonths: 1,\n minDate: new Date(minYear, minMonth, minDay), \n maxDate: new Date(maxYear, maxMonth, maxDay),\n showAnim: \"fadeIn\",\n showWeek: true,\n firstDay: 1,\n changeYear: true,\n setDate: $.datepicker.formatDate('dd/mm/yy', new Date(maxYear, maxMonth, maxDay))\n })\n .on( \"change\", function() {\n from.datepicker( \"option\", \"maxDate\", toField.value );\n AlertVisualisationsDate();\n });\n } );\n }) \n}", "EDIT_LAST15MINUTES(s) {\n const date = new Date();\n s.dateTimeStart = interval(date, 15);\n s.dateTimeEnd = date;\n }", "function computeActiveRange(dateProfile, isComponentAllDay) {\n var range = dateProfile.activeRange;\n\n if (isComponentAllDay) {\n return range;\n }\n\n return {\n start: addMs(range.start, dateProfile.minTime.milliseconds),\n end: addMs(range.end, dateProfile.maxTime.milliseconds - 864e5) // 864e5 = ms in a day\n\n };\n } // exports", "function updateMapTime()\n {\n \t if(eventSliderOb != null)\n \t {\n \t \t//dateTime = eventSliderOb.getDateTime();\n\t\tvar dateTimeStr = eventSliderOb.getDateTimeInitialValue();\n\t\t\n\t\t//Upate with date time parameter\n\t\twmsLayer.paramsOb[timeDim] = dateTimeStr;\n\t\twmsLayer.refresh();\n\t\t \t \t\n \t \tupdateAnimationWidget(dateTimeStr);\n \t }\n }", "function tStart(end){\n\t\t\tvar t = new Date(), f = $scope.event,\n\t\t\tds = f.dateStart, ts = f.timeStart,\n\t\t\tde = f.dateEnd, te = f.timeEnd;\n\t\t\tif(!end){\n\t\t\t\tt.setFullYear(ds.getFullYear(), ds.getMonth(), ds.getDate(), ts.getHours(), ts.getMinutes(), 0, 0);\n\t\t\t\tt.setHours(ts.getHours(), ts.getMinutes(), 0, 0);\n\t\t\t}else{\n\t\t\t\tt.setFullYear(de.getFullYear(), de.getMonth(), de.getDate());\n\t\t\t\tt.setHours(te.getHours(), te.getMinutes(), 0, 0);\n\t\t\t}\n\t\t\treturn roundMinutes(t);\n\t\t}", "function getCurrentTimeInHoursMins(hourField, minField)\n{\n\tvar currentDate = new Date();\n\tvar currentHour = padNumber(currentDate.getHours());\n\tvar currentMin = padNumber(currentDate.getMinutes());\n\t\n\t$('#' + hourField).val(currentHour);\n\t$('#' + minField).val(currentMin);\n}", "_validateMinMax(which, referenceValue) {\n const that = this;\n let minChanged = false;\n\n if (which !== 'max') {\n that.min = JQX.Utilities.DateTime.validateDate(that.min, referenceValue || new JQX.Utilities.DateTime(1600, 1, 1), that.formatString);\n that.min = that.min.toTimeZone(that._outputTimeZone);\n minChanged = true;\n }\n\n if (which !== 'min') {\n that.max = JQX.Utilities.DateTime.validateDate(that.max, referenceValue || new JQX.Utilities.DateTime(3001, 1, 1), that.formatString);\n that.max = that.max.toTimeZone(that._outputTimeZone);\n\n that.max.calendar.days = that._localizedDays;\n that.max.calendar.months = that._localizedMonths;\n that.max.calendar.locale = that.locale;\n\n that.$.calendarDropDown.max = that.max.toDate();\n }\n\n if (that.min.compare(that.max) > 0) {\n that.min = that.max.clone();\n minChanged = true;\n }\n\n if (minChanged) {\n that.min.calendar.days = that._localizedDays;\n that.min.calendar.months = that._localizedMonths;\n that.min.calendar.locale = that.locale;\n\n that.$.calendarDropDown.min = that.min.toDate();\n }\n }", "updateNextMinuteData(minCount, minPosition) {\n // console.log(`minCount: ${minCount}, minPosition: ${minPosition}`);\n if (minPosition === 0) {\n // console.log(\"adding some visitors\");\n this.visitorsInMin = this.waitingVisitors.filter((visitor) => {\n let arrival = Number.parseInt(visitor.arrival);\n return arrival == minCount + 2;\n });\n // console.log(JSON.stringify(this.visitorsInMin));\n if (this.visitorsInMin.length > 0) {\n this.framesPerVisitor = Math.floor(this.framesPerMin / this.visitorsInMin.length);\n } else {\n this.framesPerVisitor = this.framesPerMin;\n }\n }\n }", "function alterGamerRange(min, max) {\n if (min >= 10) {\n min -= 10;\n } else if (min < 10) {\n min = 0;\n }\n max += 10;\n }", "setUp() {\n const earliestTime = new Date(Math.min.apply(null,this.dayData.map(function(d){return d.HappendAt})))//this.dayData[this.dayData.length - 2].HappendAt;\n const minValue = dt.dateToSeconds(earliestTime);\n const maxValue = dt.dateToSeconds(this.dayEndTime);\n const maxString = dt.dateToInputTimeString(this.dayEndTime);\n $(slider).attr('min', minValue);\n\n $('.startTime').val(dt.dateToInputTimeString(earliestTime));\n //If there is a change of date/html is not set\n if ($('.sliderOutput').val() == '' || changeDateVariable)\n $('.sliderOutput').val(maxString);\n\n //Check if use current time\n if (useCurrentTime) {\n if (!currentTimeInterval) this.runCurrentInterval();\n } else {\n clearInterval(currentTimeInterval);\n currentTimeInterval = null;\n $('#now').hide();\n $(slider).attr('max', maxValue);\n if (changeDateVariable) {\n if (currentDay)\n return this.dataNewTime(dt.secondsToDate($(slider).val()));\n changeDateVariable = false;\n $('.sliderOutput').val(maxString);\n $(slider).val(maxValue);\n this.dataNewTime(this.dayEndTime);\n } else this.dataNewTime(dt.secondsToDate($(slider).val()));\n }\n }", "function evaluateTime() {\n $(\".time-block\").each (function() {\n hourField = Number($(this).attr(\"data-time\"));\n currentHour = Number(moment().format(\"k\"));\n if (hourField < currentHour) {\n $(this).addClass(\"past\");\n } else if (hourField > currentHour) {\n $(this).removeClass(\"present\");\n $(this).addClass(\"future\");\n } else {\n $(this).removeClass(\"past\");\n $(this).addClass(\"present\");\n }\n });\n }", "function getRange( from, to ){\t\t\n\t\treturn ( ( convertToMinute( to )-convertToMinute( from ) )/15 );\n\t}", "reset_extents(min, max) {\n const ds = this.jdiv.find('#time-slider')\n const vals = ds.dragslider('values')\n ds.dragslider('option', 'min', min)\n ds.dragslider('option', 'max', max)\n ds.dragslider('values', vals) // Restore values after setting min/max to fix slider location bug\n\n this.llabel.html(numberWithCommas(min))\n this.rlabel.html(numberWithCommas(max))\n }", "function countNoMinBetween(startTime, endTime){\n console.log(\"startTime\",startTime);\n console.log(\"endTime\",endTime);\n var total = 0;\n var hourNo = 0;// = Math.floor(total/100);\n var minNo = 0;//total%100;\n if(endTime > startTime) {\n total = endTime - startTime;\n hourNo = Math.floor(total/100);\n minNo = total%100;\n if(minNo > 60) minNo -= 60;\n }\n else{\n total = 2359 - (startTime - endTime);\n hourNo = Math.floor(total/100);\n minNo = total%100;\n if(minNo >= 60) {\n hourNo +=1;\n minNo -= 60;\n }\n }\n return hourNo*60 + minNo;\n}", "_getMinDate() {\n return moment.utc().add(5, 'minutes');\n }", "function setMinTime(inp) {\n $('#confDTButton').removeAttr('disabled');\n var today = new Date();\n\n if($(inp).val() == $(inp).attr('min')) {\n var now = today.getHours();\n var changeTime = true;\n\n //Disable fixed slots if the booking time exceed the starting time\n if(now >= 8 && now < 14) { //Booking between 8:00 (incl) and 14:00 (excl)\n $('#day').attr('disabled', 'true');\n $('#morning').attr('disabled', 'true');\n } else if(now >= 14 && now < 19) { //Booking between 14:00 (incl) and 19:00 (excl)\n $('#day').attr('disabled', 'true');\n $('#morning').attr('disabled', 'true');\n $('#afternoon').attr('disabled', 'true');\n } else if(now >= 19) { //Booking after 19:00 (incl)\n $('#day').attr('disabled', 'true');\n $('#morning').attr('disabled', 'true');\n $('#afternoon').attr('disabled', 'true');\n $('#customTime').attr('disabled', 'true');\n $('#confDTButton').attr('disabled', 'true');\n changeTime = false;\n }\n\n //Update custom time restriction\n if(changeTime) {\n ++now;\n var next = now + 1;\n\n now.toString();\n next.toString();\n\n now = now + \":00\";\n next = next + \":00\";\n\n if(now < 10) {\n now = '0' + now;\n }\n\n if(next < 10) {\n next = '0' + next;\n }\n\n $('#startTime').attr('min', now);\n $('#startTime').attr('value', now);\n $('#endTime').attr('min', next);\n $('#endTime').attr('value', next);\n }\n } else {\n $('#day').removeAttr('disabled');\n $('#morning').removeAttr('disabled');\n $('#afternoon').removeAttr('disabled');\n $('#customTime').removeAttr('disabled');\n }\n}", "function tpEndSelect( time, startTimePickerInst ) {\n $('#eventStartTime').timepicker('option', {\n maxTime: {\n hour: startTimePickerInst.hours,\n minute: startTimePickerInst.minutes\n }\n });\n}", "function getTimeOptions(time_type){\n var time_options = { unit: 'minute', displayFormats: { 'second': 'mm:ss', 'minute': 'mm:ss'},tooltipFormat: \"mm:ss\" };\n\n if(time_type == 'time'){\n return time_options;\n }\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 }", "get isResourceTimeRange() {\n return true;\n }", "get isResourceTimeRange() {\n return true;\n }", "get_presenceMinTime()\n {\n return this.liveFunc._presenceMinTime;\n }", "function getTimeDomain(data) {\n return data.reduce((acc, row) => {\n const epochTime = (new Date(row.date)).getTime();\n return {\n minVal: Math.min(epochTime, acc.minVal),\n maxVal: Math.max(epochTime, acc.maxVal),\n min: epochTime < acc.minVal ? row.date : acc.min,\n max: epochTime > acc.maxVal ? row.date : acc.max\n };\n }, {minVal: Infinity, maxVal: -Infinity, min: null, max: null});\n}", "function sendTimeChangeMessage(bounds) {\n var msg = {}\n msg.time = {\"min\":bounds[0],\"max\":bounds[1]}\n console.log(\"sending time msg:\",msg)\n OWF.Eventing.publish(twitter_geomap.config.timeChangeChannel,JSON.stringify(msg))\n}", "function setHoursFromInputs() {\n\t\tif (!self.config.enableTime) return;\n\n\t\tvar hours = (parseInt(self.hourElement.value, 10) || 0) % (self.amPM ? 12 : 24),\n\t\t minutes = (parseInt(self.minuteElement.value, 10) || 0) % 60,\n\t\t seconds = self.config.enableSeconds ? (parseInt(self.secondElement.value, 10) || 0) % 60 : 0;\n\n\t\tif (self.amPM !== undefined) hours = hours % 12 + 12 * (self.amPM.textContent === \"PM\");\n\n\t\tif (self.minDateHasTime && compareDates(self.latestSelectedDateObj, self.config.minDate) === 0) {\n\n\t\t\thours = Math.max(hours, self.config.minDate.getHours());\n\t\t\tif (hours === self.config.minDate.getHours()) minutes = Math.max(minutes, self.config.minDate.getMinutes());\n\t\t}\n\n\t\tif (self.maxDateHasTime && compareDates(self.latestSelectedDateObj, self.config.maxDate) === 0) {\n\t\t\thours = Math.min(hours, self.config.maxDate.getHours());\n\t\t\tif (hours === self.config.maxDate.getHours()) minutes = Math.min(minutes, self.config.maxDate.getMinutes());\n\t\t}\n\n\t\tsetHours(hours, minutes, seconds);\n\t}", "function setHoursFromInputs() {\n\t\tif (!self.config.enableTime) return;\n\n\t\tvar hours = (parseInt(self.hourElement.value, 10) || 0) % (self.amPM ? 12 : 24),\n\t\t minutes = (parseInt(self.minuteElement.value, 10) || 0) % 60,\n\t\t seconds = self.config.enableSeconds ? (parseInt(self.secondElement.value, 10) || 0) % 60 : 0;\n\n\t\tif (self.amPM !== undefined) hours = hours % 12 + 12 * (self.amPM.textContent === \"PM\");\n\n\t\tif (self.minDateHasTime && compareDates(self.latestSelectedDateObj, self.config.minDate) === 0) {\n\n\t\t\thours = Math.max(hours, self.config.minDate.getHours());\n\t\t\tif (hours === self.config.minDate.getHours()) minutes = Math.max(minutes, self.config.minDate.getMinutes());\n\t\t}\n\n\t\tif (self.maxDateHasTime && compareDates(self.latestSelectedDateObj, self.config.maxDate) === 0) {\n\t\t\thours = Math.min(hours, self.config.maxDate.getHours());\n\t\t\tif (hours === self.config.maxDate.getHours()) minutes = Math.min(minutes, self.config.maxDate.getMinutes());\n\t\t}\n\n\t\tsetHours(hours, minutes, seconds);\n\t}" ]
[ "0.69175416", "0.63997513", "0.63008296", "0.6137315", "0.6129289", "0.6018443", "0.601448", "0.60069543", "0.59492534", "0.5930201", "0.5925246", "0.5924318", "0.5895317", "0.5850802", "0.5850802", "0.5850802", "0.5850802", "0.5850802", "0.58504224", "0.5841004", "0.5827201", "0.5815945", "0.5814076", "0.58008397", "0.5768769", "0.5764814", "0.57590455", "0.5744977", "0.57363355", "0.5706802", "0.57047385", "0.5697659", "0.5655201", "0.5645652", "0.56435126", "0.5620247", "0.5608643", "0.5607376", "0.5594532", "0.55857223", "0.5580291", "0.55771834", "0.55612046", "0.5558867", "0.5530379", "0.5530181", "0.5519069", "0.5517286", "0.5517025", "0.5513124", "0.55087155", "0.55025727", "0.5491085", "0.5485449", "0.548297", "0.54799056", "0.547547", "0.54391026", "0.5438758", "0.54276556", "0.542259", "0.54198617", "0.5406531", "0.5406222", "0.54045296", "0.5402533", "0.5400688", "0.53882337", "0.5386387", "0.53745276", "0.5373745", "0.53708124", "0.5370226", "0.5366717", "0.53631073", "0.5359859", "0.5356353", "0.53532386", "0.53463125", "0.53435916", "0.5335919", "0.53321785", "0.5313407", "0.5311185", "0.5298686", "0.52979475", "0.528986", "0.528681", "0.5281531", "0.5274019", "0.52731735", "0.5273004", "0.52703667", "0.52694994", "0.5267978", "0.5267978", "0.52665704", "0.5264959", "0.52582926", "0.5255138", "0.5255138" ]
0.0
-1
populates empty cells from the current column (`col`) to `endCol`
function emptyCellsUntil(endCol) { while (col < endCol) { // try to grab a cell from the level above and extend its rowspan. otherwise, create a fresh cell td = (loneCellMatrix[i - 1] || [])[col]; if (td) { td.rowSpan = (td.rowSpan || 1) + 1; } else { td = document.createElement('td'); tr.appendChild(td); } cellMatrix[i][col] = td; loneCellMatrix[i][col] = td; col++; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function emptyCellsUntil(endCol) {\n while (col < endCol) {\n // try to grab a cell from the level above and extend its rowspan. otherwise, create a fresh cell\n td = (loneCellMatrix[i - 1] || [])[col];\n if (td) {\n td.rowSpan = (td.rowSpan || 1) + 1;\n }\n else {\n td = document.createElement('td');\n tr.appendChild(td);\n }\n cellMatrix[i][col] = td;\n loneCellMatrix[i][col] = td;\n col++;\n }\n }", "function emptyCellsUntil(endCol) {\n while (col < endCol) {\n // try to grab a cell from the level above and extend its rowspan. otherwise, create a fresh cell\n td = (loneCellMatrix[i - 1] || [])[col];\n if (td) {\n td.attr('rowspan', parseInt(td.attr('rowspan') || 1, 10) + 1);\n }\n else {\n td = $('<td/>');\n tr.append(td);\n }\n cellMatrix[i][col] = td;\n loneCellMatrix[i][col] = td;\n col++;\n }\n }", "function emptyCellsUntil(endCol) {\n while (col < endCol) {\n // try to grab a cell from the level above and extend its rowspan. otherwise, create a fresh cell\n td = (loneCellMatrix[i - 1] || [])[col];\n if (td) {\n td.attr('rowspan', parseInt(td.attr('rowspan') || 1, 10) + 1);\n }\n else {\n td = $('<td/>');\n tr.append(td);\n }\n cellMatrix[i][col] = td;\n loneCellMatrix[i][col] = td;\n col++;\n }\n }", "function emptyCellsUntil(endCol) {\n while (col < endCol) {\n // try to grab a cell from the level above and extend its rowspan. otherwise, create a fresh cell\n td = (loneCellMatrix[i - 1] || [])[col];\n if (td) {\n td.attr('rowspan', parseInt(td.attr('rowspan') || 1, 10) + 1);\n }\n else {\n td = $('<td/>');\n tr.append(td);\n }\n cellMatrix[i][col] = td;\n loneCellMatrix[i][col] = td;\n col++;\n }\n }", "function emptyCellsUntil(endCol) {\n while (col < endCol) {\n // try to grab a cell from the level above and extend its rowspan. otherwise, create a fresh cell\n td = (loneCellMatrix[i - 1] || [])[col];\n if (td) {\n td.attr('rowspan', parseInt(td.attr('rowspan') || 1, 10) + 1);\n }\n else {\n td = $('<td/>');\n tr.append(td);\n }\n cellMatrix[i][col] = td;\n loneCellMatrix[i][col] = td;\n col++;\n }\n }", "function emptyCellsUntil(endCol) {\n while (col < endCol) {\n // try to grab a cell from the level above and extend its rowspan. otherwise, create a fresh cell\n td = (loneCellMatrix[i - 1] || [])[col];\n if (td) {\n td.attr(\n 'rowspan',\n parseInt(td.attr('rowspan') || 1, 10) + 1\n );\n }\n else {\n td = $('<td/>');\n tr.append(td);\n }\n cellMatrix[i][col] = td;\n loneCellMatrix[i][col] = td;\n col++;\n }\n }", "function emptyCellsUntil(endCol) {\n while (col < endCol) {\n // try to grab a cell from the level above and extend its rowspan. otherwise, create a fresh cell\n td = (loneCellMatrix[i - 1] || [])[col];\n\n if (td) {\n td.rowSpan = (td.rowSpan || 1) + 1;\n } else {\n td = document.createElement('td');\n tr.appendChild(td);\n }\n\n cellMatrix[i][col] = td;\n loneCellMatrix[i][col] = td;\n col++;\n }\n }", "function emptyCellsUntil(endCol) {\n\t\t\twhile (col < endCol) {\n\t\t\t\t// try to grab a cell from the level above and extend its rowspan. otherwise, create a fresh cell\n\t\t\t\ttd = (loneCellMatrix[i - 1] || [])[col];\n\t\t\t\tif (td) {\n\t\t\t\t\ttd.attr(\n\t\t\t\t\t\t'rowspan',\n\t\t\t\t\t\tparseInt(td.attr('rowspan') || 1, 10) + 1\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\ttd = $('<td/>');\n\t\t\t\t\ttr.append(td);\n\t\t\t\t}\n\t\t\t\tcellMatrix[i][col] = td;\n\t\t\t\tloneCellMatrix[i][col] = td;\n\t\t\t\tcol++;\n\t\t\t}\n\t\t}", "function emptyCellsUntil(endCol) {\n\t\t\twhile (col < endCol) {\n\t\t\t\t// try to grab a cell from the level above and extend its rowspan. otherwise, create a fresh cell\n\t\t\t\ttd = (loneCellMatrix[i - 1] || [])[col];\n\t\t\t\tif (td) {\n\t\t\t\t\ttd.attr(\n\t\t\t\t\t\t'rowspan',\n\t\t\t\t\t\tparseInt(td.attr('rowspan') || 1, 10) + 1\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\ttd = $('<td/>');\n\t\t\t\t\ttr.append(td);\n\t\t\t\t}\n\t\t\t\tcellMatrix[i][col] = td;\n\t\t\t\tloneCellMatrix[i][col] = td;\n\t\t\t\tcol++;\n\t\t\t}\n\t\t}", "function emptyCellsUntil(endCol) {\n\t\t\twhile (col < endCol) {\n\t\t\t\t// try to grab a cell from the level above and extend its rowspan. otherwise, create a fresh cell\n\t\t\t\ttd = (loneCellMatrix[i - 1] || [])[col];\n\t\t\t\tif (td) {\n\t\t\t\t\ttd.attr(\n\t\t\t\t\t\t'rowspan',\n\t\t\t\t\t\tparseInt(td.attr('rowspan') || 1, 10) + 1\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\ttd = $('<td/>');\n\t\t\t\t\ttr.append(td);\n\t\t\t\t}\n\t\t\t\tcellMatrix[i][col] = td;\n\t\t\t\tloneCellMatrix[i][col] = td;\n\t\t\t\tcol++;\n\t\t\t}\n\t\t}", "function emptyCellsUntil(endCol) {\n\t\t\twhile (col < endCol) {\n\t\t\t\t// try to grab a cell from the level above and extend its rowspan. otherwise, create a fresh cell\n\t\t\t\ttd = (loneCellMatrix[i - 1] || [])[col];\n\t\t\t\tif (td) {\n\t\t\t\t\ttd.attr(\n\t\t\t\t\t\t'rowspan',\n\t\t\t\t\t\tparseInt(td.attr('rowspan') || 1, 10) + 1\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\ttd = $('<td/>');\n\t\t\t\t\ttr.append(td);\n\t\t\t\t}\n\t\t\t\tcellMatrix[i][col] = td;\n\t\t\t\tloneCellMatrix[i][col] = td;\n\t\t\t\tcol++;\n\t\t\t}\n\t\t}", "function emptyCellsUntil(endCol) {\n\t\t\twhile (col < endCol) {\n\t\t\t\t// try to grab a cell from the level above and extend its rowspan. otherwise, create a fresh cell\n\t\t\t\ttd = (loneCellMatrix[i - 1] || [])[col];\n\t\t\t\tif (td) {\n\t\t\t\t\ttd.attr(\n\t\t\t\t\t\t'rowspan',\n\t\t\t\t\t\tparseInt(td.attr('rowspan') || 1, 10) + 1\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\ttd = $('<td/>');\n\t\t\t\t\ttr.append(td);\n\t\t\t\t}\n\t\t\t\tcellMatrix[i][col] = td;\n\t\t\t\tloneCellMatrix[i][col] = td;\n\t\t\t\tcol++;\n\t\t\t}\n\t\t}", "function emptyCellsUntil(endCol) {\n\t\t\twhile (col < endCol) {\n\t\t\t\t// try to grab a cell from the level above and extend its rowspan. otherwise, create a fresh cell\n\t\t\t\ttd = (loneCellMatrix[i - 1] || [])[col];\n\t\t\t\tif (td) {\n\t\t\t\t\ttd.attr(\n\t\t\t\t\t\t'rowspan',\n\t\t\t\t\t\tparseInt(td.attr('rowspan') || 1, 10) + 1\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\ttd = $('<td/>');\n\t\t\t\t\ttr.append(td);\n\t\t\t\t}\n\t\t\t\tcellMatrix[i][col] = td;\n\t\t\t\tloneCellMatrix[i][col] = td;\n\t\t\t\tcol++;\n\t\t\t}\n\t\t}", "function emptyCellsUntil(endCol) {\n\t\t\twhile (col < endCol) {\n\t\t\t\t// try to grab a cell from the level above and extend its rowspan. otherwise, create a fresh cell\n\t\t\t\ttd = (loneCellMatrix[i - 1] || [])[col];\n\t\t\t\tif (td) {\n\t\t\t\t\ttd.attr(\n\t\t\t\t\t\t'rowspan',\n\t\t\t\t\t\tparseInt(td.attr('rowspan') || 1, 10) + 1\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\ttd = $('<td/>');\n\t\t\t\t\ttr.append(td);\n\t\t\t\t}\n\t\t\t\tcellMatrix[i][col] = td;\n\t\t\t\tloneCellMatrix[i][col] = td;\n\t\t\t\tcol++;\n\t\t\t}\n\t\t}", "function emptyCellsUntil(endCol) {\n\t\t\twhile (col < endCol) {\n\t\t\t\t// try to grab a cell from the level above and extend its rowspan. otherwise, create a fresh cell\n\t\t\t\ttd = (loneCellMatrix[i - 1] || [])[col];\n\t\t\t\tif (td) {\n\t\t\t\t\ttd.attr(\n\t\t\t\t\t\t'rowspan',\n\t\t\t\t\t\tparseInt(td.attr('rowspan') || 1, 10) + 1\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\ttd = $('<td/>');\n\t\t\t\t\ttr.append(td);\n\t\t\t\t}\n\t\t\t\tcellMatrix[i][col] = td;\n\t\t\t\tloneCellMatrix[i][col] = td;\n\t\t\t\tcol++;\n\t\t\t}\n\t\t}", "function emptyCellsUntil(endCol) {\n\t\t\t\twhile (col < endCol) {\n\t\t\t\t\t// try to grab a cell from the level above and extend its rowspan. otherwise, create a fresh cell\n\t\t\t\t\ttd = (loneCellMatrix[i - 1] || [])[col];\n\t\t\t\t\tif (td) {\n\t\t\t\t\t\ttd.attr(\n\t\t\t\t\t\t\t'rowspan',\n\t\t\t\t\t\t\tparseInt(td.attr('rowspan') || 1, 10) + 1\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\ttd = $('<td/>');\n\t\t\t\t\t\ttr.append(td);\n\t\t\t\t\t}\n\t\t\t\t\tcellMatrix[i][col] = td;\n\t\t\t\t\tloneCellMatrix[i][col] = td;\n\t\t\t\t\tcol++;\n\t\t\t\t}\n\t\t\t}", "function emptyCellsUntil(endCol){while(col<endCol){// try to grab a cell from the level above and extend its rowspan. otherwise, create a fresh cell\ntd=(loneCellMatrix[i-1]||[])[col];if(td){td.attr('rowspan',parseInt(td.attr('rowspan')||1,10)+1);}else{td=$('<td/>');tr.append(td);}cellMatrix[i][col]=td;loneCellMatrix[i][col]=td;col++;}}", "function emptyCellsUntil(endCol) { // goes from current `col` to `endCol`\n while (col < endCol) {\n cell = _this.getCell(row, col);\n segsBelow = _this.getCellSegs(cell, levelLimit);\n if (segsBelow.length) {\n td = cellMatrix[levelLimit - 1][col];\n moreLink = _this.renderMoreLink(cell, segsBelow);\n moreWrap = $('<div/>').append(moreLink);\n td.append(moreWrap);\n moreNodes.push(moreWrap[0]);\n }\n col++;\n }\n }", "function emptyCellsUntil(endCol) { // goes from current `col` to `endCol`\n\t\t\twhile (col < endCol) {\n\t\t\t\tcell = _this.getCell(row, col);\n\t\t\t\tsegsBelow = _this.getCellSegs(cell, levelLimit);\n\t\t\t\tif (segsBelow.length) {\n\t\t\t\t\ttd = cellMatrix[levelLimit - 1][col];\n\t\t\t\t\tmoreLink = _this.renderMoreLink(cell, segsBelow);\n\t\t\t\t\tmoreWrap = $('<div/>').append(moreLink);\n\t\t\t\t\ttd.append(moreWrap);\n\t\t\t\t\tmoreNodes.push(moreWrap[0]);\n\t\t\t\t}\n\t\t\t\tcol++;\n\t\t\t}\n\t\t}", "function emptyCellsUntil(endCol) { // goes from current `col` to `endCol`\n\t\t\twhile (col < endCol) {\n\t\t\t\tsegsBelow = _this.getCellSegs(row, col, levelLimit);\n\t\t\t\tif (segsBelow.length) {\n\t\t\t\t\ttd = cellMatrix[levelLimit - 1][col];\n\t\t\t\t\tmoreLink = _this.renderMoreLink(row, col, segsBelow);\n\t\t\t\t\tmoreWrap = $('<div/>').append(moreLink);\n\t\t\t\t\ttd.append(moreWrap);\n\t\t\t\t\tmoreNodes.push(moreWrap[0]);\n\t\t\t\t}\n\t\t\t\tcol++;\n\t\t\t}\n\t\t}", "function emptyCellsUntil(endCol) { // goes from current `col` to `endCol`\n\t\t\twhile (col < endCol) {\n\t\t\t\tsegsBelow = _this.getCellSegs(row, col, levelLimit);\n\t\t\t\tif (segsBelow.length) {\n\t\t\t\t\ttd = cellMatrix[levelLimit - 1][col];\n\t\t\t\t\tmoreLink = _this.renderMoreLink(row, col, segsBelow);\n\t\t\t\t\tmoreWrap = $('<div/>').append(moreLink);\n\t\t\t\t\ttd.append(moreWrap);\n\t\t\t\t\tmoreNodes.push(moreWrap[0]);\n\t\t\t\t}\n\t\t\t\tcol++;\n\t\t\t}\n\t\t}", "function emptyCellsUntil(endCol) { // goes from current `col` to `endCol`\n\t\t\twhile (col < endCol) {\n\t\t\t\tsegsBelow = _this.getCellSegs(row, col, levelLimit);\n\t\t\t\tif (segsBelow.length) {\n\t\t\t\t\ttd = cellMatrix[levelLimit - 1][col];\n\t\t\t\t\tmoreLink = _this.renderMoreLink(row, col, segsBelow);\n\t\t\t\t\tmoreWrap = $('<div/>').append(moreLink);\n\t\t\t\t\ttd.append(moreWrap);\n\t\t\t\t\tmoreNodes.push(moreWrap[0]);\n\t\t\t\t}\n\t\t\t\tcol++;\n\t\t\t}\n\t\t}", "function emptyCellsUntil(endCol) { // goes from current `col` to `endCol`\n\t\t\twhile (col < endCol) {\n\t\t\t\tsegsBelow = _this.getCellSegs(row, col, levelLimit);\n\t\t\t\tif (segsBelow.length) {\n\t\t\t\t\ttd = cellMatrix[levelLimit - 1][col];\n\t\t\t\t\tmoreLink = _this.renderMoreLink(row, col, segsBelow);\n\t\t\t\t\tmoreWrap = $('<div/>').append(moreLink);\n\t\t\t\t\ttd.append(moreWrap);\n\t\t\t\t\tmoreNodes.push(moreWrap[0]);\n\t\t\t\t}\n\t\t\t\tcol++;\n\t\t\t}\n\t\t}", "function emptyCellsUntil(endCol) { // goes from current `col` to `endCol`\n\t\t\twhile (col < endCol) {\n\t\t\t\tsegsBelow = _this.getCellSegs(row, col, levelLimit);\n\t\t\t\tif (segsBelow.length) {\n\t\t\t\t\ttd = cellMatrix[levelLimit - 1][col];\n\t\t\t\t\tmoreLink = _this.renderMoreLink(row, col, segsBelow);\n\t\t\t\t\tmoreWrap = $('<div/>').append(moreLink);\n\t\t\t\t\ttd.append(moreWrap);\n\t\t\t\t\tmoreNodes.push(moreWrap[0]);\n\t\t\t\t}\n\t\t\t\tcol++;\n\t\t\t}\n\t\t}", "function emptyCellsUntil(endCol) { // goes from current `col` to `endCol`\n\t\t\twhile (col < endCol) {\n\t\t\t\tsegsBelow = _this.getCellSegs(row, col, levelLimit);\n\t\t\t\tif (segsBelow.length) {\n\t\t\t\t\ttd = cellMatrix[levelLimit - 1][col];\n\t\t\t\t\tmoreLink = _this.renderMoreLink(row, col, segsBelow);\n\t\t\t\t\tmoreWrap = $('<div/>').append(moreLink);\n\t\t\t\t\ttd.append(moreWrap);\n\t\t\t\t\tmoreNodes.push(moreWrap[0]);\n\t\t\t\t}\n\t\t\t\tcol++;\n\t\t\t}\n\t\t}", "function emptyCellsUntil(endCol) { // goes from current `col` to `endCol`\n\t\t\twhile (col < endCol) {\n\t\t\t\tsegsBelow = _this.getCellSegs(row, col, levelLimit);\n\t\t\t\tif (segsBelow.length) {\n\t\t\t\t\ttd = cellMatrix[levelLimit - 1][col];\n\t\t\t\t\tmoreLink = _this.renderMoreLink(row, col, segsBelow);\n\t\t\t\t\tmoreWrap = $('<div/>').append(moreLink);\n\t\t\t\t\ttd.append(moreWrap);\n\t\t\t\t\tmoreNodes.push(moreWrap[0]);\n\t\t\t\t}\n\t\t\t\tcol++;\n\t\t\t}\n\t\t}", "function emptyCellsUntil(endCol) { // goes from current `col` to `endCol`\n\t\t\t\twhile (col < endCol) {\n\t\t\t\t\tsegsBelow = _this.getCellSegs(row, col, levelLimit);\n\t\t\t\t\tif (segsBelow.length) {\n\t\t\t\t\t\ttd = cellMatrix[levelLimit - 1][col];\n\t\t\t\t\t\tmoreLink = _this.renderMoreLink(row, col, segsBelow);\n\t\t\t\t\t\tmoreWrap = $('<div/>').append(moreLink);\n\t\t\t\t\t\ttd.append(moreWrap);\n\t\t\t\t\t\tmoreNodes.push(moreWrap[0]);\n\t\t\t\t\t}\n\t\t\t\t\tcol++;\n\t\t\t\t}\n\t\t\t}", "function addEmptyCells(agg, row, count) {\n while( count > 0 ) {\n var new_row = new AggConfigResult(agg, 'undefined', '', '');\n row.push(new_row);\n count = count - 1;\n }\n }", "function modifyClearCells(arg, row, column) {\r\n\tvar i = arg.emptyCells.indexOf(String(row) + String(column));\r\n\targ.emptyCells.splice(i, 1);\r\n}", "function fillrowuntil(rownum, colnum){\n \ttn = {};\n \tbeforelength = two_dim_arr[rownum].length;\n \tconsole.info( typeof two_dim_arr[rownum][beforelength-1] == 'object' ? two_dim_arr[rownum][beforelength-1].colnum + two_dim_arr[rownum][beforelength-1].colspan : 0+1);\n \t\n \tvar pointer = ( typeof two_dim_arr[rownum][beforelength-1] == 'object' ? two_dim_arr[rownum][beforelength-1].colnum + two_dim_arr[rownum][beforelength-1].colspan : 0+1);\n \tfor(pointer; pointer <= colnum; pointer ++){\n \t\ttn.raw = '|';\n\t\t\t\ttn.text = ' ' + '\\n';\n\t\t\t\ttn.l = ' ';\n\t\t\t\ttn.r = ' ';\n\t\t\t\ttn.colnum = pointer;\n\t\t\t\ttn.rownum = rownum;\n\t\t\t\ttn.colspan = 1;\n\t\t\t\ttn.rowspan = 1;\n\t\t\t\ttn.height = 1;\n\t\t\t\ttn.h_align = 'default';\n\t\t\t\ttn.v_align = 'default';\n\t\t\t\t\n\t\t\t\ttwo_dim_arr[rownum].push(tn);\n\t\t\t\tconsole.warn('this row was extended to be able to put the content somewhere');\n if(debug){\n console.log(two_dim_arr[rownum]);\n }\n\t\t\t}\n }", "function find_empty(thecol) {\n //console.log('col pass in is', thecol)\n let cell_list = $(`.col[col='${thecol}']`)\n //console.log(cell_list)\n for (let i = cell_list.length - 1; i > -1; i--) {\n let $empty_cell = $(cell_list[i])\n //console.log($empty_cell, 'is the empty cell')\n if ($empty_cell.hasClass('empty')) {\n return $empty_cell\n }\n }\n return null\n }", "function fillCells(){\n \n for (var i = 1; i < totalCells+1; i++) {\n \tvar value = randProv[i - 1];\n var currentCell = document.getElementById(i);\n //for an emppty cell\n if (value.length == 0 || value == ' '){\n \tcurrentCell.style.backgroundColor = \"black\";\n if(value== ' ')\n provLength--;\n }\n else {\n if(giveUp==1){\n currentCell.innerHTML =value;\n }\n else{\n currentCell.innerHTML = ' ';\n }\n \n currentCell.style.backgroundColor = \"#0000FF\";\n }\n }\n \n}", "function setEnd(rownum,colnum){\n //TODO: Gather the row/col number from the user\n // var rownum = GRID_ROW_SIZE-1\n // var colnum = GRID_COL_SIZE-1\n //TODO: preset here, need modification\n if(rownum < 0 || rownum >= GRID_ROW_SIZE || colnum < 0 || colnum >= GRID_COL_SIZE){\n console.log(\"Invalid number: data out of bound\")\n }\n if(rownum == StartPoint[0] && colnum == StartPoint[1]){\n // cannot override startpoint\n return\n }\n Grid[EndPoint[0]][EndPoint[1]].State = \"NULL\"\n document.getElementById(Grid[EndPoint[0]][EndPoint[1]].id).innerHTML=\"\";\n\n Grid[rownum][colnum].State = \"End\"\n document.getElementById(Grid[rownum][colnum].id).innerHTML=\"<div class='\"+setterMode+\"'></div>\";\n EndPoint = [rownum,colnum]\n return\n\n}", "function lastEmptyCol(rows, col) {\r\n let $cells = $(`[data-col=${col}]`);\r\n let $lastEmptyCol;\r\n\r\n $.each($cells, function(index, cell) {\r\n if (!cell.classList.contains('empty') || cell.dataset.row - 1 === '1') {\r\n return false;\r\n }\r\n $lastEmptyCol = cell;\r\n });\r\n return $lastEmptyCol;\r\n }", "function appendEmptyRow() {\n appendRow({from:\"\", to:\"\", ic:false, mw:false});\n}", "function populateCurrentColumn(){\n for( var i = 0; i < totalTableRows; i++ ){\n var x = tbl.tBodies[0].rows[i].cells[currentIndex];\n //currentColumn.push(x);\n currentColumn.push(x.cloneNode(true));\n }\n }", "function addEmptyTd() {\n //get max col in table body\n var maxCol = 0;\n $('.classictable table tbody tr').each(function () {\n maxCol = Math.max($(this).children().length, maxCol);\n });\n\n //add td to with '--' to remaining column in each row\n var x = \"<td class='relative'>--</td>\";\n $('.classictable table tbody tr').each(function () {\n var totalColPresent = $(this).children().length;\n if (totalColPresent < maxCol) {\n for (var col = 0; col < (maxCol - totalColPresent) ; col++) {\n $(this).append(x);\n }\n }\n });\n}", "function setEmptyCell(r, c) {\n\tdelete grid[r][c];\n\t$(gridSpans[r][c]).text(\"\");\n\t$(gridSpans[r][c]).parent().css(\"background-color\", \"#D1E3EB\");\n}", "fillCursor(cursor) {\n\t\t\tconst line = this.getLine(cursor.line);\n\t\t\tconst colIndex = cursor.column.valueOf() - 1;\n\n\t\t\t// Amount of spaces to insert\n\t\t\tlet count = 0;\n\n\t\t\t// Calculate how many we need to insert\n\t\t\tlet i = colIndex - 1;\n\t\t\twhile (i >= 0 && (line.columns[i] === undefined || line.columns[i] === \"\")) {\n\t\t\t\ti--;\n\t\t\t\tcount++;\n\t\t\t}\n\n\t\t\t// Insert spaces\n\t\t\tfor (const char of this.getSpaces(count)) {\n\t\t\t\ti++;\n\t\t\t\tline.columns[i] = char;\n\t\t\t}\n\t\t}", "function drawEmptyCells(cellsCount) {\n structure = '';\n for (var i = 1; i < cellsCount; i++) {\n structure = structure + '<div class=\"xx-empty\"><div></div></div>';\n }\n $(structure).appendTo('.xx-calendar').html();\n}", "clear() {\n for (let h = 0; h < this.height; h++) {\n this.cells[this.currentBufferIndex][h].fill(0);\n }\n }", "insertEmptySplittedCellWidget(currentRow, tableCollection, left, index, previousRowIndex) {\n let tableWidget = tableCollection[tableCollection.length - 1];\n for (let i = previousRowIndex; i >= 0; i--) {\n let rowWidget = tableWidget.childWidgets[i];\n let previousLeft = rowWidget.x;\n for (let j = 0; j < rowWidget.childWidgets.length; j++) {\n let rowSpan = 1;\n let cellWidget = rowWidget.childWidgets[j];\n if (Math.round(left) === Math.round(previousLeft)) {\n rowSpan = (isNullOrUndefined(cellWidget) || isNullOrUndefined(cellWidget.cellFormat)) ? rowSpan :\n cellWidget.cellFormat.rowSpan;\n if (rowSpan > 1) {\n let emptyCellWidget = this.createCellWidget(cellWidget);\n currentRow.childWidgets.splice(index, 0, emptyCellWidget);\n emptyCellWidget.containerWidget = currentRow;\n }\n return;\n }\n previousLeft += cellWidget.margin.left + cellWidget.width + cellWidget.margin.right;\n }\n }\n }", "function table_fill_empty() {\n pagination_reset();\n $('.crash-table tbody').html(`\n <tr>\n <th>-</th>\n <td>-</td>\n <td>-</td>\n <td>-</td>\n </tr>`);\n}", "function clearCells() {\n\n for (let x=0; x < tableSize; x++ ) {\n for (let y=0; y < tableSize; y++) {\n let curCell = x+','+y\n document.getElementById(curCell).style.backgroundColor = \"rgb(255,255,255)\";\n document.getElementById(curCell).innerText = \"\";\n }\n }\n}", "function clean(){\r\n for (var i = 0; i < cells.length; i++) {\r\n cells[i].textContent = '';//Adding nothing '' to every cell\r\n }\r\n}", "clear() {\n for (let r = 0; r < this.instance.countSourceRows(); r++) {\n for (let c = 0; c < this.instance.countCols(); c++) {\n this.set(r, this.colToProp(c), '');\n }\n }\n }", "reset() {\n for (let col of this.m_columns) {\n col.reset();\n }\n }", "function markCellsForNull(row, col) {\n\n var idxI = (row - 2 >= 0) ? row - 2 : (row - 1 >= 0) ? row - 1 : row;\n var idxJ = (col - 2 >= 0) ? col - 2 : (col - 1 >= 0) ? col - 1 : col;\n var endI = (row + 2 < gBoard.length) ? row + 2 : (row + 1 < gBoard.length) ? row + 1 : row;\n var endJ = (col + 2 < gBoard.length) ? col + 2 : (col + 1 < gBoard.length) ? col + 1 : col;\n for (var i = idxI; i <= endI; i++) {\n for (var j = idxJ; j <= endJ; j++) {\n if (gBoard[i][j] === 'x' || gBoard[i][j] === '⚑') continue;\n var selector = '#cell-' + i + '-' + j;\n var elCell = document.querySelector(selector);\n if (!elCell.classList.contains('mark')) {\n elCell.classList.add('mark');\n gState.shownCount++;\n }\n if (gBoard[i][j] !== null) {\n var curr = gBoard[i][j];\n elCell.innerHTML = curr;\n }\n }\n }\n}", "function deleteLeadingTrailingSpaces(range) {\n var i,\n j,\n lastCol = range.getLastColumn(),\n lastRow = range.getLastRow(),\n cell,\n cellValue;\n for (i = 1; i <= lastRow; i += 1) {\n for (j = 1; j <= lastCol; j += 1) {\n cell = range.getCell(i,j);\n cellValue = cell.getValue();\n if (typeof cellValue === 'string') {\n cellValue = cellValue.trim();\n cell.setValue(cellValue);\n }\n }\n } \n}", "function clearCells() {\n\t\t\tfor(i = 0; i < maxRow; i++) {\n\t\t\t\tfor(j = 0; j < maxCol; j++) {\n\t\t\t\t\tcellID = '#'+j+'_'+i\n\t\t\t\t\t$(cellID).remove()\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function clearCell(x,y){}", "blank(rows, cols) {\n return Array(rows).fill(1).map(() => Array(cols));\n }", "function isCellEmpty(row,col) {\n\treturn (typeof grid[row][col] === \"undefined\");\n}", "function clearColumnLeds( col, peak ) {\n if( peak === 0 ) {\n client.setPixelColor(col, LED_BLACK );\n }\n for( var i = 0, num = col; i < peak; i++, num+=8 ) {\n client.setPixelColor(num, LED_BLACK );\n }\n}", "function remake_cells(){\n cells = new Array() ;\n for(var i=0 ; i<nRows ; i++){\n cells.push(new Array()) ;\n for(var j=0 ; j<nCols ; j++){\n cells[i].push([0,0,0]) ;\n }\n }\n}", "updateSize() {\n\t\tvar t = this;\n\t\tvar len = t.getLength();\n\t\tif (len == 0) {\n\t\t\tt.setLength(1);\n\t\t} if (len > 0) {\n\t\t\tvar needsNew = !t.isRowBlank(t.getRow(len - 1));\n\t\t\tif (needsNew)\n\t\t\t\tt.setLength(len + 1);\n\t\t\telse if (len > 1) {\n\t\t\t\tvar needsRem = t.isRowBlank(t.getRow(len - 1));\n\t\t\t\tif (needsRem) {\n\t\t\t\t\tt.setLength(len - 1);\n\t\t\t\t\tt.updateSize();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function fillAllUncoloredCells() {\r\n let uncoloredCells = document.querySelectorAll(\"td.NoColor\");\r\n for(let i = 0; i < uncoloredCells.length; i++){\r\n uncoloredCells[i].style.backgroundColor = color;\r\n uncoloredCells[i].classList.toggle(\"NoColor\");\r\n }\r\n}", "function ammendLastRow(column, sheet, value){\n var myRange = sheet.getRange(sheet.getLastRow(), column);\n myRange.setValue(value);\n}", "fill_cell(x,y,digit) {\n\t\tif (!(check_digit(x,this.max) && check_digit(y,this.max)))\n\t\t\treturn;\n\t\tthis.cells[x-1][y-1].fill(digit)\n\t\tthis.updateCell(x,y);\n\t}", "resetLastCellNode() {\n this._lastCellNode = null;\n }", "function fillAllCells() {\r\n let allCells = document.querySelectorAll(\"td\");\r\n for(let i = 0; i < allCells.length; i++){\r\n allCells[i].style.backgroundColor = color;\r\n if(allCells[i].classList.contains(\"NoColor\")) {\r\n allCells[i].classList.toggle(\"NoColor\");\r\n }\r\n }\r\n}", "clear() {\n for (let line of this.cells) {\n for (let cell of line) {\n cell.setType(BeadType.default);\n }\n }\n }", "fillupColumn() {\n let columns = this.get('columns');\n let tableWidth = this.get('_width');\n let sum = this.get('allColumnWidths');\n let tableResizeMode = this.get('tableResizeMode');\n\n if (sum !== tableWidth) {\n let delta = tableWidth - sum - 1;\n // Distribute the delta in pixel among columns according to the table fill up mode.\n if (tableResizeMode === TABLE_RESIZE_MODE_FIRST_COLUMN) {\n let [column] = columns;\n this.setColumnWidth(column, get(column, 'width') + delta);\n } else if (tableResizeMode === TABLE_RESIZE_MODE_EQUAL_COLUMN) {\n // Split delta by their proportion.\n let columnDelta = delta / columns.length;\n for (let i = 0; i < columns.length; i++) {\n let column = columns[i];\n this.setColumnWidth(column, get(column, 'width') + columnDelta);\n }\n } else if (tableResizeMode === TABLE_RESIZE_MODE_LAST_COLUMN) {\n // Add all delta to last column\n let lastColumn = columns[columns.length - 1];\n set(lastColumn, 'width', get(lastColumn, 'width') + delta);\n }\n }\n\n if (this.get('hasSubcolumns')) {\n columns.forEach((groupColumn) => {\n let subcolumns = get(groupColumn, 'subcolumns');\n if (subcolumns) {\n // Each subcolumn has equal width.\n let subcolumnWidth = get(groupColumn, 'width') / get(subcolumns, 'length');\n subcolumns.forEach((subcolumn) => {\n set(subcolumn, 'width', subcolumnWidth);\n });\n }\n });\n }\n }", "function reconstructPath(cell, end = false) {\n\tconst origin = cell.cameFrom;\n\t// include cell if end\n\tend && totalPath.push(cell);\n\tif (origin) {\n\t\ttotalPath.push(origin);\n\t\treturn reconstructPath(origin);\n\t}\n\n\t// reconstruct path backwards\n\ttotalPath.forEach((currentCell, i) => {\n\t\tsetTimeout(() => {\n\t\t\tcolor(path, currentCell);\n\t\t}, 50 * (totalPath.length - i));\n\t});\n}", "function deleteLastColumn() {\n var oldNumCols = this.allGrids.backgroundTiles.numCols;\n var newNumCols = oldNumCols - 1;\n\n var oldBackgroundTilesData = this.allGrids.backgroundTiles.getData();\n var backgroundTiles2D = create2dArray(oldBackgroundTilesData, oldNumCols);\n removeLastColumnFromGrid(backgroundTiles2D);\n var newBackgroundTilesData = create1dArray(backgroundTiles2D);\n this.allGrids.backgroundTiles = new Grid2D(newBackgroundTilesData, newNumCols);\n\n var oldForegroundTilesData = this.allGrids.foregroundTiles.getData();\n var foregroundTiles2D = create2dArray(oldForegroundTilesData, oldNumCols);\n removeLastColumnFromGrid(foregroundTiles2D);\n var newForegroundTilesData = create1dArray(foregroundTiles2D);\n this.allGrids.foregroundTiles = new Grid2D(newForegroundTilesData, newNumCols);\n\n var oldEnemyData = this.allGrids.enemyGrid.getData();\n var enemies2D = create2dArray(oldEnemyData, oldNumCols);\n removeLastColumnFromGrid(enemies2D);\n var newEnemies = create1dArray(enemies2D);\n this.allGrids.enemyGrid = new Grid2D(newEnemies, newNumCols);\n\n this.collisionDetectors.level.updateWithGrid(this.allGrids.backgroundTiles);\n }", "function lastColumn (){\n if (media.html() === \"\"){\n mediaSection.addClass(\"middleColumn\");\n }\n}", "function paintFill(row, col, startColor, newColor) {\n if (!isInBoundaries(row) || !isInBoundaries(col)) return;\n if (grid[row][col] !== startColor) return;\n\n grid[row][col] = newColor;\n paintFill(row + 1, col, startColor, newColor);\n paintFill(row - 1, col, startColor, newColor);\n paintFill(row, col + 1, startColor, newColor);\n paintFill(row, col - 1, startColor, newColor);\n}", "function getEmptyRowInJournal(row,col)\n{\n var cellTemp = globalJournalSheet.getRange(row,col);\n var blnCellTemp = cellTemp.isBlank();\n \n while(!blnCellTemp)\n { \n row++; \n blnCellTemp = globalJournalSheet.getRange(row,col).isBlank();\n } \n return row;\n}", "function getDataCells(el, doc, maxCharsPerCol) {\n var cells = [];\n var sourceSettings = el.settings.sourceObject.settings;\n $.each(el.settings.columns, function eachColumn(idx) {\n var value;\n var rangeValue;\n var classes = ['col-' + idx];\n var style = '';\n var colDef = el.settings.availableColumnInfo[this.field];\n var date;\n // Extra space in last col to account for tool icons.\n var extraSpace = idx === el.settings.columns.length - 1 && !el.settings.actions.length ? 2 : 0;\n var charWidth;\n // In compositeAggregation mode, fields are replaced by key names. We replace\n // . with - to avoid confusion when iterating down paths.\n var field = sourceSettings.mode === 'compositeAggregation' && $.inArray(this.field, sourceSettings.fields) > -1\n ? this.field.asCompositeKeyName() : this.field;\n value = indiciaFns.getValueForField(doc, field, colDef);\n if (colDef.rangeField) {\n rangeValue = indiciaFns.getValueForField(doc, colDef.rangeField);\n if (value !== rangeValue) {\n value = value + ' to ' + rangeValue;\n }\n }\n if (value && colDef.handler && colDef.handler === 'date') {\n date = new Date(value);\n value = date.toLocaleDateString();\n } else if (value && colDef.handler && colDef.handler === 'datetime') {\n date = new Date(value);\n value = date.toLocaleString();\n }\n if (value && typeof value === 'string' && value.match(/class=\"(single|multi)\"/)) {\n // Thumbnail(s) so give approx column size.\n charWidth = value.match(/class=\"single\"/) ? 8 : 14;\n maxCharsPerCol['col-' + idx] = Math.max(maxCharsPerCol['col-' + idx], extraSpace + charWidth);\n } else {\n maxCharsPerCol['col-' + idx] =\n Math.max(maxCharsPerCol['col-' + idx], longestWordLength($('<p>' + value + '</p>').text()) + extraSpace);\n }\n classes.push('field-' + this.field.replace(/\\./g, '--').replace(/_/g, '-'));\n // Copy across responsive hidden cols.\n if ($(el).find('table th.col-' + idx).css('display') === 'none') {\n style = ' style=\"display: none\"';\n }\n value = value === null ? '' : value;\n if (colDef.ifEmpty && value === '') {\n value = colDef.ifEmpty;\n }\n cells.push('<td class=\"' + classes.join(' ') + '\"' + style + '>' + value + '</td>');\n return true;\n });\n return cells;\n }", "_empty_grid() {\n\t\t\tfor (var x = 0; x < this._internal_grid_size[0]; x++) {\n\t\t\t\tfor (var y = 0; y < this._internal_grid_size[1]; y++) {\n\t\t\t\t\tthis._set_grid_value(x, y, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function moveEnd(prevIndex,newIndex) {\n\t$($(\"td\").find(prevIndex)).removeClass();\n\n\tvar newEnd = $(\"td\").find(newIndex);\n\t$(newEnd).removeClass();\n\t$(newEnd).addClass(\"end\");\n\n\tvar newEndX = Math.floor(newIndex/totalRows);\n\tvar newEndY = Math.floor(newIndex/totalCols);\n\tstartCell = [newStartX,newStartY];\n\treturn;\n}", "function moveEnd(prevIndex,newIndex) {\n\t$($(\"td\").find(prevIndex)).removeClass();\n\n\tvar newEnd = $(\"td\").find(newIndex);\n\t$(newEnd).removeClass();\n\t$(newEnd).addClass(\"end\");\n\n\tvar newEndX = Math.floor(newIndex/totalRows);\n\tvar newEndY = Math.floor(newIndex/totalCols);\n\tstartCell = [newStartX,newStartY];\n\treturn;\n}", "function clearAllCells() {\r\n let allCells = document.querySelectorAll(\"td\");\r\n for(let i = 0; i < allCells.length; i++){\r\n allCells[i].style.backgroundColor = \"silver\";\r\n if(!allCells[i].classList.contains(\"NoColor\")) {\r\n allCells[i].classList.add(\"NoColor\");\r\n }\r\n }\r\n}", "createBlankSpaces(){\n let blanks = [];\n const firstDay = this.firstDayOfMonth();\n for (let i = 0; i < firstDay; i++){\n blanks.push(\n <td className=\"empty-day\">{\"\"}</td>\n )\n }\n return blanks;\n }", "function setNullCellsTo0(table) {\n var numCols = table.getNumberOfColumns();\n var numRows = table.getNumberOfRows();\n for (col = 1; col < numCols; col++) {\n for (row = 0; row < numRows; row++) {\n if (table.getValue(row, col) === null) {\n table.setValue(row, col, 0);\n }\n }\n }\n }", "empty()\n\t{\n\t\tthis.rows = [];\n\t\tthis.width = 0;\n\t}", "function getcolbotempty(row, col) {\n //recall a board has 6 rows (6 y positions to iterate over)\n //top is row = 0, bottom is row = 5 \n for (var bot = 5; bot > row; bot--) {\n if (board[bot][col] == 0) {\n return bot;\n }\n }\n return row;\n}", "_gravity() {\n for (let x = 0; x < this.columns; x++) {\n let columnCondensed = this.coins[x]\n .filter(element => !_.isNull(element));\n\n // replace nulls:\n columnCondensed = columnCondensed\n .concat(Array(this.rows - columnCondensed.length).fill(null));\n\n this.coins[x] = columnCondensed;\n }\n }", "function getFirstWrittenRow(col) {\n var sheet = SpreadsheetApp.getActiveSheet(),\n values = sheet.getRange(col + ':' +col)\n .getValues();\n\n for(i = 1; values[i][0] == ''; ++i );\n\n return ++i;\n}", "function appendColumn() {\n var tbl = document.getElementById('my-table'), // table reference\n i;\n // open loop for each row and append cell\n for (i = 0; i < tbl.rows.length; i++) {\n createCell(tbl.rows[i].insertCell(tbl.rows[i].cells.length), i, 'col');\n }\n}", "function clearAllGrid(){\n let cells = document.getElementsByTagName(\"td\");\n let allCells = [...cells];\n allCells.forEach(cell => { cell.style.backgroundColor = \"black\"; cell.classList.add(\"no-color\")});\n\n}", "initGrid() {\n this.grid = [];\n this.gameOver = false;\n for(let row = 0; row < this.rowSize; row++) {\n let currentRow = [];\n for(let cell = 0; cell < this.colSize; cell++) {\n currentRow.push(this.getEmptyCell());\n }\n this.grid.push(currentRow);\n }\n }", "function ensureCellsPopulated(grid) {\n //processing goes here\n var modifiedGrid = grid;\n return modifiedGrid;\n}", "function clearSelectedCells() {\n var startStop = getStartStop(charaster.selectBegin, charaster.selectClose);\n for (var y = startStop[0].y; y < startStop[1].y; y++) {\n for (var x = startStop[0].x; x < startStop[1].x; x++) {\n charaster.clearCell(new Point(x, y));\n }\n }\n}", "function moveCell(row, col) {\n var emptyRow = getRowNumber(NUMBER_ON_EMPTY_CELL);\n var emptyCol = getColumnNumber(NUMBER_ON_EMPTY_CELL);\n\n\n var rowDiff = emptyRow - row;\n var colDiff = emptyCol - col;\n var isInRow = (row == emptyRow);\n var isInCol = (col == emptyCol);\n var isNotDiagonal = (isInRow || isInCol);\n\n var emptyCellIndex = getIndexOf(NUMBER_ON_EMPTY_CELL);\n\n if (isNotDiagonal) {\n // -ve diff, move row left\n if (colDiff < 0 & isInRow) {\n for (var i = 0; i < Math.abs(colDiff); i++) {\n board[emptyCellIndex + i] = board[emptyCellIndex + i + 1];\n }\n\n } // + ve Diff, move row right\n else if (colDiff > 0 & isInRow) {\n for (var i = 0; i < Math.abs(colDiff); i++) {\n board[emptyCellIndex - i] = board[emptyCellIndex - (i + 1)];\n }\n }\n\n // -ve diff, move column up\n if (rowDiff < 0 & isInCol) {\n for (var i = 0; i < Math.abs(rowDiff); i++) {\n board[emptyCellIndex + i * DIM] = board[emptyCellIndex + (i + 1) * DIM];\n }\n\n } // + ve Diff, move column down\n else if (rowDiff > 0 & isInCol) {\n for (var i = 0; i < Math.abs(rowDiff); i++) {\n board[emptyCellIndex - i * DIM] = board[emptyCellIndex - (i + 1) * DIM];\n }\n }\n\n // Swap the empty square with the given square\n// board[emptyRow][emptyCol].setVisible(true);\n// board[row][col].setText(Integer.toString(0));\n// board[row][col].setVisible(false);\n// emptyCell = getIndex(row, col);\n board[row* DIM + col] = 0;\n drawBoard();\n }\n\n }", "emptyArray() {\n const that = this;\n\n if (that.type === 'none') {\n return;\n }\n\n const cells = that._cells,\n oldValue = that.value;\n\n that.value = that._returnEmptyArray();\n\n if (JSON.stringify(oldValue) === JSON.stringify(that.value)) {\n return;\n }\n\n for (let i = 0; i < cells.length; i++) {\n for (let j = 0; j < cells[i].length; j++) {\n const cellWidget = cells[i][j].widget,\n cellWidgetDimensions = { x: j, y: i },\n defaultValue = that._getDefaultValue();\n\n cellWidget.classList.add('jqx-array-element-empty');\n\n if (that._areDifferent(that._getElementValue(cellWidget, cellWidgetDimensions), defaultValue)) {\n cellWidget.supressChange = true;\n that._setElementValue(defaultValue, cellWidget, cellWidgetDimensions);\n }\n }\n }\n\n that._getInitialFill();\n that.clearSelection();\n that.$.fireEvent('change', { 'value': that.value, 'oldValue': oldValue });\n }", "clearCells(){\n var cells = this.GRID_DIV.children;\n for (var i = 0; i < cells.length; i++) {\n var cell = cells[i];\n cell.style.backgroundColor = \"white\";\n }\n this.saveLocally();\n }", "get isColumn() {\n return this.startColumn === this.endColumn && this.startRow === 0 && this.endRow === null\n }", "blankCharArray() {\n // In each row, the modified field reports whether the line needs to be\n // redrawn in the animation loop, and the row data contains the\n // character information\n var charArray = [];\n for (var row = 0; row < this.termRows; row++) {\n charArray.push({\n modified: true,\n rowData: this.blankRowData()\n });\n }\n\n this.charArray = charArray;\n }", "function clearGrid(){\n console.log(\"clearGrid\")\n for (let i = 0; i < GRID_ROW_SIZE; i++) { \n for (let j = 0; j < GRID_COL_SIZE; j++) {\n Grid[i][j].State = \"NULL\"\n Grid[i][j].VisitedAt = -1\n document.getElementById(Grid[i][j].id).innerHTML=\"\";\n \n }\n }\n Grid[0][0].State = \"Start\"\n Grid[GRID_ROW_SIZE-1][GRID_COL_SIZE-1].State = \"End\"\n document.getElementById(Grid[0][0].id).innerHTML=\"<div class='startpoint'></div>\";\n document.getElementById(Grid[GRID_ROW_SIZE-1][GRID_COL_SIZE-1].id).innerHTML=\"<div class='endpoint'></div>\";\n \n}", "function addToColumn(el){\n if(columnCounter === 0 && !isCollision(columns[0], el)){\n columns[0].push(el);\n addCollision(el);\n return;\n } else if(columnCounter === 0 && isCollision(columns[0], el)){\n columns[++columnCounter] = [el];\n addCollision(el);\n return;\n }else {\n for(var i=0; i<=columnCounter; i++){\n if(!isCollision(columns[i], el)){\n columns[i].push(el);\n addCollision(el);\n return;\n }\n }\n }\n\n columns[++columnCounter] = [el];\n addCollision(el);\n }", "function clearLastRow() {\r\n\t//clear matrix last row\r\n\tfor(var i = minColl; i <= maxColl; i++) {\r\n\t\tmatrix[maxRow][i] = 0;\r\n\t}\r\n\t//clear DOM table last row\r\n\tvar theLastRow = document.getElementsByClassName('rows')[maxRow - 1];\r\n\tfor(var j = minColl - 1; j < maxColl; j++) {\r\n\t\tvar td = theLastRow.children[j];\r\n\t\ttd.removeChild(td.children[0]);\r\n\t}\r\n}", "function getAllEmptyCells() {\n const cells = [];\n\n loopGrid((x, y) => {\n if (!grid[y][x]) {\n cells.push({\n x,\n y,\n });\n }\n });\n\n return cells;\n}", "function addRows(sheet, cols, firstRow) {\n\n for ( var c in cols ) {\n var col=cols[c]\n //These are all formmating options\n var text=col['cols']\n var fontSize=col['fontSize']\n var isBold=col['isBold']\n var mergeRest=col['merge']\n var forms=col['forms']\n \n var nFill=text.length //the number of columns to fill\n //this is column two because the first one is left empty for future purposes\n var range= sheet.getRange(firstRow+parseInt(c),2,1,nFill)\n range.setValues([text]) //its an array of arrays\n\n if ( forms != null ) { //instead of text, we may have formulas\n for ( var i in forms ) {\n var range2=sheet.getRange(firstRow+parseInt(c),2+parseInt(i))\n if (forms[i]!='') {\n range2.setFormula(forms[i])\n }\n }\n }\n \n if ( mergeRest == null || mergeRest== true) { // merge trailing columns when requested \n if (nFill<nCols ) {\n // this is the range to merge - one row at a time\n var rangeBlank=sheet.getRange(firstRow+parseInt(c),1+nFill,1,5-nFill)\n rangeBlank.merge()\n } \n }\n if ( fontSize != null ) range.setFontSize(fontSize) //update font size when requested\n if ( isBold != null ) range.setFontWeight(isBold) //make bold when requested \n } \n \n return firstRow+cols.length //return the new length of the sheet\n}", "function resetBoard() {\n // reset any colored cells\n $(\"#chessboard td\").removeClass(\"start\");\n $(\"#chessboard td\").removeClass(\"end\");\n $(\"#chessboard td\").removeClass(\"path\");\n\n // remove any path counters on the board\n $(\".counter\").remove();\n\n // reset start and end points\n start = null;\n end = null;\n\n // reset displayed cell number\n $(\"#output\").html('Please select a source and destination cell.');\n}", "resetMatrix(mat, val) {\n\t\t\tmat.forEach((col) => col.fill(val));\n\t\t}", "function fillBoard() {\n for (row=0; row < 3; row++) {\n for (column=0; column < 3; column++) {\n if (gameboard[row][column].textContent == \"\") {\n gameboard[row][column].textContent = \" \";\n }\n }\n }\n}", "function tweakSelectionIfInsideOfEmptyTableCell() {\n var dom = dw.getDocumentDOM();\n var offsets = dom.getSelection(true); // gets pairs of offsets if multiple selections\n var selNode = dom.offsetsToNode(offsets[0],offsets[1]);\n \n if (selNode.tagName && (selNode.tagName == \"TD\" || selNode.tagName == \"TH\")) {\n var cellContents = selNode.innerHTML;\n // Previously, innerHTML was \"\" if only an &nbsp; was in the table cell.\n // Now, we return \"&nbsp;\" and not the empty string.\n if (cellContents == \"&nbsp;\") \n { \n var nbspInd = selNode.outerHTML.indexOf(\"&nbsp\");\n var startOfCellOffset = nbspInd + offsets[0];\n dom.setSelection(startOfCellOffset,startOfCellOffset);\n }\n }\n}" ]
[ "0.7578882", "0.75454706", "0.75454706", "0.75454706", "0.75454706", "0.7543037", "0.75387543", "0.7455521", "0.7455521", "0.7455521", "0.7455521", "0.7455521", "0.7455521", "0.7455521", "0.7455521", "0.74241924", "0.70568347", "0.70191866", "0.6973319", "0.6926354", "0.6926354", "0.6926354", "0.6926354", "0.6926354", "0.6926354", "0.6926354", "0.6876594", "0.6216262", "0.59805435", "0.58314276", "0.5751982", "0.56676006", "0.5661906", "0.5603256", "0.55951136", "0.5592975", "0.5533306", "0.5533145", "0.550566", "0.5414961", "0.53940046", "0.53781146", "0.5372736", "0.5371245", "0.5329666", "0.5324931", "0.5314224", "0.52855283", "0.52439976", "0.5242408", "0.5215833", "0.5206081", "0.5193766", "0.5193422", "0.5190273", "0.51762974", "0.51634973", "0.51482695", "0.5133832", "0.50958425", "0.50757414", "0.50593346", "0.5052124", "0.504766", "0.5019758", "0.50119996", "0.5003067", "0.4992106", "0.49721375", "0.49672988", "0.49669018", "0.49669018", "0.49582157", "0.4948641", "0.49400002", "0.49387723", "0.49365225", "0.491873", "0.49178898", "0.49103314", "0.4903966", "0.48949745", "0.48923385", "0.4883281", "0.48821434", "0.4871632", "0.4868647", "0.48654607", "0.4861627", "0.48574513", "0.48566702", "0.48509204", "0.48506445", "0.48373502", "0.48340517", "0.48310387", "0.48283485", "0.48263642" ]
0.7590672
2
Computes whether two segments' columns collide. They are assumed to be in the same row.
function isDaySegCollision(seg, otherSegs) { var i; var otherSeg; for (i = 0; i < otherSegs.length; i++) { otherSeg = otherSegs[i]; if (otherSeg.firstCol <= seg.lastCol && otherSeg.lastCol >= seg.firstCol) { return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function haveCollided(r1, r2) {\r\n\t\treturn !(r2.left > r1.right || r2.right < r1.left || r2.top > r1.bottom || r2.bottom < r1.top)\r\n\t}", "function collides(l1\n/*: LayoutItem*/\n, l2\n/*: LayoutItem*/\n)\n/*: boolean*/\n{\n if (l1.i === l2.i) return false; // same element\n\n if (l1.x + l1.w <= l2.x) return false; // l1 is left of l2\n\n if (l1.x >= l2.x + l2.w) return false; // l1 is right of l2\n\n if (l1.y + l1.h <= l2.y) return false; // l1 is above l2\n\n if (l1.y >= l2.y + l2.h) return false; // l1 is below l2\n\n return true; // boxes overlap\n}", "function have_collided(object1,object2){\n return !(\n ((object1.y + object1.height) < (object2.y)) || //\n (object1.y > (object2.y + object2.height)) ||\n ((object1.x + object1.width) < object2.x) ||\n (object1.x > (object2.x + object2.width))\n );\n }", "checkCollide(obj1, obj2) {\n\t\tif(\tobj1.x < obj2.x + obj2.width &&\n\t\t\tobj1.x + obj1.width > obj2.x) {\n\t\t\t\tif(\tobj1.y < obj2.y + obj2.height &&\n\t\t\t\t\tobj1.y + obj1.height > obj2.y) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\t\t\n\t\t}\n\t\treturn false;\n\t}", "function collision_detector(first, second) {\r\n var x1 = first.get(\"X\");\r\n var y1 = first.get(\"Y\");\r\n var width1 = first.get(\"width\");\r\n var height1 = first.get(\"height\");\r\n var x2 = second.get(\"X\");\r\n var y2 = second.get(\"Y\");\r\n var width2 = second.get(\"width\");\r\n var height2 = second.get(\"height\");\r\n\r\n if (x2 > x1 && x2 < x1 + width1 || x1 > x2 && x1 < x2 + width2) {\r\n if (y2 > y1 && y2 < y1 + height1 || y1 > y2 && y1 < y2 + height2) {\r\n return true;\r\n }\r\n } else {\r\n return false;\r\n }\r\n}", "_isOverlap (segA, segB) {\n\t\tvar _isBefore = (segA.end >= segB.start && segA.start <= segB.end + 1);\n\t\tvar _isAfter = (segA.start <= segB.end + 1 && segA.end >= segB.start);\n\t\tvar _isSame = (segA === segB);\n\t\treturn ((_isBefore || _isAfter) && (!_isSame));\n\t}", "function overlaps(a, b) {\r\n\t// no horizontal overlap\r\n\tif (a.x1 >= b.x2 || b.x1 >= a.x2) return false;\r\n\t// no vertical overlap\r\n\tif (a.y1 >= b.y2 || b.y1 >= a.y2) return false;\r\n\treturn true;\r\n}", "function collides(l1, l2) {\n if (l1 === l2) return false; // same element\n if (l1.x + l1.w <= l2.x) return false; // l1 is left of l2\n if (l1.x >= l2.x + l2.w) return false; // l1 is right of l2\n if (l1.y + l1.h <= l2.y) return false; // l1 is above l2\n if (l1.y >= l2.y + l2.h) return false; // l1 is below l2\n return true; // boxes overlap\n}", "function collides(l1, l2) {\n if (l1 === l2) return false; // same element\n if (l1.x + l1.w <= l2.x) return false; // l1 is left of l2\n if (l1.x >= l2.x + l2.w) return false; // l1 is right of l2\n if (l1.y + l1.h <= l2.y) return false; // l1 is above l2\n if (l1.y >= l2.y + l2.h) return false; // l1 is below l2\n return true; // boxes overlap\n}", "function collides(l1, l2) {\n if (l1 === l2) return false; // same element\n if (l1.x + l1.w <= l2.x) return false; // l1 is left of l2\n if (l1.x >= l2.x + l2.w) return false; // l1 is right of l2\n if (l1.y + l1.h <= l2.y) return false; // l1 is above l2\n if (l1.y >= l2.y + l2.h) return false; // l1 is below l2\n return true; // boxes overlap\n}", "function collision(rec1, rec2)\n{\n if (rec1.x < rec2.x + rec2.width &&\n rec1.x + rec1.width > rec2.x &&\n rec1.y < rec1.y + rec2.height &&\n rec1.y + rec1.height > rec2.y) {\n return \"true\";\n }\n else {\n return \"false\";\n }\n}", "function collision(rec1, rec2)\n{\n if (rec1.x < rec2.x + rec2.width &&\n rec1.x + rec1.width > rec2.x &&\n rec1.y < rec1.y + rec2.height &&\n rec1.y + rec1.height > rec2.y) {\n return \"true\";\n }\n else {\n return \"false\";\n }\n}", "function hasCollision(event, column) {\n \n var i, eventOne, eventTwo;\n \n for (i=0; i<column.length; i++) {\n \n eventOne = event;\n eventTwo = column[i];\n \n // collision\n if ( (eventOne.start < eventTwo.end) && (eventOne.end > eventTwo.start) ) {\n return true;\n } \n } \n return false;\n }", "function isSlotSegCollision(seg1, seg2) {\n return seg1.bottom > seg2.top && seg1.top < seg2.bottom;\n}", "function isSlotSegCollision(seg1, seg2) {\n return seg1.bottom > seg2.top && seg1.top < seg2.bottom;\n}", "function isSlotSegCollision(seg1, seg2) {\n return seg1.bottom > seg2.top && seg1.top < seg2.bottom;\n}", "function isSlotSegCollision(seg1, seg2) {\n return seg1.bottom > seg2.top && seg1.top < seg2.bottom;\n}", "function isSlotSegCollision(seg1, seg2) {\n return seg1.bottom > seg2.top && seg1.top < seg2.bottom;\n}", "function segmentsOverlap(segment1, segment2) {\n return (\n (\n segment1[0] <= segment2[0] &&\n segment1[1] >= segment2[0]\n ) || (\n segment2[0] <= segment1[0] &&\n segment2[1] >= segment1[0]\n )\n );\n}", "function collisionDetection(first, second) {\n var firstBounds = first.getBounds();\n var secondBounds = second.getBounds();\n\n return firstBounds.x + firstBounds.width > secondBounds.x\n && firstBounds.x < secondBounds.x + secondBounds.width \n && firstBounds.y + firstBounds.height > secondBounds.y\n && firstBounds.y < secondBounds.y + secondBounds.height;\n}", "function isSlotSegCollision(seg1, seg2) {\n\treturn seg1.bottom > seg2.top && seg1.top < seg2.bottom;\n}", "function isSlotSegCollision(seg1, seg2) {\n\treturn seg1.bottom > seg2.top && seg1.top < seg2.bottom;\n}", "function isSlotSegCollision(seg1, seg2) {\n\treturn seg1.bottom > seg2.top && seg1.top < seg2.bottom;\n}", "function isSlotSegCollision(seg1, seg2) {\n\treturn seg1.bottom > seg2.top && seg1.top < seg2.bottom;\n}", "function isSlotSegCollision(seg1, seg2) {\n\treturn seg1.bottom > seg2.top && seg1.top < seg2.bottom;\n}", "function isSlotSegCollision(seg1, seg2) {\n\treturn seg1.bottom > seg2.top && seg1.top < seg2.bottom;\n}", "function isSlotSegCollision(seg1, seg2) {\n\treturn seg1.bottom > seg2.top && seg1.top < seg2.bottom;\n}", "function isSlotSegCollision(seg1, seg2) {\n\treturn seg1.bottom > seg2.top && seg1.top < seg2.bottom;\n}", "function isColliding(o1, o2, offset) {\n // Define input direction mappings for easier referencing\n o1D = { 'left': parseInt(o1.css('left')),\n 'right': parseInt(o1.css('left')) + o1.width(),\n 'top': parseInt(o1.css('top')),\n 'bottom': parseInt(o1.css('top')) + o1.height()\n };\n o2D = { 'left': parseInt(o2.css('left')) + offset,\n 'right': parseInt(o2.css('left')) + o2.width() - offset,\n 'top': parseInt(o2.css('top')),\n 'bottom': parseInt(o2.css('top')) + o2.height()\n };\n\n // If horizontally overlapping...\n if (o1D.left <= o2D.right &&\n o1D.right >= o2D.left &&\n o1D.top <= o2D.bottom &&\n o1D.bottom >= o2D.top) {\n // collision detected!\n return true;\n }\n return false;\n}", "function collides(a, b) {\n \treturn \ta.getx() < b.getx() + b.getwidth() &&\n \ta.getx() + a.getwidth() > b.getx() &&\n \ta.gety() < b.gety() + b.getheight() &&\n \ta.gety() + a.getheight() > b.gety();\n }", "function collision(first, second) {\n\treturn !(first.x > second.x + second.width ||\n\t\tfirst.x + first.width < second.x ||\n\t\tfirst.y > second.y + second.height ||\n\t\tfirst.y + first.height < second.y);\n}", "function isDaySegCollision(seg,otherSegs){var i;var otherSeg;for(i=0;i<otherSegs.length;i++){otherSeg=otherSegs[i];if(otherSeg.leftCol<=seg.rightCol&&otherSeg.rightCol>=seg.leftCol){return true;}}return false;}// A cmp function for determining the leftmost event", "checkCollide(pos1, pos2){\n if (Math.abs(pos1[0] - pos2[0]) < 50 &&\n pos1[1] === pos2[1]){\n\n return true;\n } else {\n return false;\n }\n }", "function isSlotSegCollision(seg1, seg2) {\n\t\treturn seg1.bottom > seg2.top && seg1.top < seg2.bottom;\n\t}", "function isSlotSegCollision(seg1, seg2) {\n return seg1.bottom > seg2.top && seg1.top < seg2.bottom;\n }", "function isSlotSegCollision(seg1, seg2) {\n return seg1.bottom > seg2.top && seg1.top < seg2.bottom;\n }", "function isSlotSegCollision(seg1, seg2) {\n return seg1.bottom > seg2.top && seg1.top < seg2.bottom;\n }", "function isSlotSegCollision(seg1, seg2) {\n return seg1.bottom > seg2.top && seg1.top < seg2.bottom;\n }", "function isSlotSegCollision(seg1, seg2) {\n return seg1.bottom > seg2.top && seg1.top < seg2.bottom;\n }", "function isDaySegCollision(seg, otherSegs) {\n var i;\n var otherSeg;\n\n for (i = 0; i < otherSegs.length; i++) {\n otherSeg = otherSegs[i];\n\n if (otherSeg.firstCol <= seg.lastCol && otherSeg.lastCol >= seg.firstCol) {\n return true;\n }\n }\n\n return false;\n } // A cmp function for determining the leftmost event", "function isColliding(o1, o2) {\n // Define input direction mappings for easier referencing\n o1D = { 'left': parseInt(o1.css('left')),\n 'right': parseInt(o1.css('left')) + o1.width(),\n 'top': parseInt(o1.css('top')),\n 'bottom': parseInt(o1.css('top')) + o1.height()\n };\n o2D = { 'left': parseInt(o2.css('left')),\n 'right': parseInt(o2.css('left')) + o2.width(),\n 'top': parseInt(o2.css('top')),\n 'bottom': parseInt(o2.css('top')) + o1.height()\n };\n\n // If horizontally overlapping...\n if ( (o1D.left < o2D.left && o1D.right > o2D.left) ||\n (o1D.left < o2D.right && o1D.right > o2D.right) ||\n (o1D.left < o2D.right && o1D.right > o2D.left) ) {\n\n if ( (o1D.top > o2D.top && o1D.top < o2D.bottom) ||\n (o1D.top < o2D.top && o1D.top > o2D.bottom) ||\n (o1D.top > o2D.top && o1D.bottom < o2D.bottom) ) {\n\n // Collision!\n return true;\n }\n }\n return false;\n}", "function isColliding(o1, o2) {\n // Define input direction mappings for easier referencing\n o1D = { 'left': parseInt(o1.css('left')),\n 'right': parseInt(o1.css('left')) + o1.width(),\n 'top': parseInt(o1.css('top')),\n 'bottom': parseInt(o1.css('top')) + o1.height()\n };\n o2D = { 'left': parseInt(o2.css('left')),\n 'right': parseInt(o2.css('left')) + o2.width(),\n 'top': parseInt(o2.css('top')),\n 'bottom': parseInt(o2.css('top')) + o1.height()\n };\n\n // If horizontally overlapping...\n if ( (o1D.left < o2D.left && o1D.right > o2D.left) ||\n (o1D.left < o2D.right && o1D.right > o2D.right) ||\n (o1D.left < o2D.right && o1D.right > o2D.left) ) {\n\n if ( (o1D.top > o2D.top && o1D.top < o2D.bottom) ||\n (o1D.top < o2D.top && o1D.top > o2D.bottom) ||\n (o1D.top > o2D.top && o1D.bottom < o2D.bottom) ) {\n\n // Collision!\n return true;\n }\n }\n return false;\n}", "function isColliding(o1, o2) {\n // Define input direction mappings for easier referencing\n o1D = { 'left': parseInt(o1.css('left')),\n 'right': parseInt(o1.css('left')) + o1.width(),\n 'top': parseInt(o1.css('top')),\n 'bottom': parseInt(o1.css('top')) + o1.height()\n };\n o2D = { 'left': parseInt(o2.css('left')),\n 'right': parseInt(o2.css('left')) + o2.width(),\n 'top': parseInt(o2.css('top')),\n 'bottom': parseInt(o2.css('top')) + o1.height()\n };\n\n // If horizontally overlapping...\n if ( (o1D.left < o2D.left && o1D.right > o2D.left) ||\n (o1D.left < o2D.right && o1D.right > o2D.right) ||\n (o1D.left < o2D.right && o1D.right > o2D.left) ) {\n\n if ( (o1D.top > o2D.top && o1D.top < o2D.bottom) ||\n (o1D.top < o2D.top && o1D.top > o2D.bottom) ||\n (o1D.top > o2D.top && o1D.bottom < o2D.bottom) ) {\n\n // Collision!\n return true;\n }\n }\n return false;\n}", "function collides(a, b) {\n\n\treturn a.x < b.x + b.width &&\n\t\t\t\t a.x + a.width > b.x &&\n\t\t\t\t a.y < b.y + b.height &&\n\t\t\t\t a.y + a.height > b.y;\n\n}", "function conflict () {\n if (player1.row == player2.row && (player1.col == player2.col-1 || player1.col == player2.col +1)) {\n return true\n }\n if (player1.col == player2.col && (player1.row == player2.row-1 || player1.row == player2.row +1)) {\n return true\n }\n return false\n}", "function checkCollision(entA, entB)\n{\n var colBoxA = entA.colBox;\n var colBoxB = entB.colBox;\n return !(colBoxB.left > colBoxA.right ||\n colBoxB.right < colBoxA.left ||\n colBoxB.top > colBoxA.bottom ||\n colBoxB.bottom < colBoxA.top);\n}", "checkCollide(pos1, pos2){\n\t if (Math.abs(pos1[0] - pos2[0]) < 50 &&\n\t pos1[1] === pos2[1]){\n\t\n\t return true;\n\t } else {\n\t return false;\n\t }\n\t }", "function collides(a, b) {\n if(a.x == b.x && a.y == b.y) return true;\n return false;\n }", "function computeSlotSegCollisions(seg,otherSegs,results){if(results===void 0){results=[];}for(var i=0;i<otherSegs.length;i++){if(isSlotSegCollision(seg,otherSegs[i])){results.push(otherSegs[i]);}}return results;}// Do these segments occupy the same vertical space?", "function isSlotSegCollision(seg1, seg2) {\n\treturn seg1.end > seg2.start && seg1.start < seg2.end;\n}", "function isSlotSegCollision(seg1, seg2) {\n\treturn seg1.end > seg2.start && seg1.start < seg2.end;\n}", "function isSlotSegCollision(seg1, seg2) {\n\treturn seg1.end > seg2.start && seg1.start < seg2.end;\n}", "function isSlotSegCollision(seg1, seg2) {\n\treturn seg1.end > seg2.start && seg1.start < seg2.end;\n}", "function isSlotSegCollision(seg1, seg2) {\n\treturn seg1.end > seg2.start && seg1.start < seg2.end;\n}", "function areCollide(r1, r2) {\n //Define the variables we'll need to calculate\n var hit, combinedHalfWidths, combinedHalfHeights, vx, vy;\n\n //hit will determine whether there's a collision\n hit = false;\n\n //Find the center points of each sprite\n r1.centerX = r1.x + r1.width / 2;\n r1.centerY = r1.y + r1.height / 2;\n r2.centerX = r2.x + r2.width / 2;\n r2.centerY = r2.y + r2.height / 2;\n\n //Find the half-widths and half-heights of each sprite\n r1.halfWidth = r1.width / 2;\n r1.halfHeight = r1.height / 2;\n r2.halfWidth = r2.width / 2;\n r2.halfHeight = r2.height / 2;\n\n //Calculate the distance vector between the sprites\n vx = r1.centerX - r2.centerX;\n vy = r1.centerY - r2.centerY;\n\n //Figure out the combined half-widths and half-heights\n combinedHalfWidths = r1.halfWidth + r2.halfWidth;\n combinedHalfHeights = r1.halfHeight + r2.halfHeight;\n\n //Check for a collision on the x axis\n if (Math.abs(vx) < combinedHalfWidths) {\n\n //A collision might be occuring. Check for a collision on the y axis\n if (Math.abs(vy) < combinedHalfHeights) {\n\n //There's definitely a collision happening\n hit = true;\n } else {\n\n //There's no collision on the y axis\n hit = false;\n }\n } else {\n\n //There's no collision on the x axis\n hit = false;\n }\n\n //`hit` will be either `true` or `false`\n return hit;\n}", "function isDaySegCollision(seg, otherSegs) {\n var i;\n var otherSeg;\n for (i = 0; i < otherSegs.length; i++) {\n otherSeg = otherSegs[i];\n if (otherSeg.firstCol <= seg.lastCol &&\n otherSeg.lastCol >= seg.firstCol) {\n return true;\n }\n }\n return false;\n}", "function isCollision(loc1, dim1, loc2, dim2) {\n // Define corner points for both shapes\n // These are the critical points for comparison.\n var firstP1 = loc1;\n var firstP2 = {\n x: loc1.x + dim1.x,\n y: loc1.y + dim1.y\n };\n var secondP1 = loc2;\n var secondP2 = {\n x: loc2.x + dim2.x,\n y: loc2.y + dim2.y\n };\n\n return !(firstP2.x < secondP1.x\n || firstP1.x > secondP2.x\n || firstP2.y < secondP1.y\n || firstP1.y > secondP2.y);\n}", "function collision (first, second){\n const w = (first.width + second.width) / 2;\n const h = (first.height + second.height) / 2;\n const dx = Math.abs(first.x - second.x);\n const dy = Math.abs(first.y - second.y);\n if (dx <= w && dy <= h){\n const wy = w * (first.y - second.y);\n const hx = h * (first.x - second.x);\n if (wy > hx){\n if (wy > -hx){\n stopUp = true;\n // console.log('collision: up');\n return true;\n } else {\n stopRight = true;\n // console.log('collision: right');\n return true;\n }\n }else{\n if (wy > -hx){\n stopLeft = true;\n // console.log('collision: left');\n return true;\n } else {\n stopDown = true;\n // console.log('collision: down');\n return true;\n };\n };\n }else{\n stopUp = false;\n stopRight = false;\n stopDown = false;\n stopLeft = false;\n return false;\n };\n}", "function collision_check(a,b) {\n let res = (Math.abs(a.x-b.x) * 2 < (16+8)) &&\n (Math.abs(a.y-b.y) * 2< (16+8))\n return res;\n}", "function collide(l1, l2) {\n\t \tvar r1 = { left: l1.x, top: l1.y, right: l1.x+l1.width, bottom: l1.y+l1.height };\n\t \tvar r2 = { left: l2.x, top: l2.y, right: l2.x+l2.width, bottom: l2.y+l2.height };\n \t\t\t \n \t\t\t return !(r2.left > r1.right || \n\t\t\t r2.right < r1.left || \n\t\t\t r2.top > r1.bottom ||\n\t\t\t r2.bottom < r1.top);\n\t }", "function isColliding(a, b) {\n return a.left < b.right && a.right > b.left && a.top < b.bottom && a.bottom > b.top;\n}", "isOverlap(other) {\n var rects = [this, other];\n for (var r in rects) {\n var rect = rects[r];\n for (var i = 0; i < 4; i++) {\n var _i = (i + 1) % 4;\n var p1 = rect.points[i];\n var p2 = rect.points[_i];\n var norm = new Vector2D(p2.y - p1.y, p1.x - p2.x);\n var minA = 0, maxA = 0;\n for (var j in this.points) {\n var p = this.points[j];\n var proj = norm.x * p.x + norm.y * p.y;\n if (minA == 0 || proj < minA)\n minA = proj;\n if (maxA == 0 || proj > maxA)\n maxA = proj;\n }\n var minB = 0, maxB = 0;\n for (var j in other.points) {\n var p = other.points[j];\n var proj = norm.x * p.x + norm.y * p.y;\n if (minB == 0 || proj < minB)\n minB = proj;\n if (maxB == 0 || proj > maxB)\n maxB = proj;\n }\n if (maxA < minB || maxB < minA)\n return false;\n }\n }\n return true;\n }", "function overlapTest(a, b) {\n return a.x < b.x + b.w && a.x + a.w > b.x &&\n a.y < b.y + b.h && a.y + a.h > b.y\n}", "function overlapTest(a, b) {\n return a.x < b.x + b.w && a.x + a.w > b.x &&\n a.y < b.y + b.h && a.y + a.h > b.y\n}", "function compareDaySegCols(a, b) {\n return a.leftCol - b.leftCol;\n}", "function compareDaySegCols(a, b) {\n return a.leftCol - b.leftCol;\n}", "function compareDaySegCols(a, b) {\n return a.leftCol - b.leftCol;\n}", "function compareDaySegCols(a, b) {\n return a.leftCol - b.leftCol;\n}", "function compareDaySegCols(a, b) {\n return a.leftCol - b.leftCol;\n}", "function isDaySegCollision(seg, otherSegs) {\n\t\tvar i, otherSeg;\n\n\t\tfor (i = 0; i < otherSegs.length; i++) {\n\t\t\totherSeg = otherSegs[i];\n\n\t\t\tif (\n\t\t\t\totherSeg.leftCol <= seg.rightCol &&\n\t\t\t\totherSeg.rightCol >= seg.leftCol\n\t\t\t) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "function overlapTest(a, b) {\n return a.x < b.x + b.w && a.x + a.w > b.x &&\n\t\t a.y < b.y + b.h && a.y + a.h > b.y\n}", "function isDaySegCollision(seg, otherSegs) {\n var i;\n var otherSeg;\n for (i = 0; i < otherSegs.length; i++) {\n otherSeg = otherSegs[i];\n if (otherSeg.leftCol <= seg.rightCol &&\n otherSeg.rightCol >= seg.leftCol) {\n return true;\n }\n }\n return false;\n}", "function isDaySegCollision(seg, otherSegs) {\n var i;\n var otherSeg;\n for (i = 0; i < otherSegs.length; i++) {\n otherSeg = otherSegs[i];\n if (otherSeg.leftCol <= seg.rightCol &&\n otherSeg.rightCol >= seg.leftCol) {\n return true;\n }\n }\n return false;\n}", "function isDaySegCollision(seg, otherSegs) {\n var i;\n var otherSeg;\n for (i = 0; i < otherSegs.length; i++) {\n otherSeg = otherSegs[i];\n if (otherSeg.leftCol <= seg.rightCol &&\n otherSeg.rightCol >= seg.leftCol) {\n return true;\n }\n }\n return false;\n}", "function isDaySegCollision(seg, otherSegs) {\n var i;\n var otherSeg;\n for (i = 0; i < otherSegs.length; i++) {\n otherSeg = otherSegs[i];\n if (otherSeg.leftCol <= seg.rightCol &&\n otherSeg.rightCol >= seg.leftCol) {\n return true;\n }\n }\n return false;\n}", "function isCollision(col, elem){\n var elementBottom = pixelToInt(elem.style.top) + pixelToInt(elem.style.height);\n var elementTop = pixelToInt(elem.style.top);\n\n for(var i = 0; i<col.length; i++){\n var eventBottom = pixelToInt(col[i].style.top) + pixelToInt(col[i].style.height);\n var eventTop = pixelToInt(col[i].style.top);\n\n if ((elementTop >= eventTop && elementTop < eventBottom) ||\n (elementBottom > eventTop && elementBottom <= eventBottom) ||\n (elementTop <= eventTop && elementBottom >= eventBottom) ) {\n return true;\n }\n }\n\n return false;\n }", "function isDaySegCollision(seg, otherSegs) {\n var i, otherSeg;\n\n for (i = 0; i < otherSegs.length; i++) {\n otherSeg = otherSegs[i];\n\n if (\n otherSeg.leftCol <= seg.rightCol &&\n otherSeg.rightCol >= seg.leftCol\n ) {\n return true;\n }\n }\n\n return false;\n }", "function compareDaySegCols(a, b) {\n\treturn a.leftCol - b.leftCol;\n}", "function compareDaySegCols(a, b) {\n\treturn a.leftCol - b.leftCol;\n}", "function compareDaySegCols(a, b) {\n\treturn a.leftCol - b.leftCol;\n}", "function compareDaySegCols(a, b) {\n\treturn a.leftCol - b.leftCol;\n}", "function compareDaySegCols(a, b) {\n\treturn a.leftCol - b.leftCol;\n}", "function compareDaySegCols(a, b) {\n\treturn a.leftCol - b.leftCol;\n}", "function compareDaySegCols(a, b) {\n\treturn a.leftCol - b.leftCol;\n}", "function compareDaySegCols(a, b) {\n\treturn a.leftCol - b.leftCol;\n}", "function areOverlapping(r1, r2) {\n\tif (inRange(r1.x, r2.x, r2.x + r2.w) && inRange(r1.y, r2.y, r2.y + r2.h)) {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\t\n}", "function colCheck(shapeA, shapeB) {\n\t// get the vectors to check against\n\tvar vX = (shapeA.x + (shapeA.width / 2)) - (shapeB.x + (shapeB.width / 2)),\n\t\tvY = (shapeA.y + (shapeA.height / 2)) - (shapeB.y + (shapeB.height / 2)),\n\t\t// add the half widths and half heights of the objects\n\t\thWidths = (shapeA.width / 2) + (shapeB.width / 2),\n\t\thHeights = (shapeA.height / 2) + (shapeB.height / 2),\n\t\tcolDir = null;\n \n\t// if the x and y vector are less than the half width or half height, they we must be inside the object, causing a collision\n\tif (Math.abs(vX) <= hWidths && Math.abs(vY) <= hHeights) { // Is this not so simple simple collision? Cool \n\t\t// figures out on which side we are colliding (top, bottom, left, or right) \n\t\tvar oX = hWidths - Math.abs(vX), \n\t\t\toY = hHeights - Math.abs(vY); \n\t\tif (oX >= oY) {\n\t\t\tif (vY > 0) {\n\t\t\t\tcolDir = \"t\";\n\t\t\t\tshapeA.y += oY;\n\t\t\t} else {\n\t\t\t\tcolDir = \"b\";\n\t\t\t\tshapeA.y -= oY;\n\t\t\t}\n\t\t} else {\n\t\t\tif (vX > 0) {\n\t\t\t\tcolDir = \"l\";\n\t\t\t\tshapeA.x += oX;\n\t\t\t} else {\n\t\t\t\tcolDir = \"r\";\n\t\t\t\tshapeA.x -= oX;\n\t\t\t}\n\t\t}\n\t}\n\treturn colDir;\n}", "function isDaySegCollision(seg, otherSegs) {\n\tvar i, otherSeg;\n\n\tfor (i = 0; i < otherSegs.length; i++) {\n\t\totherSeg = otherSegs[i];\n\n\t\tif (\n\t\t\totherSeg.leftCol <= seg.rightCol &&\n\t\t\totherSeg.rightCol >= seg.leftCol\n\t\t) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}", "function isDaySegCollision(seg, otherSegs) {\n\tvar i, otherSeg;\n\n\tfor (i = 0; i < otherSegs.length; i++) {\n\t\totherSeg = otherSegs[i];\n\n\t\tif (\n\t\t\totherSeg.leftCol <= seg.rightCol &&\n\t\t\totherSeg.rightCol >= seg.leftCol\n\t\t) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}", "function isDaySegCollision(seg, otherSegs) {\n\tvar i, otherSeg;\n\n\tfor (i = 0; i < otherSegs.length; i++) {\n\t\totherSeg = otherSegs[i];\n\n\t\tif (\n\t\t\totherSeg.leftCol <= seg.rightCol &&\n\t\t\totherSeg.rightCol >= seg.leftCol\n\t\t) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}", "function isDaySegCollision(seg, otherSegs) {\n\tvar i, otherSeg;\n\n\tfor (i = 0; i < otherSegs.length; i++) {\n\t\totherSeg = otherSegs[i];\n\n\t\tif (\n\t\t\totherSeg.leftCol <= seg.rightCol &&\n\t\t\totherSeg.rightCol >= seg.leftCol\n\t\t) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}", "function isDaySegCollision(seg, otherSegs) {\n\tvar i, otherSeg;\n\n\tfor (i = 0; i < otherSegs.length; i++) {\n\t\totherSeg = otherSegs[i];\n\n\t\tif (\n\t\t\totherSeg.leftCol <= seg.rightCol &&\n\t\t\totherSeg.rightCol >= seg.leftCol\n\t\t) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}", "function isDaySegCollision(seg, otherSegs) {\n\tvar i, otherSeg;\n\n\tfor (i = 0; i < otherSegs.length; i++) {\n\t\totherSeg = otherSegs[i];\n\n\t\tif (\n\t\t\totherSeg.leftCol <= seg.rightCol &&\n\t\t\totherSeg.rightCol >= seg.leftCol\n\t\t) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}", "function isDaySegCollision(seg, otherSegs) {\n\tvar i, otherSeg;\n\n\tfor (i = 0; i < otherSegs.length; i++) {\n\t\totherSeg = otherSegs[i];\n\n\t\tif (\n\t\t\totherSeg.leftCol <= seg.rightCol &&\n\t\t\totherSeg.rightCol >= seg.leftCol\n\t\t) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}", "function isDaySegCollision(seg, otherSegs) {\n\tvar i, otherSeg;\n\n\tfor (i = 0; i < otherSegs.length; i++) {\n\t\totherSeg = otherSegs[i];\n\n\t\tif (\n\t\t\totherSeg.leftCol <= seg.rightCol &&\n\t\t\totherSeg.rightCol >= seg.leftCol\n\t\t) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}", "function compareDaySegCols(a, b) {\n return a.leftCol - b.leftCol;\n }", "function compareDaySegCols(a, b) {\n return a.leftCol - b.leftCol;\n }", "function compareDaySegCols(a, b) {\n return a.leftCol - b.leftCol;\n }" ]
[ "0.7159878", "0.6964363", "0.6820563", "0.6793647", "0.67334104", "0.67165005", "0.66782117", "0.6668968", "0.6668968", "0.6668968", "0.6637565", "0.6637565", "0.6623807", "0.6621723", "0.6621723", "0.6621723", "0.6621723", "0.6621723", "0.659456", "0.6586153", "0.6578231", "0.6578231", "0.6578231", "0.6578231", "0.6578231", "0.6578231", "0.6578231", "0.6578231", "0.6574487", "0.6572691", "0.6572223", "0.6556056", "0.6524002", "0.6520326", "0.64920473", "0.64920473", "0.64920473", "0.64920473", "0.64920473", "0.6461963", "0.6445884", "0.6445884", "0.6445884", "0.6435871", "0.6431729", "0.6407063", "0.6400824", "0.63730586", "0.6367899", "0.6358608", "0.6358608", "0.6358608", "0.6358608", "0.6358608", "0.6353281", "0.634943", "0.63480467", "0.63461846", "0.6345042", "0.6340143", "0.63337743", "0.6333368", "0.6320034", "0.6320034", "0.6313516", "0.6313516", "0.6313516", "0.6313516", "0.6313516", "0.6312512", "0.63077474", "0.62989354", "0.62989354", "0.62989354", "0.62989354", "0.62978697", "0.6296871", "0.6296619", "0.6296619", "0.6296619", "0.6296619", "0.6296619", "0.6296619", "0.6296619", "0.6296619", "0.6286214", "0.62761414", "0.6275282", "0.6275282", "0.6275282", "0.6275282", "0.6275282", "0.6275282", "0.6275282", "0.6275282", "0.6254471", "0.6254471", "0.6254471" ]
0.6327876
64
A cmp function for determining the leftmost event
function compareDaySegCols(a, b) { return a.leftCol - b.leftCol; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ya(a,b){// put wider events first\n// if tie, put all-day events first (booleans cast to 0/1)\n// if a tie, sort by event start date\nreturn b.rightCol-b.leftCol-(a.rightCol-a.leftCol)||b.event.allDay-a.event.allDay||a.event.start-b.event.start||(a.event.title||\"\").localeCompare(b.event.title)}", "function eventsComparator(event1, event2){\n\tvar date1 = new Date(event1);\n\tvar date2 = new Date(event2);\n\treturn (date1 == date2) ? 0 : (date1 > date2) ? 1 : -1;\n}", "eventSort(a, b) {\n return a.date_moment().isAfter(b.date_moment()) ? 1 : -1 \n }", "function compareEvent(a, b) {\n\t var d =\n\t (a.a[0] - b.a[0]) ||\n\t (a.a[1] - b.a[1]) ||\n\t (a.type - b.type)\n\t if(d) { return d }\n\t if(a.type !== EVENT_POINT) {\n\t d = orient(a.a, a.b, b.b)\n\t if(d) { return d }\n\t }\n\t return a.idx - b.idx\n\t}", "function compareEvent(a, b) {\n\t var d =\n\t (a.a[0] - b.a[0]) ||\n\t (a.a[1] - b.a[1]) ||\n\t (a.type - b.type)\n\t if(d) { return d }\n\t if(a.type !== EVENT_POINT) {\n\t d = orient(a.a, a.b, b.b)\n\t if(d) { return d }\n\t }\n\t return a.idx - b.idx\n\t}", "eventSorter(a, b) {\n const startA = a.dataStartMs || a.startMs, // dataXX are used if configured with fillTicks\n endA = a.dataEndMs || a.endMs,\n startB = b.dataStartMs || b.startMs,\n endB = b.dataEndMs || b.endMs,\n sameStart = startA === startB;\n\n if (sameStart) {\n if (endA - endB === 0) {\n return a.event.name < b.event.name ? -1 : 1;\n }\n return endA > endB ? -1 : 1;\n }\n\n return startA < startB ? -1 : 1;\n }", "function compareEvent(a, b) {\n var d =\n (a.a[0] - b.a[0]) ||\n (a.a[1] - b.a[1]) ||\n (a.type - b.type)\n if(d) { return d }\n if(a.type !== EVENT_POINT) {\n d = orient(a.a, a.b, b.b)\n if(d) { return d }\n }\n return a.idx - b.idx\n}", "function compareEvent(a, b) {\n var d =\n (a.a[0] - b.a[0]) ||\n (a.a[1] - b.a[1]) ||\n (a.type - b.type)\n if(d) { return d }\n if(a.type !== EVENT_POINT) {\n d = orient(a.a, a.b, b.b)\n if(d) { return d }\n }\n return a.idx - b.idx\n}", "function compareEvent(a, b) {\n var d =\n (a.a[0] - b.a[0]) ||\n (a.a[1] - b.a[1]) ||\n (a.type - b.type)\n if(d) { return d }\n if(a.type !== EVENT_POINT) {\n d = orient(a.a, a.b, b.b)\n if(d) { return d }\n }\n return a.idx - b.idx\n}", "function findLeft(event, key) {\n var arr = new Array();\n var copy = Object.assign({}, event);\n copy.key = key;\n arr.push(copy);\n if (!event.collideWith) {\n return 0;\n }\n var c_events = event.collideWith.split(\",\");\n for (var i = 0; i < c_events.length; i++) {\n if (c_events[i] == \"\") {\n continue;\n }\n var c_event_object = time[c_events[i]];\n var c_copy = Object.assign({}, c_event_object);\n c_copy.key = c_events[i];\n arr.push(c_copy);\n }\n arr.sort(compare);\n var idx = findIndexOfEvent(key, arr);\n var width = 620 / arr.length;\n var left = width * idx;\n return left;\n}", "function sort_events(a,b) {\n if (a.recorded_at < b.recorded_at)\n return -1;\n if (a.recorded_at > b.recorded_at)\n return 1;\n return 0;\n }", "lt(other) { return this.cmp(other) < 0; }", "function sortByEarliestEvent(a, b) {\n\t\tvar delta = a.starts_at - b.starts_at;\n\t\tif (delta === 0) {\n\t\t\t//if two events begin at the same time, show the shorter event first\n\t\t\treturn a.duration - b.duration;\n\t\t}\n\n\t\treturn delta;\n\t}", "sortEvents(e1, e2) {\n return e1.time - e2.time;\n }", "function jt(t, e, n) {\n for (var r = 0, i = 0; i < t.position.length; i++) {\n var o = e[i], s = t.position[i];\n if (r = o.field.isKeyField() ? ut.comparator(ut.fromName(s.referenceValue), n.key) : ft(s, n.data.field(o.field)), \n \"desc\" /* DESCENDING */ === o.dir && (r *= -1), 0 !== r) break;\n }\n return t.before ? r <= 0 : r < 0;\n}", "function compare(a,b) {\n if (a.dateOfEvent > b.dateOfEvent)\n return -1;\n if (a.dateOfEvent < b.dateOfEvent)\n return 1;\n return 0;\n }", "eventSorter(a, b) {\n const startA = a.dataStartMs || a.startDateMS, // dataXX are used if configured with fillTicks\n endA = a.dataEndMs || a.endDateMS,\n startB = b.dataStartMs || b.startDateMS,\n endB = b.dataEndMs || b.endDateMS,\n sameStart = startA === startB;\n\n if (sameStart) {\n if (endA - endB === 0) {\n return a.eventRecord.name < b.eventRecord.name ? -1 : 1;\n }\n return endA > endB ? -1 : 1;\n }\n\n return startA < startB ? -1 : 1;\n }", "function compare(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,a=Math.min(r,n);i<a;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0}", "function compare(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,a=Math.min(r,n);i<a;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0}", "function compare(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0}", "function compFunc(a, b)\n{\n\tif (a.date < b.date)\n\t\treturn 1;\n\telse if (a.date > b.date)\n\t\treturn -1;\n\telse\n\t\treturn 0;\n}", "function compare(a, b) {\n\t return a < b ? -1 : a > b ? 1 : 0;\n\t}", "function compare(a, b) {\n\t return a < b ? -1 : a > b ? 1 : 0;\n\t}", "function cmp(a, b) {\n if(a < b) {\n return -1;\n } else if(a > b) {\n return 1;\n } else {\n return 0;\n }\n }", "function cmp(a, b) {\n if(a < b) {\n return -1;\n } else if(a > b) {\n return 1;\n } else {\n return 0;\n }\n }", "function cmp(a, b) {\n if(a < b) {\n return -1;\n } else if(a > b) {\n return 1;\n } else {\n return 0;\n }\n }", "eventSorter(a, b) {\n const startA = a.dataStartMs || a.startDateMS,\n // dataXX are used if configured with fillTicks\n endA = a.dataEndMs || a.endDateMS,\n startB = b.dataStartMs || b.startDateMS,\n endB = b.dataEndMs || b.endDateMS,\n nameA = a.isModel ? a.name : a.eventRecord.name,\n nameB = b.isModel ? b.name : b.eventRecord.name,\n sameStart = startA === startB;\n\n if (sameStart) {\n if (endA - endB === 0) {\n return nameA < nameB ? -1 : 1;\n }\n\n return endA > endB ? -1 : 1;\n }\n\n return startA < startB ? -1 : 1;\n }", "function compareEvents(a, b) {\n // We can sort by start/end here because the ISO 8061\n // timestamps given by the server are lexicographically\n // sortable.\n if (a.start < b.start) { // if a starts before b...\n return -1; // ...then a goes before b\n } else if (a.start > b.start) { // if a starts after b...\n return 1; // ...then b goes before a\n } else {\n if (a.end < b.end) { // if a ends before b...\n return -1; // ...then a goes before b\n } else if (a.end > b.end) { // if a ends after b...\n return 1; // ...then b goes before a\n } else {\n return 0;\n }\n }\n}", "function compare(left, right) {\n\t return left < right ? -1 : left > right ? 1 : 0;\n\t}", "function compare(left, right) {\n\t return left < right ? -1 : left > right ? 1 : 0;\n\t}", "function compare(a, b) {\n\t if (a.timeStamp > b.timeStamp) {\n\t return -1;\n\t }\n\n\t if (a.timeStamp < b.timeStamp) {\n\t return 1;\n\t }\n\n\t return 0;\n\t }", "function compare(a, b) {\n\t if (a.timeStamp > b.timeStamp) {\n\t return -1;\n\t }\n\n\t if (a.timeStamp < b.timeStamp) {\n\t return 1;\n\t }\n\n\t return 0;\n\t }", "eventSorter(a, b) {\n if (this.horizontalEventSorterFn) {\n return this.horizontalEventSorterFn(a.eventRecord || a, b.eventRecord || b);\n }\n\n const // TODO: Rename startMS -> startDateMS to not have to have isModel check here (and to be consistent)\n startA = a.isModel ? a.startDateMS : a.dataStartMS || a.startMS,\n // dataXX are used if configured with fillTicks\n endA = a.isModel ? a.endDateMS : a.dataEndMS || a.endMS,\n startB = b.isModel ? b.startDateMS : b.dataStartMS || b.startMS,\n endB = b.isModel ? b.endDateMS : b.dataEndMS || b.endMS,\n nameA = a.isModel ? a.name : a.eventRecord.name,\n nameB = b.isModel ? b.name : b.eventRecord.name,\n sameStart = startA === startB;\n\n if (sameStart) {\n if (endA - endB === 0) {\n return nameA < nameB ? -1 : 1;\n }\n\n return endA > endB ? -1 : 1;\n }\n\n return startA < startB ? -1 : 1;\n }", "function compare(left, right) {\n return left < right ? -1 : left > right ? 1 : 0;\n }", "function sortMostUrgetFirst(a, b) {\n a.frames = a.frames.sort(sortMostRecentFirst);\n b.frames = b.frames.sort(sortMostRecentFirst);\n let aFrame = a.frames[0]; // most recent frame is not at 0\n let bFrame = b.frames[0];\n let aOngoing = aFrame.until === undefined;\n let bOngoing = bFrame.until === undefined;\n if (aOngoing != bOngoing)\n return aOngoing ? -1 : 1;\n let aLevel = aFrame.level;\n let bLevel = bFrame.level;\n if (aLevel != bLevel)\n return aLevel === 'red' ? -1 : 1;\n return bFrame.since - aFrame.since; // start with most recent item\n }", "function compare(a,b) {\n if (a.x < b.x)\n return -1;\n if (a.x > b.x)\n return 1;\n return 0;\n }", "function compare (a, b) {\n return a > b ? 1 : a < b ? -1 : 0\n}", "function compare (a, b) {\n return a > b ? 1 : a < b ? -1 : 0\n}", "function compare (a, b) {\n return a > b ? 1 : a < b ? -1 : 0\n}", "function compare (a, b) {\n return a > b ? 1 : a < b ? -1 : 0\n}", "function compare (a, b) {\n return a > b ? 1 : a < b ? -1 : 0\n}", "function compare (a, b) {\n return a > b ? 1 : a < b ? -1 : 0\n}", "function compare (a, b) {\n return a > b ? 1 : a < b ? -1 : 0\n}", "function compare (a, b) {\n return a > b ? 1 : a < b ? -1 : 0\n}", "function compare (a, b) {\n return a > b ? 1 : a < b ? -1 : 0\n}", "function compare (a, b) {\n return a > b ? 1 : a < b ? -1 : 0\n}", "function compare (a, b) {\n return a > b ? 1 : a < b ? -1 : 0\n}", "function compare (a, b) {\n return a > b ? 1 : a < b ? -1 : 0\n}", "function compare (a, b) {\n return a > b ? 1 : a < b ? -1 : 0\n}", "function compare (a, b) {\n return a > b ? 1 : a < b ? -1 : 0\n}", "compare(a, b) {\n if (a === b) return 0;\n return a < b ? -1 : 1;\n }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function Bt(t, e, n) {\n for (var r = 0, i = 0; i < t.position.length; i++) {\n var o = e[i], s = t.position[i];\n if (r = o.field.isKeyField() ? st.comparator(st.fromName(s.referenceValue), n.key) : ht(s, n.data.field(o.field)), \n \"desc\" /* DESCENDING */ === o.dir && (r *= -1), 0 !== r) break;\n }\n return t.before ? r <= 0 : r < 0;\n}", "function compare(a, b) {\n if (a.state < b.state) {\n return -1;\n }\n if (a.state > b.state) {\n return 1;\n }\n return 0;\n }", "function compare(a,b) {\n\t\t\t if (a.index < b.index)\n\t\t\t\treturn -1;\n\t\t\t if (a.index > b.index)\n\t\t\t\treturn 1;\n\t\t\t return 0;\n\t\t\t}", "function compare(a, b) {\n return a > b ? 1 : a < b ? -1 : 0;\n}", "function minCompare(el1, el2) {\n return el1 - el2;\n}", "function compare (a, b) {\r\n if (a.timeStamp > b.timeStamp) {\r\n return -1;\r\n }\r\n if (a.timeStamp < b.timeStamp) {\r\n return 1;\r\n }\r\n\r\n return 0;\r\n }", "function compare_asc(a, b) {\n return a - b;\n}", "function compare(topX1, topX2) {\n if (topX1 > topX2) {\n return 1;\n }\n if (topX2 < topX1) {\n return -1;\n }\n return 0;\n }", "compare(a, b) {\n if (a === b) {\n return 0;\n }\n \n return a < b ? -1 : 1;\n }", "function cmp(a, b) {\n return a.line - b.line || a.ch - b.ch;\n }", "function compare(a, b) {\n return a < b ? -1 : a > b ? 1 : 0;\n}", "function compare(a, b) {\n return a < b ? -1 : a > b ? 1 : 0;\n}", "function compare(a, b) {\n return a < b ? -1 : a > b ? 1 : 0;\n}", "function compare(a, b) {\n return a < b ? -1 : a > b ? 1 : 0;\n}", "function compare(a, b) {\n return a < b ? -1 : a > b ? 1 : 0;\n}", "function compare(a, b) {\n if (a.index < b.index)\n return -1;\n else (a.index > b.index)\n return 1;\n }", "function compare(a, b) {\n if (a.index < b.index)\n return -1;\n else (a.index > b.index)\n return 1;\n }" ]
[ "0.70130354", "0.6486962", "0.64742804", "0.6474233", "0.6474233", "0.6424697", "0.6407531", "0.6407531", "0.6407531", "0.6340511", "0.6306749", "0.61612266", "0.6138099", "0.6133441", "0.6055893", "0.6034904", "0.6024256", "0.60227823", "0.60227823", "0.6013692", "0.59532785", "0.5942179", "0.5942179", "0.59216267", "0.59216267", "0.59216267", "0.59105897", "0.5881221", "0.584353", "0.584353", "0.5842305", "0.5842305", "0.58370084", "0.58313745", "0.58302754", "0.5828843", "0.58003056", "0.58003056", "0.58003056", "0.58003056", "0.58003056", "0.58003056", "0.58003056", "0.58003056", "0.58003056", "0.58003056", "0.58003056", "0.58003056", "0.58003056", "0.58003056", "0.5761419", "0.57249725", "0.57249725", "0.57249725", "0.57249725", "0.57249725", "0.57249725", "0.57249725", "0.57249725", "0.57249725", "0.57249725", "0.57249725", "0.57249725", "0.57249725", "0.57249725", "0.57249725", "0.57249725", "0.57249725", "0.57249725", "0.57249725", "0.57249725", "0.57249725", "0.57249725", "0.57249725", "0.57249725", "0.57249725", "0.57249725", "0.57249725", "0.57249725", "0.57249725", "0.57249725", "0.57249725", "0.57249725", "0.57249725", "0.57228327", "0.57221186", "0.5721786", "0.5721043", "0.57112724", "0.56986195", "0.56978756", "0.5696251", "0.5694671", "0.5692946", "0.5689295", "0.5689295", "0.5689295", "0.5689295", "0.5689295", "0.56705284", "0.56705284" ]
0.0
-1
Injects a string like "arg=value" into the querystring of a URL TODO: move to a general util file?
function injectQsComponent(url, component) { // inject it after the querystring but before the fragment return url.replace(/(\?.*?)?(#|$)/, function (whole, qs, hash) { return (qs ? qs + '&' : '?') + component + hash; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addURLQueryString(key, value) {\n const searchParams = new URL.URLSearchParams(this.urlObj.search);\n searchParams.append(key, value);\n this.urlObj.search = searchParams.toString();\n }", "function add_query_arg(key, value, sourceURL) {\r\n\r\n return sourceURL + '&' + key + '=' + value;\r\n\r\n }", "function addParameterToURL(url, key, val){\n\t\turl += (url.split('?')[1] ? '&':'?') + key + \"=\" + val;\n\t\treturn url;\n\t}", "function xl_AddParmToURLString(str, name, value)\n{\n\tif(str.indexOf('?') == -1) \n\t\tstr += \"?\";\n\telse \n\t\tstr += \"&\";\n\treturn str + xl_Encode(name) + \"=\" + xl_Encode(value);\n}", "function setURLParameter(url, name, value) {\n const urlParsed = coreHttp.URLBuilder.parse(url);\n urlParsed.setQueryParameter(name, value);\n return urlParsed.toString();\n}", "function setURLParameter(url, name, value) {\n const urlParsed = coreHttp.URLBuilder.parse(url);\n urlParsed.setQueryParameter(name, value);\n return urlParsed.toString();\n}", "function updateQueryString(key, value, url) {\n// \n// see http://stackoverflow.com/questions/5999118/add-or-update-query-string-parameter\n// \n if (!url) url = window.location.href;\n var re = new RegExp(\"([?&])\" + key + \"=.*?(&|#|$)(.*)\", \"gi\"),\n hash;\n\n if (re.test(url)) {\n if (typeof value !== 'undefined' && value !== null)\n return url.replace(re, '$1' + key + \"=\" + value + '$2$3');\n else {\n hash = url.split('#');\n url = hash[0].replace(re, '$1$3').replace(/(&|\\?)$/, '');\n if (typeof hash[1] !== 'undefined' && hash[1] !== null) \n url += '#' + hash[1];\n return url;\n }\n }\n else {\n if (typeof value !== 'undefined' && value !== null) {\n var separator = url.indexOf('?') !== -1 ? '&' : '?';\n hash = url.split('#');\n url = hash[0] + separator + key + '=' + value;\n if (typeof hash[1] !== 'undefined' && hash[1] !== null) \n url += '#' + hash[1];\n return url;\n }\n else\n return url;\n }\n}", "function SetURLParameter(param_name, param_value, url)\n{\n if (!url)\n {\n url = window.location.href;\n }\n var new_url = \"\";\n // find the parameter is in the URL\n var param_pos = url.indexOf(\"?\" + param_name + \"=\");\n if (0 > param_pos)\n {\n param_pos = url.indexOf(\"&\" + param_name + \"=\");\n }\n if (0 > param_pos)\n {\n param_pos = url.indexOf(\"&amp;\" + param_name + \"=\");\n }\n // check if the parameter was found\n if (0 > param_pos)\n {\n // param_name field not found\n new_url = url + \"&\" + param_name + \"=\" + param_value;\n }\n else\n {\n // param_name field found, update the parameter\n ++param_pos;\n // check if other parameters follow\n var next_param_pos = url.indexOf(\"&\", param_pos);\n if (0 > next_param_pos)\n {\n // nothing follows\n new_url = url.substr(0, param_pos) + param_name + \"=\" + param_value;\n }\n else\n {\n // other parameters follow\n new_url = url.substr(0, param_pos) + url.substr(next_param_pos + 1) + \"&\" + param_name + \"=\" + param_value;\n }\n }\n return new_url;\n}", "function UpdateQueryString(key, value, url) {\n\tif (!url)\n\t\turl = window.location.href;\n\tvar re = new RegExp(\"([?&])\" + key + \"=.*?(&|#|$)(.*)\", \"gi\"),\n\t hash;\n\n\tif (re.test(url)) {\n\t\tif ( typeof value !== 'undefined' && value !== null)\n\t\t\treturn url.replace(re, '$1' + key + \"=\" + value + '$2$3');\n\t\telse {\n\t\t\thash = url.split('#');\n\t\t\turl = hash[0].replace(re, '$1$3').replace(/(&|\\?)$/, '');\n\t\t\tif ( typeof hash[1] !== 'undefined' && hash[1] !== null)\n\t\t\t\turl += '#' + hash[1];\n\t\t\treturn url;\n\t\t}\n\t} else {\n\t\tif ( typeof value !== 'undefined' && value !== null) {\n\t\t\tvar separator = url.indexOf('?') !== -1 ? '&' : '?';\n\t\t\thash = url.split('#');\n\t\t\turl = hash[0] + separator + key + '=' + value;\n\t\t\tif ( typeof hash[1] !== 'undefined' && hash[1] !== null)\n\t\t\t\turl += '#' + hash[1];\n\t\t\treturn url;\n\t\t} else\n\t\t\treturn url;\n\t}\n}", "function queryStringUrlReplacement(url, param, value)\n {\n var re = new RegExp(\"[\\\\?&]\" + param + \"=([^&#]*)\"), match = re.exec(url), delimiter, newString;\n\n if (match === null) {\n\n // append new param\n var hasQuestionMark = /\\?/.test(url);\n delimiter = hasQuestionMark ? \"&\" : \"?\";\n newString = url + delimiter + param + \"=\" + value;\n } else {\n delimiter = match[0].charAt(0);\n newString = url.replace(re, delimiter + param + \"=\" + value);\n }\n\n return newString;\n }", "function yellQueryParam(url,name)\n{\n name = (''+name).replace(/[\\[]/,\"\\\\\\[\").replace(/[\\]]/,\"\\\\\\]\");\n var regexS = \"[\\\\?&]\"+name+\"=([^&#]*)\";\n var regex = new RegExp(regexS);\n var results = regex.exec(url);\n if (results == null)\n return \"\";\n else\n return results[1];\n}", "function updateQueryString(key, value, url) {\n if (!url) url = window.location.href;\n var re = new RegExp(\"([?|&])\" + key + \"=.*?(&|#|$)\", \"gi\");\n\n if (url.match(re)) {\n if (value)\n return url.replace(re, '$1' + key + \"=\" + value + '$2');\n else\n return url.replace(re, '$2');\n }\n else {\n if (value) {\n var separator = url.indexOf('?') !== -1 ? '&' : '?',\n hash = url.split('#');\n url = hash[0] + separator + key + '=' + value;\n if (hash[1]) url += '#' + hash[1];\n return url;\n }\n else\n return url;\n }\n}", "function updateQueryStringParameter(key, value) {\n let uri = window.location.href;\n let re = new RegExp(\"([?&])\" + key + \"=.*?(&|$)\", \"i\");\n let separator = uri.indexOf('?') !== -1 ? \"&\" : \"?\";\n if (key === 'bldg') {\n uri = removeParam('flr', uri);\n }\n if (uri.match(re)) {\n window.location.href = uri.replace(re, '$1' + key + \"=\" + value + '$2');\n } else {\n window.location.href = uri + separator + key + \"=\" + value;\n }\n}", "function updateQueryString(key, value, url) {\n if (!url) url = window.location.href;\n var re = new RegExp(\"([?&])\" + key + \"=.*?(&|#|$)(.*)\", \"gi\"),\n hash;\n\n if (re.test(url)) {\n if (typeof value !== 'undefined' && value !== null) {\n return url.replace(re, '$1' + key + \"=\" + value + '$2$3');\n } else {\n hash = url.split('#');\n url = hash[0].replace(re, '$1$3').replace(/(&|\\?)$/, '');\n if (typeof hash[1] !== 'undefined' && hash[1] !== null)\n url += '#' + hash[1];\n return url;\n }\n }\n else {\n if (typeof value !== 'undefined' && value !== null) {\n var separator = url.indexOf('?') !== -1 ? '&' : '?';\n hash = url.split('#');\n url = hash[0] + separator + key + '=' + value;\n if (typeof hash[1] !== 'undefined' && hash[1] !== null) {\n url += '#' + hash[1];\n }\n return url;\n } else {\n return url;\n }\n }\n }", "function insertParam(url, key, value) {\n if (url.indexOf('?') != -1) {\n\t\tvar pairset = url.split('&');\n var i = pairset.length;\n var pair;\n\n key = escape(key);\n value = escape(value);\n while (i--) {\n pair = pairset[i].split('=');\n\n if (pair[0] == key) {\n pair[1] = value;\n pairset[i] = pair.join('=');\n break;\n }\n }\n\n if (i < 0) {\n pairset[pairset.length] = [key, value].join('=');\n }\n\n return pairset.join('&');\n }\n else {\n return url + '?' + [key, value].join('=');\n }\n}", "function addOrUpdateUrlParameterValue(key, value) {\n var url = window.location.href;\n var regExp = new RegExp(\"([?&])\" + key + \"=.*?(&|$)\", \"i\");\n var separator = url.indexOf('?') !== -1 ? \"&\" : \"?\";\n if (url.match(regExp)) {\n window.history.pushState({}, null, url.replace(regExp, '$1' + key + \"=\" + value + '$2'));\n } else {\n window.history.pushState({}, null, url + separator + key + \"=\" + value);\n }\n}", "function updateQueryStringParameter(uri, key, value) {\n var re = new RegExp(\"([?&])\" + key + \"=.*?(&|$)\", \"i\");\n var separator = uri.indexOf(\"?\") > -1 ? \"&\" : \"?\";\n if (uri.match(re)) {\n return uri.replace(re, \"$1\" + key + \"=\" + value + \"$2\");\n } else {\n return uri + separator + key + \"=\" + value;\n }\n}", "function injectQuery(url, queryToInject) {\n // skip urls that won't be handled by vite\n if (!url.startsWith('.') && !url.startsWith('/')) {\n return url;\n }\n // can't use pathname from URL since it may be relative like ../\n const pathname = url.replace(/#.*$/, '').replace(/\\?.*$/, '');\n const { search, hash } = new URL(url, 'http://vitejs.dev');\n return `${pathname}?${queryToInject}${search ? `&` + search.slice(1) : ''}${hash || ''}`;\n}", "function addParamter(name, value, addParamHeader) {\n var url = window.location.href.substr(window.location.href.lastIndexOf(\"/\") + 1); //window.location.href;\n //check if already in location\n var regex = new RegExp(\"([?&]\" + name + \"=)(([^&#]*)|&|#|$)\");\n if (regex.test(url)) {\n //replace the existing value\n //window.location.href = url.replace(regex, '$1' + value);\n history.replaceState(null, \"\", url.replace(regex, '$1' + value));\n } else {\n //append to the end of the url\n //window.location.href = url + (/\\?/.test(url) ? \"&\" : \"?\") + name + \"=\" + value;\n history.replaceState(null, \"\", url + (/\\?/.test(url) ? \"&\" : \"?\") + name + \"=\" + value);\n }\n}", "function setParam(url, paramName, value){\n url = url || '';\n\n var re = new RegExp('(\\\\?|&)'+ paramName +'=[^&]*' );\n var param = paramName +'='+ encodeURIComponent( value );\n\n if ( re.test(url) ) {\n return url.replace(re, '$1'+ param);\n } else {\n if (url.indexOf('?') === -1) {\n url += '?';\n }\n if (url.indexOf('=') !== -1) {\n url += '&';\n }\n return url + param;\n }\n\n }", "function insertParam(key, value)\n{\n key = encodeURI(key); value = encodeURI(value);\n\n var kvp = document.location.search.substr(1).split('&');\n\n var i=kvp.length; var x; while(i--) \n {\n x = kvp[i].split('=');\n\n if (x[0]==key)\n {\n x[1] = value;\n kvp[i] = x.join('=');\n break;\n }\n }\n\n if(i<0) { kvp[kvp.length] = [key,value].join('='); }\n\n /* this will reload the page, it's likely better to store this until finished */\n /* document.location.search = kvp.join('&'); */\n\t\treturn kvp.join('&'); \n}", "function __setUrlParam($url, $name, $value) {\r\n\r\n var charFix = $url.indexOf(\"?\")!=-1?\"&\":\"?\";\r\n var nIdxStart = $url.indexOf(\"&\" + $name + \"=\");\r\n if (nIdxStart==-1) {\r\n nIdxStart = $url.indexOf(\"?\" + $name + \"=\");\r\n }\r\n if (nIdxStart==-1) { //no params\r\n $url = $url + charFix + $name + \"=\" + $value;\r\n return $url;\r\n }\r\n /**\r\n * from upper it found the name start and then try to found the value end position\r\n * the value and be empty or it's the url end\r\n */\r\n var nIdxEnd = $url.indexOf(\"&\", nIdxStart+1);\r\n var urlPreFix = $url.substr(0, nIdxStart+1);\r\n var urlEndFix = \"\";\r\n if (nIdxEnd!=-1) {\r\n urlEndFix = $url.substr(nIdxEnd);\r\n }\r\n $url = urlPreFix + $name + \"=\" + $value + urlEndFix;\r\n return $url;\r\n}", "function injectQsComponent(url, component) {\n // inject it after the querystring but before the fragment\n return url.replace(/(\\?.*?)?(#|$)/, function (whole, qs, hash) { return (qs ? qs + '&' : '?') + component + hash; });\n }", "function addOrUpdateUrlParameterValue(key, value) {\n var url = window.location.href;\n var regExp = new RegExp(\"([?&])\" + key + \"=.*?(&|$)\", \"i\");\n var separator = url.indexOf(\"?\") !== -1 ? \"&\" : \"?\";\n\n if (url.match(regExp)) {\n window.history.pushState({}, null, url.replace(regExp, \"$1\" + key + \"=\" + value + \"$2\"));\n } else {\n window.history.pushState({}, null, url + separator + key + \"=\" + value);\n }\n} // Document ready", "function insertParam(key, value) {\n key = encodeURI(key);\n value = encodeURI(value);\n\n var kvp = document.location.search.substr(1).split('&');\n\n var i = kvp.length;\n var x;\n while (i--) {\n x = kvp[i].split('=');\n\n if (x[0] == key) {\n x[1] = value;\n kvp[i] = x.join('=');\n break;\n }\n }\n\n if (i < 0) {\n kvp[kvp.length] = [key, value].join('=');\n }\n\n //this will reload the page, it's likely better to store this until finished\n document.location.search = kvp.join('&');\n }", "function updateQueryStringParameter(uri, key, value) {\n var re = new RegExp(\"([?&])\" + key + \"=.*?(&|$)\", \"i\");\n var separator = uri.indexOf('?') !== -1 ? \"&\" : \"?\";\n if (uri.match(re)) {\n return uri.replace(re, '$1' + key + \"=\" + value + '$2');\n }\n return uri + separator + key + \"=\" + value;\n }", "function updateQueryStringParameter(uri, key, value) {\n var re = new RegExp(\"([?&])\" + key + \"=.*?(&|$)\", \"i\");\n var separator = uri.indexOf('?') !== -1 ? \"&\" : \"?\";\n if (uri.match(re)) {\n return uri.replace(re, '$1' + key + \"=\" + value + '$2');\n }\n else {\n return uri + separator + key + \"=\" + value;\n }\n}", "function updateQueryStringParameter(uri, key, value) {\n \tvar re = new RegExp(\"([?&])\" + key + \"=.*?(&|$)\", \"i\"),\n\t \tseparator = uri.indexOf('?') !== -1 ? \"&\" : \"?\";\n \t\n \tif (uri.match(re)) {\n \t\tif (typeof value != 'undefined' && value !== '') {\n \t\treturn uri.replace(re, '$1' + key + \"=\" + value + '$2');\n \t} else {\n \t\treturn uri.replace(re, '$1' + '$2');\n \t}\n \t}\n \telse {\n \treturn uri + separator + key + \"=\" + value;\n \t}\n}", "function injectQsComponent(url, component) {\n // inject it after the querystring but before the fragment\n return url.replace(/(\\?.*?)?(#|$)/, function (whole, qs, hash) {\n return (qs ? qs + '&' : '?') + component + hash;\n });\n}", "function injectQsComponent(url, component) {\n\t// inject it after the querystring but before the fragment\n\treturn url.replace(/(\\?.*?)?(#|$)/, function(whole, qs, hash) {\n\t\treturn (qs ? qs + '&' : '?') + component + hash;\n\t});\n}", "function setQueryParameter(name, val) {\n\tfunction updateURLParameter(url, param, paramVal){\n\t\tvar newAdditionalURL = \"\";\n\t\tvar tempArray = url.split(\"?\");\n\t\tvar baseURL = tempArray[0];\n\t\tvar additionalURL = tempArray[1];\n\t\tvar temp = \"\";\n\t\tif (additionalURL) {\n\t\t\ttempArray = additionalURL.split(\"&\");\n\t\t\tfor (var i=0; i<tempArray.length; i++){\n\t\t\t\tif(tempArray[i].split('=')[0] !== param){\n\t\t\t\t\tnewAdditionalURL += temp + tempArray[i];\n\t\t\t\t\ttemp = \"&\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tvar rows_txt = temp + \"\" + param + \"=\" + paramVal;\n\t\treturn baseURL + \"?\" + newAdditionalURL + rows_txt;\n\t}\n\n\twindow.history.replaceState('', '', updateURLParameter(window.location.href, name, val.toString()));\n}", "function updateURL(url, key, value) {\n var re = new RegExp(\"([?&])\" + key + \"=.*?(&|$)\", \"i\"),\n separator = url.indexOf('?') !== -1 ? \"&\" : \"?\";\n return url.match(re) ? url.replace(re, '$1' + key + \"=\" + value + '$2') : url + separator + key + \"=\" + value;\n }", "function updateQueryStringParam(key, value) {\n baseUrl = [location.protocol, '//', location.host, location.pathname].join('');\n urlQueryString = document.location.search;\n var newParam = key + '=' + value,\n params = '?' + newParam;\n\n // If the \"search\" string exists, then build params from it\n if (urlQueryString) {\n keyRegex = new RegExp('([\\?&])' + key + '[^&]*');\n // If param exists already, update it\n if (urlQueryString.match(keyRegex) !== null) {\n params = urlQueryString.replace(keyRegex, \"$1\" + newParam);\n } else { // Otherwise, add it to end of query string\n params = urlQueryString + '&' + newParam;\n }\n }\n window.history.replaceState({}, \"\", baseUrl + params);\n}", "function getUrlWithReplaceParam(startString, startIndexOf, paramName, paramValue, paramChar) {\n\t var urlToUse = '';\n\t var fullParamNameLength = (paramChar + paramName + '=').length;\n\t var indexOfStartParamValue = startIndexOf + fullParamNameLength;\n\t var indexOfEndOfParamValue = startString.indexOf('&', indexOfStartParamValue);\n\t if (indexOfEndOfParamValue != -1) {\n\t\t urlToUse = startString.substring(0,indexOfStartParamValue) + paramValue + startString.substring(indexOfEndOfParamValue);\n\t } else {\n\t\t urlToUse = startString.substring(0,indexOfStartParamValue) + paramValue;\n\t }\n\t return urlToUse;\n \t}", "function _updateQueryStringParameter(uri, key, value) {\n key = encodeURIComponent(key);\n value = encodeURIComponent(value);\n var re = new RegExp('([?&])' + key + '=.*?(&|$)', 'i');\n var separator = uri.indexOf('?') !== -1 ? '&' : '?';\n if(uri.match(re)) {\n return uri.replace(re, '$1' + key + '=' + value + '$2');\n }\n return uri + separator + key + '=' + value;\n}", "function addToURL(key, value) {\n\tkey = encodeURI(key); value = encodeURI(value);\n\tvar kvp = document.location.search.substr(1).split(\"&\");\n\tvar i = kvp.length; \n\tvar x;\n\n\t// format url\n\twhile (i--) {\n\t\tx = kvp[i].split(\"=\");\n\t\tif (x [0] == key) {\n\t\t\tx [1] = value;\n\t\t\tkvp [i] = x.join(\"=\");\n\t\t\tbreak;\n\t\t} // if\n\t} // while\n\n\t// join keys and values together\n\tif (i < 0) kvp[kvp.length] = [key, value].join(\"=\");\n\n\t// reload page\n\tdocument.location.search = kvp.join(\"&\"); \n} // addToURL", "function replaceUrlParam(url, paramName, paramValue){\n var pattern = new RegExp('\\\\b('+paramName+'=).*?(&|$)')\n if(url.search(pattern)>=0){\n return url.replace(pattern,'$1' + paramValue + '$2');\n }\n return url + (url.indexOf('?')>0 ? '&' : '?') + paramName + '=' + paramValue \n }", "function addURLParameter(url, param, value){\n\t\ttry {\n\t\t\tvar hash = {};\n\t\t var parser = document.createElement('a');\n\n\t\t parser.href = url;\n\n\t\t var parameters = parser.search.split(/\\?|&/);\n\n\t\t for(var i=0; i < parameters.length; i++) {\n\t\t if(!parameters[i])\n\t\t continue;\n\n\t\t var ary = parameters[i].split('=');\n\t\t hash[ary[0]] = ary[1];\n\t\t }\n\n\t\t hash[param] = value;\n\n\t\t var list = []; \n\n\t\t $.each(Object.keys(hash), function(index, key){\n\t \t\t list.push(key + '=' + hash[key]);\n\t \t});\n\t\t \n\t\t parser.search = '?' + list.join('&');\n\t\t return parser.href;\n\t\t \n\t\t} catch(err) {\n\t\t\tconsole.log(\"Operation not supported on older browser \" + err);\n\t\t}\n\t return null;\n\t}", "function getQuerystringPar(key, default_)\n{\n if (default_==null) default_=\"\";\n key = key.replace(/[\\[]/,\"\\\\\\[\").replace(/[\\]]/,\"\\\\\\]\");\n var regex = new RegExp(\"[\\\\?&]\"+key+\"=([^&#]*)\");\n var qs = regex.exec(window.location.href);\n if(qs == null)\n return default_;\n else\n return qs[1];\n}", "function addUrlArgs (url, args){\r\n if (!args)\r\n return url;\r\n if (url.indexOf('?') < 0)\r\n url += '?';\r\n else if (url.substr(url.length-1) != '&')\r\n url += '&'; \r\n if (matTypeof(args == 'object'))\r\n return url + implodeUrlArgs (args); \r\n return url + args;\r\n}", "append(current_url, key, value) {\n const current = url.parse(current_url)\n const params = new URLSearchParams(current.search)\n \n params.set(key, value)\n return params.toString()\n }", "function update_url_inplace(param, newvalue) {\n var newurl = new URL(window.location);\n var params = new URLSearchParams(newurl.search);\n params.set(param, newvalue);\n\n newurl.search = params.toString();\n var updated = newurl.toString();\n history.replaceState({path: updated}, '', updated);\n}", "function addUrlArgs (url, args){\n\tif (!args)\n\t\treturn url;\n\tif (url.indexOf('?') < 0)\n\t\turl += '?';\n\telse if (url.substr(url.length-1) != '&')\n\t\turl += '&';\n\tif (matTypeof(args == 'object'))\n\t\treturn url + implodeUrlArgs (args);\n\treturn url + args;\n}", "function setURLParameters(paramobjs) {\n let nurl = new URL(window.location.href);\n let first = true;\n for (let key in paramobjs) {\n if (first) {\n nurl.searchParams.set(paramobjs[key].paramname, paramobjs[key].paramvalue);\n first = false;\n } else {\n nurl.searchParams.append(paramobjs[key].paramname, paramobjs[key].paramvalue);\n }\n }\n history.pushState('', document.title, nurl.toString());\n}", "function getNewUrl(filter,addSharp,url){\n var href=null;\n if(url!=undefined && url!=null)href=url;\n else href=window.location.href;\n var q_index=href.indexOf(\"?\");\n if(q_index>=0){\n\t var params = href.substr(q_index+1);\n\t params=clearSharp(params);\n\t\tvar reg = /([^&]*?)\\=([^&]*)/g;\n\t\tvar a_param = params.match(reg); \n\t\tvar str_param=\"\";\n\t\tvar isFirst=true;\n\t\tfor(var i=0;i<a_param.length;i++){\n\t\t var param=a_param[i].split(\"=\");\n\t\t if(!inArray(param[0],filter)){\n\t\t if(!isFirst)str_param+=\"&\";\n\t\t str_param+=param[0]+\"=\"+param[1];\n\t\t isFirst=false;\n\t\t }\n\t\t}\n\t\tvar href_load=null;\n\t\tif(str_param.isBlank()){\n\t\t\thref_load=href.substr(0,q_index);\n\t\t}else{\n\t\t\thref_load=href.substr(0,q_index+1)+str_param;\n\t\t}\n\t\t\n\t\tif(addSharp==undefined || addSharp==null || addSharp==true){\n\t\t\thref_load+=window.location.hash;\n\t\t}\n\t\treturn href_load;\n\t}else{\n\t return href;\n\t}\n}", "function updateURL(paramName, value) {\n let urlData = queryString.parse(window.location.hash)\n urlData[paramName] = value\n window.location.hash = queryString.stringify(urlData)\n}", "function autoEdQueryString(p) {\n var re = RegExp('[&?]' + p + '=([^&]*)');\n var matches;\n if (matches = re.exec(document.location)) {\n try {\n return decodeURI(matches[1]);\n } catch (e) {\n }\n }\n return null;\n}", "function makeParam(param, value)\n{\n return param + \"=\" + value + \"&\";\n}", "function updateParam(name, value) {\n var newUrlHash = biomart.url.jsonify(location.href);\n if (value) biomart.params[name] = value;\n else delete biomart.params[name];\n _urlHash.query = $.param(biomart.params);\n newUrlHash.fragment = biomart.url.stringify(_urlHash);\n location = biomart.url.stringify(newUrlHash);\n }", "function updateQueryStringParameter(kvpairs) {\n console.log('updateQueryStringParameter: begin');\n var uri = URI(window.location.href);\n\n for (var key in kvpairs) {\n\tvar value = kvpairs[key];\n\turi.removeSearch(key);\n\turi.addSearch(key, value);\n }\n\n return uri.href();\n}", "function getQuerystring(e,a){null==a&&(a=\"\"),e=e.replace(/[\\[]/,\"\\\\[\").replace(/[\\]]/,\"\\\\]\");var t=new RegExp(\"[\\\\?&]\"+e+\"=([^&#]*)\"),o=t.exec(window.location.href);return null==o?a:o[1]}", "function modify_url(url, new_params, new_url_parts) {\n var url = decompose_url(url)\n $.extend(url.params, new_params)\n $.extend(url, new_url_parts || {})\n return url.netloc + url.path + url.file + '?' + $.param(url.params) + url.hash;\n}", "function updateURLParameter(url, param, paramVal) {\n\tvar theAnchor = null;\n\tvar newAdditionalURL = \"\";\n\tvar tempArray = url.split(\"?\");\n\tvar baseURL = tempArray[0];\n\tvar additionalURL = tempArray[1];\n\tvar temp = \"\";\n\n\tif (additionalURL) {\n\t\tvar tmpAnchor = additionalURL.split(\"#\");\n\t\tvar theParams = tmpAnchor[0];\n\t\ttheAnchor = tmpAnchor[1];\n\t\tif (theAnchor) {\n\t\t\tadditionalURL = theParams;\n\t\t}\n\n\t\ttempArray = additionalURL.split(\"&\");\n\n\t\tfor (i = 0; i < tempArray.length; i++) {\n\t\t\tif (tempArray[i].split('=')[0] != param) {\n\t\t\t\tnewAdditionalURL += temp + tempArray[i];\n\t\t\t\ttemp = \"&\";\n\t\t\t}\n\t\t}\n\t} else {\n\t\tvar tmpAnchor = baseURL.split(\"#\");\n\t\tvar theParams = tmpAnchor[0];\n\t\ttheAnchor = tmpAnchor[1];\n\n\t\tif (theParams) {\n\t\t\tbaseURL = theParams;\n\t\t}\n\t}\n\n\tif (theAnchor) {\n\t\tparamVal += \"#\" + theAnchor;\n\t}\n\n\tvar rows_txt = temp + \"\" + param + \"=\" + paramVal;\n\treturn baseURL + \"?\" + newAdditionalURL + rows_txt;\n}", "function ArgumentURL() {\n\tthis.getArgument = _getArg;\n\tthis.setArgument = _setArg;\n\tthis.removeArgument = _removeArg;\n\tthis.toString = _toString;\n\t\n\tthis.arguments = new Array();\n\n\tvar separator = \"&\";\n\tvar equalsign = \"=\";\n\t\n\tvar str = window.location.search.replace(/%20/g, \" \");\n\tvar index = str.indexOf(\"?\");\n\tvar sInfo;\n\tvar infoArray = new Array();\n\n\tvar tmp;\n\t\n\tif (index != -1) {\n\t\tsInfo = str.substring(index+1,str.length);\n\t\tinfoArray = sInfo.split(separator);\n\t}\n\n\tfor (var i=0; i<infoArray.length; i++) {\n\t\ttmp = infoArray[i].split(equalsign);\n\t\tif (tmp[0] != \"\") {\n\t\t\tvar t = tmp[0];\n\t\t\tthis.arguments[tmp[0]] = new Object();\n\t\t\tthis.arguments[tmp[0]].value = tmp[1];\n\t\t\tthis.arguments[tmp[0]].name = tmp[0];\n\t\t}\n\t}\n\n\t\n\tfunction _toString() {\n\t\tvar s = \"\";\n\t\tvar once = true;\n\t\tfor (i in this.arguments) {\n\t\t\tif (once) {\n\t\t\t\ts += \"?\";\n\t\t\t\tonce = false;\n\t\t\t}\n\t\t\ts += this.arguments[i].name;\n\t\t\ts += equalsign;\n\t\t\ts += this.arguments[i].value;\n\t\t\ts += separator;\n\t\t}\n\t\treturn s.replace(/ /g, \"%20\");\n\t}\n\t\n\tfunction _getArg(name) {\n\t\tif(this.arguments[name]){\n\t\t if (typeof(this.arguments[name].name) != \"string\")\n\t\t\t return null;\n\t\t else\n\t\t\t return this.arguments[name].value;\n\t\t}\n\t\telse return null;\n\t}\n\t\n\tfunction _setArg(name,value) {\n\t\tthis.arguments[name] = new Object()\n\t\tthis.arguments[name].name = name;\n\t\tthis.arguments[name].value = value;\n\t}\n\t\n\tfunction _removeArg(name) {\n\t\tthis.arguments[name] = null;\n\t}\n\t\n\treturn this;\n}", "function getQueryParam(name) {\n var regexS = \"[\\\\?&]\" + name + \"=([^&#]*)\";\n var regex = new RegExp(regexS);\n var results = regex.exec(window.location.href);\n\n if (results === null) {\n return \"http://www.lexus.com/\";\n } else {\n return results[1].replace(\"%3f\", \"?\", \"g\");\n }\n }", "function matchUrlQueryParamValue(str){var match=str.match(QUERY_PARAM_VALUE_RE);return match?match[0]:'';}", "function getURL(theUrl, extraParameters) {\r\n var extraParametersEncoded = $.param(extraParameters);\r\n //var seperator = theUrl.indexOf('?') == -1 ? \"?\" : \"&\";\r\n //console.log(extraParametersEncoded);\r\n //return(theUrl + seperator + extraParametersEncoded);\r\n return(theUrl + extraParametersEncoded);\r\n}", "function urlQueryValues() {}", "function replaceParam(url, attr, value) { // Wrapper function (has verb/noun naming)\n return paramReplace(url, attr, value);\n}", "function get_url_params() {\n var $_GET = {};\n\n document.location.search.replace(/\\??(?:([^=]+)=([^&]*)&?)/g, function () {\n function decode(s) {\n return decodeURIComponent(s.split(\"+\").join(\" \"));\n }\n\n $_GET[decode(arguments[1])] = decode(arguments[2]);\n });\n return $_GET;\n}", "function getURLParameter(name) {\n return (new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)')\n .exec(location.href) || [, \"\"])[1].replace(/\\+/g, '%20') || null;\n }", "function changeUrlParam (param, value) {\n var currentURL = window.location.href+'&';\n var change = new RegExp('('+param+')=(.*)&', 'g');\n var newURL = currentURL.replace(change, '$1='+value+'&');\n\n if (getURLParameter(param) !== null){\n try {\n window.history.replaceState('', '', newURL.slice(0, - 1) );\n } catch (e) {\n console.log(e);\n }\n } else {\n var currURL = window.location.href;\n if (currURL.indexOf(\"?\") !== -1){\n window.history.replaceState('', '', currentURL.slice(0, - 1) + '&' + param + '=' + value);\n } else {\n window.history.replaceState('', '', currentURL.slice(0, - 1) + '?' + param + '=' + value);\n }\n }\n}", "function getURLParameter(VarSearch, defaultval){\n var SearchString = window.location.search.substring(1);\n SearchString = SearchString.replace(/\\%22/g, '\"').replace(/'/g,\"%27\"); // url decoder\n var VariableArray = SearchString.split('&');\n for(var i = 0; i < VariableArray.length; i++){\n var str = VariableArray[i];\n var n = str.search('=');\n if (str.substring(0, n) == VarSearch) {\n return str.substring(n+1);\n };\n }\n return defaultval;\n}", "function getParamURL(name) {\n return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search)||[,\"\"])[1].replace(/\\+/g, '%20'))||null\n}", "function updateURL () {\n var parms = QueryParams.map(input => {\n var parm = input.queryStringParm;\n return parm + \"=\" + encodeURIComponent(input.location.val());\n });\n var s = parms.join(\"&\");\n window.history.pushState(null, null, location.origin+location.pathname+\"?\"+s);\n }", "function urlParam(name) {\n var results = new RegExp('[\\?&]' + name + '=([^&#]*)').exec(window.location.href);\n return results ? results[1] : \"\";\n}", "function changeUrlParam(param, value) {\r\n var currentURL = window.location.href + '&';\r\n var change = new RegExp('(' + param + ')=(.*)&', 'g');\r\n var newURL = currentURL.replace(change, '$1=' + value + '&');\r\n\r\n if (getURLParameter(param) !== null) {\r\n try {\r\n window.history.replaceState('', '', newURL.slice(0, -1));\r\n } catch (e) {\r\n console.log(e);\r\n }\r\n } else {\r\n var currURL = window.location.href;\r\n if (currURL.indexOf(\"?\") !== -1) {\r\n window.history.replaceState('', '', currentURL.slice(0, -1) + '&' + param + '=' + value);\r\n } else {\r\n window.history.replaceState('', '', currentURL.slice(0, -1) + '?' + param + '=' + value);\r\n }\r\n }\r\n}", "function updateQuery() {\n var newUrl = window.location.href;\n // clean out valueless parameters to simplify ensuing matching\n newUrl = newUrl.replace(/(.*[?&])param1(&(.*))?$/, \"$1$3\");\n if (param1 !== default1) {\n if (newUrl.match(/[?&]param1=/)) {\n newUrl = newUrl.replace(/(.*[?&]param1=)[^&]*(.*)/, '$1' + param1 + '$2');\n } else if (newUrl.indexOf('?') > 0) {\n newUrl = newUrl + '&param1=' + param1;\n } else {\n newUrl = newUrl + '?param1=' + param1;\n }\n } else {\n newUrl = newUrl.replace(/(.*[?&])param1=[^&]*&?(.*)/, '$1$2');\n }\n\n // tidy up\n if (newUrl.match(/[?&]$/)) {\n newUrl = newUrl.slice(0, -1);\n } \n window.history.pushState('', '', newUrl);\n}", "function _usfAddQuery(url, addon) {\r\n return url + (url.includes('?') ? '&' : '?') + addon\r\n}", "function loadURLVars(){\n var query = window.location.href.split('?')[1];\n var vars = query.split('&');\n for(index in vars){\n var variable = vars[index];\n var parts = variable.split('=');\n urlVars[parts[0]] = parts[1];\n }\n}", "function setUrlParameters(address, parameters) {\n\tvar ret = address;\n\tif (ret.indexOf('?') >= 0) {\n\t\tret = ret.substring(0, ret.indexOf('?'));\n\t}\n\treturn ret + '?' + $.param(parameters);\n}", "function qs(key) {\n key = key.replace(/[*+?^$.\\[\\]{}()|\\\\\\/]/g, \"\\\\$&\"); // escape RegEx meta chars\n var match = location.search.match(new RegExp(\"[?&]\"+key+\"=([^&]+)(&|$)\"));\n return match && decodeURIComponent(match[1].replace(/\\+/g, \" \"));\n}", "function setUrlParams(){\n (window.onpopstate = function () {\n var match,\n pl = /\\+/g, // Regex for replacing addition symbol with a space\n search = /([^&=]+)=?([^&]*)/g,\n decode = function (s) { return decodeURIComponent(s.replace(pl, \" \")); },\n query = window.location.search.substring(1);\n\n urlParams = new setUrlParamDefaults();\n while (match = search.exec(query))\n urlParams[decode(match[1])] = decode(match[2]);\n })();\n}", "function updateParamsToUrl(paramKey, paramValue) {\n\n paramValue = window.btoa(JSON.stringify(paramValue));\n\n var nextUrl = window.location.origin + window.location.pathname;\n\n var params = getUrlVars(); //Get all the query params as an ARRAY\n\n var size = Object.keys(params).length;\n var i = 0;\n if (size == 0) {\n window.location.href = window.location.href + \"?\" + paramKey + \"=\" + paramValue;\n } else {\n\n nextUrl += '?'; // ? for started to attach the query string to url\n\n params[paramKey] = paramValue;\n\n // This is for search,selection by any one of ways => BRAND or SEARCH Keyword\n if (paramKey == 'search' && params['brand'] != undefined) {\n params['brand'] = '';\n }\n if (paramKey == 'brand' && params['search'] != undefined) {\n params['search'] = '';\n }\n\n if (paramKey == 'brand') {\n params['width'] = '';\n params['diameter'] = '';\n }\n\n // Attach the query params to the nextURL \n $.each(params, function(key, value) {\n if (value != '') {\n if (i == size) {\n nextUrl += key + '=' + value;\n } else {\n nextUrl += key + '=' + value + '&';\n }\n }\n\n i++;\n });\n\n\n window.location.href = nextUrl;\n }\n}", "function getQuerystring(key, default_) {\n if (default_ === null) default_ = \"\";\n key = key.replace(/[\\[]/, \"\\\\\\[\").replace(/[\\]]/, \"\\\\\\]\");\n var regex = new RegExp(\"[\\\\?&]\" + key + \"=([^&#]*)\");\n var qs = regex.exec(window.location.href);\n if (qs === null) {\n return default_;\n } else {\n return qs[1];\n }\n}", "function getQuerystring(key, default_) {\n if (default_ === null) default_ = \"\";\n key = key.replace(/[\\[]/, \"\\\\\\[\").replace(/[\\]]/, \"\\\\\\]\");\n var regex = new RegExp(\"[\\\\?&]\" + key + \"=([^&#]*)\");\n var qs = regex.exec(window.location.href);\n if (qs === null) {\n return default_;\n } else {\n return qs[1];\n }\n}", "function makeuri(addvars) {\n var tmp = window.location.href.split('?');\n var base = tmp[0];\n if(tmp.length > 1) {\n // Remove maybe existing anchors\n tmp = tmp[1].split('#');\n // Split to array of param-strings (key=val)\n tmp = tmp[0].split('&');\n } else {\n // Uri has no parameters\n tmp = [];\n }\n\n var len = tmp.length;\n var params = [];\n var pair = null;\n\n // Skip unwanted parmas\n for(var i = 0; i < tmp.length; i++) {\n pair = tmp[i].split('=');\n if(pair[0][0] == '_') // Skip _<vars>\n continue;\n if(addvars.hasOwnProperty(pair[0])) // Skip vars present in addvars\n continue;\n params.push(tmp[i]);\n }\n\n // Add new params\n for (var key in addvars) {\n params.push(key + '=' + addvars[key]);\n }\n\n return base + '?' + params.join('&')\n}", "function urlFix(url){\r\n var _url = url;\r\n\r\n //delete params\r\n _url = url.replace(delParamReg, '');\r\n\r\n //overwrite and add params\r\n _url = _url.replace(overwriteParamReg, '').replace(/&$/, '');\r\n _url += '&' + addParams.join('&') + '&urlfixed=1';\r\n\r\n return _url;\r\n}", "function gethref(url, params) {\n\tvar paramstr = '?'\n\tfor (var key in params) {\n\t\tconsole.log(key)\n\t\tparamstr += key + '=' + (params[key]? params[key] : '') + '&'\n\t}\n\tparamstr = paramstr.slice(0, paramstr.length - 1)\n\treturn url + paramstr;\n}", "function replaceUrlParam(url, paramName, paramValue) {\n var pattern = new RegExp('(' + paramName + '=).*?(&|$)'),\n newUrl = url.replace(pattern, '$1' + paramValue + '$2');\n if (newUrl == url) {\n newUrl = newUrl + (newUrl.indexOf('?') > 0 ? '&' : '?') + paramName + '=' + paramValue;\n }\n return newUrl;\n}", "function getQueryString(url, name) {\n var a = name.replace(/[\\[]/, '\\\\\\[').replace(/[\\]]/, '\\\\\\]');\n var regexS = '[\\\\?&]' + a + '=([^&#]*)';\n var regex = new RegExp(regexS);\n var results = regex.exec(url);\n if (results === null) return '';\n else return decodeURIComponent(results[1].replace(/\\+/g, ' '));\n }", "function getQueryParam(name) {\n name = name.replace(/[\\[]/, \"\\\\\\[\").replace(/[\\]]/, \"\\\\\\]\");\n var regexS = \"[\\\\?&]\" + name + \"=([^&#]*)\";\n var regex = new RegExp(regexS);\n var results = regex.exec(window.location.search);\n if(results == null)\n return \"\";\n else\n return decodeURIComponent(results[1].replace(/\\+/g, \" \"));\n}", "function decorateUrl(urlToDecorate) {\n\t\t// Just in case check if url has length\n\t\tif(!urlToDecorate)\n\t\t\treturn urlToDecorate;\n\t\tvar lastChar = urlToDecorate[urlToDecorate.length - 1];\n\t\t// Add params seperator if not in palce\n\t\tif(lastChar !== '?' || lastChar !== '&'){\n\t\t\turlToDecorate = (urlToDecorate.indexOf('?') === -1) ? urlToDecorate + '?' : urlToDecorate + '&';\n\t\t}\n\t\tvar collectedQueryParams = [];\n\t\tfor (var queryIndex = 0; queryIndex < queryParams.length; queryIndex++) {\n\t\t\tvar paramName = queryParams[queryIndex];\n\t\t\t// If param is already in url then don't append it.\n\t\t\tif (urlToDecorate.indexOf(paramName) === -1 && getCookie(paramName)) {\n\t\t\t collectedQueryParams.push(paramName + '=' + getCookie(paramName));\n\t\t\t}\n\t\t}\n\t\treturn urlToDecorate + collectedQueryParams.join('&');\n\t}", "function setOtherPartsOfUrl (url, queryData) {\r\n\t\t\t\t/* Add specialty (tname) query param to settings.lhdResultsUrl */\r\n\t\t\t\turl = _this.buildTnameQueryParam(settings, url, queryData);\r\n\t\t\t\t\r\n\t\t\t\t/* Add specialty (sd) query param to settings.lhdResultsUrl.\r\n\t\t\t\t * Note: sd is more important than tname. Tname by itself doesn't seem to do anything.\r\n\t\t\t\t */\r\n\t\t\t\turl = _this.buildSdQueryParam(settings, url, queryData);\r\n\t\t\t\t\r\n\t\t\t\t/* Add insurance param to settings.lhdResultsUrl */\r\n\t\t\t\turl = _this.buildInsuranceParam(settings, url);\r\n\t\t\t\t\r\n\t\t\t\t/* Add cf param to settings.lhdResultsUrl */\r\n\t\t\t\turl = _this.buildCfParam(settings, url);\r\n\t\t\t\t\r\n\t\t\t\treturn url;\r\n\t\t\t}", "function addUrlParams(url, urlParams) {\n var params = urlParams ? '?' + $.param(urlParams) : '';\n return url + params;\n}", "function getURLParam(strURL, strKey, strDef) {\r\n // \"http://mywebapp/do.url?key1=val1&key2=val2\", \"key1=val1&key2=val2\"\r\n if(!strURL || strURL==\"\") return strDef; \r\n if(strURL.indexOf(\"?\")<0) strURL=\"?\"+strURL;\r\n var idx = strURL.indexOf(\"?\");\r\n\t \r\n // \"&key1=val1&key2=val2&\"\r\n strURL = \"&\" + strURL.substring(idx+1) + \"&\";\r\n idx = strURL.indexOf(\"&\" + strKey + \"=\");\r\n if (idx < 0) return strDef; // param not found\r\n\t \r\n // \"&key1=val1&key2=val2&\" -> \"val1&key2=val2&\" -> \"val1\"\r\n strURL = strURL.substring(idx + strKey.length + 2);\r\n idx = strURL.indexOf(\"&\");\t \r\n return strURL.substring(0, idx);\r\n}", "function getURLParameter(name) {\n return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search)||[,\"\"])[1].replace(/\\+/g, '%20'))||null\n}", "function set_url(query) {\n var val = [];\n val.push(\"court\" + \"=\" + query.Court);\n if(query.Phase !== \"all\")\n val.push(\"phase\" + \"=\" + query.Phase)\n ;\n if(query.State !== \"all\")\n val.push(\"state\" + \"=\" + query.State)\n ;\n // if(highlight) val.push(\"highlight=\" + highlight);\n history.pushState(null, null, '?' + val.join('&'));\n }", "urlParam(name){\n var results = new RegExp('[\\?&]' + name + '=([^&#]*)').exec(window.location.href)\n return (results && results[1]) || undefined\n }", "function updateUrlParam() {\n // Update url parameter\n window.history.replaceState(\n null,\n null,\n `?page=${page}&limit=${perPage}&past-events=${pastEvents}`\n ); // -> set url param\n}", "function getUrlParam(name){\n\tvar reg = new RegExp(\"(^|&)\"+ name +\"=([^&]*)(&|$)\");\n\tvar r = window.location.search.substr(1).match(reg);\n\tif (r!=null) return unescape(r[2]);\n\treturn null;\n}", "function insertParam( url, parameterName, parameterValue, atStart ) {\n\n\tvar replaceDuplicates = true,\n\t cl,\n\t urlhash,\n\t sourceUrl,\n\t urlParts,\n\t newQueryString,\n\t parameters,\n\t i,\n\t parameterParts;\n\n\tif ( 0 < url.indexOf( '#' ) ) {\n\t\tcl = url.indexOf( '#' );\n\t\turlhash = url.substring( url.indexOf( '#' ), url.length );\n\t} else {\n\t\turlhash = '';\n\t\tcl = url.length;\n\t}\n\tsourceUrl = url.substring( 0, cl );\n\n\turlParts = sourceUrl.split( '?' );\n\tnewQueryString = '';\n\n\tif ( 1 < urlParts.length ) {\n\t\tparameters = urlParts[1].split( '&' );\n\t\tfor ( i = 0; ( i < parameters.length ); i++ ) {\n\t\t\tparameterParts = parameters[ i ].split( '=' );\n\t\t\tif ( ! ( replaceDuplicates && parameterParts[0] == parameterName ) ) {\n\t\t\t\tif ( '' === newQueryString ) {\n\t\t\t\t\tnewQueryString = '?' + parameterParts[0] + '=' + ( parameterParts[1] ? parameterParts[1] : '' );\n\t\t\t\t} else {\n\t\t\t\t\tnewQueryString += '&';\n\t\t\t\t\tnewQueryString += parameterParts[0] + '=' + ( parameterParts[1] ? parameterParts[1] : '' );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tif ( '' === newQueryString ) {\n\t\tnewQueryString = '?';\n\t}\n\n\tif ( atStart ) {\n\t\tnewQueryString = '?' + parameterName + '=' + parameterValue + ( newQueryString.length > 1 ? '&' + newQueryString.substring( 1 ) : '' );\n\t} else {\n\t\tif ( '' !== newQueryString && '?' != newQueryString ) {\n\t\t\tnewQueryString += '&';\n\t\t}\n\t\tnewQueryString += parameterName + '=' + ( parameterValue ? parameterValue : '' );\n\t}\n\treturn urlParts[0] + newQueryString + urlhash;\n}", "function makeUrl(url, parameters) {\r\n\tfor(p in parameters) url = url.replace('%'+p+'%', parameters[p])\r\n\treturn url;\r\n}", "function addQueryString(requestUrl, params) {\n if (!params) {\n return requestUrl;\n }\n const queryString = Object.keys(params)\n .reduce((str, key, idx) => {\n const start = idx === 0 ? '?' : '&';\n const values = castArray(params[key]);\n if (values.length > 1) {\n return str + values.reduce((valStr, value, jdx) => {\n return valStr + (jdx === 0 ? start : '&') + key + '=' + value;\n }, '');\n }\n return str + start + key + '=' + values[0];\n }, '');\n return `${requestUrl}${queryString}`;\n}", "function getURLParameter(name) {\r\n return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search) || [, \"\"])[1].replace(/\\+/g, '%20')) || null;\r\n}", "function getURLParameter(name) {\n\t return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search)||[,\"\"])[1].replace(/\\+/g, '%20'))||null;\n\t}", "function decorateUrl(urlToDecorate) {\n var collectedQueryParams = [];\n for (var queryIndex = 0; queryIndex < queryParams.length; queryIndex++) {\n if (getQueryParam(queryParams[queryIndex])) {\n collectedQueryParams.push(queryParams[queryIndex] + '=' + getQueryParam(queryParams[queryIndex]))\n }\n }\n if(collectedQueryParams.length > 0){\n urlToDecorate = (urlToDecorate.indexOf('?') === -1) ? urlToDecorate + '?' : urlToDecorate + '&';\n } else {\n urlToDecorate = (urlToDecorate.indexOf('?') === -1) ? urlToDecorate : urlToDecorate + '&';\n }\n return urlToDecorate + collectedQueryParams.join('&');\n }", "function redirectWithNewParam(a,b) {\r\n\t\tvar c,d;\r\n\t\tc=window.location.href;\r\n\t\tc=c.split(\"#\");\r\n\t\td=c.length==2?\"#\"+c[1]:\"\";\r\n\t\tc=c[0];\r\n\t\tvar e=c.match(/[\\?&]\\w+=[^&#]*/g), f={};\r\n\t\tif(e) for(var g=0;g<e.length;++g){\r\n\t\t\te[g]=e[g].split(\"=\");\r\n\t\t\tf[e[g][0].substring(1)]=decodeURIComponent(e[g][1].replace(/\\+/g,\"%20\"))\r\n\t\t}\r\n\t\tf[b]=a;\r\n\t\tf[\"persist_\"+b]=\"1\";\r\n\t\tc=c.split(\"?\");\r\n\t\tc=c[0];\r\n\t\toj(c,f,d);\r\n\t}", "function AppendArgumentsToBaseUrl() {\n var url = GetBaseUrlPath();\n for (arg_index = 0; arg_index < arguments.length; arg_index++) {\n url += arguments[arg_index];\n }\n return url;\n}", "function AppendArgumentsToBaseUrl() {\n var url = GetBaseUrlPath();\n for (arg_index = 0; arg_index < arguments.length; arg_index++) {\n url += arguments[arg_index];\n }\n return url;\n}" ]
[ "0.71564186", "0.7144755", "0.70305985", "0.7028031", "0.6966995", "0.6966995", "0.6752298", "0.673164", "0.66991687", "0.6690159", "0.6687221", "0.668199", "0.6677056", "0.6666224", "0.6658319", "0.66147095", "0.65504956", "0.65395045", "0.65088856", "0.6503151", "0.65009284", "0.6489748", "0.64878285", "0.64862084", "0.6482244", "0.6479804", "0.64663565", "0.64661163", "0.6453457", "0.64472985", "0.64391017", "0.64287555", "0.63982326", "0.63923603", "0.6378322", "0.63533753", "0.63342434", "0.63278145", "0.626167", "0.62585324", "0.62360775", "0.62355727", "0.6233874", "0.6228619", "0.6221128", "0.6172626", "0.6171212", "0.61566633", "0.6151953", "0.61434716", "0.6140019", "0.6114505", "0.6104724", "0.60622424", "0.60533226", "0.60464287", "0.6026049", "0.60135645", "0.6012797", "0.6009608", "0.6007253", "0.60059524", "0.6004577", "0.59858257", "0.5974089", "0.5972029", "0.5971693", "0.5958517", "0.5958001", "0.5950305", "0.59488547", "0.59366596", "0.5917865", "0.5916756", "0.5894442", "0.5894442", "0.58901244", "0.58742017", "0.5872809", "0.58710414", "0.58705497", "0.58699375", "0.58693117", "0.5865401", "0.58648145", "0.5864462", "0.58642083", "0.586333", "0.58589303", "0.5851532", "0.585119", "0.5849348", "0.58456475", "0.584248", "0.5838315", "0.58329636", "0.582982", "0.5824522", "0.58244795", "0.58244795" ]
0.64495176
29
which elements accept event actions
function computeDateVars(dateProfile) { var dayStart = core.startOfDay(dateProfile.renderRange.start); var viewEnd = dateProfile.renderRange.end; var dayDates = []; var dayRanges = []; while (dayStart < viewEnd) { dayDates.push(dayStart); dayRanges.push({ start: dayStart, end: core.addDays(dayStart, 1) }); dayStart = core.addDays(dayStart, 1); } return { dayDates: dayDates, dayRanges: dayRanges }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "$attachEventListeners() {\n\t\tlet action = (event, key) => {\n\t\t\ttry {\n\t\t\t\tlet target = event.composedPath()[0];\n\t\t\t\t// let target = event.target;\n\t\t\t\tlet action = target.closest(`[${key}]`);\n\t\t\t\t// console.log('EEE', key, event.composedPath(), target, action, 'called by', this, event)\n\t\t\t\t// console.log('PATH', event.composedPath().map(x => this.$1(x)))\n\t\t\t\tthis[action.getAttribute(key)](action, event, target)\n\t\t\t}\n\t\t\tcatch { }\n\t\t}\n\n\n\n\n\n\n\n\n\t}", "_initEvents () {\n this.el.addEventListener('click', (e) => {\n if (e.target.dataset.action in this.actions) {\n this.actions[e.target.dataset.action](e.target);\n } else this._checkForLi(e.target);\n });\n }", "_actions() {\n return this.element().getDriver().actions();\n }", "function checkel(which){\nif (which.style&&intended.test(which.tagName)){\nif (ns6&&eventobj.nodeType==3)\neventobj=eventobj.parentNode.parentNode\nreturn true\n}\nelse\nreturn false\n}", "get DOM_EVENTS() {\n return \"input focus blur keyup keydown change submit reset select spacepressed enterpressed\";\n }", "function eltWithPressEvent(elt, who)\n {\n var m_e, attr;\n var events = new Array();\n var res = false;\n\n if (! who)\n who = 'both';\n if (who == 'keyboard' || who == 'both')\n events = new Array('ONKEYPRESS','ONKEYDOWN','ONKEYUP');\n if (who == 'mouse' || who == 'both')\n {\n m_e = new Array('ONCLICK','ONDBLCLICK','ONMOUSEDOWN','ONMOUSEUP');\n events = events.concat(m_e);\n }\n\n for (var i = 0; i < events.length; i++)\n {\n attr = elt.getAttribute(events[i]);\n if (isDefinedAttr(attr))\n {\n res = true;\n break;\n }\n }\n return res;\n }", "actionEventHandler() {\n const selectorElement = document.getElementById(this.element.getAttribute(SELECTOR_ID));\n const event = {\n 'target': selectorElement\n };\n this.eventHandler(event);\n }", "function elementsEvents() {\n try {\n menuEvent();\n loginRegisterBtnEvent();\n } catch (error) {\n console.log(error);\n\n }\n\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() {}", "initButtonsEvents() {\n let buttons = document.querySelectorAll(\"#buttons > g, #parts > g\");\n\n buttons.forEach(btn=> {\n btn.addEventListener(\"click\", e => {\n console.log(btn.className.baseVal.replace(\"btn-\",\"\"));\n })\n })\n }", "onEvent() {\n const elements = document.querySelectorAll(\"[on]\");\n for (let i = 0; i < elements.length; i++) {\n const attr = elements[i].getAttribute(\"on\");\n const action = elements[i].getAttribute(\"action\");\n elements[i].addEventListener(attr, () => {\n eval(action);\n });\n }\n }", "initButtonEvents() {\n let allButtons = document.querySelectorAll('#buttons > g, #parts > g');\n Array.from(allButtons).forEach((btn, index) => {\n this.addEventListenerAll(btn, 'click drag', e => {\n let textBtn = btn.className.baseVal.replace('btn-', '');\n this.execBtn(textBtn);\n });\n\n this.addEventListenerAll(btn, 'mouseover mouseup mousedown', e => {\n btn.style.cursor = 'pointer';\n });\n })\n }", "static get listeners() {\n return {\n 'mouseenter': '_mouseenterMouseleaveHandler',\n 'mouseleave': '_mouseenterMouseleaveHandler',\n 'resize': '_resizeHandler',\n 'downButton.click': '_downButtonClickHandler',\n 'downButton.mouseenter': '_mouseenterMouseleaveHandler',\n 'downButton.mouseleave': '_mouseenterMouseleaveHandler',\n 'dropDown.click': '_dropDownItemClickHandler',\n 'dropDown.mouseout': '_mouseenterMouseleaveHandler',\n 'dropDown.mouseover': '_mouseenterMouseleaveHandler',\n 'input.blur': '_inputBlurHandler',\n 'input.change': '_inputChangeHandler',\n 'input.focus': '_inputFocusHandler',\n 'input.keydown': '_inputKeydownHandler',\n 'input.keyup': '_inputKeyupHandler',\n 'input.paste': '_inputPasteHandler',\n 'input.wheel': '_inputWheelHandler',\n 'radixDisplayButton.click': '_radixDisplayButtonClickHandler',\n 'radixDisplayButton.mouseenter': '_mouseenterMouseleaveHandler',\n 'radixDisplayButton.mouseleave': '_mouseenterMouseleaveHandler',\n 'upButton.click': '_upButtonClickHandler',\n 'upButton.mouseenter': '_mouseenterMouseleaveHandler',\n 'upButton.mouseleave': '_mouseenterMouseleaveHandler',\n 'document.down': '_documentMousedownHandler',\n 'document.up': '_documentMouseupHandler'\n };\n }", "setEvents(){\n const listElements = this.el.childNodes;\n for(let i = 0; i < listElements.length; i++){\n listElements[i].addEventListener('mousedown',this.onItemClickedEvent,true);\n }\n }", "get eventListeners() {\n\t\treturn [\"onBeginUpdate\",\"onEndUpdate\",\"onChange\",\"onItemClick\",\"onItemInsert\",\"onItemRemove\",\"onItemUpdate\",\"onViewChange\",\"onViewChanging\",\"onEventShortcutKey\",\"onDateChange\",\"onDragStart\",\"onDragEnd\",\"onResizeStart\",\"onResizeEnd\",\"onEditDialogOpening\",\"onEditDialogOpen\",\"onEditDialogClose\",\"onEditDialogClosing\",\"onContextMenuOpening\",\"onContextMenuOpen\",\"onContextMenuClose\",\"onContextMenuClosing\",\"onEventMenuOpening\",\"onEventMenuOpen\",\"onEventMenuClose\",\"onEventMenuClosing\",\"onDateMenuOpen\",\"onDateMenuClose\",\"onViewMenuOpen\",\"onViewMenuClose\",\"onNotificationOpen\",\"onNotificationClose\"];\n\t}", "function checkModifierButtons() {\n const wrapper = document.getElementById(\"modifiers\");\n\n\n\n // Listening for the mouse and touch events \n wrapper.addEventListener(\"click\", modifierButtonsEvents, false);\n wrapper.addEventListener(\"mousedown\", toggleOn, false);\n wrapper.addEventListener(\"mouseup\", toggleOff, false);\n wrapper.addEventListener(\"mouseleave\", toggleOff, false);\n\n wrapper.addEventListener(\"touchstart\", toggleOn, false);\n wrapper.addEventListener(\"touchend\", toggleOff, false);\n wrapper.addEventListener(\"pressHold\", toggleOn, false);\n\n\n\n\n}", "function containerOfEvents() {\n document.getElementsByClassName(\"label-buttons\")[0].addEventListener(\"click\", event => {\n if (event.target.nodeName == \"BUTTON\") {\n console.log(\"Clicked\", event.target.textContent);\n }\n });\n}", "function extractEvents(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget,eventSystemFlags,targetContainer){extractCompositionEvent(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget);extractBeforeInputEvent(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget);}", "function extractEvents(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget,eventSystemFlags,targetContainer){extractCompositionEvent(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget);extractBeforeInputEvent(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget);}", "function onClickEvent() {\n if (selectedElements.length == 0) {\n selectedElements.push($(this));\n $(selectedElements[0]).addClass('open show');\n $(selectedElements[0]).off('click');\n } else if (selectedElements.length == 1) {\n selectedElements.push($(this));\n matchingEngine();\n }\n}", "function apply_card_event_handlers(){\n $('.card').click(card_selected($(this)));\n }", "addClickEvents () {\n this.clickEvents.clickId.forEach((cid, i) => {\n let id = document.getElementById(cid)\n id.run = this.clickEvents.clickRun[i]\n id.addEventListener('mousedown', (e) => {\n e.currentTarget.run()\n this.checkItemStates()\n })\n })\n }", "function assignEventListeners() {\n \tpageElements.output.addEventListener('click', editDelete, false);\n \t pageElements.authorSelect.addEventListener('change', dropDown, false);\n \t pageElements.tagSelect.addEventListener('change', dropDown, false);\n \t pageElements.saveBtn.addEventListener('click', saveAction ,false);\n \t pageElements.addBtn.addEventListener('click', addAction, false);\n \t pageElements.getAllBtn.addEventListener('click', getAll, false);\n \t pageElements.deleteBtn.addEventListener('click', deleteIt, false);\n }", "function clickEvents(){\n alert('i am clicked');\n}", "function eventLoader() {\n var p = document.getElementsByName(\"p\");\n for (var i = 0; i < p.length; ++i) {\n p[i].addEventListener(\"click\", loadElementsToEditView());\n }\n var img = document.getElementsByTagName(\"img\");\n for (var i = 0; i < img.length; ++i) {\n img[i].addEventListener(\"click\", loadElementsToEditView());\n }\n}", "static get events(){\n\t\t\treturn {\n\t\t\t\t//'click .{name}-btn': 'methodName',\n\t\t\t\t//'click .{name}-btn': function(e){\n\t\t\t\t//\tthis.log(this);\n\t\t\t\t//},\n\t\t\t};\n\t\t}", "get events() {\n\t\treturn {\n\t\t\t'click {{this.options.selectors.buttons}}': 'handleClick'\n\t\t};\n\t}", "canHandleEvent(target, type) {}", "function bindEvents(){\n document.querySelector('#pre').addEventListener('click', () => {\n handleTraversal(preorder)\n })\n document.querySelector('#in').addEventListener('click', () => {\n handleTraversal(inorder)\n })\n document.querySelector('#post').addEventListener('click', () => {\n handleTraversal(postorder)\n })\n }", "static get listeners() {\n return {\n 'cancelButton.click': 'cancel',\n 'clearButton.click': 'clear',\n 'filterButton.click': 'filter'\n };\n }", "static get listeners() {\n return {\n 'cancelButton.click': 'cancel',\n 'clearButton.click': 'clear',\n 'filterButton.click': 'filter'\n };\n }", "function attachEventHandlers() {\n // TODO arrow: attach events for functionality like in assignment-document described\n var clicked;\n $(\"#\"+_this.id).click(function(event){\n clicked = true;\n diagram.selectArrow(_this);\n });\n $(\"#\"+_this.id).contents().on(\"dblclick contextmenu\", function(event){\n clicked = true;\n event.preventDefault();\n });\n\n // TODO arrow optional: attach events for bonus points for 'TAB' to switch between arrows and to select arrow\n $(\"#\"+_this.id).contents().attr(\"tabindex\",\"0\");\n\n $(\"#\"+_this.id).keydown(function(event){\n if(event.which == \"13\"){\n diagram.selectArrow(_this);\n }\n if(event.which == \"9\"){\n clicked = false;\n }\n })\n $(\"#\"+_this.id).contents().focusin(function(event){\n if(!clicked){\n setActive(true);\n }\n });\n $(\"#\"+_this.id).contents().focusout(function(event){\n setActive(false);\n });\n }", "function selectControlElements() {\n\t\t\teditor.on('click', function(e) {\n\t\t\t\tvar target = e.target;\n\n\t\t\t\t// Workaround for bug, http://bugs.webkit.org/show_bug.cgi?id=12250\n\t\t\t\t// WebKit can't even do simple things like selecting an image\n\t\t\t\tif (/^(IMG|HR)$/.test(target.nodeName) && dom.getContentEditableParent(target) !== \"false\") {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tselection.select(target);\n\t\t\t\t\teditor.nodeChanged();\n\t\t\t\t}\n\n\t\t\t\tif (target.nodeName == 'A' && dom.hasClass(target, 'mce-item-anchor')) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tselection.select(target);\n\t\t\t\t}\n\t\t\t});\n\t\t}", "function eventListeners(){\n changeOnButtonClicks();\n changeOnDotClicks();\n changeOnArrowKeys();\n changeOnAnnaLink();\n highlightDotsOnMouseover();\n highlightButtonsOnMouseover();\n highlightAnnaLinkOnMouseover();\n $(document).on(\"mousemove\", foregroundButtons);\n}", "function clickEvents(){\n alert(\"i am clicked\");\n}", "clicked(e){\n //only applies to elements, not children inside elements\n if(e.target.className === \"element\"){\n let i = parseInt(e.target.getAttribute(\"i\"))\n let category = e.target.getAttribute(\"category\")\n let year = store.getState().tabs.selectedYr\n store.dispatch(changeSelectedElem({year, i, category}))\n }\n }", "function selectControlElements() {\n\t\t\teditor.on('click', function(e) {\n\t\t\t\tvar target = e.target;\n\n\t\t\t\t// Workaround for bug, http://bugs.webkit.org/show_bug.cgi?id=12250\n\t\t\t\t// WebKit can't even do simple things like selecting an image\n\t\t\t\t// Needs to be the setBaseAndExtend or it will fail to select floated images\n\t\t\t\tif (/^(IMG|HR)$/.test(target.nodeName)) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tselection.getSel().setBaseAndExtent(target, 0, target, 1);\n\t\t\t\t\teditor.nodeChanged();\n\t\t\t\t}\n\n\t\t\t\tif (target.nodeName == 'A' && dom.hasClass(target, 'mce-item-anchor')) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tselection.select(target);\n\t\t\t\t}\n\t\t\t});\n\t\t}", "function attachActionButtons () {\n // Generic elements but select / <a>\n $(document).on('click', '*[data-gmapz-target]:not(select)', function (e) {\n e.preventDefault();\n var\n target = $(this).attr('data-gmapz-target');\n // Get all data attributes ans send them to gmapz handler and the element\n $('[data-gmapz=\"'+target+'\"]')[0].gmapz.btnAction($(this).data(), $(this));\n }).on('change', 'select[data-gmapz-target]', function (e) {\n // <select>\n var\n target = $(this).attr('data-gmapz-target');\n $('[data-gmapz=\"'+target+'\"]')[0].gmapz.btnAction($(this).find('option:selected').data());\n });\n\n }", "__interactionsAllowed(e){if(this.disabled){return!1}// https://github.com/vaadin/vaadin-checkbox/issues/63\nif(\"a\"===e.target.localName){return!1}return!0}", "__interactionsAllowed(e){if(this.disabled){return!1}// https://github.com/vaadin/vaadin-checkbox/issues/63\nif(\"a\"===e.target.localName){return!1}return!0}", "get eventListeners() {\n\t\treturn [\"onChange\",\"onClose\",\"onClosing\",\"onDragEnd\",\"onDragStart\",\"onReorder\"];\n\t}", "function addEventListeners(){\n document.querySelectorAll(\"[data-action='filter']\").forEach(button => {\n button.addEventListener(\"click\", selectFilter);\n })\n document.querySelectorAll(\"[data-action='sort']\").forEach(button => {\n button.addEventListener(\"click\", selectSorting);\n })\n document.querySelector(\"#searchfunction\").addEventListener(\"input\", search);\n document.querySelector(\".hogwarts\").addEventListener(\"click\", hackTheSystem);\n}", "function selectControlElements() {\n\t\t\teditor.on('click', function(e) {\n\t\t\t\tvar target = e.target;\n\n\t\t\t\t// Workaround for bug, http://bugs.webkit.org/show_bug.cgi?id=12250\n\t\t\t\t// WebKit can't even do simple things like selecting an image\n\t\t\t\t// Needs to be the setBaseAndExtend or it will fail to select floated images\n\t\t\t\tif (/^(IMG|HR)$/.test(target.nodeName) && dom.getContentEditableParent(target) !== \"false\") {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tselection.getSel().setBaseAndExtent(target, 0, target, 1);\n\t\t\t\t\teditor.nodeChanged();\n\t\t\t\t}\n\n\t\t\t\tif (target.nodeName == 'A' && dom.hasClass(target, 'mce-item-anchor')) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tselection.select(target);\n\t\t\t\t}\n\t\t\t});\n\t\t}", "addEventListeners() {\n const popupDiv = document.getElementById('popup-block');\n const buttons = [\n ...popupDiv.getElementsByClassName('js-chooseColor'),\n ...popupDiv.getElementsByClassName('js-createLabel'),\n ];\n\n for (const button of buttons) {\n button.addEventListener('click', this.handleClick);\n }\n }", "_events() {\n this._eventsForHandle(this.$handle);\n if(this.handles[1]) {\n this._eventsForHandle(this.$handle2);\n }\n }", "function activateElements(form)\n{\n let formElts = form.elements;\n for (let i = 0; i < formElts.length; ++i)\n {\n let element = formElts[i];\n if (element.nodeName.toLowerCase() == 'fieldset')\n continue;\n if ((element.type) && (element.type == 'text'))\n {\n element.onkeydown = fldKeyDown;\n element.oldkeydown = keyDown; // context specific help\n }\n else\n element.onkeydown = keyDown; // context specific help\n element.addEventListener('change', change); // default handler\n\n // set behavior for individual elements by name\n let name = element.name;\n if (name.length == 0)\n name = element.id;\n\n let namePattern = /^([a-zA-Z$_\\[\\]]+)([0-9]*)$/;\n let pieces = namePattern.exec(name);\n if (pieces === null)\n {\n popupAlert(\"editIndivid.js: activateElements: \" +\n \"unable to parse name='\" + name + \"'\",\n element);\n pieces = [name, name, ''];\n }\n let colName = pieces[1];\n let id = pieces[2];\n\n switch(colName.toLowerCase())\n { // switch on name of element\n case 'idir':\n { // unique key of record\n idir = element.value;\n break;\n } // unique key of record\n\n case 'detail':\n { // buttons to edit event details\n if (id == '6' || id == '7')\n { // buttons to edit textual notes\n element.addEventListener('click', editEventIndiv);\n } // buttons to edit textual notes\n else\n if (id == '8')\n { // buttons to edit textual notes\n element.addEventListener('click', editEventIndiv);\n } // buttons to edit textual notes\n else\n if (id == '17')\n element.addEventListener('click', editEventChildr)\n else\n element.addEventListener('click', editEventIndiv);\n break;\n } // buttons to edit event details\n\n case 'editname':\n case 'altname':\n {\n element.addEventListener('click', editName);\n break;\n } // edit primary or alternate name\n\n case 'addname':\n {\n element.addEventListener('click', addName);\n break;\n } // add a new alternate name\n\n case 'clear':\n { // buttons to clear event details\n if (id == '17')\n element.addEventListener('click', clearEventChildr);\n else\n element.addEventListener('click', clearEventIndiv);\n break;\n } // buttons to clear event details\n\n case 'birthdate':\n case 'christeningdate':\n case 'deathdate':\n case 'burieddate':\n case 'sealingdate':\n case 'baptismdate':\n case 'endowmentdate':\n case 'confirmationdate':\n case 'initiatorydate':\n case 'eventdate':\n { // edit major event dates\n element.abbrTbl = MonthAbbrs;\n element.addEventListener('change', dateChanged);\n element.addEventListener('change', eventChanged);\n element.checkfunc = checkDate;\n break;\n } // edit major event dates\n\n case 'birthlocation':\n case 'christeninglocation':\n case 'baptismlocation':\n case 'confirmationlocation':\n case 'deathlocation':\n case 'buriedlocation':\n case 'eventlocation':\n { // edit major event locations\n element.abbrTbl = evtLocAbbrs;\n element.addEventListener('change', locationChanged);\n element.addEventListener('change', eventChanged);\n break;\n } // edit major event locations\n\n case 'surname':\n { // Surname of individual\n element.focus(); // put cursor in surname field\n element.abbrTbl = surnamePartAbbrs;\n element.addEventListener('change', surnameChanged);\n element.checkfunc = checkName;\n break;\n } // Surname of individual\n\n case 'givenname':\n { // name fields\n element.checkfunc = checkName;\n element.addEventListener('change', givenChanged);\n break;\n } // name fields\n\n case 'deathcause':\n { // cause of death\n element.abbrTbl = CauseAbbrs;\n element.checkfunc = checkText;\n break;\n } // cause of death\n\n case 'parents':\n { // button to add or edit parents\n element.addEventListener('click', editParents);\n break;\n } // button to add or edit parents\n\n case 'marriages':\n { // button to add or edit families\n element.addEventListener('click', editMarriages);\n break;\n } // button to add or edit families\n\n case 'addevent':\n { // button to add instance of Event\n element.addEventListener('click', eventAdd);\n break;\n } // button to add instance of Event\n\n case 'order':\n { // button to order events by date\n element.addEventListener('click', orderEventsByDate);\n break;\n } // button to order events by date\n\n case 'showmore':\n { // button to display more input fields\n element.addEventListener('click', showMore);\n break;\n } // button to display more input fields\n\n case 'pictures':\n { // button to add or edit pictures\n element.addEventListener('click', editPictures);\n break;\n } // button to add or edit pictures\n\n case 'address':\n { // button to add or edit address\n element.addEventListener('click', editAddress);\n break;\n } // button to add or edit address\n\n case 'delete':\n { // button to delete the individual\n element.addEventListener('click', delIndivid);\n break;\n } // button to delete the individual\n\n case 'merge':\n { // button to merge with another individual\n element.addEventListener('click', mergeIndivid);\n break;\n } // button to merge with another individual\n\n case 'search':\n { // popdown search menu\n element.addEventListener('click', popdownSearch);\n break;\n } // popdown search menu\n\n case 'censussearch':\n { // perform census table search\n element.addEventListener('click', censusSearch);\n break;\n } // perform census table search\n\n case 'bmdsearch':\n { // perform vital statistics search\n element.addEventListener('click', bmdSearch);\n break;\n } // perform vital statistics search\n\n case 'ancestrysearch':\n { // perform Ancestry.com search\n element.addEventListener('click', ancestrySearch);\n break;\n } // perform Ancestry.com search\n\n case 'gender':\n { // Gender of individual\n element.addEventListener('change', genderChanged);\n break;\n } // Gender of individual\n\n case 'eventdescn':\n { // description for generic event\n element.addEventListener('change', eventChanged);\n element.checkfunc = checkText;\n break;\n } // description for generic event\n\n case 'eventpref':\n { // preferred checkbox\n element.addEventListener('change', eventPrefChanged);\n break;\n } // preferred checkbox\n\n case 'eventidet':\n { // preferred checkbox\n idetArray[id - 0] = element.value - 0;\n break;\n } // preferred checkbox\n\n case 'eventdetail':\n { // button to popup event detail edit dialog\n element.addEventListener('click', eventDetail);\n break;\n } // button to popup event detail edit dialog\n\n case 'eventdelete':\n { // button to delete an event\n element.addEventListener('click', eventDelete);\n break;\n } // button to delete an event\n\n case 'grant':\n { // button to grant access to this individual\n element.addEventListener('click', grantAccess);\n break;\n } // button to grant access to this individual\n } // switch on name of element\n } // loop through all elements in the form\n}", "function listActions(e) {\n\n\tif (e.target.className === \"checkbox\") {\n\t\te.target.nextElementSibling.classList.toggle(\"done\");\n\t}\n\telse if (e.target.tagName === \"SPAN\") {\n\t\te.target.classList.toggle(\"done\");\n\t\tif (e.target.className === \"done\") {\n\t\t\te.target.previousElementSibling.checked = true;\n\t\t} else {\n\t\t\te.target.previousElementSibling.checked = false;\n\t\t}\n\t}\n\telse if (e.target.className === \"delete\") {\n\t\te.target.parentElement.remove();\n\t}\n}", "function events() {\r\n\taddition();\r\n\tcounter();\r\n\tcheckForm();\r\n}", "_events() {\n \tthis._addKeyHandler();\n \tthis._addClickHandler();\n }", "function handleElementClickFtn(action, element, index) {\n if(action === 'selected' || action === 'deselected') {\n objInst.notesHeader.notify(action, { 'elem': element, 'idx' : index });\n } \n }", "function attachEvents()\n\t{\n\t\tfor (var i = 0, count = buttons.length; i < count; i++)\n\t\t{\n\t\t\tvar button = buttons[i];\n\t\t\t// We only want submit buttons\n\t\t\tif (button.type != 'submit')\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\tbutton.attachEvent('onclick', handleClick);\n\t\t}\n\t\t\n\t\t// Also loop through regular submit buttons\n\t\tvar inputs = document.getElementsByTagName('input');\n\t\tfor (var i = 0, count = inputs.length; i < count; i++)\n\t\t{\n\t\t\tvar input = inputs[i];\n\t\t\tif (input.type != 'submit')\n\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\tinput.attachEvent('onclick', handleClick);\n\t\t}\n\t}", "function listenClicks( elements )\n{\n elements.forEach( el => {\n _( el.el ).addEventListener( 'click', ( e ) => {\n el.func();\n unhover();\n });\n });\n}", "function _clicked_ele_trigger(oEle,e)\r\n{\r\n\tif(isNaN(e))\r\n\t{\r\n\t\tvar mLeft = app.findMousePos(e)[0];\r\n\t}\r\n\telse\r\n\t{\r\n\t\tvar mLeft = e;\r\n\t}\r\n\r\n\tvar eleMaxRight = oEle.offsetWidth + app.eleLeft(oEle);\r\n\tvar eleMinRight = eleMaxRight - 16;\r\n\r\n\tif((mLeft>eleMinRight)&&(mLeft<eleMaxRight))\r\n\t{\r\n\t\treturn true;\r\n\t}\r\n\treturn false;\r\n}", "function loadEvents(){\n document.querySelector('form').addEventListener('submit',handleSubmit);\n document.getElementById('clear').addEventListener('click',clearList);\n document.querySelector('ul').addEventListener('click',deleteCmd);\n}", "static get listeners() {\n return {\n 'container.down': '_mouseDownHandler',\n 'document.move': '_drag',\n 'document.up': '_switchThumbDropHandler',\n 'mouseenter': '_switchButtonOnMouseEnter',\n 'mouseleave': '_switchButtonOnMouseLeave',\n 'resize': '_resizeHandler',\n 'container.resize': '_resizeHandler',\n 'document.selectstart': '_selectStartHandler'\n };\n }", "get eventListeners() {\n\t\treturn [\"onOpening\",\"onOpen\",\"onClosing\",\"onClose\",\"onCollapse\",\"onDragEnd\",\"onDragStart\",\"onExpand\",\"onMaximize\",\"onMinimize\",\"onResizeEnd\",\"onResizeStart\",\"onRestore\",\"onCreate\",\"onReady\"];\n\t}", "function EventHelper (possibleEvents) {\n }", "function checkAllClicked() {\n\tvar buttons = document.getElementsByTagName(\"li\"),\n\t\tflag = 1;\n\n\tfor (var i = 0; i < buttons.length; i++) {\n\t\tif (buttons[i].className.indexOf(\"clicked\") == -1) {\n\t\t\tflag = 0;\n\t\t}\n\t}\n\n\treturn flag;\n}", "function isClicked(e,ifrm) \r\n{\r\n\tif (document.layers) \r\n\t{\r\n\t\tvar clickX = e.pageX;\r\n\t\tvar clickY = e.pageY;\r\n\t\tvar t = ifrm;\r\n\t\tif ((clickX > t.left) && (clickX < t.left+t.clip.width) && (clickY > t.top) && (clickY < t.top+t.clip.height)) return true;\r\n\t\t\telse return false;\r\n\t}\r\n\telse if (window.event) // (document.all) \r\n\t{ \r\n\t // Need to hard-code this to trap IE for error-handling\r\n\t\tvar t = window.event.srcElement;\r\n\t\twhile (t.parentElement != null) \r\n\t\t{\r\n\t\t\tif (t == ifrm) return true;\r\n\t\t\tt = t.parentElement;\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\telse\r\n\t{\r\n\t\tvar t = e.target; // e.originalTarget;\r\n\t\twhile (t.parentNode != null) \r\n\t\t{\r\n\t\t\tif (t == ifrm) return true;\r\n\t\t\tt = t.parentNode;\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\treturn false;\r\n}", "initEvents() {\n this.root.querySelectorAll(this.options.buttonsSelector).forEach(\n button => {\n button.addEventListener(\n 'focus',\n event => this.focusButtonEventHandler(event)\n )\n\n button.addEventListener(\n 'click',\n event => this.clickButtonEventHandler(event)\n )\n\n button.addEventListener(\n 'keydown',\n event => this.keydownButtonEventHandler(event)\n )\n }\n )\n }", "function process_click(e) {\n if (e.toElement.className == 'delete')\n delete_tr(e.toElement);\n else if (e.toElement.className == 'edit')\n prepare_for_edit(e.toElement);\n}", "function getActions() {\n // Determine the events to bind. IE11 implements pointerEvents without\n // a prefix, which breaks compatibility with the IE10 implementation.\n return window.navigator.pointerEnabled ? {\n start: \"pointerdown\",\n move: \"pointermove\",\n end: \"pointerup\"\n } : window.navigator.msPointerEnabled ? {\n start: \"MSPointerDown\",\n move: \"MSPointerMove\",\n end: \"MSPointerUp\"\n } : {\n start: \"mousedown touchstart\",\n move: \"mousemove touchmove\",\n end: \"mouseup touchend\"\n };\n } // https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md", "getEventsToRender() {}", "__elemEvent(eventType, eventNameFull, d, i, nodes) {\n const node = nodes[i];\n const cssAction = EV.INTERACTION_EVENT_CSS_MAP[eventType];\n\n if (cssAction) {\n if (cssAction.action === 'add') {\n d3.select(node).classed(cssAction.css, true);\n }\n else if (cssAction.action === 'remove') {\n d3.select(node).classed(cssAction.css, false);\n }\n }\n\n this.__notify(eventNameFull, d, i, nodes);\n }", "element(e) {\n return e.target || e.srcElement;\n }", "function getActions ( ) {\r\n\r\n\t\t\t// Determine the events to bind. IE11 implements pointerEvents without\r\n\t\t\t// a prefix, which breaks compatibility with the IE10 implementation.\r\n\t\t\treturn window.navigator.pointerEnabled ? {\r\n\t\t\t\tstart: 'pointerdown',\r\n\t\t\t\tmove: 'pointermove',\r\n\t\t\t\tend: 'pointerup'\r\n\t\t\t} : window.navigator.msPointerEnabled ? {\r\n\t\t\t\tstart: 'MSPointerDown',\r\n\t\t\t\tmove: 'MSPointerMove',\r\n\t\t\t\tend: 'MSPointerUp'\r\n\t\t\t} : {\r\n\t\t\t\tstart: 'mousedown touchstart',\r\n\t\t\t\tmove: 'mousemove touchmove',\r\n\t\t\t\tend: 'mouseup touchend'\r\n\t\t\t};\r\n\t\t}", "addEventHandlers() {\n\n\t\tthis.elementConfig.addButton.on(\"click\",this.handleAdd);\n\t\tthis.elementConfig.cancelButton.on(\"click\",this.handleCancel);\n\t\tthis.elementConfig.retrieveButton.on(\"click\",this.retrieveData);\n\n\n\t}", "function checkIsFormChanged() {\r\n const inputArr = document.querySelectorAll('input');\r\n const selectArr = document.querySelectorAll('select');\r\n const radioArr = document.querySelectorAll('radio');\r\n const textareaArr = document.querySelectorAll('textarea');\r\n setEventListener(inputArr);\r\n setEventListener(selectArr);\r\n setEventListener(radioArr);\r\n setEventListener(textareaArr);\r\n}", "function bindEvents(){\n\t\t\n\t\t$(document).on(\"click\",\".item_tag\",function(e){\n\t\t\n\t\t\tdisplayItems($(e.target));\n\t\t\t\n\t\t});\n\t\t\n\t\t\n\t\t$(document).on(\"click\",\".item\",function(e){\n\t\t\n\t\t\te.preventDefault();\n\t\t\t\n\t\t\taddItem($(e.target));\n\t\t\n\t\t});\n\t\t\n\t\t\n\t\t$(document).on(\"click\",\".selected_item\",function(e){\n\t\t\n\t\t\te.preventDefault();\n\t\t\t\n\t\t\tremoveItem($(e.target));\n\t\t\n\t\t});\n\t}", "function v(e) {\n // Use the `click` event to detect changes to checkbox and radio inputs.\n // This approach works across all browsers, whereas `change` does not fire\n // until `blur` in IE8.\n var t = e.nodeName;\n return t && \"input\" === t.toLowerCase() && (\"checkbox\" === e.type || \"radio\" === e.type);\n }", "static get listenedEvents() {\n\t\treturn DOM_EVENTS;\n\t}", "function bindEvents() {\n for (var i=0; i < triggers.length; i++) {\n triggers[i].addEventListener('click', function(e) {\n var clickedEl = e.target; // clicked Element\n if (clickedEl.tagName === 'I') {\n clickedEl = clickedEl.parentNode;\n }\n e.preventDefault();\n setActivePanel(clickedEl);\n });\n } \n }", "function getEventsSection() {\n document.getElementById(\"ex-02-js-btn\").addEventListener(\"click\", () => {alert(\"You just clicked me!\")})\n $(\"#ex-02-jquery-btn\").on(\"click\", () => {alert(\"You just clicked me!\")})\n}", "function extractEvents$3(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget,eventSystemFlags,targetContainer){var targetNode=targetInst?getNodeFromInstance(targetInst):window;switch(domEventName){// Track the input node that has focus.\ncase'focusin':if(isTextInputElement(targetNode)||targetNode.contentEditable==='true'){activeElement$1=targetNode;activeElementInst$1=targetInst;lastSelection=null;}break;case'focusout':activeElement$1=null;activeElementInst$1=null;lastSelection=null;break;// Don't fire the event while the user is dragging. This matches the\n// semantics of the native select event.\ncase'mousedown':mouseDown=true;break;case'contextmenu':case'mouseup':case'dragend':mouseDown=false;constructSelectEvent(dispatchQueue,nativeEvent,nativeEventTarget);break;// Chrome and IE fire non-standard event when selection is changed (and\n// sometimes when it hasn't). IE's event fires out of order with respect\n// to key and input events on deletion, so we discard it.\n//\n// Firefox doesn't support selectionchange, so check selection status\n// after each key entry. The selection changes after keydown and before\n// keyup, but we check on keydown as well in the case of holding down a\n// key, when multiple keydown events are fired but only one keyup is.\n// This is also our approach for IE handling, for the reason above.\ncase'selectionchange':if(skipSelectionChangeEvent){break;}// falls through\ncase'keydown':case'keyup':constructSelectEvent(dispatchQueue,nativeEvent,nativeEventTarget);}}", "function extractEvents$3(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget,eventSystemFlags,targetContainer){var targetNode=targetInst?getNodeFromInstance(targetInst):window;switch(domEventName){// Track the input node that has focus.\ncase'focusin':if(isTextInputElement(targetNode)||targetNode.contentEditable==='true'){activeElement$1=targetNode;activeElementInst$1=targetInst;lastSelection=null;}break;case'focusout':activeElement$1=null;activeElementInst$1=null;lastSelection=null;break;// Don't fire the event while the user is dragging. This matches the\n// semantics of the native select event.\ncase'mousedown':mouseDown=true;break;case'contextmenu':case'mouseup':case'dragend':mouseDown=false;constructSelectEvent(dispatchQueue,nativeEvent,nativeEventTarget);break;// Chrome and IE fire non-standard event when selection is changed (and\n// sometimes when it hasn't). IE's event fires out of order with respect\n// to key and input events on deletion, so we discard it.\n//\n// Firefox doesn't support selectionchange, so check selection status\n// after each key entry. The selection changes after keydown and before\n// keyup, but we check on keydown as well in the case of holding down a\n// key, when multiple keydown events are fired but only one keyup is.\n// This is also our approach for IE handling, for the reason above.\ncase'selectionchange':if(skipSelectionChangeEvent){break;}// falls through\ncase'keydown':case'keyup':constructSelectEvent(dispatchQueue,nativeEvent,nativeEventTarget);}}", "function listenToButtons() {\n\t\tconst currentlyDisplayed = employeesData.find(isDisplayed);\n\t\tif (hasPrevious(currentlyDisplayed.id)) {\n\t\t\tpreviousButton.addEventListener('click', () => {\n\t\t\t\tupdateContactDetails(getAdjacentContactId('previous'));\n\t\t\t});\n\t\t}\n\t\tif (hasNext(currentlyDisplayed.id)) {\n\t\t\tnextButton.addEventListener('click', () => {\n\t\t\t\tupdateContactDetails(getAdjacentContactId('next'));\n\t\t\t});\n\t\t}\n\t}", "function trigger_event_listeners() {\n\n // Handles/Triggers the Function for\n // changes in the Motions' Radio\n on_change_motions();\n\n // Handles/Triggers the Function for\n // changes in the Camera View's Radio\n on_change_camera_view();\n\n // Handles/Triggers the Function for\n // changes in the XZ Grid's Checkbox\n on_check_xz_grid();\n\n // Handles/Triggers the Function for\n // changes in the Atomic Orbit's Checkbox\n on_check_atomic_orbits();\n \n \n // Handles/Triggers the Function for\n // changes in the Atom's Particle's State #1 Checkbox\n on_check_atom_particle_state_1();\n \n // Handles/Triggers the Function for\n // changes in the Atom's Particle's State #2 Checkbox\n on_check_atom_particle_state_2();\n \n // Handles/Triggers the Function for\n // changes in the Atom's Particle's State #3 Checkbox\n on_check_atom_particle_state_3();\n \n // Handles/Triggers the Function for\n // changes in the Atom's Particle's State #4 Checkbox\n on_check_atom_particle_state_4();\n \n}", "function domHandler(){\n\talert('button click event using dom event handler');\n}", "hoverListenersOn() {\n for (const button of this.buttonsAsArray.filter(x => x.type !== 'label')) {\n button.hoverListenerOn();\n }\n }", "function E(){F=Q.props.trigger.trim().split(\" \").reduce(function(e,t){if(\"manual\"===t)return e;if(Q.props.target)switch(t){case\"mouseenter\":T(\"mouseover\",d,e),T(\"mouseout\",h,e);break;case\"focus\":T(\"focusin\",d,e),T(\"focusout\",h,e);break;case\"click\":T(t,d,e);break}else switch(T(t,c,e),Q.props.touchHold&&(T(\"touchstart\",c,e),T(\"touchend\",u,e)),t){case\"mouseenter\":T(\"mouseleave\",u,e);break;case\"focus\":T(Dt?\"focusout\":\"blur\",f,e);break}return e},[])}", "function AllEventsHandling() {\n\n // when view book button click on the top of guest book then below event occur\n loadMovies.addEventListener('click', loadLocalStorageMoviesData);\n // when add button click below function execute\n addbtn.addEventListener(\"click\", addBtnProcess);\n}", "addAllEvents () {\n this.addClickEvents()\n this.addHoverEvents()\n this.checkItemStates()\n }", "attachEventListenersStaticElements(){\n domGetElementById(ids.IMAGE_TAB).addEventListener(\"click\", this.controllerEventHandler.viewImages);\n domGetElementById(ids.VIDEO_TAB).addEventListener(\"click\", this.controllerEventHandler.viewVideos);\n }" ]
[ "0.62784487", "0.6259815", "0.6204584", "0.60370433", "0.5960339", "0.5942536", "0.5870385", "0.5858289", "0.5806052", "0.5806052", "0.5806052", "0.5806052", "0.5806052", "0.5806052", "0.5806052", "0.5806052", "0.5806052", "0.5806052", "0.5806052", "0.5806052", "0.5806052", "0.5806052", "0.5806052", "0.5806052", "0.5806052", "0.5806052", "0.5806052", "0.576064", "0.5755184", "0.57385004", "0.5723626", "0.5704796", "0.5693057", "0.5658496", "0.56351495", "0.5623295", "0.5623295", "0.5623202", "0.5621015", "0.5618546", "0.56036764", "0.5580049", "0.5576295", "0.5567882", "0.55660146", "0.55540186", "0.555398", "0.5553074", "0.5553074", "0.5549977", "0.55424005", "0.5539496", "0.5539146", "0.55228454", "0.55163854", "0.5516185", "0.55104965", "0.55104965", "0.5504069", "0.54974174", "0.54970413", "0.5478003", "0.5474382", "0.5472848", "0.5466835", "0.5466606", "0.546116", "0.5449024", "0.5442392", "0.5426519", "0.5426236", "0.54242593", "0.5420864", "0.54197097", "0.54182094", "0.5416975", "0.5415839", "0.5410823", "0.5404794", "0.5403226", "0.5392826", "0.53749895", "0.5370798", "0.537042", "0.5369506", "0.53671575", "0.53654575", "0.53591645", "0.5356347", "0.5353978", "0.53535426", "0.535342", "0.535342", "0.5348978", "0.5347344", "0.5347215", "0.53444755", "0.5343046", "0.533258", "0.53319156", "0.5331342" ]
0.0
-1
Builds an array of segments "levels". The first level will be the leftmost tier of segments if the calendar is lefttoright, or the rightmost if the calendar is righttoleft. Assumes the segments are already ordered by date.
function buildSlotSegLevels(segs) { var levels = []; var i; var seg; var j; for (i = 0; i < segs.length; i++) { seg = segs[i]; // go through all the levels and stop on the first level where there are no collisions for (j = 0; j < levels.length; j++) { if (!computeSlotSegCollisions(seg, levels[j]).length) { break; } } seg.level = j; (levels[j] || (levels[j] = [])).push(seg); } return levels; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buildSlotSegLevels(segs) {\n var levels = [];\n var i;\n var seg;\n var j;\n\n for (i = 0; i < segs.length; i++) {\n seg = segs[i]; // go through all the levels and stop on the first level where there are no collisions\n\n for (j = 0; j < levels.length; j++) {\n if (!computeSlotSegCollisions(seg, levels[j]).length) {\n break;\n }\n }\n\n seg.level = j;\n (levels[j] || (levels[j] = [])).push(seg);\n }\n\n return levels;\n } // For every segment, figure out the other segments that are in subsequent", "function buildSlotSegLevels(segs){var levels=[];var i;var seg;var j;for(i=0;i<segs.length;i++){seg=segs[i];// go through all the levels and stop on the first level where there are no collisions\nfor(j=0;j<levels.length;j++){if(!computeSlotSegCollisions(seg,levels[j]).length){break;}}seg.level=j;(levels[j]||(levels[j]=[])).push(seg);}return levels;}// For every segment, figure out the other segments that are in subsequent", "function buildSlotSegLevels(segs) {\n\t\tvar levels = [];\n\t\tvar i, seg;\n\t\tvar j;\n\n\t\tfor (i=0; i<segs.length; i++) {\n\t\t\tseg = segs[i];\n\n\t\t\t// go through all the levels and stop on the first level where there are no collisions\n\t\t\tfor (j=0; j<levels.length; j++) {\n\t\t\t\tif (!computeSlotSegCollisions(seg, levels[j]).length) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tseg.level = j;\n\n\t\t\t(levels[j] || (levels[j] = [])).push(seg);\n\t\t}\n\n\t\treturn levels;\n\t}", "function buildSlotSegLevels(segs) {\n var levels = [];\n var i;\n var seg;\n var j;\n for (i = 0; i < segs.length; i += 1) {\n seg = segs[i];\n // go through all the levels and stop on the first level where there are no collisions\n for (j = 0; j < levels.length; j += 1) {\n if (!computeSlotSegCollisions(seg, levels[j]).length) {\n break;\n }\n }\n seg.level = j;\n (levels[j] || (levels[j] = [])).push(seg);\n }\n return levels;\n }", "function buildSlotSegLevels(segs) {\n var levels = [];\n var i, seg;\n var j;\n\n for (i = 0; i < segs.length; i++) {\n seg = segs[i];\n\n // go through all the levels and stop on the first level where there are no collisions\n for (j = 0; j < levels.length; j++) {\n if (!computeSlotSegCollisions(seg, levels[j]).length) {\n break;\n }\n }\n\n seg.level = j;\n\n (levels[j] || (levels[j] = [])).push(seg);\n }\n\n return levels;\n }", "function buildSlotSegLevels(segs) {\n\tvar levels = [];\n\tvar i, seg;\n\tvar j;\n\n\tfor (i=0; i<segs.length; i++) {\n\t\tseg = segs[i];\n\n\t\t// go through all the levels and stop on the first level where there are no collisions\n\t\tfor (j=0; j<levels.length; j++) {\n\t\t\tif (!computeSlotSegCollisions(seg, levels[j]).length) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tseg.level = j;\n\n\t\t(levels[j] || (levels[j] = [])).push(seg);\n\t}\n\n\treturn levels;\n}", "function buildSlotSegLevels(segs) {\n\tvar levels = [];\n\tvar i, seg;\n\tvar j;\n\n\tfor (i=0; i<segs.length; i++) {\n\t\tseg = segs[i];\n\n\t\t// go through all the levels and stop on the first level where there are no collisions\n\t\tfor (j=0; j<levels.length; j++) {\n\t\t\tif (!computeSlotSegCollisions(seg, levels[j]).length) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tseg.level = j;\n\n\t\t(levels[j] || (levels[j] = [])).push(seg);\n\t}\n\n\treturn levels;\n}", "function buildSlotSegLevels(segs) {\n\tvar levels = [];\n\tvar i, seg;\n\tvar j;\n\n\tfor (i=0; i<segs.length; i++) {\n\t\tseg = segs[i];\n\n\t\t// go through all the levels and stop on the first level where there are no collisions\n\t\tfor (j=0; j<levels.length; j++) {\n\t\t\tif (!computeSlotSegCollisions(seg, levels[j]).length) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tseg.level = j;\n\n\t\t(levels[j] || (levels[j] = [])).push(seg);\n\t}\n\n\treturn levels;\n}", "function buildSlotSegLevels(segs) {\n\tvar levels = [];\n\tvar i, seg;\n\tvar j;\n\n\tfor (i=0; i<segs.length; i++) {\n\t\tseg = segs[i];\n\n\t\t// go through all the levels and stop on the first level where there are no collisions\n\t\tfor (j=0; j<levels.length; j++) {\n\t\t\tif (!computeSlotSegCollisions(seg, levels[j]).length) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tseg.level = j;\n\n\t\t(levels[j] || (levels[j] = [])).push(seg);\n\t}\n\n\treturn levels;\n}", "function buildSlotSegLevels(segs) {\n\tvar levels = [];\n\tvar i, seg;\n\tvar j;\n\n\tfor (i=0; i<segs.length; i++) {\n\t\tseg = segs[i];\n\n\t\t// go through all the levels and stop on the first level where there are no collisions\n\t\tfor (j=0; j<levels.length; j++) {\n\t\t\tif (!computeSlotSegCollisions(seg, levels[j]).length) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tseg.level = j;\n\n\t\t(levels[j] || (levels[j] = [])).push(seg);\n\t}\n\n\treturn levels;\n}", "function buildSlotSegLevels(segs) {\n\tvar levels = [];\n\tvar i, seg;\n\tvar j;\n\n\tfor (i=0; i<segs.length; i++) {\n\t\tseg = segs[i];\n\n\t\t// go through all the levels and stop on the first level where there are no collisions\n\t\tfor (j=0; j<levels.length; j++) {\n\t\t\tif (!computeSlotSegCollisions(seg, levels[j]).length) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tseg.level = j;\n\n\t\t(levels[j] || (levels[j] = [])).push(seg);\n\t}\n\n\treturn levels;\n}", "function buildSlotSegLevels(segs) {\n\tvar levels = [];\n\tvar i, seg;\n\tvar j;\n\n\tfor (i=0; i<segs.length; i++) {\n\t\tseg = segs[i];\n\n\t\t// go through all the levels and stop on the first level where there are no collisions\n\t\tfor (j=0; j<levels.length; j++) {\n\t\t\tif (!computeSlotSegCollisions(seg, levels[j]).length) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tseg.level = j;\n\n\t\t(levels[j] || (levels[j] = [])).push(seg);\n\t}\n\n\treturn levels;\n}", "function buildSlotSegLevels(segs) {\n\tvar levels = [];\n\tvar i, seg;\n\tvar j;\n\n\tfor (i=0; i<segs.length; i++) {\n\t\tseg = segs[i];\n\n\t\t// go through all the levels and stop on the first level where there are no collisions\n\t\tfor (j=0; j<levels.length; j++) {\n\t\t\tif (!computeSlotSegCollisions(seg, levels[j]).length) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tseg.level = j;\n\n\t\t(levels[j] || (levels[j] = [])).push(seg);\n\t}\n\n\treturn levels;\n}", "function buildSlotSegLevels(segs) {\n var levels = [];\n var i;\n var seg;\n var j;\n for (i = 0; i < segs.length; i++) {\n seg = segs[i];\n // go through all the levels and stop on the first level where there are no collisions\n for (j = 0; j < levels.length; j++) {\n if (!computeSlotSegCollisions(seg, levels[j]).length) {\n break;\n }\n }\n seg.level = j;\n (levels[j] || (levels[j] = [])).push(seg);\n }\n return levels;\n}", "function buildSlotSegLevels(segs) {\n var levels = [];\n var i;\n var seg;\n var j;\n for (i = 0; i < segs.length; i++) {\n seg = segs[i];\n // go through all the levels and stop on the first level where there are no collisions\n for (j = 0; j < levels.length; j++) {\n if (!computeSlotSegCollisions(seg, levels[j]).length) {\n break;\n }\n }\n seg.level = j;\n (levels[j] || (levels[j] = [])).push(seg);\n }\n return levels;\n}", "function buildSlotSegLevels(segs) {\n var levels = [];\n var i;\n var seg;\n var j;\n for (i = 0; i < segs.length; i++) {\n seg = segs[i];\n // go through all the levels and stop on the first level where there are no collisions\n for (j = 0; j < levels.length; j++) {\n if (!computeSlotSegCollisions(seg, levels[j]).length) {\n break;\n }\n }\n seg.level = j;\n (levels[j] || (levels[j] = [])).push(seg);\n }\n return levels;\n}", "function buildSlotSegLevels(segs) {\n var levels = [];\n var i;\n var seg;\n var j;\n for (i = 0; i < segs.length; i++) {\n seg = segs[i];\n // go through all the levels and stop on the first level where there are no collisions\n for (j = 0; j < levels.length; j++) {\n if (!computeSlotSegCollisions(seg, levels[j]).length) {\n break;\n }\n }\n seg.level = j;\n (levels[j] || (levels[j] = [])).push(seg);\n }\n return levels;\n}", "function buildSlotSegLevels(segs) {\n var levels = [];\n var i;\n var seg;\n var j;\n for (i = 0; i < segs.length; i++) {\n seg = segs[i];\n // go through all the levels and stop on the first level where there are no collisions\n for (j = 0; j < levels.length; j++) {\n if (!computeSlotSegCollisions(seg, levels[j]).length) {\n break;\n }\n }\n seg.level = j;\n (levels[j] || (levels[j] = [])).push(seg);\n }\n return levels;\n}", "function buildSlotSegLevels(segs) {\n\tvar levels = [];\n\tvar i, seg;\n\tvar j;\n\n\tfor (i=0; i<segs.length; i++) {\n\t\tseg = segs[i];\n\n\t\t// go through all the levels and stop on the first level where there are no collisions\n\t\tfor (j=0; j<levels.length; j++) {\n\t\t\tif (!computeSlotSegCollisions(seg, levels[j]).length) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t(levels[j] || (levels[j] = [])).push(seg);\n\t}\n\n\treturn levels;\n}", "function buildSlotSegLevels(segs) {\n\tvar levels = [];\n\tvar i, seg;\n\tvar j;\n\n\tfor (i=0; i<segs.length; i++) {\n\t\tseg = segs[i];\n\n\t\t// go through all the levels and stop on the first level where there are no collisions\n\t\tfor (j=0; j<levels.length; j++) {\n\t\t\tif (!computeSlotSegCollisions(seg, levels[j]).length) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t(levels[j] || (levels[j] = [])).push(seg);\n\t}\n\n\treturn levels;\n}", "function buildSlotSegLevels(segs) {\n\tvar levels = [];\n\tvar i, seg;\n\tvar j;\n\n\tfor (i=0; i<segs.length; i++) {\n\t\tseg = segs[i];\n\n\t\t// go through all the levels and stop on the first level where there are no collisions\n\t\tfor (j=0; j<levels.length; j++) {\n\t\t\tif (!computeSlotSegCollisions(seg, levels[j]).length) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t(levels[j] || (levels[j] = [])).push(seg);\n\t}\n\n\treturn levels;\n}", "function buildSlotSegLevels(segs) {\n\tvar levels = [];\n\tvar i, seg;\n\tvar j;\n\n\tfor (i=0; i<segs.length; i++) {\n\t\tseg = segs[i];\n\n\t\t// go through all the levels and stop on the first level where there are no collisions\n\t\tfor (j=0; j<levels.length; j++) {\n\t\t\tif (!computeSlotSegCollisions(seg, levels[j]).length) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t(levels[j] || (levels[j] = [])).push(seg);\n\t}\n\n\treturn levels;\n}", "function buildSlotSegLevels(segs) {\n\tvar levels = [];\n\tvar i, seg;\n\tvar j;\n\n\tfor (i=0; i<segs.length; i++) {\n\t\tseg = segs[i];\n\n\t\t// go through all the levels and stop on the first level where there are no collisions\n\t\tfor (j=0; j<levels.length; j++) {\n\t\t\tif (!computeSlotSegCollisions(seg, levels[j]).length) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t(levels[j] || (levels[j] = [])).push(seg);\n\t}\n\n\treturn levels;\n}", "function buildSlotSegLevels(segs) {\n var levels = [];\n var i;\n var seg;\n var j;\n\n for (i = 0; i < segs.length; i++) {\n seg = segs[i]; // go through all the levels and stop on the first level where there are no collisions\n\n for (j = 0; j < levels.length; j++) {\n if (!computeSlotSegCollisions(seg, levels[j]).length) {\n break;\n }\n }\n\n seg.level = j;\n (levels[j] || (levels[j] = [])).push(seg);\n }\n\n return levels;\n } // Find all the segments in `otherSegs` that vertically collide with `seg`.", "function buildSegmentSubrows(segments) {\n\n\t\t// Give preference to elements with certain criteria, so they have\n\t\t// a chance to be closer to the top.\n\t\tsegments.sort(compareDaySegments);\n\n\t\tvar subrows = [];\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// loop through subrows, starting with the topmost, until the segment\n\t\t\t// doesn't collide with other segments.\n\t\t\tfor (var j=0; j<subrows.length; j++) {\n\t\t\t\tif (!isDaySegmentCollision(segment, subrows[j])) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// `j` now holds the desired subrow index\n\t\t\tif (subrows[j]) {\n\t\t\t\tsubrows[j].push(segment);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsubrows[j] = [ segment ];\n\t\t\t}\n\t\t}\n\n\t\treturn subrows;\n\t}", "function buildSegmentSubrows(segments) {\n\n\t\t// Give preference to elements with certain criteria, so they have\n\t\t// a chance to be closer to the top.\n\t\tsegments.sort(compareDaySegments);\n\n\t\tvar subrows = [];\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// loop through subrows, starting with the topmost, until the segment\n\t\t\t// doesn't collide with other segments.\n\t\t\tfor (var j=0; j<subrows.length; j++) {\n\t\t\t\tif (!isDaySegmentCollision(segment, subrows[j])) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// `j` now holds the desired subrow index\n\t\t\tif (subrows[j]) {\n\t\t\t\tsubrows[j].push(segment);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsubrows[j] = [ segment ];\n\t\t\t}\n\t\t}\n\n\t\treturn subrows;\n\t}", "function buildSegmentSubrows(segments) {\n\n\t\t// Give preference to elements with certain criteria, so they have\n\t\t// a chance to be closer to the top.\n\t\tsegments.sort(compareDaySegments);\n\n\t\tvar subrows = [];\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// loop through subrows, starting with the topmost, until the segment\n\t\t\t// doesn't collide with other segments.\n\t\t\tfor (var j=0; j<subrows.length; j++) {\n\t\t\t\tif (!isDaySegmentCollision(segment, subrows[j])) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// `j` now holds the desired subrow index\n\t\t\tif (subrows[j]) {\n\t\t\t\tsubrows[j].push(segment);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsubrows[j] = [ segment ];\n\t\t\t}\n\t\t}\n\n\t\treturn subrows;\n\t}", "function buildSegmentSubrows(segments) {\n\n\t\t// Give preference to elements with certain criteria, so they have\n\t\t// a chance to be closer to the top.\n\t\tsegments.sort(compareDaySegments);\n\n\t\tvar subrows = [];\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// loop through subrows, starting with the topmost, until the segment\n\t\t\t// doesn't collide with other segments.\n\t\t\tfor (var j=0; j<subrows.length; j++) {\n\t\t\t\tif (!isDaySegmentCollision(segment, subrows[j])) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// `j` now holds the desired subrow index\n\t\t\tif (subrows[j]) {\n\t\t\t\tsubrows[j].push(segment);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsubrows[j] = [ segment ];\n\t\t\t}\n\t\t}\n\n\t\treturn subrows;\n\t}", "function buildSegmentSubrows(segments) {\n\n\t\t// Give preference to elements with certain criteria, so they have\n\t\t// a chance to be closer to the top.\n\t\tsegments.sort(compareDaySegments);\n\n\t\tvar subrows = [];\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// loop through subrows, starting with the topmost, until the segment\n\t\t\t// doesn't collide with other segments.\n\t\t\tfor (var j=0; j<subrows.length; j++) {\n\t\t\t\tif (!isDaySegmentCollision(segment, subrows[j])) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// `j` now holds the desired subrow index\n\t\t\tif (subrows[j]) {\n\t\t\t\tsubrows[j].push(segment);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsubrows[j] = [ segment ];\n\t\t\t}\n\t\t}\n\n\t\treturn subrows;\n\t}", "function computeSegHorizontals(segs, eventOrderSpecs) {\n // IMPORTANT TO CLEAR OLD RESULTS :(\n for (var _i = 0, segs_2 = segs; _i < segs_2.length; _i++) {\n var seg = segs_2[_i];\n seg.level = null;\n seg.forwardCoord = null;\n seg.backwardCoord = null;\n seg.forwardPressure = null;\n }\n\n segs = Object(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__[\"sortEventSegs\"])(segs, eventOrderSpecs);\n var level0;\n var levels = buildSlotSegLevels(segs);\n computeForwardSlotSegs(levels);\n\n if (level0 = levels[0]) {\n for (var _a = 0, level0_1 = level0; _a < level0_1.length; _a++) {\n var seg = level0_1[_a];\n computeSlotSegPressures(seg);\n }\n\n for (var _b = 0, level0_2 = level0; _b < level0_2.length; _b++) {\n var seg = level0_2[_b];\n computeSegForwardBack(seg, 0, 0, eventOrderSpecs);\n }\n }\n\n return segs;\n } // Builds an array of segments \"levels\". The first level will be the leftmost tier of segments if the calendar is", "function buildSegments(events) {\n\t\tvar segments = [];\n\t\tfor (var i=0; i<events.length; i++) {\n\t\t\tvar eventSegments = buildSegmentsForEvent(events[i]);\n\t\t\tsegments.push.apply(segments, eventSegments); // append an array to an array\n\t\t}\n\t\treturn segments;\n\t}", "function buildSegments(events) {\n\t\tvar segments = [];\n\t\tfor (var i=0; i<events.length; i++) {\n\t\t\tvar eventSegments = buildSegmentsForEvent(events[i]);\n\t\t\tsegments.push.apply(segments, eventSegments); // append an array to an array\n\t\t}\n\t\treturn segments;\n\t}", "function buildSegments(events) {\n\t\tvar segments = [];\n\t\tfor (var i=0; i<events.length; i++) {\n\t\t\tvar eventSegments = buildSegmentsForEvent(events[i]);\n\t\t\tsegments.push.apply(segments, eventSegments); // append an array to an array\n\t\t}\n\t\treturn segments;\n\t}", "function buildSegments(events) {\n\t\tvar segments = [];\n\t\tfor (var i=0; i<events.length; i++) {\n\t\t\tvar eventSegments = buildSegmentsForEvent(events[i]);\n\t\t\tsegments.push.apply(segments, eventSegments); // append an array to an array\n\t\t}\n\t\treturn segments;\n\t}", "function buildSegments(events) {\n\t\tvar segments = [];\n\t\tfor (var i=0; i<events.length; i++) {\n\t\t\tvar eventSegments = buildSegmentsForEvent(events[i]);\n\t\t\tsegments.push.apply(segments, eventSegments); // append an array to an array\n\t\t}\n\t\treturn segments;\n\t}", "function buildSegmentRows(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar segmentRows = [];\n\t\tvar segmentI;\n\t\tvar segment;\n\t\tvar rowI;\n\n\t\t// group segments by row\n\t\tfor (segmentI=0; segmentI<segments.length; segmentI++) {\n\t\t\tsegment = segments[segmentI];\n\t\t\trowI = segment.row;\n\t\t\tif (segment.element) { // was rendered?\n\t\t\t\tif (segmentRows[rowI]) {\n\t\t\t\t\t// already other segments. append to array\n\t\t\t\t\tsegmentRows[rowI].push(segment);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// first segment in row. create new array\n\t\t\t\t\tsegmentRows[rowI] = [ segment ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// sort each row\n\t\tfor (rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tsegmentRows[rowI] = sortSegmentRow(\n\t\t\t\tsegmentRows[rowI] || [] // guarantee an array, even if no segments\n\t\t\t);\n\t\t}\n\n\t\treturn segmentRows;\n\t}", "function buildSegmentRows(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar segmentRows = [];\n\t\tvar segmentI;\n\t\tvar segment;\n\t\tvar rowI;\n\n\t\t// group segments by row\n\t\tfor (segmentI=0; segmentI<segments.length; segmentI++) {\n\t\t\tsegment = segments[segmentI];\n\t\t\trowI = segment.row;\n\t\t\tif (segment.element) { // was rendered?\n\t\t\t\tif (segmentRows[rowI]) {\n\t\t\t\t\t// already other segments. append to array\n\t\t\t\t\tsegmentRows[rowI].push(segment);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// first segment in row. create new array\n\t\t\t\t\tsegmentRows[rowI] = [ segment ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// sort each row\n\t\tfor (rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tsegmentRows[rowI] = sortSegmentRow(\n\t\t\t\tsegmentRows[rowI] || [] // guarantee an array, even if no segments\n\t\t\t);\n\t\t}\n\n\t\treturn segmentRows;\n\t}", "function buildSegmentRows(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar segmentRows = [];\n\t\tvar segmentI;\n\t\tvar segment;\n\t\tvar rowI;\n\n\t\t// group segments by row\n\t\tfor (segmentI=0; segmentI<segments.length; segmentI++) {\n\t\t\tsegment = segments[segmentI];\n\t\t\trowI = segment.row;\n\t\t\tif (segment.element) { // was rendered?\n\t\t\t\tif (segmentRows[rowI]) {\n\t\t\t\t\t// already other segments. append to array\n\t\t\t\t\tsegmentRows[rowI].push(segment);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// first segment in row. create new array\n\t\t\t\t\tsegmentRows[rowI] = [ segment ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// sort each row\n\t\tfor (rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tsegmentRows[rowI] = sortSegmentRow(\n\t\t\t\tsegmentRows[rowI] || [] // guarantee an array, even if no segments\n\t\t\t);\n\t\t}\n\n\t\treturn segmentRows;\n\t}", "function buildSegmentRows(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar segmentRows = [];\n\t\tvar segmentI;\n\t\tvar segment;\n\t\tvar rowI;\n\n\t\t// group segments by row\n\t\tfor (segmentI=0; segmentI<segments.length; segmentI++) {\n\t\t\tsegment = segments[segmentI];\n\t\t\trowI = segment.row;\n\t\t\tif (segment.element) { // was rendered?\n\t\t\t\tif (segmentRows[rowI]) {\n\t\t\t\t\t// already other segments. append to array\n\t\t\t\t\tsegmentRows[rowI].push(segment);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// first segment in row. create new array\n\t\t\t\t\tsegmentRows[rowI] = [ segment ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// sort each row\n\t\tfor (rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tsegmentRows[rowI] = sortSegmentRow(\n\t\t\t\tsegmentRows[rowI] || [] // guarantee an array, even if no segments\n\t\t\t);\n\t\t}\n\n\t\treturn segmentRows;\n\t}", "function buildSegmentRows(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar segmentRows = [];\n\t\tvar segmentI;\n\t\tvar segment;\n\t\tvar rowI;\n\n\t\t// group segments by row\n\t\tfor (segmentI=0; segmentI<segments.length; segmentI++) {\n\t\t\tsegment = segments[segmentI];\n\t\t\trowI = segment.row;\n\t\t\tif (segment.element) { // was rendered?\n\t\t\t\tif (segmentRows[rowI]) {\n\t\t\t\t\t// already other segments. append to array\n\t\t\t\t\tsegmentRows[rowI].push(segment);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// first segment in row. create new array\n\t\t\t\t\tsegmentRows[rowI] = [ segment ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// sort each row\n\t\tfor (rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tsegmentRows[rowI] = sortSegmentRow(\n\t\t\t\tsegmentRows[rowI] || [] // guarantee an array, even if no segments\n\t\t\t);\n\t\t}\n\n\t\treturn segmentRows;\n\t}", "function rangeToSegments(startDate, endDate) {\n\t\tvar rowCnt = t.getRowCnt();\n\t\tvar colCnt = t.getColCnt();\n\t\tvar segments = []; // array of segments to return\n\n\t\t// day offset for given date range\n\t\tvar rangeDayOffsetStart = dateToDayOffset(startDate);\n\t\tvar rangeDayOffsetEnd = dateToDayOffset(endDate); // exclusive\n\n\t\t// first and last cell offset for the given date range\n\t\t// \"last\" implies inclusivity\n\t\tvar rangeCellOffsetFirst = dayOffsetToCellOffset(rangeDayOffsetStart);\n\t\tvar rangeCellOffsetLast = dayOffsetToCellOffset(rangeDayOffsetEnd) - 1;\n\n\t\t// loop through all the rows in the view\n\t\tfor (var row=0; row<rowCnt; row++) {\n\n\t\t\t// first and last cell offset for the row\n\t\t\tvar rowCellOffsetFirst = row * colCnt;\n\t\t\tvar rowCellOffsetLast = rowCellOffsetFirst + colCnt - 1;\n\n\t\t\t// get the segment's cell offsets by constraining the range's cell offsets to the bounds of the row\n\t\t\tvar segmentCellOffsetFirst = Math.max(rangeCellOffsetFirst, rowCellOffsetFirst);\n\t\t\tvar segmentCellOffsetLast = Math.min(rangeCellOffsetLast, rowCellOffsetLast);\n\n\t\t\t// make sure segment's offsets are valid and in view\n\t\t\tif (segmentCellOffsetFirst <= segmentCellOffsetLast) {\n\n\t\t\t\t// translate to cells\n\t\t\t\tvar segmentCellFirst = cellOffsetToCell(segmentCellOffsetFirst);\n\t\t\t\tvar segmentCellLast = cellOffsetToCell(segmentCellOffsetLast);\n\n\t\t\t\t// view might be RTL, so order by leftmost column\n\t\t\t\tvar cols = [ segmentCellFirst.col, segmentCellLast.col ].sort();\n\n\t\t\t\t// Determine if segment's first/last cell is the beginning/end of the date range.\n\t\t\t\t// We need to compare \"day offset\" because \"cell offsets\" are often ambiguous and\n\t\t\t\t// can translate to multiple days, and an edge case reveals itself when we the\n\t\t\t\t// range's first cell is hidden (we don't want isStart to be true).\n\t\t\t\tvar isStart = cellOffsetToDayOffset(segmentCellOffsetFirst) == rangeDayOffsetStart;\n\t\t\t\tvar isEnd = cellOffsetToDayOffset(segmentCellOffsetLast) + 1 == rangeDayOffsetEnd; // +1 for comparing exclusively\n\n\t\t\t\tsegments.push({\n\t\t\t\t\trow: row,\n\t\t\t\t\tleftCol: cols[0],\n\t\t\t\t\trightCol: cols[1],\n\t\t\t\t\tisStart: isStart,\n\t\t\t\t\tisEnd: isEnd\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn segments;\n\t}", "function rangeToSegments(startDate, endDate) {\n\t\tvar rowCnt = t.getRowCnt();\n\t\tvar colCnt = t.getColCnt();\n\t\tvar segments = []; // array of segments to return\n\n\t\t// day offset for given date range\n\t\tvar rangeDayOffsetStart = dateToDayOffset(startDate);\n\t\tvar rangeDayOffsetEnd = dateToDayOffset(endDate); // exclusive\n\n\t\t// first and last cell offset for the given date range\n\t\t// \"last\" implies inclusivity\n\t\tvar rangeCellOffsetFirst = dayOffsetToCellOffset(rangeDayOffsetStart);\n\t\tvar rangeCellOffsetLast = dayOffsetToCellOffset(rangeDayOffsetEnd) - 1;\n\n\t\t// loop through all the rows in the view\n\t\tfor (var row=0; row<rowCnt; row++) {\n\n\t\t\t// first and last cell offset for the row\n\t\t\tvar rowCellOffsetFirst = row * colCnt;\n\t\t\tvar rowCellOffsetLast = rowCellOffsetFirst + colCnt - 1;\n\n\t\t\t// get the segment's cell offsets by constraining the range's cell offsets to the bounds of the row\n\t\t\tvar segmentCellOffsetFirst = Math.max(rangeCellOffsetFirst, rowCellOffsetFirst);\n\t\t\tvar segmentCellOffsetLast = Math.min(rangeCellOffsetLast, rowCellOffsetLast);\n\n\t\t\t// make sure segment's offsets are valid and in view\n\t\t\tif (segmentCellOffsetFirst <= segmentCellOffsetLast) {\n\n\t\t\t\t// translate to cells\n\t\t\t\tvar segmentCellFirst = cellOffsetToCell(segmentCellOffsetFirst);\n\t\t\t\tvar segmentCellLast = cellOffsetToCell(segmentCellOffsetLast);\n\n\t\t\t\t// view might be RTL, so order by leftmost column\n\t\t\t\tvar cols = [ segmentCellFirst.col, segmentCellLast.col ].sort();\n\n\t\t\t\t// Determine if segment's first/last cell is the beginning/end of the date range.\n\t\t\t\t// We need to compare \"day offset\" because \"cell offsets\" are often ambiguous and\n\t\t\t\t// can translate to multiple days, and an edge case reveals itself when we the\n\t\t\t\t// range's first cell is hidden (we don't want isStart to be true).\n\t\t\t\tvar isStart = cellOffsetToDayOffset(segmentCellOffsetFirst) == rangeDayOffsetStart;\n\t\t\t\tvar isEnd = cellOffsetToDayOffset(segmentCellOffsetLast) + 1 == rangeDayOffsetEnd; // +1 for comparing exclusively\n\n\t\t\t\tsegments.push({\n\t\t\t\t\trow: row,\n\t\t\t\t\tleftCol: cols[0],\n\t\t\t\t\trightCol: cols[1],\n\t\t\t\t\tisStart: isStart,\n\t\t\t\t\tisEnd: isEnd\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn segments;\n\t}", "function rangeToSegments(startDate, endDate) {\n\t\tvar rowCnt = t.getRowCnt();\n\t\tvar colCnt = t.getColCnt();\n\t\tvar segments = []; // array of segments to return\n\n\t\t// day offset for given date range\n\t\tvar rangeDayOffsetStart = dateToDayOffset(startDate);\n\t\tvar rangeDayOffsetEnd = dateToDayOffset(endDate); // exclusive\n\n\t\t// first and last cell offset for the given date range\n\t\t// \"last\" implies inclusivity\n\t\tvar rangeCellOffsetFirst = dayOffsetToCellOffset(rangeDayOffsetStart);\n\t\tvar rangeCellOffsetLast = dayOffsetToCellOffset(rangeDayOffsetEnd) - 1;\n\n\t\t// loop through all the rows in the view\n\t\tfor (var row=0; row<rowCnt; row++) {\n\n\t\t\t// first and last cell offset for the row\n\t\t\tvar rowCellOffsetFirst = row * colCnt;\n\t\t\tvar rowCellOffsetLast = rowCellOffsetFirst + colCnt - 1;\n\n\t\t\t// get the segment's cell offsets by constraining the range's cell offsets to the bounds of the row\n\t\t\tvar segmentCellOffsetFirst = Math.max(rangeCellOffsetFirst, rowCellOffsetFirst);\n\t\t\tvar segmentCellOffsetLast = Math.min(rangeCellOffsetLast, rowCellOffsetLast);\n\n\t\t\t// make sure segment's offsets are valid and in view\n\t\t\tif (segmentCellOffsetFirst <= segmentCellOffsetLast) {\n\n\t\t\t\t// translate to cells\n\t\t\t\tvar segmentCellFirst = cellOffsetToCell(segmentCellOffsetFirst);\n\t\t\t\tvar segmentCellLast = cellOffsetToCell(segmentCellOffsetLast);\n\n\t\t\t\t// view might be RTL, so order by leftmost column\n\t\t\t\tvar cols = [ segmentCellFirst.col, segmentCellLast.col ].sort();\n\n\t\t\t\t// Determine if segment's first/last cell is the beginning/end of the date range.\n\t\t\t\t// We need to compare \"day offset\" because \"cell offsets\" are often ambiguous and\n\t\t\t\t// can translate to multiple days, and an edge case reveals itself when we the\n\t\t\t\t// range's first cell is hidden (we don't want isStart to be true).\n\t\t\t\tvar isStart = cellOffsetToDayOffset(segmentCellOffsetFirst) == rangeDayOffsetStart;\n\t\t\t\tvar isEnd = cellOffsetToDayOffset(segmentCellOffsetLast) + 1 == rangeDayOffsetEnd; // +1 for comparing exclusively\n\n\t\t\t\tsegments.push({\n\t\t\t\t\trow: row,\n\t\t\t\t\tleftCol: cols[0],\n\t\t\t\t\trightCol: cols[1],\n\t\t\t\t\tisStart: isStart,\n\t\t\t\t\tisEnd: isEnd\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn segments;\n\t}", "function rangeToSegments(start, end) {\n\n\t\tvar rowCnt = t.getRowCnt();\n\t\tvar colCnt = t.getColCnt();\n\t\tvar segments = []; // array of segments to return\n\n\t\t// day offset for given date range\n\t\tvar rangeDayOffsetStart = dateToDayOffset(start);\n\t\tvar rangeDayOffsetEnd = dateToDayOffset(end); // an exclusive value\n\t\tvar endTimeMS = +end.time();\n\t\tif (endTimeMS && endTimeMS >= nextDayThreshold) {\n\t\t\trangeDayOffsetEnd++;\n\t\t}\n\t\trangeDayOffsetEnd = Math.max(rangeDayOffsetEnd, rangeDayOffsetStart + 1);\n\n\t\t// first and last cell offset for the given date range\n\t\t// \"last\" implies inclusivity\n\t\tvar rangeCellOffsetFirst = dayOffsetToCellOffset(rangeDayOffsetStart);\n\t\tvar rangeCellOffsetLast = dayOffsetToCellOffset(rangeDayOffsetEnd) - 1;\n\n\t\t// loop through all the rows in the view\n\t\tfor (var row=0; row<rowCnt; row++) {\n\n\t\t\t// first and last cell offset for the row\n\t\t\tvar rowCellOffsetFirst = row * colCnt;\n\t\t\tvar rowCellOffsetLast = rowCellOffsetFirst + colCnt - 1;\n\n\t\t\t// get the segment's cell offsets by constraining the range's cell offsets to the bounds of the row\n\t\t\tvar segmentCellOffsetFirst = Math.max(rangeCellOffsetFirst, rowCellOffsetFirst);\n\t\t\tvar segmentCellOffsetLast = Math.min(rangeCellOffsetLast, rowCellOffsetLast);\n\n\t\t\t// make sure segment's offsets are valid and in view\n\t\t\tif (segmentCellOffsetFirst <= segmentCellOffsetLast) {\n\n\t\t\t\t// translate to cells\n\t\t\t\tvar segmentCellFirst = cellOffsetToCell(segmentCellOffsetFirst);\n\t\t\t\tvar segmentCellLast = cellOffsetToCell(segmentCellOffsetLast);\n\n\t\t\t\t// view might be RTL, so order by leftmost column\n\t\t\t\tvar cols = [ segmentCellFirst.col, segmentCellLast.col ].sort();\n\n\t\t\t\t// Determine if segment's first/last cell is the beginning/end of the date range.\n\t\t\t\t// We need to compare \"day offset\" because \"cell offsets\" are often ambiguous and\n\t\t\t\t// can translate to multiple days, and an edge case reveals itself when we the\n\t\t\t\t// range's first cell is hidden (we don't want isStart to be true).\n\t\t\t\tvar isStart = cellOffsetToDayOffset(segmentCellOffsetFirst) == rangeDayOffsetStart;\n\t\t\t\tvar isEnd = cellOffsetToDayOffset(segmentCellOffsetLast) + 1 == rangeDayOffsetEnd; // +1 for comparing exclusively\n\n\t\t\t\tsegments.push({\n\t\t\t\t\trow: row,\n\t\t\t\t\tleftCol: cols[0],\n\t\t\t\t\trightCol: cols[1],\n\t\t\t\t\tisStart: isStart,\n\t\t\t\t\tisEnd: isEnd\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn segments;\n\t}", "function rangeToSegments(start, end) {\n\n\t\tvar rowCnt = t.getRowCnt();\n\t\tvar colCnt = t.getColCnt();\n\t\tvar segments = []; // array of segments to return\n\n\t\t// day offset for given date range\n\t\tvar rangeDayOffsetStart = dateToDayOffset(start);\n\t\tvar rangeDayOffsetEnd = dateToDayOffset(end); // an exclusive value\n\t\tvar endTimeMS = +end.time();\n\t\tif (endTimeMS && endTimeMS >= nextDayThreshold) {\n\t\t\trangeDayOffsetEnd++;\n\t\t}\n\t\trangeDayOffsetEnd = Math.max(rangeDayOffsetEnd, rangeDayOffsetStart + 1);\n\n\t\t// first and last cell offset for the given date range\n\t\t// \"last\" implies inclusivity\n\t\tvar rangeCellOffsetFirst = dayOffsetToCellOffset(rangeDayOffsetStart);\n\t\tvar rangeCellOffsetLast = dayOffsetToCellOffset(rangeDayOffsetEnd) - 1;\n\n\t\t// loop through all the rows in the view\n\t\tfor (var row=0; row<rowCnt; row++) {\n\n\t\t\t// first and last cell offset for the row\n\t\t\tvar rowCellOffsetFirst = row * colCnt;\n\t\t\tvar rowCellOffsetLast = rowCellOffsetFirst + colCnt - 1;\n\n\t\t\t// get the segment's cell offsets by constraining the range's cell offsets to the bounds of the row\n\t\t\tvar segmentCellOffsetFirst = Math.max(rangeCellOffsetFirst, rowCellOffsetFirst);\n\t\t\tvar segmentCellOffsetLast = Math.min(rangeCellOffsetLast, rowCellOffsetLast);\n\n\t\t\t// make sure segment's offsets are valid and in view\n\t\t\tif (segmentCellOffsetFirst <= segmentCellOffsetLast) {\n\n\t\t\t\t// translate to cells\n\t\t\t\tvar segmentCellFirst = cellOffsetToCell(segmentCellOffsetFirst);\n\t\t\t\tvar segmentCellLast = cellOffsetToCell(segmentCellOffsetLast);\n\n\t\t\t\t// view might be RTL, so order by leftmost column\n\t\t\t\tvar cols = [ segmentCellFirst.col, segmentCellLast.col ].sort();\n\n\t\t\t\t// Determine if segment's first/last cell is the beginning/end of the date range.\n\t\t\t\t// We need to compare \"day offset\" because \"cell offsets\" are often ambiguous and\n\t\t\t\t// can translate to multiple days, and an edge case reveals itself when we the\n\t\t\t\t// range's first cell is hidden (we don't want isStart to be true).\n\t\t\t\tvar isStart = cellOffsetToDayOffset(segmentCellOffsetFirst) == rangeDayOffsetStart;\n\t\t\t\tvar isEnd = cellOffsetToDayOffset(segmentCellOffsetLast) + 1 == rangeDayOffsetEnd; // +1 for comparing exclusively\n\n\t\t\t\tsegments.push({\n\t\t\t\t\trow: row,\n\t\t\t\t\tleftCol: cols[0],\n\t\t\t\t\trightCol: cols[1],\n\t\t\t\t\tisStart: isStart,\n\t\t\t\t\tisEnd: isEnd\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn segments;\n\t}", "function createLevels() {\r\n var easyLevel = createLevel('easy', 2, 4);\r\n var mediumLevel = createLevel('medium', 12, 8);\r\n var hardLevel = createLevel('hard', 30, 12);\r\n return [easyLevel, mediumLevel, hardLevel]\r\n}", "function createLevels() {\r\n var beginnerLevel = createLevel('Beginner', 8, 6, 3);\r\n var mediumLevel = createLevel('Medium', 15, 8, 3);\r\n var expertLevel = createLevel('Expert', 30, 12, 3);\r\n var scaryLevel = createLevel('Scary', 40, 16, 3);\r\n return [beginnerLevel, mediumLevel, expertLevel, scaryLevel]\r\n}", "function buildSegmentsForEvent(event) {\n\t\tvar startDate = event.start;\n\t\tvar endDate = exclEndDay(event);\n\t\tvar segments = rangeToSegments(startDate, endDate);\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tsegments[i].event = event;\n\t\t}\n\t\treturn segments;\n\t}", "function buildSegmentsForEvent(event) {\n\t\tvar startDate = event.start;\n\t\tvar endDate = exclEndDay(event);\n\t\tvar segments = rangeToSegments(startDate, endDate);\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tsegments[i].event = event;\n\t\t}\n\t\treturn segments;\n\t}", "function buildSegmentsForEvent(event) {\n\t\tvar startDate = event.start;\n\t\tvar endDate = exclEndDay(event);\n\t\tvar segments = rangeToSegments(startDate, endDate);\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tsegments[i].event = event;\n\t\t}\n\t\treturn segments;\n\t}", "computeControlSegments() {\n if (this.controlSteps.length) {\n this.controlSegments = [];\n let segment = { start : 0, end : 0, human : this.controlSteps[0] }\n for (let i = 0; i < this.controlSteps.length; ++i) {\n const humanStep = this.controlSteps[i];\n if (humanStep != segment.human) {\n this.controlSegments.push(segment);\n segment = { start : i, end : i, human : humanStep };\n } else {\n segment.end = i;\n }\n }\n this.controlSegments.push(segment);\n }\n }", "function groupSegsByDay(segs) {\n var segsByDay = []; // sparse array\n var i;\n var seg;\n for (i = 0; i < segs.length; i += 1) {\n seg = segs[i];\n (segsByDay[seg.dayIndex] || (segsByDay[seg.dayIndex] = []))\n .push(seg);\n }\n return segsByDay;\n }", "function flattenSlotSegLevels(levels) {\n\tvar segs = [];\n\tvar i, level;\n\tvar j;\n\n\tfor (i=0; i<levels.length; i++) {\n\t\tlevel = levels[i];\n\n\t\tfor (j=0; j<level.length; j++) {\n\t\t\tsegs.push(level[j]);\n\t\t}\n\t}\n\n\treturn segs;\n}", "function flattenSlotSegLevels(levels) {\n\tvar segs = [];\n\tvar i, level;\n\tvar j;\n\n\tfor (i=0; i<levels.length; i++) {\n\t\tlevel = levels[i];\n\n\t\tfor (j=0; j<level.length; j++) {\n\t\t\tsegs.push(level[j]);\n\t\t}\n\t}\n\n\treturn segs;\n}", "function flattenSlotSegLevels(levels) {\n\tvar segs = [];\n\tvar i, level;\n\tvar j;\n\n\tfor (i=0; i<levels.length; i++) {\n\t\tlevel = levels[i];\n\n\t\tfor (j=0; j<level.length; j++) {\n\t\t\tsegs.push(level[j]);\n\t\t}\n\t}\n\n\treturn segs;\n}", "function flattenSlotSegLevels(levels) {\n\tvar segs = [];\n\tvar i, level;\n\tvar j;\n\n\tfor (i=0; i<levels.length; i++) {\n\t\tlevel = levels[i];\n\n\t\tfor (j=0; j<level.length; j++) {\n\t\t\tsegs.push(level[j]);\n\t\t}\n\t}\n\n\treturn segs;\n}", "function flattenSlotSegLevels(levels) {\n\tvar segs = [];\n\tvar i, level;\n\tvar j;\n\n\tfor (i=0; i<levels.length; i++) {\n\t\tlevel = levels[i];\n\n\t\tfor (j=0; j<level.length; j++) {\n\t\t\tsegs.push(level[j]);\n\t\t}\n\t}\n\n\treturn segs;\n}", "function createSegmentsArray(subPolygon) {\n // Q1. Declare the \"segments\" multidimensional array\n segments = [];\n // Q2. Create \"points\" array consisting of anchor points comprising the subPolygon polygon\n points = [];\n for (var j = 0; j < subPolygon.pathPoints.length; j++) {\n points.push(subPolygon.pathPoints[j].anchor);\n }\n var n = points.length;\n // Q3. Append first segment\n P0 = points[n-1];\n P1 = points[0]; // First point of line segment\n P2 = points[1]; // Second point of line segment\n P3 = points[2];\n appendSegmentsArray(P0, P1, P2, P3);\n // Q4. Append middle segments\n for (var j = 1; j < n-2; j++) {\n P0 = points[j-1];\n P1 = points[j]; // First point of line segment\n P2 = points[j+1]; // Second point of line segment\n P3 = points[j+2];\n appendSegmentsArray(P0, P1, P2, P3);\n }\n // Q5. Append second to last segment\n P0 = points[n-3];\n P1 = points[n-2]; // First point of line segment\n P2 = points[n-1]; // Second point of line segment\n P3 = points[0];\n appendSegmentsArray(P0, P1, P2, P3);\n // Q6. Append last segment \n P0 = points[n-2];\n P1 = points[n-1]; // First point of line segment\n P2 = points[0]; // Second point of line segment\n P3 = points[1];\n appendSegmentsArray(P0, P1, P2, P3); \n}", "levels(path) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var {\n reverse = false\n } = options;\n var list = [];\n\n for (var i = 0; i <= path.length; i++) {\n list.push(path.slice(0, i));\n }\n\n if (reverse) {\n list.reverse();\n }\n\n return list;\n }", "levels(path) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var {\n reverse = false\n } = options;\n var list = [];\n\n for (var i = 0; i <= path.length; i++) {\n list.push(path.slice(0, i));\n }\n\n if (reverse) {\n list.reverse();\n }\n\n return list;\n }", "function n(a){var b,c,d,e=M(),f=[];\n// group segments by row\nfor(b=0;b<a.length;b++)c=a[b],d=c.row,c.element&&(// was rendered?\nf[d]?\n// already other segments. append to array\nf[d].push(c):\n// first segment in row. create new array\nf[d]=[c]);\n// sort each row\nfor(d=0;d<e;d++)f[d]=o(f[d]||[]);return f}", "function buildSegmentsForEvent(event) {\n\t\tvar segments = rangeToSegments(event.start, getEventEnd(event));\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tsegments[i].event = event;\n\t\t}\n\t\treturn segments;\n\t}", "function buildSegmentsForEvent(event) {\n\t\tvar segments = rangeToSegments(event.start, getEventEnd(event));\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tsegments[i].event = event;\n\t\t}\n\t\treturn segments;\n\t}", "function build_dive_segment(levels_segment_arr , levels_mix_segment_arr){\n\n var rate_asc = document.getElementById(\"opt_rate_asc\");\n var rate_asc_idx = rate_asc.options[rate_asc.selectedIndex].value;\n\n var rate_dsc = document.getElementById(\"opt_rate_dsc\");\n var rate_dsc_idx = rate_dsc.options[rate_dsc.selectedIndex].value;\n var output = [];\n\n if(max_lvl_depth(levels_segment_arr) < 7){\n //Not Deco Dive Segment\n\n if($( \"#tn_plan_ccr\" ).val()*1.0 == 2){\n //CCR dive and we need hide consumption\n element_id_hide(\"t_total_cons\");\n element_id_hide(\"7-header\");\n element_id_hide(\"7-content\");\n //console.log(\"true\");\n }\n\n tmp_arr = [];\n tmp_end_depth = levels_segment_arr[1];\n tmp_time = (levels_segment_arr[0+1]*1.0/rate_dsc_idx)*1.0;\n tmp_mx_arr =[];\n tmp_mx_arr.push(levels_mix_segment_arr[0],levels_mix_segment_arr[1]);\n tmp_gass_name = mix_to_txt_arr(tmp_mx_arr);\n\n //add first descent lvl\n tmp_arr.push(\n {\n endDepth: tmp_end_depth,\n startDepth: 0,\n time: tmp_time,\n gasName: tmp_gass_name\n }\n );\n //loop for all added levels\n a3 = 0;\n b3 = 0;\n for (i = 0; i < levels_segment_arr.length/3; i++) {\n //for every flat levels\n tmp_end_depth = levels_segment_arr[a3+1];\n tmp_start_depth = levels_segment_arr[a3+1];\n tmp_time = levels_segment_arr[a3+2];\n tmp_mx_arr =[];\n tmp_mx_arr.push(levels_mix_segment_arr[b3],levels_mix_segment_arr[b3+1]);\n tmp_gass_name = mix_to_txt_arr(tmp_mx_arr);\n\n tmp_arr.push(\n {\n endDepth: tmp_end_depth,\n startDepth: tmp_start_depth,\n time: tmp_time,\n gasName: tmp_gass_name\n }\n );\n //add lvl change.if it is not last change\n if(levels_segment_arr[a3+4] !== undefined){\n tmp_end_depth = levels_segment_arr[a3+4]*1.0;\n tmp_start_depth = levels_segment_arr[a3+1]*1.0;\n\n //compute travel time from one to next lvl\n tt_time = Math.abs(tmp_start_depth - tmp_end_depth);\n if(tmp_start_depth - tmp_end_depth < 0){\n tmp_time = (tt_time*1.0/rate_dsc_idx);\n }\n else\n {\n tmp_time = (tt_time*1.0/rate_asc_idx);\n }\n //return char mix name\n tmp_mx_arr =[];\n tmp_mx_arr.push(levels_mix_segment_arr[b3],levels_mix_segment_arr[b3+1]);\n tmp_gass_name = mix_to_txt_arr(tmp_mx_arr);\n\n tmp_arr.push(\n {\n endDepth: tmp_end_depth,\n startDepth: tmp_start_depth,\n time: tmp_time,\n gasName: tmp_gass_name.toString()\n }\n );\n }\n\n b3 = b3 + 2;\n a3 = a3 + 3;\n }\n\n //add last lvl to surface\n tmp_time = ((tmp_arr[tmp_arr.length-1].endDepth)*1.0/rate_asc_idx)*1.0;\n tmp_arr.push(\n {\n endDepth: 0,\n startDepth: tmp_arr[tmp_arr.length-1].endDepth,\n time: tmp_time,\n gasName: tmp_arr[tmp_arr.length-1].gasName\n }\n );\n output = tmp_arr;\n }\n else\n\n //Deco Dive_Segment! \n {\n if($( \"#tn_plan_ccr\" ).val()*1.0 == 1){\n\n //OC dive and we need hide consumption\n element_id_show(\"t_total_cons\");\n element_id_show(\"7-header\");\n element_id_show(\"7-content\");\n\n }\n\n //reset compartment info array every graph rebuild\n comp_tiss_arr =[];\n\n //reset previos plan\n var plan = [];\n var mdl = document.getElementById(\"tn_mdl\");\n var mdl_idx = mdl.options[mdl.selectedIndex].value;\n var buhlmann = dive.deco.buhlmann();\n vpm = dive.deco.vpm();\n //Select algorithm\n if(mdl_idx == 1){\n plan = new buhlmann.plan(buhlmann.ZH16ATissues);\n }\n if(mdl_idx == 2){\n plan = new buhlmann.plan(buhlmann.ZH16BTissues);\n }\n if(mdl_idx == 3){\n plan = new buhlmann.plan(buhlmann.ZH16CTissues);\n }\n if(mdl_idx == 4){\n plan = new vpm.plan(1,true);\n }\n\n //Add Bottom/travel gases\n aaa = 0;\n for(c = 0 ; c < levels_mix_segment_arr.length/2 ; c++){\n ff = [levels_mix_segment_arr[aaa] , levels_mix_segment_arr[aaa+1]];\n\n plan.addBottomGas(mix_to_txt_arr(ff), levels_mix_segment_arr[aaa]*0.01, levels_mix_segment_arr[aaa+1]*0.01);\n\n //add bottom gass as deco gass !!!_need_deep_test_!!!\n //plan.addDecoGas(mix_to_txt_arr(ff), levels_mix_segment_arr[aaa]*0.01, levels_mix_segment_arr[aaa+1]*0.01);\n\n aaa = aaa + 2;\n }\n\n //Add deco gases\n var mix_deco = document.getElementById(\"opt_deco\");\n var mix_deco_idx = mix_deco.options[mix_deco.selectedIndex].value;\n aaa = 0;\n\n mix_mod_arr = [];\n var counter = 0;\n\n for(c = 0 ; c < mix_deco_idx ; c++){\n tmp3 = [deco_mix_arr[aaa],deco_mix_arr[aaa+1]];\n\n //This CCR Bailout Dive or OC Dive and deco gases is enable\n if(opt_blt_dln == 1){\n if(deco_mix_depth_arr[counter] != 0){\n //Manual MOD set for current deco mix\n var curMixMOD = deco_mix_depth_arr[counter];\n }\n else{\n ////Auto MOD set for current deco mix\n var curMixMOD = GetDecoMODinMeters(deco_mix_arr[aaa], deco_mix_arr[aaa+1]);\n }\n\n //Do a curMixMOD multiple of three\n curMixMOD = (3 * ((curMixMOD / 3).toFixed(0)));\n if($( \"#opt_lst_stop\" ).val() == 6){\n //console.log(curMixMOD);\n //6 meters last stop. Check current mix MOD and if less that 6 meters does`t add to the deco gas list\n if(curMixMOD >= 6){\n plan.addDecoGas(mix_to_txt_arr(tmp3), deco_mix_arr[aaa]*0.01, deco_mix_arr[aaa+1]*0.01);\n mix_mod_arr.push(\n {\n mix : mix_to_txt_arr(tmp3),\n mod : deco_mix_depth_arr[counter]\n });\n }\n }\n else\n {\n //3 meters last stop. Do nothing. Simply add deco gases to the list\n plan.addDecoGas(mix_to_txt_arr(tmp3), deco_mix_arr[aaa]*0.01, deco_mix_arr[aaa+1]*0.01);\n mix_mod_arr.push(\n {\n mix : mix_to_txt_arr(tmp3),\n mod : deco_mix_depth_arr[counter]\n });\n }\n }\n else{\n //it is CCR Diluent Dive and no Bailout(Deco gases add) dive\n }\n //as Bottom/Travel gases, for lvl compatibility\n plan.addBottomGas(mix_to_txt_arr(tmp3), deco_mix_arr[aaa]*0.01, deco_mix_arr[aaa+1]*0.01);\n counter = counter + 1;\n aaa = aaa + 2;\n\n }\n\n //Add lvl changes\n //Get current ascending deco speed\n aaa = 0;\n fff = 0;\n for(c = 0 ; c < levels_mix_segment_arr.length/2 ; c++){\n ff = [levels_mix_segment_arr[aaa] , levels_mix_segment_arr[aaa+1]];\n if(c === 0){\n tmp_time = levels_segment_arr[fff+1]*1.0/rate_dsc_idx;\n plan.addDepthChange(0, levels_segment_arr[fff+1]*1.0, mix_to_txt_arr(ff), tmp_time*1.0);\n plan.addDepthChange(levels_segment_arr[fff+1]*1.0, levels_segment_arr[fff+1]*1.0, mix_to_txt_arr(ff), levels_segment_arr[fff+2]*1.0);\n }\n else\n {\n if(((levels_segment_arr[fff+1-3]*1.0) - (levels_segment_arr[fff+1]*1.0))>= 0){\n tmp_time = (Math.abs((levels_segment_arr[fff+1-3]*1.0) - (levels_segment_arr[fff+1]*1.0)))/rate_asc_idx;\n }\n else\n {\n tmp_time = (Math.abs((levels_segment_arr[fff+1-3]*1.0) - (levels_segment_arr[fff+1]*1.0)))/rate_dsc_idx;\n }\n //fix lib crush because time can`t == 0;\n if(tmp_time === 0){\n tmp_time = 0.001;\n }\n plan.addDepthChange(levels_segment_arr[fff+1-3]*1.0, levels_segment_arr[fff+1]*1.0, mix_to_txt_arr(ff), tmp_time);\n plan.addDepthChange(levels_segment_arr[fff+1]*1.0, levels_segment_arr[fff+1]*1.0, mix_to_txt_arr(ff), levels_segment_arr[fff+2]*1.0);\n }\n aaa = aaa + 2;\n fff = fff + 3;\n }\n\n var ppo2_deco = document.getElementById(\"opt_ppo2_deco\");\n var ppo2_deco_idx = ppo2_deco.options[ppo2_deco.selectedIndex].value;\n\n //fix computation GF error with zero\n if(gf_arr[0] === 0){\n gf_arr[0] = 1;\n }\n //compute END for specific lib param\n var ppn2_max_deco = document.getElementById(\"opt_ppn2_max_deco\");\n var ppn2_max_deco_idx = ppn2_max_deco.options[ppn2_max_deco.selectedIndex].value;\n\n //OLD!\n //var mxis_end = (((parseFloat(ppn2_max_deco_idx))/0.79)-1)*10;\n\n //NEW!\n var WaterDensTempCompensation = (1 / ((water_density_temperature_correction() * water_density() * 0.001 * (1))));\n var mxis_end = (((parseFloat(ppn2_max_deco_idx))/0.79)-1)*10 * height_to_bar() * WaterDensTempCompensation;\n //console.log(mxis_end, WaterDensTempCompensation, height_to_bar());\n\n output = plan.calculateDecompression(false, gf_arr[0]*0.01, gf_arr[1]*0.01, ppo2_deco_idx*1.0, mxis_end);\n\n }\n //fix ascent error on very short dives\n for(c = 0 ; c < output.length ; c++){\n if(output[c].endDepth < 0){\n output[c].endDepth = 3;\n output.push(\n {\n endDepth: 0,\n startDepth: output[c].endDepth,\n time: output[c].time,\n gasName: output[c].gasName\n }\n );\n }\n }\n\n return output;\n }", "function computeForwardSlotSegs(levels){var i;var level;var j;var seg;var k;for(i=0;i<levels.length;i++){level=levels[i];for(j=0;j<level.length;j++){seg=level[j];seg.forwardSegs=[];for(k=i+1;k<levels.length;k++){computeSlotSegCollisions(seg,levels[k],seg.forwardSegs);}}}}// Figure out which path forward (via seg.forwardSegs) results in the longest path until", "function createLabels(startIdx, nParts, nPartLen, interval, intervalStrings, segmentInterval){\n var lstring = new Array();\n var nextDate;\n \n //lets now try to compute the overall label for all these parts first before the for loop gets incremented\n // and throws it off by one. \n var datelabel = getDateLabel(segmentInterval);\n \n lstring.push('<table class=\"partstable\"><tbody><tr>');\n //add the total part labels to each segment\n if (interval != \"hours\")\n nextDate = parseInt(getNextDate(currentDate, interval,0));\n else\n nextDate = 0;\n for (var j = startIdx; j < nParts; j++){\n if (intervalStrings){\n lstring.push('<td id=\"part-' + interval + j + '\" class=\"parts commontreb\" style=\"width:' + nPartLen + 'px\">' + intervalStrings[nextDate] + '</td>');\n }\n else{\n lstring.push('<td id=\"part-' + interval + j + '\" class=\"parts commontreb\" style=\"width:' + nPartLen + 'px\">' + nextDate + '</td>'); \n }\n if (interval != \"hours\"){\n nextDate = parseInt(getNextDate(currentDate, interval,1));\n }\n else\n nextDate = j + 1;\n \n if ((interval == \"weeks\") && (j < (nParts - 1))){\n datelabel += getDateLabel(segmentInterval);\n }\n } //for ends\n lstring.push('</tr>');\n \n //now add the overall label for these parts\n if (segmentInterval == \"weeks\"){\n lstring.push('<tr>');\n lstring.push(datelabel);\n lstring.push('</tr>');\n }\n else{\n lstring.push('<tr><td class=\"tdates commontreb\" colspan = \"' + nParts + 'style=\"width:' + nPartLen * nParts + 'px\">' + datelabel + '</td></tr>');\n }\n lstring.push('</tbody></table>');\n \n //add all the segments to the content holder\n var labelstring = lstring.join('');\n \n return labelstring;\n }", "function nodesAtLevels() {\n let x = createVector(WIDTH / 2, HEIGHT);\n let y = createVector(WIDTH / 2, HEIGHT - LENGTH);\n let root = new Branch(x, y, BRANCH_ANGLE, LENGTH_FACTOR);\n\n let byLevel = [];\n byLevel.push([root]);\n\n for (let i = 1; i < LEVELS; i++) {\n let prev = byLevel[i - 1];\n let curr = [];\n prev.forEach(b => {\n let t = b.branch();\n curr = curr.concat(t);\n })\n byLevel.push(curr);\n }\n return byLevel;\n}", "function make_sector_list(sectors, dir_start, fat_addrs, ssz) {\n\tvar sl = sectors.length, sector_list = new Array(sl);\n\tvar chkd = new Array(sl), buf, buf_chain;\n\tvar modulus = ssz - 1, i, j, k, jj;\n\tfor(i=0; i < sl; ++i) {\n\t\tbuf = [];\n\t\tk = (i + dir_start); if(k >= sl) k-=sl;\n\t\tif(chkd[k] === true) continue;\n\t\tbuf_chain = [];\n\t\tfor(j=k; j>=0;) {\n\t\t\tchkd[j] = true;\n\t\t\tbuf[buf.length] = j;\n\t\t\tbuf_chain.push(sectors[j]);\n\t\t\tvar addr = fat_addrs[Math.floor(j*4/ssz)];\n\t\t\tjj = ((j*4) & modulus);\n\t\t\tif(ssz < 4 + jj) throw \"FAT boundary crossed: \" + j + \" 4 \"+ssz;\n\t\t\tj = __readInt32LE(sectors[addr], jj);\n\t\t}\n\t\tsector_list[k] = {nodes: buf, data:__toBuffer([buf_chain])};\n\t}\n\treturn sector_list;\n}", "function make_sector_list(sectors, dir_start, fat_addrs, ssz) {\n\tvar sl = sectors.length, sector_list = new Array(sl);\n\tvar chkd = new Array(sl), buf, buf_chain;\n\tvar modulus = ssz - 1, i, j, k, jj;\n\tfor(i=0; i < sl; ++i) {\n\t\tbuf = [];\n\t\tk = (i + dir_start); if(k >= sl) k-=sl;\n\t\tif(chkd[k] === true) continue;\n\t\tbuf_chain = [];\n\t\tfor(j=k; j>=0;) {\n\t\t\tchkd[j] = true;\n\t\t\tbuf[buf.length] = j;\n\t\t\tbuf_chain.push(sectors[j]);\n\t\t\tvar addr = fat_addrs[Math.floor(j*4/ssz)];\n\t\t\tjj = ((j*4) & modulus);\n\t\t\tif(ssz < 4 + jj) throw \"FAT boundary crossed: \" + j + \" 4 \"+ssz;\n\t\t\tj = __readInt32LE(sectors[addr], jj);\n\t\t}\n\t\tsector_list[k] = {nodes: buf, data:__toBuffer([buf_chain])};\n\t}\n\treturn sector_list;\n}", "function make_sector_list(sectors, dir_start, fat_addrs, ssz) {\n\tvar sl = sectors.length, sector_list = new Array(sl);\n\tvar chkd = new Array(sl), buf, buf_chain;\n\tvar modulus = ssz - 1, i, j, k, jj;\n\tfor(i=0; i < sl; ++i) {\n\t\tbuf = [];\n\t\tk = (i + dir_start); if(k >= sl) k-=sl;\n\t\tif(chkd[k] === true) continue;\n\t\tbuf_chain = [];\n\t\tfor(j=k; j>=0;) {\n\t\t\tchkd[j] = true;\n\t\t\tbuf[buf.length] = j;\n\t\t\tbuf_chain.push(sectors[j]);\n\t\t\tvar addr = fat_addrs[Math.floor(j*4/ssz)];\n\t\t\tjj = ((j*4) & modulus);\n\t\t\tif(ssz < 4 + jj) throw \"FAT boundary crossed: \" + j + \" 4 \"+ssz;\n\t\t\tj = __readInt32LE(sectors[addr], jj);\n\t\t}\n\t\tsector_list[k] = {nodes: buf, data:__toBuffer([buf_chain])};\n\t}\n\treturn sector_list;\n}", "function make_sector_list(sectors, dir_start, fat_addrs, ssz) {\n\tvar sl = sectors.length, sector_list = new Array(sl);\n\tvar chkd = new Array(sl), buf, buf_chain;\n\tvar modulus = ssz - 1, i, j, k, jj;\n\tfor(i=0; i < sl; ++i) {\n\t\tbuf = [];\n\t\tk = (i + dir_start); if(k >= sl) k-=sl;\n\t\tif(chkd[k] === true) continue;\n\t\tbuf_chain = [];\n\t\tfor(j=k; j>=0;) {\n\t\t\tchkd[j] = true;\n\t\t\tbuf[buf.length] = j;\n\t\t\tbuf_chain.push(sectors[j]);\n\t\t\tvar addr = fat_addrs[Math.floor(j*4/ssz)];\n\t\t\tjj = ((j*4) & modulus);\n\t\t\tif(ssz < 4 + jj) throw \"FAT boundary crossed: \" + j + \" 4 \"+ssz;\n\t\t\tj = __readInt32LE(sectors[addr], jj);\n\t\t}\n\t\tsector_list[k] = {nodes: buf, data:__toBuffer([buf_chain])};\n\t}\n\treturn sector_list;\n}", "function createRegions() {\n regions = [];\n\n var fullWidth = absolute(timelineController.timeExtents[1]);\n var chunkWidth = 500;\n var chunks = Math.ceil(fullWidth / chunkWidth);\n var offset = 0;\n\n // avoid creating lots of chunks - cap and only generate around the\n // current view\n // if we scroll out of bounds of the chunks we *do* have, we can throw\n // away our regions + purge regions in memory\n if (chunks > 30) {\n var startX = absolute(timelineController.viewExtents[0]);\n var endX = absolute(timelineController.viewExtents[1]);\n var midX = startX + (endX - startX) / 2;\n\n chunks = 50;\n offset = Math.max(0, midX - (chunkWidth * 15));\n }\n\n for (var i = 0; i < chunks; i++) {\n // for each desired chunk, find the bounds and managed data points\n // then, calculate positions for each data point\n var w = Math.min(fullWidth - offset, chunkWidth);\n var min = absolute.invert(offset);\n var max = absolute.invert(offset + w);\n var data = timelineController.dstatInBounds(min, max);\n\n regions.push({\n x: offset, width: w, min: min, max: max,\n data: data,\n c: null,\n dirty: true,\n index: regions.length\n });\n\n offset += w;\n }\n }", "function buildSeasonsArray()\n{\n var startDateString;\n var finishDateString;\n\n SEASONS_ARRAY = new Array(N_SEASONS);\n for (var i = 0; i < N_SEASONS; ++i)\n {\n SEASONS_ARRAY[i] = new Array(3); // Contents: 'seasonName',\n // 'startDateArray', 'finishDateArray'.\n\n startDateString = getNextWordFromCodedData();\n SEASONS_ARRAY[i]['startDateArray' ] = convMySQLdateStringToIntArray(startDateString);\n\n eatWhiteSpaceFromCodedData();\n\n finishDateString = getNextWordFromCodedData();\n SEASONS_ARRAY[i]['finishDateArray'] = convMySQLdateStringToIntArray(finishDateString);\n\n eatWhiteSpaceFromCodedData();\n\n SEASONS_ARRAY[i]['seasonName' ] = String(getRemainingLineFromCodedData());\n }\n}", "function descendent_sections(max_slice) { // → [[section_t]]\n const root = [[0,0],[0,0],[0,0],[0,0]]\n if (!(0 <= max_slice && max_slice <= 18))\n throw Error('invalid max_slice ' + max_slice)\n\n // Recursively compute all sections that root depends on\n const slices = []\n for (let s = 0; s <= max_slice; s++)\n slices.push([])\n const seen = new Set()\n const stack = [root]\n while (stack.length) {\n const s = standardize_section(stack.pop())[0]\n if (!seen.has('' + s)) {\n seen.add('' + s)\n const n = section_sum(s)\n slices[n].push(s)\n if (n < max_slice) {\n for (let q = 0; q < 4; q++) {\n if (s[q][0] + s[q][1] < 9) {\n const child = s.map(c => c.slice())\n child[q][n & 1]++\n stack.push(child)\n }\n }\n }\n }\n }\n\n // Sort each slice\n for (const slice of slices)\n slice.sort((a,b) => section_sig(a) - section_sig(b))\n return slices\n}", "get levels() {\n if (!this.active_building) {\n return [];\n }\n return this._org.levelsForBuilding(this.active_building) || [];\n }", "function calculateHorizontals(segments) {\n\t\tvar isRTL = opt('isRTL');\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// Determine functions used for calulating the elements left/right coordinates,\n\t\t\t// depending on whether the view is RTL or not.\n\t\t\t// NOTE:\n\t\t\t// colLeft/colRight returns the coordinate butting up the edge of the cell.\n\t\t\t// colContentLeft/colContentRight is indented a little bit from the edge.\n\t\t\tvar leftFunc = (isRTL ? segment.isEnd : segment.isStart) ? colContentLeft : colLeft;\n\t\t\tvar rightFunc = (isRTL ? segment.isStart : segment.isEnd) ? colContentRight : colRight;\n\n\t\t\tvar left = leftFunc(segment.leftCol);\n\t\t\tvar right = rightFunc(segment.rightCol);\n\t\t\tsegment.left = left;\n\t\t\tsegment.outerWidth = right - left;\n\t\t}\n\t}", "function calculateHorizontals(segments) {\n\t\tvar isRTL = opt('isRTL');\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// Determine functions used for calulating the elements left/right coordinates,\n\t\t\t// depending on whether the view is RTL or not.\n\t\t\t// NOTE:\n\t\t\t// colLeft/colRight returns the coordinate butting up the edge of the cell.\n\t\t\t// colContentLeft/colContentRight is indented a little bit from the edge.\n\t\t\tvar leftFunc = (isRTL ? segment.isEnd : segment.isStart) ? colContentLeft : colLeft;\n\t\t\tvar rightFunc = (isRTL ? segment.isStart : segment.isEnd) ? colContentRight : colRight;\n\n\t\t\tvar left = leftFunc(segment.leftCol);\n\t\t\tvar right = rightFunc(segment.rightCol);\n\t\t\tsegment.left = left;\n\t\t\tsegment.outerWidth = right - left;\n\t\t}\n\t}", "function calculateHorizontals(segments) {\n\t\tvar isRTL = opt('isRTL');\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// Determine functions used for calulating the elements left/right coordinates,\n\t\t\t// depending on whether the view is RTL or not.\n\t\t\t// NOTE:\n\t\t\t// colLeft/colRight returns the coordinate butting up the edge of the cell.\n\t\t\t// colContentLeft/colContentRight is indented a little bit from the edge.\n\t\t\tvar leftFunc = (isRTL ? segment.isEnd : segment.isStart) ? colContentLeft : colLeft;\n\t\t\tvar rightFunc = (isRTL ? segment.isStart : segment.isEnd) ? colContentRight : colRight;\n\n\t\t\tvar left = leftFunc(segment.leftCol);\n\t\t\tvar right = rightFunc(segment.rightCol);\n\t\t\tsegment.left = left;\n\t\t\tsegment.outerWidth = right - left;\n\t\t}\n\t}", "function calculateHorizontals(segments) {\n\t\tvar isRTL = opt('isRTL');\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// Determine functions used for calulating the elements left/right coordinates,\n\t\t\t// depending on whether the view is RTL or not.\n\t\t\t// NOTE:\n\t\t\t// colLeft/colRight returns the coordinate butting up the edge of the cell.\n\t\t\t// colContentLeft/colContentRight is indented a little bit from the edge.\n\t\t\tvar leftFunc = (isRTL ? segment.isEnd : segment.isStart) ? colContentLeft : colLeft;\n\t\t\tvar rightFunc = (isRTL ? segment.isStart : segment.isEnd) ? colContentRight : colRight;\n\n\t\t\tvar left = leftFunc(segment.leftCol);\n\t\t\tvar right = rightFunc(segment.rightCol);\n\t\t\tsegment.left = left;\n\t\t\tsegment.outerWidth = right - left;\n\t\t}\n\t}", "function calculateHorizontals(segments) {\n\t\tvar isRTL = opt('isRTL');\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// Determine functions used for calulating the elements left/right coordinates,\n\t\t\t// depending on whether the view is RTL or not.\n\t\t\t// NOTE:\n\t\t\t// colLeft/colRight returns the coordinate butting up the edge of the cell.\n\t\t\t// colContentLeft/colContentRight is indented a little bit from the edge.\n\t\t\tvar leftFunc = (isRTL ? segment.isEnd : segment.isStart) ? colContentLeft : colLeft;\n\t\t\tvar rightFunc = (isRTL ? segment.isStart : segment.isEnd) ? colContentRight : colRight;\n\n\t\t\tvar left = leftFunc(segment.leftCol);\n\t\t\tvar right = rightFunc(segment.rightCol);\n\t\t\tsegment.left = left;\n\t\t\tsegment.outerWidth = right - left;\n\t\t}\n\t}", "function make_sector_list(sectors, dir_start, fat_addrs, ssz) {\n\tvar sl = sectors.length, sector_list = ([]);\n\tvar chkd = [], buf = [], buf_chain = [];\n\tvar modulus = ssz - 1, i=0, j=0, k=0, jj=0;\n\tfor(i=0; i < sl; ++i) {\n\t\tbuf = ([]);\n\t\tk = (i + dir_start); if(k >= sl) k-=sl;\n\t\tif(chkd[k]) continue;\n\t\tbuf_chain = [];\n\t\tfor(j=k; j>=0;) {\n\t\t\tchkd[j] = true;\n\t\t\tbuf[buf.length] = j;\n\t\t\tbuf_chain.push(sectors[j]);\n\t\t\tvar addr = fat_addrs[Math.floor(j*4/ssz)];\n\t\t\tjj = ((j*4) & modulus);\n\t\t\tif(ssz < 4 + jj) throw new Error(\"FAT boundary crossed: \" + j + \" 4 \"+ssz);\n\t\t\tif(!sectors[addr]) break;\n\t\t\tj = __readInt32LE(sectors[addr], jj);\n\t\t}\n\t\tsector_list[k] = ({nodes: buf, data:__toBuffer([buf_chain])});\n\t}\n\treturn sector_list;\n}", "function make_sector_list(sectors, dir_start, fat_addrs, ssz) {\n\tvar sl = sectors.length, sector_list = ([]);\n\tvar chkd = [], buf = [], buf_chain = [];\n\tvar modulus = ssz - 1, i=0, j=0, k=0, jj=0;\n\tfor(i=0; i < sl; ++i) {\n\t\tbuf = ([]);\n\t\tk = (i + dir_start); if(k >= sl) k-=sl;\n\t\tif(chkd[k]) continue;\n\t\tbuf_chain = [];\n\t\tfor(j=k; j>=0;) {\n\t\t\tchkd[j] = true;\n\t\t\tbuf[buf.length] = j;\n\t\t\tbuf_chain.push(sectors[j]);\n\t\t\tvar addr = fat_addrs[Math.floor(j*4/ssz)];\n\t\t\tjj = ((j*4) & modulus);\n\t\t\tif(ssz < 4 + jj) throw new Error(\"FAT boundary crossed: \" + j + \" 4 \"+ssz);\n\t\t\tif(!sectors[addr]) break;\n\t\t\tj = __readInt32LE(sectors[addr], jj);\n\t\t}\n\t\tsector_list[k] = ({nodes: buf, data:__toBuffer([buf_chain])});\n\t}\n\treturn sector_list;\n}", "function make_sector_list(sectors, dir_start, fat_addrs, ssz) {\n\tvar sl = sectors.length, sector_list = ([]);\n\tvar chkd = [], buf = [], buf_chain = [];\n\tvar modulus = ssz - 1, i=0, j=0, k=0, jj=0;\n\tfor(i=0; i < sl; ++i) {\n\t\tbuf = ([]);\n\t\tk = (i + dir_start); if(k >= sl) k-=sl;\n\t\tif(chkd[k]) continue;\n\t\tbuf_chain = [];\n\t\tfor(j=k; j>=0;) {\n\t\t\tchkd[j] = true;\n\t\t\tbuf[buf.length] = j;\n\t\t\tbuf_chain.push(sectors[j]);\n\t\t\tvar addr = fat_addrs[Math.floor(j*4/ssz)];\n\t\t\tjj = ((j*4) & modulus);\n\t\t\tif(ssz < 4 + jj) throw new Error(\"FAT boundary crossed: \" + j + \" 4 \"+ssz);\n\t\t\tif(!sectors[addr]) break;\n\t\t\tj = __readInt32LE(sectors[addr], jj);\n\t\t}\n\t\tsector_list[k] = ({nodes: buf, data:__toBuffer([buf_chain])});\n\t}\n\treturn sector_list;\n}", "function make_sector_list(sectors, dir_start, fat_addrs, ssz) {\n\tvar sl = sectors.length, sector_list = ([]);\n\tvar chkd = [], buf = [], buf_chain = [];\n\tvar modulus = ssz - 1, i=0, j=0, k=0, jj=0;\n\tfor(i=0; i < sl; ++i) {\n\t\tbuf = ([]);\n\t\tk = (i + dir_start); if(k >= sl) k-=sl;\n\t\tif(chkd[k]) continue;\n\t\tbuf_chain = [];\n\t\tfor(j=k; j>=0;) {\n\t\t\tchkd[j] = true;\n\t\t\tbuf[buf.length] = j;\n\t\t\tbuf_chain.push(sectors[j]);\n\t\t\tvar addr = fat_addrs[Math.floor(j*4/ssz)];\n\t\t\tjj = ((j*4) & modulus);\n\t\t\tif(ssz < 4 + jj) throw new Error(\"FAT boundary crossed: \" + j + \" 4 \"+ssz);\n\t\t\tif(!sectors[addr]) break;\n\t\t\tj = __readInt32LE(sectors[addr], jj);\n\t\t}\n\t\tsector_list[k] = ({nodes: buf, data:__toBuffer([buf_chain])});\n\t}\n\treturn sector_list;\n}", "function make_sector_list(sectors, dir_start, fat_addrs, ssz) {\n\tvar sl = sectors.length, sector_list = ([]);\n\tvar chkd = [], buf = [], buf_chain = [];\n\tvar modulus = ssz - 1, i=0, j=0, k=0, jj=0;\n\tfor(i=0; i < sl; ++i) {\n\t\tbuf = ([]);\n\t\tk = (i + dir_start); if(k >= sl) k-=sl;\n\t\tif(chkd[k]) continue;\n\t\tbuf_chain = [];\n\t\tfor(j=k; j>=0;) {\n\t\t\tchkd[j] = true;\n\t\t\tbuf[buf.length] = j;\n\t\t\tbuf_chain.push(sectors[j]);\n\t\t\tvar addr = fat_addrs[Math.floor(j*4/ssz)];\n\t\t\tjj = ((j*4) & modulus);\n\t\t\tif(ssz < 4 + jj) throw new Error(\"FAT boundary crossed: \" + j + \" 4 \"+ssz);\n\t\t\tif(!sectors[addr]) break;\n\t\t\tj = __readInt32LE(sectors[addr], jj);\n\t\t}\n\t\tsector_list[k] = ({nodes: buf, data:__toBuffer([buf_chain])});\n\t}\n\treturn sector_list;\n}", "function make_sector_list(sectors, dir_start, fat_addrs, ssz) {\n\tvar sl = sectors.length, sector_list = ([]);\n\tvar chkd = [], buf = [], buf_chain = [];\n\tvar modulus = ssz - 1, i=0, j=0, k=0, jj=0;\n\tfor(i=0; i < sl; ++i) {\n\t\tbuf = ([]);\n\t\tk = (i + dir_start); if(k >= sl) k-=sl;\n\t\tif(chkd[k]) continue;\n\t\tbuf_chain = [];\n\t\tfor(j=k; j>=0;) {\n\t\t\tchkd[j] = true;\n\t\t\tbuf[buf.length] = j;\n\t\t\tbuf_chain.push(sectors[j]);\n\t\t\tvar addr = fat_addrs[Math.floor(j*4/ssz)];\n\t\t\tjj = ((j*4) & modulus);\n\t\t\tif(ssz < 4 + jj) throw new Error(\"FAT boundary crossed: \" + j + \" 4 \"+ssz);\n\t\t\tif(!sectors[addr]) break;\n\t\t\tj = __readInt32LE(sectors[addr], jj);\n\t\t}\n\t\tsector_list[k] = ({nodes: buf, data:__toBuffer([buf_chain])});\n\t}\n\treturn sector_list;\n}", "function print_segment_at_depth(s, segments, file) {\n var output = '',\n indent_with = ' ',\n suffix = '',\n start_indenting_at = 2,\n spaces_added = 0,\n ext = _.last(file.name.split('.')),\n is_folder = false;\n\n // Is this a folder or a file?\n is_folder = segments[s].indexOf('.') > -1 ? false : true;\n\n if (folder_history[s] !== segments[s]) {\n // Set a / suffix on folders\n suffix = is_folder ? '/' : '';\n\n // Set the folder at this depth to be the current segment\n folder_history[s] = segments[s];\n\n // Is this the base folder?\n if (s == 0) {\n output += segments[s] + suffix + '\\n';\n } else {\n // If this is a folder, add newline before it\n if (is_folder) {\n output += '|' + '\\n';\n }\n\n // If we are indenting, add a pipe on the left edge\n if (s >= start_indenting_at) {\n output += '|';\n }\n\n // Add the indentation appropriate to the level\n for (var i = start_indenting_at; i <= s; i++) {\n output += indent_with;\n spaces_added += 2;\n }\n\n // Append comments?\n if (is_folder == false) {\n // Pass in existing indentation\n suffix += parse_comments(file, ext, spaces_added);\n }\n\n // Finally append the file/folder name to the output\n output += '|- ' + segments[s] + suffix + '\\n';\n }\n }\n\n return output;\n}", "function make_sector_list(sectors, dir_start, fat_addrs, ssz) {\n\tvar sl = sectors.length, sector_list = ([]);\n\tvar chkd = [], buf = [], buf_chain = [];\n\tvar modulus = ssz - 1, i=0, j=0, k=0, jj=0;\n\tfor(i=0; i < sl; ++i) {\n\t\tbuf = ([]);\n\t\tk = (i + dir_start); if(k >= sl) k-=sl;\n\t\tif(chkd[k]) continue;\n\t\tbuf_chain = [];\n\t\tvar seen = [];\n\t\tfor(j=k; j>=0;) {\n\t\t\tseen[j] = true;\n\t\t\tchkd[j] = true;\n\t\t\tbuf[buf.length] = j;\n\t\t\tbuf_chain.push(sectors[j]);\n\t\t\tvar addr = fat_addrs[Math.floor(j*4/ssz)];\n\t\t\tjj = ((j*4) & modulus);\n\t\t\tif(ssz < 4 + jj) throw new Error(\"FAT boundary crossed: \" + j + \" 4 \"+ssz);\n\t\t\tif(!sectors[addr]) break;\n\t\t\tj = __readInt32LE(sectors[addr], jj);\n\t\t\tif(seen[j]) break;\n\t\t}\n\t\tsector_list[k] = ({nodes: buf, data:__toBuffer([buf_chain])});\n\t}\n\treturn sector_list;\n}", "function make_sector_list(sectors, dir_start, fat_addrs, ssz) {\n\tvar sl = sectors.length, sector_list = ([]);\n\tvar chkd = [], buf = [], buf_chain = [];\n\tvar modulus = ssz - 1, i=0, j=0, k=0, jj=0;\n\tfor(i=0; i < sl; ++i) {\n\t\tbuf = ([]);\n\t\tk = (i + dir_start); if(k >= sl) k-=sl;\n\t\tif(chkd[k]) continue;\n\t\tbuf_chain = [];\n\t\tvar seen = [];\n\t\tfor(j=k; j>=0;) {\n\t\t\tseen[j] = true;\n\t\t\tchkd[j] = true;\n\t\t\tbuf[buf.length] = j;\n\t\t\tbuf_chain.push(sectors[j]);\n\t\t\tvar addr = fat_addrs[Math.floor(j*4/ssz)];\n\t\t\tjj = ((j*4) & modulus);\n\t\t\tif(ssz < 4 + jj) throw new Error(\"FAT boundary crossed: \" + j + \" 4 \"+ssz);\n\t\t\tif(!sectors[addr]) break;\n\t\t\tj = __readInt32LE(sectors[addr], jj);\n\t\t\tif(seen[j]) break;\n\t\t}\n\t\tsector_list[k] = ({nodes: buf, data:__toBuffer([buf_chain])});\n\t}\n\treturn sector_list;\n}", "function make_sector_list(sectors, dir_start, fat_addrs, ssz) {\n\tvar sl = sectors.length, sector_list = ([]);\n\tvar chkd = [], buf = [], buf_chain = [];\n\tvar modulus = ssz - 1, i=0, j=0, k=0, jj=0;\n\tfor(i=0; i < sl; ++i) {\n\t\tbuf = ([]);\n\t\tk = (i + dir_start); if(k >= sl) k-=sl;\n\t\tif(chkd[k]) continue;\n\t\tbuf_chain = [];\n\t\tvar seen = [];\n\t\tfor(j=k; j>=0;) {\n\t\t\tseen[j] = true;\n\t\t\tchkd[j] = true;\n\t\t\tbuf[buf.length] = j;\n\t\t\tbuf_chain.push(sectors[j]);\n\t\t\tvar addr = fat_addrs[Math.floor(j*4/ssz)];\n\t\t\tjj = ((j*4) & modulus);\n\t\t\tif(ssz < 4 + jj) throw new Error(\"FAT boundary crossed: \" + j + \" 4 \"+ssz);\n\t\t\tif(!sectors[addr]) break;\n\t\t\tj = __readInt32LE(sectors[addr], jj);\n\t\t\tif(seen[j]) break;\n\t\t}\n\t\tsector_list[k] = ({nodes: buf, data:__toBuffer([buf_chain])});\n\t}\n\treturn sector_list;\n}", "function make_sector_list(sectors, dir_start, fat_addrs, ssz) {\n\tvar sl = sectors.length, sector_list = ([]);\n\tvar chkd = [], buf = [], buf_chain = [];\n\tvar modulus = ssz - 1, i=0, j=0, k=0, jj=0;\n\tfor(i=0; i < sl; ++i) {\n\t\tbuf = ([]);\n\t\tk = (i + dir_start); if(k >= sl) k-=sl;\n\t\tif(chkd[k]) continue;\n\t\tbuf_chain = [];\n\t\tvar seen = [];\n\t\tfor(j=k; j>=0;) {\n\t\t\tseen[j] = true;\n\t\t\tchkd[j] = true;\n\t\t\tbuf[buf.length] = j;\n\t\t\tbuf_chain.push(sectors[j]);\n\t\t\tvar addr = fat_addrs[Math.floor(j*4/ssz)];\n\t\t\tjj = ((j*4) & modulus);\n\t\t\tif(ssz < 4 + jj) throw new Error(\"FAT boundary crossed: \" + j + \" 4 \"+ssz);\n\t\t\tif(!sectors[addr]) break;\n\t\t\tj = __readInt32LE(sectors[addr], jj);\n\t\t\tif(seen[j]) break;\n\t\t}\n\t\tsector_list[k] = ({nodes: buf, data:__toBuffer([buf_chain])});\n\t}\n\treturn sector_list;\n}", "function split(array, segments) {\n segments = segments || 2;\n\n var output = [],\n segmentLength = Math.floor(array.length / segments),\n remainder = array.length % segments,\n start = 0,\n i = 0,\n n = array.length,\n len;\n\n while (start < n) {\n len = i++ < remainder ? segmentLength + 1 : segmentLength;\n output.push(array.slice(start, start + len));\n start += len;\n }\n\n return output;\n }", "function Segments(props) {\n var value = props.value,\n children = props.children,\n name = props.name,\n size = props.size,\n onChange = props.onChange,\n className = props.className;\n var classes = (0,_node_modules_classnames_index_js__WEBPACK_IMPORTED_MODULE_2__.default)('kt-segments', className);\n var contextValue = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {\n return {\n value: value,\n name: name,\n onChange: onChange,\n size: size\n };\n }, [value, name, onChange, size]);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_context_js__WEBPACK_IMPORTED_MODULE_3__.SegmentsContext.Provider, {\n value: contextValue\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"div\", {\n className: classes\n }, children));\n}", "function makePathSegmentDefinitions(points, isPathClosed) {\r\n const numberOfPathSegments = points.length - 1;\r\n const beforePathPoint = isPathClosed ? points[points.length - 2] : undefined;\r\n const afterPathPoint = isPathClosed ? points[1] : undefined;\r\n const pathSegmentDefinitions = d3.range(numberOfPathSegments).map(function (i) {\r\n const pathSegmentDefinition = [\r\n i > 0 ? points[i - 1] : beforePathPoint,\r\n points[i],\r\n points[i + 1],\r\n i + 2 < points.length ? points[i + 2] : afterPathPoint];\r\n pathSegmentDefinition.t = (points[i].t + points[i + 1].t) / 2;\r\n return pathSegmentDefinition;\r\n });\r\n return pathSegmentDefinitions;\r\n}", "function sortSegmentRow(segments) {\n\t\tvar sortedSegments = [];\n\n\t\t// build the subrow array\n\t\tvar subrows = buildSegmentSubrows(segments);\n\n\t\t// flatten it\n\t\tfor (var i=0; i<subrows.length; i++) {\n\t\t\tsortedSegments.push.apply(sortedSegments, subrows[i]); // append an array to an array\n\t\t}\n\n\t\treturn sortedSegments;\n\t}", "function sortSegmentRow(segments) {\n\t\tvar sortedSegments = [];\n\n\t\t// build the subrow array\n\t\tvar subrows = buildSegmentSubrows(segments);\n\n\t\t// flatten it\n\t\tfor (var i=0; i<subrows.length; i++) {\n\t\t\tsortedSegments.push.apply(sortedSegments, subrows[i]); // append an array to an array\n\t\t}\n\n\t\treturn sortedSegments;\n\t}", "function sortSegmentRow(segments) {\n\t\tvar sortedSegments = [];\n\n\t\t// build the subrow array\n\t\tvar subrows = buildSegmentSubrows(segments);\n\n\t\t// flatten it\n\t\tfor (var i=0; i<subrows.length; i++) {\n\t\t\tsortedSegments.push.apply(sortedSegments, subrows[i]); // append an array to an array\n\t\t}\n\n\t\treturn sortedSegments;\n\t}", "function sortSegmentRow(segments) {\n\t\tvar sortedSegments = [];\n\n\t\t// build the subrow array\n\t\tvar subrows = buildSegmentSubrows(segments);\n\n\t\t// flatten it\n\t\tfor (var i=0; i<subrows.length; i++) {\n\t\t\tsortedSegments.push.apply(sortedSegments, subrows[i]); // append an array to an array\n\t\t}\n\n\t\treturn sortedSegments;\n\t}" ]
[ "0.6706573", "0.65856165", "0.6553435", "0.6537174", "0.6524828", "0.6496966", "0.6496966", "0.6496966", "0.6496966", "0.6496966", "0.6496966", "0.6496966", "0.6496966", "0.64836776", "0.64836776", "0.64836776", "0.64836776", "0.64836776", "0.6477766", "0.6477766", "0.6477766", "0.6477766", "0.6477766", "0.6250185", "0.62290996", "0.62290996", "0.62290996", "0.62290996", "0.62290996", "0.5865604", "0.58015436", "0.58015436", "0.58015436", "0.58015436", "0.58015436", "0.5764015", "0.5764015", "0.5764015", "0.5764015", "0.5764015", "0.5589304", "0.5589304", "0.5589304", "0.54959476", "0.54959476", "0.54530853", "0.54317904", "0.5428531", "0.5428531", "0.5428531", "0.54061544", "0.5387876", "0.5381121", "0.5381121", "0.5381121", "0.5381121", "0.5381121", "0.5225656", "0.5162935", "0.5162935", "0.5114444", "0.5059042", "0.5059042", "0.5033047", "0.50035906", "0.49990463", "0.49188918", "0.48910016", "0.48910016", "0.48910016", "0.48910016", "0.48729452", "0.4852205", "0.48393798", "0.48163563", "0.4770146", "0.4770146", "0.4770146", "0.4770146", "0.4770146", "0.4767551", "0.4767551", "0.4767551", "0.4767551", "0.4767551", "0.4767551", "0.47673783", "0.47637764", "0.47637764", "0.47637764", "0.47637764", "0.47582826", "0.47511998", "0.4692337", "0.46731058", "0.46731058", "0.46731058", "0.46731058" ]
0.6527723
6
For every segment, figure out the other segments that are in subsequent levels that also occupy the same vertical space. Accumulate in seg.forwardSegs
function computeForwardSlotSegs(levels) { var i; var level; var j; var seg; var k; for (i = 0; i < levels.length; i++) { level = levels[i]; for (j = 0; j < level.length; j++) { seg = level[j]; seg.forwardSegs = []; for (k = i + 1; k < levels.length; k++) { computeSlotSegCollisions(seg, levels[k], seg.forwardSegs); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function computeSlotSegPressures(seg){var forwardSegs=seg.forwardSegs;var forwardPressure=0;var i;var forwardSeg;if(seg.forwardPressure===undefined){// not already computed\nfor(i=0;i<forwardSegs.length;i++){forwardSeg=forwardSegs[i];// figure out the child's maximum forward path\ncomputeSlotSegPressures(forwardSeg);// either use the existing maximum, or use the child's forward pressure\n// plus one (for the forwardSeg itself)\nforwardPressure=Math.max(forwardPressure,1+forwardSeg.forwardPressure);}seg.forwardPressure=forwardPressure;}}// Find all the segments in `otherSegs` that vertically collide with `seg`.", "function computeSlotSegPressures(seg) {\n var forwardSegs = seg.forwardSegs;\n var forwardPressure = 0;\n var i;\n var forwardSeg;\n\n if (seg.forwardPressure === undefined) {\n // not already computed\n for (i = 0; i < forwardSegs.length; i++) {\n forwardSeg = forwardSegs[i]; // figure out the child's maximum forward path\n\n computeSlotSegPressures(forwardSeg); // either use the existing maximum, or use the child's forward pressure\n // plus one (for the forwardSeg itself)\n\n forwardPressure = Math.max(forwardPressure, 1 + forwardSeg.forwardPressure);\n }\n\n seg.forwardPressure = forwardPressure;\n }\n } // Find all the segments in `otherSegs` that vertically collide with `seg`.", "function computeForwardSlotSegs(levels) {\n var i;\n var level;\n var j;\n var seg;\n var k;\n\n for (i = 0; i < levels.length; i++) {\n level = levels[i];\n\n for (j = 0; j < level.length; j++) {\n seg = level[j];\n seg.forwardSegs = [];\n\n for (k = i + 1; k < levels.length; k++) {\n computeSlotSegCollisions(seg, levels[k], seg.forwardSegs);\n }\n }\n }\n } // Figure out which path forward (via seg.forwardSegs) results in the longest path until", "function computeForwardSlotSegs(levels) {\n var i;\n var level;\n var j;\n var seg;\n var k;\n for (i = 0; i < levels.length; i += 1) {\n level = levels[i];\n for (j = 0; j < level.length; j += 1) {\n seg = level[j];\n seg.forwardSegs = [];\n for (k = i + 1; k < levels.length; k += 1) {\n computeSlotSegCollisions(seg, levels[k], seg.forwardSegs);\n }\n }\n }\n }", "function computeForwardSlotSegs(levels) {\n var i;\n var level;\n var j;\n var seg;\n var k;\n\n for (i = 0; i < levels.length; i++) {\n level = levels[i];\n\n for (j = 0; j < level.length; j++) {\n seg = level[j];\n seg.forwardSegs = [];\n\n for (k = i + 1; k < levels.length; k++) {\n computeSlotSegCollisions(seg, levels[k], seg.forwardSegs);\n }\n }\n }\n } // Figure out which path forward (via seg.forwardSegs) results in the longest path until", "function computeForwardSlotSegs(levels) {\n var i, level;\n var j, seg;\n var k;\n\n for (i = 0; i < levels.length; i++) {\n level = levels[i];\n\n for (j = 0; j < level.length; j++) {\n seg = level[j];\n\n seg.forwardSegs = [];\n for (k = i + 1; k < levels.length; k++) {\n computeSlotSegCollisions(seg, levels[k], seg.forwardSegs);\n }\n }\n }\n }", "function computeForwardSlotSegs(levels) {\n var i;\n var level;\n var j;\n var seg;\n var k;\n for (i = 0; i < levels.length; i++) {\n level = levels[i];\n for (j = 0; j < level.length; j++) {\n seg = level[j];\n seg.forwardSegs = [];\n for (k = i + 1; k < levels.length; k++) {\n computeSlotSegCollisions(seg, levels[k], seg.forwardSegs);\n }\n }\n }\n}", "function computeForwardSlotSegs(levels) {\n var i;\n var level;\n var j;\n var seg;\n var k;\n for (i = 0; i < levels.length; i++) {\n level = levels[i];\n for (j = 0; j < level.length; j++) {\n seg = level[j];\n seg.forwardSegs = [];\n for (k = i + 1; k < levels.length; k++) {\n computeSlotSegCollisions(seg, levels[k], seg.forwardSegs);\n }\n }\n }\n}", "function computeForwardSlotSegs(levels) {\n var i;\n var level;\n var j;\n var seg;\n var k;\n for (i = 0; i < levels.length; i++) {\n level = levels[i];\n for (j = 0; j < level.length; j++) {\n seg = level[j];\n seg.forwardSegs = [];\n for (k = i + 1; k < levels.length; k++) {\n computeSlotSegCollisions(seg, levels[k], seg.forwardSegs);\n }\n }\n }\n}", "function computeForwardSlotSegs(levels) {\n var i;\n var level;\n var j;\n var seg;\n var k;\n for (i = 0; i < levels.length; i++) {\n level = levels[i];\n for (j = 0; j < level.length; j++) {\n seg = level[j];\n seg.forwardSegs = [];\n for (k = i + 1; k < levels.length; k++) {\n computeSlotSegCollisions(seg, levels[k], seg.forwardSegs);\n }\n }\n }\n}", "function computeForwardSlotSegs(levels) {\n var i;\n var level;\n var j;\n var seg;\n var k;\n for (i = 0; i < levels.length; i++) {\n level = levels[i];\n for (j = 0; j < level.length; j++) {\n seg = level[j];\n seg.forwardSegs = [];\n for (k = i + 1; k < levels.length; k++) {\n computeSlotSegCollisions(seg, levels[k], seg.forwardSegs);\n }\n }\n }\n}", "function computeForwardSlotSegs(levels){var i;var level;var j;var seg;var k;for(i=0;i<levels.length;i++){level=levels[i];for(j=0;j<level.length;j++){seg=level[j];seg.forwardSegs=[];for(k=i+1;k<levels.length;k++){computeSlotSegCollisions(seg,levels[k],seg.forwardSegs);}}}}// Figure out which path forward (via seg.forwardSegs) results in the longest path until", "function computeForwardSlotSegs(levels) {\n\t\tvar i, level;\n\t\tvar j, seg;\n\t\tvar k;\n\n\t\tfor (i=0; i<levels.length; i++) {\n\t\t\tlevel = levels[i];\n\n\t\t\tfor (j=0; j<level.length; j++) {\n\t\t\t\tseg = level[j];\n\n\t\t\t\tseg.forwardSegs = [];\n\t\t\t\tfor (k=i+1; k<levels.length; k++) {\n\t\t\t\t\tcomputeSlotSegCollisions(seg, levels[k], seg.forwardSegs);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function computeForwardSlotSegs(levels) {\n\tvar i, level;\n\tvar j, seg;\n\tvar k;\n\n\tfor (i=0; i<levels.length; i++) {\n\t\tlevel = levels[i];\n\n\t\tfor (j=0; j<level.length; j++) {\n\t\t\tseg = level[j];\n\n\t\t\tseg.forwardSegs = [];\n\t\t\tfor (k=i+1; k<levels.length; k++) {\n\t\t\t\tcomputeSlotSegCollisions(seg, levels[k], seg.forwardSegs);\n\t\t\t}\n\t\t}\n\t}\n}", "function computeForwardSlotSegs(levels) {\n\tvar i, level;\n\tvar j, seg;\n\tvar k;\n\n\tfor (i=0; i<levels.length; i++) {\n\t\tlevel = levels[i];\n\n\t\tfor (j=0; j<level.length; j++) {\n\t\t\tseg = level[j];\n\n\t\t\tseg.forwardSegs = [];\n\t\t\tfor (k=i+1; k<levels.length; k++) {\n\t\t\t\tcomputeSlotSegCollisions(seg, levels[k], seg.forwardSegs);\n\t\t\t}\n\t\t}\n\t}\n}", "function computeForwardSlotSegs(levels) {\n\tvar i, level;\n\tvar j, seg;\n\tvar k;\n\n\tfor (i=0; i<levels.length; i++) {\n\t\tlevel = levels[i];\n\n\t\tfor (j=0; j<level.length; j++) {\n\t\t\tseg = level[j];\n\n\t\t\tseg.forwardSegs = [];\n\t\t\tfor (k=i+1; k<levels.length; k++) {\n\t\t\t\tcomputeSlotSegCollisions(seg, levels[k], seg.forwardSegs);\n\t\t\t}\n\t\t}\n\t}\n}", "function computeForwardSlotSegs(levels) {\n\tvar i, level;\n\tvar j, seg;\n\tvar k;\n\n\tfor (i=0; i<levels.length; i++) {\n\t\tlevel = levels[i];\n\n\t\tfor (j=0; j<level.length; j++) {\n\t\t\tseg = level[j];\n\n\t\t\tseg.forwardSegs = [];\n\t\t\tfor (k=i+1; k<levels.length; k++) {\n\t\t\t\tcomputeSlotSegCollisions(seg, levels[k], seg.forwardSegs);\n\t\t\t}\n\t\t}\n\t}\n}", "function computeForwardSlotSegs(levels) {\n\tvar i, level;\n\tvar j, seg;\n\tvar k;\n\n\tfor (i=0; i<levels.length; i++) {\n\t\tlevel = levels[i];\n\n\t\tfor (j=0; j<level.length; j++) {\n\t\t\tseg = level[j];\n\n\t\t\tseg.forwardSegs = [];\n\t\t\tfor (k=i+1; k<levels.length; k++) {\n\t\t\t\tcomputeSlotSegCollisions(seg, levels[k], seg.forwardSegs);\n\t\t\t}\n\t\t}\n\t}\n}", "function computeForwardSlotSegs(levels) {\n\tvar i, level;\n\tvar j, seg;\n\tvar k;\n\n\tfor (i=0; i<levels.length; i++) {\n\t\tlevel = levels[i];\n\n\t\tfor (j=0; j<level.length; j++) {\n\t\t\tseg = level[j];\n\n\t\t\tseg.forwardSegs = [];\n\t\t\tfor (k=i+1; k<levels.length; k++) {\n\t\t\t\tcomputeSlotSegCollisions(seg, levels[k], seg.forwardSegs);\n\t\t\t}\n\t\t}\n\t}\n}", "function computeForwardSlotSegs(levels) {\n\tvar i, level;\n\tvar j, seg;\n\tvar k;\n\n\tfor (i=0; i<levels.length; i++) {\n\t\tlevel = levels[i];\n\n\t\tfor (j=0; j<level.length; j++) {\n\t\t\tseg = level[j];\n\n\t\t\tseg.forwardSegs = [];\n\t\t\tfor (k=i+1; k<levels.length; k++) {\n\t\t\t\tcomputeSlotSegCollisions(seg, levels[k], seg.forwardSegs);\n\t\t\t}\n\t\t}\n\t}\n}", "function computeForwardSlotSegs(levels) {\n\tvar i, level;\n\tvar j, seg;\n\tvar k;\n\n\tfor (i=0; i<levels.length; i++) {\n\t\tlevel = levels[i];\n\n\t\tfor (j=0; j<level.length; j++) {\n\t\t\tseg = level[j];\n\n\t\t\tseg.forwardSegs = [];\n\t\t\tfor (k=i+1; k<levels.length; k++) {\n\t\t\t\tcomputeSlotSegCollisions(seg, levels[k], seg.forwardSegs);\n\t\t\t}\n\t\t}\n\t}\n}", "function computeForwardSlotSegs(levels) {\n\tvar i, level;\n\tvar j, seg;\n\tvar k;\n\n\tfor (i=0; i<levels.length; i++) {\n\t\tlevel = levels[i];\n\n\t\tfor (j=0; j<level.length; j++) {\n\t\t\tseg = level[j];\n\n\t\t\tseg.forwardSegs = [];\n\t\t\tfor (k=i+1; k<levels.length; k++) {\n\t\t\t\tcomputeSlotSegCollisions(seg, levels[k], seg.forwardSegs);\n\t\t\t}\n\t\t}\n\t}\n}", "function computeForwardSlotSegs(levels) {\n\tvar i, level;\n\tvar j, seg;\n\tvar k;\n\n\tfor (i=0; i<levels.length; i++) {\n\t\tlevel = levels[i];\n\n\t\tfor (j=0; j<level.length; j++) {\n\t\t\tseg = level[j];\n\n\t\t\tseg.forwardSegs = [];\n\t\t\tfor (k=i+1; k<levels.length; k++) {\n\t\t\t\tcomputeSlotSegCollisions(seg, levels[k], seg.forwardSegs);\n\t\t\t}\n\t\t}\n\t}\n}", "function computeForwardSlotSegs(levels) {\n\tvar i, level;\n\tvar j, seg;\n\tvar k;\n\n\tfor (i=0; i<levels.length; i++) {\n\t\tlevel = levels[i];\n\n\t\tfor (j=0; j<level.length; j++) {\n\t\t\tseg = level[j];\n\n\t\t\tseg.forwardSegs = [];\n\t\t\tfor (k=i+1; k<levels.length; k++) {\n\t\t\t\tcomputeSlotSegCollisions(seg, levels[k], seg.forwardSegs);\n\t\t\t}\n\t\t}\n\t}\n}", "function computeForwardSlotSegs(levels) {\n\tvar i, level;\n\tvar j, seg;\n\tvar k;\n\n\tfor (i=0; i<levels.length; i++) {\n\t\tlevel = levels[i];\n\n\t\tfor (j=0; j<level.length; j++) {\n\t\t\tseg = level[j];\n\n\t\t\tseg.forwardSegs = [];\n\t\t\tfor (k=i+1; k<levels.length; k++) {\n\t\t\t\tcomputeSlotSegCollisions(seg, levels[k], seg.forwardSegs);\n\t\t\t}\n\t\t}\n\t}\n}", "function computeForwardSlotSegs(levels) {\n\tvar i, level;\n\tvar j, seg;\n\tvar k;\n\n\tfor (i=0; i<levels.length; i++) {\n\t\tlevel = levels[i];\n\n\t\tfor (j=0; j<level.length; j++) {\n\t\t\tseg = level[j];\n\n\t\t\tseg.forwardSegs = [];\n\t\t\tfor (k=i+1; k<levels.length; k++) {\n\t\t\t\tcomputeSlotSegCollisions(seg, levels[k], seg.forwardSegs);\n\t\t\t}\n\t\t}\n\t}\n}", "function computeSegHorizontals(segs, eventOrderSpecs) {\n // IMPORTANT TO CLEAR OLD RESULTS :(\n for (var _i = 0, segs_2 = segs; _i < segs_2.length; _i++) {\n var seg = segs_2[_i];\n seg.level = null;\n seg.forwardCoord = null;\n seg.backwardCoord = null;\n seg.forwardPressure = null;\n }\n\n segs = Object(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__[\"sortEventSegs\"])(segs, eventOrderSpecs);\n var level0;\n var levels = buildSlotSegLevels(segs);\n computeForwardSlotSegs(levels);\n\n if (level0 = levels[0]) {\n for (var _a = 0, level0_1 = level0; _a < level0_1.length; _a++) {\n var seg = level0_1[_a];\n computeSlotSegPressures(seg);\n }\n\n for (var _b = 0, level0_2 = level0; _b < level0_2.length; _b++) {\n var seg = level0_2[_b];\n computeSegForwardBack(seg, 0, 0, eventOrderSpecs);\n }\n }\n\n return segs;\n } // Builds an array of segments \"levels\". The first level will be the leftmost tier of segments if the calendar is", "function computeSlotSegPressures(seg) {\n var forwardSegs = seg.forwardSegs;\n var forwardPressure = 0;\n var i;\n var forwardSeg;\n\n if (seg.forwardPressure == null) {\n // not already computed\n for (i = 0; i < forwardSegs.length; i++) {\n forwardSeg = forwardSegs[i]; // figure out the child's maximum forward path\n\n computeSlotSegPressures(forwardSeg); // either use the existing maximum, or use the child's forward pressure\n // plus one (for the forwardSeg itself)\n\n forwardPressure = Math.max(forwardPressure, 1 + forwardSeg.forwardPressure);\n }\n\n seg.forwardPressure = forwardPressure;\n }\n } // Calculate seg.forwardCoord and seg.backwardCoord for the segment, where both values range", "function buildSlotSegLevels(segs) {\n var levels = [];\n var i;\n var seg;\n var j;\n\n for (i = 0; i < segs.length; i++) {\n seg = segs[i]; // go through all the levels and stop on the first level where there are no collisions\n\n for (j = 0; j < levels.length; j++) {\n if (!computeSlotSegCollisions(seg, levels[j]).length) {\n break;\n }\n }\n\n seg.level = j;\n (levels[j] || (levels[j] = [])).push(seg);\n }\n\n return levels;\n } // Find all the segments in `otherSegs` that vertically collide with `seg`.", "function buildSlotSegLevels(segs){var levels=[];var i;var seg;var j;for(i=0;i<segs.length;i++){seg=segs[i];// go through all the levels and stop on the first level where there are no collisions\nfor(j=0;j<levels.length;j++){if(!computeSlotSegCollisions(seg,levels[j]).length){break;}}seg.level=j;(levels[j]||(levels[j]=[])).push(seg);}return levels;}// For every segment, figure out the other segments that are in subsequent", "function computeSegHorizontals(segs, eventOrderSpecs) {\n // IMPORTANT TO CLEAR OLD RESULTS :(\n for (var _i = 0, segs_2 = segs; _i < segs_2.length; _i++) {\n var seg = segs_2[_i];\n seg.level = null;\n seg.forwardCoord = null;\n seg.backwardCoord = null;\n seg.forwardPressure = null;\n }\n segs = sortEventSegs(segs, eventOrderSpecs);\n var level0;\n var levels = buildSlotSegLevels(segs);\n computeForwardSlotSegs(levels);\n if ((level0 = levels[0])) {\n for (var _a = 0, level0_1 = level0; _a < level0_1.length; _a++) {\n var seg = level0_1[_a];\n computeSlotSegPressures(seg);\n }\n for (var _b = 0, level0_2 = level0; _b < level0_2.length; _b++) {\n var seg = level0_2[_b];\n computeSegForwardBack(seg, 0, 0, eventOrderSpecs);\n }\n }\n return segs;\n }", "function computeSlotSegPressures(seg) {\n var forwardSegs = seg.forwardSegs;\n var forwardPressure = 0;\n var i;\n var forwardSeg;\n if (seg.forwardPressure === undefined) {\n for (i = 0; i < forwardSegs.length; i++) {\n forwardSeg = forwardSegs[i];\n // figure out the child's maximum forward path\n computeSlotSegPressures(forwardSeg);\n // either use the existing maximum, or use the child's forward pressure\n // plus one (for the forwardSeg itself)\n forwardPressure = Math.max(forwardPressure, 1 + forwardSeg.forwardPressure);\n }\n seg.forwardPressure = forwardPressure;\n }\n}", "function computeSlotSegPressures(seg) {\n var forwardSegs = seg.forwardSegs;\n var forwardPressure = 0;\n var i;\n var forwardSeg;\n if (seg.forwardPressure === undefined) {\n for (i = 0; i < forwardSegs.length; i++) {\n forwardSeg = forwardSegs[i];\n // figure out the child's maximum forward path\n computeSlotSegPressures(forwardSeg);\n // either use the existing maximum, or use the child's forward pressure\n // plus one (for the forwardSeg itself)\n forwardPressure = Math.max(forwardPressure, 1 + forwardSeg.forwardPressure);\n }\n seg.forwardPressure = forwardPressure;\n }\n}", "function computeSlotSegPressures(seg) {\n var forwardSegs = seg.forwardSegs;\n var forwardPressure = 0;\n var i;\n var forwardSeg;\n if (seg.forwardPressure === undefined) {\n for (i = 0; i < forwardSegs.length; i++) {\n forwardSeg = forwardSegs[i];\n // figure out the child's maximum forward path\n computeSlotSegPressures(forwardSeg);\n // either use the existing maximum, or use the child's forward pressure\n // plus one (for the forwardSeg itself)\n forwardPressure = Math.max(forwardPressure, 1 + forwardSeg.forwardPressure);\n }\n seg.forwardPressure = forwardPressure;\n }\n}", "computeControlSegments() {\n if (this.controlSteps.length) {\n this.controlSegments = [];\n let segment = { start : 0, end : 0, human : this.controlSteps[0] }\n for (let i = 0; i < this.controlSteps.length; ++i) {\n const humanStep = this.controlSteps[i];\n if (humanStep != segment.human) {\n this.controlSegments.push(segment);\n segment = { start : i, end : i, human : humanStep };\n } else {\n segment.end = i;\n }\n }\n this.controlSegments.push(segment);\n }\n }", "function computeSlotSegPressures(seg) {\n var forwardSegs = seg.forwardSegs;\n var forwardPressure = 0;\n var i;\n var forwardSeg;\n if (seg.forwardPressure === undefined) { // not already computed\n for (i = 0; i < forwardSegs.length; i++) {\n forwardSeg = forwardSegs[i];\n // figure out the child's maximum forward path\n computeSlotSegPressures(forwardSeg);\n // either use the existing maximum, or use the child's forward pressure\n // plus one (for the forwardSeg itself)\n forwardPressure = Math.max(forwardPressure, 1 + forwardSeg.forwardPressure);\n }\n seg.forwardPressure = forwardPressure;\n }\n}", "function computeSlotSegPressures(seg) {\n var forwardSegs = seg.forwardSegs;\n var forwardPressure = 0;\n var i;\n var forwardSeg;\n if (seg.forwardPressure === undefined) { // not already computed\n for (i = 0; i < forwardSegs.length; i++) {\n forwardSeg = forwardSegs[i];\n // figure out the child's maximum forward path\n computeSlotSegPressures(forwardSeg);\n // either use the existing maximum, or use the child's forward pressure\n // plus one (for the forwardSeg itself)\n forwardPressure = Math.max(forwardPressure, 1 + forwardSeg.forwardPressure);\n }\n seg.forwardPressure = forwardPressure;\n }\n}", "function computeSlotSegPressures(seg) {\n var forwardSegs = seg.forwardSegs;\n var forwardPressure = 0;\n var i;\n var forwardSeg;\n if (seg.forwardPressure == null) { // not already computed\n for (i = 0; i < forwardSegs.length; i += 1) {\n forwardSeg = forwardSegs[i];\n // figure out the child's maximum forward path\n computeSlotSegPressures(forwardSeg);\n // either use the existing maximum, or use the child's forward pressure\n // plus one (for the forwardSeg itself)\n forwardPressure = Math.max(forwardPressure, 1 + forwardSeg.forwardPressure);\n }\n seg.forwardPressure = forwardPressure;\n }\n }", "function buildSlotSegLevels(segs) {\n var levels = [];\n var i;\n var seg;\n var j;\n\n for (i = 0; i < segs.length; i++) {\n seg = segs[i]; // go through all the levels and stop on the first level where there are no collisions\n\n for (j = 0; j < levels.length; j++) {\n if (!computeSlotSegCollisions(seg, levels[j]).length) {\n break;\n }\n }\n\n seg.level = j;\n (levels[j] || (levels[j] = [])).push(seg);\n }\n\n return levels;\n } // For every segment, figure out the other segments that are in subsequent", "function computeSlotSegPressures(seg) {\n var forwardSegs = seg.forwardSegs;\n var forwardPressure = 0;\n var i;\n var forwardSeg;\n if (seg.forwardPressure === undefined) { // not already computed\n for (i = 0; i < forwardSegs.length; i++) {\n forwardSeg = forwardSegs[i];\n // figure out the child's maximum forward path\n computeSlotSegPressures(forwardSeg);\n // either use the existing maximum, or use the child's forward pressure\n // plus one (for the forwardSeg itself)\n forwardPressure = Math.max(forwardPressure, 1 + forwardSeg.forwardPressure);\n }\n seg.forwardPressure = forwardPressure;\n }\n }", "function computeSlotSegPressures(seg) {\n var forwardSegs = seg.forwardSegs;\n var forwardPressure = 0;\n var i;\n var forwardSeg;\n if (seg.forwardPressure === undefined) { // not already computed\n for (i = 0; i < forwardSegs.length; i++) {\n forwardSeg = forwardSegs[i];\n // figure out the child's maximum forward path\n computeSlotSegPressures(forwardSeg);\n // either use the existing maximum, or use the child's forward pressure\n // plus one (for the forwardSeg itself)\n forwardPressure = Math.max(forwardPressure, 1 + forwardSeg.forwardPressure);\n }\n seg.forwardPressure = forwardPressure;\n }\n }", "function computeSlotSegPressures(seg) {\n var forwardSegs = seg.forwardSegs;\n var forwardPressure = 0;\n var i;\n var forwardSeg;\n if (seg.forwardPressure === undefined) { // not already computed\n for (i = 0; i < forwardSegs.length; i++) {\n forwardSeg = forwardSegs[i];\n // figure out the child's maximum forward path\n computeSlotSegPressures(forwardSeg);\n // either use the existing maximum, or use the child's forward pressure\n // plus one (for the forwardSeg itself)\n forwardPressure = Math.max(forwardPressure, 1 + forwardSeg.forwardPressure);\n }\n seg.forwardPressure = forwardPressure;\n }\n }", "function computeSlotSegPressures(seg) {\n var forwardSegs = seg.forwardSegs;\n var forwardPressure = 0;\n var i, forwardSeg;\n\n if (seg.forwardPressure === undefined) { // not already computed\n\n for (i = 0; i < forwardSegs.length; i++) {\n forwardSeg = forwardSegs[i];\n\n // figure out the child's maximum forward path\n computeSlotSegPressures(forwardSeg);\n\n // either use the existing maximum, or use the child's forward pressure\n // plus one (for the forwardSeg itself)\n forwardPressure = Math.max(\n forwardPressure,\n 1 + forwardSeg.forwardPressure\n );\n }\n\n seg.forwardPressure = forwardPressure;\n }\n }", "slither() {\n // nextDir will be the NEW direction of the segment being processed in each iteration of the loop below\n let nextDir = this.getHead().direction;\n for ( let s of this.segments ) {\n // Update the segment's position to its next position\n s.gridPosition = s.nextPosition();\n\n const oldDir = s.direction; // Remember its current direction so we can use it as the next nextDir\n s.direction = nextDir; // Update the segment's direction to the nextDir (which was the previous segments direction)\n nextDir = oldDir; // Finally, set up nextDir for the next iteration\n }\n }", "function computeSlotSegPressures(seg) {\n\t\tvar forwardSegs = seg.forwardSegs;\n\t\tvar forwardPressure = 0;\n\t\tvar i, forwardSeg;\n\n\t\tif (seg.forwardPressure === undefined) { // not already computed\n\n\t\t\tfor (i=0; i<forwardSegs.length; i++) {\n\t\t\t\tforwardSeg = forwardSegs[i];\n\n\t\t\t\t// figure out the child's maximum forward path\n\t\t\t\tcomputeSlotSegPressures(forwardSeg);\n\n\t\t\t\t// either use the existing maximum, or use the child's forward pressure\n\t\t\t\t// plus one (for the forwardSeg itself)\n\t\t\t\tforwardPressure = Math.max(\n\t\t\t\t\tforwardPressure,\n\t\t\t\t\t1 + forwardSeg.forwardPressure\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tseg.forwardPressure = forwardPressure;\n\t\t}\n\t}", "function computeSlotSegPressures(seg) {\n\tvar forwardSegs = seg.forwardSegs;\n\tvar forwardPressure = 0;\n\tvar i, forwardSeg;\n\n\tif (seg.forwardPressure === undefined) { // not already computed\n\n\t\tfor (i=0; i<forwardSegs.length; i++) {\n\t\t\tforwardSeg = forwardSegs[i];\n\n\t\t\t// figure out the child's maximum forward path\n\t\t\tcomputeSlotSegPressures(forwardSeg);\n\n\t\t\t// either use the existing maximum, or use the child's forward pressure\n\t\t\t// plus one (for the forwardSeg itself)\n\t\t\tforwardPressure = Math.max(\n\t\t\t\tforwardPressure,\n\t\t\t\t1 + forwardSeg.forwardPressure\n\t\t\t);\n\t\t}\n\n\t\tseg.forwardPressure = forwardPressure;\n\t}\n}", "function computeSlotSegPressures(seg) {\n\tvar forwardSegs = seg.forwardSegs;\n\tvar forwardPressure = 0;\n\tvar i, forwardSeg;\n\n\tif (seg.forwardPressure === undefined) { // not already computed\n\n\t\tfor (i=0; i<forwardSegs.length; i++) {\n\t\t\tforwardSeg = forwardSegs[i];\n\n\t\t\t// figure out the child's maximum forward path\n\t\t\tcomputeSlotSegPressures(forwardSeg);\n\n\t\t\t// either use the existing maximum, or use the child's forward pressure\n\t\t\t// plus one (for the forwardSeg itself)\n\t\t\tforwardPressure = Math.max(\n\t\t\t\tforwardPressure,\n\t\t\t\t1 + forwardSeg.forwardPressure\n\t\t\t);\n\t\t}\n\n\t\tseg.forwardPressure = forwardPressure;\n\t}\n}", "function computeSlotSegPressures(seg) {\n\tvar forwardSegs = seg.forwardSegs;\n\tvar forwardPressure = 0;\n\tvar i, forwardSeg;\n\n\tif (seg.forwardPressure === undefined) { // not already computed\n\n\t\tfor (i=0; i<forwardSegs.length; i++) {\n\t\t\tforwardSeg = forwardSegs[i];\n\n\t\t\t// figure out the child's maximum forward path\n\t\t\tcomputeSlotSegPressures(forwardSeg);\n\n\t\t\t// either use the existing maximum, or use the child's forward pressure\n\t\t\t// plus one (for the forwardSeg itself)\n\t\t\tforwardPressure = Math.max(\n\t\t\t\tforwardPressure,\n\t\t\t\t1 + forwardSeg.forwardPressure\n\t\t\t);\n\t\t}\n\n\t\tseg.forwardPressure = forwardPressure;\n\t}\n}", "function computeSlotSegPressures(seg) {\n\tvar forwardSegs = seg.forwardSegs;\n\tvar forwardPressure = 0;\n\tvar i, forwardSeg;\n\n\tif (seg.forwardPressure === undefined) { // not already computed\n\n\t\tfor (i=0; i<forwardSegs.length; i++) {\n\t\t\tforwardSeg = forwardSegs[i];\n\n\t\t\t// figure out the child's maximum forward path\n\t\t\tcomputeSlotSegPressures(forwardSeg);\n\n\t\t\t// either use the existing maximum, or use the child's forward pressure\n\t\t\t// plus one (for the forwardSeg itself)\n\t\t\tforwardPressure = Math.max(\n\t\t\t\tforwardPressure,\n\t\t\t\t1 + forwardSeg.forwardPressure\n\t\t\t);\n\t\t}\n\n\t\tseg.forwardPressure = forwardPressure;\n\t}\n}", "function computeSlotSegPressures(seg) {\n\tvar forwardSegs = seg.forwardSegs;\n\tvar forwardPressure = 0;\n\tvar i, forwardSeg;\n\n\tif (seg.forwardPressure === undefined) { // not already computed\n\n\t\tfor (i=0; i<forwardSegs.length; i++) {\n\t\t\tforwardSeg = forwardSegs[i];\n\n\t\t\t// figure out the child's maximum forward path\n\t\t\tcomputeSlotSegPressures(forwardSeg);\n\n\t\t\t// either use the existing maximum, or use the child's forward pressure\n\t\t\t// plus one (for the forwardSeg itself)\n\t\t\tforwardPressure = Math.max(\n\t\t\t\tforwardPressure,\n\t\t\t\t1 + forwardSeg.forwardPressure\n\t\t\t);\n\t\t}\n\n\t\tseg.forwardPressure = forwardPressure;\n\t}\n}", "function computeSlotSegPressures(seg) {\n\tvar forwardSegs = seg.forwardSegs;\n\tvar forwardPressure = 0;\n\tvar i, forwardSeg;\n\n\tif (seg.forwardPressure === undefined) { // not already computed\n\n\t\tfor (i=0; i<forwardSegs.length; i++) {\n\t\t\tforwardSeg = forwardSegs[i];\n\n\t\t\t// figure out the child's maximum forward path\n\t\t\tcomputeSlotSegPressures(forwardSeg);\n\n\t\t\t// either use the existing maximum, or use the child's forward pressure\n\t\t\t// plus one (for the forwardSeg itself)\n\t\t\tforwardPressure = Math.max(\n\t\t\t\tforwardPressure,\n\t\t\t\t1 + forwardSeg.forwardPressure\n\t\t\t);\n\t\t}\n\n\t\tseg.forwardPressure = forwardPressure;\n\t}\n}", "function computeSlotSegPressures(seg) {\n\tvar forwardSegs = seg.forwardSegs;\n\tvar forwardPressure = 0;\n\tvar i, forwardSeg;\n\n\tif (seg.forwardPressure === undefined) { // not already computed\n\n\t\tfor (i=0; i<forwardSegs.length; i++) {\n\t\t\tforwardSeg = forwardSegs[i];\n\n\t\t\t// figure out the child's maximum forward path\n\t\t\tcomputeSlotSegPressures(forwardSeg);\n\n\t\t\t// either use the existing maximum, or use the child's forward pressure\n\t\t\t// plus one (for the forwardSeg itself)\n\t\t\tforwardPressure = Math.max(\n\t\t\t\tforwardPressure,\n\t\t\t\t1 + forwardSeg.forwardPressure\n\t\t\t);\n\t\t}\n\n\t\tseg.forwardPressure = forwardPressure;\n\t}\n}", "function computeSlotSegPressures(seg) {\n\tvar forwardSegs = seg.forwardSegs;\n\tvar forwardPressure = 0;\n\tvar i, forwardSeg;\n\n\tif (seg.forwardPressure === undefined) { // not already computed\n\n\t\tfor (i=0; i<forwardSegs.length; i++) {\n\t\t\tforwardSeg = forwardSegs[i];\n\n\t\t\t// figure out the child's maximum forward path\n\t\t\tcomputeSlotSegPressures(forwardSeg);\n\n\t\t\t// either use the existing maximum, or use the child's forward pressure\n\t\t\t// plus one (for the forwardSeg itself)\n\t\t\tforwardPressure = Math.max(\n\t\t\t\tforwardPressure,\n\t\t\t\t1 + forwardSeg.forwardPressure\n\t\t\t);\n\t\t}\n\n\t\tseg.forwardPressure = forwardPressure;\n\t}\n}", "function computeSlotSegPressures(seg) {\n\tvar forwardSegs = seg.forwardSegs;\n\tvar forwardPressure = 0;\n\tvar i, forwardSeg;\n\n\tif (seg.forwardPressure === undefined) { // not already computed\n\n\t\tfor (i=0; i<forwardSegs.length; i++) {\n\t\t\tforwardSeg = forwardSegs[i];\n\n\t\t\t// figure out the child's maximum forward path\n\t\t\tcomputeSlotSegPressures(forwardSeg);\n\n\t\t\t// either use the existing maximum, or use the child's forward pressure\n\t\t\t// plus one (for the forwardSeg itself)\n\t\t\tforwardPressure = Math.max(\n\t\t\t\tforwardPressure,\n\t\t\t\t1 + forwardSeg.forwardPressure\n\t\t\t);\n\t\t}\n\n\t\tseg.forwardPressure = forwardPressure;\n\t}\n}", "function computeSlotSegPressures(seg) {\n\tvar forwardSegs = seg.forwardSegs;\n\tvar forwardPressure = 0;\n\tvar i, forwardSeg;\n\n\tif (seg.forwardPressure === undefined) { // not already computed\n\n\t\tfor (i=0; i<forwardSegs.length; i++) {\n\t\t\tforwardSeg = forwardSegs[i];\n\n\t\t\t// figure out the child's maximum forward path\n\t\t\tcomputeSlotSegPressures(forwardSeg);\n\n\t\t\t// either use the existing maximum, or use the child's forward pressure\n\t\t\t// plus one (for the forwardSeg itself)\n\t\t\tforwardPressure = Math.max(\n\t\t\t\tforwardPressure,\n\t\t\t\t1 + forwardSeg.forwardPressure\n\t\t\t);\n\t\t}\n\n\t\tseg.forwardPressure = forwardPressure;\n\t}\n}", "function computeSlotSegPressures(seg) {\n\tvar forwardSegs = seg.forwardSegs;\n\tvar forwardPressure = 0;\n\tvar i, forwardSeg;\n\n\tif (seg.forwardPressure === undefined) { // not already computed\n\n\t\tfor (i=0; i<forwardSegs.length; i++) {\n\t\t\tforwardSeg = forwardSegs[i];\n\n\t\t\t// figure out the child's maximum forward path\n\t\t\tcomputeSlotSegPressures(forwardSeg);\n\n\t\t\t// either use the existing maximum, or use the child's forward pressure\n\t\t\t// plus one (for the forwardSeg itself)\n\t\t\tforwardPressure = Math.max(\n\t\t\t\tforwardPressure,\n\t\t\t\t1 + forwardSeg.forwardPressure\n\t\t\t);\n\t\t}\n\n\t\tseg.forwardPressure = forwardPressure;\n\t}\n}", "function computeSlotSegPressures(seg) {\n\tvar forwardSegs = seg.forwardSegs;\n\tvar forwardPressure = 0;\n\tvar i, forwardSeg;\n\n\tif (seg.forwardPressure === undefined) { // not already computed\n\n\t\tfor (i=0; i<forwardSegs.length; i++) {\n\t\t\tforwardSeg = forwardSegs[i];\n\n\t\t\t// figure out the child's maximum forward path\n\t\t\tcomputeSlotSegPressures(forwardSeg);\n\n\t\t\t// either use the existing maximum, or use the child's forward pressure\n\t\t\t// plus one (for the forwardSeg itself)\n\t\t\tforwardPressure = Math.max(\n\t\t\t\tforwardPressure,\n\t\t\t\t1 + forwardSeg.forwardPressure\n\t\t\t);\n\t\t}\n\n\t\tseg.forwardPressure = forwardPressure;\n\t}\n}", "function computeSlotSegPressures(seg) {\n\tvar forwardSegs = seg.forwardSegs;\n\tvar forwardPressure = 0;\n\tvar i, forwardSeg;\n\n\tif (seg.forwardPressure === undefined) { // not already computed\n\n\t\tfor (i=0; i<forwardSegs.length; i++) {\n\t\t\tforwardSeg = forwardSegs[i];\n\n\t\t\t// figure out the child's maximum forward path\n\t\t\tcomputeSlotSegPressures(forwardSeg);\n\n\t\t\t// either use the existing maximum, or use the child's forward pressure\n\t\t\t// plus one (for the forwardSeg itself)\n\t\t\tforwardPressure = Math.max(\n\t\t\t\tforwardPressure,\n\t\t\t\t1 + forwardSeg.forwardPressure\n\t\t\t);\n\t\t}\n\n\t\tseg.forwardPressure = forwardPressure;\n\t}\n}", "function computeSlotSegCollisions(seg,otherSegs,results){if(results===void 0){results=[];}for(var i=0;i<otherSegs.length;i++){if(isSlotSegCollision(seg,otherSegs[i])){results.push(otherSegs[i]);}}return results;}// Do these segments occupy the same vertical space?", "function computeSlotSegCoords(seg, seriesBackwardPressure, seriesBackwardCoord) {\n var forwardSegs = seg.forwardSegs;\n var i;\n\n if (seg.forwardCoord === undefined) { // not already computed\n\n if (!forwardSegs.length) {\n\n // if there are no forward segments, this segment should butt up against the edge\n seg.forwardCoord = 1;\n }\n else {\n\n // sort highest pressure first\n forwardSegs.sort(compareForwardSlotSegs);\n\n // this segment's forwardCoord will be calculated from the backwardCoord of the\n // highest-pressure forward segment.\n computeSlotSegCoords(forwardSegs[0], seriesBackwardPressure + 1, seriesBackwardCoord);\n seg.forwardCoord = forwardSegs[0].backwardCoord;\n }\n\n // calculate the backwardCoord from the forwardCoord. consider the series\n seg.backwardCoord = seg.forwardCoord -\n (seg.forwardCoord - seriesBackwardCoord) / // available width for series\n (seriesBackwardPressure + 1); // # of segments in the series\n\n // use this segment's coordinates to computed the coordinates of the less-pressurized\n // forward segments\n for (i = 0; i < forwardSegs.length; i++) {\n computeSlotSegCoords(forwardSegs[i], 0, seg.forwardCoord);\n }\n }\n }", "removeSegmentsIntersections(tunnels, isWalls) {\n const walls = this.walls;\n let startWallsLength = 0;\n let newWallsAmount = walls.length - startWallsLength;\n\n while (newWallsAmount > 0) {\n startWallsLength = walls.length;\n for (let j = 0; j < walls.length; j += 4) {\n for (let i = 0; i < (isWalls ? j : tunnels.length); i += 4) {\n const pieces = this.resolveSegmentSegment(\n tunnels[i], tunnels[i + 1], tunnels[i + 2], tunnels[i + 3],\n walls[j], walls[j + 1], walls[j + 2], walls[j + 3]\n );\n if (pieces.length < 4) { // empty walls will be removed in removeZeroLengthWalls()\n walls[j] = 0;\n walls[j + 1] = 0;\n walls[j + 2] = 0;\n walls[j + 3] = 0;\n } else {\n walls[j] = pieces[0];\n walls[j + 1] = pieces[1];\n walls[j + 2] = pieces[2];\n walls[j + 3] = pieces[3];\n\n if (pieces.length > 4) {\n walls.push(pieces[4]);\n walls.push(pieces[5]);\n walls.push(pieces[6]);\n walls.push(pieces[7]);\n }\n }\n }\n }\n newWallsAmount = walls.length - startWallsLength;\n }\n }", "function getPositions() {\n \n var rects;\n var nRects;\n var rect;\n \n var top;\n var left;\n var width;\n var right;\n \n var textXY;\n \n var currentLine = -1;\n \n for (var i = 0; i < nSegs; i++) {\n \n rects = segs[i].getClientRects();\n nRects = rects.length;\n \n segRanges[i] = {};\n \n for (var j = 0; j < nRects; j++) {\n \n rect = rects[j];\n textXY = getTextXY(rect.left, rect.top);\n top = textXY.y - segBoxPadY;\n left = textXY.x - segBoxPadX;\n width = rect.width + segBoxPadX * 2;\n \n if (j !== nRects - 1) {\n \n width += extensionWidth;\n }\n \n right = left + width;\n \n if (isNewLine(top)) {\n \n currentLine++;\n \n lines[currentLine] = {\n top: top,\n left: left,\n width: width\n };\n \n segBoxesByLine[currentLine] = [];\n \n } else {\n \n lines[currentLine].width += width;\n }\n \n segBoxesByLine[currentLine].push({\n left: left,\n right: left + width,\n segIndex: i\n });\n \n if (j === 0) {\n \n segRanges[i].startLine = currentLine;\n segRanges[i].startLeft = left;\n }\n \n if (j === nRects - 1) {\n \n segRanges[i].endLine = currentLine;\n segRanges[i].endRight = right;\n }\n }\n }\n \n function isNewLine(top) {\n \n if (lines.length === 0 || lines[lines.length - 1].top !== top) {\n \n return true;\n }\n }\n}", "resolveSegmentSegment(ax1, ay1, ax2, ay2, bx1, by1, bx2, by2) {\n const result = [];\n const isHorizontal1 = ax2 - ax1 > ay2 - ay1;\n const isHorizontal2 = bx2 - bx1 > by2 - by1;\n\n if (isHorizontal1 && isHorizontal2 &&\n by1 === ay1 &&\n ((ax1 <= bx2 && ax1 >= bx1) || (ax2 <= bx2 && ax2 >= bx1) || (bx1 <= ax2 && bx1 >= ax1) || (bx2 <= ax2 && bx2 >= ax1))) {\n\n if (bx1 < ax1) result.push(bx1, by1, ax1, by1);\n if (bx2 > ax2) result.push(ax2, by2, bx2, by2);\n\n } else if (!isHorizontal1 && isHorizontal2 &&\n by1 >= ay1 && by1 < ay2 &&\n ((ax1 <= bx2 && ax1 >= bx1) || (ax2 <= bx2 && ax2 >= bx1) || (bx1 <= ax2 && bx1 >= ax1) || (bx2 <= ax2 && bx2 >= ax1))) {\n\n if (bx1 < ax1) result.push(bx1, by1, ax1, by1);\n if (bx2 > ax2) result.push(ax2 + 1, by2, bx2, by2);\n\n } else if (!isHorizontal1 && !isHorizontal2 &&\n ax1 === bx2 &&\n ((by1 <= ay2 && by1 >= ay1) || (by2 <= ay2 && by2 >= ay1) || (ay1 <= by2 && ay1 >= by1) || (ay2 <= by2 && ay2 >= by1))) {\n\n if (by1 < ay1) result.push(bx1, by1, bx1, ay1);\n if (by2 > ay2) result.push(bx2, ay2, bx2, by2);\n\n } else if (isHorizontal1 && !isHorizontal2 &&\n bx1 >= ax1 && bx1 < ax2 &&\n ((ay2 <= by2 && ay2 >= by1) || (ay1 <= by2 && ay1 >= by1) || (by2 <= ay2 && by2 >= ay1) || (by1 <= ay2 && by1 >= ay1))) {\n\n if (by1 < ay1) result.push(bx1, by1, bx1, ay1);\n if (by2 > ay2) result.push(bx2, ay2 + 1, bx2, by2);\n\n } else { // segments do not intersect\n result.push(bx1, by1, bx2, by2);\n }\n\n return result;\n }", "function computeSlotSegCoords(seg, seriesBackwardPressure, seriesBackwardCoord) {\n\tvar forwardSegs = seg.forwardSegs;\n\tvar i;\n\n\tif (seg.forwardCoord === undefined) { // not already computed\n\n\t\tif (!forwardSegs.length) {\n\n\t\t\t// if there are no forward segments, this segment should butt up against the edge\n\t\t\tseg.forwardCoord = 1;\n\t\t}\n\t\telse {\n\n\t\t\t// sort highest pressure first\n\t\t\tforwardSegs.sort(compareForwardSlotSegs);\n\n\t\t\t// this segment's forwardCoord will be calculated from the backwardCoord of the\n\t\t\t// highest-pressure forward segment.\n\t\t\tcomputeSlotSegCoords(forwardSegs[0], seriesBackwardPressure + 1, seriesBackwardCoord);\n\t\t\tseg.forwardCoord = forwardSegs[0].backwardCoord;\n\t\t}\n\n\t\t// calculate the backwardCoord from the forwardCoord. consider the series\n\t\tseg.backwardCoord = seg.forwardCoord -\n\t\t\t(seg.forwardCoord - seriesBackwardCoord) / // available width for series\n\t\t\t(seriesBackwardPressure + 1); // # of segments in the series\n\n\t\t// use this segment's coordinates to computed the coordinates of the less-pressurized\n\t\t// forward segments\n\t\tfor (i=0; i<forwardSegs.length; i++) {\n\t\t\tcomputeSlotSegCoords(forwardSegs[i], 0, seg.forwardCoord);\n\t\t}\n\t}\n}", "function computeSlotSegCoords(seg, seriesBackwardPressure, seriesBackwardCoord) {\n\tvar forwardSegs = seg.forwardSegs;\n\tvar i;\n\n\tif (seg.forwardCoord === undefined) { // not already computed\n\n\t\tif (!forwardSegs.length) {\n\n\t\t\t// if there are no forward segments, this segment should butt up against the edge\n\t\t\tseg.forwardCoord = 1;\n\t\t}\n\t\telse {\n\n\t\t\t// sort highest pressure first\n\t\t\tforwardSegs.sort(compareForwardSlotSegs);\n\n\t\t\t// this segment's forwardCoord will be calculated from the backwardCoord of the\n\t\t\t// highest-pressure forward segment.\n\t\t\tcomputeSlotSegCoords(forwardSegs[0], seriesBackwardPressure + 1, seriesBackwardCoord);\n\t\t\tseg.forwardCoord = forwardSegs[0].backwardCoord;\n\t\t}\n\n\t\t// calculate the backwardCoord from the forwardCoord. consider the series\n\t\tseg.backwardCoord = seg.forwardCoord -\n\t\t\t(seg.forwardCoord - seriesBackwardCoord) / // available width for series\n\t\t\t(seriesBackwardPressure + 1); // # of segments in the series\n\n\t\t// use this segment's coordinates to computed the coordinates of the less-pressurized\n\t\t// forward segments\n\t\tfor (i=0; i<forwardSegs.length; i++) {\n\t\t\tcomputeSlotSegCoords(forwardSegs[i], 0, seg.forwardCoord);\n\t\t}\n\t}\n}", "function computeSlotSegCoords(seg, seriesBackwardPressure, seriesBackwardCoord) {\n\tvar forwardSegs = seg.forwardSegs;\n\tvar i;\n\n\tif (seg.forwardCoord === undefined) { // not already computed\n\n\t\tif (!forwardSegs.length) {\n\n\t\t\t// if there are no forward segments, this segment should butt up against the edge\n\t\t\tseg.forwardCoord = 1;\n\t\t}\n\t\telse {\n\n\t\t\t// sort highest pressure first\n\t\t\tforwardSegs.sort(compareForwardSlotSegs);\n\n\t\t\t// this segment's forwardCoord will be calculated from the backwardCoord of the\n\t\t\t// highest-pressure forward segment.\n\t\t\tcomputeSlotSegCoords(forwardSegs[0], seriesBackwardPressure + 1, seriesBackwardCoord);\n\t\t\tseg.forwardCoord = forwardSegs[0].backwardCoord;\n\t\t}\n\n\t\t// calculate the backwardCoord from the forwardCoord. consider the series\n\t\tseg.backwardCoord = seg.forwardCoord -\n\t\t\t(seg.forwardCoord - seriesBackwardCoord) / // available width for series\n\t\t\t(seriesBackwardPressure + 1); // # of segments in the series\n\n\t\t// use this segment's coordinates to computed the coordinates of the less-pressurized\n\t\t// forward segments\n\t\tfor (i=0; i<forwardSegs.length; i++) {\n\t\t\tcomputeSlotSegCoords(forwardSegs[i], 0, seg.forwardCoord);\n\t\t}\n\t}\n}", "function computeSlotSegCoords(seg, seriesBackwardPressure, seriesBackwardCoord) {\n\tvar forwardSegs = seg.forwardSegs;\n\tvar i;\n\n\tif (seg.forwardCoord === undefined) { // not already computed\n\n\t\tif (!forwardSegs.length) {\n\n\t\t\t// if there are no forward segments, this segment should butt up against the edge\n\t\t\tseg.forwardCoord = 1;\n\t\t}\n\t\telse {\n\n\t\t\t// sort highest pressure first\n\t\t\tforwardSegs.sort(compareForwardSlotSegs);\n\n\t\t\t// this segment's forwardCoord will be calculated from the backwardCoord of the\n\t\t\t// highest-pressure forward segment.\n\t\t\tcomputeSlotSegCoords(forwardSegs[0], seriesBackwardPressure + 1, seriesBackwardCoord);\n\t\t\tseg.forwardCoord = forwardSegs[0].backwardCoord;\n\t\t}\n\n\t\t// calculate the backwardCoord from the forwardCoord. consider the series\n\t\tseg.backwardCoord = seg.forwardCoord -\n\t\t\t(seg.forwardCoord - seriesBackwardCoord) / // available width for series\n\t\t\t(seriesBackwardPressure + 1); // # of segments in the series\n\n\t\t// use this segment's coordinates to computed the coordinates of the less-pressurized\n\t\t// forward segments\n\t\tfor (i=0; i<forwardSegs.length; i++) {\n\t\t\tcomputeSlotSegCoords(forwardSegs[i], 0, seg.forwardCoord);\n\t\t}\n\t}\n}", "function computeSlotSegCoords(seg, seriesBackwardPressure, seriesBackwardCoord) {\n\tvar forwardSegs = seg.forwardSegs;\n\tvar i;\n\n\tif (seg.forwardCoord === undefined) { // not already computed\n\n\t\tif (!forwardSegs.length) {\n\n\t\t\t// if there are no forward segments, this segment should butt up against the edge\n\t\t\tseg.forwardCoord = 1;\n\t\t}\n\t\telse {\n\n\t\t\t// sort highest pressure first\n\t\t\tforwardSegs.sort(compareForwardSlotSegs);\n\n\t\t\t// this segment's forwardCoord will be calculated from the backwardCoord of the\n\t\t\t// highest-pressure forward segment.\n\t\t\tcomputeSlotSegCoords(forwardSegs[0], seriesBackwardPressure + 1, seriesBackwardCoord);\n\t\t\tseg.forwardCoord = forwardSegs[0].backwardCoord;\n\t\t}\n\n\t\t// calculate the backwardCoord from the forwardCoord. consider the series\n\t\tseg.backwardCoord = seg.forwardCoord -\n\t\t\t(seg.forwardCoord - seriesBackwardCoord) / // available width for series\n\t\t\t(seriesBackwardPressure + 1); // # of segments in the series\n\n\t\t// use this segment's coordinates to computed the coordinates of the less-pressurized\n\t\t// forward segments\n\t\tfor (i=0; i<forwardSegs.length; i++) {\n\t\t\tcomputeSlotSegCoords(forwardSegs[i], 0, seg.forwardCoord);\n\t\t}\n\t}\n}", "function computeSlotSegCoords(seg, seriesBackwardPressure, seriesBackwardCoord) {\n\tvar forwardSegs = seg.forwardSegs;\n\tvar i;\n\n\tif (seg.forwardCoord === undefined) { // not already computed\n\n\t\tif (!forwardSegs.length) {\n\n\t\t\t// if there are no forward segments, this segment should butt up against the edge\n\t\t\tseg.forwardCoord = 1;\n\t\t}\n\t\telse {\n\n\t\t\t// sort highest pressure first\n\t\t\tforwardSegs.sort(compareForwardSlotSegs);\n\n\t\t\t// this segment's forwardCoord will be calculated from the backwardCoord of the\n\t\t\t// highest-pressure forward segment.\n\t\t\tcomputeSlotSegCoords(forwardSegs[0], seriesBackwardPressure + 1, seriesBackwardCoord);\n\t\t\tseg.forwardCoord = forwardSegs[0].backwardCoord;\n\t\t}\n\n\t\t// calculate the backwardCoord from the forwardCoord. consider the series\n\t\tseg.backwardCoord = seg.forwardCoord -\n\t\t\t(seg.forwardCoord - seriesBackwardCoord) / // available width for series\n\t\t\t(seriesBackwardPressure + 1); // # of segments in the series\n\n\t\t// use this segment's coordinates to computed the coordinates of the less-pressurized\n\t\t// forward segments\n\t\tfor (i=0; i<forwardSegs.length; i++) {\n\t\t\tcomputeSlotSegCoords(forwardSegs[i], 0, seg.forwardCoord);\n\t\t}\n\t}\n}", "function addSegEndsFromSequences(){\n //Add all the starting segEnds and internal segJoins\n for(var i=0;i<seqArr.length;i++){\n var length=parseInt(seqArr[i]['length']),\n seqId=seqArr[i]['id'];\n segEndArr[segEndArr.length]=[seqId,0,'POS_STRAND']\n segEndArr[segEndArr.length]=[seqId,length-1,'NEG_STRAND']\n segJoinArr[segJoinArr.length]=[[seqId,0,'POS_STRAND'],[seqId,length-1,'NEG_STRAND'],'internal',length]\n }\n segmentize();\n}", "function buildSlotSegLevels(segs) {\n var levels = [];\n var i;\n var seg;\n var j;\n for (i = 0; i < segs.length; i += 1) {\n seg = segs[i];\n // go through all the levels and stop on the first level where there are no collisions\n for (j = 0; j < levels.length; j += 1) {\n if (!computeSlotSegCollisions(seg, levels[j]).length) {\n break;\n }\n }\n seg.level = j;\n (levels[j] || (levels[j] = [])).push(seg);\n }\n return levels;\n }", "function buildSlotSegLevels(segs) {\n var levels = [];\n var i;\n var seg;\n var j;\n for (i = 0; i < segs.length; i++) {\n seg = segs[i];\n // go through all the levels and stop on the first level where there are no collisions\n for (j = 0; j < levels.length; j++) {\n if (!computeSlotSegCollisions(seg, levels[j]).length) {\n break;\n }\n }\n seg.level = j;\n (levels[j] || (levels[j] = [])).push(seg);\n }\n return levels;\n }", "function buildSlotSegLevels(segs) {\n var levels = [];\n var i;\n var seg;\n var j;\n for (i = 0; i < segs.length; i++) {\n seg = segs[i];\n // go through all the levels and stop on the first level where there are no collisions\n for (j = 0; j < levels.length; j++) {\n if (!computeSlotSegCollisions(seg, levels[j]).length) {\n break;\n }\n }\n seg.level = j;\n (levels[j] || (levels[j] = [])).push(seg);\n }\n return levels;\n }", "function buildSlotSegLevels(segs) {\n var levels = [];\n var i;\n var seg;\n var j;\n for (i = 0; i < segs.length; i++) {\n seg = segs[i];\n // go through all the levels and stop on the first level where there are no collisions\n for (j = 0; j < levels.length; j++) {\n if (!computeSlotSegCollisions(seg, levels[j]).length) {\n break;\n }\n }\n seg.level = j;\n (levels[j] || (levels[j] = [])).push(seg);\n }\n return levels;\n }", "function drawSegment(ctx, points, start, segLen, allLen, dir, smooth, smoothMonotone, connectNulls) {\n\t var prevX;\n\t var prevY;\n\t var cpx0;\n\t var cpy0;\n\t var cpx1;\n\t var cpy1;\n\t var idx = start;\n\t var k = 0;\n\t\n\t for (; k < segLen; k++) {\n\t var x = points[idx * 2];\n\t var y = points[idx * 2 + 1];\n\t\n\t if (idx >= allLen || idx < 0) {\n\t break;\n\t }\n\t\n\t if (isPointNull(x, y)) {\n\t if (connectNulls) {\n\t idx += dir;\n\t continue;\n\t }\n\t\n\t break;\n\t }\n\t\n\t if (idx === start) {\n\t ctx[dir > 0 ? 'moveTo' : 'lineTo'](x, y);\n\t cpx0 = x;\n\t cpy0 = y;\n\t } else {\n\t var dx = x - prevX;\n\t var dy = y - prevY; // Ignore tiny segment.\n\t\n\t if (dx * dx + dy * dy < 0.5) {\n\t idx += dir;\n\t continue;\n\t }\n\t\n\t if (smooth > 0) {\n\t var nextIdx = idx + dir;\n\t var nextX = points[nextIdx * 2];\n\t var nextY = points[nextIdx * 2 + 1];\n\t var tmpK = k + 1;\n\t\n\t if (connectNulls) {\n\t // Find next point not null\n\t while (isPointNull(nextX, nextY) && tmpK < segLen) {\n\t tmpK++;\n\t nextIdx += dir;\n\t nextX = points[nextIdx * 2];\n\t nextY = points[nextIdx * 2 + 1];\n\t }\n\t }\n\t\n\t var ratioNextSeg = 0.5;\n\t var vx = 0;\n\t var vy = 0;\n\t var nextCpx0 = void 0;\n\t var nextCpy0 = void 0; // Is last point\n\t\n\t if (tmpK >= segLen || isPointNull(nextX, nextY)) {\n\t cpx1 = x;\n\t cpy1 = y;\n\t } else {\n\t vx = nextX - prevX;\n\t vy = nextY - prevY;\n\t var dx0 = x - prevX;\n\t var dx1 = nextX - x;\n\t var dy0 = y - prevY;\n\t var dy1 = nextY - y;\n\t var lenPrevSeg = void 0;\n\t var lenNextSeg = void 0;\n\t\n\t if (smoothMonotone === 'x') {\n\t lenPrevSeg = Math.abs(dx0);\n\t lenNextSeg = Math.abs(dx1);\n\t cpx1 = x - lenPrevSeg * smooth;\n\t cpy1 = y;\n\t nextCpx0 = x + lenPrevSeg * smooth;\n\t nextCpy0 = y;\n\t } else if (smoothMonotone === 'y') {\n\t lenPrevSeg = Math.abs(dy0);\n\t lenNextSeg = Math.abs(dy1);\n\t cpx1 = x;\n\t cpy1 = y - lenPrevSeg * smooth;\n\t nextCpx0 = x;\n\t nextCpy0 = y + lenPrevSeg * smooth;\n\t } else {\n\t lenPrevSeg = Math.sqrt(dx0 * dx0 + dy0 * dy0);\n\t lenNextSeg = Math.sqrt(dx1 * dx1 + dy1 * dy1); // Use ratio of seg length\n\t\n\t ratioNextSeg = lenNextSeg / (lenNextSeg + lenPrevSeg);\n\t cpx1 = x - vx * smooth * (1 - ratioNextSeg);\n\t cpy1 = y - vy * smooth * (1 - ratioNextSeg); // cp0 of next segment\n\t\n\t nextCpx0 = x + vx * smooth * ratioNextSeg;\n\t nextCpy0 = y + vy * smooth * ratioNextSeg; // Smooth constraint between point and next point.\n\t // Avoid exceeding extreme after smoothing.\n\t\n\t nextCpx0 = mathMin$5(nextCpx0, mathMax$5(nextX, x));\n\t nextCpy0 = mathMin$5(nextCpy0, mathMax$5(nextY, y));\n\t nextCpx0 = mathMax$5(nextCpx0, mathMin$5(nextX, x));\n\t nextCpy0 = mathMax$5(nextCpy0, mathMin$5(nextY, y)); // Reclaculate cp1 based on the adjusted cp0 of next seg.\n\t\n\t vx = nextCpx0 - x;\n\t vy = nextCpy0 - y;\n\t cpx1 = x - vx * lenPrevSeg / lenNextSeg;\n\t cpy1 = y - vy * lenPrevSeg / lenNextSeg; // Smooth constraint between point and prev point.\n\t // Avoid exceeding extreme after smoothing.\n\t\n\t cpx1 = mathMin$5(cpx1, mathMax$5(prevX, x));\n\t cpy1 = mathMin$5(cpy1, mathMax$5(prevY, y));\n\t cpx1 = mathMax$5(cpx1, mathMin$5(prevX, x));\n\t cpy1 = mathMax$5(cpy1, mathMin$5(prevY, y)); // Adjust next cp0 again.\n\t\n\t vx = x - cpx1;\n\t vy = y - cpy1;\n\t nextCpx0 = x + vx * lenNextSeg / lenPrevSeg;\n\t nextCpy0 = y + vy * lenNextSeg / lenPrevSeg;\n\t }\n\t }\n\t\n\t ctx.bezierCurveTo(cpx0, cpy0, cpx1, cpy1, x, y);\n\t cpx0 = nextCpx0;\n\t cpy0 = nextCpy0;\n\t } else {\n\t ctx.lineTo(x, y);\n\t }\n\t }\n\t\n\t prevX = x;\n\t prevY = y;\n\t idx += dir;\n\t }\n\t\n\t return k;\n\t }", "function buildSlotSegLevels(segs) {\n var levels = [];\n var i, seg;\n var j;\n\n for (i = 0; i < segs.length; i++) {\n seg = segs[i];\n\n // go through all the levels and stop on the first level where there are no collisions\n for (j = 0; j < levels.length; j++) {\n if (!computeSlotSegCollisions(seg, levels[j]).length) {\n break;\n }\n }\n\n seg.level = j;\n\n (levels[j] || (levels[j] = [])).push(seg);\n }\n\n return levels;\n }", "function buildSlotSegLevels(segs) {\n var levels = [];\n var i;\n var seg;\n var j;\n for (i = 0; i < segs.length; i++) {\n seg = segs[i];\n // go through all the levels and stop on the first level where there are no collisions\n for (j = 0; j < levels.length; j++) {\n if (!computeSlotSegCollisions(seg, levels[j]).length) {\n break;\n }\n }\n seg.level = j;\n (levels[j] || (levels[j] = [])).push(seg);\n }\n return levels;\n}", "function buildSlotSegLevels(segs) {\n var levels = [];\n var i;\n var seg;\n var j;\n for (i = 0; i < segs.length; i++) {\n seg = segs[i];\n // go through all the levels and stop on the first level where there are no collisions\n for (j = 0; j < levels.length; j++) {\n if (!computeSlotSegCollisions(seg, levels[j]).length) {\n break;\n }\n }\n seg.level = j;\n (levels[j] || (levels[j] = [])).push(seg);\n }\n return levels;\n}", "function buildSlotSegLevels(segs) {\n var levels = [];\n var i;\n var seg;\n var j;\n for (i = 0; i < segs.length; i++) {\n seg = segs[i];\n // go through all the levels and stop on the first level where there are no collisions\n for (j = 0; j < levels.length; j++) {\n if (!computeSlotSegCollisions(seg, levels[j]).length) {\n break;\n }\n }\n seg.level = j;\n (levels[j] || (levels[j] = [])).push(seg);\n }\n return levels;\n}", "function buildSlotSegLevels(segs) {\n var levels = [];\n var i;\n var seg;\n var j;\n for (i = 0; i < segs.length; i++) {\n seg = segs[i];\n // go through all the levels and stop on the first level where there are no collisions\n for (j = 0; j < levels.length; j++) {\n if (!computeSlotSegCollisions(seg, levels[j]).length) {\n break;\n }\n }\n seg.level = j;\n (levels[j] || (levels[j] = [])).push(seg);\n }\n return levels;\n}", "function buildSlotSegLevels(segs) {\n var levels = [];\n var i;\n var seg;\n var j;\n for (i = 0; i < segs.length; i++) {\n seg = segs[i];\n // go through all the levels and stop on the first level where there are no collisions\n for (j = 0; j < levels.length; j++) {\n if (!computeSlotSegCollisions(seg, levels[j]).length) {\n break;\n }\n }\n seg.level = j;\n (levels[j] || (levels[j] = [])).push(seg);\n }\n return levels;\n}", "function buildSlotSegLevels(segs) {\n\t\tvar levels = [];\n\t\tvar i, seg;\n\t\tvar j;\n\n\t\tfor (i=0; i<segs.length; i++) {\n\t\t\tseg = segs[i];\n\n\t\t\t// go through all the levels and stop on the first level where there are no collisions\n\t\t\tfor (j=0; j<levels.length; j++) {\n\t\t\t\tif (!computeSlotSegCollisions(seg, levels[j]).length) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tseg.level = j;\n\n\t\t\t(levels[j] || (levels[j] = [])).push(seg);\n\t\t}\n\n\t\treturn levels;\n\t}", "function drawSegment(ctx, points, start, segLen, allLen, dir, smooth, smoothMonotone, connectNulls) {\n var prevX;\n var prevY;\n var cpx0;\n var cpy0;\n var cpx1;\n var cpy1;\n var idx = start;\n var k = 0;\n\n for (; k < segLen; k++) {\n var x = points[idx * 2];\n var y = points[idx * 2 + 1];\n\n if (idx >= allLen || idx < 0) {\n break;\n }\n\n if (isPointNull(x, y)) {\n if (connectNulls) {\n idx += dir;\n continue;\n }\n\n break;\n }\n\n if (idx === start) {\n ctx[dir > 0 ? 'moveTo' : 'lineTo'](x, y);\n cpx0 = x;\n cpy0 = y;\n } else {\n var dx = x - prevX;\n var dy = y - prevY; // Ignore tiny segment.\n\n if (dx * dx + dy * dy < 0.5) {\n idx += dir;\n continue;\n }\n\n if (smooth > 0) {\n var nextIdx = idx + dir;\n var nextX = points[nextIdx * 2];\n var nextY = points[nextIdx * 2 + 1]; // Ignore duplicate point\n\n while (nextX === x && nextY === y && k < segLen) {\n k++;\n nextIdx += dir;\n idx += dir;\n nextX = points[nextIdx * 2];\n nextY = points[nextIdx * 2 + 1];\n x = points[idx * 2];\n y = points[idx * 2 + 1];\n dx = x - prevX;\n dy = y - prevY;\n }\n\n var tmpK = k + 1;\n\n if (connectNulls) {\n // Find next point not null\n while (isPointNull(nextX, nextY) && tmpK < segLen) {\n tmpK++;\n nextIdx += dir;\n nextX = points[nextIdx * 2];\n nextY = points[nextIdx * 2 + 1];\n }\n }\n\n var ratioNextSeg = 0.5;\n var vx = 0;\n var vy = 0;\n var nextCpx0 = void 0;\n var nextCpy0 = void 0; // Is last point\n\n if (tmpK >= segLen || isPointNull(nextX, nextY)) {\n cpx1 = x;\n cpy1 = y;\n } else {\n vx = nextX - prevX;\n vy = nextY - prevY;\n var dx0 = x - prevX;\n var dx1 = nextX - x;\n var dy0 = y - prevY;\n var dy1 = nextY - y;\n var lenPrevSeg = void 0;\n var lenNextSeg = void 0;\n\n if (smoothMonotone === 'x') {\n lenPrevSeg = Math.abs(dx0);\n lenNextSeg = Math.abs(dx1);\n var dir_1 = vx > 0 ? 1 : -1;\n cpx1 = x - dir_1 * lenPrevSeg * smooth;\n cpy1 = y;\n nextCpx0 = x + dir_1 * lenNextSeg * smooth;\n nextCpy0 = y;\n } else if (smoothMonotone === 'y') {\n lenPrevSeg = Math.abs(dy0);\n lenNextSeg = Math.abs(dy1);\n var dir_2 = vy > 0 ? 1 : -1;\n cpx1 = x;\n cpy1 = y - dir_2 * lenPrevSeg * smooth;\n nextCpx0 = x;\n nextCpy0 = y + dir_2 * lenNextSeg * smooth;\n } else {\n lenPrevSeg = Math.sqrt(dx0 * dx0 + dy0 * dy0);\n lenNextSeg = Math.sqrt(dx1 * dx1 + dy1 * dy1); // Use ratio of seg length\n\n ratioNextSeg = lenNextSeg / (lenNextSeg + lenPrevSeg);\n cpx1 = x - vx * smooth * (1 - ratioNextSeg);\n cpy1 = y - vy * smooth * (1 - ratioNextSeg); // cp0 of next segment\n\n nextCpx0 = x + vx * smooth * ratioNextSeg;\n nextCpy0 = y + vy * smooth * ratioNextSeg; // Smooth constraint between point and next point.\n // Avoid exceeding extreme after smoothing.\n\n nextCpx0 = mathMin(nextCpx0, mathMax(nextX, x));\n nextCpy0 = mathMin(nextCpy0, mathMax(nextY, y));\n nextCpx0 = mathMax(nextCpx0, mathMin(nextX, x));\n nextCpy0 = mathMax(nextCpy0, mathMin(nextY, y)); // Reclaculate cp1 based on the adjusted cp0 of next seg.\n\n vx = nextCpx0 - x;\n vy = nextCpy0 - y;\n cpx1 = x - vx * lenPrevSeg / lenNextSeg;\n cpy1 = y - vy * lenPrevSeg / lenNextSeg; // Smooth constraint between point and prev point.\n // Avoid exceeding extreme after smoothing.\n\n cpx1 = mathMin(cpx1, mathMax(prevX, x));\n cpy1 = mathMin(cpy1, mathMax(prevY, y));\n cpx1 = mathMax(cpx1, mathMin(prevX, x));\n cpy1 = mathMax(cpy1, mathMin(prevY, y)); // Adjust next cp0 again.\n\n vx = x - cpx1;\n vy = y - cpy1;\n nextCpx0 = x + vx * lenNextSeg / lenPrevSeg;\n nextCpy0 = y + vy * lenNextSeg / lenPrevSeg;\n }\n }\n\n ctx.bezierCurveTo(cpx0, cpy0, cpx1, cpy1, x, y);\n cpx0 = nextCpx0;\n cpy0 = nextCpy0;\n } else {\n ctx.lineTo(x, y);\n }\n }\n\n prevX = x;\n prevY = y;\n idx += dir;\n }\n\n return k;\n}", "function buildSlotSegLevels(segs) {\n\tvar levels = [];\n\tvar i, seg;\n\tvar j;\n\n\tfor (i=0; i<segs.length; i++) {\n\t\tseg = segs[i];\n\n\t\t// go through all the levels and stop on the first level where there are no collisions\n\t\tfor (j=0; j<levels.length; j++) {\n\t\t\tif (!computeSlotSegCollisions(seg, levels[j]).length) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tseg.level = j;\n\n\t\t(levels[j] || (levels[j] = [])).push(seg);\n\t}\n\n\treturn levels;\n}", "function buildSlotSegLevels(segs) {\n\tvar levels = [];\n\tvar i, seg;\n\tvar j;\n\n\tfor (i=0; i<segs.length; i++) {\n\t\tseg = segs[i];\n\n\t\t// go through all the levels and stop on the first level where there are no collisions\n\t\tfor (j=0; j<levels.length; j++) {\n\t\t\tif (!computeSlotSegCollisions(seg, levels[j]).length) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tseg.level = j;\n\n\t\t(levels[j] || (levels[j] = [])).push(seg);\n\t}\n\n\treturn levels;\n}", "function buildSlotSegLevels(segs) {\n\tvar levels = [];\n\tvar i, seg;\n\tvar j;\n\n\tfor (i=0; i<segs.length; i++) {\n\t\tseg = segs[i];\n\n\t\t// go through all the levels and stop on the first level where there are no collisions\n\t\tfor (j=0; j<levels.length; j++) {\n\t\t\tif (!computeSlotSegCollisions(seg, levels[j]).length) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tseg.level = j;\n\n\t\t(levels[j] || (levels[j] = [])).push(seg);\n\t}\n\n\treturn levels;\n}", "function buildSlotSegLevels(segs) {\n\tvar levels = [];\n\tvar i, seg;\n\tvar j;\n\n\tfor (i=0; i<segs.length; i++) {\n\t\tseg = segs[i];\n\n\t\t// go through all the levels and stop on the first level where there are no collisions\n\t\tfor (j=0; j<levels.length; j++) {\n\t\t\tif (!computeSlotSegCollisions(seg, levels[j]).length) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tseg.level = j;\n\n\t\t(levels[j] || (levels[j] = [])).push(seg);\n\t}\n\n\treturn levels;\n}", "function buildSlotSegLevels(segs) {\n\tvar levels = [];\n\tvar i, seg;\n\tvar j;\n\n\tfor (i=0; i<segs.length; i++) {\n\t\tseg = segs[i];\n\n\t\t// go through all the levels and stop on the first level where there are no collisions\n\t\tfor (j=0; j<levels.length; j++) {\n\t\t\tif (!computeSlotSegCollisions(seg, levels[j]).length) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tseg.level = j;\n\n\t\t(levels[j] || (levels[j] = [])).push(seg);\n\t}\n\n\treturn levels;\n}", "function buildSlotSegLevels(segs) {\n\tvar levels = [];\n\tvar i, seg;\n\tvar j;\n\n\tfor (i=0; i<segs.length; i++) {\n\t\tseg = segs[i];\n\n\t\t// go through all the levels and stop on the first level where there are no collisions\n\t\tfor (j=0; j<levels.length; j++) {\n\t\t\tif (!computeSlotSegCollisions(seg, levels[j]).length) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tseg.level = j;\n\n\t\t(levels[j] || (levels[j] = [])).push(seg);\n\t}\n\n\treturn levels;\n}", "function buildSlotSegLevels(segs) {\n\tvar levels = [];\n\tvar i, seg;\n\tvar j;\n\n\tfor (i=0; i<segs.length; i++) {\n\t\tseg = segs[i];\n\n\t\t// go through all the levels and stop on the first level where there are no collisions\n\t\tfor (j=0; j<levels.length; j++) {\n\t\t\tif (!computeSlotSegCollisions(seg, levels[j]).length) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tseg.level = j;\n\n\t\t(levels[j] || (levels[j] = [])).push(seg);\n\t}\n\n\treturn levels;\n}", "function buildSlotSegLevels(segs) {\n\tvar levels = [];\n\tvar i, seg;\n\tvar j;\n\n\tfor (i=0; i<segs.length; i++) {\n\t\tseg = segs[i];\n\n\t\t// go through all the levels and stop on the first level where there are no collisions\n\t\tfor (j=0; j<levels.length; j++) {\n\t\t\tif (!computeSlotSegCollisions(seg, levels[j]).length) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tseg.level = j;\n\n\t\t(levels[j] || (levels[j] = [])).push(seg);\n\t}\n\n\treturn levels;\n}", "function buildSlotSegLevels(segs) {\n\tvar levels = [];\n\tvar i, seg;\n\tvar j;\n\n\tfor (i=0; i<segs.length; i++) {\n\t\tseg = segs[i];\n\n\t\t// go through all the levels and stop on the first level where there are no collisions\n\t\tfor (j=0; j<levels.length; j++) {\n\t\t\tif (!computeSlotSegCollisions(seg, levels[j]).length) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t(levels[j] || (levels[j] = [])).push(seg);\n\t}\n\n\treturn levels;\n}", "function buildSlotSegLevels(segs) {\n\tvar levels = [];\n\tvar i, seg;\n\tvar j;\n\n\tfor (i=0; i<segs.length; i++) {\n\t\tseg = segs[i];\n\n\t\t// go through all the levels and stop on the first level where there are no collisions\n\t\tfor (j=0; j<levels.length; j++) {\n\t\t\tif (!computeSlotSegCollisions(seg, levels[j]).length) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t(levels[j] || (levels[j] = [])).push(seg);\n\t}\n\n\treturn levels;\n}", "function buildSlotSegLevels(segs) {\n\tvar levels = [];\n\tvar i, seg;\n\tvar j;\n\n\tfor (i=0; i<segs.length; i++) {\n\t\tseg = segs[i];\n\n\t\t// go through all the levels and stop on the first level where there are no collisions\n\t\tfor (j=0; j<levels.length; j++) {\n\t\t\tif (!computeSlotSegCollisions(seg, levels[j]).length) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t(levels[j] || (levels[j] = [])).push(seg);\n\t}\n\n\treturn levels;\n}", "function buildSlotSegLevels(segs) {\n\tvar levels = [];\n\tvar i, seg;\n\tvar j;\n\n\tfor (i=0; i<segs.length; i++) {\n\t\tseg = segs[i];\n\n\t\t// go through all the levels and stop on the first level where there are no collisions\n\t\tfor (j=0; j<levels.length; j++) {\n\t\t\tif (!computeSlotSegCollisions(seg, levels[j]).length) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t(levels[j] || (levels[j] = [])).push(seg);\n\t}\n\n\treturn levels;\n}", "function buildSlotSegLevels(segs) {\n\tvar levels = [];\n\tvar i, seg;\n\tvar j;\n\n\tfor (i=0; i<segs.length; i++) {\n\t\tseg = segs[i];\n\n\t\t// go through all the levels and stop on the first level where there are no collisions\n\t\tfor (j=0; j<levels.length; j++) {\n\t\t\tif (!computeSlotSegCollisions(seg, levels[j]).length) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t(levels[j] || (levels[j] = [])).push(seg);\n\t}\n\n\treturn levels;\n}", "didSwitchToSegmentsLayout() {\n this.controllerState.viewMode = ViewMode.segments;\n this.didSwitchLayout();\n }", "function calculateHorizontals(segments) {\n\t\tvar isRTL = opt('isRTL');\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// Determine functions used for calulating the elements left/right coordinates,\n\t\t\t// depending on whether the view is RTL or not.\n\t\t\t// NOTE:\n\t\t\t// colLeft/colRight returns the coordinate butting up the edge of the cell.\n\t\t\t// colContentLeft/colContentRight is indented a little bit from the edge.\n\t\t\tvar leftFunc = (isRTL ? segment.isEnd : segment.isStart) ? colContentLeft : colLeft;\n\t\t\tvar rightFunc = (isRTL ? segment.isStart : segment.isEnd) ? colContentRight : colRight;\n\n\t\t\tvar left = leftFunc(segment.leftCol);\n\t\t\tvar right = rightFunc(segment.rightCol);\n\t\t\tsegment.left = left;\n\t\t\tsegment.outerWidth = right - left;\n\t\t}\n\t}" ]
[ "0.71576595", "0.6984047", "0.6755502", "0.67453086", "0.6745045", "0.67234623", "0.6717402", "0.6717402", "0.6717402", "0.6717402", "0.6717402", "0.66804534", "0.6664366", "0.6614513", "0.6614513", "0.6614513", "0.6614513", "0.6614513", "0.6614513", "0.6614513", "0.6614513", "0.6614513", "0.6614513", "0.6614513", "0.6614513", "0.6614513", "0.6505817", "0.64202446", "0.6355727", "0.6332272", "0.6278839", "0.6175698", "0.6175698", "0.6175698", "0.6134446", "0.61217356", "0.61217356", "0.6113185", "0.61125493", "0.61123115", "0.61123115", "0.61123115", "0.60854805", "0.5968393", "0.5962508", "0.59404373", "0.59404373", "0.59404373", "0.59404373", "0.59404373", "0.59404373", "0.59404373", "0.59404373", "0.59404373", "0.59404373", "0.59404373", "0.59404373", "0.59404373", "0.5820934", "0.58156455", "0.58004504", "0.57963914", "0.57773566", "0.5748308", "0.5748308", "0.5748308", "0.5748308", "0.5748308", "0.5748308", "0.5648444", "0.5609055", "0.56032234", "0.56032234", "0.56032234", "0.55730045", "0.55637836", "0.55282193", "0.55282193", "0.55282193", "0.55282193", "0.55282193", "0.54975253", "0.54891586", "0.5455014", "0.5455014", "0.5455014", "0.5455014", "0.5455014", "0.5455014", "0.5455014", "0.5455014", "0.5435704", "0.5435704", "0.5435704", "0.5435704", "0.5435704", "0.5418939", "0.5417186" ]
0.67486435
5
Figure out which path forward (via seg.forwardSegs) results in the longest path until the furthest edge is reached. The number of segments in this path will be seg.forwardPressure
function computeSlotSegPressures(seg) { var forwardSegs = seg.forwardSegs; var forwardPressure = 0; var i; var forwardSeg; if (seg.forwardPressure === undefined) { // not already computed for (i = 0; i < forwardSegs.length; i++) { forwardSeg = forwardSegs[i]; // figure out the child's maximum forward path computeSlotSegPressures(forwardSeg); // either use the existing maximum, or use the child's forward pressure // plus one (for the forwardSeg itself) forwardPressure = Math.max(forwardPressure, 1 + forwardSeg.forwardPressure); } seg.forwardPressure = forwardPressure; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function computeForwardSlotSegs(levels){var i;var level;var j;var seg;var k;for(i=0;i<levels.length;i++){level=levels[i];for(j=0;j<level.length;j++){seg=level[j];seg.forwardSegs=[];for(k=i+1;k<levels.length;k++){computeSlotSegCollisions(seg,levels[k],seg.forwardSegs);}}}}// Figure out which path forward (via seg.forwardSegs) results in the longest path until", "function computeForwardSlotSegs(levels) {\n var i;\n var level;\n var j;\n var seg;\n var k;\n\n for (i = 0; i < levels.length; i++) {\n level = levels[i];\n\n for (j = 0; j < level.length; j++) {\n seg = level[j];\n seg.forwardSegs = [];\n\n for (k = i + 1; k < levels.length; k++) {\n computeSlotSegCollisions(seg, levels[k], seg.forwardSegs);\n }\n }\n }\n } // Figure out which path forward (via seg.forwardSegs) results in the longest path until", "function computeSlotSegPressures(seg) {\n var forwardSegs = seg.forwardSegs;\n var forwardPressure = 0;\n var i;\n var forwardSeg;\n\n if (seg.forwardPressure == null) {\n // not already computed\n for (i = 0; i < forwardSegs.length; i++) {\n forwardSeg = forwardSegs[i]; // figure out the child's maximum forward path\n\n computeSlotSegPressures(forwardSeg); // either use the existing maximum, or use the child's forward pressure\n // plus one (for the forwardSeg itself)\n\n forwardPressure = Math.max(forwardPressure, 1 + forwardSeg.forwardPressure);\n }\n\n seg.forwardPressure = forwardPressure;\n }\n } // Calculate seg.forwardCoord and seg.backwardCoord for the segment, where both values range", "function computeSlotSegPressures(seg) {\n var forwardSegs = seg.forwardSegs;\n var forwardPressure = 0;\n var i, forwardSeg;\n\n if (seg.forwardPressure === undefined) { // not already computed\n\n for (i = 0; i < forwardSegs.length; i++) {\n forwardSeg = forwardSegs[i];\n\n // figure out the child's maximum forward path\n computeSlotSegPressures(forwardSeg);\n\n // either use the existing maximum, or use the child's forward pressure\n // plus one (for the forwardSeg itself)\n forwardPressure = Math.max(\n forwardPressure,\n 1 + forwardSeg.forwardPressure\n );\n }\n\n seg.forwardPressure = forwardPressure;\n }\n }", "function computeForwardSlotSegs(levels) {\n var i;\n var level;\n var j;\n var seg;\n var k;\n\n for (i = 0; i < levels.length; i++) {\n level = levels[i];\n\n for (j = 0; j < level.length; j++) {\n seg = level[j];\n seg.forwardSegs = [];\n\n for (k = i + 1; k < levels.length; k++) {\n computeSlotSegCollisions(seg, levels[k], seg.forwardSegs);\n }\n }\n }\n } // Figure out which path forward (via seg.forwardSegs) results in the longest path until", "function computeSlotSegPressures(seg) {\n var forwardSegs = seg.forwardSegs;\n var forwardPressure = 0;\n var i;\n var forwardSeg;\n if (seg.forwardPressure === undefined) { // not already computed\n for (i = 0; i < forwardSegs.length; i++) {\n forwardSeg = forwardSegs[i];\n // figure out the child's maximum forward path\n computeSlotSegPressures(forwardSeg);\n // either use the existing maximum, or use the child's forward pressure\n // plus one (for the forwardSeg itself)\n forwardPressure = Math.max(forwardPressure, 1 + forwardSeg.forwardPressure);\n }\n seg.forwardPressure = forwardPressure;\n }\n}", "function computeSlotSegPressures(seg) {\n var forwardSegs = seg.forwardSegs;\n var forwardPressure = 0;\n var i;\n var forwardSeg;\n if (seg.forwardPressure === undefined) { // not already computed\n for (i = 0; i < forwardSegs.length; i++) {\n forwardSeg = forwardSegs[i];\n // figure out the child's maximum forward path\n computeSlotSegPressures(forwardSeg);\n // either use the existing maximum, or use the child's forward pressure\n // plus one (for the forwardSeg itself)\n forwardPressure = Math.max(forwardPressure, 1 + forwardSeg.forwardPressure);\n }\n seg.forwardPressure = forwardPressure;\n }\n}", "function computeSlotSegPressures(seg) {\n var forwardSegs = seg.forwardSegs;\n var forwardPressure = 0;\n var i;\n var forwardSeg;\n if (seg.forwardPressure == null) { // not already computed\n for (i = 0; i < forwardSegs.length; i += 1) {\n forwardSeg = forwardSegs[i];\n // figure out the child's maximum forward path\n computeSlotSegPressures(forwardSeg);\n // either use the existing maximum, or use the child's forward pressure\n // plus one (for the forwardSeg itself)\n forwardPressure = Math.max(forwardPressure, 1 + forwardSeg.forwardPressure);\n }\n seg.forwardPressure = forwardPressure;\n }\n }", "function computeSlotSegPressures(seg) {\n var forwardSegs = seg.forwardSegs;\n var forwardPressure = 0;\n var i;\n var forwardSeg;\n if (seg.forwardPressure === undefined) {\n for (i = 0; i < forwardSegs.length; i++) {\n forwardSeg = forwardSegs[i];\n // figure out the child's maximum forward path\n computeSlotSegPressures(forwardSeg);\n // either use the existing maximum, or use the child's forward pressure\n // plus one (for the forwardSeg itself)\n forwardPressure = Math.max(forwardPressure, 1 + forwardSeg.forwardPressure);\n }\n seg.forwardPressure = forwardPressure;\n }\n}", "function computeSlotSegPressures(seg) {\n var forwardSegs = seg.forwardSegs;\n var forwardPressure = 0;\n var i;\n var forwardSeg;\n if (seg.forwardPressure === undefined) {\n for (i = 0; i < forwardSegs.length; i++) {\n forwardSeg = forwardSegs[i];\n // figure out the child's maximum forward path\n computeSlotSegPressures(forwardSeg);\n // either use the existing maximum, or use the child's forward pressure\n // plus one (for the forwardSeg itself)\n forwardPressure = Math.max(forwardPressure, 1 + forwardSeg.forwardPressure);\n }\n seg.forwardPressure = forwardPressure;\n }\n}", "function computeSlotSegPressures(seg) {\n var forwardSegs = seg.forwardSegs;\n var forwardPressure = 0;\n var i;\n var forwardSeg;\n if (seg.forwardPressure === undefined) {\n for (i = 0; i < forwardSegs.length; i++) {\n forwardSeg = forwardSegs[i];\n // figure out the child's maximum forward path\n computeSlotSegPressures(forwardSeg);\n // either use the existing maximum, or use the child's forward pressure\n // plus one (for the forwardSeg itself)\n forwardPressure = Math.max(forwardPressure, 1 + forwardSeg.forwardPressure);\n }\n seg.forwardPressure = forwardPressure;\n }\n}", "function getMaxFlow()\n {\n\n Graph.instance.edges.forEach(\n function(key, edge)\n {\n edge.state.flow = 0;\n })\n\n var no_path_found = false;\n currentFlow = 0;\n while(!no_path_found)\n {\n Graph.instance.nodes.forEach(\n function(key, node)\n {\n node.state.predecessor = null;\n });\n var search_queue = [state.sourceId];\n var source = Graph.instance.nodes.get(state.sourceId);\n source.state.predecessor = {};\n while(Graph.instance.nodes.get(state.targetId).state.predecessor == null && search_queue.length > 0 )\n {\n var node_to_expand = search_queue.shift();\n var node = Graph.instance.nodes.get(node_to_expand);\n var out_edges = node.getOutEdges();\n for (var i = 0; i < out_edges.length; i++)\n {\n var edge_out = out_edges[i];\n\n if(edge_out.end.state.predecessor == null && edge_out.resources[0] > edge_out.state.flow)\n {\n search_queue.push(edge_out.end.id);\n edge_out.end.state.predecessor =\n {\n \"node\": node_to_expand,\n \"edge\": edge_out.id,\n \"residual-capacity\":edge_out.resources[0] - edge_out.state.flow,\n \"direction\": 1\n };\n }\n }\n\n var in_edges = node.getInEdges();\n for (var i = 0; i < in_edges.length; i++)\n {\n var edge_in = in_edges[i];\n\n if(edge_in.start.state.predecessor == null && edge_in.state.flow > 0)\n {\n search_queue.push(edge_in.start.id);\n edge_in.start.state.predecessor =\n {\n \"node\": node_to_expand,\n \"edge\": edge_in.id,\n \"residual-capacity\": edge_in.state.flow,\n \"direction\": -1\n };\n }\n }\n }\n\n if(Graph.instance.nodes.get(state.targetId).state.predecessor != null)\n {\n var path = [];\n var augmentation = Number.MAX_SAFE_INTEGER;\n var next_path_node = state.targetId;\n\n //gather path\n while(next_path_node != state.sourceId)\n {\n var node = Graph.instance.nodes.get(next_path_node);\n path.push(node.state.predecessor);\n augmentation = Math.min(node.state.predecessor[\"residual-capacity\"], augmentation);\n next_path_node = node.state.predecessor[\"node\"];\n }\n\n //apply path\n for (var i = 0; i < path.length; i++)\n {\n var predecessor = path[i];\n var edge = Graph.instance.edges.get(predecessor[\"edge\"]);\n edge.state.flow += predecessor[\"direction\"] * augmentation;\n\n }\n currentFlow += augmentation;\n\n\n }\n else\n no_path_found = true;\n }\n\t\tmaxFlow = currentFlow;\n Graph.instance.nodes.forEach(\n function(key, node){\n\t\t\t\tbs[node.id] = node.b;\n if(node.id == state.sourceId){\n\t\t\t\t\tnode.b = currentFlow;\n\t\t\t\t\tbOfS = node.b;\n\t\t\t\t}else if(node.id == state.targetId){\n\t\t\t\t\tnode.b = -currentFlow;\n\t\t\t\t\tbOfT = node.b;\n\t\t\t\t}else{\n\t\t\t\t\tnode.b = 0;\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tGraph.instance.edges.forEach(\n function(key, edge)\n {\n edge.state.flow = 0;\n })\n\n var no_path_found = false;\n currentFlow = 0;\n state.current_step = STEP_MAINLOOP;\n logger.log(\"Init of maxflow.\");\n\n }", "function computeSlotSegPressures(seg) {\n\tvar forwardSegs = seg.forwardSegs;\n\tvar forwardPressure = 0;\n\tvar i, forwardSeg;\n\n\tif (seg.forwardPressure === undefined) { // not already computed\n\n\t\tfor (i=0; i<forwardSegs.length; i++) {\n\t\t\tforwardSeg = forwardSegs[i];\n\n\t\t\t// figure out the child's maximum forward path\n\t\t\tcomputeSlotSegPressures(forwardSeg);\n\n\t\t\t// either use the existing maximum, or use the child's forward pressure\n\t\t\t// plus one (for the forwardSeg itself)\n\t\t\tforwardPressure = Math.max(\n\t\t\t\tforwardPressure,\n\t\t\t\t1 + forwardSeg.forwardPressure\n\t\t\t);\n\t\t}\n\n\t\tseg.forwardPressure = forwardPressure;\n\t}\n}", "function computeSlotSegPressures(seg) {\n\tvar forwardSegs = seg.forwardSegs;\n\tvar forwardPressure = 0;\n\tvar i, forwardSeg;\n\n\tif (seg.forwardPressure === undefined) { // not already computed\n\n\t\tfor (i=0; i<forwardSegs.length; i++) {\n\t\t\tforwardSeg = forwardSegs[i];\n\n\t\t\t// figure out the child's maximum forward path\n\t\t\tcomputeSlotSegPressures(forwardSeg);\n\n\t\t\t// either use the existing maximum, or use the child's forward pressure\n\t\t\t// plus one (for the forwardSeg itself)\n\t\t\tforwardPressure = Math.max(\n\t\t\t\tforwardPressure,\n\t\t\t\t1 + forwardSeg.forwardPressure\n\t\t\t);\n\t\t}\n\n\t\tseg.forwardPressure = forwardPressure;\n\t}\n}", "function computeSlotSegPressures(seg) {\n\tvar forwardSegs = seg.forwardSegs;\n\tvar forwardPressure = 0;\n\tvar i, forwardSeg;\n\n\tif (seg.forwardPressure === undefined) { // not already computed\n\n\t\tfor (i=0; i<forwardSegs.length; i++) {\n\t\t\tforwardSeg = forwardSegs[i];\n\n\t\t\t// figure out the child's maximum forward path\n\t\t\tcomputeSlotSegPressures(forwardSeg);\n\n\t\t\t// either use the existing maximum, or use the child's forward pressure\n\t\t\t// plus one (for the forwardSeg itself)\n\t\t\tforwardPressure = Math.max(\n\t\t\t\tforwardPressure,\n\t\t\t\t1 + forwardSeg.forwardPressure\n\t\t\t);\n\t\t}\n\n\t\tseg.forwardPressure = forwardPressure;\n\t}\n}", "function computeSlotSegPressures(seg) {\n\tvar forwardSegs = seg.forwardSegs;\n\tvar forwardPressure = 0;\n\tvar i, forwardSeg;\n\n\tif (seg.forwardPressure === undefined) { // not already computed\n\n\t\tfor (i=0; i<forwardSegs.length; i++) {\n\t\t\tforwardSeg = forwardSegs[i];\n\n\t\t\t// figure out the child's maximum forward path\n\t\t\tcomputeSlotSegPressures(forwardSeg);\n\n\t\t\t// either use the existing maximum, or use the child's forward pressure\n\t\t\t// plus one (for the forwardSeg itself)\n\t\t\tforwardPressure = Math.max(\n\t\t\t\tforwardPressure,\n\t\t\t\t1 + forwardSeg.forwardPressure\n\t\t\t);\n\t\t}\n\n\t\tseg.forwardPressure = forwardPressure;\n\t}\n}", "function computeSlotSegPressures(seg) {\n\tvar forwardSegs = seg.forwardSegs;\n\tvar forwardPressure = 0;\n\tvar i, forwardSeg;\n\n\tif (seg.forwardPressure === undefined) { // not already computed\n\n\t\tfor (i=0; i<forwardSegs.length; i++) {\n\t\t\tforwardSeg = forwardSegs[i];\n\n\t\t\t// figure out the child's maximum forward path\n\t\t\tcomputeSlotSegPressures(forwardSeg);\n\n\t\t\t// either use the existing maximum, or use the child's forward pressure\n\t\t\t// plus one (for the forwardSeg itself)\n\t\t\tforwardPressure = Math.max(\n\t\t\t\tforwardPressure,\n\t\t\t\t1 + forwardSeg.forwardPressure\n\t\t\t);\n\t\t}\n\n\t\tseg.forwardPressure = forwardPressure;\n\t}\n}", "function computeSlotSegPressures(seg) {\n\tvar forwardSegs = seg.forwardSegs;\n\tvar forwardPressure = 0;\n\tvar i, forwardSeg;\n\n\tif (seg.forwardPressure === undefined) { // not already computed\n\n\t\tfor (i=0; i<forwardSegs.length; i++) {\n\t\t\tforwardSeg = forwardSegs[i];\n\n\t\t\t// figure out the child's maximum forward path\n\t\t\tcomputeSlotSegPressures(forwardSeg);\n\n\t\t\t// either use the existing maximum, or use the child's forward pressure\n\t\t\t// plus one (for the forwardSeg itself)\n\t\t\tforwardPressure = Math.max(\n\t\t\t\tforwardPressure,\n\t\t\t\t1 + forwardSeg.forwardPressure\n\t\t\t);\n\t\t}\n\n\t\tseg.forwardPressure = forwardPressure;\n\t}\n}", "function computeSlotSegPressures(seg) {\n\tvar forwardSegs = seg.forwardSegs;\n\tvar forwardPressure = 0;\n\tvar i, forwardSeg;\n\n\tif (seg.forwardPressure === undefined) { // not already computed\n\n\t\tfor (i=0; i<forwardSegs.length; i++) {\n\t\t\tforwardSeg = forwardSegs[i];\n\n\t\t\t// figure out the child's maximum forward path\n\t\t\tcomputeSlotSegPressures(forwardSeg);\n\n\t\t\t// either use the existing maximum, or use the child's forward pressure\n\t\t\t// plus one (for the forwardSeg itself)\n\t\t\tforwardPressure = Math.max(\n\t\t\t\tforwardPressure,\n\t\t\t\t1 + forwardSeg.forwardPressure\n\t\t\t);\n\t\t}\n\n\t\tseg.forwardPressure = forwardPressure;\n\t}\n}", "function computeSlotSegPressures(seg) {\n\tvar forwardSegs = seg.forwardSegs;\n\tvar forwardPressure = 0;\n\tvar i, forwardSeg;\n\n\tif (seg.forwardPressure === undefined) { // not already computed\n\n\t\tfor (i=0; i<forwardSegs.length; i++) {\n\t\t\tforwardSeg = forwardSegs[i];\n\n\t\t\t// figure out the child's maximum forward path\n\t\t\tcomputeSlotSegPressures(forwardSeg);\n\n\t\t\t// either use the existing maximum, or use the child's forward pressure\n\t\t\t// plus one (for the forwardSeg itself)\n\t\t\tforwardPressure = Math.max(\n\t\t\t\tforwardPressure,\n\t\t\t\t1 + forwardSeg.forwardPressure\n\t\t\t);\n\t\t}\n\n\t\tseg.forwardPressure = forwardPressure;\n\t}\n}", "function computeSlotSegPressures(seg) {\n\tvar forwardSegs = seg.forwardSegs;\n\tvar forwardPressure = 0;\n\tvar i, forwardSeg;\n\n\tif (seg.forwardPressure === undefined) { // not already computed\n\n\t\tfor (i=0; i<forwardSegs.length; i++) {\n\t\t\tforwardSeg = forwardSegs[i];\n\n\t\t\t// figure out the child's maximum forward path\n\t\t\tcomputeSlotSegPressures(forwardSeg);\n\n\t\t\t// either use the existing maximum, or use the child's forward pressure\n\t\t\t// plus one (for the forwardSeg itself)\n\t\t\tforwardPressure = Math.max(\n\t\t\t\tforwardPressure,\n\t\t\t\t1 + forwardSeg.forwardPressure\n\t\t\t);\n\t\t}\n\n\t\tseg.forwardPressure = forwardPressure;\n\t}\n}", "function computeSlotSegPressures(seg) {\n\tvar forwardSegs = seg.forwardSegs;\n\tvar forwardPressure = 0;\n\tvar i, forwardSeg;\n\n\tif (seg.forwardPressure === undefined) { // not already computed\n\n\t\tfor (i=0; i<forwardSegs.length; i++) {\n\t\t\tforwardSeg = forwardSegs[i];\n\n\t\t\t// figure out the child's maximum forward path\n\t\t\tcomputeSlotSegPressures(forwardSeg);\n\n\t\t\t// either use the existing maximum, or use the child's forward pressure\n\t\t\t// plus one (for the forwardSeg itself)\n\t\t\tforwardPressure = Math.max(\n\t\t\t\tforwardPressure,\n\t\t\t\t1 + forwardSeg.forwardPressure\n\t\t\t);\n\t\t}\n\n\t\tseg.forwardPressure = forwardPressure;\n\t}\n}", "function computeSlotSegPressures(seg) {\n\tvar forwardSegs = seg.forwardSegs;\n\tvar forwardPressure = 0;\n\tvar i, forwardSeg;\n\n\tif (seg.forwardPressure === undefined) { // not already computed\n\n\t\tfor (i=0; i<forwardSegs.length; i++) {\n\t\t\tforwardSeg = forwardSegs[i];\n\n\t\t\t// figure out the child's maximum forward path\n\t\t\tcomputeSlotSegPressures(forwardSeg);\n\n\t\t\t// either use the existing maximum, or use the child's forward pressure\n\t\t\t// plus one (for the forwardSeg itself)\n\t\t\tforwardPressure = Math.max(\n\t\t\t\tforwardPressure,\n\t\t\t\t1 + forwardSeg.forwardPressure\n\t\t\t);\n\t\t}\n\n\t\tseg.forwardPressure = forwardPressure;\n\t}\n}", "function computeSlotSegPressures(seg) {\n\tvar forwardSegs = seg.forwardSegs;\n\tvar forwardPressure = 0;\n\tvar i, forwardSeg;\n\n\tif (seg.forwardPressure === undefined) { // not already computed\n\n\t\tfor (i=0; i<forwardSegs.length; i++) {\n\t\t\tforwardSeg = forwardSegs[i];\n\n\t\t\t// figure out the child's maximum forward path\n\t\t\tcomputeSlotSegPressures(forwardSeg);\n\n\t\t\t// either use the existing maximum, or use the child's forward pressure\n\t\t\t// plus one (for the forwardSeg itself)\n\t\t\tforwardPressure = Math.max(\n\t\t\t\tforwardPressure,\n\t\t\t\t1 + forwardSeg.forwardPressure\n\t\t\t);\n\t\t}\n\n\t\tseg.forwardPressure = forwardPressure;\n\t}\n}", "function computeSlotSegPressures(seg) {\n\tvar forwardSegs = seg.forwardSegs;\n\tvar forwardPressure = 0;\n\tvar i, forwardSeg;\n\n\tif (seg.forwardPressure === undefined) { // not already computed\n\n\t\tfor (i=0; i<forwardSegs.length; i++) {\n\t\t\tforwardSeg = forwardSegs[i];\n\n\t\t\t// figure out the child's maximum forward path\n\t\t\tcomputeSlotSegPressures(forwardSeg);\n\n\t\t\t// either use the existing maximum, or use the child's forward pressure\n\t\t\t// plus one (for the forwardSeg itself)\n\t\t\tforwardPressure = Math.max(\n\t\t\t\tforwardPressure,\n\t\t\t\t1 + forwardSeg.forwardPressure\n\t\t\t);\n\t\t}\n\n\t\tseg.forwardPressure = forwardPressure;\n\t}\n}", "function computeSlotSegPressures(seg) {\n\t\tvar forwardSegs = seg.forwardSegs;\n\t\tvar forwardPressure = 0;\n\t\tvar i, forwardSeg;\n\n\t\tif (seg.forwardPressure === undefined) { // not already computed\n\n\t\t\tfor (i=0; i<forwardSegs.length; i++) {\n\t\t\t\tforwardSeg = forwardSegs[i];\n\n\t\t\t\t// figure out the child's maximum forward path\n\t\t\t\tcomputeSlotSegPressures(forwardSeg);\n\n\t\t\t\t// either use the existing maximum, or use the child's forward pressure\n\t\t\t\t// plus one (for the forwardSeg itself)\n\t\t\t\tforwardPressure = Math.max(\n\t\t\t\t\tforwardPressure,\n\t\t\t\t\t1 + forwardSeg.forwardPressure\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tseg.forwardPressure = forwardPressure;\n\t\t}\n\t}", "function computeSlotSegPressures(seg) {\n var forwardSegs = seg.forwardSegs;\n var forwardPressure = 0;\n var i;\n var forwardSeg;\n\n if (seg.forwardPressure === undefined) {\n // not already computed\n for (i = 0; i < forwardSegs.length; i++) {\n forwardSeg = forwardSegs[i]; // figure out the child's maximum forward path\n\n computeSlotSegPressures(forwardSeg); // either use the existing maximum, or use the child's forward pressure\n // plus one (for the forwardSeg itself)\n\n forwardPressure = Math.max(forwardPressure, 1 + forwardSeg.forwardPressure);\n }\n\n seg.forwardPressure = forwardPressure;\n }\n } // Find all the segments in `otherSegs` that vertically collide with `seg`.", "function ka(a){var b,c,d=a.forwardSegs,e=0;if(void 0===a.forwardPressure){// not already computed\nfor(b=0;b<d.length;b++)c=d[b],\n// figure out the child's maximum forward path\nka(c),\n// either use the existing maximum, or use the child's forward pressure\n// plus one (for the forwardSeg itself)\ne=Math.max(e,1+c.forwardPressure);a.forwardPressure=e}}", "path(start, end)\n {\n // Check if the end is reachable\n let endInfo = this.positionInfo(end);\n if (endInfo.passable === false)\n return undefined;\n\n // For node n, parent[n] is the node immediately preceding it on the cheapest path from start to n currently known\n let parent = new Map();\n\n // For node n, gScore[n] is the cost of the cheapest path from start to n currently known\n let gScore = new Map([[start.toString(), 0]]);\n\n // For node n, fScore[n] = gScore[n] + h(n)\n let fScore = new Map([[start.toString(), 0]]);\n\n // The heap of discovered nodes that need to be (re-)expanded\n let openHeap = new BinaryHeap(node => fScore.get(node.toString()) || 0);\n openHeap.push(start);\n\n // The set of closed nodes\n let closedSet = new Set();\n\n // Iterate while the heap is not empty\n while (openHeap.size > 0)\n {\n // Grab the lowest f(x) to process next\n let node = openHeap.pop();\n\n // End case -- result has been found, return the traced path\n if (node.x === end.x && node.y === end.y)\n {\n let path = [node];\n while (parent.has(node.toString()))\n {\n node = parent.get(node.toString());\n path.unshift(node);\n }\n return path.map(position => this.positionInfo(position));\n }\n\n // Normal case -- move node from open to closed, process each of its neighbors\n closedSet.add(node.toString());\n\n // Find all neighbors for the current node\n for (let neighbor of this.getNeighbors(node))\n {\n let neighborInfo = this.positionInfo(neighbor);\n\n // If the neighbor is already closed or is not passable, then continue\n if (closedSet.has(neighbor.toString()) || neighborInfo.passable === false)\n continue;\n\n // The g score is the shortest distance from start to current node\n // We need to check if the path we have arrived at this neighbor is the shortest one we have seen yet\n let gScoreTentative = gScore.get(node.toString()) + neighborInfo.cost;\n if (!gScore.has(neighbor.toString()) || gScoreTentative < gScore.get(neighbor.toString()))\n {\n parent.set(neighbor.toString(), node);\n gScore.set(neighbor.toString(), gScoreTentative);\n fScore.set(neighbor.toString(), gScoreTentative + Vector.manhattanDistance(neighbor, end));\n\n if (!openHeap.has(neighbor))\n openHeap.push(neighbor);\n else\n openHeap.rescoreElement(neighbor);\n }\n }\n }\n\n // No path found, so return undefined\n return undefined;\n }", "function computeSlotSegPressures(seg){var forwardSegs=seg.forwardSegs;var forwardPressure=0;var i;var forwardSeg;if(seg.forwardPressure===undefined){// not already computed\nfor(i=0;i<forwardSegs.length;i++){forwardSeg=forwardSegs[i];// figure out the child's maximum forward path\ncomputeSlotSegPressures(forwardSeg);// either use the existing maximum, or use the child's forward pressure\n// plus one (for the forwardSeg itself)\nforwardPressure=Math.max(forwardPressure,1+forwardSeg.forwardPressure);}seg.forwardPressure=forwardPressure;}}// Find all the segments in `otherSegs` that vertically collide with `seg`.", "function findShortestPath(){\n\t\tstate.edgesOfSP = [];\n\t\tstate.shortestPath = [];\n\t\t\t\t\n\t\tGraph.instance.nodes.forEach(\n function(key, node)\n {\n\t\t\t\t\t\t\t\t\n\t\t\t\tnode.state.distance = Number.MAX_SAFE_INTEGER;\n\t\t\t\tnode.state.predecessor = null;\n });\n\n var target = Graph.instance.nodes.get(state.targetId);\n target.state.distance = Number.MAX_SAFE_INTEGER;\n\t\tvar source = Graph.instance.nodes.get(state.sourceId);\n\t\tsource.state.distance = 0;\n\t\tsource.state.predecessor = {\n\t\t\t\"prev_node\": state.sourceId,\n\t\t\t\"direction\": 1\n\t\t}\n\t\t\n\t\tvar usedUpEdges=new Array();\n\t\n\t\tfor(var i = 0; i < Graph.instance.nodes.size(); i++){\n\t\t\tGraph.instance.edges.forEach(function(key,edge){\n\t\t\t\tvar edge_startnode = edge.start;\n\t\t\t\tvar edge_endnode = edge.end;\n\n\t\t\t\tif(!edge.state.usedUp && edge_endnode.usedUp == false && edge_startnode.usedUp == false){\n\t\t\t\t\t\n\t\t\t\t\tif(edge.resources[0] - edge.state.flow > 0){\n\t\t\t\t\t\tif(edge.state.flow > 0){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(edge_endnode.state.distance - edge.state.cost < edge_startnode.state.distance){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tedge_startnode.state.distance = edge_endnode.state.distance - edge.resources[1];\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tedge_startnode.state.predecessor = {\n\t\t\t\t\t\t\t\t\t\"edge_id\": edge.id*(-1)-1,\n\t\t\t\t\t\t\t\t\t\"prev_node\": edge_endnode.id,\n\t\t\t\t\t\t\t\t\t\"direction\": -1\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}\n\t\t\t\t\t\tif(edge_startnode.state.distance + edge.resources[1] < edge_endnode.state.distance){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tedge_endnode.state.distance = edge_startnode.state.distance + edge.resources[1];\n\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tedge_endnode.state.predecessor = {\n\t\t\t\t\t\t\t\t\t\t\"edge_id\": edge.id,\n\t\t\t\t\t\t\t\t\t\t\"prev_node\": edge_startnode.id,\n\t\t\t\t\t\t\t\t\t\t\"direction\": 1\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\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t});\n\t\t\tGraph.instance.edges.forEach(function(key,edge){\n\t\t\t\tvar edge_startnode = edge.start;\n\t\t\t\tvar edge_endnode = edge.end;\n\t\t\t\tvar numberOfUsedUp = 0;\n\t\t\t\t\n\t\t\t\t\tif (edge.state.usedUp){\n\t\t\t\t\t\tusedUpEdges.push(edge);\n\t\t\t\t\t\tvar inE = edge_endnode.getInEdges();\n\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor(var i = 0; i<inE.length; i++){\n\t\t\t\t\t\t\tif(inE[i].state.usedUp){\n\t\t\t\t\t\t\t\tnumberOfUsedUp++;\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\tif(numberOfUsedUp != inE.length){\n\t\t\t\t\t\t\tinE.filter(function(e){\n\t\t\t\t\t\t\t\treturn !e.state.usedUp;\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tinE.sort(function(a,b){\n\t\t\t\t\t\t\t\t\treturn (a.resources[1]) - (b.resources[1]);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tvar e;\n\t\t\t\t\t\t\tvar id=-1;\n\t\t\t\t\t\t\tfor(var i = 0; i<inE.length; i++){\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif(inE[i].start.predecessor == null){\n\n\t\t\t\t\t\t\t\t\tinE[i].start.state.distance = 0;\n\t\t\t\t\t\t\t\t\tinE[i].start.state.predecessor = {\n\t\t\t\t\t\t\t\t\t\t\"edge_id\" : inE[i].id,\n\t\t\t\t\t\t\t\t\t\t\"prev_node\": inE[i].start.id,\n\t\t\t\t\t\t\t\t\t\t\"direction\" : 1\n\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif(!inE[i].state.usedUp && inE[i].start.state.predecessor[\"direction\"] == 1){\n\t\t\t\t\t\t\t\t\tid = i;\t\n\t\t\t\t\t\t\t\t\te = inE[id];\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\tif(id != -1){\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tedge_endnode.state.distance = edge_startnode.state.distance + e.resources[1];\n\t\t\t\t\t\t\t\tedge_endnode.state.predecessor = {\n\t\t\t\t\t\t\t\t\t\t\t\"edge_id\": e.id,\n\t\t\t\t\t\t\t\t\t\t\t\"prev_node\": inE[id].start.id,\n\t\t\t\t\t\t\t\t\t\t\t\"direction\": 1\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tedge_endnode.state.distance = edge_startnode.state.distance + edge.resources[1];\n\t\t\t\t\t\t\t\tedge_endnode.state.predecessor = {\n\t\t\t\t\t\t\t\t\t\t\t\"edge_id\": edge.id,\n\t\t\t\t\t\t\t\t\t\t\t\"prev_node\": edge.start.id,\n\t\t\t\t\t\t\t\t\t\t\t\"direction\": 1\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tedge_endnode.usedUp = true;\n\t\t\t\t\t\t\tedge_endnode.state.distance = edge_startnode.state.distance + edge.resources[1];\n\t\t\t\t\t\t\tusedUpNodes.push(edge_endnode);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\t\t\n\t\t\t});\n\n\t\t}\t\n\t\t\t\n\t\t//backtrack to find SP from s to t\n\t\tvar temp = Graph.instance.nodes.get(state.targetId);\t\n\t\t\t\n\t\twhile(temp.id != state.sourceId && \n\t\t$.inArray(state.sourceId, state.shortestPath.reverse()) != 0 &&\n\t\ttemp.state.predecessor[\"prev_node\"] != state.targetId){\n\t\t\t\n\n\t\tstate.shortestPath.reverse();\n\t\t\n\t\tif($.inArray(temp.id, state.shortestPath) == -1){\n\n\t\t\tvar inEdgesForTemp = temp.getInEdges();\n\t\t\t\n\t\t\tfor(var k = 0; k<inEdgesForTemp.length; k++){\n\t\t\t\t\n\t\t\t\tvar tempSP = state.shortestPath;\n\t\t\t\n\t\t\t\tif(tempSP.filter(function(e) { return e == inEdgesForTemp[k].start.id; }).length > 0 || inEdgesForTemp[k].start.id == state.targetId || \n\t\t\t\tinEdgesForTemp[k].state.usedUp || \n\t\t\t\tinEdgesForTemp[k].start.usedUp){\n\t\t\t\t\t\n\t\t\t\t\tinEdgesForTemp.splice(k,1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tinEdgesForTemp.sort(function(a,b){\n\t\t\t\t\t\n\t\t\t\t\treturn (a.start.state.distance + a.resources[1]) - (b.start.state.distance+b.resources[1]);\n\t\t\t\t\n\t\t\t});\n\t\t\t\n\n\t\t\tif(inEdgesForTemp.length == 0)\n\t\t\t\treturn;\n\t\t\telse{\n\t\t\t\ttemp.state.distance = inEdgesForTemp[0].start.state.distance + inEdgesForTemp[0].resources[1];\n\t\t\t\ttemp.state.predecessor[\"prev_node\"] = inEdgesForTemp[0].start.id;\n\t\t\t\ttemp.state.predecessor[\"edge_id\"] = inEdgesForTemp[0].id;\n\t\t\t\ttemp.state.predecessor[\"diresction\"] = 1;\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\t\t\t\t\t\n\n\t\t\tstate.shortestPath.unshift(temp.id);\n\t\t\t\n\t\t\tstate.shortestPath.unshift(temp.state.predecessor[\"prev_node\"]);\n\t\t\tvar temp1 = temp;\n\t\t\ttemp = Graph.instance.nodes.get(temp.state.predecessor[\"prev_node\"]);\n\t\t\t\n\t\t\tif(temp.state.predecessor[\"prev_node\"] == state.sourceId){\n\t\t\t\t\n\t\t\t\tstate.shortestPath.unshift(temp.state.predecessor[\"prev_node\"]);\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t}else if($.inArray(temp.state.predecessor[\"prev_node\"],state.shortestPath)!=-1 || \n\t\t\t\t\ttemp.state.predecessor[\"prev_node\"] == temp1.id || \n\t\t\t\t\ttemp.state.predecessor[\"prev_node\"] == state.targetId ||\n\t\t\t\t\ttemp.state.predecessor[\"prev_node\"]){\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\tvar inEdgesForTemp = temp.getInEdges();\n\t\t\t\t\n\t\t\t\tfor(var k = 0; k<inEdgesForTemp.length; k++){\n\n\t\t\t\t\tvar tempSP = state.shortestPath;\n\n\t\t\t\t\t\n\t\t\t\t\tif(tempSP.filter(function(e) { return e == inEdgesForTemp[k].start.id; }).length > 0 || inEdgesForTemp[k].start.id == state.targetId || \n\t\t\t\t\tinEdgesForTemp[k].state.usedUp || \n\t\t\t\t\tinEdgesForTemp[k].start.usedUp){\n\t\t\t\t\t\t\n\t\t\t\t\t\tinEdgesForTemp.splice(k,1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t\tinEdgesForTemp.sort(function(a,b){\n\n\t\t\t\t\t\treturn (a.start.state.distance + a.resources[1]) - (b.start.state.distance+b.resources[1]);\n\t\t\t\t\t\n\t\t\t\t});\n\t\t\t\t\n\n\t\t\t\tif(inEdgesForTemp.length == 0)\n\t\t\t\t\treturn;\n\t\t\t\telse{\n\t\t\t\t\ttemp.state.predecessor[\"prev_node\"] = inEdgesForTemp[0].start.id;\n\t\t\t\t\tif(temp.state.predecessor[\"prev_node\"] == state.sourceId){\n\t\t\t\t\t\ttemp.state.distance = inEdgesForTemp[0].start.state.distance + inEdgesForTemp[0].resources[1];\n\t\t\t\t\t\ttemp.state.predecessor[\"prev_node\"] = inEdgesForTemp[0].start.id;\n\t\t\t\t\t\ttemp.state.predecessor[\"edge_id\"] = inEdgesForTemp[0].id;\n\t\t\t\t\t\ttemp.state.predecessor[\"diresction\"] = 1;\n\t\t\t\t\t\tstate.shortestPath.unshift(temp.state.predecessor[\"prev_node\"]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\t\n\t\t\t\t\t\n\t\t}\n\t\t\n\t\tGraph.instance.nodes.forEach(function(key,node){\n\t\t\tstate.distancesOfNodes.push(node.state.distance);\n\t\t});\n\n\t\tfor(var j = 1; j<state.shortestPath.length; j++){\n\t\t\t\n\t\t\tGraph.instance.edges.forEach(function(key,edge){\n\t\t\t\t\tif(edge.start.id == state.shortestPath[j-1] && edge.end.id == state.shortestPath[j]){\n\t\t\t\t\t\tedge.inSP = true;\n\t\t\t\t\t\tstate.edgesOfSP.push(edge);\n\t\t\t\t\t\tedge.start.state.predecessor[\"direction\"] = 1;\n\t\t\t\t\t}\t\t\t\n\t\t\t});\n\t\t}\n\t\t\n\t\tstate.current_step = STEP_UPDATEPOTENTIALS;\n\t}", "function computeSegForwardBack(seg, seriesBackwardPressure, seriesBackwardCoord, eventOrderSpecs) {\n var forwardSegs = seg.forwardSegs;\n var i;\n\n if (seg.forwardCoord == null) {\n // not already computed\n if (!forwardSegs.length) {\n // if there are no forward segments, this segment should butt up against the edge\n seg.forwardCoord = 1;\n } else {\n // sort highest pressure first\n sortForwardSegs(forwardSegs, eventOrderSpecs); // this segment's forwardCoord will be calculated from the backwardCoord of the\n // highest-pressure forward segment.\n\n computeSegForwardBack(forwardSegs[0], seriesBackwardPressure + 1, seriesBackwardCoord, eventOrderSpecs);\n seg.forwardCoord = forwardSegs[0].backwardCoord;\n } // calculate the backwardCoord from the forwardCoord. consider the series\n\n\n seg.backwardCoord = seg.forwardCoord - (seg.forwardCoord - seriesBackwardCoord) / ( // available width for series\n seriesBackwardPressure + 1); // # of segments in the series\n // use this segment's coordinates to computed the coordinates of the less-pressurized\n // forward segments\n\n for (i = 0; i < forwardSegs.length; i++) {\n computeSegForwardBack(forwardSegs[i], 0, seg.forwardCoord, eventOrderSpecs);\n }\n }\n }", "function findpath(u) {\n\tfor (let e = nextedge[u]; e; e = g.nextAt(u,e)) {\n\t\tsteps++;\n\t\tlet v = g.mate(u,e);\n\t\tif (level[v] != level[u] + 1) continue;\n\t\tlet ee = match.at(v);\n\t\tif (ee == 0) { nextedge[u] = e; link[v] = e; return v; }\n\t\tlet w = g.mate(v,ee);\n\t\tif (level[w] != level[v] + 1) continue;\n\t\tlet x = findpath(w);\n\t\tif (x) {\n\t\t\tnextedge[u] = e; link[v] = e; link[w] = ee; return x;\n\t\t}\n\t}\n\tnextedge[u] = 0; return 0;\n}", "function computeSegForwardBack(seg, seriesBackwardPressure, seriesBackwardCoord, eventOrderSpecs) {\n var forwardSegs = seg.forwardSegs;\n var i;\n if (seg.forwardCoord == null) { // not already computed\n if (!forwardSegs.length) {\n // if there are no forward segments, this segment should butt up against the edge\n seg.forwardCoord = 1;\n }\n else {\n // sort highest pressure first\n sortForwardSegs(forwardSegs, eventOrderSpecs);\n // this segment's forwardCoord will be calculated from the backwardCoord of the\n // highest-pressure forward segment.\n computeSegForwardBack(forwardSegs[0], seriesBackwardPressure + 1, seriesBackwardCoord, eventOrderSpecs);\n seg.forwardCoord = forwardSegs[0].backwardCoord;\n }\n // calculate the backwardCoord from the forwardCoord. consider the series\n seg.backwardCoord = seg.forwardCoord -\n (seg.forwardCoord - seriesBackwardCoord) / // available width for series\n (seriesBackwardPressure + 1); // # of segments in the series\n // use this segment's coordinates to computed the coordinates of the less-pressurized\n // forward segments\n for (i = 0; i < forwardSegs.length; i += 1) {\n computeSegForwardBack(forwardSegs[i], 0, seg.forwardCoord, eventOrderSpecs);\n }\n }\n }", "function getForwardPathsLoopgains(paths){\r\n var forwardLoopgains = [];\r\n\r\n paths.forEach(p => {\r\n var forwardEdges = extractPathEdges(p);\r\n var flg = calculateLoopGain(forwardEdges);\r\n forwardLoopgains.push(flg);\r\n });\r\n\r\n return forwardLoopgains;\r\n}", "function traverse(cur_pos, tc, b, visited, optPaths) {\n if(tc<0) return -2;\n\n if(cur_pos==b){\n optPaths[b][\"spt\"] = tc;\n optPaths[b][\"path\"] = [];\n optPaths[b][\"path\"].push(b);\n optPaths[b][\"res\"] = graph_vertices[b];\n console.log(\"base case\");\n return optPaths[b][\"res\"];\n }\n\n // let copiedOptPaths = JSON.parse(JSON.stringify(optPaths));\n let maxRes = -1, rec_ans, maxST = -1;\n visited[cur_pos] = 1;\n let temp_path = [];\n\n for(let i=0; i<graph_edges[cur_pos].length; i++){\n let toVis = graph_edges[cur_pos][i][0];\n let nbr_wt = graph_edges[cur_pos][i][1];\n console.log(toVis, nbr_wt);\n \n if(visited[toVis]==0){\n visited[toVis]=1;\n rec_ans = traverse(toVis, tc-nbr_wt, b, visited, optPaths);\n visited[toVis]=0;\n\n // if(rec_ans>maxRes || (rec_ans==maxRes && (maxST<optPaths[b][\"spt\"]))){\n if(parseInt(rec_ans)>parseInt(maxRes) || (rec_ans==maxRes && (maxST<optPaths[b][\"spt\"]))){\n maxRes = rec_ans;\n maxST = optPaths[b][\"spt\"];\n\n temp_path = optPaths[toVis][\"path\"];\n // optPaths[cur_pos] = optPaths[toVis];\n console.log(\"max res update:\", maxRes, optPaths[cur_pos][\"path\"]);\n }\n }\n\n }\n\n if(maxRes != -1){\n optPaths[cur_pos][\"res\"] = maxRes + graph_vertices[cur_pos];\n temp_path.unshift(cur_pos);\n }\n \n optPaths[cur_pos][\"path\"] = temp_path;\n optPaths[cur_pos][\"spt\"] = maxST;\n // optPaths[cur_pos][\"res\"] += graph_vertices[cur_pos];\n\n visited[cur_pos] = 0; // backtracking\n if(maxRes==-1) return -2;\n\n console.log(\"return value:\", optPaths[cur_pos][\"res\"]);\n return optPaths[cur_pos][\"res\"];\n}", "_calculatePath() {\n\t\tlet startNode = { x: this.gridX, y: this.gridY };\n\t\tlet goalNode = { x: window.uncover.player.gridX, y: window.uncover.player.gridY };\n\t\tstartNode.g = 0;\n\t\tstartNode.f = Math.pow(startNode.x - goalNode.x, 2) + Math.pow(startNode.y - goalNode.y, 2);\n\n\t\tlet openList = [startNode];\n\t\tlet closedList = [];\n\n\t\tconst neighborPositions = [{ dx: 0, dy: -1}, { dx: 1, dy: 0}, { dx: 0, dy: 1}, { dx: -1, dy: 0}];\n\n\t\tlet iterations = 0;\n\t\twhile (openList.length > 0) {\n\t\t\titerations++;\n\t\t\tif (iterations >= this._maxIterations) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// Find node with minimum f\n\t\t\tlet currentNodeIndex = 0;\n\t\t\tfor (let i = 1; i < openList.length; i++) {\n\t\t\t\tif (openList[i].f < openList[currentNodeIndex].f) {\n\t\t\t\t\tcurrentNodeIndex = i;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlet currentNode = openList[currentNodeIndex];\n\t\t\topenList.splice(currentNodeIndex, 1);\n\t\t\tclosedList.push(currentNode);\n\n\t\t\t// Found the goal node, create path\n\t\t\tif (currentNode.x === goalNode.x && currentNode.y === goalNode.y) {\n\t\t\t\treturn this._constructPath(currentNode);\n\t\t\t}\n\n\t\t\t// Create adjacent neighbors\n\t\t\tconst neighbors = []; \n\t\t\tfor (let neighborPosition of neighborPositions) {\n\t\t\t\tconst xPosition = currentNode.x + neighborPosition.dx;\n\t\t\t\tconst yPosition = currentNode.y + neighborPosition.dy;\n\t\t\t\tif (xPosition < 0 || xPosition >= window.uncover.gameGrid.gridSize || yPosition < 0 || yPosition >= window.uncover.gameGrid.gridSize) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tconst isNeighborInClosedList = closedList.some((node) => node.x === xPosition && node.y === yPosition);\n\t\t\t\tif (isNeighborInClosedList) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (window.uncover.gameGrid.grid[xPosition][yPosition] != GridType.FILLED) {\n\t\t\t\t\tcontinue;\n\t\t\t\t} \n\n\t\t\t\tneighbors.push({ x: xPosition, y: yPosition, parent: currentNode });\n\t\t\t}\n\n\t\t\tfor (let neighbor of neighbors) {\n\t\t\t\tneighbor.g = currentNode.g + 1;\n\t\t\t\tneighbor.h = Math.pow(neighbor.x - goalNode.x, 2) + Math.pow(neighbor.y - goalNode.y, 2);\n\t\t\t\tneighbor.f = neighbor.g + neighbor.h;\n\n\t\t\t\tconst neighborInOpenListIndex = openList.findIndex((node) => node.x === neighbor.x && node.y === neighbor.y);\n\t\t\t\tconst isNeighborInOpenList = neighborInOpenListIndex >= 0;\n\t\t\t\tif (isNeighborInOpenList) {\n\t\t\t\t\tif (neighbor.g > openList[neighborInOpenListIndex].g) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\topenList.push(neighbor);\n\t\t\t}\n\t\t}\n\n\t\treturn [];\n\t}", "function findMinRoute (treasureMap) {\n const visited = create2DArray(treasureMap.length, treasureMap[0].length)\n const queue = [[0, 0]]\n let steps = 0\n while (queue.length !== 0) {\n const size = queue.length\n for (let i = 0; i < size; i++) {\n const curCord = queue.shift()\n console.log(curCord)\n if (curCord[0] < 0 ||\n curCord[1] < 0 ||\n curCord[0] >= treasureMap.length ||\n curCord[1] >= treasureMap[0].length) {\n continue\n }\n const curLoc = treasureMap[curCord[0]][curCord[1]]\n if (curLoc === 'X') {\n return steps\n } else if (visited[curCord[0]][curCord[1]] || curLoc === 'D') {\n continue\n } else {\n visited[curCord[0]][curCord[1]] = 1\n queue.push([curCord[0] + 1, curCord[1]],\n [curCord[0], curCord[1] + 1],\n [curCord[0] - 1, curCord[1]],\n [curCord[0], curCord[1] - 1])\n }\n }\n steps++\n }\n console.log(visited)\n return 'No treasure found'\n}", "searchShortestPathToEnds() {\n let shortest = null;\n let shortestDistance = Number.MAX_SAFE_INTEGER\n for (let i = 0; i < this.graph.nodes.length; i++) {\n let node = this.graph.nodes[i]\n if (node.id == 2 && node.distance < shortestDistance) {\n shortest = node;\n shortestDistance = node.distance\n }\n }\n if (shortest == null) {\n return null\n }\n return shortest\n }", "function findForwardPaths(start, end, nodes, paths, currPath){\r\n // The destination node is reached\r\n if (start === end){\r\n currPath.push(start);\r\n paths.push(currPath);\r\n return;\r\n }\r\n // Stop if loop is detected or there is no outgoing edges\r\n else if (currPath.includes(start) || (start.outgoingEdges).length < 1){\r\n return; \r\n }\r\n else{\r\n currPath.push(start);\r\n }\r\n\r\n for (let i=0; i < start.outgoingEdges.length; i++){\r\n nextNodeId = start.outgoingEdges[i].endNode;\r\n nextNode = nodes.find(x => x.id === nextNodeId);\r\n\r\n currPathCopy = [];\r\n\r\n // In js, an array passed in as a parameter is passed by reference\r\n // Manually make a copy of currPath to avoid mixing up different forward paths\r\n currPath.forEach(e => {\r\n currPathCopy.push(e);\r\n });\r\n\r\n findForwardPaths(nextNode, end, nodes, paths, currPathCopy);\r\n }\r\n}", "function pathLength() {\n\t\tvar l = this.getTotalLength();\n\t\treturn -l;\n\t}", "function GetPath() : int {\n\t\tnumberOfHops = 0; \n\t\tvar ToMovePos : int; \n\t\tvar i : int = 0;\n\t\tfor(var a : int = 0; a < ClosedNodes.Length; a++){ \n\t\t\tif (ClosedNodes[a] != 0){ \n\t\t\t\ti++; \n\t\t\t\t//Debug.Log(parent_Closed[a]+\" \"+ClosedNodes[a]);\n\t\t\t\t } }\n\t\tvar match_name = targetLeaf;\n\t\tfor(var b : int = (i-1); b >= 0 ; b--){\n\t\t\tif (ClosedNodes[b] == match_name){\n\t\t\t\tnumberOfHops++;\n\t\t\t\t//Debug.Log(parent_Closed[b]);\n\t\t\t\tmatch_name = parent_Closed[b];\n\t\t\t\tif (match_name == frogLeaf ){\n\t\t\t\t\tToMovePos = ClosedNodes[b];\n\t\t\t\t\tb = -20;\n\t\t\t\t\t//Debug.Log(\"ToMovePos \"+ToMovePos);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn ToMovePos;\n\t}", "function directPath(dir, current, goal, grid) {\r\n var start = current;\r\n var pth = [];\r\n // console.log(\"going from: \" + current + \" to \" + goal);\r\n while (start != goal) { \r\n switch (dir) {\r\n case \"left\" :\r\n // move only when it's not hitting a wall && it's an empty spot, or our goal\r\n if (start[1] > 0 && grid[start[0]][start[1] - 1] == 0 || (start[1] - 1 == goal[1] && start[0] == goal[0])) {\r\n start[1] --;\r\n // console.log(\"captain, we're moving left\");\r\n pth.push(start); // add to current path\r\n } else {\r\n return pth;\r\n }\r\n break;\r\n case \"right\" :\r\n if (start[1] <= grid[1].length && grid[start[0]][start[1] + 1] == 0 || (start[1] + 1 == goal[1] && start[0] == goal[0])) {\r\n start[1] ++;\r\n pth.push(start);\r\n } else {\r\n return pth;\r\n }\r\n break;\r\n case \"up\" :\r\n if (start[0] > 0 && grid[start[0] - 1][start[0]] == 0 || (start[0] - 1 == goal[0] && start[1] == goal[1])) {\r\n start[0] --;\r\n // console.log(\"moving up\");\r\n pth.push(start); // add to current path\r\n } else {\r\n return pth;\r\n }\r\n break;\r\n case \"down\" :\r\n if (start[0] < grid[0].length && grid[start[0] + 1][start[0]] == 0 || (start[0] + 1 == goal[0] && start[1] == goal[1])) {\r\n start[0] ++;\r\n // console.log(\"moving down\");\r\n pth.push(start); // add to current path\r\n } else {\r\n return pth;\r\n }\r\n break;\r\n default :\r\n return;\r\n }\r\n }\r\n if (start == end) {\r\n pth.push(start);\r\n return pth;\r\n }\r\n \r\n}", "function findPath (start, stop, mapToUse) {\n var checked = [];\n var queue = [];\n var villages = [];\n\n queue.push([start]);\n checked.push(start);\n\n while(queue.length !== 0){\n var path = queue.shift(); // Get shortest path\n var t = path[path.length - 1]; // Take last element without removing it\n var tx = t[0];\n var ty = t[1];\n\n // If the last element is the one we are looking for\n // return the path\n if((mapToUse[tx][ty]).position.equals(stop)){\n return path;\n }\n\n var newPath = [];\n // Add all adjacent nodes to paths and push them to the \"prio\" queue\n // Paths cannot go through moutains\n if(customIndexOf(checked, [(tx+1),ty]) == -1 &&\n !isOutOfBounds(tx+1, ty, mapToUse) &&\n isPassable(tx+1, ty, mapToUse)){\n newPath = path.slice();\n checked.push([(tx+1),ty]); // Push node to checked so we dont use it again\n newPath.push([(tx+1),ty]);\n queue.push(newPath.slice()); // Push old path plus new node to prio queue\n }\n\n if (customIndexOf(checked, [(tx-1),ty]) == -1 &&\n !isOutOfBounds(tx-1, ty, mapToUse) &&\n isPassable(tx-1, ty, mapToUse)) {\n newPath = path.slice();\n checked.push([(tx-1),ty]);\n newPath.push([(tx-1),ty]);\n queue.push(newPath.slice());\n }\n\n if (customIndexOf(checked, [tx,(ty+1)]) == -1 &&\n !isOutOfBounds(tx, ty+1, mapToUse) &&\n isPassable(tx, ty+1, mapToUse)) {\n newPath = path.slice();\n checked.push([tx,(ty+1)]);\n newPath.push([tx,(ty+1)]);\n queue.push(newPath.slice());\n }\n\n if (customIndexOf(checked, [tx,(ty-1)]) == -1 &&\n !isOutOfBounds(tx, ty-1, mapToUse) &&\n isPassable(tx, ty-1, mapToUse)) {\n newPath = path.slice();\n checked.push([tx,(ty-1)]);\n newPath.push([tx,(ty-1)]);\n queue.push(newPath.slice());\n }\n\n queue.sort(function(a, b){return a.length - b.length;}); // This is needed as I'm too lazy to create/use a prio queue\n }\n\n return null;\n}", "function applyPath(){\n\t\tvar cap = [];\n\t\tdelta = 0;\n\t\tGraph.instance.edges.forEach(function(key,edge){\n\t\t\tstate.edgePrevCost[edge.id] = edge.resources[1];\n\t\t});\n\t\tfor (var i =0; i<state.edgesOfSP.length; i++){\n\t\t\t\n\t\t\tcap[i] = state.edgesOfSP[i].resources[0]-state.edgesOfSP[i].state.flow;\n\t\t\t\n\t\t}\n var minCap = d3.min(cap);\n\t\t\n\t\tvar excessDemandMin = Math.min(Graph.instance.nodes.get(state.sourceId).b , -Graph.instance.nodes.get(state.targetId).b);\n\t\tdelta = Math.min(minCap, excessDemandMin);\n\t\t\n\t\n\t\tfor (var i = 0; i < state.edgesOfSP.length; i++){\n \n var edge = state.edgesOfSP[i];\n\n edge.state.flow += edge.start.state.predecessor[\"direction\"] * delta;\n\t\t\tminCost += delta * edge.edges[\"cost\"];\n }\n\t\tGraph.instance.nodes.forEach(function(key,node){\n\t\t\tbs[node.id] = node.b;\n\t\t\tif(node.id == state.sourceId){\n\t\t\t\tnode.b = node.b-delta;\n\t\t\t\tbOfS = node.b;\n\t\t\t}else if(node.id == state.targetId){\n\t\t\t\tnode.b = node.b + delta;\n\t\t\t\tbOfT = node.b;\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tnode.b = 0;\n\t\t\t}\n\t\t});\n\t\t\n\t\tGraph.instance.edges.forEach(function(key, edge) {\n\t\t\tedge.inSP = false;\n\t\t\tif(edge.state.flow == edge.resources[0]){\n\t\t\t\tedge.state.usedUp = true;\t\n\t\t\t}else{\n\t\t\t\tedge.state.usedUp = false;\t\n\n\t\t\t}\n });\n logger.log(\"Applied augmenting path with flow \"+state.augmentation);\n\t\tdel = 0;\n\t\tstate.distancesOfNodes = [];\n state.show_residual_graph = false;\n\t\tstate.shortestPath = [];\n state.current_step = STEP_MAINLOOP;\n\t\t\n\t}", "async function bfs(){\n var hist = {};\n var q = [];\n var starting_path = [starting_point];\n q.push(starting_path);\n var dist = 1; // distance from starting point\n\n // perform bfs search\n while(q.length > 0){\n var curr_path = q.shift(); // get oldest path in queue. path: [[x1, y1], [x2, y2], ...]\n var p = curr_path[curr_path.length - 1]; // get latest point in path. p: [x, y]\n var px = p[0];\n var py = p[1];\n\n // reached goal\n if(px == end_point[0] && py == end_point[1]){\n var arr = [];\n for(var i = 0; i < curr_path.length; i++){\n var point = curr_path[i];\n var x = point[0];\n var y = point[1];\n\n // Skip start and end drawing\n if((x == starting_point[0] && y == starting_point[1]) || (x == end_point[0] && y == end_point[1])){\n continue;\n }\n arr.push([x, y]);\n }\n for(var k = 0; k < (grid / 2); k++){\n drawSolution(arr, k);\n await sleep(time_sleep);\n }\n break;\n }\n\n if(curr_path.length - 1 >= dist){\n console.log(\"stage: \" + dist);\n dist++;\n for(var k = 0; k < (grid / 2); k++){\n drawBfsStage(id, q, curr_path.length, k);\n drawSingleCircle(curr_path[curr_path.length - 1], k, blue);\n await sleep(time_sleep_fast);\n }\n // await sleep(time_sleep);\n }\n\n // Adding neighbours\n for(var dx = -1; dx < 2; dx++){\n for(var dy = -1; dy < 2; dy++){\n if(dy * dy == dx * dx){ // skip diagonal neighbours\n continue;\n }\n var x = px + (dx * grid);\n var y = py + (dy * grid);\n var s = pointToString([x, y]);\n if(s in hist || x < 0 || y < 0 || x >= canvas.width || y >= canvas.height || isWall(s)){\n continue;\n }\n hist[s] = 1;\n \n // Skip start and end drawing\n if((x == starting_point[0] && y == starting_point[1])){\n continue;\n }\n //drawRectangle(id, x, y, grid - 1, grid - 1, 'green');\n let new_path = JSON.parse(JSON.stringify(curr_path)); // deep clone\n new_path.push([x, y]); // add neighbour to current path\n q.push(new_path);\n }\n }\n }\n console.log(\"done\");\n}", "function longestPath(g) {\n\t var visited = {};\n\n\t function dfs(v) {\n\t var label = g.node(v);\n\n\t if (_.has(visited, v)) {\n\t return label.rank;\n\t }\n\n\t visited[v] = true;\n\n\t var rank = _.min(_.map(g.outEdges(v), function (e) {\n\t return dfs(e.w) - g.edge(e).minlen;\n\t }));\n\n\t if (rank === Number.POSITIVE_INFINITY || // return value of _.map([]) for Lodash 3\n\t rank === undefined || // return value of _.map([]) for Lodash 4\n\t rank === null) {\n\t // return value of _.map([null])\n\t rank = 0;\n\t }\n\n\t return label.rank = rank;\n\t }\n\n\t _.forEach(g.sources(), dfs);\n\t }", "function findpath(u) {\n\tfor (let e = nextEdge[u]; e != 0; e = g.nextAt(u, e)) {\n\t\tsteps++;\n\t\tlet v = g.mate(u, e);\n\t\tif (g.res(e, u) == 0 || level[v] != level[u] + 1) continue;\n\t\tif (v == g.sink || findpath(v)) {\n\t\t\tlink[v] = e; nextEdge[u] = e; return true;\n\t\t}\n\t}\n\tnextEdge[u] = 0; return false;\n}", "function path() {\n if (finds(loc + 61) && tmp - 1 == result[loc + 61]) //bottom node to destinations node\n value = loc + 61;\n else if (finds(loc - 61) && tmp - 1 == result[loc - 61]) //top node to destinations node\n {\n value = loc - 61;\n } else if (\n (loc - 1) % 61 < loc % 61 &&\n finds(loc - 1) &&\n tmp - 1 == result[loc - 1]\n )\n //left side node to destination node\n value = loc - 1;\n else if (\n (loc + 1) % 61 > loc % 61 &&\n finds(loc + 1) &&\n tmp - 1 == result[loc + 1]\n )\n //right side node to destination node\n value = loc + 1;\n else if (\n finds(loc - 62) &&\n (loc - 62) % 61 < loc % 61 &&\n tmp - 1 == result[loc - 62]\n )//top right side node to destination node\n value = loc - 62;\n else if (\n finds(loc - 60) &&\n (loc - 60) % 61 > loc % 61 &&\n tmp - 1 == result[loc - 60]\n )//top left side node to destination node\n value = loc - 60;\n else if (\n finds(loc + 60) &&\n (loc + 60) % 61 < loc % 61 &&\n tmp - 1 == result[loc + 60]\n )//bottom right side node to destination node\n value = loc + 60;\n else if (\n finds(loc + 62) &&\n (loc + 62) % 61 > loc % 61 &&\n tmp - 1 == result[loc + 62]\n )//bottom right side node to destination node\n value = loc + 62;\n\n tmp = result[value];\n loc = value;\n if (loc != source)\n //this gives moving effect to bot\n {\n d[loc].style.backgroundColor = destinationColor;\n \n }\n}", "function longestPath(g){var visited={};function dfs(v){var label=g.node(v);if(_.has(visited,v)){return label.rank}visited[v]=true;var rank=_.minBy(_.map(g.outEdges(v),function(e){return dfs(e.w)-g.edge(e).minlen}));if(rank===Number.POSITIVE_INFINITY||// return value of _.map([]) for Lodash 3\nrank===undefined||// return value of _.map([]) for Lodash 4\nrank===null){// return value of _.map([null])\nrank=0}return label.rank=rank}_.forEach(g.sources(),dfs)}", "travelingSalesmanProblemBF(vertex) {\n const self = this;\n const paths = [];\n const vertices = Object.keys(this.adjacencyList);\n const numberOfVertices = vertices.length;\n const start = this.adjacencyList[vertex] ? vertex : vertices[0];\n\n function findPaths(vertex, visited = {}, path = []) {\n const currentPath = [...path];\n const currentVisited = { ...visited };\n currentPath.push(vertex);\n currentVisited[vertex] = true;\n\n const unvisitedLinkedVertices = self.adjacencyList[vertex].filter((linkedVertex) => {\n return !visited[linkedVertex.value];\n });\n\n if (!unvisitedLinkedVertices.length &&\n currentPath.length === numberOfVertices &&\n self.adjacencyList[vertex].some((linkedVertex) => linkedVertex.value === start)) {\n currentPath.push(start);\n paths.push(currentPath);\n } else {\n for (const linkedVertex of unvisitedLinkedVertices) {\n findPaths(linkedVertex.value, currentVisited, currentPath);\n }\n }\n }\n\n findPaths(start);\n\n if (!paths.length) return { path: [], distance: null };\n\n let bestPath = [];\n let bestDistance = Infinity;\n const { matrix, verticesObj } = this.buildAdjacencyMatrix(vertices);\n\n for (const path of paths) {\n let currentDistance = 0;\n\n for (let i = 0; i < path.length - 1; i++) {\n currentDistance += matrix[verticesObj[path[i]]][verticesObj[path[i + 1]]];\n }\n\n if (currentDistance && bestDistance > currentDistance) {\n bestDistance = currentDistance;\n bestPath = path;\n }\n }\n\n return { path: bestPath, distance: bestDistance };\n }", "function handleGraphHopperRouting (path: Path, individualLegs: boolean = false): any {\n const {instructions, points} = path\n // Decode polyline and reverse coordinates.\n const decodedPolyline = decodePolyline(points).map(c => ([c[1], c[0]]))\n if (individualLegs) {\n // Reconstruct individual legs from the instructions. NOTE: we do not simply\n // use the waypoints found in the response because for lines that share\n // street segments, slicing on these points results in unpredictable splits.\n // Slicing the line along distances is much more reliable.\n const segments = []\n const waypointDistances = [0]\n let distance = 0\n // Iterate over the instructions, accumulating distance and storing the\n // distance at each waypoint encountered. Distances are used to slice the\n // line geometry if individual legs are needed. NOTE: Waypoint === routing\n // point provided in the request.\n instructions.forEach(instruction => {\n if (instruction.text.match(/Waypoint (\\d+)/)) {\n // Add distance value to list\n waypointDistances.push(distance)\n } else {\n distance += instruction.distance\n }\n })\n // Add last distance measure.\n // FIXME: Should this just be the length of the entire line?\n // console.log(waypointDistances, json.paths[0].distance)\n waypointDistances.push(distance)\n const decodedLineString = lineString(decodedPolyline)\n if (waypointDistances.length > 2) {\n for (var i = 1; i < waypointDistances.length; i++) {\n const slicedSegment = lineSliceAlong(\n decodedLineString,\n waypointDistances[i - 1] / 1000,\n waypointDistances[i] / 1000\n )\n segments.push(slicedSegment.geometry.coordinates)\n }\n // console.log('individual legs', segments)\n return segments\n } else {\n // FIXME does this work for two input points?\n return [decodedPolyline]\n }\n } else {\n return decodedPolyline\n }\n}", "function getFlowPointGap() {\n // Get longest and shortest flow baseline lengths\n \n // FIXME this is all goofy, needs updated to worked with cashed values\n var flowLengthMinMax = getMinMaxFlowLength(),\n\t\t\tlongestFlowLength = flowLengthMinMax.max,\n\t\t\tshortestFlowLength = flowLengthMinMax.min,\n\t\t\ttol = shortestFlowLength/(settings.maxFlowPoints+1);\n\n // FIXME Not sure why this conditional statement is used. \n // When would the first condition ever be true? \n if (longestFlowLength / tol <= settings.maxFlowPoints+1) {\n return tol;\n } \n return longestFlowLength / (settings.maxFlowPoints+1);\n }", "function findPath(startID, goalID, via) {\n\t//check inputs are numbers\n\tif ((typeof startID == \"undefined\") || (isNaN(parseInt(startID))) || (getById(stations, parseInt(startID)) == null)) {\n\t\tthrow new Error(\"Cannot find path between stations \" + startID + \" and \" + goalID + \" because \" + startID + \" is not a valid station id\");\n\t}\n\tif ((typeof goalID == \"undefined\") || (isNaN(parseInt(goalID))) || (getById(stations, parseInt(goalID)) == null)) {\n\t\tthrow new Error(\"Cannot find path between stations \" + startID + \" and \" + goalID + \" because \" + goalID + \" is not a valid station id\");\n\t}\n\n\tvar openSet = [parseInt(startID)]; //set of stations to evaluate, starting with the first station\n\tvar closedSet = [];\n\tvar cameFrom = []; //list of nodes followed so far\n\n\t//keep track of routes + distances\n\tvar g_scores = []; //keep track of distances travelled to each point\n\tvar f_scores = []; //associative array to keep track of f_scores tested so far\n\tf_scores[startID] = get_f_score(startID);\n\n\t//look it up if you can, otherwise don't\n\tfunction get_f_score(ID) {\n\t\tif (typeof f_scores[ID] == \"undefined\") {\n\t\t\tf_scores[ID] = get_g_score(ID) + distance_estimate(ID, goalID);\n\t\t}\n\t\treturn f_scores[ID];\n\t}\n\n\tfunction get_g_score(ID) {\n\t\tif (typeof g_scores[ID] == \"undefined\") {\n\t\t\tg_scores[ID] = 0;\n\t\t}\n\t\treturn g_scores[ID];\n\t}\n\n\tvar counter = 0;\n\twhile (openSet.length > 0) {\n\t\t//pick the lowest f_score value first\n\t\tvar current = null;\n\t\tvar lowest = 99999;\n\t\tfor (var i = 0; i < openSet.length; i++) {\n\t\t\tif (get_f_score(openSet[i]) < lowest) {\n\t\t\t\tcurrent = openSet[i];\n\t\t\t\tlowest = get_f_score(current, goalID);\n\t\t\t}\n\t\t}\n\n\t\t//check if we've arrived at the right station yet\n\t\tif (current == goalID) {\n\t\t\t//find how we got here\n\t\t\tvar pathTaken = reconstruct_path(cameFrom, goalID, 0);\n\n\t\t\t//if no via option, no need to check\n\t\t\tif ((typeof via == \"undefined\") || (isNaN(parseInt(via))) || (getById(stations, parseInt(via)) == null)) {\n\t\t\t\treturn [pathTaken, get_g_score(goalID)];\n\t\t\t}\n\n\t\t\t//is the via station on the way?\n\t\t\tfor (var i = 0; i < pathTaken.length; i++) {\n\t\t\t\tif (pathTaken[i] == via) {\n\t\t\t\t\treturn [pathTaken, get_g_score(goalID)];\t\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//if neither of those, do it in two parts\n\t\t\tvar partA = findPath(startID, via);\n\t\t\tvar partB = findPath(via, goalID);\n\t\t\tvar fullPath = partA[0].concat(partB[0]);\n\t\t\tvar fullScore = partA[1] + partB[1];\n\t\t\treturn [fullPath, fullScore];\n\n\t\t}\n\n\t\t//remove current option from openSet and add to closedSet\n\t\topenSet.splice(openSet.indexOf(current), 1);\n\t\tif (closedSet.indexOf(current) == -1) {\n\t\t\tclosedSet.push(current);\n\t\t}\n\t\t\n\t\t//time out to limit route searching\n\t\tcounter++;\n\t\tif (counter >= routeTestLimit) {\n\t\t\treturn;\n\t\t}\n\n\t\t//test each of the current station's neighbours\n\t\tvar currentStation = getById(stations, current);\n\t\tvar currentNeighbours = currentStation.getNeighbours();\n\t\tfor (var i = 0; i < currentNeighbours.length; i++) {\n\t\t\tvar neighbour = currentNeighbours[i][0];\n\t\t\tvar neighbourDistance = currentNeighbours[i][1];\n\t\t\t\n\t\t\tvar tentative_g = get_g_score(current) + neighbourDistance;\n\t\t\tvar tentative_f = tentative_g + distance_estimate(current, neighbour);\n\t\t\tif ((closedSet.indexOf(neighbour) != -1) && (tentative_f >= get_f_score(neighbour))) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t//don't double back on yourself!\n\t\t\tif (cameFrom[current] == neighbour) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t//only do further steps if it's worth it\n\t\t\tif ((openSet.indexOf(neighbour) == -1) || (tentative_f < get_f_score[neighbour])) {\n\t\t\t\tcameFrom[neighbour] = current;\n\t\t\t\tg_scores[neighbour] = tentative_g;\n\t\t\t\tf_scores[neighbour] = tentative_f;\n\t\t\t\tif (openSet.indexOf(neighbour) == -1) {\n\t\t\t\t\topenSet.push(neighbour);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n \t}\n\n \treturn null;\n}", "function helper(s, path, toConsider) {\n if(s.name === station2) { //Condition to stop when destination is reached at\n setPrev(s, path);\n return s;\n } else {\n path = pair(s, path);\n //Setting the values of vertices in a graph\n map(function(x) { \n var dv = s.dv + 1; //Note all edges have weight of 1\n if(dv < x.dv) {\n x.dv = dv;\n } else {}\n }, filter(function(x) { return !is_empty_list(x) && is_empty_list(member(x, path)); }, \n s.neighbours));\n toConsider = filter(function(x) { return !is_empty_list(x); }, toConsider);\n toConsider = filter(function(x) { return is_empty_list(member(x, path)); }, toConsider);\n setPrev(s, path);\n //To find shortest path\n var next_s = accumulate(function(x, y) {\n return x.dv < y.dv ? x : y;\n }, {\"dv\": 1/0}, toConsider);\n toConsider = remove_all(next_s, toConsider);\n toConsider = append(toConsider, next_s.neighbours);\n toConsider = filter(function(x) { return !is_empty_list(x); }, toConsider);\n toConsider = filter(function(x) { return is_empty_list(member(x, path)); }, toConsider);\n return helper(next_s, path, toConsider);\n }\n }", "function numberOfWaysToTraverseGraph(width, height) {\n const array = new Array(height)\n for (let i = 0; i < array.length; ++i) {\n array[i] = new Array(width).fill(0)\n }\n for (let widthIdx = 0; widthIdx < array.length; ++widthIdx) {\n for (let heightIdx = 0; heightIdx < array[widthIdx].length; ++heightIdx) {\n if (heightIdx === 0 || widthIdx === 0) {\n array[widthIdx][heightIdx] = 1;\n } else {\n const left = array[widthIdx][heightIdx - 1];\n const up = array[widthIdx - 1][heightIdx];\n array[widthIdx][heightIdx] = left + up\n }\n }\n }\n\n return array[height - 1][width - 1]\n}", "function countPaths(n) {\n /*\n if (n === 1) {\n return 1;\n }\n\n if (n === 2) {\n return 2;\n }\n\n if (n === 3) {\n return 4;\n }\n\n if (n > 3) {\n return countPaths(n - 1) + countPaths(n - 2) + countPaths(n - 3);\n }\n */\n\n // We add 1 *only* when we've found a path that has\n // brought 'n' to 0.\n if (n < 0) {\n return 0;\n } else if (n === 0) {\n return 1;\n } else {\n return countPaths(n - 3) + countPaths(n - 2) + countPaths(n - 1);\n }\n}", "function longestPath(g) {\n var visited = {};\n\n function dfs(v) {\n var label = g.node(v);\n if (_.has(visited, v)) {\n return label.rank;\n }\n visited[v] = true;\n\n var rank = _.min(_.map(g.outEdges(v), function(e) {\n return dfs(e.w) - g.edge(e).minlen;\n }));\n\n if (rank === Number.POSITIVE_INFINITY) {\n rank = 0;\n }\n\n return (label.rank = rank);\n }\n\n _.each(g.sources(), dfs);\n}", "function alternatingPath(amountOfSurroundingTiles) {\n if (amountOfSurroundingTiles === 0) {\n for (var i = visitedTiles.length - 1; i >= 0 ; i--) {\n var backStepY = parseInt(visitedTiles[i].visibleTile.dataset['yco']);\n var backStepX = parseInt(visitedTiles[i].visibleTile.dataset['xco']);\n\n tiles[backStepX + '|' + backStepY].closed = false;\n\n newStart = checkNeighbours(newStart, backStepX, backStepY);\n /*uppon finding an opportunity to walk by it jumps out the function*/\n if (newStart.length > 0) {\n return newStart;\n };\n\n tiles[backStepX + '|' + backStepY].closed = true;\n };\n } else {\n return;\n };\n}", "function longestPath(g) {\n var visited = {};\n\n function dfs(v) {\n var label = g.node(v);\n if (_.has(visited, v)) {\n return label.rank;\n }\n visited[v] = true;\n\n var rank = _.min(_.map(g.outEdges(v), function(e) {\n return dfs(e.w) - g.edge(e).minlen;\n }));\n\n if (rank === Number.POSITIVE_INFINITY || // return value of _.map([]) for Lodash 3\n rank === undefined || // return value of _.map([]) for Lodash 4\n rank === null) { // return value of _.map([null])\n rank = 0;\n }\n\n return (label.rank = rank);\n }\n\n _.forEach(g.sources(), dfs);\n}", "function longestPath(g) {\n var visited = {};\n\n function dfs(v) {\n var label = g.node(v);\n if (_.has(visited, v)) {\n return label.rank;\n }\n visited[v] = true;\n\n var rank = _.min(_.map(g.outEdges(v), function(e) {\n return dfs(e.w) - g.edge(e).minlen;\n }));\n\n if (rank === Number.POSITIVE_INFINITY || // return value of _.map([]) for Lodash 3\n rank === undefined || // return value of _.map([]) for Lodash 4\n rank === null) { // return value of _.map([null])\n rank = 0;\n }\n\n return (label.rank = rank);\n }\n\n _.forEach(g.sources(), dfs);\n}", "function longestPath(g) {\n var visited = {};\n\n function dfs(v) {\n var label = g.node(v);\n if (_.has(visited, v)) {\n return label.rank;\n }\n visited[v] = true;\n\n var rank = _.min(_.map(g.outEdges(v), function(e) {\n return dfs(e.w) - g.edge(e).minlen;\n }));\n\n if (rank === Number.POSITIVE_INFINITY || // return value of _.map([]) for Lodash 3\n rank === undefined || // return value of _.map([]) for Lodash 4\n rank === null) { // return value of _.map([null])\n rank = 0;\n }\n\n return (label.rank = rank);\n }\n\n _.forEach(g.sources(), dfs);\n}", "function countPathsDP(n, map) {\n if (n < 0) {\n return 0;\n } else if (n === 0) {\n return 1;\n } else if (map[n] > -1) {\n return map[n];\n } else {\n map[n] = countPathsDP(n - 1, map) +\n countPathsDP(n - 2, map) +\n countPathsDP(n - 3, map);\n\n return map[n];\n }\n}", "function GetPath2() : int {\n\t\tnumberOfHops = 0; \n\t\tnumberOfHops1 = 0; \n\t\tvar ToMovePos : int; \n\t\tvar ToMovePos2 : int; \n\n\t\tvar i : int = 0;\n\t\tfor(var a : int = 0; a < ClosedNodes.Length; a++){ \n\t\t\tif (ClosedNodes[a] != 0){ \n\t\t\t\ti++; \n\t\t\t\t//Debug.Log(parent_Closed[a]+\" \"+ClosedNodes[a]);\n\t\t\t\t} }\n\n\t\tvar match_name = targetLeaf;\n\t\tfor(var b : int = (i-1); b >= 0 ; b--){\n\t\t\tif (ClosedNodes[b] == match_name){\n\t\t\t\tnumberOfHops++;\n\t\t\t\tmatch_name = parent_Closed[b];\n\t\t\t\tif (match_name == frogLeaf ){\n\t\t\t\t\tToMovePos = ClosedNodes[b];\n\t\t\t\t\tb = -20;\n\t\t\t\t\t//Debug.Log(\"ToMovePos \"+ToMovePos);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t\tvar match_name2 = targetLeaf2;\n\t\t\tfor(var c : int = (i-1); c >= 0 ; c--){\n\t\t\tif (ClosedNodes[c] == match_name2){\n\t\t\t\tnumberOfHops1++;\n\t\t\t\t//Debug.Log(parent_Closed[b]);\n\t\t\t\tmatch_name2 = parent_Closed[c];\n\t\t\t\tif (match_name2 == frogLeaf ){\n\t\t\t\t\tToMovePos2 = ClosedNodes[c];\n\t\t\t\t\tc = -20;\n\t\t\t\t\t//Debug.Log(\"ToMovePos \"+ToMovePos);\n\t\t\t\t}\n\t\t\t}\n\t\t} \n\n\t\tif (numberOfHops1 !=0){\n\t\t\tif (numberOfHops1 < numberOfHops){\n\t\t\t\t//Debug.Log(\"ToMovePos2 \"+ToMovePos2);\n\t\t\t\treturn ToMovePos2;\n\t\t\t\t}\n\t\t\telse if(numberOfHops !=0){\n\t\t\t\t\t//Debug.Log(\"ToMovePos \"+ToMovePos); \n\t\t\t\t\treturn ToMovePos;\n\t\t\t\t\t}\n\t\t\t\t else{\n\t\t\t\t \t//Debug.Log(\"ToMovePos2 \"+ToMovePos2); \n\t\t\t\t \treturn ToMovePos2;\n\t\t\t\t \t}\n\t\t\t}\n\t\telse {\n\t\t\t//Debug.Log(\"ToMovePos \"+ToMovePos); \n\t\t\treturn ToMovePos;\n\t\t\t}\n\t}", "calculateRoute(startFeature, endFeature) {\n const getId = feature => {\n const payload = JSON.parse(feature.properties.althurayyaData)\n return payload.URI;\n }\n\n const start = getId(startFeature);\n const end = getId(endFeature);\n\n // Note that this returns the IDs of the *NODES* along the road, i.e.\n // we now need to look up the segments which connect these nodes\n const path = this._graph.findShortestPath(start, end);\n\n if (path) {\n // Sliding window across path, pairwise\n const segments = [];\n for (var i=1; i<path.length; i++) {\n segments.push(this.findSegment(path[i - 1], path[i]));\n }\n\n return segments;\n }\n }", "function longestPath(g) {\n var visited = {};\n\n function dfs(v) {\n var label = g.node(v);\n if (_.has(visited, v)) {\n return label.rank;\n }\n visited[v] = true;\n\n var rank = _.minBy(_.map(g.outEdges(v), function(e) {\n return dfs(e.w) - g.edge(e).minlen;\n }));\n\n if (rank === Number.POSITIVE_INFINITY || // return value of _.map([]) for Lodash 3\n rank === undefined || // return value of _.map([]) for Lodash 4\n rank === null) { // return value of _.map([null])\n rank = 0;\n }\n\n return (label.rank = rank);\n }\n\n _.forEach(g.sources(), dfs);\n}", "function pathGatherer(){\n var indicator = Grid[EndPoint[0]][EndPoint[1]].VisitedAt\n var currentPoint = [EndPoint[0],EndPoint[1]]\n var path = []\n\n while( indicator != 0){\n console.log(indicator)\n console.log(\"Current: \" + currentPoint[0] + \"-\" + currentPoint[1])\n if(currentPoint[0]!=EndPoint[0] | currentPoint[1]!=EndPoint[1]){\n console.log(currentPoint,\"not equal to\",EndPoint)\n document.getElementById(Grid[currentPoint[0]][currentPoint[1]].id).innerHTML=\"<div id='path\"+currentPoint[0]+\"x\"+currentPoint[1]+\"' class='path'></div>\";\n document.getElementById(\"path\"+currentPoint[0]+\"x\"+currentPoint[1]).style.animationDelay=indicator/15+\"s\"\n }\n \n Grid[currentPoint[0]][currentPoint[1]].State = \"Path\"\n //update, find the \n indicator -= 1\n //-x NORTH\n if(currentPoint[0] > 0){\n if(Grid[currentPoint[0]-1][currentPoint[1]].VisitedAt == indicator){\n path.push([currentPoint[0],currentPoint[1],\"NORTH\"])\n currentPoint[0] -= 1\n continue\n }\n \n }\n //+x SOUTH\n if(currentPoint[0] < GRID_ROW_SIZE-1){\n if(Grid[currentPoint[0]+1][currentPoint[1]].VisitedAt == indicator){\n path.push([currentPoint[0],currentPoint[1],\"SOUTH\"])\n currentPoint[0] += 1\n continue\n }\n \n }\n //-y WEST\n if(currentPoint[1] > 0){\n if(Grid[currentPoint[0]][currentPoint[1]-1].VisitedAt == indicator){\n path.push([currentPoint[0],currentPoint[1],\"WEST\"])\n currentPoint[1] -= 1\n continue\n }\n \n }\n //+y EAST\n if(currentPoint[1] < GRID_COL_SIZE-1){\n if(Grid[currentPoint[0]][currentPoint[1]+1].VisitedAt == indicator){\n path.push([currentPoint[0],currentPoint[1],\"EAST\"])\n currentPoint[1] += 1\n continue\n }\n \n }\n\n }\n //!! the path is the REVERSE PATH from the END to the START \n Grid[EndPoint[0]][EndPoint[1]].State = \"End\"\n console.log(path)\n consoleGridPrinter()\n}", "function calculateCost(n){\n var b = n.join('-');\n let dist = new route(g);\n cost = dist.computeDistance(g, b);\n if(cost < limit){\n allCyclicPaths.push(b);\n }\n }", "function computeSlotSegCoords(seg, seriesBackwardPressure, seriesBackwardCoord) {\n var forwardSegs = seg.forwardSegs;\n var i;\n\n if (seg.forwardCoord === undefined) { // not already computed\n\n if (!forwardSegs.length) {\n\n // if there are no forward segments, this segment should butt up against the edge\n seg.forwardCoord = 1;\n }\n else {\n\n // sort highest pressure first\n forwardSegs.sort(compareForwardSlotSegs);\n\n // this segment's forwardCoord will be calculated from the backwardCoord of the\n // highest-pressure forward segment.\n computeSlotSegCoords(forwardSegs[0], seriesBackwardPressure + 1, seriesBackwardCoord);\n seg.forwardCoord = forwardSegs[0].backwardCoord;\n }\n\n // calculate the backwardCoord from the forwardCoord. consider the series\n seg.backwardCoord = seg.forwardCoord -\n (seg.forwardCoord - seriesBackwardCoord) / // available width for series\n (seriesBackwardPressure + 1); // # of segments in the series\n\n // use this segment's coordinates to computed the coordinates of the less-pressurized\n // forward segments\n for (i = 0; i < forwardSegs.length; i++) {\n computeSlotSegCoords(forwardSegs[i], 0, seg.forwardCoord);\n }\n }\n }", "function findShortestPath() {\n console.log(\"finding shortest path\");\n // a knight can only make 8 different moves, represented by the combination of these two arrays\n var row = [2, 2, -2, -2, 1, 1, -1, -1];\n var col = [-1, 1, 1, -1, 2, -2, 2, -2];\n\n // dictionary which tracks which cells have been visited while performing BFS\n var visited = {};\n\n // queue which tracks cells which need to be looked at\n var queue = new Queue();\n queue.push(start);\n\n // search for the destination until it is found or we run out of cells to look at\n while (!queue.isEmpty()) {\n var currentNode = queue.pop();\n\n // made it to the destination\n if (currentNode.x == end.x && currentNode.y == end.y) {\n console.log(\"found the destination\");\n\n // highlight and mark the path for the user\n displayPathTo(currentNode);\n\n // return the number of hops needed\n return currentNode.dist;\n }\n\n // skip current node if it has been visited\n if (!visited[currentNode.hash()]) {\n // add this node to the list of visted nodes\n visited[currentNode.hash()];\n\n // check all 8 possible knight movements and add the valid ones to the queue\n for (var ii = 0; ii < 8; ii++) {\n var x1 = currentNode.x + row[ii];\n var y1 = currentNode.y + col[ii];\n if (isValidCell(x1, y1)) {\n // pass in the current node as a parent to the new node so we can retrace the path\n var newNode = new Node(currentNode, x1, y1, currentNode.dist + 1);\n queue.push(newNode);\n }\n }\n }\n }\n\n // if we get here, the destination was not found\n // (something went wrong, since a knight can always make it to any other space)\n console.log(\"destination was not found\");\n return Infinity;\n}", "function getPath(finalNode){\n\tvar pathNodes = [];\n\tvar node = finalNode;\n\tpathSize = 0;\n\twhile(node.x != origin.x || node.y != origin.y){\n\t\tvar parent = {\n\t\t\tx : node.parentX,\n\t\t\ty : node.parentY\n\t\t}\n\t\tif(Math.abs(parent.x - node.x) == 1 && Math.abs(parent.y - node.y) == 1){\n\t\t\tpathSize += diagDistance;\n\t\t}else{\n\t\t\tpathSize += unitDistance;\n\t\t}\n\t\t//var parentIndex = isInSet(closedSet, parent);\n\t\tif(grid[parent.x][parent.y] > 0 && grid[parent.x][parent.y].group == 2){\n\t\t\tpathNodes.push(grid[parent.x][parent.y]);\n\t\t\tnode = grid[parent.x][parent.y];\n\t\t}else{\n\t\t\talert(\"Somethin went wrong while constructing the final path.\");\n\t\t\treturn 0;\n\t\t}\n\t}\n\tpathNodes.pop();\n\tdisplayPath(pathNodes); // just use pop, it will be from origin to destination\n\treturn 1;\n}", "function build_full_paths(FI, FP, Paths) {\n\tvar i = 0, L = 0, R = 0, C = 0, j = 0, pl = Paths.length;\n\tvar dad = [], q = [];\n\n\tfor(; i < pl; ++i) { dad[i]=q[i]=i; FP[i]=Paths[i]; }\n\n\tfor(; j < q.length; ++j) {\n\t\ti = q[j];\n\t\tL = FI[i].L; R = FI[i].R; C = FI[i].C;\n\t\tif(dad[i] === i) {\n\t\t\tif(L !== -1 /*NOSTREAM*/ && dad[L] !== L) dad[i] = dad[L];\n\t\t\tif(R !== -1 && dad[R] !== R) dad[i] = dad[R];\n\t\t}\n\t\tif(C !== -1 /*NOSTREAM*/) dad[C] = i;\n\t\tif(L !== -1) { dad[L] = dad[i]; q.push(L); }\n\t\tif(R !== -1) { dad[R] = dad[i]; q.push(R); }\n\t}\n\tfor(i=1; i !== pl; ++i) if(dad[i] === i) {\n\t\tif(R !== -1 /*NOSTREAM*/ && dad[R] !== R) dad[i] = dad[R];\n\t\telse if(L !== -1 && dad[L] !== L) dad[i] = dad[L];\n\t}\n\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type === 0 /* unknown */) continue;\n\t\tj = dad[i];\n\t\tif(j === 0) FP[i] = FP[0] + \"/\" + FP[i];\n\t\telse while(j !== 0 && j !== dad[j]) {\n\t\t\tFP[i] = FP[j] + \"/\" + FP[i];\n\t\t\tj = dad[j];\n\t\t}\n\t\tdad[i] = 0;\n\t}\n\n\tFP[0] += \"/\";\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type !== 2 /* stream */) FP[i] += \"/\";\n\t}\n}", "function build_full_paths(FI, FP, Paths) {\n\tvar i = 0, L = 0, R = 0, C = 0, j = 0, pl = Paths.length;\n\tvar dad = [], q = [];\n\n\tfor(; i < pl; ++i) { dad[i]=q[i]=i; FP[i]=Paths[i]; }\n\n\tfor(; j < q.length; ++j) {\n\t\ti = q[j];\n\t\tL = FI[i].L; R = FI[i].R; C = FI[i].C;\n\t\tif(dad[i] === i) {\n\t\t\tif(L !== -1 /*NOSTREAM*/ && dad[L] !== L) dad[i] = dad[L];\n\t\t\tif(R !== -1 && dad[R] !== R) dad[i] = dad[R];\n\t\t}\n\t\tif(C !== -1 /*NOSTREAM*/) dad[C] = i;\n\t\tif(L !== -1) { dad[L] = dad[i]; q.push(L); }\n\t\tif(R !== -1) { dad[R] = dad[i]; q.push(R); }\n\t}\n\tfor(i=1; i !== pl; ++i) if(dad[i] === i) {\n\t\tif(R !== -1 /*NOSTREAM*/ && dad[R] !== R) dad[i] = dad[R];\n\t\telse if(L !== -1 && dad[L] !== L) dad[i] = dad[L];\n\t}\n\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type === 0 /* unknown */) continue;\n\t\tj = dad[i];\n\t\tif(j === 0) FP[i] = FP[0] + \"/\" + FP[i];\n\t\telse while(j !== 0 && j !== dad[j]) {\n\t\t\tFP[i] = FP[j] + \"/\" + FP[i];\n\t\t\tj = dad[j];\n\t\t}\n\t\tdad[i] = 0;\n\t}\n\n\tFP[0] += \"/\";\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type !== 2 /* stream */) FP[i] += \"/\";\n\t}\n}", "function maxTripLength() {\n var profile = session.plan().routes();\n return profile[profile.length - 1].stats.avg;\n}", "solveDFS() {\n for (let maxDepth = 0; maxDepth <= 10; maxDepth++) {\n let path = this.dfs(maxDepth);\n if (path) {\n this.drawSolvedPath(path);\n return path;\n }\n }\n return null;\n }", "function build_full_paths(FI, FP, Paths) {\n var i = 0,\n L = 0,\n R = 0,\n C = 0,\n j = 0,\n pl = Paths.length;\n var dad = [],\n q = [];\n\n for (; i < pl; ++i) {\n dad[i] = q[i] = i;\n FP[i] = Paths[i];\n }\n\n for (; j < q.length; ++j) {\n i = q[j];\n L = FI[i].L;\n R = FI[i].R;\n C = FI[i].C;\n\n if (dad[i] === i) {\n if (L !== -1\n /*NOSTREAM*/\n && dad[L] !== L) dad[i] = dad[L];\n if (R !== -1 && dad[R] !== R) dad[i] = dad[R];\n }\n\n if (C !== -1\n /*NOSTREAM*/\n ) dad[C] = i;\n\n if (L !== -1 && i != dad[i]) {\n dad[L] = dad[i];\n if (q.lastIndexOf(L) < j) q.push(L);\n }\n\n if (R !== -1 && i != dad[i]) {\n dad[R] = dad[i];\n if (q.lastIndexOf(R) < j) q.push(R);\n }\n }\n\n for (i = 1; i < pl; ++i) if (dad[i] === i) {\n if (R !== -1\n /*NOSTREAM*/\n && dad[R] !== R) dad[i] = dad[R];else if (L !== -1 && dad[L] !== L) dad[i] = dad[L];\n }\n\n for (i = 1; i < pl; ++i) {\n if (FI[i].type === 0\n /* unknown */\n ) continue;\n j = i;\n if (j != dad[j]) do {\n j = dad[j];\n FP[i] = FP[j] + \"/\" + FP[i];\n } while (j !== 0 && -1 !== dad[j] && j != dad[j]);\n dad[i] = -1;\n }\n\n FP[0] += \"/\";\n\n for (i = 1; i < pl; ++i) {\n if (FI[i].type !== 2\n /* stream */\n ) FP[i] += \"/\";\n }\n }", "function build_full_paths(FI, FP, Paths) {\n\tvar i = 0, L = 0, R = 0, C = 0, j = 0, pl = Paths.length;\n\tvar dad = [], q = [];\n\n\tfor(; i < pl; ++i) { dad[i]=q[i]=i; FP[i]=Paths[i]; }\n\n\tfor(; j < q.length; ++j) {\n\t\ti = q[j];\n\t\tL = FI[i].L; R = FI[i].R; C = FI[i].C;\n\t\tif(dad[i] === i) {\n\t\t\tif(L !== -1 /*NOSTREAM*/ && dad[L] !== L) dad[i] = dad[L];\n\t\t\tif(R !== -1 && dad[R] !== R) dad[i] = dad[R];\n\t\t}\n\t\tif(C !== -1 /*NOSTREAM*/) dad[C] = i;\n\t\tif(L !== -1) { dad[L] = dad[i]; if(q.lastIndexOf(L) < j) q.push(L); }\n\t\tif(R !== -1) { dad[R] = dad[i]; if(q.lastIndexOf(R) < j) q.push(R); }\n\t}\n\tfor(i=1; i < pl; ++i) if(dad[i] === i) {\n\t\tif(R !== -1 /*NOSTREAM*/ && dad[R] !== R) dad[i] = dad[R];\n\t\telse if(L !== -1 && dad[L] !== L) dad[i] = dad[L];\n\t}\n\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type === 0 /* unknown */) continue;\n\t\tj = dad[i];\n\t\tif(j === 0) FP[i] = FP[0] + \"/\" + FP[i];\n\t\telse while(j !== 0 && j !== dad[j]) {\n\t\t\tFP[i] = FP[j] + \"/\" + FP[i];\n\t\t\tj = dad[j];\n\t\t}\n\t\tdad[i] = 0;\n\t}\n\n\tFP[0] += \"/\";\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type !== 2 /* stream */) FP[i] += \"/\";\n\t}\n}", "function computeSlotSegCoords(seg, seriesBackwardPressure, seriesBackwardCoord) {\n\tvar forwardSegs = seg.forwardSegs;\n\tvar i;\n\n\tif (seg.forwardCoord === undefined) { // not already computed\n\n\t\tif (!forwardSegs.length) {\n\n\t\t\t// if there are no forward segments, this segment should butt up against the edge\n\t\t\tseg.forwardCoord = 1;\n\t\t}\n\t\telse {\n\n\t\t\t// sort highest pressure first\n\t\t\tforwardSegs.sort(compareForwardSlotSegs);\n\n\t\t\t// this segment's forwardCoord will be calculated from the backwardCoord of the\n\t\t\t// highest-pressure forward segment.\n\t\t\tcomputeSlotSegCoords(forwardSegs[0], seriesBackwardPressure + 1, seriesBackwardCoord);\n\t\t\tseg.forwardCoord = forwardSegs[0].backwardCoord;\n\t\t}\n\n\t\t// calculate the backwardCoord from the forwardCoord. consider the series\n\t\tseg.backwardCoord = seg.forwardCoord -\n\t\t\t(seg.forwardCoord - seriesBackwardCoord) / // available width for series\n\t\t\t(seriesBackwardPressure + 1); // # of segments in the series\n\n\t\t// use this segment's coordinates to computed the coordinates of the less-pressurized\n\t\t// forward segments\n\t\tfor (i=0; i<forwardSegs.length; i++) {\n\t\t\tcomputeSlotSegCoords(forwardSegs[i], 0, seg.forwardCoord);\n\t\t}\n\t}\n}", "function computeSlotSegCoords(seg, seriesBackwardPressure, seriesBackwardCoord) {\n\tvar forwardSegs = seg.forwardSegs;\n\tvar i;\n\n\tif (seg.forwardCoord === undefined) { // not already computed\n\n\t\tif (!forwardSegs.length) {\n\n\t\t\t// if there are no forward segments, this segment should butt up against the edge\n\t\t\tseg.forwardCoord = 1;\n\t\t}\n\t\telse {\n\n\t\t\t// sort highest pressure first\n\t\t\tforwardSegs.sort(compareForwardSlotSegs);\n\n\t\t\t// this segment's forwardCoord will be calculated from the backwardCoord of the\n\t\t\t// highest-pressure forward segment.\n\t\t\tcomputeSlotSegCoords(forwardSegs[0], seriesBackwardPressure + 1, seriesBackwardCoord);\n\t\t\tseg.forwardCoord = forwardSegs[0].backwardCoord;\n\t\t}\n\n\t\t// calculate the backwardCoord from the forwardCoord. consider the series\n\t\tseg.backwardCoord = seg.forwardCoord -\n\t\t\t(seg.forwardCoord - seriesBackwardCoord) / // available width for series\n\t\t\t(seriesBackwardPressure + 1); // # of segments in the series\n\n\t\t// use this segment's coordinates to computed the coordinates of the less-pressurized\n\t\t// forward segments\n\t\tfor (i=0; i<forwardSegs.length; i++) {\n\t\t\tcomputeSlotSegCoords(forwardSegs[i], 0, seg.forwardCoord);\n\t\t}\n\t}\n}", "function computeSlotSegCoords(seg, seriesBackwardPressure, seriesBackwardCoord) {\n\tvar forwardSegs = seg.forwardSegs;\n\tvar i;\n\n\tif (seg.forwardCoord === undefined) { // not already computed\n\n\t\tif (!forwardSegs.length) {\n\n\t\t\t// if there are no forward segments, this segment should butt up against the edge\n\t\t\tseg.forwardCoord = 1;\n\t\t}\n\t\telse {\n\n\t\t\t// sort highest pressure first\n\t\t\tforwardSegs.sort(compareForwardSlotSegs);\n\n\t\t\t// this segment's forwardCoord will be calculated from the backwardCoord of the\n\t\t\t// highest-pressure forward segment.\n\t\t\tcomputeSlotSegCoords(forwardSegs[0], seriesBackwardPressure + 1, seriesBackwardCoord);\n\t\t\tseg.forwardCoord = forwardSegs[0].backwardCoord;\n\t\t}\n\n\t\t// calculate the backwardCoord from the forwardCoord. consider the series\n\t\tseg.backwardCoord = seg.forwardCoord -\n\t\t\t(seg.forwardCoord - seriesBackwardCoord) / // available width for series\n\t\t\t(seriesBackwardPressure + 1); // # of segments in the series\n\n\t\t// use this segment's coordinates to computed the coordinates of the less-pressurized\n\t\t// forward segments\n\t\tfor (i=0; i<forwardSegs.length; i++) {\n\t\t\tcomputeSlotSegCoords(forwardSegs[i], 0, seg.forwardCoord);\n\t\t}\n\t}\n}", "function computeSlotSegCoords(seg, seriesBackwardPressure, seriesBackwardCoord) {\n\tvar forwardSegs = seg.forwardSegs;\n\tvar i;\n\n\tif (seg.forwardCoord === undefined) { // not already computed\n\n\t\tif (!forwardSegs.length) {\n\n\t\t\t// if there are no forward segments, this segment should butt up against the edge\n\t\t\tseg.forwardCoord = 1;\n\t\t}\n\t\telse {\n\n\t\t\t// sort highest pressure first\n\t\t\tforwardSegs.sort(compareForwardSlotSegs);\n\n\t\t\t// this segment's forwardCoord will be calculated from the backwardCoord of the\n\t\t\t// highest-pressure forward segment.\n\t\t\tcomputeSlotSegCoords(forwardSegs[0], seriesBackwardPressure + 1, seriesBackwardCoord);\n\t\t\tseg.forwardCoord = forwardSegs[0].backwardCoord;\n\t\t}\n\n\t\t// calculate the backwardCoord from the forwardCoord. consider the series\n\t\tseg.backwardCoord = seg.forwardCoord -\n\t\t\t(seg.forwardCoord - seriesBackwardCoord) / // available width for series\n\t\t\t(seriesBackwardPressure + 1); // # of segments in the series\n\n\t\t// use this segment's coordinates to computed the coordinates of the less-pressurized\n\t\t// forward segments\n\t\tfor (i=0; i<forwardSegs.length; i++) {\n\t\t\tcomputeSlotSegCoords(forwardSegs[i], 0, seg.forwardCoord);\n\t\t}\n\t}\n}", "function computeSlotSegCoords(seg, seriesBackwardPressure, seriesBackwardCoord) {\n\tvar forwardSegs = seg.forwardSegs;\n\tvar i;\n\n\tif (seg.forwardCoord === undefined) { // not already computed\n\n\t\tif (!forwardSegs.length) {\n\n\t\t\t// if there are no forward segments, this segment should butt up against the edge\n\t\t\tseg.forwardCoord = 1;\n\t\t}\n\t\telse {\n\n\t\t\t// sort highest pressure first\n\t\t\tforwardSegs.sort(compareForwardSlotSegs);\n\n\t\t\t// this segment's forwardCoord will be calculated from the backwardCoord of the\n\t\t\t// highest-pressure forward segment.\n\t\t\tcomputeSlotSegCoords(forwardSegs[0], seriesBackwardPressure + 1, seriesBackwardCoord);\n\t\t\tseg.forwardCoord = forwardSegs[0].backwardCoord;\n\t\t}\n\n\t\t// calculate the backwardCoord from the forwardCoord. consider the series\n\t\tseg.backwardCoord = seg.forwardCoord -\n\t\t\t(seg.forwardCoord - seriesBackwardCoord) / // available width for series\n\t\t\t(seriesBackwardPressure + 1); // # of segments in the series\n\n\t\t// use this segment's coordinates to computed the coordinates of the less-pressurized\n\t\t// forward segments\n\t\tfor (i=0; i<forwardSegs.length; i++) {\n\t\t\tcomputeSlotSegCoords(forwardSegs[i], 0, seg.forwardCoord);\n\t\t}\n\t}\n}", "function computeSlotSegCoords(seg, seriesBackwardPressure, seriesBackwardCoord) {\n\tvar forwardSegs = seg.forwardSegs;\n\tvar i;\n\n\tif (seg.forwardCoord === undefined) { // not already computed\n\n\t\tif (!forwardSegs.length) {\n\n\t\t\t// if there are no forward segments, this segment should butt up against the edge\n\t\t\tseg.forwardCoord = 1;\n\t\t}\n\t\telse {\n\n\t\t\t// sort highest pressure first\n\t\t\tforwardSegs.sort(compareForwardSlotSegs);\n\n\t\t\t// this segment's forwardCoord will be calculated from the backwardCoord of the\n\t\t\t// highest-pressure forward segment.\n\t\t\tcomputeSlotSegCoords(forwardSegs[0], seriesBackwardPressure + 1, seriesBackwardCoord);\n\t\t\tseg.forwardCoord = forwardSegs[0].backwardCoord;\n\t\t}\n\n\t\t// calculate the backwardCoord from the forwardCoord. consider the series\n\t\tseg.backwardCoord = seg.forwardCoord -\n\t\t\t(seg.forwardCoord - seriesBackwardCoord) / // available width for series\n\t\t\t(seriesBackwardPressure + 1); // # of segments in the series\n\n\t\t// use this segment's coordinates to computed the coordinates of the less-pressurized\n\t\t// forward segments\n\t\tfor (i=0; i<forwardSegs.length; i++) {\n\t\t\tcomputeSlotSegCoords(forwardSegs[i], 0, seg.forwardCoord);\n\t\t}\n\t}\n}", "function solvePath() {\n let r = 19\n let c = 19\n shortestPath.push(board[r][c])\n while (true) {\n let parent = board[r][c].parentNode\n shortestPath.unshift(parent);\n r = parent.r\n c = parent.c\n if (r == 0 && c == 0) {\n return\n }\n }\n}", "findPath(unit) {\n /**\n * The open list (Nodes yet to check),\n * this list is always sorted according to the\n * score of its nodes:\n */\n let openList = [];\n\n /**\n * The closed list (Nodes already checked):\n */\n this.closedList = [];\n\n this.nodeScoring.posFinishX = unit.route.finish.posX;\n this.nodeScoring.posFinishY = unit.route.finish.posY;\n\n let done = false;\n let cumCostPath = -1;\n let iteCnt = 0;\n let tmpCost = 0;\n let tmp = null;\n\n //\tThe node which is currently being processed:\n let curNode = unit.route.start;\n\n let i, j;\n\n /**\n * MAIN LOOP:\n */\n while (!done) {\n /** If we've reached the destination: */\n if (curNode.equals(unit.route.finish)) {\n done = true;\n cumCostPath = curNode.cost;\n\n unit.route.Steps.push(curNode);\n tmp = curNode;\n while (tmp.parent != null) {\n unit.route.Steps.push(tmp.parent);\n tmp = tmp.parent;\n }\n unit.route.Steps.reverse();\n unit.route.routeActive = true;\n }\n /** If not yet: */\n else {\n /** EXPAND THE CURRENT NODE: */\n for (i = -1; i < 2; i++) {\n for (j = -1; j < 2; j++) {\n /** Current node is already expanded: */\n if (i == 0 && j == 0) {\n continue;\n }\n /** If we're out of bounds: */\n if (curNode.posX + i < 0 || curNode.posX + i >= this.map.width || curNode.posY + j < 0 || curNode.posY + j >= this.map.height) {\n continue;\n }\n /** If it's an obstacle: */\n //if (this.map.getTileType(curNode.posY + j, curNode.posX + i) == this.INDEX_FOR_OBSTACLE) {\n if (this.map.getTileType(curNode.posX + i, curNode.posY + j) == this.INDEX_FOR_OBSTACLE) {\n continue;\n }\n /** Is this neighbor already done with ?: */\n if (this.closedList != null) {\n tmp = this.closedList.find(a => (a.posX == curNode.posX + i && a.posY == curNode.posY + j));\n if (tmp != null) {\n tmp = null;\n continue;\n }\n }\n\n /** Skip diagonally adjacent nodes IF NO_DIAG_MOV == true: */\n if (i != 0 && j != 0 && this.NO_DIAG_MOV) {\n continue;\n }\n /** THIS IS FOR PSEUDO-NO_DIAG_MOV\n YOU SHALL NOT MOVE DIAGONALLY IF\n AN OBSTACLE IS ADJACENT TO current_node\n AND THIS NODE:\n */\n if (i != 0 && j != 0 && this.HALF_DIAG_MOV) {\n if (this.map.getTileType(curNode.posX + i, curNode.posY) == this.INDEX_FOR_OBSTACLE)\n continue;\n if (this.map.getTileType(curNode.posX, curNode.posY + j) == this.INDEX_FOR_OBSTACLE)\n continue;\n }\n /** Check whether this neighbor is already on the open list,\n * if yes - update its costs accordingly:\n */\n if (openList != null) {\n tmp = openList.find(a => (a.posX == curNode.posX + i && a.posY == curNode.posY + j));\n }\n\n if (openList != null && tmp != null) {\n /** checking for diagonal vs (horizontal / vertical step): */\n if (i != 0 && j != 0) {\n /** Is curNode the better predecessor\n * than what we have atm ?:\n */\n if (tmp.cost > curNode.cost + 14) {\n tmp.cost = curNode.cost + 14;\n tmp.parent = curNode;\n }\n }\n else {\n if (tmp.cost > curNode.cost + 10) {\n tmp.cost = curNode.cost + 10;\n tmp.parent = curNode;\n }\n }\n\n }\n /** tmp is neither on the openList nor on the closedList\n * so we gotta add it to the open list:\n */\n else {\n if (i != 0 && j != 0) {\n tmpCost = curNode.cost + 14;\n }\n else {\n tmpCost = curNode.cost + 10;\n }\n tmp = new Node(curNode.posX + i, curNode.posY + j);\n tmp.cost = tmpCost;\n tmp.parent = curNode;\n if (openList == null) {\n openList = [];\n }\n openList.push(tmp);\n //openList.sort(this.nodeScoring.compareManhattan);\n //openList.sort(function() { this.nodeScoring.compareManhattan(); });\n // TODO: find out why this works and what exactly it does D:\n // TODO: compareManhattan() does not get a and b (= undefined) !!!\n /** PATH SCORING: */\n openList.sort((a, b) => {\n this.nodeScoring.compareManhattan(a, b);\n });\n }\n }\n }\n\n /** ADD curNode TO THE closedList: */\n if (this.closedList == null) {\n this.closedList = [];\n }\n this.closedList.push(curNode);\n /** REMOVE curNode FROM THE openList: */\n let index = openList.indexOf(curNode);\n if (index > -1) {\n openList.splice(index, 1);\n }\n\n /** if openList is empty, there are no open nodes left, even though destination is not reached yet: */\n if (openList.length == 0) {\n unit.route.Steps = null;\n unit.route.finish = null;\n unit.route.routeActive = false;\n done = true;\n console.log(\"NO PATH FOUND!\");\n }\n else {\n curNode = openList[0];\n }\n iteCnt++;\n }\n }\n }", "numberOfSegments() {\n return this.segments.length;\n }", "function build_full_paths(FI, FP, Paths) {\n\tvar i = 0, L = 0, R = 0, C = 0, j = 0, pl = Paths.length;\n\tvar dad = [], q = [];\n\n\tfor(; i < pl; ++i) { dad[i]=q[i]=i; FP[i]=Paths[i]; }\n\n\tfor(; j < q.length; ++j) {\n\t\ti = q[j];\n\t\tL = FI[i].L; R = FI[i].R; C = FI[i].C;\n\t\tif(dad[i] === i) {\n\t\t\tif(L !== -1 /*NOSTREAM*/ && dad[L] !== L) dad[i] = dad[L];\n\t\t\tif(R !== -1 && dad[R] !== R) dad[i] = dad[R];\n\t\t}\n\t\tif(C !== -1 /*NOSTREAM*/) dad[C] = i;\n\t\tif(L !== -1 && i != dad[i]) { dad[L] = dad[i]; if(q.lastIndexOf(L) < j) q.push(L); }\n\t\tif(R !== -1 && i != dad[i]) { dad[R] = dad[i]; if(q.lastIndexOf(R) < j) q.push(R); }\n\t}\n\tfor(i=1; i < pl; ++i) if(dad[i] === i) {\n\t\tif(R !== -1 /*NOSTREAM*/ && dad[R] !== R) dad[i] = dad[R];\n\t\telse if(L !== -1 && dad[L] !== L) dad[i] = dad[L];\n\t}\n\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type === 0 /* unknown */) continue;\n\t\tj = i;\n\t\tif(j != dad[j]) do {\n\t\t\tj = dad[j];\n\t\t\tFP[i] = FP[j] + \"/\" + FP[i];\n\t\t} while (j !== 0 && -1 !== dad[j] && j != dad[j]);\n\t\tdad[i] = -1;\n\t}\n\n\tFP[0] += \"/\";\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type !== 2 /* stream */) FP[i] += \"/\";\n\t}\n}", "function build_full_paths(FI, FP, Paths) {\n\tvar i = 0, L = 0, R = 0, C = 0, j = 0, pl = Paths.length;\n\tvar dad = [], q = [];\n\n\tfor(; i < pl; ++i) { dad[i]=q[i]=i; FP[i]=Paths[i]; }\n\n\tfor(; j < q.length; ++j) {\n\t\ti = q[j];\n\t\tL = FI[i].L; R = FI[i].R; C = FI[i].C;\n\t\tif(dad[i] === i) {\n\t\t\tif(L !== -1 /*NOSTREAM*/ && dad[L] !== L) dad[i] = dad[L];\n\t\t\tif(R !== -1 && dad[R] !== R) dad[i] = dad[R];\n\t\t}\n\t\tif(C !== -1 /*NOSTREAM*/) dad[C] = i;\n\t\tif(L !== -1 && i != dad[i]) { dad[L] = dad[i]; if(q.lastIndexOf(L) < j) q.push(L); }\n\t\tif(R !== -1 && i != dad[i]) { dad[R] = dad[i]; if(q.lastIndexOf(R) < j) q.push(R); }\n\t}\n\tfor(i=1; i < pl; ++i) if(dad[i] === i) {\n\t\tif(R !== -1 /*NOSTREAM*/ && dad[R] !== R) dad[i] = dad[R];\n\t\telse if(L !== -1 && dad[L] !== L) dad[i] = dad[L];\n\t}\n\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type === 0 /* unknown */) continue;\n\t\tj = i;\n\t\tif(j != dad[j]) do {\n\t\t\tj = dad[j];\n\t\t\tFP[i] = FP[j] + \"/\" + FP[i];\n\t\t} while (j !== 0 && -1 !== dad[j] && j != dad[j]);\n\t\tdad[i] = -1;\n\t}\n\n\tFP[0] += \"/\";\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type !== 2 /* stream */) FP[i] += \"/\";\n\t}\n}", "function build_full_paths(FI, FP, Paths) {\n\tvar i = 0, L = 0, R = 0, C = 0, j = 0, pl = Paths.length;\n\tvar dad = [], q = [];\n\n\tfor(; i < pl; ++i) { dad[i]=q[i]=i; FP[i]=Paths[i]; }\n\n\tfor(; j < q.length; ++j) {\n\t\ti = q[j];\n\t\tL = FI[i].L; R = FI[i].R; C = FI[i].C;\n\t\tif(dad[i] === i) {\n\t\t\tif(L !== -1 /*NOSTREAM*/ && dad[L] !== L) dad[i] = dad[L];\n\t\t\tif(R !== -1 && dad[R] !== R) dad[i] = dad[R];\n\t\t}\n\t\tif(C !== -1 /*NOSTREAM*/) dad[C] = i;\n\t\tif(L !== -1 && i != dad[i]) { dad[L] = dad[i]; if(q.lastIndexOf(L) < j) q.push(L); }\n\t\tif(R !== -1 && i != dad[i]) { dad[R] = dad[i]; if(q.lastIndexOf(R) < j) q.push(R); }\n\t}\n\tfor(i=1; i < pl; ++i) if(dad[i] === i) {\n\t\tif(R !== -1 /*NOSTREAM*/ && dad[R] !== R) dad[i] = dad[R];\n\t\telse if(L !== -1 && dad[L] !== L) dad[i] = dad[L];\n\t}\n\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type === 0 /* unknown */) continue;\n\t\tj = i;\n\t\tif(j != dad[j]) do {\n\t\t\tj = dad[j];\n\t\t\tFP[i] = FP[j] + \"/\" + FP[i];\n\t\t} while (j !== 0 && -1 !== dad[j] && j != dad[j]);\n\t\tdad[i] = -1;\n\t}\n\n\tFP[0] += \"/\";\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type !== 2 /* stream */) FP[i] += \"/\";\n\t}\n}", "function build_full_paths(FI, FP, Paths) {\n\tvar i = 0, L = 0, R = 0, C = 0, j = 0, pl = Paths.length;\n\tvar dad = [], q = [];\n\n\tfor(; i < pl; ++i) { dad[i]=q[i]=i; FP[i]=Paths[i]; }\n\n\tfor(; j < q.length; ++j) {\n\t\ti = q[j];\n\t\tL = FI[i].L; R = FI[i].R; C = FI[i].C;\n\t\tif(dad[i] === i) {\n\t\t\tif(L !== -1 /*NOSTREAM*/ && dad[L] !== L) dad[i] = dad[L];\n\t\t\tif(R !== -1 && dad[R] !== R) dad[i] = dad[R];\n\t\t}\n\t\tif(C !== -1 /*NOSTREAM*/) dad[C] = i;\n\t\tif(L !== -1 && i != dad[i]) { dad[L] = dad[i]; if(q.lastIndexOf(L) < j) q.push(L); }\n\t\tif(R !== -1 && i != dad[i]) { dad[R] = dad[i]; if(q.lastIndexOf(R) < j) q.push(R); }\n\t}\n\tfor(i=1; i < pl; ++i) if(dad[i] === i) {\n\t\tif(R !== -1 /*NOSTREAM*/ && dad[R] !== R) dad[i] = dad[R];\n\t\telse if(L !== -1 && dad[L] !== L) dad[i] = dad[L];\n\t}\n\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type === 0 /* unknown */) continue;\n\t\tj = i;\n\t\tif(j != dad[j]) do {\n\t\t\tj = dad[j];\n\t\t\tFP[i] = FP[j] + \"/\" + FP[i];\n\t\t} while (j !== 0 && -1 !== dad[j] && j != dad[j]);\n\t\tdad[i] = -1;\n\t}\n\n\tFP[0] += \"/\";\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type !== 2 /* stream */) FP[i] += \"/\";\n\t}\n}", "shortestPath(start, goal) {\n // start isn't moveable to\n if (!this.moveable(start.x / this.tileW, start.y / this.tileH)) {\n return [];\n }\n let openSet = [];\n let closedSet = [];\n openSet.push(start);\n\n // clear path finding data\n for (let y = 0; y < round(height / this.tileH); y++) {\n for (let x = 0; x < round(width / this.tileW); x++) {\n this.map[y][x].f = 0;\n this.map[y][x].g = 0;\n this.map[y][x].h = 0;\n this.map[y][x].parent = null;\n }\n }\n\n while (openSet.length > 0) {\n // get lowest cost node in open set\n let currentNode = openSet[0];\n for (let i = 0; i < openSet.length; i++) {\n if (openSet[i].f < currentNode.f)\n currentNode = openSet[i];\n }\n\n // if end has been reached, then finish\n if (currentNode.x == goal.x && currentNode.y == goal.y) {\n let path = []\n while (currentNode.parent != null) {\n path.push(currentNode);\n currentNode = currentNode.parent;\n }\n return path.reverse();\n }\n\n // remove currentNode from openset, and put into closed set\n closedSet.push(currentNode);\n for (let i = openSet.length - 1; i >= 0; i--) {\n if (openSet[i] === currentNode) {\n openSet.splice(i, 1);\n }\n }\n\n // evaluate currentNode's neighbours\n for (let i = 0; i < currentNode.neighbours.length; i++) {\n let neighbour = currentNode.neighbours[i];\n if (!this.moveable(neighbour.x / this.tileW, neighbour.y / this.tileH)) {\n continue;\n }\n if (closedSet.includes(neighbour))\n continue;\n // valid neighbour found..\n let gScore = currentNode.g + 1;\n let bestG = false;\n if (!openSet.includes(neighbour)) {\n // first time at neighbour, so it's the best\n bestG = true;\n neighbour.h = this.heuristic(neighbour.x, neighbour.y, goal.x, goal.y);\n openSet.push(neighbour);\n } else if (gScore < neighbour.g) {\n // worse path to it exists in openset..\n bestG = true;\n openSet.splice(openSet.indexOf(neighbour), 1);\n }\n\n if (bestG) {\n neighbour.parent = currentNode;\n neighbour.g = gScore;\n neighbour.f = neighbour.h + neighbour.g;\n }\n }\n }\n // no path found\n return [];\n }", "function la(a,b,c){var d,e=a.forwardSegs;if(void 0===a.forwardCoord)// # of segments in the series\n// use this segment's coordinates to computed the coordinates of the less-pressurized\n// forward segments\nfor(// not already computed\ne.length?(\n// sort highest pressure first\ne.sort(pa),\n// this segment's forwardCoord will be calculated from the backwardCoord of the\n// highest-pressure forward segment.\nla(e[0],b+1,c),a.forwardCoord=e[0].backwardCoord):\n// if there are no forward segments, this segment should butt up against the edge\na.forwardCoord=1,\n// calculate the backwardCoord from the forwardCoord. consider the series\na.backwardCoord=a.forwardCoord-(a.forwardCoord-c)/(// available width for series\nb+1),d=0;d<e.length;d++)la(e[d],0,a.forwardCoord)}", "distanceOfShortestPath(start, end) { \n // queue is array of arrays of [vertex, distance]\n let toVisitQueue = [[start, 0]];\n let seen = new Set();\n seen.add(start);\n while (toVisitQueue.length) {\n let [current, dist] = toVisitQueue.shift();\n if (current === end) {\n return dist;\n }\n for (let node of current.adjacent) {\n if (!(seen.has(node))) {\n seen.add(node);\n toVisitQueue.push([node, dist + 1]);\n }\n }\n }\n }", "buildPath(num) {\n var result = new Set();\n var cur = num;\n const maxBound = this.props.maxBound;\n while (!result.has(cur) && cur <= maxBound && cur >= -maxBound) {\n result.add(cur);\n cur = this.getDestination(cur);\n }\n return [...result];\n }", "function find_aug_path(edge_flows, parents, source, sink) {\n\tlet open = [source];\n\tlet closed = [];\n\tlet visited = [];\n\tvisited.length = god_nodes.length;\n\tvisited.fill(false);\n\tvisited[0] = true;\n\n\twhile (open.length > 0) {\n\t\tlet current_index = open.shift();\n\t\tlet current_children = god_rels(current_index);\n\t\tcurrent_children.foreach( function(i) {\n\t\t\tif(visited[i] == false && edge_flows[i]) {\n\t\t\t\topen.push(i);\n\t\t\t\tvisited[i] = true;\n\t\t\t\tparents[i] = current_index;\n\t\t\t}\n\t\t})\t\t\n\t}\n\n\treturn visited[sink];\n}", "function build_full_paths(FI, FPD, FP, Paths) {\n\tvar i = 0, L = 0, R = 0, C = 0, j = 0, pl = Paths.length;\n\tvar dad = [], q = [];\n\n\tfor(; i < pl; ++i) { dad[i]=q[i]=i; FP[i]=Paths[i]; }\n\n\tfor(; j < q.length; ++j) {\n\t\ti = q[j];\n\t\tL = FI[i].L; R = FI[i].R; C = FI[i].C;\n\t\tif(dad[i] === i) {\n\t\t\tif(L !== -1 /*NOSTREAM*/ && dad[L] !== L) dad[i] = dad[L];\n\t\t\tif(R !== -1 && dad[R] !== R) dad[i] = dad[R];\n\t\t}\n\t\tif(C !== -1 /*NOSTREAM*/) dad[C] = i;\n\t\tif(L !== -1) { dad[L] = dad[i]; q.push(L); }\n\t\tif(R !== -1) { dad[R] = dad[i]; q.push(R); }\n\t}\n\tfor(i=1; i !== pl; ++i) if(dad[i] === i) {\n\t\tif(R !== -1 /*NOSTREAM*/ && dad[R] !== R) dad[i] = dad[R];\n\t\telse if(L !== -1 && dad[L] !== L) dad[i] = dad[L];\n\t}\n\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type === 0 /* unknown */) continue;\n\t\tj = dad[i];\n\t\tif(j === 0) FP[i] = FP[0] + \"/\" + FP[i];\n\t\telse while(j !== 0 && j !== dad[j]) {\n\t\t\tFP[i] = FP[j] + \"/\" + FP[i];\n\t\t\tj = dad[j];\n\t\t}\n\t\tdad[i] = 0;\n\t}\n\n\tFP[0] += \"/\";\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type !== 2 /* stream */) FP[i] += \"/\";\n\t\tFPD[FP[i]] = FI[i];\n\t}\n}", "function getPathDifficulty(center, p) {\n if(p.length <= 0) return Infinity;\n return p.reduce(function(acc, val) {return acc + getLifeCondition(center, val);}, 0);\n }", "_distanceToNext()\r\n {\r\n return this._navPath.distanceToWaypoint(this._position, this._waypointIdx);\r\n }" ]
[ "0.6252813", "0.60432595", "0.6039703", "0.59666926", "0.5960505", "0.5913167", "0.5913167", "0.58984184", "0.5851599", "0.5851599", "0.5851599", "0.58244866", "0.581787", "0.581787", "0.581787", "0.581787", "0.581787", "0.581787", "0.581787", "0.581787", "0.581787", "0.581787", "0.581787", "0.581787", "0.581787", "0.5792061", "0.57286", "0.572107", "0.55163115", "0.5475507", "0.53715", "0.53031236", "0.5290235", "0.52693486", "0.51908314", "0.5189538", "0.51810175", "0.5169974", "0.5137237", "0.5095641", "0.5094644", "0.5048636", "0.4986201", "0.49780345", "0.49679282", "0.49615407", "0.4959025", "0.493147", "0.4928944", "0.49052957", "0.48974985", "0.48968005", "0.4896111", "0.48885536", "0.48855302", "0.4885117", "0.487285", "0.48583314", "0.48547116", "0.48452678", "0.48452678", "0.48452678", "0.4826182", "0.48219988", "0.48191836", "0.48186964", "0.48178962", "0.48168936", "0.48042473", "0.48015752", "0.4799327", "0.47905692", "0.47905692", "0.4784348", "0.47778586", "0.4774131", "0.47656602", "0.4765018", "0.4765018", "0.4765018", "0.4765018", "0.4765018", "0.4765018", "0.47646683", "0.47599053", "0.47460753", "0.47459108", "0.47459108", "0.47459108", "0.47459108", "0.472871", "0.47196406", "0.4711253", "0.47060853", "0.46956858", "0.46940506", "0.46931228", "0.46808457" ]
0.5915288
7
Find all the segments in `otherSegs` that vertically collide with `seg`. Append into an optionallysupplied `results` array and return.
function computeSlotSegCollisions(seg, otherSegs, results) { if (results === void 0) { results = []; } for (var i = 0; i < otherSegs.length; i++) { if (isSlotSegCollision(seg, otherSegs[i])) { results.push(otherSegs[i]); } } return results; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function computeSlotSegCollisions(seg, otherSegs, results) {\n if (results === void 0) {\n results = [];\n }\n\n for (var i = 0; i < otherSegs.length; i++) {\n if (isSlotSegCollision(seg, otherSegs[i])) {\n results.push(otherSegs[i]);\n }\n }\n\n return results;\n } // Do these segments occupy the same vertical space?", "function computeSlotSegCollisions(seg, otherSegs, results) {\n if (results === void 0) {\n results = [];\n }\n\n for (var i = 0; i < otherSegs.length; i++) {\n if (isSlotSegCollision(seg, otherSegs[i])) {\n results.push(otherSegs[i]);\n }\n }\n\n return results;\n } // Do these segments occupy the same vertical space?", "function computeSlotSegCollisions(seg,otherSegs,results){if(results===void 0){results=[];}for(var i=0;i<otherSegs.length;i++){if(isSlotSegCollision(seg,otherSegs[i])){results.push(otherSegs[i]);}}return results;}// Do these segments occupy the same vertical space?", "function computeSlotSegCollisions(seg, otherSegs, results) {\n results = results || [];\n\n for (var i = 0; i < otherSegs.length; i++) {\n if (isSlotSegCollision(seg, otherSegs[i])) {\n results.push(otherSegs[i]);\n }\n }\n\n return results;\n }", "function computeSlotSegCollisions(seg, otherSegs, results) {\n if (results === void 0) { results = []; }\n for (var i = 0; i < otherSegs.length; i++) {\n if (isSlotSegCollision(seg, otherSegs[i])) {\n results.push(otherSegs[i]);\n }\n }\n return results;\n}", "function computeSlotSegCollisions(seg, otherSegs, results) {\n if (results === void 0) { results = []; }\n for (var i = 0; i < otherSegs.length; i++) {\n if (isSlotSegCollision(seg, otherSegs[i])) {\n results.push(otherSegs[i]);\n }\n }\n return results;\n}", "function computeSlotSegCollisions(seg, otherSegs, results) {\n if (results === void 0) { results = []; }\n for (var i = 0; i < otherSegs.length; i++) {\n if (isSlotSegCollision(seg, otherSegs[i])) {\n results.push(otherSegs[i]);\n }\n }\n return results;\n}", "function computeSlotSegCollisions(seg, otherSegs, results) {\n if (results === void 0) { results = []; }\n for (var i = 0; i < otherSegs.length; i++) {\n if (isSlotSegCollision(seg, otherSegs[i])) {\n results.push(otherSegs[i]);\n }\n }\n return results;\n}", "function computeSlotSegCollisions(seg, otherSegs, results) {\n if (results === void 0) { results = []; }\n for (var i = 0; i < otherSegs.length; i++) {\n if (isSlotSegCollision(seg, otherSegs[i])) {\n results.push(otherSegs[i]);\n }\n }\n return results;\n}", "function computeSlotSegCollisions(seg, otherSegs, results) {\n if (results === void 0) { results = []; }\n for (var i = 0; i < otherSegs.length; i += 1) {\n if (isSlotSegCollision(seg, otherSegs[i])) {\n results.push(otherSegs[i]);\n }\n }\n return results;\n }", "function computeSlotSegCollisions(seg, otherSegs, results) {\n\tresults = results || [];\n\n\tfor (var i=0; i<otherSegs.length; i++) {\n\t\tif (isSlotSegCollision(seg, otherSegs[i])) {\n\t\t\tresults.push(otherSegs[i]);\n\t\t}\n\t}\n\n\treturn results;\n}", "function computeSlotSegCollisions(seg, otherSegs, results) {\n\tresults = results || [];\n\n\tfor (var i=0; i<otherSegs.length; i++) {\n\t\tif (isSlotSegCollision(seg, otherSegs[i])) {\n\t\t\tresults.push(otherSegs[i]);\n\t\t}\n\t}\n\n\treturn results;\n}", "function computeSlotSegCollisions(seg, otherSegs, results) {\n\tresults = results || [];\n\n\tfor (var i=0; i<otherSegs.length; i++) {\n\t\tif (isSlotSegCollision(seg, otherSegs[i])) {\n\t\t\tresults.push(otherSegs[i]);\n\t\t}\n\t}\n\n\treturn results;\n}", "function computeSlotSegCollisions(seg, otherSegs, results) {\n\tresults = results || [];\n\n\tfor (var i=0; i<otherSegs.length; i++) {\n\t\tif (isSlotSegCollision(seg, otherSegs[i])) {\n\t\t\tresults.push(otherSegs[i]);\n\t\t}\n\t}\n\n\treturn results;\n}", "function computeSlotSegCollisions(seg, otherSegs, results) {\n\tresults = results || [];\n\n\tfor (var i=0; i<otherSegs.length; i++) {\n\t\tif (isSlotSegCollision(seg, otherSegs[i])) {\n\t\t\tresults.push(otherSegs[i]);\n\t\t}\n\t}\n\n\treturn results;\n}", "function computeSlotSegCollisions(seg, otherSegs, results) {\n\tresults = results || [];\n\n\tfor (var i=0; i<otherSegs.length; i++) {\n\t\tif (isSlotSegCollision(seg, otherSegs[i])) {\n\t\t\tresults.push(otherSegs[i]);\n\t\t}\n\t}\n\n\treturn results;\n}", "function computeSlotSegCollisions(seg, otherSegs, results) {\n\tresults = results || [];\n\n\tfor (var i=0; i<otherSegs.length; i++) {\n\t\tif (isSlotSegCollision(seg, otherSegs[i])) {\n\t\t\tresults.push(otherSegs[i]);\n\t\t}\n\t}\n\n\treturn results;\n}", "function computeSlotSegCollisions(seg, otherSegs, results) {\n\tresults = results || [];\n\n\tfor (var i=0; i<otherSegs.length; i++) {\n\t\tif (isSlotSegCollision(seg, otherSegs[i])) {\n\t\t\tresults.push(otherSegs[i]);\n\t\t}\n\t}\n\n\treturn results;\n}", "function computeSlotSegCollisions(seg, otherSegs, results) {\n\tresults = results || [];\n\n\tfor (var i=0; i<otherSegs.length; i++) {\n\t\tif (isSlotSegCollision(seg, otherSegs[i])) {\n\t\t\tresults.push(otherSegs[i]);\n\t\t}\n\t}\n\n\treturn results;\n}", "function computeSlotSegCollisions(seg, otherSegs, results) {\n\tresults = results || [];\n\n\tfor (var i=0; i<otherSegs.length; i++) {\n\t\tif (isSlotSegCollision(seg, otherSegs[i])) {\n\t\t\tresults.push(otherSegs[i]);\n\t\t}\n\t}\n\n\treturn results;\n}", "function computeSlotSegCollisions(seg, otherSegs, results) {\n\tresults = results || [];\n\n\tfor (var i=0; i<otherSegs.length; i++) {\n\t\tif (isSlotSegCollision(seg, otherSegs[i])) {\n\t\t\tresults.push(otherSegs[i]);\n\t\t}\n\t}\n\n\treturn results;\n}", "function computeSlotSegCollisions(seg, otherSegs, results) {\n\tresults = results || [];\n\n\tfor (var i=0; i<otherSegs.length; i++) {\n\t\tif (isSlotSegCollision(seg, otherSegs[i])) {\n\t\t\tresults.push(otherSegs[i]);\n\t\t}\n\t}\n\n\treturn results;\n}", "function computeSlotSegCollisions(seg, otherSegs, results) {\n\tresults = results || [];\n\n\tfor (var i=0; i<otherSegs.length; i++) {\n\t\tif (isSlotSegCollision(seg, otherSegs[i])) {\n\t\t\tresults.push(otherSegs[i]);\n\t\t}\n\t}\n\n\treturn results;\n}", "function computeSlotSegCollisions(seg, otherSegs, results) {\n\t\tresults = results || [];\n\n\t\tfor (var i=0; i<otherSegs.length; i++) {\n\t\t\tif (isSlotSegCollision(seg, otherSegs[i])) {\n\t\t\t\tresults.push(otherSegs[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn results;\n\t}", "function buildSlotSegLevels(segs) {\n var levels = [];\n var i;\n var seg;\n var j;\n\n for (i = 0; i < segs.length; i++) {\n seg = segs[i]; // go through all the levels and stop on the first level where there are no collisions\n\n for (j = 0; j < levels.length; j++) {\n if (!computeSlotSegCollisions(seg, levels[j]).length) {\n break;\n }\n }\n\n seg.level = j;\n (levels[j] || (levels[j] = [])).push(seg);\n }\n\n return levels;\n } // Find all the segments in `otherSegs` that vertically collide with `seg`.", "function computeSlotSegPressures(seg){var forwardSegs=seg.forwardSegs;var forwardPressure=0;var i;var forwardSeg;if(seg.forwardPressure===undefined){// not already computed\nfor(i=0;i<forwardSegs.length;i++){forwardSeg=forwardSegs[i];// figure out the child's maximum forward path\ncomputeSlotSegPressures(forwardSeg);// either use the existing maximum, or use the child's forward pressure\n// plus one (for the forwardSeg itself)\nforwardPressure=Math.max(forwardPressure,1+forwardSeg.forwardPressure);}seg.forwardPressure=forwardPressure;}}// Find all the segments in `otherSegs` that vertically collide with `seg`.", "function placeRects(allRects, segs, cells) {\n let rectsByEachCol = groupRectsByEachCol(allRects, cells.length);\n let singleColPlacements = [];\n let multiColPlacements = [];\n let leftoverMargins = [];\n for (let col = 0; col < cells.length; col += 1) {\n let rects = rectsByEachCol[col];\n // compute all static segs in singlePlacements\n let singlePlacements = [];\n let currentHeight = 0;\n let currentMarginTop = 0;\n for (let rect of rects) {\n let seg = segs[rect.index];\n singlePlacements.push({\n seg: resliceSeg(seg, col, col + 1, cells),\n isVisible: true,\n isAbsolute: false,\n absoluteTop: rect.levelCoord,\n marginTop: rect.levelCoord - currentHeight,\n });\n currentHeight = rect.levelCoord + rect.thickness;\n }\n // compute mixed static/absolute segs in multiPlacements\n let multiPlacements = [];\n currentHeight = 0;\n currentMarginTop = 0;\n for (let rect of rects) {\n let seg = segs[rect.index];\n let isAbsolute = rect.span.end - rect.span.start > 1; // multi-column?\n let isFirstCol = rect.span.start === col;\n currentMarginTop += rect.levelCoord - currentHeight; // amount of space since bottom of previous seg\n currentHeight = rect.levelCoord + rect.thickness; // height will now be bottom of current seg\n if (isAbsolute) {\n currentMarginTop += rect.thickness;\n if (isFirstCol) {\n multiPlacements.push({\n seg: resliceSeg(seg, rect.span.start, rect.span.end, cells),\n isVisible: true,\n isAbsolute: true,\n absoluteTop: rect.levelCoord,\n marginTop: 0,\n });\n }\n }\n else if (isFirstCol) {\n multiPlacements.push({\n seg: resliceSeg(seg, rect.span.start, rect.span.end, cells),\n isVisible: true,\n isAbsolute: false,\n absoluteTop: rect.levelCoord,\n marginTop: currentMarginTop, // claim the margin\n });\n currentMarginTop = 0;\n }\n }\n singleColPlacements.push(singlePlacements);\n multiColPlacements.push(multiPlacements);\n leftoverMargins.push(currentMarginTop);\n }\n return { singleColPlacements, multiColPlacements, leftoverMargins };\n }", "get excludeCollinear(){\n\t\tlet list = this.segList2D;\n\t\tlet newlist = [];\n\t\tfor (let i=0; i<list.length; i++){\n\t\t\tlet thisseg = list[i];\n\t\t\tlet x0 = thisseg.a[0];\n\t\t\tlet y0 = thisseg.a[1];\n\t\t\tlet x1 = thisseg.b[0];\n\t\t\tlet y1 = thisseg.b[1];\n\t\t\tlet nextseg\n\t\t\tif (i === list.length-1){\n\t\t\t\tnextseg = list[0];\n\t\t\t}\n\t\t\telse{\n\t\t\t\tnextseg = list[i+1];\n\t\t\t}\n\t\t\tlet a0 = nextseg.a[0];\n\t\t\tlet b0 = nextseg.a[1];\n\t\t\tlet a1 = nextseg.b[0];\n\t\t\tlet b1 = nextseg.b[1];\n\t\t\tlet xy = Math.round((y1-y0)/(x1-x0)*1000000)/1000000;\n\t\t\tlet ab = Math.round((b1-b0)/(a1-a0)*1000000)/1000000;\n\t\t\tif (xy !== ab){\n\t\t\t\tnewlist.push(thisseg);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif (i===list.length-1){\n\t\t\t\t\tnewlist.shift();\n\t\t\t\t}\n\t\t\t\tnewlist.push({a:[x0,y0],b:[a1,b1]})\n\t\t\t}\n\t\t}\n\t\treturn newlist;\n\t}", "function testSegmentCollision(segment) {\n var i;\n var numcollisions = 0;\n for (i = 0; i < alledges.length; i += 1) { //Iterate through all edges and make sure it's not overlapping any of them.\n if (alledges[i].points !== undefined && alledges[i].points !== null) {\n if (isOverlappingEE(segment, alledges[i])) { //overlaps are automatically rejected\n if (segment.sourceObject !== alledges[i].sourceObject || segment.color !== alledges[i].color) { //if they share the same source, it's OK, but if their colors are different, it's not. NOTE: CANNOT BE SOURCE OR TARGET SHARED OR WEIRD STUFF HAPPENS\n numcollisions = Number.MAX_VALUE;\n break; //stop bothering with this multiple\n }\n } else if (isCollidingEE(segment, alledges[i], false, false)) {\n numcollisions += 1;\n }\n }\n }\n for (i = 0; i < allquestions.length; i += 1) { //Iterate through all nodes\n if (isCollidingNE(allquestions[i], segment)) {\n numcollisions = Number.MAX_VALUE;\n break; //stop bothering with this multiple\n }\n }\n return numcollisions;\n}", "function intersectSegments(ids, xx, yy, optsArg) {\n var lim = ids.length - 2,\n opts = optsArg || {},\n intersections = [],\n tolerance = opts.tolerance, // may be undefined\n s1p1, s1p2, s2p1, s2p2,\n s1p1x, s1p2x, s2p1x, s2p2x,\n s1p1y, s1p2y, s2p1y, s2p2y,\n hit, seg1, seg2, i, j;\n\n // Sort segments by xmin, to allow efficient exclusion of segments with\n // non-overlapping x extents.\n sortSegmentIds(xx, ids); // sort by ascending xmin\n\n i = 0;\n while (i < lim) {\n s1p1 = ids[i];\n s1p2 = ids[i+1];\n s1p1x = xx[s1p1];\n s1p2x = xx[s1p2];\n s1p1y = yy[s1p1];\n s1p2y = yy[s1p2];\n // count++;\n\n j = i;\n while (j < lim) {\n j += 2;\n s2p1 = ids[j];\n s2p1x = xx[s2p1];\n\n if (s1p2x < s2p1x) break; // x extent of seg 2 is greater than seg 1: done with seg 1\n //if (s1p2x <= s2p1x) break; // this misses point-segment intersections when s1 or s2 is vertical\n\n s2p1y = yy[s2p1];\n s2p2 = ids[j+1];\n s2p2x = xx[s2p2];\n s2p2y = yy[s2p2];\n\n // skip segments with non-overlapping y ranges\n if (s1p1y >= s2p1y) {\n if (s1p1y > s2p2y && s1p2y > s2p1y && s1p2y > s2p2y) continue;\n } else {\n if (s1p1y < s2p2y && s1p2y < s2p1y && s1p2y < s2p2y) continue;\n }\n\n // skip segments that are adjacent in a path (optimization)\n // TODO: consider if this eliminates some cases that should\n // be detected, e.g. spikes formed by unequal segments\n if (s1p1 == s2p1 || s1p1 == s2p2 || s1p2 == s2p1 || s1p2 == s2p2) {\n continue;\n }\n\n // test two candidate segments for intersection\n hit = geom.segmentIntersection(s1p1x, s1p1y, s1p2x, s1p2y,\n s2p1x, s2p1y, s2p2x, s2p2y, tolerance);\n if (hit) {\n seg1 = [s1p1, s1p2];\n seg2 = [s2p1, s2p2];\n intersections.push(formatIntersection(hit, seg1, seg2, xx, yy));\n if (hit.length == 4) {\n // two collinear segments may have two endpoint intersections\n intersections.push(formatIntersection(hit.slice(2), seg1, seg2, xx, yy));\n }\n }\n }\n i += 2;\n }\n return intersections;\n\n // @p is an [x, y] location along a segment defined by ids @id1 and @id2\n // return array [i, j] where i and j are the same endpoint ids with i <= j\n // if @p coincides with an endpoint, return the id of that endpoint twice\n function getEndpointIds(id1, id2, p) {\n var i = id1 < id2 ? id1 : id2,\n j = i === id1 ? id2 : id1;\n if (xx[i] == p[0] && yy[i] == p[1]) {\n j = i;\n } else if (xx[j] == p[0] && yy[j] == p[1]) {\n i = j;\n }\n return [i, j];\n }\n }", "function computeSlotSegPressures(seg) {\n var forwardSegs = seg.forwardSegs;\n var forwardPressure = 0;\n var i;\n var forwardSeg;\n\n if (seg.forwardPressure === undefined) {\n // not already computed\n for (i = 0; i < forwardSegs.length; i++) {\n forwardSeg = forwardSegs[i]; // figure out the child's maximum forward path\n\n computeSlotSegPressures(forwardSeg); // either use the existing maximum, or use the child's forward pressure\n // plus one (for the forwardSeg itself)\n\n forwardPressure = Math.max(forwardPressure, 1 + forwardSeg.forwardPressure);\n }\n\n seg.forwardPressure = forwardPressure;\n }\n } // Find all the segments in `otherSegs` that vertically collide with `seg`.", "function getPositions() {\n \n var rects;\n var nRects;\n var rect;\n \n var top;\n var left;\n var width;\n var right;\n \n var textXY;\n \n var currentLine = -1;\n \n for (var i = 0; i < nSegs; i++) {\n \n rects = segs[i].getClientRects();\n nRects = rects.length;\n \n segRanges[i] = {};\n \n for (var j = 0; j < nRects; j++) {\n \n rect = rects[j];\n textXY = getTextXY(rect.left, rect.top);\n top = textXY.y - segBoxPadY;\n left = textXY.x - segBoxPadX;\n width = rect.width + segBoxPadX * 2;\n \n if (j !== nRects - 1) {\n \n width += extensionWidth;\n }\n \n right = left + width;\n \n if (isNewLine(top)) {\n \n currentLine++;\n \n lines[currentLine] = {\n top: top,\n left: left,\n width: width\n };\n \n segBoxesByLine[currentLine] = [];\n \n } else {\n \n lines[currentLine].width += width;\n }\n \n segBoxesByLine[currentLine].push({\n left: left,\n right: left + width,\n segIndex: i\n });\n \n if (j === 0) {\n \n segRanges[i].startLine = currentLine;\n segRanges[i].startLeft = left;\n }\n \n if (j === nRects - 1) {\n \n segRanges[i].endLine = currentLine;\n segRanges[i].endRight = right;\n }\n }\n }\n \n function isNewLine(top) {\n \n if (lines.length === 0 || lines[lines.length - 1].top !== top) {\n \n return true;\n }\n }\n}", "function formatIntersectingSegment(x, y, i, j, xx, yy) {\n if (xx[i] == x && yy[i] == y) {\n return [i, i];\n }\n if (xx[j] == x && yy[j] == y) {\n return [j, j];\n }\n return i < j ? [i, j] : [j, i];\n }", "function isDaySegCollision(seg, otherSegs) {\n var i;\n var otherSeg;\n\n for (i = 0; i < otherSegs.length; i++) {\n otherSeg = otherSegs[i];\n\n if (otherSeg.firstCol <= seg.lastCol && otherSeg.lastCol >= seg.firstCol) {\n return true;\n }\n }\n\n return false;\n } // A cmp function for determining the leftmost event", "function computeSegVerticals(segs, dayDate, slatCoords, eventMinHeight) {\n for (var _i = 0, segs_1 = segs; _i < segs_1.length; _i++) {\n var seg = segs_1[_i];\n seg.top = slatCoords.computeDateTop(seg.start, dayDate);\n seg.bottom = Math.max(seg.top + (eventMinHeight || 0), // yuck\n slatCoords.computeDateTop(seg.end, dayDate));\n }\n }", "function matchSegment(seg1, seg2, r, result) {\n var a = seg1[0],\n b = seg1[1],\n c = seg2[0],\n d = seg2[1],\n len = result.length;\n\n var ap = closePoint(a, c, d, r),\n bp = closePoint(b, c, d, r);\n\n // a----b\n // c---ap---bp---d\n if (ap !== null && bp !== null) return true; // fully covered\n\n var cp = closePoint(c, a, b, r),\n dp = closePoint(d, a, b, r);\n\n if (cp !== null && cp === dp) return false; // degenerate case, no overlap\n\n if (cp !== null && dp !== null) {\n var cpp = segPoint(a, b, cp);\n var dpp = segPoint(a, b, dp);\n\n if (equals(cpp, dpp)) return false; // degenerate case\n\n // a---cp---dp---b\n // c----d\n if (cp < dp) {\n if (!equals(a, cpp)) result.push([a, cpp]);\n if (!equals(dpp, b)) result.push([dpp, b]);\n\n // a---dp---cp---b\n // d----c\n } else {\n if (!equals(a, dpp)) result.push([a, dpp]);\n if (!equals(cpp, b)) result.push([cpp, b]);\n }\n\n } else if (cp !== null) {\n var cpp = segPoint(a, b, cp);\n\n // a----cp---b\n // d---ap---c\n if (ap !== null && !equals(a, cpp)) result.push([cpp, b]);\n\n // a---cp---b\n // c----bp---d\n else if (bp !== null && !equals(cpp, b)) result.push([a, cpp]);\n\n } else if (dp !== null) {\n var dpp = segPoint(a, b, dp);\n\n // a---dp---b\n // d----bp---c\n if (bp !== null && !equals(dpp, b)) result.push([a, dpp]);\n\n // a----dp---b\n // c---ap---d\n else if (ap !== null && !equals(a, dpp)) result.push([dpp, b]);\n }\n\n return result.length !== len; // segment processed\n}", "function calculateVerticals(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar colCnt = getColCnt();\n\t\tvar rowContentHeights = []; // content height for each row\n\t\tvar segmentRows = buildSegmentRows(segments); // an array of segment arrays, one for each row\n\t\tvar colI;\n\n\t\tfor (var rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tvar segmentRow = segmentRows[rowI];\n\n\t\t\t// an array of running total heights for each column.\n\t\t\t// initialize with all zeros.\n\t\t\tvar colHeights = [];\n\t\t\tfor (colI=0; colI<colCnt; colI++) {\n\t\t\t\tcolHeights.push(0);\n\t\t\t}\n\n\t\t\t// loop through every segment\n\t\t\tfor (var segmentI=0; segmentI<segmentRow.length; segmentI++) {\n\t\t\t\tvar segment = segmentRow[segmentI];\n\n\t\t\t\t// find the segment's top coordinate by looking at the max height\n\t\t\t\t// of all the columns the segment will be in.\n\t\t\t\tsegment.top = arrayMax(\n\t\t\t\t\tcolHeights.slice(\n\t\t\t\t\t\tsegment.leftCol,\n\t\t\t\t\t\tsegment.rightCol + 1 // make exclusive for slice\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t// adjust the columns to account for the segment's height\n\t\t\t\tfor (colI=segment.leftCol; colI<=segment.rightCol; colI++) {\n\t\t\t\t\tcolHeights[colI] = segment.top + segment.outerHeight;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// the tallest column in the row should be the \"content height\"\n\t\t\trowContentHeights.push(arrayMax(colHeights));\n\t\t}\n\n\t\treturn rowContentHeights;\n\t}", "function calculateVerticals(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar colCnt = getColCnt();\n\t\tvar rowContentHeights = []; // content height for each row\n\t\tvar segmentRows = buildSegmentRows(segments); // an array of segment arrays, one for each row\n\t\tvar colI;\n\n\t\tfor (var rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tvar segmentRow = segmentRows[rowI];\n\n\t\t\t// an array of running total heights for each column.\n\t\t\t// initialize with all zeros.\n\t\t\tvar colHeights = [];\n\t\t\tfor (colI=0; colI<colCnt; colI++) {\n\t\t\t\tcolHeights.push(0);\n\t\t\t}\n\n\t\t\t// loop through every segment\n\t\t\tfor (var segmentI=0; segmentI<segmentRow.length; segmentI++) {\n\t\t\t\tvar segment = segmentRow[segmentI];\n\n\t\t\t\t// find the segment's top coordinate by looking at the max height\n\t\t\t\t// of all the columns the segment will be in.\n\t\t\t\tsegment.top = arrayMax(\n\t\t\t\t\tcolHeights.slice(\n\t\t\t\t\t\tsegment.leftCol,\n\t\t\t\t\t\tsegment.rightCol + 1 // make exclusive for slice\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t// adjust the columns to account for the segment's height\n\t\t\t\tfor (colI=segment.leftCol; colI<=segment.rightCol; colI++) {\n\t\t\t\t\tcolHeights[colI] = segment.top + segment.outerHeight;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// the tallest column in the row should be the \"content height\"\n\t\t\trowContentHeights.push(arrayMax(colHeights));\n\t\t}\n\n\t\treturn rowContentHeights;\n\t}", "getSeams() {\n var used = new Set();\n var seams = [];\n var nbEdges = this.getNonBoundaryEdges(); //interior edges\n console.log(\"nb edges\", nbEdges)\n for (var i = 0; i < nbEdges.length; i++) {\n for (var j = i + 1; j < nbEdges.length; j++) {\n var edge = nbEdges[i];\n var otherEdge = nbEdges[j];\n if (edge.collinear(otherEdge)) {\n if (used.has(edge) || used.has(otherEdge)) {\n //set of collinear edges already exists\n for (var k = 0; k < seams.length; k++) {\n //need to add new edge to this set\n if (seams[k].has(edge)) {\n seams[k].add(otherEdge);\n used.add(otherEdge);\n } else {\n if (seams[k].has(otherEdge)) {\n seams[k].add(edge);\n used.add(edge);\n }\n }\n }\n } else {\n //need to create new collinear set of two seams\n seams.push(new Set([edge, otherEdge]));\n used.add(edge);\n used.add(otherEdge);\n }\n }\n }\n }\n for (var i = 0; i < nbEdges.length; i++) {\n // now we need to add binary edges\n var edge = nbEdges[i];\n if (!used.has(edge)) {\n var binEdge = new Set();\n binEdge.add(edge);\n used.add(edge);\n seams.push(binEdge);\n }\n }\n this.seams = seams;\n }", "function isDaySegCollision(seg, otherSegs) {\n var i;\n var otherSeg;\n for (i = 0; i < otherSegs.length; i++) {\n otherSeg = otherSegs[i];\n if (otherSeg.firstCol <= seg.lastCol &&\n otherSeg.lastCol >= seg.firstCol) {\n return true;\n }\n }\n return false;\n}", "function calculateVerticals(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar colCnt = getColCnt();\n\t\tvar rowContentHeights = []; // content height for each row\n\t\tvar segmentRows = buildSegmentRows(segments); // an array of segment arrays, one for each row\n\n\t\tfor (var rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tvar segmentRow = segmentRows[rowI];\n\n\t\t\t// an array of running total heights for each column.\n\t\t\t// initialize with all zeros.\n\t\t\tvar colHeights = [];\n\t\t\tfor (var colI=0; colI<colCnt; colI++) {\n\t\t\t\tcolHeights.push(0);\n\t\t\t}\n\n\t\t\t// loop through every segment\n\t\t\tfor (var segmentI=0; segmentI<segmentRow.length; segmentI++) {\n\t\t\t\tvar segment = segmentRow[segmentI];\n\n\t\t\t\t// find the segment's top coordinate by looking at the max height\n\t\t\t\t// of all the columns the segment will be in.\n\t\t\t\tsegment.top = arrayMax(\n\t\t\t\t\tcolHeights.slice(\n\t\t\t\t\t\tsegment.leftCol,\n\t\t\t\t\t\tsegment.rightCol + 1 // make exclusive for slice\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t// adjust the columns to account for the segment's height\n\t\t\t\tfor (var colI=segment.leftCol; colI<=segment.rightCol; colI++) {\n\t\t\t\t\tcolHeights[colI] = segment.top + segment.outerHeight;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// the tallest column in the row should be the \"content height\"\n\t\t\trowContentHeights.push(arrayMax(colHeights));\n\t\t}\n\n\t\treturn rowContentHeights;\n\t}", "function calculateVerticals(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar colCnt = getColCnt();\n\t\tvar rowContentHeights = []; // content height for each row\n\t\tvar segmentRows = buildSegmentRows(segments); // an array of segment arrays, one for each row\n\n\t\tfor (var rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tvar segmentRow = segmentRows[rowI];\n\n\t\t\t// an array of running total heights for each column.\n\t\t\t// initialize with all zeros.\n\t\t\tvar colHeights = [];\n\t\t\tfor (var colI=0; colI<colCnt; colI++) {\n\t\t\t\tcolHeights.push(0);\n\t\t\t}\n\n\t\t\t// loop through every segment\n\t\t\tfor (var segmentI=0; segmentI<segmentRow.length; segmentI++) {\n\t\t\t\tvar segment = segmentRow[segmentI];\n\n\t\t\t\t// find the segment's top coordinate by looking at the max height\n\t\t\t\t// of all the columns the segment will be in.\n\t\t\t\tsegment.top = arrayMax(\n\t\t\t\t\tcolHeights.slice(\n\t\t\t\t\t\tsegment.leftCol,\n\t\t\t\t\t\tsegment.rightCol + 1 // make exclusive for slice\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t// adjust the columns to account for the segment's height\n\t\t\t\tfor (var colI=segment.leftCol; colI<=segment.rightCol; colI++) {\n\t\t\t\t\tcolHeights[colI] = segment.top + segment.outerHeight;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// the tallest column in the row should be the \"content height\"\n\t\t\trowContentHeights.push(arrayMax(colHeights));\n\t\t}\n\n\t\treturn rowContentHeights;\n\t}", "function calculateVerticals(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar colCnt = getColCnt();\n\t\tvar rowContentHeights = []; // content height for each row\n\t\tvar segmentRows = buildSegmentRows(segments); // an array of segment arrays, one for each row\n\n\t\tfor (var rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tvar segmentRow = segmentRows[rowI];\n\n\t\t\t// an array of running total heights for each column.\n\t\t\t// initialize with all zeros.\n\t\t\tvar colHeights = [];\n\t\t\tfor (var colI=0; colI<colCnt; colI++) {\n\t\t\t\tcolHeights.push(0);\n\t\t\t}\n\n\t\t\t// loop through every segment\n\t\t\tfor (var segmentI=0; segmentI<segmentRow.length; segmentI++) {\n\t\t\t\tvar segment = segmentRow[segmentI];\n\n\t\t\t\t// find the segment's top coordinate by looking at the max height\n\t\t\t\t// of all the columns the segment will be in.\n\t\t\t\tsegment.top = arrayMax(\n\t\t\t\t\tcolHeights.slice(\n\t\t\t\t\t\tsegment.leftCol,\n\t\t\t\t\t\tsegment.rightCol + 1 // make exclusive for slice\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t// adjust the columns to account for the segment's height\n\t\t\t\tfor (var colI=segment.leftCol; colI<=segment.rightCol; colI++) {\n\t\t\t\t\tcolHeights[colI] = segment.top + segment.outerHeight;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// the tallest column in the row should be the \"content height\"\n\t\t\trowContentHeights.push(arrayMax(colHeights));\n\t\t}\n\n\t\treturn rowContentHeights;\n\t}", "function buildSegmentSubrows(segments) {\n\n\t\t// Give preference to elements with certain criteria, so they have\n\t\t// a chance to be closer to the top.\n\t\tsegments.sort(compareDaySegments);\n\n\t\tvar subrows = [];\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// loop through subrows, starting with the topmost, until the segment\n\t\t\t// doesn't collide with other segments.\n\t\t\tfor (var j=0; j<subrows.length; j++) {\n\t\t\t\tif (!isDaySegmentCollision(segment, subrows[j])) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// `j` now holds the desired subrow index\n\t\t\tif (subrows[j]) {\n\t\t\t\tsubrows[j].push(segment);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsubrows[j] = [ segment ];\n\t\t\t}\n\t\t}\n\n\t\treturn subrows;\n\t}", "function buildSegmentSubrows(segments) {\n\n\t\t// Give preference to elements with certain criteria, so they have\n\t\t// a chance to be closer to the top.\n\t\tsegments.sort(compareDaySegments);\n\n\t\tvar subrows = [];\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// loop through subrows, starting with the topmost, until the segment\n\t\t\t// doesn't collide with other segments.\n\t\t\tfor (var j=0; j<subrows.length; j++) {\n\t\t\t\tif (!isDaySegmentCollision(segment, subrows[j])) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// `j` now holds the desired subrow index\n\t\t\tif (subrows[j]) {\n\t\t\t\tsubrows[j].push(segment);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsubrows[j] = [ segment ];\n\t\t\t}\n\t\t}\n\n\t\treturn subrows;\n\t}", "function buildSegmentSubrows(segments) {\n\n\t\t// Give preference to elements with certain criteria, so they have\n\t\t// a chance to be closer to the top.\n\t\tsegments.sort(compareDaySegments);\n\n\t\tvar subrows = [];\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// loop through subrows, starting with the topmost, until the segment\n\t\t\t// doesn't collide with other segments.\n\t\t\tfor (var j=0; j<subrows.length; j++) {\n\t\t\t\tif (!isDaySegmentCollision(segment, subrows[j])) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// `j` now holds the desired subrow index\n\t\t\tif (subrows[j]) {\n\t\t\t\tsubrows[j].push(segment);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsubrows[j] = [ segment ];\n\t\t\t}\n\t\t}\n\n\t\treturn subrows;\n\t}", "function buildSegmentSubrows(segments) {\n\n\t\t// Give preference to elements with certain criteria, so they have\n\t\t// a chance to be closer to the top.\n\t\tsegments.sort(compareDaySegments);\n\n\t\tvar subrows = [];\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// loop through subrows, starting with the topmost, until the segment\n\t\t\t// doesn't collide with other segments.\n\t\t\tfor (var j=0; j<subrows.length; j++) {\n\t\t\t\tif (!isDaySegmentCollision(segment, subrows[j])) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// `j` now holds the desired subrow index\n\t\t\tif (subrows[j]) {\n\t\t\t\tsubrows[j].push(segment);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsubrows[j] = [ segment ];\n\t\t\t}\n\t\t}\n\n\t\treturn subrows;\n\t}", "function buildSegmentSubrows(segments) {\n\n\t\t// Give preference to elements with certain criteria, so they have\n\t\t// a chance to be closer to the top.\n\t\tsegments.sort(compareDaySegments);\n\n\t\tvar subrows = [];\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// loop through subrows, starting with the topmost, until the segment\n\t\t\t// doesn't collide with other segments.\n\t\t\tfor (var j=0; j<subrows.length; j++) {\n\t\t\t\tif (!isDaySegmentCollision(segment, subrows[j])) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// `j` now holds the desired subrow index\n\t\t\tif (subrows[j]) {\n\t\t\t\tsubrows[j].push(segment);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsubrows[j] = [ segment ];\n\t\t\t}\n\t\t}\n\n\t\treturn subrows;\n\t}", "function addSegEndsFromSequences(){\n //Add all the starting segEnds and internal segJoins\n for(var i=0;i<seqArr.length;i++){\n var length=parseInt(seqArr[i]['length']),\n seqId=seqArr[i]['id'];\n segEndArr[segEndArr.length]=[seqId,0,'POS_STRAND']\n segEndArr[segEndArr.length]=[seqId,length-1,'NEG_STRAND']\n segJoinArr[segJoinArr.length]=[[seqId,0,'POS_STRAND'],[seqId,length-1,'NEG_STRAND'],'internal',length]\n }\n segmentize();\n}", "function isDaySegCollision(seg, otherSegs) {\n var i;\n var otherSeg;\n for (i = 0; i < otherSegs.length; i++) {\n otherSeg = otherSegs[i];\n if (otherSeg.firstCol <= seg.lastCol &&\n otherSeg.lastCol >= seg.firstCol) {\n return true;\n }\n }\n return false;\n }", "function isDaySegCollision(seg, otherSegs) {\n var i;\n var otherSeg;\n for (i = 0; i < otherSegs.length; i++) {\n otherSeg = otherSegs[i];\n if (otherSeg.firstCol <= seg.lastCol &&\n otherSeg.lastCol >= seg.firstCol) {\n return true;\n }\n }\n return false;\n }", "function isDaySegCollision(seg, otherSegs) {\n var i;\n var otherSeg;\n for (i = 0; i < otherSegs.length; i++) {\n otherSeg = otherSegs[i];\n if (otherSeg.firstCol <= seg.lastCol &&\n otherSeg.lastCol >= seg.firstCol) {\n return true;\n }\n }\n return false;\n }", "function findHitCandidates(x, y, shp, arcs) {\n var yy = findRayShapeIntersections(x, y, shp, arcs);\n var cands = [], y1, y2, interval;\n\n // sorting by y-coord organizes y-intercepts into interior segments\n utils.genericSort(yy);\n for (var i=0; i<yy.length; i+=2) {\n y1 = yy[i];\n y2 = yy[i+1];\n interval = (y2 - y1) / 2;\n if (interval > 0) {\n cands.push({\n y: (y1 + y2) / 2,\n x: x,\n interval: interval\n });\n }\n }\n return cands;\n }", "function isDaySegCollision(seg,otherSegs){var i;var otherSeg;for(i=0;i<otherSegs.length;i++){otherSeg=otherSegs[i];if(otherSeg.leftCol<=seg.rightCol&&otherSeg.rightCol>=seg.leftCol){return true;}}return false;}// A cmp function for determining the leftmost event", "function isDaySegCollision(seg, otherSegs) {\n var i;\n var otherSeg;\n for (i = 0; i < otherSegs.length; i++) {\n otherSeg = otherSegs[i];\n if (otherSeg.leftCol <= seg.rightCol &&\n otherSeg.rightCol >= seg.leftCol) {\n return true;\n }\n }\n return false;\n}", "function isDaySegCollision(seg, otherSegs) {\n var i;\n var otherSeg;\n for (i = 0; i < otherSegs.length; i++) {\n otherSeg = otherSegs[i];\n if (otherSeg.leftCol <= seg.rightCol &&\n otherSeg.rightCol >= seg.leftCol) {\n return true;\n }\n }\n return false;\n}", "function isDaySegCollision(seg, otherSegs) {\n var i;\n var otherSeg;\n for (i = 0; i < otherSegs.length; i++) {\n otherSeg = otherSegs[i];\n if (otherSeg.leftCol <= seg.rightCol &&\n otherSeg.rightCol >= seg.leftCol) {\n return true;\n }\n }\n return false;\n}", "function isDaySegCollision(seg, otherSegs) {\n var i;\n var otherSeg;\n for (i = 0; i < otherSegs.length; i++) {\n otherSeg = otherSegs[i];\n if (otherSeg.leftCol <= seg.rightCol &&\n otherSeg.rightCol >= seg.leftCol) {\n return true;\n }\n }\n return false;\n}", "removeSegmentsIntersections(tunnels, isWalls) {\n const walls = this.walls;\n let startWallsLength = 0;\n let newWallsAmount = walls.length - startWallsLength;\n\n while (newWallsAmount > 0) {\n startWallsLength = walls.length;\n for (let j = 0; j < walls.length; j += 4) {\n for (let i = 0; i < (isWalls ? j : tunnels.length); i += 4) {\n const pieces = this.resolveSegmentSegment(\n tunnels[i], tunnels[i + 1], tunnels[i + 2], tunnels[i + 3],\n walls[j], walls[j + 1], walls[j + 2], walls[j + 3]\n );\n if (pieces.length < 4) { // empty walls will be removed in removeZeroLengthWalls()\n walls[j] = 0;\n walls[j + 1] = 0;\n walls[j + 2] = 0;\n walls[j + 3] = 0;\n } else {\n walls[j] = pieces[0];\n walls[j + 1] = pieces[1];\n walls[j + 2] = pieces[2];\n walls[j + 3] = pieces[3];\n\n if (pieces.length > 4) {\n walls.push(pieces[4]);\n walls.push(pieces[5]);\n walls.push(pieces[6]);\n walls.push(pieces[7]);\n }\n }\n }\n }\n newWallsAmount = walls.length - startWallsLength;\n }\n }", "function _testRectPolyCollision_clipRectSegs(mRect, moveBox) {\n return _.chain(mRect.toSegments())\n .filter(seg => {\n let u = VecMath.sub(seg[1], seg[0]);\n let testPt = [seg[0][0], moveBox.height*2, 1];\n let v = VecMath.sub(testPt, seg[0]);\n let cross = VecMath.cross(u, v);\n\n // Keep the segment if the test point is on its \"left\" side.\n return cross[2] < 0;\n })\n .map(seg => {\n let p = seg[0];\n let q = seg[1];\n\n // let p be the leftmost point.\n if(p[0] > q[0]) {\n let swap = q;\n q = p;\n p = swap;\n }\n\n // Get the segment's line equation data.\n let dx = q[0] - p[0];\n let dy = q[1] - p[1];\n let m = dy/dx;\n let b = p[1] - m*p[0];\n let newSeg = [p, q];\n newSeg.m = m;\n newSeg.b = b;\n return newSeg;\n })\n .value();\n }", "function getCrossings(points, edges, edgeBounds) {\n var result = []\n boxIntersect(edgeBounds, function(i, j) {\n var e = edges[i]\n var f = edges[j]\n if(e[0] === f[0] || e[0] === f[1] ||\n e[1] === f[0] || e[1] === f[1]) {\n return\n }\n var a = points[e[0]]\n var b = points[e[1]]\n var c = points[f[0]]\n var d = points[f[1]]\n if(segseg(a, b, c, d)) {\n result.push([i, j])\n }\n })\n return result\n}", "function getCrossings(points, edges, edgeBounds) {\n\t var result = []\n\t boxIntersect(edgeBounds, function(i, j) {\n\t var e = edges[i]\n\t var f = edges[j]\n\t if(e[0] === f[0] || e[0] === f[1] ||\n\t e[1] === f[0] || e[1] === f[1]) {\n\t return\n\t }\n\t var a = points[e[0]]\n\t var b = points[e[1]]\n\t var c = points[f[0]]\n\t var d = points[f[1]]\n\t if(segseg(a, b, c, d)) {\n\t result.push([i, j])\n\t }\n\t })\n\t return result\n\t}", "function getCrossings(points, edges, edgeBounds) {\n\t var result = []\n\t boxIntersect(edgeBounds, function(i, j) {\n\t var e = edges[i]\n\t var f = edges[j]\n\t if(e[0] === f[0] || e[0] === f[1] ||\n\t e[1] === f[0] || e[1] === f[1]) {\n\t return\n\t }\n\t var a = points[e[0]]\n\t var b = points[e[1]]\n\t var c = points[f[0]]\n\t var d = points[f[1]]\n\t if(segseg(a, b, c, d)) {\n\t result.push([i, j])\n\t }\n\t })\n\t return result\n\t}", "function segments_union(segment_1, segment_2){\n var max_segment_1, min_segment_1, max_segment_2, min_segment_2, absolute_max, absolute_min;\n //Case 1: vertical segments\n var vertical = is_vertical_or_quasi_vertical(segment_1); //equivalently is_vertical_or_quasi_vertical(segment_2)\n if(vertical){\n\n if(parseFloat(segment_1[0][1]) >= parseFloat(segment_1[1][1])){\n max_segment_1 = segment_1[0]; min_segment_1 = segment_1[1];\n }\n else{\n max_segment_1 = segment_1[1]; min_segment_1 = segment_1[0];\n }\n if(parseFloat(segment_2[0][1]) >= parseFloat(segment_2[1][1])){\n max_segment_2 = segment_2[0]; min_segment_2 = segment_2[1];\n }\n else{\n max_segment_2 = segment_2[1]; min_segment_2 = segment_2[0];\n }\n\n if(parseFloat(max_segment_1[1]) >= parseFloat(max_segment_2[1])){\n absolute_max = max_segment_1;\n }\n else{\n absolute_max = max_segment_2;\n }\n if(parseFloat(min_segment_1[1]) < parseFloat(min_segment_2[1])){\n absolute_min = min_segment_1;\n }\n else{\n absolute_min = min_segment_2;\n }\n\n return [absolute_min, absolute_max];\n }\n\n //Case 2: non vertical segments\n if(parseFloat(segment_1[0][0]) >= parseFloat(segment_1[1][0])){\n max_segment_1 = segment_1[0]; min_segment_1 = segment_1[1];\n }\n else{\n max_segment_1 = segment_1[1]; min_segment_1 = segment_1[0];\n }\n if(parseFloat(segment_2[0][0]) >= parseFloat(segment_2[1][0])){\n max_segment_2 = segment_2[0]; min_segment_2 = segment_2[1];\n }\n else{\n max_segment_2 = segment_2[1]; min_segment_2 = segment_2[0];\n }\n\n if(parseFloat(max_segment_1[0]) >= parseFloat(max_segment_2[0])){\n absolute_max = max_segment_1;\n }\n else{\n absolute_max = max_segment_2;\n }\n if(parseFloat(min_segment_1[0]) < parseFloat(min_segment_2[0])){\n absolute_min = min_segment_1;\n }\n else{\n absolute_min = min_segment_2;\n }\n\n return [absolute_min, absolute_max];\n}", "clipEar(listofseg){\n\t\tlet copypoint = listofseg.map(function(e){\n\t\t\treturn e.a\n\t\t})\n\t\tfor (let i=0; i<listofseg.length;i++){\n\t\t\tlet sega = listofseg[i];\n\t\t\tlet segb;\n\t\t\tlet copy = copypoint.map((x=>x));\n\t\t\tif (i=== listofseg.length-1){\n\t\t\t\tsegb = listofseg[0]\n\t\t\t\tcopy.splice(i,1)\n\t\t\t\tcopy.splice(0,1)\n\t\t\t\tcopy.splice(0,1)\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsegb = listofseg[i+1]\n\t\t\t\tcopy.splice(i,1)\n\t\t\t\tcopy.splice(i,1)\n\t\t\t\tcopy.splice(i,1)\n\t\t\t}\n\t\t\tlet notfound = true;\n\t\t\tfor (let j=0; j<copy.length;j++){\n\t\t\t\tif (this.checkTriangle(sega, segb, copy[j])){\n\t\t\t\t\tnotfound = false\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (notfound){\n\t\t\t\tthis.segList.push([sega, segb])\n\t\t\t\tif (i=== listofseg.length-1){\n\t\t\t\t\tlistofseg.pop();\n\t\t\t\t\tlistofseg.shift();\n\t\t\t\t\treturn listofseg.splice(0,0,{a:sega.a,b:segb.b})\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\treturn listofseg.splice(i,2,{a:sega.a,b:segb.b})\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function getCrossings (points, edges, edgeBounds) {\n var result = []\n boxIntersect(edgeBounds, function (i, j) {\n var e = edges[i]\n var f = edges[j]\n if (e[0] === f[0] || e[0] === f[1] ||\n e[1] === f[0] || e[1] === f[1]) {\n return\n }\n var a = points[e[0]]\n var b = points[e[1]]\n var c = points[f[0]]\n var d = points[f[1]]\n if (segseg(a, b, c, d)) {\n result.push([i, j])\n }\n })\n return result\n}", "function sub_compute_intersection() {\n for (var i = sidx; i < (sidx + size) && i < biglen; i++) {\n for (var j = 0; j < smlen; j++) {\n if (bigger[i] === smaller[j]) {\n results.push(smaller[j]);\n break;\n }\n }\n }\n if (i >= biglen) {\n callback(null, results);\n } else {\n sidx += size;\n process.nextTick(sub_compute_intersection);\n }\n }", "function getTJunctions (points, edges, edgeBounds, vertBounds) {\n var result = []\n boxIntersect(edgeBounds, vertBounds, function (i, v) {\n var e = edges[i]\n if (e[0] === v || e[1] === v) {\n return\n }\n var p = points[v]\n var a = points[e[0]]\n var b = points[e[1]]\n if (segseg(a, b, p, p)) {\n result.push([i, v])\n }\n })\n return result\n}", "function getTJunctions(points, edges, edgeBounds, vertBounds) {\n\t var result = []\n\t boxIntersect(edgeBounds, vertBounds, function(i, v) {\n\t var e = edges[i]\n\t if(e[0] === v || e[1] === v) {\n\t return\n\t }\n\t var p = points[v]\n\t var a = points[e[0]]\n\t var b = points[e[1]]\n\t if(segseg(a, b, p, p)) {\n\t result.push([i, v])\n\t }\n\t })\n\t return result\n\t}", "function getTJunctions(points, edges, edgeBounds, vertBounds) {\n\t var result = []\n\t boxIntersect(edgeBounds, vertBounds, function(i, v) {\n\t var e = edges[i]\n\t if(e[0] === v || e[1] === v) {\n\t return\n\t }\n\t var p = points[v]\n\t var a = points[e[0]]\n\t var b = points[e[1]]\n\t if(segseg(a, b, p, p)) {\n\t result.push([i, v])\n\t }\n\t })\n\t return result\n\t}", "@computed\n get textIntersections() {\n if (this.annotations.length == 0) {\n return [];\n }\n // split annotation in parts to create spans\n\n const offsets = {};\n\n // helper functions\n const addOffset = (start, end, annotations) => {\n if (offsets[`${start}-${end}`] == undefined) {\n offsets[`${start}-${end}`] = {\n startOffset: start,\n endOffset: end,\n annotations: annotations,\n };\n } else {\n for (const annotation of annotations) {\n if (!includes(offsets[`${start}-${end}`].annotations, annotation)) {\n offsets[`${start}-${end}`].annotations.push(annotation);\n }\n }\n }\n };\n\n const intersects = (x1, x2, y1, y2) => x2 > y1 && y2 > x1;\n\n // go through the annotation and split them\n const annotationCount = this.annotations.length;\n\n for (let i = 0; i < annotationCount; i++) {\n const annotation = this.annotations[i];\n let hasIntersections = false;\n let lastMiddleOffset = undefined;\n\n if (!isEmpty(offsets)) {\n // offset exists\n map(\n orderBy(\n values(offsets),\n ['startOffset', 'endOffset'],\n ['asc', 'desc'],\n ),\n offset => {\n if (\n intersects(\n annotation.startOffset,\n annotation.endOffset,\n offset.startOffset,\n offset.endOffset - 1,\n )\n ) {\n if (!hasIntersections) {\n hasIntersections = true;\n }\n\n // found intersection\n const startOffset = annotation.startOffset - offset.startOffset;\n const endOffset = annotation.endOffset - offset.endOffset;\n const offsetAnnotations = offset.annotations;\n\n // front part\n\n if (startOffset > 0) {\n addOffset(\n offset.startOffset,\n annotation.startOffset,\n offsetAnnotations,\n );\n } else if (\n startOffset < 0 &&\n lastMiddleOffset < annotation.startOffset // dont add thing that there before\n ) {\n addOffset(annotation.startOffset, offset.startOffset, [\n annotation.id,\n ]);\n }\n\n // middle part\n\n addOffset(\n Math.max(annotation.startOffset, offset.startOffset),\n Math.min(annotation.endOffset, offset.endOffset),\n offsetAnnotations.concat(annotation.id),\n );\n\n lastMiddleOffset = Math.min(\n annotation.endOffset,\n offset.endOffset,\n );\n\n // back part\n\n if (endOffset > 0) {\n addOffset(offset.endOffset, annotation.endOffset, [\n annotation.id,\n ]);\n } else if (endOffset < 0) {\n addOffset(\n annotation.endOffset,\n offset.endOffset,\n offsetAnnotations,\n );\n }\n\n // delete pre existing offset if not in there\n if (\n (startOffset != 0 || endOffset != 0) &&\n offsets[\n `${offset.startOffset}-${offset.endOffset}`\n ].annotations.find(d => {\n return d == annotation.id;\n }) == undefined\n ) {\n delete offsets[`${offset.startOffset}-${offset.endOffset}`];\n }\n }\n },\n );\n } else {\n // offset is empty > init\n addOffset(annotation.startOffset, annotation.endOffset, [\n annotation.id,\n ]);\n }\n // no intersections found\n if (!hasIntersections) {\n // didn't found intersection\n addOffset(annotation.startOffset, annotation.endOffset, [\n annotation.id,\n ]);\n }\n }\n return orderBy(values(offsets), ['startOffset'], 'asc');\n }", "function isDaySegCollision(seg, otherSegs) {\n var i, otherSeg;\n\n for (i = 0; i < otherSegs.length; i++) {\n otherSeg = otherSegs[i];\n\n if (\n otherSeg.leftCol <= seg.rightCol &&\n otherSeg.rightCol >= seg.leftCol\n ) {\n return true;\n }\n }\n\n return false;\n }", "function getTJunctions(points, edges, edgeBounds, vertBounds) {\n var result = []\n boxIntersect(edgeBounds, vertBounds, function(i, v) {\n var e = edges[i]\n if(e[0] === v || e[1] === v) {\n return\n }\n var p = points[v]\n var a = points[e[0]]\n var b = points[e[1]]\n if(segseg(a, b, p, p)) {\n result.push([i, v])\n }\n })\n return result\n}", "resolveSegmentSegment(ax1, ay1, ax2, ay2, bx1, by1, bx2, by2) {\n const result = [];\n const isHorizontal1 = ax2 - ax1 > ay2 - ay1;\n const isHorizontal2 = bx2 - bx1 > by2 - by1;\n\n if (isHorizontal1 && isHorizontal2 &&\n by1 === ay1 &&\n ((ax1 <= bx2 && ax1 >= bx1) || (ax2 <= bx2 && ax2 >= bx1) || (bx1 <= ax2 && bx1 >= ax1) || (bx2 <= ax2 && bx2 >= ax1))) {\n\n if (bx1 < ax1) result.push(bx1, by1, ax1, by1);\n if (bx2 > ax2) result.push(ax2, by2, bx2, by2);\n\n } else if (!isHorizontal1 && isHorizontal2 &&\n by1 >= ay1 && by1 < ay2 &&\n ((ax1 <= bx2 && ax1 >= bx1) || (ax2 <= bx2 && ax2 >= bx1) || (bx1 <= ax2 && bx1 >= ax1) || (bx2 <= ax2 && bx2 >= ax1))) {\n\n if (bx1 < ax1) result.push(bx1, by1, ax1, by1);\n if (bx2 > ax2) result.push(ax2 + 1, by2, bx2, by2);\n\n } else if (!isHorizontal1 && !isHorizontal2 &&\n ax1 === bx2 &&\n ((by1 <= ay2 && by1 >= ay1) || (by2 <= ay2 && by2 >= ay1) || (ay1 <= by2 && ay1 >= by1) || (ay2 <= by2 && ay2 >= by1))) {\n\n if (by1 < ay1) result.push(bx1, by1, bx1, ay1);\n if (by2 > ay2) result.push(bx2, ay2, bx2, by2);\n\n } else if (isHorizontal1 && !isHorizontal2 &&\n bx1 >= ax1 && bx1 < ax2 &&\n ((ay2 <= by2 && ay2 >= by1) || (ay1 <= by2 && ay1 >= by1) || (by2 <= ay2 && by2 >= ay1) || (by1 <= ay2 && by1 >= ay1))) {\n\n if (by1 < ay1) result.push(bx1, by1, bx1, ay1);\n if (by2 > ay2) result.push(bx2, ay2 + 1, bx2, by2);\n\n } else { // segments do not intersect\n result.push(bx1, by1, bx2, by2);\n }\n\n return result;\n }", "function renderSlotSegs(segs, modifiedEventId) {\n\t\n\t\tvar i, segCnt=segs.length, seg,\n\t\t\tevent,\n\t\t\ttop,\n\t\t\tbottom,\n\t\t\tcolumnLeft,\n\t\t\tcolumnRight,\n\t\t\tcolumnWidth,\n\t\t\twidth,\n\t\t\tleft,\n\t\t\tright,\n\t\t\thtml = '',\n\t\t\teventElements,\n\t\t\teventElement,\n\t\t\ttriggerRes,\n\t\t\ttitleElement,\n\t\t\theight,\n\t\t\tslotSegmentContainer = getSlotSegmentContainer(),\n\t\t\tisRTL = opt('isRTL');\n\t\t\t\n\t\t// calculate position/dimensions, create html\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\ttop = timePosition(seg.start, seg.start);\n\t\t\tbottom = timePosition(seg.start, seg.end);\n\t\t\tcolumnLeft = colContentLeft(seg.col);\n\t\t\tcolumnRight = colContentRight(seg.col);\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\t// shave off space on right near scrollbars (2.5%)\n\t\t\t// TODO: move this to CSS somehow\n\t\t\tcolumnRight -= columnWidth * .025;\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\twidth = columnWidth * (seg.forwardCoord - seg.backwardCoord);\n\n\t\t\tif (opt('slotEventOverlap')) {\n\t\t\t\t// double the width while making sure resize handle is visible\n\t\t\t\t// (assumed to be 20px wide)\n\t\t\t\twidth = Math.max(\n\t\t\t\t\t(width - (20/2)) * 2,\n\t\t\t\t\twidth // narrow columns will want to make the segment smaller than\n\t\t\t\t\t\t// the natural width. don't allow it\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (isRTL) {\n\t\t\t\tright = columnRight - seg.backwardCoord * columnWidth;\n\t\t\t\tleft = right - width;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tleft = columnLeft + seg.backwardCoord * columnWidth;\n\t\t\t\tright = left + width;\n\t\t\t}\n\n\t\t\t// make sure horizontal coordinates are in bounds\n\t\t\tleft = Math.max(left, columnLeft);\n\t\t\tright = Math.min(right, columnRight);\n\t\t\twidth = right - left;\n\n\t\t\tseg.top = top;\n\t\t\tseg.left = left;\n\t\t\tseg.outerWidth = width;\n\t\t\tseg.outerHeight = bottom - top;\n\t\t\thtml += slotSegHtml(event, seg);\n\t\t}\n\n\t\tslotSegmentContainer[0].innerHTML = html; // faster than html()\n\t\teventElements = slotSegmentContainer.children();\n\t\t\n\t\t// retrieve elements, run through eventRender callback, bind event handlers\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\teventElement = $(eventElements[i]); // faster than eq()\n\t\t\ttriggerRes = trigger('eventRender', event, event, eventElement);\n\t\t\tif (triggerRes === false) {\n\t\t\t\teventElement.remove();\n\t\t\t}else{\n\t\t\t\tif (triggerRes && triggerRes !== true) {\n\t\t\t\t\teventElement.remove();\n\t\t\t\t\teventElement = $(triggerRes)\n\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\ttop: seg.top,\n\t\t\t\t\t\t\tleft: seg.left\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.appendTo(slotSegmentContainer);\n\t\t\t\t}\n\t\t\t\tseg.element = eventElement;\n\t\t\t\tif (event._id === modifiedEventId) {\n\t\t\t\t\tbindSlotSeg(event, eventElement, seg);\n\t\t\t\t}else{\n\t\t\t\t\teventElement[0]._fci = i; // for lazySegBind\n\t\t\t\t}\n\t\t\t\treportEventElement(event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\n\t\tlazySegBind(slotSegmentContainer, segs, bindSlotSeg);\n\t\t\n\t\t// record event sides and title positions\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif (eventElement = seg.element) {\n\t\t\t\tseg.vsides = vsides(eventElement, true);\n\t\t\t\tseg.hsides = hsides(eventElement, true);\n\t\t\t\ttitleElement = eventElement.find('.fc-event-title');\n\t\t\t\tif (titleElement.length) {\n\t\t\t\t\tseg.contentTop = titleElement[0].offsetTop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// set all positions/dimensions at once\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif (eventElement = seg.element) {\n\t\t\t\teventElement[0].style.width = Math.max(0, seg.outerWidth - seg.hsides) + 'px';\n\t\t\t\theight = Math.max(0, seg.outerHeight - seg.vsides);\n\t\t\t\teventElement[0].style.height = height + 'px';\n\t\t\t\tevent = seg.event;\n\t\t\t\tif (seg.contentTop !== undefined && height - seg.contentTop < 10) {\n\t\t\t\t\t// not enough room for title, put it in the time (TODO: maybe make both display:inline instead)\n\t\t\t\t\teventElement.find('div.fc-event-time')\n\t\t\t\t\t\t.text(formatDate(event.start, opt('timeFormat')) + ' - ' + event.title);\n\t\t\t\t\teventElement.find('div.fc-event-title')\n\t\t\t\t\t\t.remove();\n\t\t\t\t}\n\t\t\t\ttrigger('eventAfterRender', event, event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t}", "function renderSlotSegs(segs, modifiedEventId) {\n\t\n\t\tvar i, segCnt=segs.length, seg,\n\t\t\tevent,\n\t\t\ttop,\n\t\t\tbottom,\n\t\t\tcolumnLeft,\n\t\t\tcolumnRight,\n\t\t\tcolumnWidth,\n\t\t\twidth,\n\t\t\tleft,\n\t\t\tright,\n\t\t\thtml = '',\n\t\t\teventElements,\n\t\t\teventElement,\n\t\t\ttriggerRes,\n\t\t\ttitleElement,\n\t\t\theight,\n\t\t\tslotSegmentContainer = getSlotSegmentContainer(),\n\t\t\tisRTL = opt('isRTL');\n\t\t\t\n\t\t// calculate position/dimensions, create html\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\ttop = timePosition(seg.start, seg.start);\n\t\t\tbottom = timePosition(seg.start, seg.end);\n\t\t\tcolumnLeft = colContentLeft(seg.col);\n\t\t\tcolumnRight = colContentRight(seg.col);\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\t// shave off space on right near scrollbars (2.5%)\n\t\t\t// TODO: move this to CSS somehow\n\t\t\tcolumnRight -= columnWidth * .025;\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\twidth = columnWidth * (seg.forwardCoord - seg.backwardCoord);\n\n\t\t\tif (opt('slotEventOverlap')) {\n\t\t\t\t// double the width while making sure resize handle is visible\n\t\t\t\t// (assumed to be 20px wide)\n\t\t\t\twidth = Math.max(\n\t\t\t\t\t(width - (20/2)) * 2,\n\t\t\t\t\twidth // narrow columns will want to make the segment smaller than\n\t\t\t\t\t\t// the natural width. don't allow it\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (isRTL) {\n\t\t\t\tright = columnRight - seg.backwardCoord * columnWidth;\n\t\t\t\tleft = right - width;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tleft = columnLeft + seg.backwardCoord * columnWidth;\n\t\t\t\tright = left + width;\n\t\t\t}\n\n\t\t\t// make sure horizontal coordinates are in bounds\n\t\t\tleft = Math.max(left, columnLeft);\n\t\t\tright = Math.min(right, columnRight);\n\t\t\twidth = right - left;\n\n\t\t\tseg.top = top;\n\t\t\tseg.left = left;\n\t\t\tseg.outerWidth = width;\n\t\t\tseg.outerHeight = bottom - top;\n\t\t\thtml += slotSegHtml(event, seg);\n\t\t}\n\n\t\tslotSegmentContainer[0].innerHTML = html; // faster than html()\n\t\teventElements = slotSegmentContainer.children();\n\t\t\n\t\t// retrieve elements, run through eventRender callback, bind event handlers\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\teventElement = $(eventElements[i]); // faster than eq()\n\t\t\ttriggerRes = trigger('eventRender', event, event, eventElement);\n\t\t\tif (triggerRes === false) {\n\t\t\t\teventElement.remove();\n\t\t\t}else{\n\t\t\t\tif (triggerRes && triggerRes !== true) {\n\t\t\t\t\teventElement.remove();\n\t\t\t\t\teventElement = $(triggerRes)\n\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\ttop: seg.top,\n\t\t\t\t\t\t\tleft: seg.left\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.appendTo(slotSegmentContainer);\n\t\t\t\t}\n\t\t\t\tseg.element = eventElement;\n\t\t\t\tif (event._id === modifiedEventId) {\n\t\t\t\t\tbindSlotSeg(event, eventElement, seg);\n\t\t\t\t}else{\n\t\t\t\t\teventElement[0]._fci = i; // for lazySegBind\n\t\t\t\t}\n\t\t\t\treportEventElement(event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\n\t\tlazySegBind(slotSegmentContainer, segs, bindSlotSeg);\n\t\t\n\t\t// record event sides and title positions\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif (eventElement = seg.element) {\n\t\t\t\tseg.vsides = vsides(eventElement, true);\n\t\t\t\tseg.hsides = hsides(eventElement, true);\n\t\t\t\ttitleElement = eventElement.find('.fc-event-title');\n\t\t\t\tif (titleElement.length) {\n\t\t\t\t\tseg.contentTop = titleElement[0].offsetTop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// set all positions/dimensions at once\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif (eventElement = seg.element) {\n\t\t\t\teventElement[0].style.width = Math.max(0, seg.outerWidth - seg.hsides) + 'px';\n\t\t\t\theight = Math.max(0, seg.outerHeight - seg.vsides);\n\t\t\t\teventElement[0].style.height = height + 'px';\n\t\t\t\tevent = seg.event;\n\t\t\t\tif (seg.contentTop !== undefined && height - seg.contentTop < 10) {\n\t\t\t\t\t// not enough room for title, put it in the time (TODO: maybe make both display:inline instead)\n\t\t\t\t\teventElement.find('div.fc-event-time')\n\t\t\t\t\t\t.text(formatDate(event.start, opt('timeFormat')) + ' - ' + event.title);\n\t\t\t\t\teventElement.find('div.fc-event-title')\n\t\t\t\t\t\t.remove();\n\t\t\t\t}\n\t\t\t\ttrigger('eventAfterRender', event, event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t}", "function renderSlotSegs(segs, modifiedEventId) {\n\t\n\t\tvar i, segCnt=segs.length, seg,\n\t\t\tevent,\n\t\t\ttop,\n\t\t\tbottom,\n\t\t\tcolumnLeft,\n\t\t\tcolumnRight,\n\t\t\tcolumnWidth,\n\t\t\twidth,\n\t\t\tleft,\n\t\t\tright,\n\t\t\thtml = '',\n\t\t\teventElements,\n\t\t\teventElement,\n\t\t\ttriggerRes,\n\t\t\ttitleElement,\n\t\t\theight,\n\t\t\tslotSegmentContainer = getSlotSegmentContainer(),\n\t\t\tisRTL = opt('isRTL');\n\t\t\t\n\t\t// calculate position/dimensions, create html\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\ttop = timePosition(seg.start, seg.start);\n\t\t\tbottom = timePosition(seg.start, seg.end);\n\t\t\tcolumnLeft = colContentLeft(seg.col);\n\t\t\tcolumnRight = colContentRight(seg.col);\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\t// shave off space on right near scrollbars (2.5%)\n\t\t\t// TODO: move this to CSS somehow\n\t\t\tcolumnRight -= columnWidth * .025;\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\twidth = columnWidth * (seg.forwardCoord - seg.backwardCoord);\n\n\t\t\tif (opt('slotEventOverlap')) {\n\t\t\t\t// double the width while making sure resize handle is visible\n\t\t\t\t// (assumed to be 20px wide)\n\t\t\t\twidth = Math.max(\n\t\t\t\t\t(width - (20/2)) * 2,\n\t\t\t\t\twidth // narrow columns will want to make the segment smaller than\n\t\t\t\t\t\t// the natural width. don't allow it\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (isRTL) {\n\t\t\t\tright = columnRight - seg.backwardCoord * columnWidth;\n\t\t\t\tleft = right - width;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tleft = columnLeft + seg.backwardCoord * columnWidth;\n\t\t\t\tright = left + width;\n\t\t\t}\n\n\t\t\t// make sure horizontal coordinates are in bounds\n\t\t\tleft = Math.max(left, columnLeft);\n\t\t\tright = Math.min(right, columnRight);\n\t\t\twidth = right - left;\n\n\t\t\tseg.top = top;\n\t\t\tseg.left = left;\n\t\t\tseg.outerWidth = width;\n\t\t\tseg.outerHeight = bottom - top;\n\t\t\thtml += slotSegHtml(event, seg);\n\t\t}\n\n\t\tslotSegmentContainer[0].innerHTML = html; // faster than html()\n\t\teventElements = slotSegmentContainer.children();\n\t\t\n\t\t// retrieve elements, run through eventRender callback, bind event handlers\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\teventElement = $(eventElements[i]); // faster than eq()\n\t\t\ttriggerRes = trigger('eventRender', event, event, eventElement);\n\t\t\tif (triggerRes === false) {\n\t\t\t\teventElement.remove();\n\t\t\t}else{\n\t\t\t\tif (triggerRes && triggerRes !== true) {\n\t\t\t\t\teventElement.remove();\n\t\t\t\t\teventElement = $(triggerRes)\n\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\ttop: seg.top,\n\t\t\t\t\t\t\tleft: seg.left\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.appendTo(slotSegmentContainer);\n\t\t\t\t}\n\t\t\t\tseg.element = eventElement;\n\t\t\t\tif (event._id === modifiedEventId) {\n\t\t\t\t\tbindSlotSeg(event, eventElement, seg);\n\t\t\t\t}else{\n\t\t\t\t\teventElement[0]._fci = i; // for lazySegBind\n\t\t\t\t}\n\t\t\t\treportEventElement(event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\n\t\tlazySegBind(slotSegmentContainer, segs, bindSlotSeg);\n\t\t\n\t\t// record event sides and title positions\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif (eventElement = seg.element) {\n\t\t\t\tseg.vsides = vsides(eventElement, true);\n\t\t\t\tseg.hsides = hsides(eventElement, true);\n\t\t\t\ttitleElement = eventElement.find('.fc-event-title');\n\t\t\t\tif (titleElement.length) {\n\t\t\t\t\tseg.contentTop = titleElement[0].offsetTop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// set all positions/dimensions at once\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif (eventElement = seg.element) {\n\t\t\t\teventElement[0].style.width = Math.max(0, seg.outerWidth - seg.hsides) + 'px';\n\t\t\t\theight = Math.max(0, seg.outerHeight - seg.vsides);\n\t\t\t\teventElement[0].style.height = height + 'px';\n\t\t\t\tevent = seg.event;\n\t\t\t\tif (seg.contentTop !== undefined && height - seg.contentTop < 10) {\n\t\t\t\t\t// not enough room for title, put it in the time (TODO: maybe make both display:inline instead)\n\t\t\t\t\teventElement.find('div.fc-event-time')\n\t\t\t\t\t\t.text(formatDate(event.start, opt('timeFormat')) + ' - ' + event.title);\n\t\t\t\t\teventElement.find('div.fc-event-title')\n\t\t\t\t\t\t.remove();\n\t\t\t\t}\n\t\t\t\ttrigger('eventAfterRender', event, event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t}", "function renderSlotSegs(segs, modifiedEventId) {\n\t\n\t\tvar i, segCnt=segs.length, seg,\n\t\t\tevent,\n\t\t\ttop,\n\t\t\tbottom,\n\t\t\tcolumnLeft,\n\t\t\tcolumnRight,\n\t\t\tcolumnWidth,\n\t\t\twidth,\n\t\t\tleft,\n\t\t\tright,\n\t\t\thtml = '',\n\t\t\teventElements,\n\t\t\teventElement,\n\t\t\ttriggerRes,\n\t\t\ttitleElement,\n\t\t\theight,\n\t\t\tslotSegmentContainer = getSlotSegmentContainer(),\n\t\t\tisRTL = opt('isRTL');\n\t\t\t\n\t\t// calculate position/dimensions, create html\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\ttop = computeDateTop(seg.start, seg.start);\n\t\t\tbottom = computeDateTop(seg.end, seg.start);\n\t\t\tcolumnLeft = colContentLeft(seg.col);\n\t\t\tcolumnRight = colContentRight(seg.col);\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\t// shave off space on right near scrollbars (2.5%)\n\t\t\t// TODO: move this to CSS somehow\n\t\t\tcolumnRight -= columnWidth * .025;\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\twidth = columnWidth * (seg.forwardCoord - seg.backwardCoord);\n\n\t\t\tif (opt('slotEventOverlap')) {\n\t\t\t\t// double the width while making sure resize handle is visible\n\t\t\t\t// (assumed to be 20px wide)\n\t\t\t\twidth = Math.max(\n\t\t\t\t\t(width - (20/2)) * 2,\n\t\t\t\t\twidth // narrow columns will want to make the segment smaller than\n\t\t\t\t\t\t// the natural width. don't allow it\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (isRTL) {\n\t\t\t\tright = columnRight - seg.backwardCoord * columnWidth;\n\t\t\t\tleft = right - width;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tleft = columnLeft + seg.backwardCoord * columnWidth;\n\t\t\t\tright = left + width;\n\t\t\t}\n\n\t\t\t// make sure horizontal coordinates are in bounds\n\t\t\tleft = Math.max(left, columnLeft);\n\t\t\tright = Math.min(right, columnRight);\n\t\t\twidth = right - left;\n\n\t\t\tseg.top = top;\n\t\t\tseg.left = left;\n\t\t\tseg.outerWidth = width;\n\t\t\tseg.outerHeight = bottom - top;\n\t\t\thtml += slotSegHtml(event, seg);\n\t\t}\n\n\t\tslotSegmentContainer[0].innerHTML = html; // faster than html()\n\t\teventElements = slotSegmentContainer.children();\n\t\t\n\t\t// retrieve elements, run through eventRender callback, bind event handlers\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\teventElement = $(eventElements[i]); // faster than eq()\n\t\t\ttriggerRes = trigger('eventRender', event, event, eventElement);\n\t\t\tif (triggerRes === false) {\n\t\t\t\teventElement.remove();\n\t\t\t}else{\n\t\t\t\tif (triggerRes && triggerRes !== true) {\n\t\t\t\t\teventElement.remove();\n\t\t\t\t\teventElement = $(triggerRes)\n\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\ttop: seg.top,\n\t\t\t\t\t\t\tleft: seg.left\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.appendTo(slotSegmentContainer);\n\t\t\t\t}\n\t\t\t\tseg.element = eventElement;\n\t\t\t\tif (event._id === modifiedEventId) {\n\t\t\t\t\tbindSlotSeg(event, eventElement, seg);\n\t\t\t\t}else{\n\t\t\t\t\teventElement[0]._fci = i; // for lazySegBind\n\t\t\t\t}\n\t\t\t\treportEventElement(event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\n\t\tlazySegBind(slotSegmentContainer, segs, bindSlotSeg);\n\t\t\n\t\t// record event sides and title positions\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif ((eventElement = seg.element)) {\n\t\t\t\tseg.vsides = vsides(eventElement, true);\n\t\t\t\tseg.hsides = hsides(eventElement, true);\n\t\t\t\ttitleElement = eventElement.find('.fc-event-title');\n\t\t\t\tif (titleElement.length) {\n\t\t\t\t\tseg.contentTop = titleElement[0].offsetTop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// set all positions/dimensions at once\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif ((eventElement = seg.element)) {\n\t\t\t\teventElement[0].style.width = Math.max(0, seg.outerWidth - seg.hsides) + 'px';\n\t\t\t\theight = Math.max(0, seg.outerHeight - seg.vsides);\n\t\t\t\teventElement[0].style.height = height + 'px';\n\t\t\t\tevent = seg.event;\n\t\t\t\tif (seg.contentTop !== undefined && height - seg.contentTop < 10) {\n\t\t\t\t\t// not enough room for title, put it in the time (TODO: maybe make both display:inline instead)\n\t\t\t\t\teventElement.find('div.fc-event-time')\n\t\t\t\t\t\t.text(\n\t\t\t\t\t\t\tformatDate(event.start, opt('timeFormat')) + ' - ' + event.title\n\t\t\t\t\t\t);\n\t\t\t\t\teventElement.find('div.fc-event-title')\n\t\t\t\t\t\t.remove();\n\t\t\t\t}\n\t\t\t\ttrigger('eventAfterRender', event, event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t}", "function renderSlotSegs(segs, modifiedEventId) {\n\t\n\t\tvar i, segCnt=segs.length, seg,\n\t\t\tevent,\n\t\t\ttop,\n\t\t\tbottom,\n\t\t\tcolumnLeft,\n\t\t\tcolumnRight,\n\t\t\tcolumnWidth,\n\t\t\twidth,\n\t\t\tleft,\n\t\t\tright,\n\t\t\thtml = '',\n\t\t\teventElements,\n\t\t\teventElement,\n\t\t\ttriggerRes,\n\t\t\ttitleElement,\n\t\t\theight,\n\t\t\tslotSegmentContainer = getSlotSegmentContainer(),\n\t\t\tisRTL = opt('isRTL');\n\t\t\t\n\t\t// calculate position/dimensions, create html\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\ttop = computeDateTop(seg.start, seg.start);\n\t\t\tbottom = computeDateTop(seg.end, seg.start);\n\t\t\tcolumnLeft = colContentLeft(seg.col);\n\t\t\tcolumnRight = colContentRight(seg.col);\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\t// shave off space on right near scrollbars (2.5%)\n\t\t\t// TODO: move this to CSS somehow\n\t\t\tcolumnRight -= columnWidth * .025;\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\twidth = columnWidth * (seg.forwardCoord - seg.backwardCoord);\n\n\t\t\tif (opt('slotEventOverlap')) {\n\t\t\t\t// double the width while making sure resize handle is visible\n\t\t\t\t// (assumed to be 20px wide)\n\t\t\t\twidth = Math.max(\n\t\t\t\t\t(width - (20/2)) * 2,\n\t\t\t\t\twidth // narrow columns will want to make the segment smaller than\n\t\t\t\t\t\t// the natural width. don't allow it\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (isRTL) {\n\t\t\t\tright = columnRight - seg.backwardCoord * columnWidth;\n\t\t\t\tleft = right - width;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tleft = columnLeft + seg.backwardCoord * columnWidth;\n\t\t\t\tright = left + width;\n\t\t\t}\n\n\t\t\t// make sure horizontal coordinates are in bounds\n\t\t\tleft = Math.max(left, columnLeft);\n\t\t\tright = Math.min(right, columnRight);\n\t\t\twidth = right - left;\n\n\t\t\tseg.top = top;\n\t\t\tseg.left = left;\n\t\t\tseg.outerWidth = width;\n\t\t\tseg.outerHeight = bottom - top;\n\t\t\thtml += slotSegHtml(event, seg);\n\t\t}\n\n\t\tslotSegmentContainer[0].innerHTML = html; // faster than html()\n\t\teventElements = slotSegmentContainer.children();\n\t\t\n\t\t// retrieve elements, run through eventRender callback, bind event handlers\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\teventElement = $(eventElements[i]); // faster than eq()\n\t\t\ttriggerRes = trigger('eventRender', event, event, eventElement);\n\t\t\tif (triggerRes === false) {\n\t\t\t\teventElement.remove();\n\t\t\t}else{\n\t\t\t\tif (triggerRes && triggerRes !== true) {\n\t\t\t\t\teventElement.remove();\n\t\t\t\t\teventElement = $(triggerRes)\n\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\ttop: seg.top,\n\t\t\t\t\t\t\tleft: seg.left\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.appendTo(slotSegmentContainer);\n\t\t\t\t}\n\t\t\t\tseg.element = eventElement;\n\t\t\t\tif (event._id === modifiedEventId) {\n\t\t\t\t\tbindSlotSeg(event, eventElement, seg);\n\t\t\t\t}else{\n\t\t\t\t\teventElement[0]._fci = i; // for lazySegBind\n\t\t\t\t}\n\t\t\t\treportEventElement(event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\n\t\tlazySegBind(slotSegmentContainer, segs, bindSlotSeg);\n\t\t\n\t\t// record event sides and title positions\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif ((eventElement = seg.element)) {\n\t\t\t\tseg.vsides = vsides(eventElement, true);\n\t\t\t\tseg.hsides = hsides(eventElement, true);\n\t\t\t\ttitleElement = eventElement.find('.fc-event-title');\n\t\t\t\tif (titleElement.length) {\n\t\t\t\t\tseg.contentTop = titleElement[0].offsetTop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// set all positions/dimensions at once\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif ((eventElement = seg.element)) {\n\t\t\t\teventElement[0].style.width = Math.max(0, seg.outerWidth - seg.hsides) + 'px';\n\t\t\t\theight = Math.max(0, seg.outerHeight - seg.vsides);\n\t\t\t\teventElement[0].style.height = height + 'px';\n\t\t\t\tevent = seg.event;\n\t\t\t\tif (seg.contentTop !== undefined && height - seg.contentTop < 10) {\n\t\t\t\t\t// not enough room for title, put it in the time (TODO: maybe make both display:inline instead)\n\t\t\t\t\teventElement.find('div.fc-event-time')\n\t\t\t\t\t\t.text(\n\t\t\t\t\t\t\tformatDate(event.start, opt('timeFormat')) + ' - ' + event.title\n\t\t\t\t\t\t);\n\t\t\t\t\teventElement.find('div.fc-event-title')\n\t\t\t\t\t\t.remove();\n\t\t\t\t}\n\t\t\t\ttrigger('eventAfterRender', event, event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t}", "function renderSlotSegs(segs, modifiedEventId) {\n\t\n\t\tvar i, segCnt=segs.length, seg,\n\t\t\tevent,\n\t\t\ttop,\n\t\t\tbottom,\n\t\t\tcolumnLeft,\n\t\t\tcolumnRight,\n\t\t\tcolumnWidth,\n\t\t\twidth,\n\t\t\tleft,\n\t\t\tright,\n\t\t\thtml = '',\n\t\t\teventElements,\n\t\t\teventElement,\n\t\t\ttriggerRes,\n\t\t\ttitleElement,\n\t\t\theight,\n\t\t\tslotSegmentContainer = getSlotSegmentContainer(),\n\t\t\tisRTL = opt('isRTL');\n\t\t\t\n\t\t// calculate position/dimensions, create html\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\ttop = computeDateTop(seg.start, seg.start);\n\t\t\tbottom = computeDateTop(seg.end, seg.start);\n\t\t\tcolumnLeft = colContentLeft(seg.col);\n\t\t\tcolumnRight = colContentRight(seg.col);\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\t// shave off space on right near scrollbars (2.5%)\n\t\t\t// TODO: move this to CSS somehow\n\t\t\tcolumnRight -= columnWidth * .025;\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\twidth = columnWidth * (seg.forwardCoord - seg.backwardCoord);\n\n\t\t\tif (opt('slotEventOverlap')) {\n\t\t\t\t// double the width while making sure resize handle is visible\n\t\t\t\t// (assumed to be 20px wide)\n\t\t\t\twidth = Math.max(\n\t\t\t\t\t(width - (20/2)) * 2,\n\t\t\t\t\twidth // narrow columns will want to make the segment smaller than\n\t\t\t\t\t\t// the natural width. don't allow it\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (isRTL) {\n\t\t\t\tright = columnRight - seg.backwardCoord * columnWidth;\n\t\t\t\tleft = right - width;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tleft = columnLeft + seg.backwardCoord * columnWidth;\n\t\t\t\tright = left + width;\n\t\t\t}\n\n\t\t\t// make sure horizontal coordinates are in bounds\n\t\t\tleft = Math.max(left, columnLeft);\n\t\t\tright = Math.min(right, columnRight);\n\t\t\twidth = right - left;\n\n\t\t\tseg.top = top;\n\t\t\tseg.left = left;\n\t\t\tseg.outerWidth = width;\n\t\t\tseg.outerHeight = bottom - top;\n\t\t\thtml += slotSegHtml(event, seg);\n\t\t}\n\n\t\tslotSegmentContainer[0].innerHTML = html; // faster than html()\n\t\teventElements = slotSegmentContainer.children();\n\t\t\n\t\t// retrieve elements, run through eventRender callback, bind event handlers\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\teventElement = $(eventElements[i]); // faster than eq()\n\t\t\ttriggerRes = trigger('eventRender', event, event, eventElement);\n\t\t\tif (triggerRes === false) {\n\t\t\t\teventElement.remove();\n\t\t\t}else{\n\t\t\t\tif (triggerRes && triggerRes !== true) {\n\t\t\t\t\teventElement.remove();\n\t\t\t\t\teventElement = $(triggerRes)\n\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\ttop: seg.top,\n\t\t\t\t\t\t\tleft: seg.left\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.appendTo(slotSegmentContainer);\n\t\t\t\t}\n\t\t\t\tseg.element = eventElement;\n\t\t\t\tif (event._id === modifiedEventId) {\n\t\t\t\t\tbindSlotSeg(event, eventElement, seg);\n\t\t\t\t}else{\n\t\t\t\t\teventElement[0]._fci = i; // for lazySegBind\n\t\t\t\t}\n\t\t\t\treportEventElement(event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\n\t\tlazySegBind(slotSegmentContainer, segs, bindSlotSeg);\n\t\t\n\t\t// record event sides and title positions\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif ((eventElement = seg.element)) {\n\t\t\t\tseg.vsides = vsides(eventElement, true);\n\t\t\t\tseg.hsides = hsides(eventElement, true);\n\t\t\t\ttitleElement = eventElement.find('.fc-event-title');\n\t\t\t\tif (titleElement.length) {\n\t\t\t\t\tseg.contentTop = titleElement[0].offsetTop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// set all positions/dimensions at once\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif ((eventElement = seg.element)) {\n\t\t\t\teventElement[0].style.width = Math.max(0, seg.outerWidth - seg.hsides) + 'px';\n\t\t\t\theight = Math.max(0, seg.outerHeight - seg.vsides);\n\t\t\t\teventElement[0].style.height = height + 'px';\n\t\t\t\tevent = seg.event;\n\t\t\t\tif (seg.contentTop !== undefined && height - seg.contentTop < 10) {\n\t\t\t\t\t// not enough room for title, put it in the time (TODO: maybe make both display:inline instead)\n\t\t\t\t\teventElement.find('div.fc-event-time')\n\t\t\t\t\t\t.text(\n\t\t\t\t\t\t\tformatDate(event.start, opt('timeFormat')) + ' - ' + event.title\n\t\t\t\t\t\t);\n\t\t\t\t\teventElement.find('div.fc-event-title')\n\t\t\t\t\t\t.remove();\n\t\t\t\t}\n\t\t\t\ttrigger('eventAfterRender', event, event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t}", "find_lv_segments(patient_data, id) {\n let graph = this.g.set_graph();\n for (let i = 0; i < patient_data.length; i++) {\n let native = patient_data[i];\n\n /////////\n graph.forEachNode((native, attributes) => {\n let group_aha = attributes['vessel_group_aha'];\n let native_id = attributes['id'];\n\n if (native_id == id) {\n for (let j = 0; j < vessel_lv_territories_aha.length; j++) {\n let lv_t_group = vessel_lv_territories_aha[j];\n\n if (lv_t_group['vessel_group_aha'] == group_aha) {\n this.color_lv_segments(lv_t_group);\n }\n }\n }\n });\n } //for i\n /////////////////////\n }", "function ifIsectAddToOutput(ring0, edge0, ring1, edge1) {\n var start0 = coord[ring0][edge0];\n var end0 = coord[ring0][edge0+1];\n var start1 = coord[ring1][edge1];\n var end1 = coord[ring1][edge1+1];\n\n var isect = intersect(start0, end0, start1, end1);\n\n if (isect == null) return; // discard parallels and coincidence\n frac0, frac1;\n if (end0[0] != start0[0]) {\n var frac0 = (isect[0]-start0[0])/(end0[0]-start0[0]);\n } else {\n var frac0 = (isect[1]-start0[1])/(end0[1]-start0[1]);\n };\n if (end1[0] != start1[0]) {\n var frac1 = (isect[0]-start1[0])/(end1[0]-start1[0]);\n } else {\n var frac1 = (isect[1]-start1[1])/(end1[1]-start1[1]);\n };\n if (frac0 >= 1 || frac0 <= 0 || frac1 >= 1 || frac1 <= 0) return; // require segment intersection\n\n var key = isect;\n var unique = !seen[key];\n if (unique) {\n seen[key] = true;\n }\n\n if (filterFn) {\n output.push(filterFn(isect, ring0, edge0, start0, end0, frac0, ring1, edge1, start1, end1, frac1, unique));\n } else {\n output.push(isect);\n }\n }", "function segmentStringsByMatch(segments, match)\n\t{\n\t\tvar newValues = [];\n\n\t\tfor (var i = 0; i < segments.length; i++)\n\t\t{\n\t\t\tvar value = segments[i];\n\t\t\tvar pos = value.indexOf(match);\n\t\t\tvar len = match.length;\n\t\t\tvar beforeText = value.substr(0, pos);\n\t\t\tvar afterText = value.substr(pos + len);\n\n\t\t\tif (pos === -1)\n\t\t\t{\n\t\t\t\tnewValues.push(value);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (beforeText.length !== 0) newValues.push(beforeText);\n\n\t\t\tnewValues.push(match);\n\n\t\t\tif (afterText.length !== 0) newValues.push(afterText);\n\t\t}\n\n\t\treturn newValues;\n\t}", "function computeSegCoords(segs, dayDate, slatCoords, eventMinHeight, eventOrderSpecs) {\n computeSegVerticals(segs, dayDate, slatCoords, eventMinHeight);\n return computeSegHorizontals(segs, eventOrderSpecs); // requires top/bottom from computeSegVerticals\n } // For each segment in an array, computes and assigns its top and bottom properties", "function placeSlotSegs(segs) {\n var levels;\n var level0;\n var i;\n\n segs.sort(compareSegs); // order by date\n levels = buildSlotSegLevels(segs);\n computeForwardSlotSegs(levels);\n\n if ((level0 = levels[0])) {\n\n for (i = 0; i < level0.length; i++) {\n computeSlotSegPressures(level0[i]);\n }\n\n for (i = 0; i < level0.length; i++) {\n computeSlotSegCoords(level0[i], 0, 0);\n }\n }\n }", "function buildSlotSegLevels(segs){var levels=[];var i;var seg;var j;for(i=0;i<segs.length;i++){seg=segs[i];// go through all the levels and stop on the first level where there are no collisions\nfor(j=0;j<levels.length;j++){if(!computeSlotSegCollisions(seg,levels[j]).length){break;}}seg.level=j;(levels[j]||(levels[j]=[])).push(seg);}return levels;}// For every segment, figure out the other segments that are in subsequent", "function _testCirclePolyCollision_clipSegments(segments, circle) {\n let radius = circle.radius;\n return _.chain(segments)\n .map(seg => {\n let p = seg[0];\n let q = seg[1];\n\n // Keep vertical segments that lie within the radius.\n if(p[0] === q[0]) {\n if(p[0] > -radius && p[0] < radius) {\n seg.m = undefined;\n seg.b = undefined;\n return seg;\n }\n }\n\n // Let p be the leftmost point.\n if(p[0] > q[0]) {\n let swap = q;\n q = p;\n p = swap;\n }\n\n // Get the line equation info.\n let dx = q[0] - p[0];\n let dy = q[1] - p[1];\n let m = dy/dx;\n let b = p[1] - m*p[0];\n\n // Clip the segment if it intersects the starting circle.\n if(circle.segmentIntersection(seg))\n return;\n\n // Clip the segment if both points are under the circle.\n if(p[1] < 0 && q[1] < 0)\n return;\n\n // Clip the segment if both points are on the same side beyond the radius.\n if(p[0] < -radius && q[0] < -radius)\n return;\n else if(p[0] > radius && q[0] > radius)\n return;\n\n // Clip at intersections with the left and right radius pillars.\n else {\n if(p[0] < -radius)\n p = [-radius, -m*radius + b, 1];\n if(q[0] > radius)\n q = [radius, m*radius + b, 1];\n }\n\n let clippedSeg = [p, q];\n clippedSeg.m = m;\n clippedSeg.b = b;\n return clippedSeg;\n })\n .compact()\n .value();\n }", "function findIntersections(testData) {\n var keys = Object.keys(testData);\n var intersections = [];\n var botName = keys[0];\n var range = testData[botName];\n intersections.push([range, [botName]]);\n for (var i = 1; i < keys.length; ++i) {\n botName = keys[i];\n range = testData[botName];\n var intersectedSome = false;\n for (var j = 0; j < intersections.length; ++j) {\n var intersect = rangeIntersection(intersections[j][0], range);\n if (intersect) {\n intersections[j][0] = intersect;\n intersections[j][1].push(botName);\n intersectedSome = true;\n break;\n }\n }\n if (!intersectedSome) {\n intersections.push([range, [botName]]);\n }\n }\n\n return intersections;\n}", "function getHVEdgeIntersections(pt1, pt2) {\n var out = [];\n var ptInt1 = onlyConstrainedPoint(pt1);\n var ptInt2 = onlyConstrainedPoint(pt2);\n if(ptInt1 && ptInt2 && sameEdge(ptInt1, ptInt2)) return out;\n\n if(ptInt1) out.push(ptInt1);\n if(ptInt2) out.push(ptInt2);\n return out;\n }", "function getHVEdgeIntersections(pt1, pt2) {\n var out = [];\n var ptInt1 = onlyConstrainedPoint(pt1);\n var ptInt2 = onlyConstrainedPoint(pt2);\n if (ptInt1 && ptInt2 && sameEdge(ptInt1, ptInt2)) return out;\n if (ptInt1) out.push(ptInt1);\n if (ptInt2) out.push(ptInt2);\n return out;\n }", "function isDaySegCollision(seg, otherSegs) {\n\tvar i, otherSeg;\n\n\tfor (i = 0; i < otherSegs.length; i++) {\n\t\totherSeg = otherSegs[i];\n\n\t\tif (\n\t\t\totherSeg.leftCol <= seg.rightCol &&\n\t\t\totherSeg.rightCol >= seg.leftCol\n\t\t) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}", "function isDaySegCollision(seg, otherSegs) {\n\tvar i, otherSeg;\n\n\tfor (i = 0; i < otherSegs.length; i++) {\n\t\totherSeg = otherSegs[i];\n\n\t\tif (\n\t\t\totherSeg.leftCol <= seg.rightCol &&\n\t\t\totherSeg.rightCol >= seg.leftCol\n\t\t) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}", "function isDaySegCollision(seg, otherSegs) {\n\tvar i, otherSeg;\n\n\tfor (i = 0; i < otherSegs.length; i++) {\n\t\totherSeg = otherSegs[i];\n\n\t\tif (\n\t\t\totherSeg.leftCol <= seg.rightCol &&\n\t\t\totherSeg.rightCol >= seg.leftCol\n\t\t) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}", "function isDaySegCollision(seg, otherSegs) {\n\tvar i, otherSeg;\n\n\tfor (i = 0; i < otherSegs.length; i++) {\n\t\totherSeg = otherSegs[i];\n\n\t\tif (\n\t\t\totherSeg.leftCol <= seg.rightCol &&\n\t\t\totherSeg.rightCol >= seg.leftCol\n\t\t) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}", "function isDaySegCollision(seg, otherSegs) {\n\tvar i, otherSeg;\n\n\tfor (i = 0; i < otherSegs.length; i++) {\n\t\totherSeg = otherSegs[i];\n\n\t\tif (\n\t\t\totherSeg.leftCol <= seg.rightCol &&\n\t\t\totherSeg.rightCol >= seg.leftCol\n\t\t) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}", "function isDaySegCollision(seg, otherSegs) {\n\tvar i, otherSeg;\n\n\tfor (i = 0; i < otherSegs.length; i++) {\n\t\totherSeg = otherSegs[i];\n\n\t\tif (\n\t\t\totherSeg.leftCol <= seg.rightCol &&\n\t\t\totherSeg.rightCol >= seg.leftCol\n\t\t) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}", "function isDaySegCollision(seg, otherSegs) {\n\tvar i, otherSeg;\n\n\tfor (i = 0; i < otherSegs.length; i++) {\n\t\totherSeg = otherSegs[i];\n\n\t\tif (\n\t\t\totherSeg.leftCol <= seg.rightCol &&\n\t\t\totherSeg.rightCol >= seg.leftCol\n\t\t) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}", "function isDaySegCollision(seg, otherSegs) {\n\tvar i, otherSeg;\n\n\tfor (i = 0; i < otherSegs.length; i++) {\n\t\totherSeg = otherSegs[i];\n\n\t\tif (\n\t\t\totherSeg.leftCol <= seg.rightCol &&\n\t\t\totherSeg.rightCol >= seg.leftCol\n\t\t) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}" ]
[ "0.7555702", "0.7555433", "0.73929", "0.72135836", "0.716213", "0.716213", "0.716213", "0.716213", "0.716213", "0.7154244", "0.71091133", "0.71091133", "0.71091133", "0.71091133", "0.71091133", "0.71091133", "0.71091133", "0.71091133", "0.71091133", "0.71091133", "0.71091133", "0.71091133", "0.71091133", "0.7063635", "0.60000515", "0.59424055", "0.5454912", "0.53621495", "0.52310526", "0.5227885", "0.5197516", "0.51279515", "0.50960684", "0.5086389", "0.5078126", "0.50675267", "0.4991897", "0.4991897", "0.49881184", "0.49853802", "0.49849442", "0.49849442", "0.49849442", "0.49607486", "0.49607486", "0.49607486", "0.49607486", "0.49607486", "0.49252978", "0.4907701", "0.4907701", "0.4907701", "0.4897805", "0.48893103", "0.48810077", "0.48810077", "0.48810077", "0.48810077", "0.48594514", "0.48362327", "0.48329186", "0.4811085", "0.4811085", "0.4801541", "0.47994995", "0.47919556", "0.4775985", "0.4740919", "0.4739523", "0.4739523", "0.4739323", "0.47323826", "0.47288418", "0.47250438", "0.472251", "0.472251", "0.472251", "0.47181624", "0.47181624", "0.47181624", "0.47135732", "0.46844882", "0.46797603", "0.46696746", "0.46393946", "0.46381733", "0.46231288", "0.4621854", "0.45997444", "0.45995927", "0.45731032", "0.45731032", "0.45731032", "0.45731032", "0.45731032", "0.45731032", "0.45731032", "0.45731032" ]
0.7177639
6
Do these segments occupy the same vertical space?
function isSlotSegCollision(seg1, seg2) { return seg1.bottom > seg2.top && seg1.top < seg2.bottom; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "resolveSegmentSegment(ax1, ay1, ax2, ay2, bx1, by1, bx2, by2) {\n const result = [];\n const isHorizontal1 = ax2 - ax1 > ay2 - ay1;\n const isHorizontal2 = bx2 - bx1 > by2 - by1;\n\n if (isHorizontal1 && isHorizontal2 &&\n by1 === ay1 &&\n ((ax1 <= bx2 && ax1 >= bx1) || (ax2 <= bx2 && ax2 >= bx1) || (bx1 <= ax2 && bx1 >= ax1) || (bx2 <= ax2 && bx2 >= ax1))) {\n\n if (bx1 < ax1) result.push(bx1, by1, ax1, by1);\n if (bx2 > ax2) result.push(ax2, by2, bx2, by2);\n\n } else if (!isHorizontal1 && isHorizontal2 &&\n by1 >= ay1 && by1 < ay2 &&\n ((ax1 <= bx2 && ax1 >= bx1) || (ax2 <= bx2 && ax2 >= bx1) || (bx1 <= ax2 && bx1 >= ax1) || (bx2 <= ax2 && bx2 >= ax1))) {\n\n if (bx1 < ax1) result.push(bx1, by1, ax1, by1);\n if (bx2 > ax2) result.push(ax2 + 1, by2, bx2, by2);\n\n } else if (!isHorizontal1 && !isHorizontal2 &&\n ax1 === bx2 &&\n ((by1 <= ay2 && by1 >= ay1) || (by2 <= ay2 && by2 >= ay1) || (ay1 <= by2 && ay1 >= by1) || (ay2 <= by2 && ay2 >= by1))) {\n\n if (by1 < ay1) result.push(bx1, by1, bx1, ay1);\n if (by2 > ay2) result.push(bx2, ay2, bx2, by2);\n\n } else if (isHorizontal1 && !isHorizontal2 &&\n bx1 >= ax1 && bx1 < ax2 &&\n ((ay2 <= by2 && ay2 >= by1) || (ay1 <= by2 && ay1 >= by1) || (by2 <= ay2 && by2 >= ay1) || (by1 <= ay2 && by1 >= ay1))) {\n\n if (by1 < ay1) result.push(bx1, by1, bx1, ay1);\n if (by2 > ay2) result.push(bx2, ay2 + 1, bx2, by2);\n\n } else { // segments do not intersect\n result.push(bx1, by1, bx2, by2);\n }\n\n return result;\n }", "function segments_union(segment_1, segment_2){\n var max_segment_1, min_segment_1, max_segment_2, min_segment_2, absolute_max, absolute_min;\n //Case 1: vertical segments\n var vertical = is_vertical_or_quasi_vertical(segment_1); //equivalently is_vertical_or_quasi_vertical(segment_2)\n if(vertical){\n\n if(parseFloat(segment_1[0][1]) >= parseFloat(segment_1[1][1])){\n max_segment_1 = segment_1[0]; min_segment_1 = segment_1[1];\n }\n else{\n max_segment_1 = segment_1[1]; min_segment_1 = segment_1[0];\n }\n if(parseFloat(segment_2[0][1]) >= parseFloat(segment_2[1][1])){\n max_segment_2 = segment_2[0]; min_segment_2 = segment_2[1];\n }\n else{\n max_segment_2 = segment_2[1]; min_segment_2 = segment_2[0];\n }\n\n if(parseFloat(max_segment_1[1]) >= parseFloat(max_segment_2[1])){\n absolute_max = max_segment_1;\n }\n else{\n absolute_max = max_segment_2;\n }\n if(parseFloat(min_segment_1[1]) < parseFloat(min_segment_2[1])){\n absolute_min = min_segment_1;\n }\n else{\n absolute_min = min_segment_2;\n }\n\n return [absolute_min, absolute_max];\n }\n\n //Case 2: non vertical segments\n if(parseFloat(segment_1[0][0]) >= parseFloat(segment_1[1][0])){\n max_segment_1 = segment_1[0]; min_segment_1 = segment_1[1];\n }\n else{\n max_segment_1 = segment_1[1]; min_segment_1 = segment_1[0];\n }\n if(parseFloat(segment_2[0][0]) >= parseFloat(segment_2[1][0])){\n max_segment_2 = segment_2[0]; min_segment_2 = segment_2[1];\n }\n else{\n max_segment_2 = segment_2[1]; min_segment_2 = segment_2[0];\n }\n\n if(parseFloat(max_segment_1[0]) >= parseFloat(max_segment_2[0])){\n absolute_max = max_segment_1;\n }\n else{\n absolute_max = max_segment_2;\n }\n if(parseFloat(min_segment_1[0]) < parseFloat(min_segment_2[0])){\n absolute_min = min_segment_1;\n }\n else{\n absolute_min = min_segment_2;\n }\n\n return [absolute_min, absolute_max];\n}", "function computeSegVerticals(segs, dayDate, slatCoords, eventMinHeight) {\n for (var _i = 0, segs_1 = segs; _i < segs_1.length; _i++) {\n var seg = segs_1[_i];\n seg.top = slatCoords.computeDateTop(seg.start, dayDate);\n seg.bottom = Math.max(seg.top + (eventMinHeight || 0), // yuck\n slatCoords.computeDateTop(seg.end, dayDate));\n }\n }", "function drawSegment(ctx, points, start, segLen, allLen, dir, smooth, smoothMonotone, connectNulls) {\n\t var prevX;\n\t var prevY;\n\t var cpx0;\n\t var cpy0;\n\t var cpx1;\n\t var cpy1;\n\t var idx = start;\n\t var k = 0;\n\t\n\t for (; k < segLen; k++) {\n\t var x = points[idx * 2];\n\t var y = points[idx * 2 + 1];\n\t\n\t if (idx >= allLen || idx < 0) {\n\t break;\n\t }\n\t\n\t if (isPointNull(x, y)) {\n\t if (connectNulls) {\n\t idx += dir;\n\t continue;\n\t }\n\t\n\t break;\n\t }\n\t\n\t if (idx === start) {\n\t ctx[dir > 0 ? 'moveTo' : 'lineTo'](x, y);\n\t cpx0 = x;\n\t cpy0 = y;\n\t } else {\n\t var dx = x - prevX;\n\t var dy = y - prevY; // Ignore tiny segment.\n\t\n\t if (dx * dx + dy * dy < 0.5) {\n\t idx += dir;\n\t continue;\n\t }\n\t\n\t if (smooth > 0) {\n\t var nextIdx = idx + dir;\n\t var nextX = points[nextIdx * 2];\n\t var nextY = points[nextIdx * 2 + 1];\n\t var tmpK = k + 1;\n\t\n\t if (connectNulls) {\n\t // Find next point not null\n\t while (isPointNull(nextX, nextY) && tmpK < segLen) {\n\t tmpK++;\n\t nextIdx += dir;\n\t nextX = points[nextIdx * 2];\n\t nextY = points[nextIdx * 2 + 1];\n\t }\n\t }\n\t\n\t var ratioNextSeg = 0.5;\n\t var vx = 0;\n\t var vy = 0;\n\t var nextCpx0 = void 0;\n\t var nextCpy0 = void 0; // Is last point\n\t\n\t if (tmpK >= segLen || isPointNull(nextX, nextY)) {\n\t cpx1 = x;\n\t cpy1 = y;\n\t } else {\n\t vx = nextX - prevX;\n\t vy = nextY - prevY;\n\t var dx0 = x - prevX;\n\t var dx1 = nextX - x;\n\t var dy0 = y - prevY;\n\t var dy1 = nextY - y;\n\t var lenPrevSeg = void 0;\n\t var lenNextSeg = void 0;\n\t\n\t if (smoothMonotone === 'x') {\n\t lenPrevSeg = Math.abs(dx0);\n\t lenNextSeg = Math.abs(dx1);\n\t cpx1 = x - lenPrevSeg * smooth;\n\t cpy1 = y;\n\t nextCpx0 = x + lenPrevSeg * smooth;\n\t nextCpy0 = y;\n\t } else if (smoothMonotone === 'y') {\n\t lenPrevSeg = Math.abs(dy0);\n\t lenNextSeg = Math.abs(dy1);\n\t cpx1 = x;\n\t cpy1 = y - lenPrevSeg * smooth;\n\t nextCpx0 = x;\n\t nextCpy0 = y + lenPrevSeg * smooth;\n\t } else {\n\t lenPrevSeg = Math.sqrt(dx0 * dx0 + dy0 * dy0);\n\t lenNextSeg = Math.sqrt(dx1 * dx1 + dy1 * dy1); // Use ratio of seg length\n\t\n\t ratioNextSeg = lenNextSeg / (lenNextSeg + lenPrevSeg);\n\t cpx1 = x - vx * smooth * (1 - ratioNextSeg);\n\t cpy1 = y - vy * smooth * (1 - ratioNextSeg); // cp0 of next segment\n\t\n\t nextCpx0 = x + vx * smooth * ratioNextSeg;\n\t nextCpy0 = y + vy * smooth * ratioNextSeg; // Smooth constraint between point and next point.\n\t // Avoid exceeding extreme after smoothing.\n\t\n\t nextCpx0 = mathMin$5(nextCpx0, mathMax$5(nextX, x));\n\t nextCpy0 = mathMin$5(nextCpy0, mathMax$5(nextY, y));\n\t nextCpx0 = mathMax$5(nextCpx0, mathMin$5(nextX, x));\n\t nextCpy0 = mathMax$5(nextCpy0, mathMin$5(nextY, y)); // Reclaculate cp1 based on the adjusted cp0 of next seg.\n\t\n\t vx = nextCpx0 - x;\n\t vy = nextCpy0 - y;\n\t cpx1 = x - vx * lenPrevSeg / lenNextSeg;\n\t cpy1 = y - vy * lenPrevSeg / lenNextSeg; // Smooth constraint between point and prev point.\n\t // Avoid exceeding extreme after smoothing.\n\t\n\t cpx1 = mathMin$5(cpx1, mathMax$5(prevX, x));\n\t cpy1 = mathMin$5(cpy1, mathMax$5(prevY, y));\n\t cpx1 = mathMax$5(cpx1, mathMin$5(prevX, x));\n\t cpy1 = mathMax$5(cpy1, mathMin$5(prevY, y)); // Adjust next cp0 again.\n\t\n\t vx = x - cpx1;\n\t vy = y - cpy1;\n\t nextCpx0 = x + vx * lenNextSeg / lenPrevSeg;\n\t nextCpy0 = y + vy * lenNextSeg / lenPrevSeg;\n\t }\n\t }\n\t\n\t ctx.bezierCurveTo(cpx0, cpy0, cpx1, cpy1, x, y);\n\t cpx0 = nextCpx0;\n\t cpy0 = nextCpy0;\n\t } else {\n\t ctx.lineTo(x, y);\n\t }\n\t }\n\t\n\t prevX = x;\n\t prevY = y;\n\t idx += dir;\n\t }\n\t\n\t return k;\n\t }", "function computeSlotSegCollisions(seg,otherSegs,results){if(results===void 0){results=[];}for(var i=0;i<otherSegs.length;i++){if(isSlotSegCollision(seg,otherSegs[i])){results.push(otherSegs[i]);}}return results;}// Do these segments occupy the same vertical space?", "formatSegments (isProtein) {\n\t\tvar variants = isProtein ? this.attributes.variantDataProtein : this.attributes.variantDataDna;\n\t\tvar sequences = isProtein ? this.attributes.alignedProteinSequences : this.attributes.alignedDnaSequences;\n\t\t// make sure they're sorted by start\n\t\tvariants = _.sortBy(variants, d => {\n\t\t\treturn d.start;\n\t\t});\n\n\t\t// merge segments\n\t\tvar mergedSegments = _.reduce(variants, (memo, d) => {\n\t\t\treturn this._mergeOrAddSegment(memo, d);\n\t\t}, []);\n\n\t\t// add in needed summarized segments\n\t\t// first one\n\t\tif (mergedSegments[0].start > 1) {\n\t\t\tmergedSegments.push({\n\t\t\t\tvisible: false,\n\t\t\t\tstart: 1,\n\t\t\t\tend: mergedSegments[0].start\n\t\t\t});\n\t\t}\n\t\t// loop through and connect visible segments with summarized segments\n\t\tvar _visibleSegments = _.where(mergedSegments, { visible: true });\n\t\t_visibleSegments.forEach( (d, i) => {\n\t\t\t// must not be last or visible\n\t\t\tif (d.visible && i < _visibleSegments.length - 1) {\n\t\t\t\tmergedSegments.push({\n\t\t\t\t\tvisible: false,\n\t\t\t\t\tstart: d.end,\n\t\t\t\t\tend: _visibleSegments[i + 1].start\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\t\n\t\tvar _last = _.max(mergedSegments, d => { return d.end; });\n\t\tvar _maxLength = _.max(sequences, d => { return d.sequence.length; }).sequence.length;\n\t\t// add last if last segment is visible and not at the end\n\t\tif (_last.end < _maxLength) {\n\t\t\tmergedSegments.push({\n\t\t\t\tstart: _last.end,\n\t\t\t\tend: _maxLength,\n\t\t\t\tvisible: false\n\t\t\t});\n\t\t// add last if visible\n\t\t} else {\n\t\t\tmergedSegments.push({\n\t\t\t\tstart: _last.end,\n\t\t\t\tend: _maxLength + 1,\n\t\t\t\tvisible: true\n\t\t\t});\n\t\t}\n\t\t\n\t\t// change starts and ends to domains\n\t\tmergedSegments = _.map(mergedSegments, d => {\n\t\t\td.domain = [d.start, d.end];\n\t\t\treturn d;\n\t\t});\n\t\t// sort\n\t\tmergedSegments = _.sortBy(mergedSegments, d => {\n\t\t\treturn d.start;\n\t\t});\n\t\treturn mergedSegments;\n\t}", "function drawSegment(ctx, points, start, segLen, allLen, dir, smooth, smoothMonotone, connectNulls) {\n var prevX;\n var prevY;\n var cpx0;\n var cpy0;\n var cpx1;\n var cpy1;\n var idx = start;\n var k = 0;\n\n for (; k < segLen; k++) {\n var x = points[idx * 2];\n var y = points[idx * 2 + 1];\n\n if (idx >= allLen || idx < 0) {\n break;\n }\n\n if (isPointNull(x, y)) {\n if (connectNulls) {\n idx += dir;\n continue;\n }\n\n break;\n }\n\n if (idx === start) {\n ctx[dir > 0 ? 'moveTo' : 'lineTo'](x, y);\n cpx0 = x;\n cpy0 = y;\n } else {\n var dx = x - prevX;\n var dy = y - prevY; // Ignore tiny segment.\n\n if (dx * dx + dy * dy < 0.5) {\n idx += dir;\n continue;\n }\n\n if (smooth > 0) {\n var nextIdx = idx + dir;\n var nextX = points[nextIdx * 2];\n var nextY = points[nextIdx * 2 + 1]; // Ignore duplicate point\n\n while (nextX === x && nextY === y && k < segLen) {\n k++;\n nextIdx += dir;\n idx += dir;\n nextX = points[nextIdx * 2];\n nextY = points[nextIdx * 2 + 1];\n x = points[idx * 2];\n y = points[idx * 2 + 1];\n dx = x - prevX;\n dy = y - prevY;\n }\n\n var tmpK = k + 1;\n\n if (connectNulls) {\n // Find next point not null\n while (isPointNull(nextX, nextY) && tmpK < segLen) {\n tmpK++;\n nextIdx += dir;\n nextX = points[nextIdx * 2];\n nextY = points[nextIdx * 2 + 1];\n }\n }\n\n var ratioNextSeg = 0.5;\n var vx = 0;\n var vy = 0;\n var nextCpx0 = void 0;\n var nextCpy0 = void 0; // Is last point\n\n if (tmpK >= segLen || isPointNull(nextX, nextY)) {\n cpx1 = x;\n cpy1 = y;\n } else {\n vx = nextX - prevX;\n vy = nextY - prevY;\n var dx0 = x - prevX;\n var dx1 = nextX - x;\n var dy0 = y - prevY;\n var dy1 = nextY - y;\n var lenPrevSeg = void 0;\n var lenNextSeg = void 0;\n\n if (smoothMonotone === 'x') {\n lenPrevSeg = Math.abs(dx0);\n lenNextSeg = Math.abs(dx1);\n var dir_1 = vx > 0 ? 1 : -1;\n cpx1 = x - dir_1 * lenPrevSeg * smooth;\n cpy1 = y;\n nextCpx0 = x + dir_1 * lenNextSeg * smooth;\n nextCpy0 = y;\n } else if (smoothMonotone === 'y') {\n lenPrevSeg = Math.abs(dy0);\n lenNextSeg = Math.abs(dy1);\n var dir_2 = vy > 0 ? 1 : -1;\n cpx1 = x;\n cpy1 = y - dir_2 * lenPrevSeg * smooth;\n nextCpx0 = x;\n nextCpy0 = y + dir_2 * lenNextSeg * smooth;\n } else {\n lenPrevSeg = Math.sqrt(dx0 * dx0 + dy0 * dy0);\n lenNextSeg = Math.sqrt(dx1 * dx1 + dy1 * dy1); // Use ratio of seg length\n\n ratioNextSeg = lenNextSeg / (lenNextSeg + lenPrevSeg);\n cpx1 = x - vx * smooth * (1 - ratioNextSeg);\n cpy1 = y - vy * smooth * (1 - ratioNextSeg); // cp0 of next segment\n\n nextCpx0 = x + vx * smooth * ratioNextSeg;\n nextCpy0 = y + vy * smooth * ratioNextSeg; // Smooth constraint between point and next point.\n // Avoid exceeding extreme after smoothing.\n\n nextCpx0 = mathMin(nextCpx0, mathMax(nextX, x));\n nextCpy0 = mathMin(nextCpy0, mathMax(nextY, y));\n nextCpx0 = mathMax(nextCpx0, mathMin(nextX, x));\n nextCpy0 = mathMax(nextCpy0, mathMin(nextY, y)); // Reclaculate cp1 based on the adjusted cp0 of next seg.\n\n vx = nextCpx0 - x;\n vy = nextCpy0 - y;\n cpx1 = x - vx * lenPrevSeg / lenNextSeg;\n cpy1 = y - vy * lenPrevSeg / lenNextSeg; // Smooth constraint between point and prev point.\n // Avoid exceeding extreme after smoothing.\n\n cpx1 = mathMin(cpx1, mathMax(prevX, x));\n cpy1 = mathMin(cpy1, mathMax(prevY, y));\n cpx1 = mathMax(cpx1, mathMin(prevX, x));\n cpy1 = mathMax(cpy1, mathMin(prevY, y)); // Adjust next cp0 again.\n\n vx = x - cpx1;\n vy = y - cpy1;\n nextCpx0 = x + vx * lenNextSeg / lenPrevSeg;\n nextCpy0 = y + vy * lenNextSeg / lenPrevSeg;\n }\n }\n\n ctx.bezierCurveTo(cpx0, cpy0, cpx1, cpy1, x, y);\n cpx0 = nextCpx0;\n cpy0 = nextCpy0;\n } else {\n ctx.lineTo(x, y);\n }\n }\n\n prevX = x;\n prevY = y;\n idx += dir;\n }\n\n return k;\n}", "function getPositions() {\n \n var rects;\n var nRects;\n var rect;\n \n var top;\n var left;\n var width;\n var right;\n \n var textXY;\n \n var currentLine = -1;\n \n for (var i = 0; i < nSegs; i++) {\n \n rects = segs[i].getClientRects();\n nRects = rects.length;\n \n segRanges[i] = {};\n \n for (var j = 0; j < nRects; j++) {\n \n rect = rects[j];\n textXY = getTextXY(rect.left, rect.top);\n top = textXY.y - segBoxPadY;\n left = textXY.x - segBoxPadX;\n width = rect.width + segBoxPadX * 2;\n \n if (j !== nRects - 1) {\n \n width += extensionWidth;\n }\n \n right = left + width;\n \n if (isNewLine(top)) {\n \n currentLine++;\n \n lines[currentLine] = {\n top: top,\n left: left,\n width: width\n };\n \n segBoxesByLine[currentLine] = [];\n \n } else {\n \n lines[currentLine].width += width;\n }\n \n segBoxesByLine[currentLine].push({\n left: left,\n right: left + width,\n segIndex: i\n });\n \n if (j === 0) {\n \n segRanges[i].startLine = currentLine;\n segRanges[i].startLeft = left;\n }\n \n if (j === nRects - 1) {\n \n segRanges[i].endLine = currentLine;\n segRanges[i].endRight = right;\n }\n }\n }\n \n function isNewLine(top) {\n \n if (lines.length === 0 || lines[lines.length - 1].top !== top) {\n \n return true;\n }\n }\n}", "function l(a,b){var c,d=m(a),e=r(),f=[];\n// Set each row's height by setting height of first inner div\nif(b)for(c=0;c<e.length;c++)e[c].height(d[c]);\n// Get each row's top, relative to the views's origin.\n// Important to do this after setting each row's height.\nfor(c=0;c<e.length;c++)f.push(e[c].position().top);\n// Set each segment element's CSS \"top\" property.\n// Each segment object has a \"top\" property, which is relative to the row's top, but...\nxa(a,function(a,b){b.css(\"top\",f[a.row]+a.top)})}", "function addSegEndsFromSequences(){\n //Add all the starting segEnds and internal segJoins\n for(var i=0;i<seqArr.length;i++){\n var length=parseInt(seqArr[i]['length']),\n seqId=seqArr[i]['id'];\n segEndArr[segEndArr.length]=[seqId,0,'POS_STRAND']\n segEndArr[segEndArr.length]=[seqId,length-1,'NEG_STRAND']\n segJoinArr[segJoinArr.length]=[[seqId,0,'POS_STRAND'],[seqId,length-1,'NEG_STRAND'],'internal',length]\n }\n segmentize();\n}", "function drawSegment(ctx, points, start, segLen, allLen, dir, smooth, smoothMonotone, connectNulls) {\n var prevX;\n var prevY;\n var cpx0;\n var cpy0;\n var cpx1;\n var cpy1;\n var idx = start;\n var k = 0;\n\n for (; k < segLen; k++) {\n var x = points[idx * 2];\n var y = points[idx * 2 + 1];\n\n if (idx >= allLen || idx < 0) {\n break;\n }\n\n if (isPointNull(x, y)) {\n if (connectNulls) {\n idx += dir;\n continue;\n }\n\n break;\n }\n\n if (idx === start) {\n ctx[dir > 0 ? 'moveTo' : 'lineTo'](x, y);\n cpx0 = x;\n cpy0 = y;\n } else {\n var dx = x - prevX;\n var dy = y - prevY; // Ignore tiny segment.\n\n if (dx * dx + dy * dy < 0.5) {\n idx += dir;\n continue;\n }\n\n if (smooth > 0) {\n var nextIdx = idx + dir;\n var nextX = points[nextIdx * 2];\n var nextY = points[nextIdx * 2 + 1];\n var tmpK = k + 1;\n\n if (connectNulls) {\n // Find next point not null\n while (isPointNull(nextX, nextY) && tmpK < segLen) {\n tmpK++;\n nextIdx += dir;\n nextX = points[nextIdx * 2];\n nextY = points[nextIdx * 2 + 1];\n }\n }\n\n var ratioNextSeg = 0.5;\n var vx = 0;\n var vy = 0;\n var nextCpx0 = void 0;\n var nextCpy0 = void 0; // Is last point\n\n if (tmpK >= segLen || isPointNull(nextX, nextY)) {\n cpx1 = x;\n cpy1 = y;\n } else {\n vx = nextX - prevX;\n vy = nextY - prevY;\n var dx0 = x - prevX;\n var dx1 = nextX - x;\n var dy0 = y - prevY;\n var dy1 = nextY - y;\n var lenPrevSeg = void 0;\n var lenNextSeg = void 0;\n\n if (smoothMonotone === 'x') {\n lenPrevSeg = Math.abs(dx0);\n lenNextSeg = Math.abs(dx1);\n cpx1 = x - lenPrevSeg * smooth;\n cpy1 = y;\n nextCpx0 = x + lenPrevSeg * smooth;\n nextCpy0 = y;\n } else if (smoothMonotone === 'y') {\n lenPrevSeg = Math.abs(dy0);\n lenNextSeg = Math.abs(dy1);\n cpx1 = x;\n cpy1 = y - lenPrevSeg * smooth;\n nextCpx0 = x;\n nextCpy0 = y + lenPrevSeg * smooth;\n } else {\n lenPrevSeg = Math.sqrt(dx0 * dx0 + dy0 * dy0);\n lenNextSeg = Math.sqrt(dx1 * dx1 + dy1 * dy1); // Use ratio of seg length\n\n ratioNextSeg = lenNextSeg / (lenNextSeg + lenPrevSeg);\n cpx1 = x - vx * smooth * (1 - ratioNextSeg);\n cpy1 = y - vy * smooth * (1 - ratioNextSeg); // cp0 of next segment\n\n nextCpx0 = x + vx * smooth * ratioNextSeg;\n nextCpy0 = y + vy * smooth * ratioNextSeg; // Smooth constraint between point and next point.\n // Avoid exceeding extreme after smoothing.\n\n nextCpx0 = mathMin(nextCpx0, mathMax(nextX, x));\n nextCpy0 = mathMin(nextCpy0, mathMax(nextY, y));\n nextCpx0 = mathMax(nextCpx0, mathMin(nextX, x));\n nextCpy0 = mathMax(nextCpy0, mathMin(nextY, y)); // Reclaculate cp1 based on the adjusted cp0 of next seg.\n\n vx = nextCpx0 - x;\n vy = nextCpy0 - y;\n cpx1 = x - vx * lenPrevSeg / lenNextSeg;\n cpy1 = y - vy * lenPrevSeg / lenNextSeg; // Smooth constraint between point and prev point.\n // Avoid exceeding extreme after smoothing.\n\n cpx1 = mathMin(cpx1, mathMax(prevX, x));\n cpy1 = mathMin(cpy1, mathMax(prevY, y));\n cpx1 = mathMax(cpx1, mathMin(prevX, x));\n cpy1 = mathMax(cpy1, mathMin(prevY, y)); // Adjust next cp0 again.\n\n vx = x - cpx1;\n vy = y - cpy1;\n nextCpx0 = x + vx * lenNextSeg / lenPrevSeg;\n nextCpy0 = y + vy * lenNextSeg / lenPrevSeg;\n }\n }\n\n ctx.bezierCurveTo(cpx0, cpy0, cpx1, cpy1, x, y);\n cpx0 = nextCpx0;\n cpy0 = nextCpy0;\n } else {\n ctx.lineTo(x, y);\n }\n }\n\n prevX = x;\n prevY = y;\n idx += dir;\n }\n\n return k;\n}", "function repaintSegments() {\n\t\tupdateDescriptions();\n\t\tfor (var i = 0; i < segments.length; i++) {\n\t\t\tremoveSegment(segments[i]);\n\t\t}\n\t\tfor (var i = 0; i < segments.length; i++) {\n\t\t\taddSegment(segments[i]);\n\t\t}\n\t}", "function inSegment(xP, yP) {\r\n }", "numberOfSegments() {\n return this.segments.length;\n }", "split() {\n let w = this.range.Width / 2;\n let h = this.range.Height / 2;\n this.LL = new RectQuadTree(\n new Rect(this.range.x1, this.range.y1, this.range.x1 + w, this.range.y1 + h));\n this.LH = new RectQuadTree(\n new Rect(this.range.x1 + w, this.range.y1, this.range.x2, this.range.y1 + h));\n this.HL = new RectQuadTree(\n new Rect(this.range.x1, this.range.y1 + h, this.range.x1 + w, this.range.y2));\n this.HH = new RectQuadTree(\n new Rect(this.range.x1 + w, this.range.y1 + h, this.range.x2, this.range.y2));\n\n this._isSplit = true;\n }", "function calculateVerticals(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar colCnt = getColCnt();\n\t\tvar rowContentHeights = []; // content height for each row\n\t\tvar segmentRows = buildSegmentRows(segments); // an array of segment arrays, one for each row\n\t\tvar colI;\n\n\t\tfor (var rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tvar segmentRow = segmentRows[rowI];\n\n\t\t\t// an array of running total heights for each column.\n\t\t\t// initialize with all zeros.\n\t\t\tvar colHeights = [];\n\t\t\tfor (colI=0; colI<colCnt; colI++) {\n\t\t\t\tcolHeights.push(0);\n\t\t\t}\n\n\t\t\t// loop through every segment\n\t\t\tfor (var segmentI=0; segmentI<segmentRow.length; segmentI++) {\n\t\t\t\tvar segment = segmentRow[segmentI];\n\n\t\t\t\t// find the segment's top coordinate by looking at the max height\n\t\t\t\t// of all the columns the segment will be in.\n\t\t\t\tsegment.top = arrayMax(\n\t\t\t\t\tcolHeights.slice(\n\t\t\t\t\t\tsegment.leftCol,\n\t\t\t\t\t\tsegment.rightCol + 1 // make exclusive for slice\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t// adjust the columns to account for the segment's height\n\t\t\t\tfor (colI=segment.leftCol; colI<=segment.rightCol; colI++) {\n\t\t\t\t\tcolHeights[colI] = segment.top + segment.outerHeight;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// the tallest column in the row should be the \"content height\"\n\t\t\trowContentHeights.push(arrayMax(colHeights));\n\t\t}\n\n\t\treturn rowContentHeights;\n\t}", "function calculateVerticals(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar colCnt = getColCnt();\n\t\tvar rowContentHeights = []; // content height for each row\n\t\tvar segmentRows = buildSegmentRows(segments); // an array of segment arrays, one for each row\n\t\tvar colI;\n\n\t\tfor (var rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tvar segmentRow = segmentRows[rowI];\n\n\t\t\t// an array of running total heights for each column.\n\t\t\t// initialize with all zeros.\n\t\t\tvar colHeights = [];\n\t\t\tfor (colI=0; colI<colCnt; colI++) {\n\t\t\t\tcolHeights.push(0);\n\t\t\t}\n\n\t\t\t// loop through every segment\n\t\t\tfor (var segmentI=0; segmentI<segmentRow.length; segmentI++) {\n\t\t\t\tvar segment = segmentRow[segmentI];\n\n\t\t\t\t// find the segment's top coordinate by looking at the max height\n\t\t\t\t// of all the columns the segment will be in.\n\t\t\t\tsegment.top = arrayMax(\n\t\t\t\t\tcolHeights.slice(\n\t\t\t\t\t\tsegment.leftCol,\n\t\t\t\t\t\tsegment.rightCol + 1 // make exclusive for slice\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t// adjust the columns to account for the segment's height\n\t\t\t\tfor (colI=segment.leftCol; colI<=segment.rightCol; colI++) {\n\t\t\t\t\tcolHeights[colI] = segment.top + segment.outerHeight;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// the tallest column in the row should be the \"content height\"\n\t\t\trowContentHeights.push(arrayMax(colHeights));\n\t\t}\n\n\t\treturn rowContentHeights;\n\t}", "function calculateVerticals(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar colCnt = getColCnt();\n\t\tvar rowContentHeights = []; // content height for each row\n\t\tvar segmentRows = buildSegmentRows(segments); // an array of segment arrays, one for each row\n\n\t\tfor (var rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tvar segmentRow = segmentRows[rowI];\n\n\t\t\t// an array of running total heights for each column.\n\t\t\t// initialize with all zeros.\n\t\t\tvar colHeights = [];\n\t\t\tfor (var colI=0; colI<colCnt; colI++) {\n\t\t\t\tcolHeights.push(0);\n\t\t\t}\n\n\t\t\t// loop through every segment\n\t\t\tfor (var segmentI=0; segmentI<segmentRow.length; segmentI++) {\n\t\t\t\tvar segment = segmentRow[segmentI];\n\n\t\t\t\t// find the segment's top coordinate by looking at the max height\n\t\t\t\t// of all the columns the segment will be in.\n\t\t\t\tsegment.top = arrayMax(\n\t\t\t\t\tcolHeights.slice(\n\t\t\t\t\t\tsegment.leftCol,\n\t\t\t\t\t\tsegment.rightCol + 1 // make exclusive for slice\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t// adjust the columns to account for the segment's height\n\t\t\t\tfor (var colI=segment.leftCol; colI<=segment.rightCol; colI++) {\n\t\t\t\t\tcolHeights[colI] = segment.top + segment.outerHeight;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// the tallest column in the row should be the \"content height\"\n\t\t\trowContentHeights.push(arrayMax(colHeights));\n\t\t}\n\n\t\treturn rowContentHeights;\n\t}", "function calculateVerticals(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar colCnt = getColCnt();\n\t\tvar rowContentHeights = []; // content height for each row\n\t\tvar segmentRows = buildSegmentRows(segments); // an array of segment arrays, one for each row\n\n\t\tfor (var rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tvar segmentRow = segmentRows[rowI];\n\n\t\t\t// an array of running total heights for each column.\n\t\t\t// initialize with all zeros.\n\t\t\tvar colHeights = [];\n\t\t\tfor (var colI=0; colI<colCnt; colI++) {\n\t\t\t\tcolHeights.push(0);\n\t\t\t}\n\n\t\t\t// loop through every segment\n\t\t\tfor (var segmentI=0; segmentI<segmentRow.length; segmentI++) {\n\t\t\t\tvar segment = segmentRow[segmentI];\n\n\t\t\t\t// find the segment's top coordinate by looking at the max height\n\t\t\t\t// of all the columns the segment will be in.\n\t\t\t\tsegment.top = arrayMax(\n\t\t\t\t\tcolHeights.slice(\n\t\t\t\t\t\tsegment.leftCol,\n\t\t\t\t\t\tsegment.rightCol + 1 // make exclusive for slice\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t// adjust the columns to account for the segment's height\n\t\t\t\tfor (var colI=segment.leftCol; colI<=segment.rightCol; colI++) {\n\t\t\t\t\tcolHeights[colI] = segment.top + segment.outerHeight;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// the tallest column in the row should be the \"content height\"\n\t\t\trowContentHeights.push(arrayMax(colHeights));\n\t\t}\n\n\t\treturn rowContentHeights;\n\t}", "function calculateVerticals(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar colCnt = getColCnt();\n\t\tvar rowContentHeights = []; // content height for each row\n\t\tvar segmentRows = buildSegmentRows(segments); // an array of segment arrays, one for each row\n\n\t\tfor (var rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tvar segmentRow = segmentRows[rowI];\n\n\t\t\t// an array of running total heights for each column.\n\t\t\t// initialize with all zeros.\n\t\t\tvar colHeights = [];\n\t\t\tfor (var colI=0; colI<colCnt; colI++) {\n\t\t\t\tcolHeights.push(0);\n\t\t\t}\n\n\t\t\t// loop through every segment\n\t\t\tfor (var segmentI=0; segmentI<segmentRow.length; segmentI++) {\n\t\t\t\tvar segment = segmentRow[segmentI];\n\n\t\t\t\t// find the segment's top coordinate by looking at the max height\n\t\t\t\t// of all the columns the segment will be in.\n\t\t\t\tsegment.top = arrayMax(\n\t\t\t\t\tcolHeights.slice(\n\t\t\t\t\t\tsegment.leftCol,\n\t\t\t\t\t\tsegment.rightCol + 1 // make exclusive for slice\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t// adjust the columns to account for the segment's height\n\t\t\t\tfor (var colI=segment.leftCol; colI<=segment.rightCol; colI++) {\n\t\t\t\t\tcolHeights[colI] = segment.top + segment.outerHeight;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// the tallest column in the row should be the \"content height\"\n\t\t\trowContentHeights.push(arrayMax(colHeights));\n\t\t}\n\n\t\treturn rowContentHeights;\n\t}", "function computeSlotSegPressures(seg){var forwardSegs=seg.forwardSegs;var forwardPressure=0;var i;var forwardSeg;if(seg.forwardPressure===undefined){// not already computed\nfor(i=0;i<forwardSegs.length;i++){forwardSeg=forwardSegs[i];// figure out the child's maximum forward path\ncomputeSlotSegPressures(forwardSeg);// either use the existing maximum, or use the child's forward pressure\n// plus one (for the forwardSeg itself)\nforwardPressure=Math.max(forwardPressure,1+forwardSeg.forwardPressure);}seg.forwardPressure=forwardPressure;}}// Find all the segments in `otherSegs` that vertically collide with `seg`.", "computeControlSegments() {\n if (this.controlSteps.length) {\n this.controlSegments = [];\n let segment = { start : 0, end : 0, human : this.controlSteps[0] }\n for (let i = 0; i < this.controlSteps.length; ++i) {\n const humanStep = this.controlSteps[i];\n if (humanStep != segment.human) {\n this.controlSegments.push(segment);\n segment = { start : i, end : i, human : humanStep };\n } else {\n segment.end = i;\n }\n }\n this.controlSegments.push(segment);\n }\n }", "function segmentSizesValid(segments){\r\n var totsize=0;\r\n for(var j=0; j<segments.length; j++){\r\n totsize+=segments[j];\r\n }\r\n if(totsize>mainMemorySize){\r\n return false;\r\n }else{\r\n return true;\r\n }\r\n}", "function drawDescriptionSpace(timeStart, timeFinished, videoDuration,segmentsWidth, segmentsHeight){\n var startPercentage = timeStart / videoDuration ;\n var endPercentage = timeFinished / videoDuration ;\n var descriptionWidth = (endPercentage - startPercentage) * segmentsWidth;\n var descriptionStartPoint = startPercentage * segmentsWidth;\n \n var canvas = document.getElementById('segments');\n var context = canvas.getContext('2d');\n\n drawRect(descriptionStartPoint,32,descriptionWidth, segmentsHeight,context); \n}", "function segmentsOverlap(segment1, segment2) {\n return (\n (\n segment1[0] <= segment2[0] &&\n segment1[1] >= segment2[0]\n ) || (\n segment2[0] <= segment1[0] &&\n segment2[1] >= segment1[0]\n )\n );\n}", "function Segment(p0,p1,p2,i0,i1,i2) {\n this.tri = new THREE.Triangle(p0,p1,p2);\n this.indices = new THREE.Vector3(i0,i1,i2);\n this.height = Math.max(p0.y,p1.y,p2.y);\n treeHeight = Math.max(treeHeight,this.height);\n}", "function m(a){for(var b,c=M(),d=N(),e=[],f=n(a),g=0;g<c;g++){var h=f[g],i=[];for(b=0;b<d;b++)i.push(0);\n// loop through every segment\nfor(var j=0;j<h.length;j++){var k=h[j];\n// adjust the columns to account for the segment's height\nfor(\n// find the segment's top coordinate by looking at the max height\n// of all the columns the segment will be in.\nk.top=D(i.slice(k.leftCol,k.rightCol+1)),b=k.leftCol;b<=k.rightCol;b++)i[b]=k.top+k.outerHeight}\n// the tallest column in the row should be the \"content height\"\ne.push(D(i))}return e}", "function segment(x, y, a) {\n translate(x, y);\n rotate(a);\n line(0, 0, segLength, 0);\n}", "constructor(left, top) {\n this.top = top;\n this.left = left;\n this.numSegments = LATCH_WIDTH / SEGMENT_WIDTH;\n this.segments = [];\n }", "function matchSegment(seg1, seg2, r, result) {\n var a = seg1[0],\n b = seg1[1],\n c = seg2[0],\n d = seg2[1],\n len = result.length;\n\n var ap = closePoint(a, c, d, r),\n bp = closePoint(b, c, d, r);\n\n // a----b\n // c---ap---bp---d\n if (ap !== null && bp !== null) return true; // fully covered\n\n var cp = closePoint(c, a, b, r),\n dp = closePoint(d, a, b, r);\n\n if (cp !== null && cp === dp) return false; // degenerate case, no overlap\n\n if (cp !== null && dp !== null) {\n var cpp = segPoint(a, b, cp);\n var dpp = segPoint(a, b, dp);\n\n if (equals(cpp, dpp)) return false; // degenerate case\n\n // a---cp---dp---b\n // c----d\n if (cp < dp) {\n if (!equals(a, cpp)) result.push([a, cpp]);\n if (!equals(dpp, b)) result.push([dpp, b]);\n\n // a---dp---cp---b\n // d----c\n } else {\n if (!equals(a, dpp)) result.push([a, dpp]);\n if (!equals(cpp, b)) result.push([cpp, b]);\n }\n\n } else if (cp !== null) {\n var cpp = segPoint(a, b, cp);\n\n // a----cp---b\n // d---ap---c\n if (ap !== null && !equals(a, cpp)) result.push([cpp, b]);\n\n // a---cp---b\n // c----bp---d\n else if (bp !== null && !equals(cpp, b)) result.push([a, cpp]);\n\n } else if (dp !== null) {\n var dpp = segPoint(a, b, dp);\n\n // a---dp---b\n // d----bp---c\n if (bp !== null && !equals(dpp, b)) result.push([a, dpp]);\n\n // a----dp---b\n // c---ap---d\n else if (ap !== null && !equals(a, dpp)) result.push([dpp, b]);\n }\n\n return result.length !== len; // segment processed\n}", "function drawSegmentValues(myPie) {\n\n //document.getElementById(\"doughnut-chart\").getContext(\"2d\");\n \n // var test = myPie.segments.length;\n // alert('drawSegmentValues' + test );\n //alert('width chart test== '+ test.width);\n //var test2 = test.getContext(\"2d\").segments.length;\n //alert('drow chart test 2==++== ' + test2);\n}", "addZigZag(endPoint1, endPoint2, width) {\n let pointA = endPoint1.interpolate(endPoint2,0.25);\n let pointB = endPoint1.interpolate(endPoint2, 0.75);\n let phi = endPoint1.getPerpendicularAngle(endPoint2);\n pointA.translate(width * Math.cos(phi), width * Math.sin(phi));\n pointB.translate(width * Math.cos(phi + Math.PI), width * Math.sin(phi + Math.PI));\n\n super.addSegment(endPoint1, pointA);\n super.addSegment(pointA, pointB);\n super.addSegment(pointB, endPoint2);\n }", "clipSegment(start, end) {\n const quadrantStart = this.pointLocation(start)\n const quadrantEnd = this.pointLocation(end)\n\n if (quadrantStart === 0b0000 && quadrantEnd === 0b0000) {\n // The line is inside the boundaries\n return [start, end]\n }\n\n if (quadrantStart === quadrantEnd) {\n // We are in the same box, and we are out of bounds.\n return [this.nearestVertex(start), this.nearestVertex(end)]\n }\n\n if (quadrantStart & quadrantEnd) {\n // These points are all on one side of the box.\n return [this.nearestVertex(start), this.nearestVertex(end)]\n }\n\n if (quadrantStart === 0b000) {\n // We are exiting the box. Return the start, the intersection with the boundary, and the closest\n // boundary point to the exited point.\n let line = [start]\n line.push(this.boundPoint(start, end))\n line.push(this.nearestVertex(end))\n return line\n }\n\n if (quadrantEnd === 0b000) {\n // We are re-entering the box.\n return [this.boundPoint(end, start), end]\n }\n\n // We have reached a terrible place, where both points are oob, but it might intersect with the\n // work area. First, define the boundaries as lines.\n const sides = [\n // left\n [Victor(-this.sizeX, -this.sizeY), new Victor(-this.sizeX, this.sizeY)],\n // right\n [new Victor(this.sizeX, -this.sizeY), new Victor(this.sizeX, this.sizeY)],\n // bottom\n [new Victor(-this.sizeX, -this.sizeY), new Victor(this.sizeX, -this.sizeY)],\n // top\n [new Victor(-this.sizeX, this.sizeY), new Victor(this.sizeX, this.sizeY)],\n ]\n\n // Count up the number of boundary lines intersect with our line segment.\n let intersections = []\n for (let s=0; s<sides.length; s++) {\n const intPoint = this.intersection(start,\n end,\n sides[s][0],\n sides[s][1])\n if (intPoint) {\n intersections.push(new Victor(intPoint.x, intPoint.y))\n }\n }\n\n if (intersections.length !== 0) {\n if (intersections.length !== 2) {\n // We should never get here. How would we have something other than 2 or 0 intersections with\n // a box?\n console.log(intersections)\n throw Error(\"Software Geometry Error\")\n }\n\n // The intersections are tested in some normal order, but the line could be going through them\n // in any direction. This check will flip the intersections if they are reversed somehow.\n if (Victor.fromObject(intersections[0]).subtract(start).lengthSq() >\n Victor.fromObject(intersections[1]).subtract(start).lengthSq()) {\n let temp = intersections[0]\n intersections[0] = intersections[1]\n intersections[1] = temp\n }\n\n return [...intersections, this.nearestVertex(end)]\n }\n\n // Damn. We got here because we have a start and end that are failing different boundary checks,\n // and the line segment doesn't intersect the box. We have to crawl around the outside of the\n // box until we reach the other point.\n // Here, I'm going to split this line into two parts, and send each half line segment back\n // through the clipSegment algorithm. Eventually, that should result in only one of the other cases.\n const midpoint = Victor.fromObject(start).add(end).multiply(new Victor(0.5, 0.5))\n\n // recurse, and find smaller segments until we don't end up in this place again.\n return [...this.clipSegment(start, midpoint),\n ...this.clipSegment(midpoint, end)]\n }", "didSwitchToSegmentsLayout() {\n this.controllerState.viewMode = ViewMode.segments;\n this.didSwitchLayout();\n }", "function formatIntersectingSegment(x, y, i, j, xx, yy) {\n if (xx[i] == x && yy[i] == y) {\n return [i, i];\n }\n if (xx[j] == x && yy[j] == y) {\n return [j, j];\n }\n return i < j ? [i, j] : [j, i];\n }", "function createSegment(x1, y1, x2, y2, color){\n\tvar p1 = createPoint(x1, y1, color);\n\tvar p2 = createPoint(x2, y2, color);\n\tboard.create('segment', [p1, p2], {fixed:true, fillColor: color, strokeColor: color});\n}", "function drawSegment([ax, ay], [bx, by], color, scale, ctx) {\r\n ctx.beginPath();\r\n ctx.moveTo(ax * scale, ay * scale);\r\n ctx.lineTo(bx * scale, by * scale);\r\n ctx.lineWidth = 2;\r\n ctx.strokeStyle = color;\r\n ctx.stroke();\r\n}", "function onSegment(p, q, r)\n{\n if (q.x <= Math.max(p.x, r.x) && q.x >= Math.min(p.x, r.x) &&\n q.y <= Math.max(p.y, r.y) && q.y >= Math.min(p.y, r.y))\n return true;\n\n return false;\n}", "size(){ return this.end-this.start }", "function drawSegment([ay, ax], [by, bx], color, scale, ctx) {\n ctx.beginPath();\n ctx.moveTo(ax * scale, ay * scale);\n ctx.lineTo(bx * scale, by * scale);\n ctx.lineWidth = lineWidth;\n ctx.strokeStyle = color;\n ctx.stroke();\n}", "function onSegment(p, q, r) {\n return q.x <= Math.max(p.x, r.x) && q.x >= Math.min(p.x, r.x) && q.y <= Math.max(p.y, r.y) && q.y >= Math.min(p.y, r.y);\n}", "function onSegment(p, q, r) {\n return q.x <= Math.max(p.x, r.x) && q.x >= Math.min(p.x, r.x) && q.y <= Math.max(p.y, r.y) && q.y >= Math.min(p.y, r.y);\n}", "function onSegment(p, q, r) {\n return q.x <= Math.max(p.x, r.x) && q.x >= Math.min(p.x, r.x) && q.y <= Math.max(p.y, r.y) && q.y >= Math.min(p.y, r.y);\n}", "function onSegment(p, q, r) {\n return q.x <= Math.max(p.x, r.x) && q.x >= Math.min(p.x, r.x) && q.y <= Math.max(p.y, r.y) && q.y >= Math.min(p.y, r.y);\n}", "function computeSegHorizontals(segs, eventOrderSpecs) {\n // IMPORTANT TO CLEAR OLD RESULTS :(\n for (var _i = 0, segs_2 = segs; _i < segs_2.length; _i++) {\n var seg = segs_2[_i];\n seg.level = null;\n seg.forwardCoord = null;\n seg.backwardCoord = null;\n seg.forwardPressure = null;\n }\n\n segs = Object(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__[\"sortEventSegs\"])(segs, eventOrderSpecs);\n var level0;\n var levels = buildSlotSegLevels(segs);\n computeForwardSlotSegs(levels);\n\n if (level0 = levels[0]) {\n for (var _a = 0, level0_1 = level0; _a < level0_1.length; _a++) {\n var seg = level0_1[_a];\n computeSlotSegPressures(seg);\n }\n\n for (var _b = 0, level0_2 = level0; _b < level0_2.length; _b++) {\n var seg = level0_2[_b];\n computeSegForwardBack(seg, 0, 0, eventOrderSpecs);\n }\n }\n\n return segs;\n } // Builds an array of segments \"levels\". The first level will be the leftmost tier of segments if the calendar is", "function computeSegCoords(segs, dayDate, slatCoords, eventMinHeight, eventOrderSpecs) {\n computeSegVerticals(segs, dayDate, slatCoords, eventMinHeight);\n return computeSegHorizontals(segs, eventOrderSpecs); // requires top/bottom from computeSegVerticals\n } // For each segment in an array, computes and assigns its top and bottom properties", "edges() {\r\n if (this.pos.x > width) {\r\n this.pos.x = 0;\r\n this.updatePrev();\r\n }\r\n if (this.pos.x < 0) {\r\n this.pos.x = width;\r\n this.updatePrev();\r\n }\r\n if (this.pos.y > height) {\r\n this.pos.y = 0;\r\n this.updatePrev();\r\n }\r\n if (this.pos.y < 0) {\r\n this.pos.y = height;\r\n this.updatePrev();\r\n }\r\n\r\n }", "function F(a,b){var c=G.getRowCnt(),d=G.getColCnt(),e=[],f=B(a),g=B(b),h=+b.time();h&&h>=M&&g++,g=Math.max(g,f+1);\n// loop through all the rows in the view\nfor(var i=C(f),j=C(g)-1,k=0;k<c;k++){\n// first and last cell offset for the row\nvar l=k*d,m=l+d-1,n=Math.max(i,l),o=Math.min(j,m);\n// make sure segment's offsets are valid and in view\nif(n<=o){\n// translate to cells\nvar p=D(n),q=D(o),r=[p.col,q.col].sort(),s=y(n)==f,t=y(o)+1==g;// +1 for comparing exclusively\ne.push({row:k,leftCol:r[0],rightCol:r[1],isStart:s,isEnd:t})}}return e}", "function onSegment( p, q, r ) {\n\n\treturn q.x <= Math.max( p.x, r.x ) && q.x >= Math.min( p.x, r.x ) && q.y <= Math.max( p.y, r.y ) && q.y >= Math.min( p.y, r.y );\n\n}", "function onSegment(p, q, r) {\n if (\n q.x <= Math.max(p.x, r.x) &&\n q.x >= Math.min(p.x, r.x) &&\n q.y <= Math.max(p.y, r.y) &&\n q.y >= Math.min(p.y, r.y)\n )\n return true\n\n return false\n}", "function Segment(x1, y1, x2, y2){\r\n\tthis.x1 = x1;\r\n\tthis.y1 = y1;\r\n\tthis.x2 = x2;\r\n\tthis.y2 = y2;\r\n}", "function placeRects(allRects, segs, cells) {\n let rectsByEachCol = groupRectsByEachCol(allRects, cells.length);\n let singleColPlacements = [];\n let multiColPlacements = [];\n let leftoverMargins = [];\n for (let col = 0; col < cells.length; col += 1) {\n let rects = rectsByEachCol[col];\n // compute all static segs in singlePlacements\n let singlePlacements = [];\n let currentHeight = 0;\n let currentMarginTop = 0;\n for (let rect of rects) {\n let seg = segs[rect.index];\n singlePlacements.push({\n seg: resliceSeg(seg, col, col + 1, cells),\n isVisible: true,\n isAbsolute: false,\n absoluteTop: rect.levelCoord,\n marginTop: rect.levelCoord - currentHeight,\n });\n currentHeight = rect.levelCoord + rect.thickness;\n }\n // compute mixed static/absolute segs in multiPlacements\n let multiPlacements = [];\n currentHeight = 0;\n currentMarginTop = 0;\n for (let rect of rects) {\n let seg = segs[rect.index];\n let isAbsolute = rect.span.end - rect.span.start > 1; // multi-column?\n let isFirstCol = rect.span.start === col;\n currentMarginTop += rect.levelCoord - currentHeight; // amount of space since bottom of previous seg\n currentHeight = rect.levelCoord + rect.thickness; // height will now be bottom of current seg\n if (isAbsolute) {\n currentMarginTop += rect.thickness;\n if (isFirstCol) {\n multiPlacements.push({\n seg: resliceSeg(seg, rect.span.start, rect.span.end, cells),\n isVisible: true,\n isAbsolute: true,\n absoluteTop: rect.levelCoord,\n marginTop: 0,\n });\n }\n }\n else if (isFirstCol) {\n multiPlacements.push({\n seg: resliceSeg(seg, rect.span.start, rect.span.end, cells),\n isVisible: true,\n isAbsolute: false,\n absoluteTop: rect.levelCoord,\n marginTop: currentMarginTop, // claim the margin\n });\n currentMarginTop = 0;\n }\n }\n singleColPlacements.push(singlePlacements);\n multiColPlacements.push(multiPlacements);\n leftoverMargins.push(currentMarginTop);\n }\n return { singleColPlacements, multiColPlacements, leftoverMargins };\n }", "static calc_draw_aabb(ctx : Context, td : TransData, minmax : MinMax) {\r\n var vset = {};\r\n var sset = {};\r\n var hset = {};\r\n\r\n for (var i=0; i<td.data.length; i++) {\r\n var d = td.data[i];\r\n if (d.type != TransSplineVert)\r\n continue;\r\n\r\n if (d.data.type == SplineTypes.HANDLE)\r\n hset[d.data.eid] = 1;\r\n }\r\n\r\n function rec_walk(v : SplineVertex, depth : number) {\r\n if (depth > 2) return;\r\n if (v == undefined) return;\r\n if (v.eid in vset) return;\r\n\r\n vset[v.eid] = 1;\r\n minmax.minmax(v);\r\n\r\n for (var i=0; i<v.segments.length; i++) {\r\n var seg = v.segments[i];\r\n\r\n if (!(seg.eid in sset)) {\r\n sset[seg.eid] = 1;\r\n seg.update_aabb();\r\n\r\n minmax.minmax(seg._aabb[0]);\r\n minmax.minmax(seg._aabb[1]);\r\n }\r\n\r\n var v2 = seg.other_vert(v);\r\n\r\n //don't override roots\r\n if (v2 != undefined && (v2.flag & SplineFlags.SELECT))\r\n continue;\r\n\r\n if (v.type == SplineTypes.HANDLE && !(v.eid in hset)) {\r\n vset[v.eid] = 1;\r\n } else {\r\n rec_walk(seg.other_vert(v), depth+1);\r\n }\r\n }\r\n }\r\n\r\n for (var i=0; i<td.data.length; i++) {\r\n var d = td.data[i];\r\n if (d.type != TransSplineVert)\r\n continue;\r\n\r\n if (d.w <= 0.0) continue;\r\n\r\n var v = d.data;\r\n if (v.eid in vset) continue;\r\n\r\n if (v.type == SplineTypes.HANDLE)\r\n v = v.owning_vertex;\r\n\r\n for (var j=0; j<v.segments.length; j++) {\r\n var seg = v.segments[j];\r\n if (!seg.l)\r\n continue;\r\n\r\n var _i1=0, l = seg.l;\r\n\r\n do {\r\n var faabb = l.f._aabb;\r\n\r\n minmax.minmax(faabb[0]);\r\n minmax.minmax(faabb[1]);\r\n\r\n if (_i1++ > 100) {\r\n console.log(\"infinite loop!\");\r\n break;\r\n }\r\n l = l.radial_next;\r\n } while (l != seg.l);\r\n }\r\n\r\n rec_walk(v, 0);\r\n }\r\n }", "function _segseg (out, p1, p2, p3, p4) {\n let x1 = p1[0]\n let y1 = p1[1]\n let x2 = p2[0]\n let y2 = p2[1]\n let x3 = p3[0]\n let y3 = p3[1]\n let x4 = p4[0]\n let y4 = p4[1]\n\n let a1, a2, b1, b2, c1, c2 // Coefficients of line eqns.\n let r1, r2, r3, r4 // 'Sign' values\n let denom, offset // Intermediate values\n let x, y // Intermediate return values\n\n // Compute a1, b1, c1, where line joining points 1 and 2\n // is \"a1 x + b1 y + c1 = 0\".\n a1 = y2 - y1\n b1 = x1 - x2\n c1 = x2 * y1 - x1 * y2\n\n // Compute r3 and r4.\n r3 = a1 * x3 + b1 * y3 + c1\n r4 = a1 * x4 + b1 * y4 + c1\n\n // Check signs of r3 and r4. If both point 3 and point 4 lie on\n // same side of line 1, the line segments do not intersect.\n if ( r3 !== 0 && r4 !== 0 && ((r3 >= 0 && r4 >= 0) || (r3 < 0 && r4 < 0)))\n return DONT_INTERSECT\n\n // Compute a2, b2, c2\n a2 = y4 - y3\n b2 = x3 - x4\n c2 = x4 * y3 - x3 * y4\n\n // Compute r1 and r2\n r1 = a2 * x1 + b2 * y1 + c2\n r2 = a2 * x2 + b2 * y2 + c2\n\n // Check signs of r1 and r2. If both point 1 and point 2 lie\n // on same side of second line segment, the line segments do\n // not intersect.\n if (r1 !== 0 && r2 !== 0 && ((r1 >= 0 && r2 >= 0) || (r1 < 0 && r2 < 0)))\n return DONT_INTERSECT\n\n // Line segments intersect: compute intersection point.\n denom = a1 * b2 - a2 * b1\n\n if (denom === 0)\n return COLINEAR\n\n offset = denom < 0 ? - denom / 2 : denom / 2\n\n x = b1 * c2 - b2 * c1\n y = a2 * c1 - a1 * c2\n\n out[0] = ( x < 0 ? x : x ) / denom\n out[1] = ( y < 0 ? y : y ) / denom\n \n return DO_INTERSECT\n}", "function getSection(start, angle, length, width) {\n var pThere = start + new Point(width/2, 0);\n var pBack = start + new Point(-width/2, 0);\n markPoint(pThere);\n markPoint(pBack);\n var hInThere = new Point(length*0.5, length*0.3);\n var hOutBack = new Point(length*-0.7, length*0.2);\n var hOutThere = new Point(length*0.5, -length*0.3);\n var hInBack = new Point(length*-0.7, -length*0.2);\n var segmentThere = new Segment(pThere, hInThere, hOutThere);\n var segmentBack = new Segment(pBack, hInBack, hOutBack);\n return [segmentThere, segmentBack, (start + new Point(0, -length))]\n }", "function n(a){var b,c,d,e=M(),f=[];\n// group segments by row\nfor(b=0;b<a.length;b++)c=a[b],d=c.row,c.element&&(// was rendered?\nf[d]?\n// already other segments. append to array\nf[d].push(c):\n// first segment in row. create new array\nf[d]=[c]);\n// sort each row\nfor(d=0;d<e;d++)f[d]=o(f[d]||[]);return f}", "function midline()\r\n{\r\nfor(i=0;i<480;i+=10)\r\n{\r\nvar y = 0;\r\nfill(\"white\");\r\nstroke(0);\r\nrect(width/2,y+i,10,480);\r\n}\r\n}", "function unionSegments(segment1, segment2) {\n return [\n Math.min(segment1[0], segment2[0]),\n Math.max(segment1[1], segment2[1]),\n ];\n}", "get excludeCollinear(){\n\t\tlet list = this.segList2D;\n\t\tlet newlist = [];\n\t\tfor (let i=0; i<list.length; i++){\n\t\t\tlet thisseg = list[i];\n\t\t\tlet x0 = thisseg.a[0];\n\t\t\tlet y0 = thisseg.a[1];\n\t\t\tlet x1 = thisseg.b[0];\n\t\t\tlet y1 = thisseg.b[1];\n\t\t\tlet nextseg\n\t\t\tif (i === list.length-1){\n\t\t\t\tnextseg = list[0];\n\t\t\t}\n\t\t\telse{\n\t\t\t\tnextseg = list[i+1];\n\t\t\t}\n\t\t\tlet a0 = nextseg.a[0];\n\t\t\tlet b0 = nextseg.a[1];\n\t\t\tlet a1 = nextseg.b[0];\n\t\t\tlet b1 = nextseg.b[1];\n\t\t\tlet xy = Math.round((y1-y0)/(x1-x0)*1000000)/1000000;\n\t\t\tlet ab = Math.round((b1-b0)/(a1-a0)*1000000)/1000000;\n\t\t\tif (xy !== ab){\n\t\t\t\tnewlist.push(thisseg);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif (i===list.length-1){\n\t\t\t\t\tnewlist.shift();\n\t\t\t\t}\n\t\t\t\tnewlist.push({a:[x0,y0],b:[a1,b1]})\n\t\t\t}\n\t\t}\n\t\treturn newlist;\n\t}", "function setVerticals(segments, doRowHeights) {\n\t\tvar rowContentHeights = calculateVerticals(segments); // also sets segment.top\n\t\tvar rowContentElements = getRowContentElements(); // returns 1 inner div per row\n\t\tvar rowContentTops = [];\n\n\t\t// Set each row's height by setting height of first inner div\n\t\tif (doRowHeights) {\n\t\t\tfor (var i=0; i<rowContentElements.length; i++) {\n\t\t\t\trowContentElements[i].height(rowContentHeights[i]);\n\t\t\t}\n\t\t}\n\n\t\t// Get each row's top, relative to the views's origin.\n\t\t// Important to do this after setting each row's height.\n\t\tfor (var i=0; i<rowContentElements.length; i++) {\n\t\t\trowContentTops.push(\n\t\t\t\trowContentElements[i].position().top\n\t\t\t);\n\t\t}\n\n\t\t// Set each segment element's CSS \"top\" property.\n\t\t// Each segment object has a \"top\" property, which is relative to the row's top, but...\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\telement.css(\n\t\t\t\t'top',\n\t\t\t\trowContentTops[segment.row] + segment.top // ...now, relative to views's origin\n\t\t\t);\n\t\t});\n\t}", "function setVerticals(segments, doRowHeights) {\n\t\tvar rowContentHeights = calculateVerticals(segments); // also sets segment.top\n\t\tvar rowContentElements = getRowContentElements(); // returns 1 inner div per row\n\t\tvar rowContentTops = [];\n\n\t\t// Set each row's height by setting height of first inner div\n\t\tif (doRowHeights) {\n\t\t\tfor (var i=0; i<rowContentElements.length; i++) {\n\t\t\t\trowContentElements[i].height(rowContentHeights[i]);\n\t\t\t}\n\t\t}\n\n\t\t// Get each row's top, relative to the views's origin.\n\t\t// Important to do this after setting each row's height.\n\t\tfor (var i=0; i<rowContentElements.length; i++) {\n\t\t\trowContentTops.push(\n\t\t\t\trowContentElements[i].position().top\n\t\t\t);\n\t\t}\n\n\t\t// Set each segment element's CSS \"top\" property.\n\t\t// Each segment object has a \"top\" property, which is relative to the row's top, but...\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\telement.css(\n\t\t\t\t'top',\n\t\t\t\trowContentTops[segment.row] + segment.top // ...now, relative to views's origin\n\t\t\t);\n\t\t});\n\t}", "function setVerticals(segments, doRowHeights) {\n\t\tvar rowContentHeights = calculateVerticals(segments); // also sets segment.top\n\t\tvar rowContentElements = getRowContentElements(); // returns 1 inner div per row\n\t\tvar rowContentTops = [];\n\n\t\t// Set each row's height by setting height of first inner div\n\t\tif (doRowHeights) {\n\t\t\tfor (var i=0; i<rowContentElements.length; i++) {\n\t\t\t\trowContentElements[i].height(rowContentHeights[i]);\n\t\t\t}\n\t\t}\n\n\t\t// Get each row's top, relative to the views's origin.\n\t\t// Important to do this after setting each row's height.\n\t\tfor (var i=0; i<rowContentElements.length; i++) {\n\t\t\trowContentTops.push(\n\t\t\t\trowContentElements[i].position().top\n\t\t\t);\n\t\t}\n\n\t\t// Set each segment element's CSS \"top\" property.\n\t\t// Each segment object has a \"top\" property, which is relative to the row's top, but...\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\telement.css(\n\t\t\t\t'top',\n\t\t\t\trowContentTops[segment.row] + segment.top // ...now, relative to views's origin\n\t\t\t);\n\t\t});\n\t}", "function onSegment( p, q, r ) {\n\n\t\treturn q.x <= Math.max( p.x, r.x ) && q.x >= Math.min( p.x, r.x ) && q.y <= Math.max( p.y, r.y ) && q.y >= Math.min( p.y, r.y );\n\n\t}", "function onSegment(p, q, r) {\n if (\n q[0] <= Math.max(p[0], r[0]) &&\n q[0] >= Math.min(p[0], r[0]) &&\n q[1] <= Math.max(p[1], r[1]) &&\n q[1] >= Math.min(p[1], r[1])\n ) {\n return true;\n }\n\n return false;\n}", "display(){\n\n push();\n\n fill(this.color);\n noStroke();\n\n for(let i = 0; i < this.numOfSegs; i++){\n ellipse(this.segments[i].x,this.segments[i].y,this.segments[i].width);\n }\n pop();\n\n }", "drawSegment(graphics, color) {\n if (color) graphics.setForeground(color)\n graphics.drawLine(this.x1, this.y1, this.x2, this.y2)\n }", "edgeCheck() {\n\n // check if the selected segment has hit a vertical wall (left or right walls)\n if (this.segments[this.select].x + (this.segments[this.select].width /2) >= width || this.segments[this.select].x - (this.segments[this.select].width /2) <= 0) {\n this.segments[this.select].deltaX *= -1;\n }\n // check if the selected segment has hit a horizontal wall (top or bottom walls)\n if (this.segments[this.select].y + (this.segments[this.select].width /2) >= height || this.segments[this.select].y - (this.segments[this.select].width /2) <= 0) {\n this.segments[this.select].deltaY *= -1;\n }\n }", "function setVerticals(segments, doRowHeights) {\n\t\tvar rowContentHeights = calculateVerticals(segments); // also sets segment.top\n\t\tvar rowContentElements = getRowContentElements(); // returns 1 inner div per row\n\t\tvar rowContentTops = [];\n\t\tvar i;\n\n\t\t// Set each row's height by setting height of first inner div\n\t\tif (doRowHeights) {\n\t\t\tfor (i=0; i<rowContentElements.length; i++) {\n\t\t\t\trowContentElements[i].height(rowContentHeights[i]);\n\t\t\t}\n\t\t}\n\n\t\t// Get each row's top, relative to the views's origin.\n\t\t// Important to do this after setting each row's height.\n\t\tfor (i=0; i<rowContentElements.length; i++) {\n\t\t\trowContentTops.push(\n\t\t\t\trowContentElements[i].position().top\n\t\t\t);\n\t\t}\n\n\t\t// Set each segment element's CSS \"top\" property.\n\t\t// Each segment object has a \"top\" property, which is relative to the row's top, but...\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\telement.css(\n\t\t\t\t'top',\n\t\t\t\trowContentTops[segment.row] + segment.top // ...now, relative to views's origin\n\t\t\t);\n\t\t});\n\t}", "function setVerticals(segments, doRowHeights) {\n\t\tvar rowContentHeights = calculateVerticals(segments); // also sets segment.top\n\t\tvar rowContentElements = getRowContentElements(); // returns 1 inner div per row\n\t\tvar rowContentTops = [];\n\t\tvar i;\n\n\t\t// Set each row's height by setting height of first inner div\n\t\tif (doRowHeights) {\n\t\t\tfor (i=0; i<rowContentElements.length; i++) {\n\t\t\t\trowContentElements[i].height(rowContentHeights[i]);\n\t\t\t}\n\t\t}\n\n\t\t// Get each row's top, relative to the views's origin.\n\t\t// Important to do this after setting each row's height.\n\t\tfor (i=0; i<rowContentElements.length; i++) {\n\t\t\trowContentTops.push(\n\t\t\t\trowContentElements[i].position().top\n\t\t\t);\n\t\t}\n\n\t\t// Set each segment element's CSS \"top\" property.\n\t\t// Each segment object has a \"top\" property, which is relative to the row's top, but...\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\telement.css(\n\t\t\t\t'top',\n\t\t\t\trowContentTops[segment.row] + segment.top // ...now, relative to views's origin\n\t\t\t);\n\t\t});\n\t}", "function size_of(segments, bindings) {\n var size = 0;\n for (var i=0, len = segments.length; i < len; i++) {\n size += size_of_segment(segments[i], bindings);\n }\n return size;\n}", "function ArmSegment(shader, name, xPivot, yPivot) {\r\n SceneNode.call(this, shader, name, true); // calling super class constructor\r\n\r\n var xf = this.getXform();\r\n xf.setPosition(xPivot, yPivot);\r\n\r\n // now create the children shapes\r\n var obj = new CircleRenderable(shader); // The purple circle base\r\n this.addToSet(obj);\r\n obj.setColor([0.75, 0.5, 1, 1]);\r\n xf = obj.getXform();\r\n xf.setSize(1, 2);\r\n // xf.setPosition(xPivot, 1 + yPivot);\r\n xf.setPosition(0, 0);\r\n\r\n obj = new SquareRenderable(shader); // The right green\r\n this.addToSet(obj);\r\n obj.setColor([0, 1, 0, 1]);\r\n xf = obj.getXform();\r\n xf.setSize(0.25, 0.25); // so that we can see the connecting point\r\n // xf.setPosition(xPivot, 1.75 + yPivot);\r\n xf.setPosition(0.375, 0);\r\n\r\n obj = new SquareRenderable(shader); // The left green\r\n this.addToSet(obj);\r\n obj.setColor([0, 1, 0, 1]);\r\n xf = obj.getXform();\r\n xf.setSize(0.25, 0.25); // so that we can see the connecting point\r\n // xf.setPosition(xPivot, 1.75 + yPivot);\r\n xf.setPosition(-0.375, 0);\r\n\r\n obj = new SquareRenderable(shader); // The top green\r\n this.addToSet(obj);\r\n obj.setColor([0, 0.85, 0.15, 1]);\r\n xf = obj.getXform();\r\n xf.setSize(0.25, 0.25); // so that we can see the connecting point\r\n // xf.setPosition(xPivot+0.5-0.125, yPivot+0.125);\r\n xf.setPosition(0, 0.375);\r\n\r\n obj = new SquareRenderable(shader); // The bottom green\r\n this.addToSet(obj);\r\n obj.setColor([0, 0.85, 0.15, 1]);\r\n xf = obj.getXform();\r\n xf.setSize(0.25, 0.25); // so that we can see the connecting point\r\n // xf.setPosition(xPivot-0.5+0.125, yPivot+0.125);\r\n xf.setPosition(0, -0.375);\r\n\r\n obj = new CircleRenderable(shader); // The middle red circle\r\n this.addToSet(obj);\r\n obj.setColor([1, 0.75, 1, 1]);\r\n xf = obj.getXform();\r\n xf.setSize(0.5, 0.5); // so that we can see the connecting point\r\n xf.setPosition(0, 0);\r\n\r\n this.mPulseRate = 0.005;\r\n this.mRotateRate = -2;\r\n}", "function Segment(props) {\n var attached = props.attached,\n basic = props.basic,\n children = props.children,\n circular = props.circular,\n className = props.className,\n clearing = props.clearing,\n color = props.color,\n compact = props.compact,\n content = props.content,\n disabled = props.disabled,\n floated = props.floated,\n inverted = props.inverted,\n loading = props.loading,\n placeholder = props.placeholder,\n padded = props.padded,\n piled = props.piled,\n raised = props.raised,\n secondary = props.secondary,\n size = props.size,\n stacked = props.stacked,\n tertiary = props.tertiary,\n textAlign = props.textAlign,\n vertical = props.vertical;\n var classes = (0, _classnames[\"default\"])('ui', color, size, (0, _lib.useKeyOnly)(basic, 'basic'), (0, _lib.useKeyOnly)(circular, 'circular'), (0, _lib.useKeyOnly)(clearing, 'clearing'), (0, _lib.useKeyOnly)(compact, 'compact'), (0, _lib.useKeyOnly)(disabled, 'disabled'), (0, _lib.useKeyOnly)(inverted, 'inverted'), (0, _lib.useKeyOnly)(loading, 'loading'), (0, _lib.useKeyOnly)(placeholder, 'placeholder'), (0, _lib.useKeyOnly)(piled, 'piled'), (0, _lib.useKeyOnly)(raised, 'raised'), (0, _lib.useKeyOnly)(secondary, 'secondary'), (0, _lib.useKeyOnly)(stacked, 'stacked'), (0, _lib.useKeyOnly)(tertiary, 'tertiary'), (0, _lib.useKeyOnly)(vertical, 'vertical'), (0, _lib.useKeyOrValueAndKey)(attached, 'attached'), (0, _lib.useKeyOrValueAndKey)(padded, 'padded'), (0, _lib.useTextAlignProp)(textAlign), (0, _lib.useValueAndKey)(floated, 'floated'), 'segment', className);\n var rest = (0, _lib.getUnhandledProps)(Segment, props);\n var ElementType = (0, _lib.getElementType)(Segment, props);\n return _react[\"default\"].createElement(ElementType, (0, _extends2[\"default\"])({}, rest, {\n className: classes\n }), _lib.childrenUtils.isNil(children) ? content : children);\n}", "function Segment(props) {\n var attached = props.attached,\n basic = props.basic,\n children = props.children,\n circular = props.circular,\n className = props.className,\n clearing = props.clearing,\n color = props.color,\n compact = props.compact,\n content = props.content,\n disabled = props.disabled,\n floated = props.floated,\n inverted = props.inverted,\n loading = props.loading,\n placeholder = props.placeholder,\n padded = props.padded,\n piled = props.piled,\n raised = props.raised,\n secondary = props.secondary,\n size = props.size,\n stacked = props.stacked,\n tertiary = props.tertiary,\n textAlign = props.textAlign,\n vertical = props.vertical;\n var classes = (0, _classnames[\"default\"])('ui', color, size, (0, _lib.useKeyOnly)(basic, 'basic'), (0, _lib.useKeyOnly)(circular, 'circular'), (0, _lib.useKeyOnly)(clearing, 'clearing'), (0, _lib.useKeyOnly)(compact, 'compact'), (0, _lib.useKeyOnly)(disabled, 'disabled'), (0, _lib.useKeyOnly)(inverted, 'inverted'), (0, _lib.useKeyOnly)(loading, 'loading'), (0, _lib.useKeyOnly)(placeholder, 'placeholder'), (0, _lib.useKeyOnly)(piled, 'piled'), (0, _lib.useKeyOnly)(raised, 'raised'), (0, _lib.useKeyOnly)(secondary, 'secondary'), (0, _lib.useKeyOnly)(stacked, 'stacked'), (0, _lib.useKeyOnly)(tertiary, 'tertiary'), (0, _lib.useKeyOnly)(vertical, 'vertical'), (0, _lib.useKeyOrValueAndKey)(attached, 'attached'), (0, _lib.useKeyOrValueAndKey)(padded, 'padded'), (0, _lib.useTextAlignProp)(textAlign), (0, _lib.useValueAndKey)(floated, 'floated'), 'segment', className);\n var rest = (0, _lib.getUnhandledProps)(Segment, props);\n var ElementType = (0, _lib.getElementType)(Segment, props);\n return _react[\"default\"].createElement(ElementType, (0, _extends2[\"default\"])({}, rest, {\n className: classes\n }), _lib.childrenUtils.isNil(children) ? content : children);\n}", "function isSlotSegCollision(seg1, seg2) {\n return seg1.bottom > seg2.top && seg1.top < seg2.bottom;\n}", "function isSlotSegCollision(seg1, seg2) {\n return seg1.bottom > seg2.top && seg1.top < seg2.bottom;\n}", "function isSlotSegCollision(seg1, seg2) {\n return seg1.bottom > seg2.top && seg1.top < seg2.bottom;\n}", "function isSlotSegCollision(seg1, seg2) {\n return seg1.bottom > seg2.top && seg1.top < seg2.bottom;\n}", "function isSlotSegCollision(seg1, seg2) {\n return seg1.bottom > seg2.top && seg1.top < seg2.bottom;\n}", "function add_segments() {\r\n for (let i = 0; i < new_segments; i++) {\r\n the_snake_square_on_the_grid_board_game.push({\r\n ...the_snake_square_on_the_grid_board_game[the_snake_square_on_the_grid_board_game.length - 1]\r\n });\r\n }\r\n\r\n new_segments = 0;\r\n}", "static DistancePointToLineSegment() {}", "function _onSegment(A,B,p, tolerance){\n\t\tif(!tolerance){\n\t\t\ttolerance = TOL;\n\t\t}\n\t\t\t\t\n\t\t// vertical line\n\t\tif(_almostEqual(A.x, B.x, tolerance) && _almostEqual(p.x, A.x, tolerance)){\n\t\t\tif(!_almostEqual(p.y, B.y, tolerance) && !_almostEqual(p.y, A.y, tolerance) && p.y < Math.max(B.y, A.y, tolerance) && p.y > Math.min(B.y, A.y, tolerance)){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// horizontal line\n\t\tif(_almostEqual(A.y, B.y, tolerance) && _almostEqual(p.y, A.y, tolerance)){\n\t\t\tif(!_almostEqual(p.x, B.x, tolerance) && !_almostEqual(p.x, A.x, tolerance) && p.x < Math.max(B.x, A.x) && p.x > Math.min(B.x, A.x)){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\t\t\n\t\t\n\t\t//range check\n\t\tif((p.x < A.x && p.x < B.x) || (p.x > A.x && p.x > B.x) || (p.y < A.y && p.y < B.y) || (p.y > A.y && p.y > B.y)){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t\n\t\t// exclude end points\n\t\tif((_almostEqual(p.x, A.x, tolerance) && _almostEqual(p.y, A.y, tolerance)) || (_almostEqual(p.x, B.x, tolerance) && _almostEqual(p.y, B.y, tolerance))){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tvar cross = (p.y - A.y) * (B.x - A.x) - (p.x - A.x) * (B.y - A.y);\n\t\t\n\t\tif(Math.abs(cross) > tolerance){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tvar dot = (p.x - A.x) * (B.x - A.x) + (p.y - A.y)*(B.y - A.y);\n\t\t\n\t\t\n\t\t\n\t\tif(dot < 0 || _almostEqual(dot, 0, tolerance)){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tvar len2 = (B.x - A.x)*(B.x - A.x) + (B.y - A.y)*(B.y - A.y);\n\t\t\n\t\t\n\t\t\n\t\tif(dot > len2 || _almostEqual(dot, len2, tolerance)){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "function drawSegment(_ref2, _ref3, color, scale, ctx) {\n var _ref4 = _slicedToArray(_ref2, 2),\n ay = _ref4[0],\n ax = _ref4[1];\n\n var _ref5 = _slicedToArray(_ref3, 2),\n by = _ref5[0],\n bx = _ref5[1];\n\n ctx.beginPath();\n ctx.moveTo(ax * scale, ay * scale);\n ctx.lineTo(bx * scale, by * scale);\n ctx.lineWidth = lineWidth;\n ctx.strokeStyle = color;\n ctx.stroke();\n}", "function R(){var e=s.getBoundingClientRect(),n=\"offset\"+[\"Width\",\"Height\"][t.ort];return 0===t.ort?e.width||s[n]:e.height||s[n]}", "function addSegment(segment) {\n\t\t\t\n\t\t// create canvas element used to visualize the frames of \n\t\t// the given segment + its timecodes\n\t\tvar item = document.createElement('canvas');\n\t\titem.width = 1000;\n\t\titem.height = 200;\n\t\t\n\t\t// input field for description of a segment\n\t\tvar input = document.createElement('input');\n\t\tinput.type = 'text';\n\t\tinput.placeholder = 'description';\n\t\tinput.className = 'description';\n\t\tinput.value = segment.description;\n\t\tinput.id = '' + segment.id;\n\t\tinput.width = 500;\n\t\t\n\t\t// draw segment frames of the video\n\t\tvar context = item.getContext(\"2d\");\n\t\tcontext.drawImage(segment.startFrame.image, 10, 10, 150, 150);\n\t\tcontext.drawImage(segment.endFrame.image, 170, 10, 150, 150);\n\t\t\n\t\t// draw timecode as text\n\t\tcontext.font = \"20px Arial\";\n\t\tcontext.fillStyle = 'Black';\n\t\tcontext.fillText(segment.startFrame.asText() + ' - ' + segment.endFrame.asText(), 10, 190);\n\t\t\n\t\tvar div = document.createElement('div');\n\t\tdiv.className = 'element';\n\t\tdiv.setAttribute('data-start', segment.startFrame.second);\n\t\tdiv.setAttribute('data-end', segment.endFrame.second);\n\t\tdiv.id = 'div' + segment.id;\n\t\t\n\t\t// logic for button showing the up arrow\n\t\tvar up_arrow = document.createElement('button');\n\t\tup_arrow.type = 'button';\n\t\tup_arrow.innerHTML = '&uarr;'\n\t\tup_arrow.setAttribute('data-id', segment.id);\n\t\tvar index = segments.indexOf(segment);\n\t\tup_arrow.disabled = index == 0;\n\t\tup_arrow.addEventListener('click', \n\t\tfunction() {\n\t\t\tvar segment_id = this.getAttribute('data-id');\n\t\t\tvar se = getSegmentById(segment_id);\n\t\t\tvar index_se = segments.indexOf(se);\n\t\t\tif (index_se <= 0) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tswapSegments(index_se, index_se - 1);\n\t\t\trepaintSegments();\n\t\t},\n\t\tfalse);\n\t\t\n\t\t// logic for button showing the down arrow\n\t\tvar down_arrow = document.createElement('button');\n\t\tdown_arrow.type = 'button';\n\t\tdown_arrow.innerHTML = '&darr;'\n\t\tdown_arrow.setAttribute('data-id', segment.id);\n\t\tdown_arrow.disabled = index == segments.length - 1;\n\t\tdown_arrow.addEventListener('click', \n\t\tfunction() {\n\t\t\tvar segment_id = this.getAttribute('data-id');\n\t\t\tvar se = getSegmentById(segment_id);\n\t\t\tvar index_se = segments.indexOf(se);\n\t\t\tif (index_se >= segments.length - 1) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tswapSegments(index_se, index_se + 1);\n\t\t\trepaintSegments();\n\t\t},\n\t\tfalse);\n\t\t\n\t\t// logic for remove button -> removes a segment\n\t\tvar remove = document.createElement('button');\n\t\tremove.type = 'button';\n\t\tremove.innerHTML = '-';\n\t\tremove.setAttribute('data-id', segment.id);\n\t\tremove.style.color = 'red',\n\t\tremove.addEventListener('click', \n\t\tfunction() {\n\t\t\tvar segment_id = this.getAttribute('data-id');\n\t\t\tvar se = getSegmentById(segment_id);\n\t\t\tvar index_se = segments.indexOf(se);\n\t\t\t// Find and remove item from an array\n\t\t\tif(index_se >= 0 && index_se < segments.length) {\n\t\t\t\tsegments.splice(index_se, 1);\n\t\t\t\tavailable_ids.push(se.id);\n\t\t\t\tremoveSegment(se);\n\t\t\t\trepaintSegments();\n\t\t\t}\n\t\t},\n\t\tfalse);\n\t\t\n\t\tdiv.appendChild(item);\n\t\tdiv.appendChild(input);\n\t\tdiv.appendChild(up_arrow);\n\t\tdiv.appendChild(down_arrow);\n\t\tdiv.appendChild(remove);\n\t\t\n\t\t// add the new segment div to the list of div objects\n\t\tcontainer.appendChild(div);\n\t}", "function insertSeparatorSegments (segments) {\n // first, let's define what is a lane that will likely need adajcent striping?\n function isLaneIsh (typeString) {\n return (typeString.slice(typeString.length - 4) == 'lane' || typeString == 'light-rail' || typeString == 'streetcar');\n }\n\n // then let's go through the segments array and build a new one with inserted separators\n const newValues = segments.reduce((newArray, currentValue, currentIndex, arr) => {\n // don't insert a lane marker before the first segment\n if (currentIndex == 0) { return newArray.concat(currentValue); }\n\n const previousValue = arr[currentIndex - 1];\n\n // if both adjacent lanes are \"laneish\"\n if (isLaneIsh(currentValue.type) && isLaneIsh(previousValue.type)) {\n // if in doubt start with a solid line\n var variantString = 'solid';\n\n // if adjacent lane types are identical, then used dashed lines\n if (currentValue.type == previousValue.type) { variantString = 'dashed'; }\n\n // Or, if either is a drive lane or turn lane then use dashed\n // Using dash vs solid for turn lanes along approach to intersections may need to be user defined\n if ((currentValue.type == 'drive-lane' && previousValue.type == 'turn-lane') || (previousValue.type == 'drive-lane' && currentValue.type == 'turn-lane')) { variantString = 'dashed'; }\n\n // if adjacent segments in opposite directions then use double yellow\n if (currentValue.variantString.split('|')[0] !== previousValue.variantString.split('|')[0]) {\n variantString = 'doubleyellow';\n // if adjacenet segments are both bike lanes, then use yellow short dash\n if (currentValue.type == 'bike-lane' && previousValue.type == 'bike-lane') {\n variantString = 'shortdashedyellow';\n }\n }\n\n // special case -- if either lanes are turn lane shared, then use solid and long dash\n if (currentValue.type == 'turn-lane' && currentValue.variantString.split('|')[1] == 'shared') {\n variantString = 'soliddashedyellow';\n } else if (previousValue.type == 'turn-lane' && previousValue.variantString.split('|')[1] == 'shared') {\n variantString = 'soliddashedyellowinverted';\n }\n\n newArray.push({ type: 'separator', variantString: variantString, width: 0 });\n }\n\n // if a *lane segment and divider are adjacent, use a solid separator\n if ((isLaneIsh(currentValue.type) && previousValue.type == 'divider') || (isLaneIsh(previousValue.type) && currentValue.type == 'divider')) {\n newArray.push({ type: 'separator', variantString: 'solid', width: 0 });\n }\n\n newArray.push(currentValue);\n return newArray;\n }, []);\n\n // console.log('newValues =', newValues)\n // console.log(segments);\n\n return newValues;\n}", "function lastY() { return (segments.length == 0) ? 0 : segments[segments.length-1].p2.w.y; }", "function computeSlotSegCollisions(seg, otherSegs, results) {\n if (results === void 0) {\n results = [];\n }\n\n for (var i = 0; i < otherSegs.length; i++) {\n if (isSlotSegCollision(seg, otherSegs[i])) {\n results.push(otherSegs[i]);\n }\n }\n\n return results;\n } // Do these segments occupy the same vertical space?", "function segment(x, y, a) { //left arm\r\n translate(x, y);\r\n rotate(a);\r\n line(0, 0, segLength, 0);\r\n }", "function getRange() {\n\t if (__.nullValueSeparator == 'bottom') {\n\t return [h() + 1 - __.nullValueSeparatorPadding.bottom - __.nullValueSeparatorPadding.top, 1];\n\t } else if (__.nullValueSeparator == 'top') {\n\t return [h() + 1, 1 + __.nullValueSeparatorPadding.bottom + __.nullValueSeparatorPadding.top];\n\t }\n\t return [h() + 1, 1];\n\t }", "function segments(x, y, rx, ry, large, sweep, rotateX, ox, oy) {\n var key = join.call(arguments);\n if (segmentCache[key]) {\n return segmentCache[key];\n }\n\n var th = rotateX * (Math.PI/180);\n var sin_th = Math.sin(th);\n var cos_th = Math.cos(th);\n rx = Math.abs(rx);\n ry = Math.abs(ry);\n var px = cos_th * (ox - x) * 0.5 + sin_th * (oy - y) * 0.5;\n var py = cos_th * (oy - y) * 0.5 - sin_th * (ox - x) * 0.5;\n var pl = (px*px) / (rx*rx) + (py*py) / (ry*ry);\n if (pl > 1) {\n pl = Math.sqrt(pl);\n rx *= pl;\n ry *= pl;\n }\n\n var a00 = cos_th / rx;\n var a01 = sin_th / rx;\n var a10 = (-sin_th) / ry;\n var a11 = (cos_th) / ry;\n var x0 = a00 * ox + a01 * oy;\n var y0 = a10 * ox + a11 * oy;\n var x1 = a00 * x + a01 * y;\n var y1 = a10 * x + a11 * y;\n\n var d = (x1-x0) * (x1-x0) + (y1-y0) * (y1-y0);\n var sfactor_sq = 1 / d - 0.25;\n if (sfactor_sq < 0) sfactor_sq = 0;\n var sfactor = Math.sqrt(sfactor_sq);\n if (sweep == large) sfactor = -sfactor;\n var xc = 0.5 * (x0 + x1) - sfactor * (y1-y0);\n var yc = 0.5 * (y0 + y1) + sfactor * (x1-x0);\n\n var th0 = Math.atan2(y0-yc, x0-xc);\n var th1 = Math.atan2(y1-yc, x1-xc);\n\n var th_arc = th1-th0;\n if (th_arc < 0 && sweep === 1) {\n th_arc += 2 * Math.PI;\n } else if (th_arc > 0 && sweep === 0) {\n th_arc -= 2 * Math.PI;\n }\n\n var segs = Math.ceil(Math.abs(th_arc / (Math.PI * 0.5 + 0.001)));\n var result = [];\n for (var i=0; i<segs; ++i) {\n var th2 = th0 + i * th_arc / segs;\n var th3 = th0 + (i+1) * th_arc / segs;\n result[i] = [xc, yc, th2, th3, rx, ry, sin_th, cos_th];\n }\n\n return (segmentCache[key] = result);\n }", "constructor(num_circle_segments, num_vertical_lines, color, radius_top, radius_bottom,\n include_top_circle, include_bottom_circle) {\n super();\n\n this.num_circle_segments = num_circle_segments;\n this.num_vertical_lines = num_vertical_lines;\n this.radius_top = radius_top;\n this.radius_bottom = radius_bottom;\n this.include_top_circle = include_top_circle;\n this.include_bottom_circle = include_bottom_circle;\n this.geometry = new BufferGeometry();\n this.material = new LineBasicMaterial({color: color});\n this.vertices = [\n new Vector3(0, .5, 0),\n new Vector3(0, -.5, 0)\n ];\n this.indices = []; // Which vertex is connected to which.\n\n /* Init circle indices, fill vertices array. */\n if (this.include_top_circle) {\n for (let i = 0; i < num_circle_segments; i++) {\n this.vertices.push(new Vector3(0, 0, 0));\n // Offset of two for top and bottom center vectors.\n this.indices.push(\n i + 2,\n (i + 1) % num_circle_segments + 2\n );\n }\n }\n if (this.include_bottom_circle) {\n for (let i = 0; i < num_circle_segments; i++) {\n this.vertices.push(new Vector3(0, 0, 0));\n let offset = this.include_top_circle ? num_circle_segments + 2: 2;\n this.indices.push(\n i + offset,\n (i + 1) % num_circle_segments + offset\n );\n }\n }\n\n /* Init lines connecting the two (potential) circles. */\n let index_offset = 2;\n index_offset += this.include_top_circle ? this.num_circle_segments : 0;\n index_offset += this.include_bottom_circle ? this.num_circle_segments : 0;\n for (let i = 0; i < this.num_vertical_lines; i++) {\n this.vertices.push(new Vector3(0, 0, 0));\n this.vertices.push(new Vector3(0, 0, 0));\n this.indices.push(\n 2 * i + index_offset,\n 2 * i + index_offset + 1\n );\n }\n\n this.vertex_positions = new Float32Array(this.vertices.length * 3);\n this.geometry.setIndex(new BufferAttribute(new Uint16Array(this.indices), 1));\n this.geometry.addAttribute(\"position\", new BufferAttribute(this.vertex_positions, 3));\n this.mesh = new LineSegments(this.geometry, this.material);\n this.add(this.mesh);\n\n this.update_cylinder();\n }", "function computeSlotSegCollisions(seg, otherSegs, results) {\n if (results === void 0) {\n results = [];\n }\n\n for (var i = 0; i < otherSegs.length; i++) {\n if (isSlotSegCollision(seg, otherSegs[i])) {\n results.push(otherSegs[i]);\n }\n }\n\n return results;\n } // Do these segments occupy the same vertical space?", "function Segment(props) {\n var attached = props.attached,\n basic = props.basic,\n children = props.children,\n circular = props.circular,\n className = props.className,\n clearing = props.clearing,\n color = props.color,\n compact = props.compact,\n content = props.content,\n disabled = props.disabled,\n floated = props.floated,\n inverted = props.inverted,\n loading = props.loading,\n placeholder = props.placeholder,\n padded = props.padded,\n piled = props.piled,\n raised = props.raised,\n secondary = props.secondary,\n size = props.size,\n stacked = props.stacked,\n tertiary = props.tertiary,\n textAlign = props.textAlign,\n vertical = props.vertical;\n var classes = Object(clsx__WEBPACK_IMPORTED_MODULE_2__[\"default\"])('ui', color, size, Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(basic, 'basic'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(circular, 'circular'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(clearing, 'clearing'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(compact, 'compact'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(disabled, 'disabled'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(inverted, 'inverted'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(loading, 'loading'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(placeholder, 'placeholder'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(piled, 'piled'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(raised, 'raised'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(secondary, 'secondary'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(stacked, 'stacked'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(tertiary, 'tertiary'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(vertical, 'vertical'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOrValueAndKey\"])(attached, 'attached'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOrValueAndKey\"])(padded, 'padded'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useTextAlignProp\"])(textAlign), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useValueAndKey\"])(floated, 'floated'), 'segment', className);\n var rest = Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"getUnhandledProps\"])(Segment, props);\n var ElementType = Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"getElementType\"])(Segment, props);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement(ElementType, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, rest, {\n className: classes\n }), _lib__WEBPACK_IMPORTED_MODULE_5__[\"childrenUtils\"].isNil(children) ? content : children);\n}", "function drawSegmentsOverLine(start, end, totalPts) {\n\n var percIncrement = 1 / (totalPts - 1);\n var drawPerc = 0;\n var pt;\n for (var i = 0; i < totalPts; i++) {\n drawPerc = percIncrement * i;\n pt = midpoint(start.x, start.y, end.x, end.y, drawPerc);\n circle(pt.x, pt.y);\n }\n\n }", "function segmentNew(start, end){\n\t\treturn {\n\t\t\tid: buildLog ? buildLog.segmentId() : -1,\n\t\t\tstart: start,\n\t\t\tend: end,\n\t\t\tmyFill: {\n\t\t\t\tabove: null, // is there fill above us?\n\t\t\t\tbelow: null // is there fill below us?\n\t\t\t},\n\t\t\totherFill: null\n\t\t};\n\t}", "function Segments(props) {\n var value = props.value,\n children = props.children,\n name = props.name,\n size = props.size,\n onChange = props.onChange,\n className = props.className;\n var classes = (0,_node_modules_classnames_index_js__WEBPACK_IMPORTED_MODULE_2__.default)('kt-segments', className);\n var contextValue = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {\n return {\n value: value,\n name: name,\n onChange: onChange,\n size: size\n };\n }, [value, name, onChange, size]);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_context_js__WEBPACK_IMPORTED_MODULE_3__.SegmentsContext.Provider, {\n value: contextValue\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"div\", {\n className: classes\n }, children));\n}", "function computeSlotSegPressures(seg) {\n var forwardSegs = seg.forwardSegs;\n var forwardPressure = 0;\n var i;\n var forwardSeg;\n\n if (seg.forwardPressure === undefined) {\n // not already computed\n for (i = 0; i < forwardSegs.length; i++) {\n forwardSeg = forwardSegs[i]; // figure out the child's maximum forward path\n\n computeSlotSegPressures(forwardSeg); // either use the existing maximum, or use the child's forward pressure\n // plus one (for the forwardSeg itself)\n\n forwardPressure = Math.max(forwardPressure, 1 + forwardSeg.forwardPressure);\n }\n\n seg.forwardPressure = forwardPressure;\n }\n } // Find all the segments in `otherSegs` that vertically collide with `seg`.", "function isSlotSegCollision(seg1, seg2) {\n\treturn seg1.bottom > seg2.top && seg1.top < seg2.bottom;\n}", "function isSlotSegCollision(seg1, seg2) {\n\treturn seg1.bottom > seg2.top && seg1.top < seg2.bottom;\n}", "function isSlotSegCollision(seg1, seg2) {\n\treturn seg1.bottom > seg2.top && seg1.top < seg2.bottom;\n}", "function isSlotSegCollision(seg1, seg2) {\n\treturn seg1.bottom > seg2.top && seg1.top < seg2.bottom;\n}" ]
[ "0.64230865", "0.6271409", "0.61475646", "0.6019541", "0.5960251", "0.5878266", "0.58621514", "0.58603257", "0.5844158", "0.58419555", "0.58341056", "0.583265", "0.5799967", "0.57981145", "0.5783428", "0.57212204", "0.57212204", "0.5703831", "0.5703831", "0.5703831", "0.56836224", "0.56800264", "0.567464", "0.5629415", "0.56186414", "0.5601669", "0.55928975", "0.55587643", "0.5549394", "0.54499215", "0.54481137", "0.54447955", "0.5442535", "0.5429355", "0.54216635", "0.54203284", "0.5415096", "0.5405842", "0.5403285", "0.5383402", "0.5372569", "0.5372569", "0.5372569", "0.5372569", "0.53690743", "0.5348489", "0.5342585", "0.5341969", "0.5341678", "0.5331651", "0.53292227", "0.52885616", "0.5283437", "0.5280026", "0.5253979", "0.52506155", "0.52451015", "0.5242053", "0.52373976", "0.523517", "0.523517", "0.523517", "0.5226143", "0.5224921", "0.52204704", "0.521271", "0.52104723", "0.5210447", "0.5210447", "0.5205115", "0.5204309", "0.519833", "0.519833", "0.51939726", "0.51939726", "0.51939726", "0.51939726", "0.51939726", "0.51904565", "0.51884454", "0.51880556", "0.51837915", "0.51827943", "0.51700056", "0.51645064", "0.5160871", "0.51592976", "0.51535195", "0.5153436", "0.5149648", "0.51467055", "0.5144172", "0.51401985", "0.5136391", "0.51311696", "0.51249945", "0.51179135", "0.5106068", "0.5106068", "0.5106068", "0.5106068" ]
0.0
-1
MODAL PLUGIN DEFINITION =======================
function Plugin(option, _relatedTarget) { return this.each(function () { var $this = $(this) var data = $this.data('bs.modal') var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option) if (!data) $this.data('bs.modal', (data = new Modal(this, options))) if (typeof option == 'string') data[option](_relatedTarget) else if (options.show) data.show(_relatedTarget) }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Plugin(option,_relatedTarget){return this.each(function(){var $this=$(this);var data=$this.data('bs.modal');var options=$.extend({},Modal.DEFAULTS,$this.data(),(typeof option==='undefined'?'undefined':_typeof(option))=='object'&&option);if(!data)$this.data('bs.modal',data=new Modal(this,options));if(typeof option=='string')data[option](_relatedTarget);else if(options.show)data.show(_relatedTarget);});}", "function Plugin(option,_relatedTarget){return this.each(function(){var $this=$(this);var data=$this.data('bs.modal');var options=$.extend({},Modal.DEFAULTS,$this.data(),(typeof option===\"undefined\"?\"undefined\":_typeof2(option))=='object'&&option);if(!data)$this.data('bs.modal',data=new Modal(this,options));if(typeof option=='string')data[option](_relatedTarget);else if(options.show)data.show(_relatedTarget);});}", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, SIAModal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new SIAModal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.modal')\n\t var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\t\n\t if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n\t if (typeof option == 'string') data[option](_relatedTarget)\n\t else if (options.show) data.show(_relatedTarget)\n\t })\n\t }", "function Plugin(option, _relatedTarget) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.modal')\n\t var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\t\n\t if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n\t if (typeof option == 'string') data[option](_relatedTarget)\n\t else if (options.show) data.show(_relatedTarget)\n\t })\n\t }", "function Plugin(option, _relatedTarget) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.modal')\n\t var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\t\n\t if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n\t if (typeof option == 'string') data[option](_relatedTarget)\n\t else if (options.show) data.show(_relatedTarget)\n\t })\n\t }", "function Plugin(option, _relatedTarget) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.modal')\n\t var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\t\n\t if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n\t if (typeof option == 'string') data[option](_relatedTarget)\n\t else if (options.show) data.show(_relatedTarget)\n\t })\n\t }", "function Plugin(option, _relatedTarget) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.modal')\n\t var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\t\n\t if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n\t if (typeof option == 'string') data[option](_relatedTarget)\n\t else if (options.show) data.show(_relatedTarget)\n\t })\n\t }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.modal')\n\t var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n\t if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n\t if (typeof option == 'string') data[option](_relatedTarget)\n\t else if (options.show) data.show(_relatedTarget)\n\t })\n\t }", "function Plugin(option, _relatedTarget) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.modal')\n\t var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n\t if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n\t if (typeof option == 'string') data[option](_relatedTarget)\n\t else if (options.show) data.show(_relatedTarget)\n\t })\n\t }", "function Plugin(option, _relatedTarget) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.modal')\n\t var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n\t if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n\t if (typeof option == 'string') data[option](_relatedTarget)\n\t else if (options.show) data.show(_relatedTarget)\n\t })\n\t }", "function Plugin(option, _relatedTarget) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.modal')\n\t var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n\t if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n\t if (typeof option == 'string') data[option](_relatedTarget)\n\t else if (options.show) data.show(_relatedTarget)\n\t })\n\t }", "function Plugin(option, _relatedTarget) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.modal')\n\t var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n\t if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n\t if (typeof option == 'string') data[option](_relatedTarget)\n\t else if (options.show) data.show(_relatedTarget)\n\t })\n\t }", "function Plugin( option, _relatedTarget ) {\n return this.each( function() {\n var $this = $( this )\n var data = $this.data( 'bs.modal' )\n var options = $.extend( {}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option )\n if ( !data ) $this.data( 'bs.modal', ( data = new Modal( this, options ) ) )\n if ( typeof option == 'string' ) data[ option ]( _relatedTarget )\n else if ( options.show ) data.show( _relatedTarget )\n } )\n }", "function Plugin(option, _relatedTarget) {\n \treturn this.each(function () {\n \t\tvar $this = $(this)\n \t\tvar data = $this.data('bs.modal')\n \t\tvar options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n \t\tif (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n \t\t\tif (typeof option == 'string') data[option](_relatedTarget)\n \t\t\t\telse if (options.show) data.show(_relatedTarget)\n \t\t\t})\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }" ]
[ "0.7613195", "0.76106924", "0.70632553", "0.6971759", "0.6971759", "0.6971759", "0.6971759", "0.6971759", "0.696315", "0.6952324", "0.6952324", "0.6952324", "0.6952324", "0.6952324", "0.6940254", "0.6925037", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084", "0.68329084" ]
0.68679523
25
TAB PLUGIN DEFINITION =====================
function Plugin(option) { return this.each(function () { var $this = $(this) var data = $this.data('bs.tab') if (!data) $this.data('bs.tab', (data = new Tab(this))) if (typeof option == 'string') data[option]() }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Plugin(option){return this.each(function(){var $this=$(this);var data=$this.data('bs.tab');if(!data)$this.data('bs.tab',data=new Tab(this));if(typeof option=='string')data[option]();});}", "function Plugin(option){return this.each(function(){var $this=$(this);var data=$this.data('bs.tab');if(!data)$this.data('bs.tab',data=new Tab(this));if(typeof option=='string')data[option]();});}", "static get tag() {\n return \"a11y-tabs\";\n }", "static get tag() {\n return \"a11y-tab\";\n }", "applyTabsIA() {\n let $tabButtonItem = $('#tab-button li'),\n $tabSelect = $('#tab-select'),\n $tabContents = $('.tab-contents'),\n activeClass = 'is-active';\n\n $tabButtonItem.first().addClass(activeClass);\n $tabContents.not(':first').hide();\n\n $tabButtonItem.find('a').on('click', function(e) {\n let target = $(this).attr('href');\n $tabButtonItem.removeClass(activeClass);\n $(this).parent().addClass(activeClass);\n $tabSelect.val(target);\n $tabContents.hide();\n $(target).show();\n e.preventDefault();\n });\n\n $tabSelect.on('change', function() {\n let target = $(this).val(), targetSelectNum = $(this).prop('selectedIndex');\n $tabButtonItem.removeClass(activeClass);\n $tabButtonItem.eq(targetSelectNum).addClass(activeClass);\n $tabContents.hide();\n $(target).show();\n });\n }", "loadOneTab() { }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.tab')\n\t\n\t if (!data) $this.data('bs.tab', (data = new Tab(this)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.tab')\n\t\n\t if (!data) $this.data('bs.tab', (data = new Tab(this)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.tab')\n\t\n\t if (!data) $this.data('bs.tab', (data = new Tab(this)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.tab')\n\t\n\t if (!data) $this.data('bs.tab', (data = new Tab(this)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.tab')\n\n if (!data) $this.data('bs.tab', (data = new Tab(this)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.tab')\n\n\t if (!data) $this.data('bs.tab', (data = new Tab(this)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.tab')\n\n\t if (!data) $this.data('bs.tab', (data = new Tab(this)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.tab')\n\n\t if (!data) $this.data('bs.tab', (data = new Tab(this)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.tab')\n\n\t if (!data) $this.data('bs.tab', (data = new Tab(this)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.tab')\n\n\t if (!data) $this.data('bs.tab', (data = new Tab(this)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function initTabs() {\n jQuery(\".product-comparison-tabset\").tabset({\n tabLinks: \"a\",\n addToParent: !0,\n defaultTab: !0\n });\n}", "function tab() {\n let triggerTabList = [].slice.call(document.querySelectorAll('#nav-myProfile-tab, #nav-conundrum-tab'))\n triggerTabList.forEach(function (triggerEl) {\n var tabTrigger = new bootstrap.Tab(triggerEl)\n triggerEl.addEventListener('click', function (event) {\n event.preventDefault()\n tabTrigger.show()\n })\n })\n}", "setTabProperties() { }", "function Plugin( option ) {\n return this.each( function() {\n var $this = $( this )\n var data = $this.data( 'bs.tab' )\n if ( !data ) $this.data( 'bs.tab', ( data = new Tab( this ) ) )\n if ( typeof option == 'string' ) data[ option ]()\n } )\n }", "function pageTabs_helm_set(mode) {\n\n var defaultTab = \"\";\n\n if (mode === \"loanDetails\") {\n $(\"#RecentlyViewedTab_helm\").toggleClass(\"displayNone\", false);\n $(\"#LoanDetailsTab_helm\").toggleClass(\"displayNone\", false);\n $(\"#AuditTrackingTab_helm\").toggleClass(\"displayNone\", false);\n $(\"#AdvancedSearchTab_helm\").toggleClass(\"displayNone\", true);\n defaultTab = \"LoanDetailsTab_helm\";\n } else if (mode === \"search\") {\n $(\"#RecentlyViewedTab_helm\").toggleClass(\"displayNone\", false);\n $(\"#AdvancedSearchTab_helm\").toggleClass(\"displayNone\", false);\n $(\"#LoanDetailsTab_helm\").toggleClass(\"displayNone\", true);\n $(\"#AuditTrackingTab_helm\").toggleClass(\"displayNone\", true);\n defaultTab = \"AdvancedSearchTab_helm\";\n }\n else if (mode === \"recentlyViewedMinimized\") {\n //only show recently viewed tab and disable the tab selected appearance and give it a neutral look.\n $(\"#RecentlyViewedTab_helm\").toggleClass(\"displayNone\", false).toggleClass(\"ui-state-active\", false);\n $(\"#AdvancedSearchTab_helm\").toggleClass(\"displayNone\", true);\n $(\"#LoanDetailsTab_helm\").toggleClass(\"displayNone\", true);\n $(\"#AuditTrackingTab_helm\").toggleClass(\"displayNone\", true);\n }\n helm.ActiveTabId = defaultTab; //store the active tab in js property that will be accessible to other functions\n\n var $helmTabs = $(\"#Tabs_helm\");\n $helmTabs.tabs({\n // //active: Compass.Utils.jQueryTabs_GetTabIndex(defaultTab, \"Tabs_helm\"), //Activate Loan Details Tab\n // //beforeActivate: optimizeIE7Rendering,\n activate: jQueryTabs_TabSelect\n });\n\n //set active jquery page tab to helm default tab.\n var activeTabIndex = Compass.Utils.jQueryTabs_GetTabIndex(defaultTab, \"Tabs_helm\");\n $helmTabs.tabs({ active: activeTabIndex });\n $(\"#Tabs_HtmlList_helm\").toggleClass(\"displayNone\", false);\n \n // All Tab Content Area Div's had to be hidden initially otherwise\n // the screen would jumble around during rendering until the jquery \n // page tabs could be intialized. Unhide the tab content with this next line of code.\n $(\".jqPageTabsContent_helm\").toggleClass(\"displayNone\", false);\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.tab')\n if (!data) $this.data('bs.tab', (data = new Tab(this)))\n if (typeof option == 'string') data[option]()\n })\n }", "function IMcTabsConfig() { }", "function activaTab(tab){\n $('.nav-tabs-chart-selector a[href=\"#' + tab + '\"]').tab('show');\n }", "function Plugin(option) {\r\n return this.each(function () {\r\n var $this = $(this)\r\n var data = $this.data('bs.tab')\r\n\r\n if (!data) $this.data('bs.tab', (data = new Tab(this)))\r\n if (typeof option == 'string') data[option]()\r\n })\r\n }", "function Plugin(option) {\r\n return this.each(function () {\r\n var $this = $(this)\r\n var data = $this.data('bs.tab')\r\n\r\n if (!data) $this.data('bs.tab', (data = new Tab(this)))\r\n if (typeof option == 'string') data[option]()\r\n })\r\n }", "function Plugin(option) {\r\n return this.each(function () {\r\n var $this = $(this)\r\n var data = $this.data('bs.tab')\r\n\r\n if (!data) $this.data('bs.tab', (data = new Tab(this)))\r\n if (typeof option == 'string') data[option]()\r\n })\r\n }", "function Plugin(option) {\r\n return this.each(function () {\r\n var $this = $(this)\r\n var data = $this.data('bs.tab')\r\n\r\n if (!data) $this.data('bs.tab', (data = new Tab(this)))\r\n if (typeof option == 'string') data[option]()\r\n })\r\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.tab')\n\n if (!data) $this.data('bs.tab', (data = new Tab(this)))\n if (typeof option == 'string') data[option]()\n })\n }" ]
[ "0.74222374", "0.74222374", "0.692559", "0.68413377", "0.68389773", "0.68262935", "0.667987", "0.667987", "0.667987", "0.667987", "0.66649354", "0.6643321", "0.6643321", "0.6643321", "0.6643321", "0.6643321", "0.66032135", "0.6584301", "0.65660053", "0.6557222", "0.65411276", "0.6498504", "0.6487234", "0.64832765", "0.64766484", "0.64766484", "0.64766484", "0.64766484", "0.64759886" ]
0.0
-1
TOOLTIP PLUGIN DEFINITION =========================
function Plugin(option) { return this.each(function () { var $this = $(this) var data = $this.data('bs.tooltip') var options = typeof option == 'object' && option if (!data && /destroy|hide/.test(option)) return if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options))) if (typeof option == 'string') data[option]() }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_addTooltips() {\n $(this.el.querySelectorAll('[title]')).tooltip({\n delay: { show: 500, hide: 0 }\n });\n }", "function initInstanceInfoTooltip() {\n jQuery('#instance-tooltip').tooltip();\n}", "get tooltip() {}", "function tooltips() {\r\n\t$('.tooltip-link').tooltip();\r\n}", "function zoto_widget_tips(options) {\n\tthis.$uber(options);\n\tthis.type = 'zoto_widget_tips';\n\tthis.set_title('quick tips');\n}", "function bindTooltip(){\n bindTooltipSkin(\".b-tooltip, .b-panel-icons-item a,.b-tool, .b-image-nav, .b-help, .b-title\",\"qtip-light\");\n }", "applyTooltips() {\n tippy(\".tipped\", {\n arrow: true,\n animateFill: false,\n size: \"small\",\n maxWidth: 200,\n interactiveBorder: 8\n });\n }", "function SetupPlayerTooltip(){\n // http://qtip2.com/\n $('.icon').each(function() {\n $(this).qtip({\n content: {\n text: function (event, api) {\n $.ajax({\n url: '/players/tooltip/' + $(this).data('type') + '/' + $(this).data('id')\n })\n .then(function(content) {\n // Set the tooltip content upon successful retrieval\n api.set('content.text', content);\n }, function(xhr, status, error) {\n // Upon failure... set the tooltip content to error\n api.set('content.text', status + ': ' + error);\n });\n return '';\n }\n },\n position: { my: 'lefttop', at: 'rightmiddle' },\n style: { classes: 'playerTooltip' }\n });\n });\n}", "function initToolTips() {\n $(\"[title]:not([data-hasqtip])\").each(function() {\n var $this = $(this);\n $this.qtip({\n style: {\n classes: 'qtip-bootstrap',\n },\n position: {\n my: 'top center', // Position my top left...\n at: 'bottom center', // at the bottom right of...\n target: $this, // my target,\n viewport: $(window)\n },\n events: {\n render: function(event, api) {\n // Extract the title translation ID\n var transIDs = $this.data('i18n').split(';');\n var titleTransID = transIDs[0].split(']')[1];\n\n // Remove the translation data-i18ns for title (but not text node)\n if (transIDs.length === 1) {\n $this.removeAttr('data-i18n'); // Only had title, delete it\n } else if (transIDs.length === 2) {\n $this.attr('data-i18n', transIDs[1]); // Set to the main text ID\n }\n\n // Chuck the new title trans ID (without the [title]) onto the tooltip\n api.elements.content.attr('data-i18n', titleTransID);\n }\n }\n });\n });\n}", "set tooltip(value) {}", "addHighlighTooltip () {\n }", "function ShowHelp() {\n $('img').tooltip('show');\n}", "getTooltip(){return this.__tooltip}", "function ShowHelp() {\n $('img').tooltip('show');\n coursePlayer.pause();\n}", "function init() { \n \n posHTML.setDragnDrop()\n \n //Tooltip\n $(\"a\").tooltip('show')\n $('a').tooltip({html: true}) \n $(\"a\").tooltip('hide') \n}", "tooltipClicked() {}", "function Plugin(option){return this.each(function(){var $this=$(this);var data=$this.data('bs.tooltip');var options=(typeof option==='undefined'?'undefined':_typeof(option))=='object'&&option;if(!data&&/destroy|hide/.test(option))return;if(!data)$this.data('bs.tooltip',data=new Tooltip(this,options));if(typeof option=='string')data[option]();});}", "function tooltip(e,t,title) {\r\n\t\t$('<div id=\"tooltip\" />')\r\n .appendTo('body')\r\n .text(title)\r\n .hide()\r\n .css({\r\n backgroundImage : 'url(./assets/images/skins/'+settings.skin+'/'+settings.skin+'_controlpanel.png)',\r\n\t\t\tbackgroundPosition : 'top left',\r\n\t\t\tbackgroundRepeat : 'repeat-x',\r\n\t\t\tcolor : settings.label,\r\n\t\t\tborder: '1px solid ' + settings.label,\r\n\t\t\ttop: e.pageY - 20,\r\n left: e.pageX + 20\r\n })\r\n .fadeIn(350);\r\n\t\t\r\n\t\tt.mousemove(function(e) {\r\n\t\t $('#tooltip').css({\r\n\t\t\ttop: e.pageY - 20,\r\n\t\t\tleft: e.pageX + 20\r\n\t\t });\r\n\t\t});\r\n\t }", "function Tip() {\n tt_Tip(arguments, null);\n}", "function TipMenu()\n{\n\tm_tt_Tip(arguments, null);\n}", "function Plugin(option){return this.each(function(){var $this=$(this);var data=$this.data('bs.tooltip');var options=(typeof option===\"undefined\"?\"undefined\":_typeof2(option))=='object'&&option;if(!data&&/destroy|hide/.test(option))return;if(!data)$this.data('bs.tooltip',data=new Tooltip(this,options));if(typeof option=='string')data[option]();});}", "function doTooltip(e, msg) {\nif ( typeof Tooltip == \"undefined\" || !Tooltip.ready ) return;\nTooltip.show(e, msg);\n}", "function showHelpTooltip() {\n $('#tooltip_help').show();\n}", "function titleTooltip(elem){\n $(elem).hover(function(){\n /// Hover over code\n var title = $(this).attr('title');\n $(this).data('tipText', title).removeAttr('title');\n $('<p class=\"jtt\"></p>')\n .text(title)\n .appendTo('body')\n .fadeIn('slow');\n }, function() {\n /// Hover out code\n $(this).attr('title', $(this).data('tipText'));\n $('.jtt').remove();\n }).mousemove(function(e) {\n var mousex = e.pageX + 20; /// Get X coordinates\n var mousey = e.pageY + 10; /// Get Y coordinates\n $('.jtt').css({ top: mousey, left: mousex })\n });\n}", "function enableTooltip() {\n $('[v-tooltip]').tooltip({trigger: \"hover\", 'delay': {show: 1000, hide: 100}});\n}", "function init() {\n setUpToolTip();\n}", "function toolTip() {\n $('[data-toggle=\"tooltip\"]').tooltip();\n}", "function updateTooltips() {\n jQuery('.tooltip').tooltip({showURL: false });\n}", "_init() {\n var elemId = this.$element.attr('aria-describedby') || Foundation.GetYoDigits(6, 'tooltip');\n\n this.options.positionClass = this.options.positionClass || this._getPositionClass(this.$element);\n this.options.tipText = this.options.tipText || this.$element.attr('title');\n this.template = this.options.template ? $(this.options.template) : this._buildTemplate(elemId);\n\n if (this.options.allowHtml) {\n this.template.appendTo(document.body)\n .html(this.options.tipText)\n .hide();\n } else {\n this.template.appendTo(document.body)\n .text(this.options.tipText)\n .hide();\n }\n\n this.$element.attr({\n 'title': '',\n 'aria-describedby': elemId,\n 'data-yeti-box': elemId,\n 'data-toggle': elemId,\n 'data-resize': elemId\n }).addClass(this.options.triggerClass);\n\n //helper variables to track movement on collisions\n this.usedPositions = [];\n this.counter = 4;\n this.classChanged = false;\n\n this._events();\n }", "showToolTip_(event) {\n this.updateToolTip_(event);\n }", "toggleTooltips() {\n self.enableTooltips = !self.enableTooltips;\n }", "function tooltip(){\n $(\".waypoints-header\").tooltip({\n position: {\n my: \"center\", \n at: \"bottom\", \n of: \"#waypoints\"\n },\n show: {\n effect: \"slideDown\",\n delay: 1\n }, \n });\n}", "function initializeTooltips() {\n // Download document link\n $('.download-document').tooltip({\n 'show': true,\n 'placement': 'top',\n 'title': \"Download the document\"\n });\n\n // Delete document link\n $('.delete-document').tooltip({\n 'show': true,\n 'placement': 'top',\n 'title': \"Delete the document\"\n });\n\n // Upload document link\n $('.upload-document').tooltip({\n 'show': true,\n 'placement': 'top',\n 'title': \"Upload document\"\n });\n\n // Create new folder link\n $('.create-folder').tooltip({\n 'show': true,\n 'placement': 'top',\n 'title': \"Create new folder\"\n });\n}", "function ToolTips(){\n\tif(PlayerPrefs.GetInt(\"ToolTips\")==0){\n\t\tPlayerPrefs.SetInt(\"ToolTips\",1);\n\t\ttooltipstext.GetComponent (Text).text = \"on\";\n\t}\n\telse if(PlayerPrefs.GetInt(\"ToolTips\")==1){\n\t\tPlayerPrefs.SetInt(\"ToolTips\",0);\n\t\ttooltipstext.GetComponent (Text).text = \"off\";\n\t}\n}", "function updateTips(t) {\n\t\ttips.text(t)\n\t}", "showTip(context) {\n const me = this;\n\n if (me.showTooltip) {\n me.clockTemplate = new ClockTemplate({\n scheduler: me.client\n });\n me.tip = new Tooltip({\n id: `${me.client.id}-time-range-tip`,\n cls: 'b-interaction-tooltip',\n align: 'b-t',\n autoShow: true,\n updateContentOnMouseMove: true,\n forElement: context.element,\n getHtml: () => me.getTipHtml(context.record, context.element)\n });\n }\n }", "function display_tip() {\n if (pause_on_tile === true) {\n g.paused = true;\n }\n\n show_description(g.progress); //description.js\n\n g.progress = g.progress + 1;\n}", "function toolTipInit() {\n\t\n\t\t$('.menu li a').tooltip({\n\t\t\tplacement: 'right'\n\t\t});\n\t}", "function createTooltip(position, elem, ttContent)\r\n{\r\n\tvar myPosition = \"center top+20\";\r\n\tvar atPosition = \"center bottom\";\r\n\tvar arrowClass = \"arrow\";\r\n\t\r\n\tif(position == \"bottom\")\r\n\t{\r\n\t\tmyPosition = \"center top+15\";\r\n\t\tatPosition = \"center bottom\";\r\n\t}\r\n\telse if(position == \"top\")\r\n\t{\r\n\t\tmyPosition = \"center bottom-15\";\r\n\t\tatPosition = \"center top\";\r\n\t}\r\n\telse if(position == \"left\")\r\n\t{\r\n\t\tmyPosition = \"right-15 center\";\r\n\t\tatPosition = \"left center\";\r\n\t\t\r\n\t\tarrowClass = \"arrowHor\";\r\n\t}\r\n\telse if(position == \"right\")\r\n\t{\r\n\t\tmyPosition = \"left+15 center\";\r\n\t\tatPosition = \"right center\";\r\n\t\t\r\n\t\tarrowClass = \"arrowHor\";\r\n\t}\r\n\t\r\n\telem.tooltip({\r\n\t\titems: elem.prop(\"tagName\"),\r\n\t\tcontent: ttContent,\r\n\t\tdelay: 5000,\r\n\t position: {\r\n\t\t my: myPosition,\r\n\t\t at: atPosition,\r\n\t\t /*\r\n\t\t using: function( position, feedback ) {\r\n\t\t $( this ).css( position );\r\n\t\t $( \"<div>\" )\r\n\t\t .addClass( arrowClass )\r\n\t\t .addClass( feedback.vertical )\r\n\t\t .addClass( feedback.horizontal )\r\n\t\t .appendTo( this );\r\n\t\t }\r\n\t\t */\r\n\t },\r\n\t\topen: function(event, ui) {\r\n\t\t\tvar tooltip = ui.tooltip;\r\n\t\t\tsetTimeout(function(tooltip){tooltip.hide();}, 4000, tooltip);\r\n\t\t}\r\n\t});\r\n}", "showTip(context) {\n const me = this;\n\n if (me.showTooltip) {\n me.clockTemplate = new ClockTemplate({\n timeAxisViewModel: me.client.timeAxisViewModel\n });\n\n me.tip = new Tooltip({\n cls: 'b-interaction-tooltip',\n align: 'b-t',\n autoShow: true,\n forElement: context.element,\n getHtml: () => me.getTipHtml(context.record, context.element)\n });\n }\n }", "function loadTooltips() {\n $('.hover-tooltip').tooltip({\n title: hoverGetData,\n html: true,\n container: 'body',\n placement: 'left',\n delay: {\n \"show\": 100,\n \"hide\": 1500\n }\n });\n}", "function init_tooltips(){\n \n $(\".tooltip-bot, .tooltip-bot a, .nav-social-links a\").tooltip({\n placement: \"bottom\"\n });\n \n $(\".tooltip-top, .tooltip-top a\").tooltip({\n placement: \"top\"\n });\n \n \n $(\".tooltip-right, .tooltip-right a\").tooltip({\n placement: \"right\"\n });\n \n \n $(\".tooltip-left, .tooltip-left a\").tooltip({\n placement: \"left\"\n });\n \n }", "function toolTips(el,help) {\n\t\t$(el).on('mouseenter', function() {\n\t\t\t$(help).show();\n\t\t\t$(el).on('click', function() {\n\t\t\t\t$(help).hide();\n\t\t\t});\n\t\t\t$(el).on('mouseleave', function() {\n\t\t\t\t$(help).hide();\n\t\t\t});\n\t\t});\n\t}", "function setupBootstrapTooltips() {\n\t$('[data-toggle=\"tooltip\"], .conceptPoint, #recommendSection .panel-heading, .btn-info').tooltip({\n\t\tcontainer: 'body',\n\t\thtml: true\n\t});\n}", "function SetupCompetitionTooltip(){\n\n // http://qtip2.com/\n $('.icon1').each(function() {\n $(this).qtip({\n content: {\n text: '<div class=\"tooltipText\">' + $(this).data(\"summary\") + '</div>'\n },\n position: { my: 'lefttop', at: 'rightmiddle' },\n style: { classes: 'playerTooltip' }\n });\n });\n}", "function tooltipInit() {\n $('[data-toggle=\"tooltip\"]').tooltip();\n}", "function load_tooltips() {\n $('[data-toggle=\"tooltip\"]').tooltip()\n}", "function mouseOverHelp(i) {\n return function() {\n target.innerHTML = helperTags[i].tooltip\n };\n }", "get tooltipTemplate() {\n return html`<simple-tooltip\n id=\"tooltip\"\n for=\"button\"\n ?hidden=\"${!this.currentTooltip && !this.currentLabel}\"\n position=\"${this.tooltipDirection || \"bottom\"}\"\n >${this.currentTooltip || this.currentLabel}</simple-tooltip\n >`;\n }", "function init_tooltips(){\n\n $(\".tooltip-bot, .tooltip-bot a, .nav-social-links a\").tooltip({\n placement: \"bottom\"\n });\n\n $(\".tooltip-top, .tooltip-top a\").tooltip({\n placement: \"top\"\n });\n\n }", "function enableToolTipForHeader(){\r\n\t$('#merchantUpload').tooltip({title: \"Upload new set of images for an application.\", animation: true,placement: \"auto\"});\r\n\t$('[href=\"/search\"]').tooltip({title: \"Search existing or previously uploaded application from the system.\", animation: true,placement: \"auto\"});\r\n\t$('[href=\"/followup\"]').tooltip({title: \"Search applications for document followup from Head office.\", animation: true,placement: \"auto\"});\r\n\t$('[href=\"/signup\"]').tooltip({title: \"Register new merchant promoter or staff in Online Submission Application.\", animation: true,placement: \"auto\"});\r\n\t$('[href=\"#logout\"]').tooltip({title: \"Logout to OSA-PH.\", animation: true,placement: \"auto\"});\r\n}", "function initTooltip() {\n angular.element(elem).tooltip({\n title: scope.bsTip,\n placement: scope.bsTipPlacement\n });\n }", "function tp(poTag, psSelector)\n{\n\n if(psSelector)\n {\n var sHTML = \"\"+$(psSelector).html();\n sHTML = sHTML.split('\"').join(\"'\");\n\n $(poTag).attr('title', sHTML);\n }\n\n\n $(poTag).tooltip(\n {content: function()\n {\n if(!$(this).attr('title'))\n $(this).attr('title', $(this).text());\n\n return $(this).attr('title');\n }\n }).blur().mouseenter();\n\n return true;\n}", "function e(t){var e,i;this.qTipTitle=null,this.qTipText=null,this.qTipInnerHTML=null,null!=(i=/^\\(tooltip: ?(.+)\\|(.+)(?=\\))\\)$/.exec(t.text()))&&3==i.length?(this.qTipTitle=i[1],this.qTipText=i[2],e=/^(.+)\\|/,this.qTipInnerHTML=(i[1]+\"|\"+i[2]).replace(e,\"\")):null!=(i=/^(.+)\\|(.+)$/.exec(t.text()))&&3==i.length?(this.qTipTitle=i[1],this.qTipText=i[2],e=/^(.+)\\|/,this.qTipInnerHTML=t.html().replace(e,\"\")):(this.qTipText=t.text(),this.qTipInnerHTML=t.html())}", "function show() {\n tID = null;\n let isBrowsable = false;\n if ($.tooltip.current !== null) {\n isBrowsable = settings($.tooltip.current).isBrowsable;\n }\n\n if ((!IE || !$.fn.bgiframe) && settings($.tooltip.current).fade) {\n if (helper.parent.is(':animated'))\n helper.parent\n .stop()\n .show()\n .fadeTo(settings($.tooltip.current).fade, 100);\n else\n helper.parent.is(':visible')\n ? helper.parent.fadeTo(\n settings($.tooltip.current).fade,\n 100\n )\n : helper.parent.fadeIn(settings($.tooltip.current).fade);\n } else {\n helper.parent.show();\n }\n\n $(helper.parent[0])\n .unbind('mouseenter')\n .unbind('mouseleave')\n .mouseenter(function () {\n if (isBrowsable) {\n $.tooltip.currentHover = true;\n }\n })\n .mouseleave(function () {\n if (isBrowsable) {\n // if tooltip has scrollable content or selectionnable text - should be closed on mouseleave:\n $.tooltip.currentHover = false;\n helper.parent.hide();\n }\n });\n\n update();\n }", "_createToolTip () {\n const tip = d3.tip().attr('id', 'ets-tip')\n .html((d) => { return this._getTipContent(d); })\n .direction((d) => { return this._setTipDirection(d); });\n\n\n return tip;\n }", "function tooltipFunctions() {\n $('[data-toggle=\"tooltip\"]').tooltip(); //needed for tooltip\n $('[data-toggle=\"popover\"]').popover();\n $('.tdPlaylistButton').mouseenter(function(){\n setTimeout(function(){\n $('.tdPlaylistButton').tooltip('hide');\n },1000);\n });\n $('.browseChannelButton').mouseenter(function () {\n setTimeout(function () {\n $('.browseChannelButton').tooltip('hide');\n }, 1000);\n });\n $('.lightBoxMode').mouseenter(function () {\n setTimeout(function () {\n $('.lightBoxMode').tooltip('hide');\n }, 1000);\n });\n $('.channelSearchButton').mouseenter(function () {\n setTimeout(function () {\n $('.channelSearchButton').tooltip('hide');\n }, 1000);\n });\n $('.videoSearchButton').mouseenter(function () {\n setTimeout(function () {\n $('.videoSearchButton').tooltip('hide');\n }, 1000);\n });\n $('#videoStats .fa-bar-chart').mouseenter(function () {\n setTimeout(function () {\n $('#videoStats .fa-bar-chart').tooltip('hide');\n }, 1000);\n });\n $('#channelInfo .fa-list-alt').mouseenter(function () {\n setTimeout(function () {\n $('#channelInfo .fa-list-alt').tooltip('hide');\n }, 1000);\n });\n $('.listDropButton').mouseenter(function(){\n setTimeout(function(){\n $('.listDropButton').tooltip('hide');\n },1000);\n });\n $('.lastVideoButton').mouseenter(function(){\n setTimeout(function(){\n $('.lastVideoButton').tooltip('hide');\n },1000);\n });\n $('.rewindButton').mouseenter(function(){\n setTimeout(function(){\n $('.rewindButton').tooltip('hide');\n },1000);\n });\n $('.fastForwardButton').mouseenter(function(){\n setTimeout(function(){\n $('.fastForwardButton').tooltip('hide');\n },1000);\n });\n $('.nextVideoButton').mouseenter(function(){\n setTimeout(function(){\n $('.nextVideoButton').tooltip('hide');\n },1000);\n });\n $('.playButton').mouseenter(function(){\n setTimeout(function(){\n $('.playButton').tooltip('hide');\n },1000);\n });\n $('.pauseButton').mouseenter(function(){\n setTimeout(function() {\n $('.pauseButton').tooltip('hide');\n }, 1000);\n });\n $('.listUpButton').mouseenter(function(){\n setTimeout(function(){\n $('.listUpButton').tooltip('hide');\n },1000);\n });\n}", "function ActivateTooltip() {\n // creates the tooltip to display the y point\n $(\"<div id='tooltip'></div>\").css({\n position: \"absolute\",\n display: \"none\",\n border: \"1px solid #fdd\",\n padding: \"2px\",\n \"background-color\": \"#fee\",\n opacity: 0.80\n }).appendTo(\"body\");\n // displays the tooltip on hover\n $(\"#placeholder\").bind(\"plothover\", function (event, pos, item) {\n if (item) {\n var x = item.datapoint[0].toFixed(2), y = item.datapoint[1].toFixed(2);\n $(\"#tooltip\").html(y)\n .css({ top: item.pageY + 5, left: item.pageX + 5 })\n .fadeIn(200);\n }\n else {\n $(\"#tooltip\").hide();\n }\n });\n }", "function addTooltips() {\n //Pick a random message\n var activeMsgId = Math.floor(Math.random() * (Object.keys(messages).length));\n $('.task-input').attr('data-position', 'bottom center');\n $('.task-input.task').attr('data-html', '<div class=\"input-tooltip\">' + messages[activeMsgId].task.line1 + '<br><i>' + messages[activeMsgId].task.line2 + '</i></div>');\n $('.task-input.section').attr('data-html', '<div class=\"input-tooltip\">' + messages[activeMsgId].section.line1 + '<br><i>' + messages[activeMsgId].section.line2 + '</i></div>');\n $('.task-input.tags').attr('data-html', '<div class=\"input-tooltip\">' + messages[activeMsgId].tags.line1 + '<br><i>' + messages[activeMsgId].tags.line2 + '</i></div>');\n $('.task-input.points').attr('data-html', '<div class=\"input-tooltip\">' + messages[activeMsgId].points.line1 + '<br><i>' + messages[activeMsgId].points.line2 + '</i></div>');\n $('.task-input').popup({\n preserve: true,\n delay: {show: 350}\n });\n}", "function SetupPlayerMatchTooltip(){\n\n // http://qtip2.com/\n $('.matchIcon').each(function() {\n $(this).qtip({\n content: {\n text: function (event, api) {\n $.ajax({\n url: '/players/tooltip/matches/' + $(this).attr('id')\n })\n .then(function(content) {\n // Set the tooltip content upon successful retrieval\n api.set('content.text', content);\n }, function(xhr, status, error) {\n // Upon failure... set the tooltip content to error\n api.set('content.text', status + ': ' + error);\n });\n return '';\n }\n },\n position: { my: 'rightMiddle', at: 'leftMiddle' },\n style: { classes: 'matchTooltip' }\n });\n });\n}", "function showHelpStrip() {\n // loadInputControls();\n helpTip = $(document).tooltip({ disabled: false });\n helpTip = $(document).tooltip({ track: true });\n}", "function toolTipInit() {\r\n\t\r\n\t\t$('.social-icon-top ul li a, ul.footer-social li a').tooltip({\r\n\t\t\tplacement: 'bottom'\r\n\t\t});\r\n\t}", "function toolTipHTML() {\n return \"100\";\n }", "function setTooltips()\r\n{\r\n $(function()\r\n {\r\n if ($(\".tooltip\").length > 0)\r\n {\r\n $(\".tooltip\").tooltip({showURL: false});\r\n }\r\n });\r\n}", "initTooltip() {\n const me = this,\n {\n client\n } = me;\n\n if (me.showTooltip) {\n if (me.tip) {\n me.tip.showBy(me.getTooltipTarget());\n } else {\n me.clockTemplate = new ClockTemplate({\n scheduler: client\n });\n me.tip = new Tooltip({\n id: `${client.id}-drag-create-tip`,\n autoShow: true,\n trackMouse: false,\n updateContentOnMouseMove: true,\n getHtml: me.getTipHtml.bind(me),\n align: client.isVertical ? 't-b' : 'b100-t100',\n hideDelay: 0,\n axisLock: true // Don't want it flipping to the side where we are dragging\n\n });\n me.tip.on('innerhtmlupdate', me.updateDateIndicator, me);\n }\n }\n }", "function updateTooltips(){\r\n\t//Bind Tooltips with Buttons\r\n\t$(\"button[rel='tooltip']\").tooltip({\r\n\t\tplacement:'top',\r\n\t\ttrigger:'hover',\r\n\t\tanimation:'true'\r\n\t});\r\n}", "get tooltipClass() { return this._tooltipClass; }", "function tooltips ( ) {\r\n\r\n\t\t// Tooltips are added with options.tooltips in original order.\r\n\t\tvar tips = scope_Handles.map(addTooltip);\r\n\r\n\t\tbindEvent('update', function(values, handleNumber, unencoded) {\r\n\r\n\t\t\tif ( !tips[handleNumber] ) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tvar formattedValue = values[handleNumber];\r\n\r\n\t\t\tif ( options.tooltips[handleNumber] !== true ) {\r\n\t\t\t\tformattedValue = options.tooltips[handleNumber].to(unencoded[handleNumber]);\r\n\t\t\t}\r\n\r\n\t\t\ttips[handleNumber].innerHTML = formattedValue;\r\n\t\t});\r\n\t}", "function initializeTooltips(){\n\t$('.tooltip').tooltipster({\n\t\tcontentAsHTML: true, // set title content to html\n\t\ttrigger: 'custom', // add custom trigger\n\t\ttriggerOpen: { // open tooltip when element is clicked, tapped (mobile) or hovered\n\t\t mouseenter: true\n\t\t},\n\t\ttriggerClose: { // close tooltip when element is clicked again, tapped or when the mouse leaves it\n\t\t\tmouseleave: true\n\t\t},\n\t\ttheme: ['tooltipster-light'/*, 'tooltipster-light-custom'*/]\n \t});\n}", "function ttMouseOver() {\nif (tooltipsOn && wgCanonicalNamespace != \"Special\" && (itemTooltips || npcTooltips || questTooltips || quickTooltips || abilityTooltips || otherTooltips)) {\n$(\"body\").mouseover(hideTip);\n$(\"#bodyContent\").append('<div id=\"tfb\" class=\"htt\"></div><div id=\"templatetfb\" class=\"htt\"><div>');\nif (itemTooltips) $(\"span.itemlink,span.setlink\").each(bindTT);\nif (npcTooltips) $(\"span.npclink\").each(bindTT);\nif (questTooltips) $(\"span.questlink\").each(bindTT);\nif (achievementTooltips) $(\"span.achievementlink\").each(bindTT);\nif (abilityTooltips) $(\"span.abilitylink\").each(bindTT);\nif (otherTooltips) $(\"span.ajaxttlink\").each(bindTT);\nif (quickTooltips) $(\"span.tttemplatelink\").each(function () {\n$(this).mouseover(showTemplateTip);\n$(this).mouseout(hideTemplateTip);\n$(this).mousemove(moveTip);\n});\n}\n}", "function responsiveTooltips() {\r\n\t\t\t\t\t\r\n\t\t\t\t\t$('.nectar_image_with_hotspots').each(function () {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$(this).find('.nectar_hotspot_wrap').each(function () {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif (nectarDOMInfo.winW > 690) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t// Remove click if applicable\r\n\t\t\t\t\t\t\t\tif ($(this).parents('.nectar_image_with_hotspots[data-tooltip-func=\"hover\"]').length > 0) {\r\n\t\t\t\t\t\t\t\t\t$(this).find('.nectar_hotspot').removeClass('click');\r\n\t\t\t\t\t\t\t\t\t$(this).find('.nttip').removeClass('open');\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$(this).find('.nttip .inner a.tipclose').remove();\r\n\t\t\t\t\t\t\t\t$('.nttip').css('height', 'auto');\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t// Reset for positioning\r\n\t\t\t\t\t\t\t\t$(this).css({\r\n\t\t\t\t\t\t\t\t\t'width': 'auto',\r\n\t\t\t\t\t\t\t\t\t'height': 'auto'\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$(this).find('.nttip')\r\n\t\t\t\t\t\t\t\t\t.removeClass('force-right')\r\n\t\t\t\t\t\t\t\t\t.removeClass('force-left')\r\n\t\t\t\t\t\t\t\t\t.removeClass('force-top')\r\n\t\t\t\t\t\t\t\t\t.css('width', 'auto');\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tvar $tipOffset = $(this).find('.nttip').offset();\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t// Against right side \r\n\t\t\t\t\t\t\t\tif ($tipOffset.left > $(this).parents('.nectar_image_with_hotspots').width() - 200) {\r\n\t\t\t\t\t\t\t\t\t$(this).find('.nttip').css('width', '250px');\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t$(this).find('.nttip').css('width', 'auto');\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t// Responsive\r\n\t\t\t\t\t\t\t\tif ($tipOffset.left < 0) {\r\n\t\t\t\t\t\t\t\t\t$(this).find('.nttip').addClass('force-right');\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse if ($tipOffset.left + $(this).find('.nttip').outerWidth(true) > nectarDOMInfo.winW) {\r\n\t\t\t\t\t\t\t\t\t$(this).find('.nttip').addClass('force-left').css('width', '250px');\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse if ($tipOffset.top + $(this).find('.nttip').height() + 35 > $window.height() && $('#nectar_fullscreen_rows').length > 0) {\r\n\t\t\t\t\t\t\t\t\t$(this).find('.nttip').addClass('force-top');\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif ($(this).find('> .open').length == 0) {\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t$(this).css({\r\n\t\t\t\t\t\t\t\t\t\t'width': '30px',\r\n\t\t\t\t\t\t\t\t\t\t'height': '30px'\r\n\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t//fixed position\r\n\t\t\t\t\t\t\t\t$(this).find('.nttip')\r\n\t\t\t\t\t\t\t\t\t.removeClass('force-left')\r\n\t\t\t\t\t\t\t\t\t.removeClass('force-right')\r\n\t\t\t\t\t\t\t\t\t.removeClass('force-top');\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$(this).find('.nectar_hotspot').addClass('click');\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif ($(this).find('.nttip a.tipclose').length == 0) {\r\n\t\t\t\t\t\t\t\t\t$(this).find('.nttip .inner').append('<a href=\"#\" class=\"tipclose\"><span></span></a>');\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t// Change height of fixed\r\n\t\t\t\t\t\t\t\t$('.nttip').css('height', $window.height());\r\n\t\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}", "initTooltip() {\n const me = this,\n client = me.client;\n\n if (me.showTooltip) {\n if (me.tip) {\n me.tip.showBy(me.getTooltipTarget());\n } else {\n me.clockTemplate = new ClockTemplate({\n timeAxisViewModel: client.timeAxisViewModel\n });\n\n me.tip = new Tooltip({\n id: `${client.id}-drag-create-tip`,\n autoShow: true,\n trackMouse: false,\n getHtml: me.getTipHtml.bind(me),\n align: client.isVertical ? 't-b' : 'b100-t100',\n hideDelay: 0,\n axisLock: true // Don't want it flipping to the side where we are dragging\n });\n\n me.tip.on('innerhtmlupdate', me.updateDateIndicator, me);\n }\n }\n }", "function QTip() {\n\n var myPos = {\n bot: { target: 'mouse', my: 'top left', at: 'bottom right', adjust: { x: 10, y: 20 } },\n top: { target: 'mouse', my: 'bottom left', at: 'top right', adjust: { x: 5, y: 0 } }\n };\n\n // destroy artifacts before creating again\n $('.qtip').each(function () {\n $(this).data('qtip').destroy();\n })\n\n // create tooltip\n $('[title]').each(function () {\n $(this).qtip({\n style: { classes: 'qtip-light qtip-shadow qtip-rounded' },\n position: ($(this).data('qtop')) ? myPos.top : myPos.bot,\n content: { text: '<span class=\"glyphicon ' + CD_Library.Icons[$(this).data('icon')] + '\"></span> &nbsp;' + $(this).attr('title') },\n suppress: true\n });\n\n });\n\n}", "function setupToolTips(id, msg) {\n let newID = id + 'tip';\n document.getElementById(newID).innerHTML = msg;\n document.getElementById(newID).style.visibility = \"hidden\";\n\n}", "function showTooltip(content, event) {\n tt.style('opacity', 1.0)\n .html(content);\n \n updatePosition(event);\n }", "function JT_init(){\n\t $(\"a.jTip\")\n\t\t .hover(function(){JT_show(this.href,this.id,this.name)},function(){$('#JT').remove()})\n .click(function(){return false});\t \n}", "function ttMouseOver(foo) {\nif (tooltipsOn && getCookie(\"wiki-tiploader\") != \"no\") {\n$(\"#WikiaArticle\").mouseover(hideTip);\n$(\"#WikiaArticle\").append('<div id=\"tfb\" class=\"htt\"></div><div id=\"templatetfb\" class=\"htt\"><div>');\n$tfb = $(\"#tfb\");\n$ttfb = $(\"#templatetfb\");\n$htt = $(\"#tfb,#templatetfb\");\nif(foo==1){\n$(\"#WikiaArticle span.ajaxttlink\").each(bindTT);\n}\n$(\"#WikiaArticle span.tttemplatelink\").mouseover(showTemplateTip).mouseout(hideTemplateTip).mousemove(moveTip);\n}\n}", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.tooltip')\n\t var options = typeof option == 'object' && option\n\t\n\t if (!data && option == 'destroy') return\n\t if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function toggle_tooltip() {\n $('[data-toggle=\"tooltip\"]').tooltip(); \n}", "function showToolTipHelp() {\n\t\tvar link = tip.triggerElement;\n\t\tif (!link) {\n\t\t\treturn false;\n\t\t}\n\t\tvar table = link.getAttribute('data-table');\n\t\tvar field = link.getAttribute('data-field');\n\t\tvar key = table + '.' + field;\n\t\tvar response = cshHelp.key(key);\n\t\ttip.target = tip.triggerElement;\n\t\tif (response) {\n\t\t\tupdateTip(response);\n\t\t} else {\n\t\t\t\t// If a table is defined, use ExtDirect call to get the tooltip's content\n\t\t\tif (table) {\n\t\t\t\tvar description = '';\n\t\t\t\tif (typeof(top.TYPO3.LLL) !== 'undefined') {\n\t\t\t\t\tdescription = top.TYPO3.LLL.core.csh_tooltip_loading;\n\t\t\t\t} else if (opener && typeof(opener.top.TYPO3.LLL) !== 'undefined') {\n\t\t\t\t\tdescription = opener.top.TYPO3.LLL.core.csh_tooltip_loading;\n\t\t\t\t}\n\n\t\t\t\t\t// Clear old tooltip contents\n\t\t\t\tupdateTip({\n\t\t\t\t\tdescription: description,\n\t\t\t\t\tcshLink: '',\n\t\t\t\t\tmoreInfo: '',\n\t\t\t\t\ttitle: ''\n\t\t\t\t});\n\t\t\t\t\t// Load content\n\t\t\t\tTYPO3.CSH.ExtDirect.getTableContextHelp(table, function(response, options) {\n\t\t\t\t\tExt.iterate(response, function(key, value){\n\t\t\t\t\t\tcshHelp.add(value);\n\t\t\t\t\t\tif (key === field) {\n\t\t\t\t\t\t\tupdateTip(value);\n\t\t\t\t\t\t\t\t// Need to re-position because the height may have increased\n\t\t\t\t\t\t\ttip.show();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}, this);\n\n\t\t\t\t// No table was given, use directly title and description\n\t\t\t} else {\n\t\t\t\tupdateTip({\n\t\t\t\t\tdescription: link.getAttribute('data-description'),\n\t\t\t\t\tcshLink: '',\n\t\t\t\t\tmoreInfo: '',\n\t\t\t\t\ttitle: link.getAttribute('data-title')\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}", "function tooltips() {\n\n // Tooltips are added with options.tooltips in original order.\n var tips = scope_Handles.map(addTooltip);\n\n bindEvent('update', function (values, handleNumber, unencoded) {\n\n if (!tips[handleNumber]) {\n return;\n }\n\n var formattedValue = values[handleNumber];\n\n if (options.tooltips[handleNumber] !== true) {\n formattedValue = options.tooltips[handleNumber].to(unencoded[handleNumber]);\n }\n\n tips[handleNumber].innerHTML = formattedValue;\n });\n }", "function showNotificationsTooltip() {\n $('#tooltip_content').show();\n}", "function tooltips ( ) {\n\n\t\t// Tooltips are added with options.tooltips in original order.\n\t\tvar tips = scope_Handles.map(addTooltip);\n\n\t\tbindEvent('update', function(values, handleNumber, unencoded) {\n\n\t\t\tif ( !tips[handleNumber] ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar formattedValue = values[handleNumber];\n\n\t\t\tif ( options.tooltips[handleNumber] !== true ) {\n\t\t\t\tformattedValue = options.tooltips[handleNumber].to(unencoded[handleNumber]);\n\t\t\t}\n\n\t\t\ttips[handleNumber].innerHTML = formattedValue;\n\t\t});\n\t}", "function tooltips ( ) {\n\n\t\t// Tooltips are added with options.tooltips in original order.\n\t\tvar tips = scope_Handles.map(addTooltip);\n\n\t\tbindEvent('update', function(values, handleNumber, unencoded) {\n\n\t\t\tif ( !tips[handleNumber] ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar formattedValue = values[handleNumber];\n\n\t\t\tif ( options.tooltips[handleNumber] !== true ) {\n\t\t\t\tformattedValue = options.tooltips[handleNumber].to(unencoded[handleNumber]);\n\t\t\t}\n\n\t\t\ttips[handleNumber].innerHTML = formattedValue;\n\t\t});\n\t}", "function tooltips ( ) {\n\n\t\t// Tooltips are added with options.tooltips in original order.\n\t\tvar tips = scope_Handles.map(addTooltip);\n\n\t\tbindEvent('update', function(values, handleNumber, unencoded) {\n\n\t\t\tif ( !tips[handleNumber] ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar formattedValue = values[handleNumber];\n\n\t\t\tif ( options.tooltips[handleNumber] !== true ) {\n\t\t\t\tformattedValue = options.tooltips[handleNumber].to(unencoded[handleNumber]);\n\t\t\t}\n\n\t\t\ttips[handleNumber].innerHTML = formattedValue;\n\t\t});\n\t}", "function tooltips ( ) {\n\n\t\t// Tooltips are added with options.tooltips in original order.\n\t\tvar tips = scope_Handles.map(addTooltip);\n\n\t\tbindEvent('update', function(values, handleNumber, unencoded) {\n\n\t\t\tif ( !tips[handleNumber] ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar formattedValue = values[handleNumber];\n\n\t\t\tif ( options.tooltips[handleNumber] !== true ) {\n\t\t\t\tformattedValue = options.tooltips[handleNumber].to(unencoded[handleNumber]);\n\t\t\t}\n\n\t\t\ttips[handleNumber].innerHTML = formattedValue;\n\t\t});\n\t}", "function tooltips ( ) {\n\n\t\t// Tooltips are added with options.tooltips in original order.\n\t\tvar tips = scope_Handles.map(addTooltip);\n\n\t\tbindEvent('update', function(values, handleNumber, unencoded) {\n\n\t\t\tif ( !tips[handleNumber] ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar formattedValue = values[handleNumber];\n\n\t\t\tif ( options.tooltips[handleNumber] !== true ) {\n\t\t\t\tformattedValue = options.tooltips[handleNumber].to(unencoded[handleNumber]);\n\t\t\t}\n\n\t\t\ttips[handleNumber].innerHTML = formattedValue;\n\t\t});\n\t}", "function tooltips ( ) {\n\n\t\t// Tooltips are added with options.tooltips in original order.\n\t\tvar tips = scope_Handles.map(addTooltip);\n\n\t\tbindEvent('update', function(values, handleNumber, unencoded) {\n\n\t\t\tif ( !tips[handleNumber] ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar formattedValue = values[handleNumber];\n\n\t\t\tif ( options.tooltips[handleNumber] !== true ) {\n\t\t\t\tformattedValue = options.tooltips[handleNumber].to(unencoded[handleNumber]);\n\t\t\t}\n\n\t\t\ttips[handleNumber].innerHTML = formattedValue;\n\t\t});\n\t}", "function tooltips ( ) {\n\n\t\t// Tooltips are added with options.tooltips in original order.\n\t\tvar tips = scope_Handles.map(addTooltip);\n\n\t\tbindEvent('update', function(values, handleNumber, unencoded) {\n\n\t\t\tif ( !tips[handleNumber] ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar formattedValue = values[handleNumber];\n\n\t\t\tif ( options.tooltips[handleNumber] !== true ) {\n\t\t\t\tformattedValue = options.tooltips[handleNumber].to(unencoded[handleNumber]);\n\t\t\t}\n\n\t\t\ttips[handleNumber].innerHTML = formattedValue;\n\t\t});\n\t}", "function tooltips ( ) {\n\n\t\t// Tooltips are added with options.tooltips in original order.\n\t\tvar tips = scope_Handles.map(addTooltip);\n\n\t\tbindEvent('update', function(values, handleNumber, unencoded) {\n\n\t\t\tif ( !tips[handleNumber] ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar formattedValue = values[handleNumber];\n\n\t\t\tif ( options.tooltips[handleNumber] !== true ) {\n\t\t\t\tformattedValue = options.tooltips[handleNumber].to(unencoded[handleNumber]);\n\t\t\t}\n\n\t\t\ttips[handleNumber].innerHTML = formattedValue;\n\t\t});\n\t}", "function tooltips ( ) {\n\n\t\t// Tooltips are added with options.tooltips in original order.\n\t\tvar tips = scope_Handles.map(addTooltip);\n\n\t\tbindEvent('update', function(values, handleNumber, unencoded) {\n\n\t\t\tif ( !tips[handleNumber] ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar formattedValue = values[handleNumber];\n\n\t\t\tif ( options.tooltips[handleNumber] !== true ) {\n\t\t\t\tformattedValue = options.tooltips[handleNumber].to(unencoded[handleNumber]);\n\t\t\t}\n\n\t\t\ttips[handleNumber].innerHTML = formattedValue;\n\t\t});\n\t}", "function tooltips ( ) {\n\n\t\t// Tooltips are added with options.tooltips in original order.\n\t\tvar tips = scope_Handles.map(addTooltip);\n\n\t\tbindEvent('update', function(values, handleNumber, unencoded) {\n\n\t\t\tif ( !tips[handleNumber] ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar formattedValue = values[handleNumber];\n\n\t\t\tif ( options.tooltips[handleNumber] !== true ) {\n\t\t\t\tformattedValue = options.tooltips[handleNumber].to(unencoded[handleNumber]);\n\t\t\t}\n\n\t\t\ttips[handleNumber].innerHTML = formattedValue;\n\t\t});\n\t}", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this);\n var data = $this.data('bs.tooltip');\n var options = typeof option == 'object' && option;\n\n if (!data && /destroy|hide/.test(option)) return;\n if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)));\n if (typeof option == 'string') data[option]()\n })\n }", "function enableToolTipForContactTime(){\r\n\t$('[id^=\"contactFrom\"]').tooltip({title: \"Please follow military time format from 0800 to 1800.\", animation: true,placement: \"auto\"});\r\n\t$('[id^=\"contactTo\"]').tooltip({title: \"Please follow military time format from 0800 to 1800.\", animation: true,placement: \"auto\"});\r\n}", "function vtt_tooltip(e, id, contents){\r\n id = \"TTL_TTP_\"+id;\r\n div = document.createElement('div');\r\n div.setAttribute('id', id);\r\n div.setAttribute('style', 'position:absolute; top:120px; left:720px; padding:2px; z-index:200; border:solid 1px #000000; background-color:#FFFFFF; visibility:hidden;');\r\n div.innerHTML = contents;\r\n document.getElementById('ltop1').parentNode.appendChild(div);\r\n var timer;\r\n\r\n delay_mouseover = function (e){\r\n if (timer != undefined) window.clearTimeout(timer);\r\n timer = window.setTimeout(function(){\r\n x = document.getElementById(id);\r\n x.style.visibility = 'visible';\r\n x.style.left = (e.pageX+12)+'px';\r\n x.style.top = (e.pageY+1)+'px';\r\n }, 500);\r\n }\r\n delay_mouseout = function (){\r\n if (timer != undefined) window.clearTimeout(timer);\r\n timer = window.setTimeout(function(){\r\n document.getElementById(id).style.visibility = 'hidden';\r\n }, 300);\r\n }\r\n\r\n e.addEventListener('mouseover', delay_mouseover, false);\r\n e.addEventListener('mouseout', delay_mouseout, false);\r\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('sia.siatooltip')\n var options = typeof option == 'object' && option\n\n if (!data && /destroy|hide/.test(option)) return\n if (!data) $this.data('sia.siatooltip', (data = new SIATooltip(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.tooltip')\n var options = typeof option == 'object' && option\n\n if (!data && /destroy|hide/.test(option)) return\n if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.tooltip')\n\t var options = typeof option == 'object' && option\n\t\n\t if (!data && /destroy|hide/.test(option)) return\n\t if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.tooltip')\n\t var options = typeof option == 'object' && option\n\t\n\t if (!data && /destroy|hide/.test(option)) return\n\t if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.tooltip')\n\t var options = typeof option == 'object' && option\n\t\n\t if (!data && /destroy|hide/.test(option)) return\n\t if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.tooltip')\n\t var options = typeof option == 'object' && option\n\t\n\t if (!data && /destroy|hide/.test(option)) return\n\t if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }" ]
[ "0.7193489", "0.7177543", "0.71230096", "0.7107687", "0.7008811", "0.69535863", "0.6937391", "0.6877154", "0.685422", "0.68206614", "0.6799643", "0.6799365", "0.6754513", "0.6752117", "0.6705143", "0.6687539", "0.6659539", "0.66462636", "0.6641098", "0.66409045", "0.66404915", "0.6611428", "0.6608622", "0.6594933", "0.6592712", "0.65761316", "0.65433455", "0.65401727", "0.6527606", "0.65178484", "0.65150297", "0.6510025", "0.65094393", "0.65028816", "0.6496666", "0.64965194", "0.649273", "0.6485682", "0.64811736", "0.6477993", "0.64776117", "0.6469281", "0.646133", "0.64574623", "0.6453759", "0.6445739", "0.6444742", "0.64437234", "0.6426604", "0.639941", "0.6391769", "0.6386628", "0.6367319", "0.63651425", "0.6359108", "0.6346714", "0.633354", "0.6333151", "0.6327206", "0.6318585", "0.63076884", "0.6291495", "0.62852436", "0.62798256", "0.6275705", "0.6274838", "0.62658226", "0.62657225", "0.62482256", "0.6234168", "0.623285", "0.6229015", "0.62260425", "0.62075704", "0.6204771", "0.6198483", "0.6198381", "0.6192908", "0.6191854", "0.61916745", "0.6188208", "0.61783534", "0.6177515", "0.6177515", "0.6177515", "0.6177515", "0.6177515", "0.6177515", "0.6177515", "0.6177515", "0.6177515", "0.6177515", "0.6169931", "0.6169874", "0.6168413", "0.61625046", "0.6158275", "0.6143102", "0.6143102", "0.6143102", "0.6143102" ]
0.0
-1
Easy API for creating new setFilters
function setFilters() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setFilters(){}", "function setFilters(){}", "function setFilters(){}", "function setFilters(){}", "function setFilters(){}", "function setFilters(){}", "function setFilters(){}", "function setFilters(){}", "function setFilters(){}" ]
[ "0.8424095", "0.8424095", "0.8424095", "0.8424095", "0.8424095", "0.8424095", "0.8424095", "0.8424095", "0.8424095" ]
0.0
-1
Implement the identical functionality for filter and not
function winnow( elements, qualifier, not ) { if ( isFunction( qualifier ) ) { return jQuery.grep( elements, function( elem, i ) { return !!qualifier.call( elem, i, elem ) !== not; } ); } // Single element if ( qualifier.nodeType ) { return jQuery.grep( elements, function( elem ) { return ( elem === qualifier ) !== not; } ); } // Arraylike of elements (jQuery, arguments, Array) if ( typeof qualifier !== "string" ) { return jQuery.grep( elements, function( elem ) { return ( indexOf.call( qualifier, elem ) > -1 ) !== not; } ); } // Filtered directly for both simple and complex selectors return jQuery.filter( qualifier, elements, not ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "filter() {\n\t}", "filter() {\n\t}", "function filter() {\n \n}", "function filterFunction() {\n \n}", "function Nothing$prototype$filter(pred) {\n return this;\n }", "removeAllFilters() {}", "function noFilter(filterObj) {\n return Object.\n keys(filterObj).\n every(function (key) {\n return !filterObj[key];\n });\n }", "function noFilter(filterObj) {\n return Object.\n keys(filterObj).\n every(function (key) {\n return !filterObj[key];\n });\n }", "function noFilter(filterObj) {\n return Object.\n keys(filterObj).\n every(function (key) {\n return !filterObj[key];\n });\n }", "function noFilter(filterObj) {\n return Object.\n keys(filterObj).\n every(function (key) {\n return !filterObj[key];\n });\n }", "function compFilter(filtered){\n return function(d){\n var logical = filterProvince(d.province) &&\n filterParty(d.results[0].party) &&\n filterVoteMargin(d.voteMargin) &&\n filterRUParty(d.results[1].party) &&\n filterVoteTurnout(d[\"Percentage of Votes Polled to Registered Voters\"]) &&\n filterNARange(+d.seat.replace(/P[KPBS]-/, \"\"));\n\n if (filtered == true){\n return logical;\n }\n else {\n return !(logical);\n }\n }\n }", "@computed get filteredTodos() {\r\n var matchesFilter = new RegExp(this.filter, \"i\");\r\n //\"i\" means ignore groß und kleinschreibung\r\n return this.todos.filter(\r\n todo => !this.filter || matchesFilter.test(todo.value)\r\n );\r\n // test will test the RegExp, so this.props.store.filter will automtaticly return\r\n // the filtered Value, on the CLient Side\r\n }", "function defaultFilterFunction(thing, params, request) {\n if (Array.isArray(params.exclude) && ap.indexOf.call(params.exclude, thing.id) !== -1) {\n return false;\n }\n if (typeof params.exclude === 'string' && thing.id === params.exclude) {\n return false;\n }\n if (Array.isArray(params.only) && ap.indexOf.call(params.only, thing.id) === -1) {\n return false;\n }\n if (typeof params.only === 'string' && thing.id !== params.only) {\n return false;\n }\n return true;\n}", "function testFilter(self) {\n if (self.filters.tagOptions == \"all\") {\n return function(item) {\n console.log(\"filter run because all\");\n return true;\n }\n } else {\n return function(item) {\n console.log(\"filter run because any\");\n return true;\n }\n }\n}", "function filterNot(a,p){\n\tvar filteredElement = a.filter(isEven);\n\treturn filteredElement; //should return the array [1, 3, 5, 7, 9]\n}", "function NullFilter() {\n\t\t}", "filteredCheck() {\n const { filteredItems, localItems, localFilter } = this\n return { filteredItems, localItems, localFilter }\n }", "function vmCheckFilterForEmpty(filter) {\n\n for (var i in filter) {\n\n if (i != 'pageIndex' && i != 'pageSize') {\n\n if (filter[i])\n return false\n else\n return true\n };\n };\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 compFilter(filtered){\n return function(d){\n // check if result array is empty\n var filt_party = (d.results.length != 0) ? filterParty(d.results[0].party) : true;\n var filt_party_ru = (d.results.length != 0) ? filterRUParty(d.results[1].party) : true;\n var filt_VM = (d.results.length != 0) ? filterVoteMargin(d.voteMargin) : true;\n var logical = filterProvince(d.Province) &&\n // filterParty(d.results[0].party) &&\n // filterVoteMargin(d.voteMargin) &&\n // filterRUParty(d.results[1].party) &&\n filt_party &&\n filt_VM &&\n filt_party_ru &&\n filterVoteTurnout(d[\"Percentage of Votes Polled to Registered Voters\"]) &&\n filterNARange(+d.seat.replace(\"NA-\", \"\"));\n if (filtered == true){\n return logical;\n }\n else {\n return !(logical);\n }\n }\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 Filter(method) {\n this.truthy = true;\n this.method = method;\n}", "function unifiedFilter(element, index, array) {\n var keep = actionFilter(element, index, array);\n\n if (keep) {\n keep = nameFilter(element, index, array);\n }\n controller.toggleItem($(\"#\" + element), keep ? controller.toggleOnDelay * visible.FILTER_DELAY_SCALE : controller.toggleOffDelay / visible.FILTER_DELAY_SCALE, keep);\n return keep;\n }", "function filterTwos(elem) { return elem !== 2; }", "function filterTwos(elem) { return elem !== 2; }", "function filterByMatch(event) {\n return ;\n}", "function TestFilter(){\n\t\treturn function(arr, param1, param2){\n\t\t\tconsole.log(\"filter called\");\n\t\t\tif(param1){\n\t\t\t\tvar filtered = _.select(arr, function(item) {\n\t \t\t\t\treturn item.indexOf( param1 ) !== -1;\n\t\t\t\t});\t\n\n\t\t\t\treturn filtered;\n\t\t\t} else{\n\t\t\t\treturn arr;\n\t\t\t}\n\t\t};\n\t}", "function filter(pred) {\n return function(rf) { // <- buildArray for example, but also the function in map on line 82\n return function(result, item) {\n if(pred(item))\n return rf(result, item)\n else\n return result\n }\n }\n}", "_filter (entities, params, inputSearch) {\n\t\treturn entities.filter(entity => this._entityVerify(entity, params, inputSearch))\n\t}", "function block() { return new Filter(function () { return false; }); }", "filteredCheck({ filteredItems, localFilter }) {\n // Determine if the dataset is filtered or not\n let isFiltered = false\n if (!localFilter) {\n // If filter criteria is falsey\n isFiltered = false\n } else if (looseEqual(localFilter, []) || looseEqual(localFilter, {})) {\n // If filter criteria is an empty array or object\n isFiltered = false\n } else if (localFilter) {\n // If filter criteria is truthy\n isFiltered = true\n }\n if (isFiltered) {\n this.$emit(EVENT_NAME_FILTERED, filteredItems, filteredItems.length)\n }\n this.isFiltered = isFiltered\n }", "function falsyFilter(){\nfor(var i = 0; i < mixedArray.length; i++) {\n if(mixedArray === true || mixedArray === \"true\" || mixedArray !== false)\n\t {mixedArray.slice(i, 1)}\n else return mixedArray;\n}\n}", "not() {\n\t return _register.call(this, 'not', arguments);\n\t }", "afilter (callback) {\n return this.asArray().filter(callback)\n }", "function doFilter() {\n for (var i = 0; i < items.length; i++) {\n // show all\n items[i].classList.remove('thumb--inactive');\n\n // combine filters\n // - only those items will be displayed who satisfy all filter criterias\n var visible = true;\n\n for (var j = 0; j < visibleItems.length; j++) {\n visible = visible && items[i].classList.contains(visibleItems[j]);\n }\n\n if (!visible) {\n items[i].classList.add('thumb--inactive');\n }\n }\n }", "function filterFuncOriginal(item, index, self) {\n \treturn self.indexOf(item) == index;\n\t}", "function f2() {\n bidar.serialize(obj, filter);\n\n function filter(x) {\n // An arbitrary-but-different hole.\n return { data: filter };\n }\n }", "filter(func) {\n let reArr = [];\n this.each((item) => {\n func(item) ? reArr.push(item) : null;\n });\n return new DomQuery(...reArr);\n }", "filter(func) {\n let reArr = [];\n this.each((item) => {\n func(item) ? reArr.push(item) : null;\n });\n return new DomQuery(...reArr);\n }", "function filterExample(arr) {\n const even = (num) => {\n if (num % 2 == 0) {\n return num\n }\n };\n const odd = (num) => {\n if (num % 2 != 0) {\n return num\n }\n };\n console.log(arr.filter(even));\n console.log(arr.filter(odd));\n\n}", "function filter(field, value)\n {\n \n }", "function filter(pred) {\n return function(xs) {\n return Z.filter (pred, xs);\n };\n }", "function defaultFilter$2() {\n\t return !exports.event.button;\n\t }", "function defaultFilter$2() {\n\t return !exports.event.button;\n\t }", "get filtered() {\n return this._filtered;\n }", "function falsyFilter(){\n for(var i = 0; i < mixedArray.length; i++){\n\tif(mixedArray[i] === false)\n {mixedArray.splice(i, 1)};\n\treturn mixedArray;\n }\n}", "unfilterNoChangeLayers(){\n //get the no change status object\n let no_change_status = this.props.statuses.filter(status => status.key === 'no_change');\n //clear the filter depending on whether it is a global or country view\n let filter = (this.props.view === 'global') ? null : ['in', 'iso3', this.props.country.iso3];\n //iterate through the layers and set the filter\n no_change_status[0].layers.forEach(layer => this.map.setFilter(layer, filter));\n //\n }", "function filterObjectBy(obj,objfilt){\n\n if(!objfilt){\n return true;\n } else if((Object.keys(objfilt).length === 0))\n {\n return true;\n }\n\n var res;\n\n var compareIndividual = function (valueorig,valuefilt){\n\n //console.info(\"typeof valuefilt\",typeof valuefilt);\n if (typeof valuefilt === \"string\") {//se busca sobre un array\n //console.info(\"es un string\",valueorig.toLowerCase().indexOf(valuefilt.toLowerCase()));\n //console.info(\"valueorig\",valueorig);\n if(valueorig && valueorig.toLowerCase().trim().indexOf(valuefilt.toLowerCase().trim()) > -1){\n //console.log(\"son iguales string\");\n return true;\n }\n\n\n }else if(typeof valuefilt === \"boolean\"){\n var value_orig = Boolean(valueorig);\n var value_filt = Boolean(valuefilt);\n //console.info(\"booleanos\",(value_orig === value_filt),value_orig , value_filt);\n if(value_orig === value_filt){\n return true;\n }\n\n }else if(valueorig === valuefilt){\n //console.log(\"son iguales simple\");\n return true;\n }\n //console.info(\"no son iguales\");\n return false;\n\n\n };\n\n\n for(var key in objfilt){\n //console.info(key,obj[key]);\n if(obj[key] !== undefined ){//existe la propiedad en el original\n //console.info(\"existe\",objfilt[key]);\n if (objfilt[key] instanceof Array) {//se busca sobre un array\n //console.info(\"es un array\");\n var array = objfilt[key];\n var length = array.length;\n var resArray = null;\n for (var i = 0; i < length; i++) {\n var item = array[i];\n\n var compareIndividualResult = compareIndividual(obj[key], item);\n resArray = resArray || compareIndividualResult;\n //console.info(\"resArray\",resArray,item,\"compareIndividualResult\",compareIndividualResult);\n }\n res = (res)?(res && resArray):resArray;\n //console.info(\"res\",res,objfilt[key]);\n }else{\n //console.info(\"no es un array\");\n res = compareIndividual(obj[key],objfilt[key]);\n\n }\n\n }else{\n res = false;\n\n }\n if(res){\n continue;\n\n }else{\n break;\n }\n\n }\n //console.info(\"return res\",res);\n return res || false;\n}", "runFilter(callback) {\n\n if (callback === '') {\n this.data = this.dataUntouched;\n } else {\n\n const untouched = cloneArrayOfObjects(this.dataUntouched);;\n\n this.data = untouched.filter((e) => callback(e));\n }\n\n this.settings.offset = 0;\n return this.run();\n\n }", "function filter(filter) { return new Filter(filter); }", "filterProducts() {\n // Crear copia\n let toFilter = [...this.productsArray];\n\n // Se pasa el array por todos los filtros del objeto filters\n Object.values(this.filters).forEach((filter) => {\n toFilter = filter(toFilter) || toFilter;\n });\n\n return toFilter;\n }", "function filterValues(data) \r\n{\r\n data = data.filter(isEligible);\r\n return data;\r\n}", "filterEvent(event) {\n return false;\n }", "function defaultFilter$1() {\n\t return !exports.event.button;\n\t }", "function defaultFilter$1() {\n\t return !exports.event.button;\n\t }", "function filterNoDom(n, e) {\n return isNotHidden(e) && nonWeakFilter(n, e) && shouldTraverse(e, false);\n }", "function filterCallback(pet) {\n let lessThan5 = pet.age < 5;\n let hasS = pet.name[0] == \"S\" || pet.ownerName[0] == \"S\";\n return lessThan5 && (hasS);\n}", "function objFilter(obj, callback) {\n\n}", "function defaultFilter$2() {\n return !exports.event.button;\n}", "function defaultFilter$2() {\n return !exports.event.button;\n}", "function defaultFilter$2() {\n return !exports.event.button;\n}", "function defaultFilter$2() {\n return !exports.event.button;\n}", "function defaultFilter$2() {\n\t return !exports.event.button;\n\t}", "function defaultFilter$2() {\n\t return !exports.event.button;\n\t}", "function defaultFilter$2() {\n\t return !exports.event.button;\n\t}", "function defaultFilter$2() {\n\t return !exports.event.button;\n\t}", "filterAndUpdate( callback, thisArg)\n //------------------------------------------------------------------------------------------------------\n {\n var itemsToRemove = [];\n\n this.forEach( function( item) {\n\n if ( ! callback.call(thisArg, item) ) {\n itemsToRemove.push(item);\n }\n\n }, thisArg);\n\n this.remove(itemsToRemove);\n\n return this;\n }", "function filter(el, filterFn) {\n Array.prototype.filter.call(el, filterFn);\n } //https://jsfiddle.net/w1rktecz/", "function defaultFilter$2() {\n return !exports.event.button;\n }", "setFilterToNone() {\n\t\tthis.props.setFilter(\"\", \"\");\n\t}", "function except(source, filter) {\n return source.filter(key => !filter.includes(key));\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}", "getFilteredTodos() {\r\n const {todos, filter} = this.state;\r\n switch(filter) {\r\n case 'Active':\r\n return todos.filter(todo => (todo.active));\r\n case 'Finished':\r\n return todos.filter(todo => (!todo.active))\r\n default:\r\n return todos; \r\n }\r\n }", "function defaultFilter$1() {\n\t return !exports.event.button;\n\t}", "function defaultFilter$1() {\n\t return !exports.event.button;\n\t}", "function defaultFilter$1() {\n\t return !exports.event.button;\n\t}", "function defaultFilter$1() {\n\t return !exports.event.button;\n\t}", "function defaultFilter$1() {\n return !exports.event.button;\n}", "function defaultFilter$1() {\n return !exports.event.button;\n}", "function defaultFilter$1() {\n return !exports.event.button;\n}", "function defaultFilter$1() {\n return !exports.event.button;\n}", "function notModifier (predicate) {\n return function () {\n return !predicate.apply(null, arguments);\n };\n }", "item_filter(self) {\n return function(item) {\n if (self.filters.activeGroups.length == 0 && self.filters.activeTags.length == 0) {\n // If neither group nor tag filters are set, return a filter function that\n // always returns true.\n return true;\n } else if (self.filters.activeGroups.length > 0 && self.filters.activeTags.length == 0) {\n // If only the group filter is set, return a function to check if the\n // group of an item is active\n return $.inArray(item.group_slug,self.filters.activeGroups) > -1;\n } else if (self.filters.activeGroups.length == 0 && self.filters.activeTags.length > 0) {\n // If only the tag filter is set...\n if (self.filters.tagOptions == \"all\") {\n // ...and tag options are set to match all tags, return a function to\n // filter to only items with all of the active tags applied.\n return self.filters.activeTags.every(function(element, index, array) {\n return $.inArray(element,item.tag_slugs) > -1;\n });\n } else {\n // ...and tag options are set to match any active tag, return a function\n // to filter to only items with any active tag applied.\n return self.filters.activeTags.some(function(element, index, array) {\n return $.inArray(element,item.tag_slugs) > -1;\n });\n };\n } else {\n // Both tag filters and group filters are set. Items should be filtered to\n // only those with an active group and any/all active tags, depending on\n // active tag behavior.\n var hasActiveGroup = $.inArray(item.group_slug,self.filters.activeGroups) > -1;\n if (hasActiveGroup) {\n // If the group is active, do the tag checks.\n if (self.filters.tagOptions == \"all\") {\n // Check if all tags are active\n var hasAllTags = self.filters.activeTags.every(function(element, index, array) {\n return $.inArray(element,item.tag_slugs) > -1;\n });\n return hasAllTags;\n } else {\n // Check if any tags are active\n var hasAnyTag = self.filters.activeTags.some(function(element, index, array) {\n return $.inArray(element,item.tag_slugs) > -1;\n });\n return hasAnyTag;\n }\n } else {\n // If the group is not active, don't bother with the tag checks, just\n // return false\n return false;\n }\n }\n }\n }", "function toggleFilter () {\n\t\tvar filterProp = Object.keys(vm.tp.filter());\n\t\tif (!$scope.showFilter && filterProp.length > 0) {\n\t\t\tvm.tp.filter({});\n\t\t}\n\t}", "function defaultFilter() {\n\t return !exports.event.button;\n\t }", "function defaultFilter() {\n\t return !exports.event.button;\n\t }", "function filter(filterFuncs = 'none') {\n\tctx.filter = filterFuncs;\n}", "function britainFilter(items){\n return items.currency_code !== \"USD\";\n }", "function keep() {\n\t var clean = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : filter.ignoreMissing;\n\t\n\t return function (values) {\n\t var cleanValues = clean(values);\n\t if (!cleanValues) return null;\n\t var result = first()(cleanValues);\n\t cleanValues.forEach(function (v) {\n\t if (v !== result) {\n\t return null;\n\t }\n\t });\n\t return result;\n\t };\n\t}", "function defaultFilter$1() {\n return !exports.event.button;\n }", "function myFilter(arr, f){\n let ans = [] ;\n\n for(let i = 0; i < arr.length; i++){\n if(f(arr[i]) == true){\n ans.push(arr[i]) ;\n }\n }\n return ans ;\n}", "filter(keepIf) {\n const self = this;\n return new Seq(function* () {\n for (const element of self)\n if (keepIf(element))\n yield element;\n });\n }", "function defaultFilter() {\n const qgNodeIds = getQNodeIds();\n const filteredResults = answers.filter((row) => {\n const remove = qgNodeIds.find((qnodeId) => {\n const found = row[qnodeId].find((knode) => knode.id && !filter.current[qnodeId][knode.id]);\n if (found) {\n // if found, we want to remove\n return true;\n }\n return false;\n });\n if (remove) {\n // if we want to remove, filter out\n return false;\n }\n return true;\n });\n updateFilteredAnswers(filteredResults);\n // return filteredResults;\n }", "function filter(list, predicateFn) {\n\n}", "function not(predicate) {\n return function (a) { return !predicate(a); };\n}", "function filterAttributes(data){\n let filtered_data = {};\n {conditionalFilter}\n return filtered_data;\n}", "function filterValue ( removeValue ) {\n return function filter ( checkValue ) {\n return checkValue !== removeValue\n }\n}", "static generateFiltersFunction(filters) {\n if (!filters || !filters.length && !filters.count) {\n return FunctionHelper.returnTrue;\n }\n\n return function (candidate) {\n let match = true;\n\n for (const filter of filters) {\n // Skip disabled filters\n if (!filter.disabled) {\n match = filter.filter(candidate);\n }\n\n if (!match) {\n break;\n }\n }\n\n return match;\n };\n }", "filterThis(letters){\n return letters !== 0;\n }", "static generateFiltersFunction(filters) {\n if (!filters || (!filters.length && !filters.count)) {\n return FunctionHelper.returnTrue;\n }\n\n return function(candidate) {\n let match = true;\n\n for (const filter of filters) {\n // Skip disabled filters\n if (!filter.disabled) {\n match = filter.filter(candidate);\n }\n if (!match) {\n break;\n }\n }\n\n return match;\n };\n }", "filter(stats) {\n let { filterFn } = this.options;\n if (filterFn) {\n try {\n // Run the user-specified filter function\n return !!filterFn(stats);\n }\n catch (err) {\n // An error occurred in the user's code.\n // In Sync and Async modes, this will return an error.\n // In Streaming mode, we emit an \"error\" event, but continue processing\n this.emit(\"error\", err);\n }\n }\n else {\n // No filter was specified, so match everything\n return true;\n }\n }" ]
[ "0.74149454", "0.74149454", "0.719128", "0.68614864", "0.6764592", "0.66512936", "0.6457615", "0.6457615", "0.6457615", "0.6457615", "0.6295093", "0.6292765", "0.62562424", "0.624675", "0.6208189", "0.61978525", "0.6192146", "0.6189551", "0.6183979", "0.6165194", "0.61502874", "0.6149567", "0.61488324", "0.6138665", "0.6138665", "0.6104088", "0.6102998", "0.6102181", "0.60886276", "0.60828143", "0.6079572", "0.6049423", "0.60355216", "0.6027536", "0.60167027", "0.6007514", "0.59843874", "0.59779835", "0.59779835", "0.59774244", "0.5959843", "0.5951216", "0.59432614", "0.59432614", "0.5937847", "0.59267193", "0.5924982", "0.5920646", "0.59180206", "0.59174293", "0.59160244", "0.59082586", "0.5900714", "0.5892589", "0.5892589", "0.58841205", "0.58780193", "0.5874952", "0.58731204", "0.58731204", "0.58731204", "0.58731204", "0.5870113", "0.5870113", "0.5870113", "0.5870113", "0.584865", "0.5844064", "0.5841734", "0.584078", "0.5838573", "0.5827838", "0.58209133", "0.58206826", "0.58206826", "0.58206826", "0.58206826", "0.5814781", "0.5814781", "0.5814781", "0.5814781", "0.5814424", "0.5807258", "0.58029413", "0.5797797", "0.5797797", "0.57929", "0.5790096", "0.5785056", "0.5772408", "0.5761746", "0.57612354", "0.57511574", "0.5751061", "0.57474965", "0.57410073", "0.5740005", "0.573843", "0.5736056", "0.5731909", "0.5726605" ]
0.0
-1
Convert Stringformatted options into Objectformatted ones
function createOptions( options ) { var object = {}; jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) { object[ flag ] = true; } ); return object; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function normalizeOption(option){if(isString(option)){return normalizeStringOption(option);}else if(isGroup(option)){var title=option.title,options=option.options;return{title:title,options:options.map(function(option){return isString(option)?normalizeStringOption(option):option;})};}return option;}", "function optionsFromStrings(options) {\n\tvar intOptions = [\"width\", \"height\", \"textMargin\", \"fontSize\", \"margin\", \"marginTop\", \"marginBottom\", \"marginLeft\", \"marginRight\"];\n\n\tfor (var intOption in intOptions) {\n\t\tif (intOptions.hasOwnProperty(intOption)) {\n\t\t\tintOption = intOptions[intOption];\n\t\t\tif (typeof options[intOption] === \"string\") {\n\t\t\t\toptions[intOption] = parseInt(options[intOption], 10);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (typeof options[\"displayValue\"] === \"string\") {\n\t\toptions[\"displayValue\"] = options[\"displayValue\"] != \"false\";\n\t}\n\n\treturn options;\n}", "function optionsFromStrings(options) {\n\tvar intOptions = [\"width\", \"height\", \"textMargin\", \"fontSize\", \"margin\", \"marginTop\", \"marginBottom\", \"marginLeft\", \"marginRight\"];\n\n\tfor (var intOption in intOptions) {\n\t\tif (intOptions.hasOwnProperty(intOption)) {\n\t\t\tintOption = intOptions[intOption];\n\t\t\tif (typeof options[intOption] === \"string\") {\n\t\t\t\toptions[intOption] = parseInt(options[intOption], 10);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (typeof options[\"displayValue\"] === \"string\") {\n\t\toptions[\"displayValue\"] = options[\"displayValue\"] != \"false\";\n\t}\n\n\treturn options;\n}", "function optionsFromStrings(options) {\n\tvar intOptions = [\"width\", \"height\", \"textMargin\", \"fontSize\", \"margin\", \"marginTop\", \"marginBottom\", \"marginLeft\", \"marginRight\"];\n\n\tfor (var intOption in intOptions) {\n\t\tif (intOptions.hasOwnProperty(intOption)) {\n\t\t\tintOption = intOptions[intOption];\n\t\t\tif (typeof options[intOption] === \"string\") {\n\t\t\t\toptions[intOption] = parseInt(options[intOption], 10);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (typeof options[\"displayValue\"] === \"string\") {\n\t\toptions[\"displayValue\"] = options[\"displayValue\"] != \"false\";\n\t}\n\n\treturn options;\n}", "function setOptions(obj, options) {\n if (!Object.prototype.hasOwnProperty.call(obj, 'options')) {\n obj.options = obj.options ? create(obj.options) : {};\n }\n\n for (var i in options) {\n obj.options[i] = options[i];\n }\n\n return obj.options;\n } // @function getParamString(obj: Object, existingUrl?: String, uppercase?: Boolean): String", "function _setOptions(obj, options) {\n options = options || {};\n obj.separator = (typeof options.separator !== 'undefined') ? options.separator : ',';\n obj.quotechar = (typeof options.quote !== 'undefined') ? options.quote : '\"';\n obj.escapechar = (typeof options.escape !== 'undefined') ? options.escape : '\"';\n obj.commentchar = (typeof options.comment !== 'undefined') ? options.comment : '';\n obj.columnNames = (typeof options.columnNames !== 'undefined') ? options.columnNames : [];\n obj.columnsFromHeader = (typeof options.columnsFromHeader !== 'undefined') ? options.columnsFromHeader : false;\n obj.nestedQuotes = (typeof options.nestedQuotes !== 'undefined') ? options.nestedQuotes : false;\n obj.escapeFormulas = (typeof options.escapeFormulas !== 'undefined') ? options.escapeFormulas : false;\n}", "function arrayToObject(option) {\n if (typeOf(option) == \"array\") {\n option = {\n \"value\": option[0],\n \"text\": option[1] || option[0],\n };\n }\n return option;\n }", "static _normalizeOptions (options) {\n return options\n }", "ParseOptions(rawOptions) {\n let parsedOptions = {};\n let rawOptionList = rawOptions.split(/ -/);\n for (let i = 0; i < rawOptionList.length; i++) {\n let optionString = rawOptionList[i];\n if (/(\\S+) (.*)/.test(optionString)) {\n parsedOptions[RegExp.$1] = RegExp.$2;\n }\n }\n return parsedOptions;\n }", "function getOptions() {\n const o = {};\n input.forEach(i => {\n if(i.slice(0,2) !== '--') return; // we don't deal with unknown params\n const [option,value] = i.slice(2).split('=');\n o[option] = value || true;\n });\n return o;\n}", "convertOptions (opts) {\n return opts;\n }", "function fromQueryStringWithOptions(obj, opts) {\n var str = String(obj || '').replace(/^.*?\\?/, ''), result = {}, auto;\n opts = opts || {};\n if (str) {\n forEach(str.split('&'), function(p) {\n var split = p.split('=');\n var key = decodeURIComponent(split[0]);\n var val = split.length === 2 ? decodeURIComponent(split[1]) : '';\n auto = opts.auto !== false;\n parseQueryComponent(result, key, val, opts.deep, auto, opts.separator, opts.transform);\n });\n }\n return result;\n }", "function normalizeOptions(options) {\n options = options || {};\n return {\n concatMessages: options.concatMessages === undefined ? true : Boolean(options.concatMessages),\n format: options.format === undefined ? format$3\n : (typeof options.format === \"function\" ? options.format : false),\n };\n}", "function normalizeOptions(options) {\n return {\n // TODO: Remove the \"getPath\" fallback in the next minor release\n map: options.map || options.getPath || String,\n sep: options.sep || path.sep,\n };\n}", "function fromQueryStringWithOptions(obj, opts) {\n var str = String(obj || '').replace(/^.*?\\?/, ''), result = {}, auto;\n opts = opts || {};\n if (str) {\n forEach(str.split('&'), function(p) {\n var split = p.split('=');\n var key = decodeURIComponent(split[0]);\n var val = split.length === 2 ? decodeURIComponent(split[1]) : '';\n auto = opts.auto !== false;\n parseQueryComponent(result, key, val, opts.deep, auto, opts.separator, opts.transform);\n });\n }\n return result;\n}", "function normalizeOption(option) {\n if (isString(option)) {\n return normalizeStringOption(option);\n } else if (isGroup(option)) {\n const {\n title,\n options\n } = option;\n return {\n title,\n options: options.map(option => {\n return isString(option) ? normalizeStringOption(option) : option;\n })\n };\n }\n\n return option;\n}", "function normalizeOption(option) {\n if (isString(option)) {\n return normalizeStringOption(option);\n } else if (isGroup(option)) {\n var title = option.title,\n options = option.options;\n\n return {\n title: title,\n options: options.map(function (option) {\n return isString(option) ? normalizeStringOption(option) : option;\n })\n };\n }\n return option;\n}", "function handleOptions(object, options, incremental) {\n // options = _.extend(object.options || {}, options);\n options = (options || {});\n if (!incremental) {\n object.options = options;\n }\n\n // override properties with options if specified\n _.each(object.optionProperties, function (property) {\n if (options[property]) {\n object[property] = options[property];\n }\n });\n }", "function prepareOptions(options){\n\n\n //if options isnt instance of GeneralOptions\n if (!(options instanceof GeneralOptions)) {\n \n\n //var generalOptions = new GeneralOptions\n var generalOptions = new GeneralOptions();\n //for each own property key,value in options\n var value=undefined;\n for ( var key in options)if (options.hasOwnProperty(key)){value=options[key];\n {\n //generalOptions.setProperty key, value\n generalOptions.setProperty(key, value);\n }\n \n }// end for each property\n //end for\n //options = generalOptions\n \n //options = generalOptions\n options = generalOptions;\n };\n\n\n //options.version = version\n options.version = module.exports.version;\n\n //return options\n return options;\n }", "formatReplaceOption(option) {\n if (option instanceof Array) {\n // return a new copy of the array\n return utils_1.deepClone(option);\n }\n // convert object option to array one\n const replaceArr = [];\n for (const key in option) {\n /* istanbul ignore else */\n if (Object.prototype.hasOwnProperty.call(option, key)) {\n replaceArr.push([key, option[key]]);\n }\n }\n return replaceArr;\n }", "function options (str) {\n var sep = /;/.test(str)\n ? ';'\n : '&';\n\n var ret = qs.parse(str, sep);\n\n Object.keys(ret).forEach(function (key) {\n var val = ret[key];\n if ('readPreferenceTags' == key) {\n val = readPref(val);\n if (val) {\n ret[key] = Array.isArray(val)\n ? val\n : [val];\n }\n } else {\n ret[key] = format(val);\n }\n });\n\n return ret;\n}", "function w_options (wOo) {\n\treturn (typeof wOo === 'string') ? {\n\t\tw: wOo || this.word || this.input || '',\n\t\toptions: {}\n\t} : {\n\t\tw: this.word || this.input || '',\n\t\toptions: (obj(wOo)) ? wOo : {}\n\t}\n}", "function normalizeOptions(options) {\n options = options || {};\n return {\n concatMessages: options.concatMessages === undefined ? true : Boolean(options.concatMessages),\n format: options.format === undefined ? isomorphic_node_1.format\n : (typeof options.format === \"function\" ? options.format : false),\n };\n}", "function createOptions(options){var object={};jQuery.each(options.match(rnotwhite)||[],function(_,flag){object[flag]=true;});return object;}", "function createOptions(options){var object={};jQuery.each(options.match(rnotwhite)||[],function(_,flag){object[flag]=true;});return object;}", "function createOptions(options){var object={};jQuery.each(options.match(rnotwhite)||[],function(_,flag){object[flag]=true;});return object;}", "function createOptions(options){var object={};jQuery.each(options.match(rnotwhite)||[],function(_,flag){object[flag]=true;});return object;}", "function buildSelectOptions(obj){\n //obj.options[1] = new Option(\"addData\", \"Add Data\", true, false);\n obj.options[1] = new Option(\"Add Data\");\n obj.options[2] = new Option(\"Find Document\");\n obj.options[3] = new Option(\"Replace Document\");\n obj.options[4] = new Option(\"Remove Document\");\n obj.options[5] = new Option(\"Count Documents\");\n obj.options[6] = new Option(\"Adapter Integration\");\n obj.options[7] = new Option(\"File Info\");\n if(options.username != undefined && options.password != undefined){\n obj.options[8] = new Option(\"Change Password\");\n }\n\n}", "function pixasticOptionsObject(o){\r\n\t\t\tvar finalObject = {};\r\n\t\t\tfor(var i = 0, j = o.length; i < j; i += 1){\r\n\t\t\t\tvar pairs = o[i].split(\":\");\r\n\t\t\t\tfinalObject[pairs[0]] = pairs[1];\r\n\t\t\t}\r\n\t\t\tfinalObject['retinaReady'] = s.retinaReady;\r\n\t\t\tfinalObject['devicePixelRatio'] = s.devicePixelRatio;\r\n\t\t\treturn finalObject;\r\n\t\t}", "_sanitizeOption(options, name) {\n let optionValue = options[name];\n if (!optionValue) {\n logger.warn('Missing', name, 'parameter');\n return false;\n }\n\n try {\n this.options[name] = typeof (this.options[name]) === 'string' ?\n JSON.parse(this.options[name]) : this.options[name];\n\n return true;\n } catch (e) {\n logger.error(e);\n throw name + ' parameter is expected to be a valid stringified JSON object';\n }\n }", "function createOptions( options ) {\n var object = {};\n jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n object[ flag ] = true;\n } );\n return object;\n }", "function sanitizeOptions(metadataOrOptions, ss58Format = constants_1.KUSAMA_SS58_FORMAT) {\n // Passing a string as second argument (for metadataRpc) is deprecated. We\n // still add the following check for backwards-compatibility.\n if (typeof metadataOrOptions === 'string') {\n return {\n metadata: metadataOrOptions,\n registry: getRegistry(),\n ss58Format\n };\n }\n else {\n return {\n metadata: metadataOrOptions.metadata,\n registry: metadataOrOptions.registry || getRegistry(),\n ss58Format: metadataOrOptions.ss58Format || constants_1.KUSAMA_SS58_FORMAT\n };\n }\n}", "function createOptions( options ) {\n \tvar object = {};\n \tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n \t\tobject[ flag ] = true;\n \t} );\n \treturn object;\n }", "function normalizeProps(options){var props=options.props;if(!props){return;}var res={};var i,val,name;if(Array.isArray(props)){i=props.length;while(i--){val=props[i];if(typeof val==='string'){name=camelize(val);res[name]={type:null};}else{warn('props must be strings when using array syntax.');}}}else if(isPlainObject(props)){for(var key in props){val=props[key];name=camelize(key);res[name]=isPlainObject(val)?val:{type:val};}}options.props=res;}", "function createOptions( options ) {\n\t\tvar object = {};\n\t\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\t\tobject[ flag ] = true;\n\t\t} );\n\t\treturn object;\n\t}", "function createOptions( options ) {\n\t\tvar object = {};\n\t\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\t\tobject[ flag ] = true;\n\t\t} );\n\t\treturn object;\n\t}", "function createOptions( options ) {\n\t\tvar object = {};\n\t\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\t\tobject[ flag ] = true;\n\t\t} );\n\t\treturn object;\n\t}", "function createOptions( options ) {\n\t\tvar object = {};\n\t\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\t\tobject[ flag ] = true;\n\t\t} );\n\t\treturn object;\n\t}", "function createOptions( options ) {\n\t\tvar object = {};\n\t\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\t\tobject[ flag ] = true;\n\t\t} );\n\t\treturn object;\n\t}", "function createOptions( options ) {\n\t\tvar object = {};\n\t\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\t\tobject[ flag ] = true;\n\t\t} );\n\t\treturn object;\n\t}", "function createOptions( options ) {\n\t\tvar object = {};\n\t\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\t\tobject[ flag ] = true;\n\t\t} );\n\t\treturn object;\n\t}", "function createOptions( options ) {\n\t\tvar object = {};\n\t\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\t\tobject[ flag ] = true;\n\t\t} );\n\t\treturn object;\n\t}", "function createOptions( options ) {\n\t\tvar object = {};\n\t\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\t\tobject[ flag ] = true;\n\t\t} );\n\t\treturn object;\n\t}", "function createOptions( options ) {\n\t\tvar object = {};\n\t\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\t\tobject[ flag ] = true;\n\t\t} );\n\t\treturn object;\n\t}", "function createOptions( options ) {\n\t\tvar object = {};\n\t\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\t\tobject[ flag ] = true;\n\t\t} );\n\t\treturn object;\n\t}", "function createOptions( options ) {\n\t\tvar object = {};\n\t\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\t\tobject[ flag ] = true;\n\t\t} );\n\t\treturn object;\n\t}", "function createOptions( options ) {\n\t\tvar object = {};\n\t\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\t\tobject[ flag ] = true;\n\t\t} );\n\t\treturn object;\n\t}", "function createOptions( options ) {\n\t\tvar object = {};\n\t\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\t\tobject[ flag ] = true;\n\t\t} );\n\t\treturn object;\n\t}", "function createOptions( options ) {\n\t\tvar object = {};\n\t\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\t\tobject[ flag ] = true;\n\t\t} );\n\t\treturn object;\n\t}", "function createOptions( options ) {\n\t\tvar object = {};\n\t\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\t\tobject[ flag ] = true;\n\t\t} );\n\t\treturn object;\n\t}", "function createOptions( options ) {\n\t\tvar object = {};\n\t\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\t\tobject[ flag ] = true;\n\t\t} );\n\t\treturn object;\n\t}", "function createOptions( options ) {\n\t\tvar object = {};\n\t\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\t\tobject[ flag ] = true;\n\t\t} );\n\t\treturn object;\n\t}", "function createOptions( options ) {\n var object = {};\n jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) {\n object[ flag ] = true;\n } );\n return object;\n }" ]
[ "0.6646514", "0.66005486", "0.66005486", "0.66005486", "0.649457", "0.63181406", "0.62969595", "0.62960297", "0.62944365", "0.62496066", "0.62457913", "0.61913466", "0.615734", "0.6145045", "0.61051947", "0.60929805", "0.6089481", "0.6005777", "0.59753966", "0.59635246", "0.5947349", "0.5885539", "0.5802541", "0.57799286", "0.57799286", "0.57799286", "0.57799286", "0.5755691", "0.5748193", "0.57420194", "0.5720485", "0.5720472", "0.5712826", "0.57026464", "0.57002646", "0.57002646", "0.57002646", "0.57002646", "0.57002646", "0.57002646", "0.57002646", "0.57002646", "0.57002646", "0.57002646", "0.57002646", "0.57002646", "0.57002646", "0.57002646", "0.57002646", "0.57002646", "0.57002646", "0.57002646", "0.570016" ]
0.0
-1
The ready event handler and self cleanup method
function completed() { document.removeEventListener( "DOMContentLoaded", completed ); window.removeEventListener( "load", completed ); jQuery.ready(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function readyCallBack() {\n}", "static ready() { }", "onReady() {}", "ready() {\r\n\t\tsuper.ready();\r\n\t}", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n }", "function readyHandler() {\n\t\t\tif (!eventUtils.domLoaded) {\n\t\t\t\teventUtils.domLoaded = true;\n\t\t\t\tcallback(event);\n\t\t\t}\n\t\t}", "function readyHandler() {\n\t\t\tif (!eventUtils.domLoaded) {\n\t\t\t\teventUtils.domLoaded = true;\n\t\t\t\tcallback(event);\n\t\t\t}\n\t\t}", "function readyHandler() {\n\t\t\tif (!eventUtils.domLoaded) {\n\t\t\t\teventUtils.domLoaded = true;\n\t\t\t\tcallback(event);\n\t\t\t}\n\t\t}", "function readyHandler() {\n\t\t\tif (!eventUtils.domLoaded) {\n\t\t\t\teventUtils.domLoaded = true;\n\t\t\t\tcallback(event);\n\t\t\t}\n\t\t}", "function ready() {\n conn.on('close', function() {\n status.textContent = 'Connection closed';\n status.className = classNames.warning;\n conn = null;\n });\n }", "ready() { }", "ready() { }", "ready() { }", "ready() { }", "ready() { }", "ready() { }", "ready() { }", "ready() { }", "ready() {\n super.ready();\n\n\n }", "function onReady() {\n\t// TODO\n}", "ready() {}", "ready() {}", "ready() {}", "function completed() {\n document.removeEventListener(\"DOMContentLoaded\", completed);\n window.removeEventListener(\"load\", completed);\n jQuery.ready();\n }", "ready() {\n this._root = this._createRoot();\n super.ready();\n this._firstRendered();\n }", "function initializationCleanUp() {\n //console.debug('Cleaning up of all data..');\n\t\t\t//console.debug('Cleaning up of all data is done..');\n }", "function completed() {\n // readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n if (document.addEventListener || window.event.type === \"load\" || document.readyState === \"complete\") {\n detach();\n jQuery.ready();\n }\n }", "ready() {\n this.isReady = true;\n if (this.onLoad) {\n this.onLoad.call();\n }\n }", "ready() {\n super.ready();\n\n const that = this;\n\n //a flag used to avoid animations on startup\n that._isInitializing = true;\n\n that._createLayout();\n that._setFocusable();\n\n delete that._isInitializing;\n }", "ready() {\r\n\t\t// Override this\r\n\t\tthis.updateTitle();\r\n\t}", "function onloadHandler(){\n console.info(\"Nick Cage is ready!\");\n // where the magic happens\n replaceAllElements();\n }", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n }", "function onReady () {\n restoreTime()\n }", "function completed() {\n document.removeEventListener( \"DOMContentLoaded\", completed );\n window.removeEventListener( \"load\", completed );\n jQuery.ready();\n }", "function completed() {\n // readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n if (document.addEventListener || event.type === \"load\" || document.readyState === \"complete\") {\n detach();\n jQuery.ready();\n }\n }", "onPageReady () {}", "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 completed(){document.removeEventListener(\"DOMContentLoaded\",completed);window.removeEventListener(\"load\",completed);jQuery.ready();}", "function completed(){document.removeEventListener(\"DOMContentLoaded\",completed);window.removeEventListener(\"load\",completed);jQuery.ready();}", "function initOnDomReady() {}", "ready() {\n super.ready();\n this._createElement();\n }", "function onDOMReady() {\n // Make sure that the DOM is not already loaded\n if (isReady) return;\n // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).\n if (!document.body) return setTimeout(onDOMReady, 0);\n // Remember that the DOM is ready\n isReady = true;\n // Make sure this is always async and then finishin init\n setTimeout(function() {\n app._finishInit();\n }, 0);\n }", "function completed() {\n // readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n if ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n detach();\n jQuery.ready();\n }\n }", "function completed(){document.removeEventListener(\"DOMContentLoaded\",completed,false);window.removeEventListener(\"load\",completed,false);jQuery.ready();}", "function completed() {\n\n // readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n if (document.addEventListener ||\n window.event.type === \"load\" ||\n document.readyState === \"complete\") {\n\n detach();\n jQuery.ready();\n }\n }", "function completed() {\n\n // readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n if (document.addEventListener ||\n window.event.type === \"load\" ||\n document.readyState === \"complete\") {\n\n detach();\n jQuery.ready();\n }\n }", "function completed() {\n\n // readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n if ( document.addEventListener ||\n window.event.type === \"load\" ||\n document.readyState === \"complete\" ) {\n\n detach();\n jQuery.ready();\n }\n }", "function onoptionsready() {\n\t this.initialize(bind(oninitialized, this));\n\t }", "function p() {\n ne.removeEventListener(\"DOMContentLoaded\", p), e.removeEventListener(\"load\", p), \n he.ready();\n }", "function completed() {\n\t\t\tdocument.removeEventListener( \"DOMContentLoaded\", completed );\n\t\t\twindow.removeEventListener( \"load\", completed );\n\t\t\tjQuery.ready();\n\t\t}", "function completed() {\n document.removeEventListener(\"DOMContentLoaded\", completed, false);\n window.removeEventListener(\"load\", completed, false);\n jQuery.ready();\n }", "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 documentReadyFunction() {\n onPageLoadOrResize();\n onPageLoad();\n }", "ready() {\n const that = this;\n\n super.ready();\n\n that._isParentPositionStatic = window.getComputedStyle(that.parentElement || document.querySelector('body')).position === 'static';\n that._handleSelector(that.selector);\n\n if (that.visible) {\n that._applyPosition();\n }\n\n that._handleEventListeners();\n that._handleResize();\n\n that.value = that.$.content.innerHTML = that.value ? that.value : that.innerHTML;\n that._handleTemplate();\n }", "function completed() {\n document.removeEventListener(\"DOMContentLoaded\", completed);\n window.removeEventListener(\"load\", completed);\n jQuery.ready();\n }", "function completed() {\n document.removeEventListener(\"DOMContentLoaded\", completed);\n window.removeEventListener(\"load\", completed);\n jQuery.ready();\n }", "function completed() {\n document.removeEventListener(\"DOMContentLoaded\", completed);\n window.removeEventListener(\"load\", completed);\n jQuery.ready();\n }", "function completed() {\n document.removeEventListener(\"DOMContentLoaded\", completed);\n window.removeEventListener(\"load\", completed);\n jQuery.ready();\n }", "function completed(){document.removeEventListener(\"DOMContentLoaded\",completed);window.removeEventListener(\"load\",completed);jQuery.ready();}// Catch cases where $(document).ready() is called", "function completed(){document.removeEventListener(\"DOMContentLoaded\",completed);window.removeEventListener(\"load\",completed);jQuery.ready();}// Catch cases where $(document).ready() is called", "function completed(){document.removeEventListener(\"DOMContentLoaded\",completed);window.removeEventListener(\"load\",completed);jQuery.ready();}// Catch cases where $(document).ready() is called", "function completed(){document.removeEventListener(\"DOMContentLoaded\",completed);window.removeEventListener(\"load\",completed);jQuery.ready();}// Catch cases where $(document).ready() is called", "function qodefOnDocumentReady() {\n qodefInitQuantityButtons();\n qodefInitButtonLoading();\n qodefInitSelect2();\n\t qodefInitSingleProductLightbox();\n }", "function ready () {\n\t\t this._isAttached = true\n\t\t this._isReady = true\n\t\t this._callHook('ready')\n\t\t}", "function completed() {\n document.removeEventListener(\"DOMContentLoaded\", completed, false);\n window.removeEventListener(\"load\", completed, false);\n jQuery.ready();\n }", "function DOMReady() {\n }", "ready() {\n const that = this;\n\n super.ready();\n that._handleMultipleCheckedInstances();\n that._updateHidenInputNameAndValue();\n }", "ready() {\n const that = this;\n\n super.ready();\n that._handleMultipleCheckedInstances();\n that._updateHidenInputNameAndValue();\n }", "function init() {\n if (!ready) {\n ready = true;\n initElements();\n }\n }", "onReady() {\n\n }", "function completed() {\n\n\t\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\t\tif (document.addEventListener || window.event.type === \"load\" || document.readyState === \"complete\") {\n\n\t\t\tdetach();\n\t\t\tjQuery.ready();\n\t\t}\n\t}", "function o(){ne.removeEventListener(\"DOMContentLoaded\",o),_.removeEventListener(\"load\",o),me.ready()}", "function ready() {\n\t this._isAttached = true;\n\t this._isReady = true;\n\t this._callHook('ready');\n\t }", "function ready() {\n\t this._isAttached = true;\n\t this._isReady = true;\n\t this._callHook('ready');\n\t }", "function ready() {\n\t this._isAttached = true;\n\t this._isReady = true;\n\t this._callHook('ready');\n\t }", "function ready() {\n\t this._isAttached = true;\n\t this._isReady = true;\n\t this._callHook('ready');\n\t }", "function ready() {\n\t this._isAttached = true;\n\t this._isReady = true;\n\t this._callHook('ready');\n\t }", "function ready() {\n\t this._isAttached = true;\n\t this._isReady = true;\n\t this._callHook('ready');\n\t }", "function ready() {\n\t this._isAttached = true;\n\t this._isReady = true;\n\t this._callHook('ready');\n\t }", "function onReadyCallBack() {\n self.startupTime = performance.now() - self.startupTime;\n Logger.system.debug(\"WINDOW LIFECYCLE:STARTUP:RouterClient Ready\");\n isRouterReady = true;\n // console.profileEnd(\"Router\");\n // invoke all the parent callbacks waiting for router to be ready\n while (parentReadyCallbackQueue.length > 0) {\n Logger.system.debug(\"WINDOW LIFECYCLE:STARTUP:RouterClient parentReady invoked\");\n var nextParentCallback = parentReadyCallbackQueue.shift();\n nextParentCallback();\n }\n }", "function completed() {\n\t\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\t\tif ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n\t\t\tdetach();\n\t\t\tjQuery.ready();\n\t\t}\n\t}", "function completed() {\n\t\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\t\tif ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n\t\t\tdetach();\n\t\t\tjQuery.ready();\n\t\t}\n\t}", "function completed() {\n\t\tdocument.removeEventListener(\"DOMContentLoaded\", completed);\n\t\twindow.removeEventListener(\"load\", completed);\n\t\tjQuery.ready();\n\t}", "function completed() {\n\t\tdocument.removeEventListener(\"DOMContentLoaded\", completed);\n\t\twindow.removeEventListener(\"load\", completed);\n\t\tjQuery.ready();\n\t}", "function completed() {\n\t\tdocument.removeEventListener(\"DOMContentLoaded\", completed);\n\t\twindow.removeEventListener(\"load\", completed);\n\t\tjQuery.ready();\n\t}", "function completed() {\n\t\tdocument.removeEventListener(\"DOMContentLoaded\", completed);\n\t\twindow.removeEventListener(\"load\", completed);\n\t\tjQuery.ready();\n\t}", "async _onReady() {\n // Make the editor \"complex.\" This \"fluffs\" out the DOM and makes the\n // salient controller objects.\n this._editorComplex =\n new EditorComplex(this._sessionInfo, this._window, this._editorNode);\n\n await this._editorComplex.whenReady();\n this._recoverySetup();\n }", "function onInit() {\r\n\r\n Event.onDOMReady(onDOMReady, this.cfg.getProperty(\"container\"), this);\r\n\r\n }" ]
[ "0.72463065", "0.7211212", "0.7172562", "0.7149137", "0.70596856", "0.70596856", "0.70596856", "0.70596856", "0.70596856", "0.70596856", "0.70596856", "0.70596856", "0.70596856", "0.70596856", "0.70596856", "0.70596856", "0.7042607", "0.7042607", "0.7042607", "0.7042607", "0.6912024", "0.6910091", "0.6910091", "0.6910091", "0.6910091", "0.6910091", "0.6910091", "0.6910091", "0.6910091", "0.68593514", "0.67058414", "0.67045325", "0.67045325", "0.67045325", "0.6658347", "0.6649914", "0.66455567", "0.6641658", "0.66399616", "0.6625674", "0.66216993", "0.6583961", "0.65647024", "0.65647024", "0.65647024", "0.65499115", "0.6545894", "0.65225387", "0.6500882", "0.6499929", "0.6497107", "0.6497107", "0.64904624", "0.6481251", "0.64749104", "0.6472662", "0.64680004", "0.6461095", "0.6461095", "0.6457884", "0.6455628", "0.64436525", "0.64414144", "0.6421948", "0.6420737", "0.64206946", "0.6419118", "0.64183176", "0.64183176", "0.64183176", "0.64183176", "0.641613", "0.641613", "0.641613", "0.641613", "0.6411604", "0.641002", "0.63979137", "0.6396145", "0.63805586", "0.63805586", "0.63742685", "0.63668334", "0.6358089", "0.63529384", "0.6343617", "0.6343617", "0.6343617", "0.6343617", "0.6343617", "0.6343617", "0.6343617", "0.6335575", "0.6327148", "0.6327148", "0.632598", "0.632598", "0.632598", "0.632598", "0.6325359", "0.6321197" ]
0.0
-1
Used by camelCase as callback to replace()
function fcamelCase( _all, letter ) { return letter.toUpperCase(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function camelCase(name) { return name.replace(/-([a-z])/g,camelCase_replace); }", "function camelize() {\n return function (str) {\n var i;\n // Split string into substring's without \"-\".\n str = str.split(\"-\");\n for (i = 0; i < str.length; i += 1) {\n // Use function from 2.1.\n str[i] = ucFirst()(str[i]);\n }\n return str.join(\"\");\n }\n }", "function fcamelCase(all,letter){return letter.toUpperCase();}// Convert dashed to camelCase; used by the css and data modules", "function camelize(s) {\n\t return s.replace(/-(\\w)/g, function (strMatch, p1){\n\t return p1.toUpperCase();\n\t });\n\t}", "function camelCase() {\n utilitymanager_1.um.utilityManager({\n utilType: utilitymanager_1.um.TIXUtilityType.utInTransform,\n sp: utilitymanager_1.um.TIXSelPolicy.Word,\n pat: /\\b(_*\\w)/g, repl: function (_match, p1) { return p1.toLowerCase(); },\n });\n }", "camelize(s){\n return s.replace (/(?:^|[-_])(\\w)/g, function (_, c) {\n return c ? c.toUpperCase () : '';\n })\n }", "function camelCase(str){return str.replace(/-[a-z]/g,function(str){return str.charAt(1).toUpperCase();});}", "function myReplace2(str, before, after) {\n // Check if first character of argument \"before\" is a capital or lowercase letter and change the first character of argument \"after\" to match the case\n if (/^[A-Z]/.test(before)) {\n after = after[0].toUpperCase() + after.substring(1)\n } else {\n after = after[0].toLowerCase() + after.substring(1)\n }\n\n // return string with argument \"before\" replaced by argument \"after\" (with correct case)\n return str.replace(before, after);\n}", "function myReplace2(str, before, after) {\n // Check if first character of argument \"before\" is a capital or lowercase letter and change the first character of argument \"after\" to match the case\n if (/^[A-Z]/.test(before)) {\n //change after letter to uppercase if before letter is uppercase\n after = after[0].toUpperCase() + after.substring(1)\n } else {\n //change after letter to lowercase if before letter is lowercase\n after = after[0].toLowerCase() + after.substring(1)\n }\n\n // return string with argument \"before\" replaced by argument \"after\" (with correct case)\n return str.replace(before, after);\n}", "function camelCase(name) { // 2689\n return name. // 2690\n replace(SPECIAL_CHARS_REGEXP, function(_, separator, letter, offset) { // 2691\n return offset ? letter.toUpperCase() : letter; // 2692\n }). // 2693\n replace(MOZ_HACK_REGEXP, 'Moz$1'); // 2694\n} // 2695", "_camelize(_str) {\n return _str.replace(/((-)([a-z])(\\w))/g, ($0, $1, $2, $3, $4) => {\n return $3.toUpperCase() + $4;\n });\n }", "_camelize(_str) {\n return _str.replace(/((-)([a-z])(\\w))/g, ($0, $1, $2, $3, $4) => {\n return $3.toUpperCase() + $4;\n });\n }", "_deCamelize(_str) {\n return _str.replace(/(([A-Z])(\\w))/g, ($0, $1, $2, $3) => {\n return '-' + $2.toLowerCase() + $3;\n });\n }", "_deCamelize(_str) {\n return _str.replace(/(([A-Z])(\\w))/g, ($0, $1, $2, $3) => {\n return '-' + $2.toLowerCase() + $3;\n });\n }", "function capitalizer(str, position) {\r\n}", "function camelize(s) {\n return s.replace(/-(.)/g, function(m, m1) {\n return m1.toUpperCase();\n });\n }", "function camelCase(string){return string.replace(rmsPrefix,\"ms-\").replace(rdashAlpha,fcamelCase);}", "function uncamel(a){return a.replace(/([A-Z])/g,function(a){return\"-\"+a.toLowerCase()})}", "function uncamel(a){return a.replace(/([A-Z])/g,function(a){return\"-\"+a.toLowerCase()})}", "function camelCaseCSS(str) {\n return str.replace(/\\-([a-z])/g, \n\t\t function (whole, section) {\n\t\t\t return section.toUpperCase();\n\t\t });\n }", "function myReplace(str, before, after) {\n var index = str.indexOf(before);\n if(str[index] === str[index].toUpperCase() ) {\n after = after.charAt(0).toUpperCase() + after.slice(1);\n } else {\n after = after.charAt(0).toLowerCase() + after.slice(1);\n }\n str = str.replace(before, after);\n \n return str;\n \n }", "function uncamel(e){return e.replace(/([A-Z])/g,function(e){return\"-\"+e.toLowerCase()})}", "function uncamel(e){return e.replace(/([A-Z])/g,function(e){return\"-\"+e.toLowerCase()})}", "function uncamel(e){return e.replace(/([A-Z])/g,function(e){return\"-\"+e.toLowerCase()})}", "static myReplace(str, toReplace, withStr) {\n\n let firstLetter = withStr.charAt(0).toLowerCase();\n if(toReplace.charAt(0) == toReplace.charAt(0).toUpperCase()) {\n firstLetter = withStr.charAt(0).toUpperCase();\n } \n withStr = firstLetter + withStr.slice(1);\n\n return str.replace(toReplace, withStr);\n\n }", "function myReplace(str, before, after) {\n after = (before[0] === before[0].toUpperCase()) ? after[0].toUpperCase() + after.substring(1) : after;\n return str.replace(before, after);\n}", "function camelCase( string ) {\n\treturn string.replace( rdashAlpha, fcamelCase );\n}", "static capitalize(){\r\n \r\n }", "function caseEHandler(event, _this, toLowerCase) {\n var editor = atom.workspace.getActiveTextEditor();\n var originalText = document.getElementById(\"originalText\").getModel().getText();\n\n editor.insertText((toLowerCase ? originalText.toLowerCase() : originalText.toUpperCase()));\n}", "function upperCase(name){\n\n}", "function camelCase(str) {\n return str.replace(/\\W+(.)/g, function(str)\n {\n return str.toUpperCase();\n });\n}", "function CapitalizePipe() {\n }", "function myReplace(str, before, after) {\n // if char at first index of before matches itself made uppercase ->\n if (before[0] === before[0].toUpperCase()) {\n // first letter in after is replaced with itself uppercase \n after = after.replace(/[a-z]/i , after[0].toUpperCase());\n }\n // replace word (before) in str with after. Return str\n str = str.replace(before, after);\n return str;\n}", "function camelCase( string ) {\n \treturn string.replace( rmsPrefix, \"ms-\" ).replace( rdashAlpha, fcamelCase );\n }", "function camelCase$2(s) {\n // Convert first character to lowercase\n return s.replace(/^\\w/, function (match) {\n return match.toLowerCase();\n }).replace(/-\\w/g, function (match) {\n return match.charAt(1).toUpperCase();\n });\n}", "function myReplace(str, before, after) {\n var b = before.split('');\n var a = after.split('');\n if (b[0] === b[0].toUpperCase()){\n a[0] = a[0].toUpperCase();\n }\n else if (b[0] === b[0].toLowerCase()){\n a[0] = a[0].toLowerCase();\n }\n after = a.join('');\n\n return str.replace(before, after);\n}", "function myReplace(str, before, after) {\r\n\ts = str.split(' ');\r\n\ti = str.indexOf(before);\r\n\tfor (var i in s) {\r\n\t\tif (s[i] !== before)\r\n\t\t\tcontinue;\r\n\t\tif (s[i][0].toLowerCase() !== s[i][0]) {\r\n\t\t\ts[i] = after;\r\n\t\t\ts[i] = s[i][0].toUpperCase() + after.slice(1);\r\n\t\t} else {\r\n\t\t\ts[i] = after;\r\n\t\t}\r\n\t}\r\n\treturn s.join(' ');\r\n}", "function kebabToCamel(name){return name.replace(DASH_LOWERCASE_REGEXP,fnCamelCaseReplace);}", "function myReplace(str, before, after) {\n // Preserve the case && Strings are immutable\n if (before.toLowerCase() != before) {\n after = after.slice(0, 1).toUpperCase() + after.slice(1, after.length);\n }\n return str.replace(before, after);\n}", "function camelCase(str) {\n return str.replace(/-[a-z]/g, function(str) {\n return str.charAt(1).toUpperCase();\n });\n }", "function camelize(s) {\n return s.replace(/-([a-z])/g, function($0, $1) {\n return $1.toUpperCase();\n });\n }", "function applyCasing(source, target) {\r\n var targetArr = target.split(\"\");\r\n var sourceArr = source.split(\"\");\r\n for (var i = 0; i < Math.min(targetArr.length, sourceArr.length); i++) {\r\n if (/[A-Z]/.test(sourceArr[i])) {\r\n targetArr[i] = targetArr[i].toUpperCase();\r\n } else {\r\n targetArr[i] = targetArr[i].toLowerCase();\r\n }\r\n }\r\n return targetArr.join(\"\");\r\n }", "function fcamelCase( all, letter ) {\n return letter.toUpperCase();\n }", "function fcamelCase(all, letter) {\n return letter.toUpperCase();\n } // Convert dashed to camelCase; used by the css and data modules", "function fcamelCase(all, letter) {\n return letter.toUpperCase();\n } // Convert dashed to camelCase; used by the css and data modules", "function camelCase(name){return name.charAt(0).toUpperCase()+name.slice(1).replace(/-(\\w)/g,function(m,n){return n.toUpperCase();});}", "function fcamelCase( all, letter ) {\r\n\treturn letter.toUpperCase();\r\n}", "changeCase(pattern) {\n switch (pattern) {\n case 'camelcase':\n this.input = helpers_1.string.camelCase(this.input);\n return this;\n case 'pascalcase':\n const camelCase = helpers_1.string.camelCase(this.input);\n this.input = `${camelCase.charAt(0).toUpperCase()}${camelCase.slice(1)}`;\n return this;\n case 'snakecase':\n this.input = helpers_1.string.snakeCase(this.input);\n return this;\n default:\n return this;\n }\n }", "function myReplace(str, before, after) {\n var newBefore;\n if(before.toLowerCase() === before){\n //make after lower\n newBefore = after.toLowerCase();\n }else if(before.toUpperCase() === before){\n //make after upper\n newBefore = after.toUpperCase();\n }else {\n //make only first letter upper\n newBefore = after.replace(/(^[a-z])/,function (p) { return p.toUpperCase(); } );\n }\n\n return str.replace(before, newBefore);\n}", "function fcamelCase(_all, letter) {\n return letter.toUpperCase();\n } // Convert dashed to camelCase; used by the css and data modules", "function fcamelCase(_all, letter) {\n return letter.toUpperCase();\n } // Convert dashed to camelCase; used by the css and data modules", "function fcamelCase(_all, letter) {\n return letter.toUpperCase();\n } // Convert dashed to camelCase; used by the css and data modules", "function fcamelCase(_all, letter) {\n return letter.toUpperCase();\n } // Convert dashed to camelCase; used by the css and data modules", "function fcamelCase(_all, letter) {\n return letter.toUpperCase();\n } // Convert dashed to camelCase; used by the css and data modules", "function fcamelCase(_all, letter) {\n return letter.toUpperCase();\n } // Convert dashed to camelCase; used by the css and data modules", "function camelCase(str){\n\t str = toString(str);\n\t str = replaceAccents(str);\n\t str = removeNonWord(str)\n\t .replace(/[\\-_]/g, ' ') //convert all hyphens and underscores to spaces\n\t .replace(/\\s[a-z]/g, upperCase) //convert first char of each word to UPPERCASE\n\t .replace(/\\s+/g, '') //remove spaces\n\t .replace(/^[A-Z]/g, lowerCase); //convert first char to lowercase\n\t return str;\n\t }", "function camelCase(name){return name.replace(SPECIAL_CHARS_REGEXP,function(_,separator,letter,offset){return offset?letter.toUpperCase():letter;}).replace(MOZ_HACK_REGEXP,'Moz$1');}", "function camelCase(string) {\n var find = /(\\_\\w)/g;\n var convert = function convert(matches) {\n return matches[1].toUpperCase();\n };\n return string.replace(find, convert);\n}", "function myReplace(str, before, after) {\n // Check case if lower or upper\n if(before !== before.toLowerCase()){ // if upper\n after = after.charAt(0).toUpperCase() + after.slice(1);\n }\n return str.replace(before, after);\n}", "function toCamelCase(str){\n\n \n return str.toLowerCase().replace(/[-_](.)/g, function(match,group1){\n return group1.toUpperCase();\n });\n }", "function camelCase(s) {\r\n return s.toLowerCase().replace(/-(.)/g, function(m, g) {\r\n return g.toUpperCase()\r\n })\r\n}", "function myReplace (str, before, after) {\n let regexp = new RegExp(before, 'i');\n let match = str.match(regexp);\n let firstLetter = match[0][0];\n if (firstLetter === firstLetter.toUpperCase()) {\n after = after[0].toUpperCase() + after.substring(1);\n }\n\n return str.replace(regexp, after);\n}", "function fcamelCase( _all, letter ) {\n \treturn letter.toUpperCase();\n }", "function camelize(str) {\r\n return str.replace(/\\w+/g, function(match) {\r\n return match.charAt(0).toUpperCase() + match.substring(1).toLowerCase();\r\n });\r\n}", "function r(e){return e.replace(/([\\:\\-\\_]+(.))/g,(function(e,t,n,r){return r?n.toUpperCase():n}))}", "function myReplace(str, before, after) {\n \n // check if before word is uppercase and match case of after\n if (before[0] === before[0].toUpperCase()){\n var capitalizedAfter = after.replace(after[0], after[0].toUpperCase());\n return str.replace(before, capitalizedAfter);\n }\n\n // check if before word is lowercase and match case of after\n else if (before[0] === before[0].toLowerCase()){\n var lowercaseAfter = after.replace(after[0], after[0].toLowerCase());\n return str.replace(before, lowercaseAfter);\n }\n}", "function camelCase( string ) {\n return string.replace( rmsPrefix, \"ms-\" ).replace( rdashAlpha, fcamelCase );\n }", "function capitalize(str) {}", "function myReplace(str, before, after) {\n if (before[0] === before[0].toUpperCase()){\n let newAfter = after.charAt(0).toUpperCase() + after.slice(1)\n return str.replace(before, newAfter)\n }\n return str.replace(before, after);\n}", "function camelCase(str) {\n return str.replace(/[_.-](\\w|$)/g, function (_, x) { return x.toUpperCase(); });\n}", "function camelCase() {\n function onProcessStyle(style) {\n if (Array.isArray(style)) {\n // Handle rules like @font-face, which can have multiple styles in an array\n for (var index = 0; index < style.length; index++) {\n style[index] = convertCase(style[index]);\n }\n\n return style;\n }\n\n return convertCase(style);\n }\n\n function onChangeValue(value, prop, rule) {\n if (prop.indexOf('--') === 0) {\n return value;\n }\n\n var hyphenatedProp = hyphenate_style_name(prop); // There was no camel case in place\n\n if (prop === hyphenatedProp) return value;\n rule.prop(hyphenatedProp, value); // Core will ignore that property value we set the proper one above.\n\n return null;\n }\n\n return {\n onProcessStyle: onProcessStyle,\n onChangeValue: onChangeValue\n };\n}", "function fcamelCase( all, letter ) {\n return letter.toUpperCase();\n}", "function camelize(strText)\n{\n strText = replaceAll(ucfirst(strText), new Array('_', ' '), '-');\n var intPos = strText.indexOf('-');\n while (intPos != -1) {\n strText = strText.substr(0, intPos) + strText.substr(intPos + 1);\n var strCarac = strText[intPos];\n if (!empty(strCarac))\n strText = strText.substr(0, intPos) + strCarac.toUpperCase() + strText.substr(intPos + 1);\n intPos = strText.indexOf('-');\n }\n return strText;\n}", "function _toCamel(s)\n\t{\n\t\treturn String(s).replace(/(\\-[a-z])/g, function($1){\n\t\t\treturn $1.toUpperCase().replace('-','');\n\t\t});\n\t}", "function toCamelCase(str){\n\t\treturn str.replace(/\\-(\\w)/g, function(all, letter){\n     return letter.toUpperCase();\n    });\n\t}", "function thunk(str){return str.replace(/-/g,'_').toUpperCase();}", "function nameHandler2(name){\n // alert(\"in name handler\");\n console.log(\"old name: \"+name);\n //this below method works for c style but it may not work for js\n var newName = \"\";\n for (var i = 0; i < name.length; i++)\n\t{\n\t newName += name.charAt(i).toLowerCase();\n\t}//for\n newName = name.charAt(0).toUpperCase() + name.slice(1);\n console.log(\"new name: \"+newName);\n document.getElementById('LastName').value = newName;\n}//handler 2", "function fcamelCase( all, letter ) {\n\treturn letter.toUpperCase();\n}", "function fcamelCase( all, letter ) {\n\treturn letter.toUpperCase();\n}", "function fcamelCase( all, letter ) {\n\treturn letter.toUpperCase();\n}", "function fcamelCase( all, letter ) {\n\treturn letter.toUpperCase();\n}", "function fcamelCase( all, letter ) {\n\treturn letter.toUpperCase();\n}", "function fcamelCase( all, letter ) {\n\treturn letter.toUpperCase();\n}", "function fcamelCase( all, letter ) {\n\treturn letter.toUpperCase();\n}", "function fcamelCase( all, letter ) {\n\treturn letter.toUpperCase();\n}", "function fcamelCase( all, letter ) {\n\treturn letter.toUpperCase();\n}", "function fcamelCase( all, letter ) {\n\treturn letter.toUpperCase();\n}", "function fcamelCase( all, letter ) {\n\treturn letter.toUpperCase();\n}", "function fcamelCase( all, letter ) {\n\treturn letter.toUpperCase();\n}", "function fcamelCase( all, letter ) {\n\treturn letter.toUpperCase();\n}", "function fcamelCase( all, letter ) {\n\treturn letter.toUpperCase();\n}", "function fcamelCase( all, letter ) {\n\treturn letter.toUpperCase();\n}", "function fcamelCase( all, letter ) {\n\treturn letter.toUpperCase();\n}", "function fcamelCase( all, letter ) {\n\treturn letter.toUpperCase();\n}", "function fcamelCase( all, letter ) {\n\treturn letter.toUpperCase();\n}", "function fcamelCase( all, letter ) {\n\treturn letter.toUpperCase();\n}", "function fcamelCase( all, letter ) {\n\treturn letter.toUpperCase();\n}", "function fcamelCase( all, letter ) {\n\treturn letter.toUpperCase();\n}", "function fcamelCase( all, letter ) {\n\treturn letter.toUpperCase();\n}", "function fcamelCase( all, letter ) {\n\treturn letter.toUpperCase();\n}", "function fcamelCase( all, letter ) {\n\treturn letter.toUpperCase();\n}" ]
[ "0.71807325", "0.7025946", "0.69724524", "0.6946594", "0.691589", "0.69047016", "0.6889518", "0.6856401", "0.67825854", "0.6759434", "0.6723883", "0.6723883", "0.6720404", "0.6720404", "0.668707", "0.663834", "0.6632068", "0.66314816", "0.66314816", "0.6629163", "0.6625131", "0.66183907", "0.66183907", "0.66183907", "0.6616249", "0.65789133", "0.6557104", "0.6554994", "0.65403533", "0.6537644", "0.65323746", "0.64947855", "0.64934754", "0.6483258", "0.6482065", "0.64808685", "0.6477093", "0.64714277", "0.64666104", "0.6464313", "0.6456138", "0.6452887", "0.64493865", "0.6446328", "0.6446328", "0.6444357", "0.64277357", "0.6406948", "0.6399704", "0.63943464", "0.63943464", "0.63943464", "0.63943464", "0.63943464", "0.63943464", "0.63925344", "0.63849366", "0.6368813", "0.636834", "0.63611495", "0.63529205", "0.6341187", "0.6338555", "0.6333749", "0.6331873", "0.6330535", "0.63264495", "0.6320048", "0.6316911", "0.6309224", "0.6300861", "0.62880903", "0.6285288", "0.62797445", "0.6277628", "0.62730026", "0.62703884", "0.6264709", "0.6264709", "0.6264709", "0.6264709", "0.6264709", "0.6264709", "0.6264709", "0.6264709", "0.6264709", "0.6264709", "0.6264709", "0.6264709", "0.6264709", "0.6264709", "0.6264709", "0.6264709", "0.6264709", "0.6264709", "0.6264709", "0.6264709", "0.6264709", "0.6264709", "0.6264709", "0.6264709" ]
0.0
-1
Convert dashed to camelCase; used by the css and data modules Support: IE <=9 11, Edge 12 15 Microsoft forgot to hump their vendor prefix (9572)
function camelCase( string ) { return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fcamelCase(all,letter){return letter.toUpperCase();}// Convert dashed to camelCase; used by the css and data modules", "function fcamelCase(all, letter) {\n return letter.toUpperCase();\n } // Convert dashed to camelCase; used by the css and data modules", "function fcamelCase(all, letter) {\n return letter.toUpperCase();\n } // Convert dashed to camelCase; used by the css and data modules", "function fcamelCase(_all, letter) {\n return letter.toUpperCase();\n } // Convert dashed to camelCase; used by the css and data modules", "function fcamelCase(_all, letter) {\n return letter.toUpperCase();\n } // Convert dashed to camelCase; used by the css and data modules", "function fcamelCase(_all, letter) {\n return letter.toUpperCase();\n } // Convert dashed to camelCase; used by the css and data modules", "function fcamelCase(_all, letter) {\n return letter.toUpperCase();\n } // Convert dashed to camelCase; used by the css and data modules", "function fcamelCase(_all, letter) {\n return letter.toUpperCase();\n } // Convert dashed to camelCase; used by the css and data modules", "function fcamelCase(_all, letter) {\n return letter.toUpperCase();\n } // Convert dashed to camelCase; used by the css and data modules", "function dashedToCamel(str) {\n return str.replace(/-([a-z])/g, function (m, w) {\n return w.toUpperCase();\n });\n}", "function cssKebabToCamel(name){return kebabToCamel(name.replace(MS_HACK_REGEXP,'ms-'));}", "function kebabToCamel(name){return name.replace(DASH_LOWERCASE_REGEXP,fnCamelCaseReplace);}", "function camelCaseToDash(key) {\n return key.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();\n }", "function camelCaseToDash(key) {\n return key.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();\n }", "function camelCase( string ) {\n \treturn string.replace( rmsPrefix, \"ms-\" ).replace( rdashAlpha, fcamelCase );\n }", "function hyphenateStyleName(name){return name.replace(uppercasePattern,'-$1').toLowerCase().replace(msPattern,'-ms-');}", "function hyphenateStyleName(name){return name.replace(uppercasePattern,'-$1').toLowerCase().replace(msPattern,'-ms-');}", "function hyphenateStyleName(name){return name.replace(uppercasePattern,'-$1').toLowerCase().replace(msPattern,'-ms-');}", "function hyphenateStyleName(name){return name.replace(uppercasePattern,'-$1').toLowerCase().replace(msPattern,'-ms-');}", "function hyphenateStyleName(name){return name.replace(uppercasePattern,'-$1').toLowerCase().replace(msPattern,'-ms-');}", "function hyphenateStyleName(name){return name.replace(uppercasePattern,'-$1').toLowerCase().replace(msPattern,'-ms-');}", "function hyphenateStyleName(name){return name.replace(uppercasePattern,'-$1').toLowerCase().replace(msPattern,'-ms-');}", "function hyphenateStyleName(name){return name.replace(uppercasePattern,'-$1').toLowerCase().replace(msPattern,'-ms-');}", "function dasherizeToCamel(string) {\n return string.replace(/-([a-z])/g, function (g) {\n return g[1].toUpperCase();\n });\n}", "function camelCase( string ) {\n return string.replace( rmsPrefix, \"ms-\" ).replace( rdashAlpha, fcamelCase );\n }", "function camelToDash(str) {\n if (!str) return '';\n\n return str.replace(/\\W+/g, '-')\n .replace(/([a-z\\d])([A-Z])/g, '$1-$2');\n }", "function camelCase(name) { return name.replace(/-([a-z])/g,camelCase_replace); }", "function camelCase( string ) {\r\n\treturn string.replace( rmsPrefix, \"ms-\" ).replace( rdashAlpha, fcamelCase );\r\n}", "function camelToDashed(str) {\n return str.replace(/\\W+/g, '-').replace(/([a-z\\d])([A-Z])/g, '$1-$2').toLowerCase();\n}", "function _dasherize(str){return _decamelize(str).replace(/[ _]/g, '-')}", "function cssKebabToCamel(name) {\n\t return kebabToCamel(name.replace(MS_HACK_REGEXP, 'ms-'));\n\t}", "function cssKebabToCamel(name) {\n return kebabToCamel(name.replace(MS_HACK_REGEXP, 'ms-'));\n}", "function cssKebabToCamel(name) {\n return kebabToCamel(name.replace(MS_HACK_REGEXP, 'ms-'));\n}", "function cssKebabToCamel(name) {\n return kebabToCamel(name.replace(MS_HACK_REGEXP, 'ms-'));\n}", "function cssKebabToCamel(name) {\n return kebabToCamel(name.replace(MS_HACK_REGEXP, 'ms-'));\n}", "function cssKebabToCamel(name) {\n return kebabToCamel(name.replace(MS_HACK_REGEXP, 'ms-'));\n}", "function cssKebabToCamel(name) {\n return kebabToCamel(name.replace(MS_HACK_REGEXP, 'ms-'));\n}", "function cssKebabToCamel(name) {\n return kebabToCamel(name.replace(MS_HACK_REGEXP, 'ms-'));\n}", "function cssKebabToCamel(name) {\n return kebabToCamel(name.replace(MS_HACK_REGEXP, 'ms-'));\n}" ]
[ "0.87719417", "0.82715935", "0.82715935", "0.8218914", "0.8218914", "0.8218914", "0.8218914", "0.8218914", "0.8218914", "0.7790995", "0.74233943", "0.7285127", "0.72805285", "0.72805285", "0.7242771", "0.72315544", "0.72315544", "0.72315544", "0.72315544", "0.72315544", "0.72315544", "0.72315544", "0.72315544", "0.72107303", "0.7209059", "0.72068024", "0.7150317", "0.7135961", "0.7130346", "0.7111275", "0.71035415", "0.7096539", "0.7096539", "0.7096539", "0.7096539", "0.7096539", "0.7096539", "0.7096539", "0.7096539" ]
0.0
-1
Mark scripts as having already been evaluated
function setGlobalEval( elems, refElements ) { var i = 0, l = elems.length; for ( ; i < l; i++ ) { dataPriv.set( elems[ i ], "globalEval", !refElements || dataPriv.get( refElements[ i ], "globalEval" ) ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "globalEval() {\n // phase one, if we have head inserts, we build up those before going into the script eval phase\n let insertHeadElems = new ExtDomQuery_1.ExtDomQuery(...this.internalContext.getIf(Const_1.DEFERRED_HEAD_INSERTS).value);\n insertHeadElems.runHeadInserts(true);\n // phase 2 we run a script eval on all updated elements in the body\n let updateElems = new ExtDomQuery_1.ExtDomQuery(...this.internalContext.getIf(Const_1.UPDATE_ELEMS).value);\n updateElems.runCss();\n // phase 3, we do the same for the css\n updateElems.runScripts();\n }", "function captureInitialScripts(scripts) {\n initialScripts = scripts || querySelectorAll('script');\n}", "runScripts(sticky = false, whitelisted = DEFAULT_WHITELIST) {\n const evalCollectedScripts = (scriptsToProcess) => {\n if (scriptsToProcess.length) {\n // script source means we have to eval the existing\n // scripts before we run the 'include' command\n // this.globalEval(finalScripts.join(\"\\n\"));\n let joinedScripts = [];\n new Es2019Array(...scriptsToProcess).forEach(item => {\n if (!item.nonce) {\n joinedScripts.push(item.evalText);\n }\n else {\n if (joinedScripts.length) {\n this.globalEval(joinedScripts.join(\"\\n\"));\n joinedScripts.length = 0;\n }\n (!sticky) ?\n this.globalEval(item.evalText, item.nonce) :\n this.globalEvalSticky(item.evalText, item.nonce);\n }\n });\n if (joinedScripts.length) {\n (!sticky) ? this.globalEval(joinedScripts.join(\"\\n\")) :\n this.globalEvalSticky(joinedScripts.join(\"\\n\"));\n joinedScripts.length = 0;\n }\n scriptsToProcess = [];\n }\n return scriptsToProcess;\n };\n let finalScripts = [], allowedItemTypes = [\"\", \"script\", \"text/javascript\", \"text/ecmascript\", \"ecmascript\"], execScript = (item) => {\n var _a, _b, _c, _d;\n let tagName = item.tagName;\n let itemType = ((_a = item === null || item === void 0 ? void 0 : item.type) !== null && _a !== void 0 ? _a : '').toLowerCase();\n if (tagName &&\n eqi(tagName, \"script\") &&\n allowedItemTypes.indexOf(itemType) != -1) {\n let src = item.getAttribute('src');\n if ('undefined' != typeof src\n && null != src\n && src.length > 0) {\n let nonce = (_b = item === null || item === void 0 ? void 0 : item.nonce) !== null && _b !== void 0 ? _b : item.getAttribute('nonce').value;\n // we have to move this into an inner if because chrome otherwise chokes\n // due to changing the and order instead of relying on left to right\n // if jsf.js is already registered we do not replace it anymore\n if (whitelisted(src)) {\n // we run the collected scripts, before we run the 'include' command\n finalScripts = evalCollectedScripts(finalScripts);\n if (!sticky) {\n (!!nonce) ? this.loadScriptEval(src, 0, nonce) :\n // if no nonce is set we do not pass any once\n this.loadScriptEval(src, 0);\n }\n else {\n (!!nonce) ? this.loadScriptEvalSticky(src, 0, nonce) :\n // if no nonce is set we do not pass any once\n this.loadScriptEvalSticky(src, 0);\n }\n }\n }\n else {\n // embedded script auto eval\n // probably not needed anymore\n let evalText = trim(item.text || item.innerText || item.innerHTML);\n let go = true;\n while (go) {\n go = false;\n if (evalText.substring(0, 4) == \"<!--\") {\n evalText = evalText.substring(4);\n go = true;\n }\n if (evalText.substring(0, 4) == \"//<!--\") {\n evalText = evalText.substring(6);\n go = true;\n }\n if (evalText.substring(0, 11) == \"//<![CDATA[\") {\n evalText = evalText.substring(11);\n go = true;\n }\n }\n let nonce = (_d = (_c = item === null || item === void 0 ? void 0 : item.nonce) !== null && _c !== void 0 ? _c : item.getAttribute('nonce').value) !== null && _d !== void 0 ? _d : '';\n // we have to run the script under a global context\n // we store the script for fewer calls to eval\n finalScripts.push({\n nonce,\n evalText\n });\n }\n }\n };\n try {\n let scriptElements = new DomQuery(this.filterSelector(\"script\"), this.querySelectorAll(\"script\"));\n // script execution order by relative pos in their dom tree\n scriptElements.asArray\n .flatMap(item => [...item.values])\n .sort((node1, node2) => node1.compareDocumentPosition(node2) - 3) // preceding 2, following == 4)\n .forEach(item => execScript(item));\n evalCollectedScripts(finalScripts);\n }\n catch (e) {\n if (console && console.error) {\n // not sure if we\n // should use our standard\n // error mechanisms here\n // because in the head appendix\n // method only a console\n // error would be raised as well\n console.error(e.message || e.description);\n }\n }\n finally {\n // the usual ie6 fix code\n // the IE6 garbage collector is broken\n // nulling closures helps somewhat to reduce\n // mem leaks, which are impossible to avoid\n // at this browser\n execScript = null;\n }\n return this;\n }", "clearScripts() {\n this.scripts = {};\n }", "runScripts(sticky = false, whitelisted = DEFAULT_WHITELIST) {\n const evalCollectedScripts = (scriptsToProcess) => {\n if (scriptsToProcess.length) {\n // script source means we have to eval the existing\n // scripts before we run the 'include' command\n // this.globalEval(finalScripts.join(\"\\n\"));\n let joinedScripts = [];\n new Es2019Array_1.Es2019Array(...scriptsToProcess).forEach(item => {\n if (!item.nonce) {\n joinedScripts.push(item.evalText);\n }\n else {\n if (joinedScripts.length) {\n this.globalEval(joinedScripts.join(\"\\n\"));\n joinedScripts.length = 0;\n }\n (!sticky) ?\n this.globalEval(item.evalText, item.nonce) :\n this.globalEvalSticky(item.evalText, item.nonce);\n }\n });\n if (joinedScripts.length) {\n (!sticky) ? this.globalEval(joinedScripts.join(\"\\n\")) :\n this.globalEvalSticky(joinedScripts.join(\"\\n\"));\n joinedScripts.length = 0;\n }\n scriptsToProcess = [];\n }\n return scriptsToProcess;\n };\n let finalScripts = [], allowedItemTypes = [\"\", \"script\", \"text/javascript\", \"text/ecmascript\", \"ecmascript\"], execScript = (item) => {\n var _a, _b, _c, _d;\n let tagName = item.tagName;\n let itemType = ((_a = item === null || item === void 0 ? void 0 : item.type) !== null && _a !== void 0 ? _a : '').toLowerCase();\n if (tagName &&\n eqi(tagName, \"script\") &&\n allowedItemTypes.indexOf(itemType) != -1) {\n let src = item.getAttribute('src');\n if ('undefined' != typeof src\n && null != src\n && src.length > 0) {\n let nonce = (_b = item === null || item === void 0 ? void 0 : item.nonce) !== null && _b !== void 0 ? _b : item.getAttribute('nonce').value;\n // we have to move this into an inner if because chrome otherwise chokes\n // due to changing the and order instead of relying on left to right\n // if jsf.js is already registered we do not replace it anymore\n if (whitelisted(src)) {\n // we run the collected scripts, before we run the 'include' command\n finalScripts = evalCollectedScripts(finalScripts);\n if (!sticky) {\n (!!nonce) ? this.loadScriptEval(src, 0, nonce) :\n // if no nonce is set we do not pass any once\n this.loadScriptEval(src, 0);\n }\n else {\n (!!nonce) ? this.loadScriptEvalSticky(src, 0, nonce) :\n // if no nonce is set we do not pass any once\n this.loadScriptEvalSticky(src, 0);\n }\n }\n }\n else {\n // embedded script auto eval\n // probably not needed anymore\n let evalText = trim(item.text || item.innerText || item.innerHTML);\n let go = true;\n while (go) {\n go = false;\n if (evalText.substring(0, 4) == \"<!--\") {\n evalText = evalText.substring(4);\n go = true;\n }\n if (evalText.substring(0, 4) == \"//<!--\") {\n evalText = evalText.substring(6);\n go = true;\n }\n if (evalText.substring(0, 11) == \"//<![CDATA[\") {\n evalText = evalText.substring(11);\n go = true;\n }\n }\n let nonce = (_d = (_c = item === null || item === void 0 ? void 0 : item.nonce) !== null && _c !== void 0 ? _c : item.getAttribute('nonce').value) !== null && _d !== void 0 ? _d : '';\n // we have to run the script under a global context\n // we store the script for fewer calls to eval\n finalScripts.push({\n nonce,\n evalText\n });\n }\n }\n };\n try {\n let scriptElements = new DomQuery(this.filterSelector(\"script\"), this.querySelectorAll(\"script\"));\n // script execution order by relative pos in their dom tree\n scriptElements.asArray\n .flatMap(item => [...item.values])\n .sort((node1, node2) => node1.compareDocumentPosition(node2) - 3) // preceding 2, following == 4)\n .forEach(item => execScript(item));\n evalCollectedScripts(finalScripts);\n }\n catch (e) {\n if (console && console.error) {\n // not sure if we\n // should use our standard\n // error mechanisms here\n // because in the head appendix\n // method only a console\n // error would be raised as well\n console.error(e.message || e.description);\n }\n }\n finally {\n // the usual ie6 fix code\n // the IE6 garbage collector is broken\n // nulling closures helps somewhat to reduce\n // mem leaks, which are impossible to avoid\n // at this browser\n execScript = null;\n }\n return this;\n }", "removeAllScripts() {\n this.scripts = {};\n }", "function visit(script) {\n script = resolveScriptInfo(script);\n var currentState = state(script);\n if (currentState < loading && !getComposite(script)) {\n // unloaded script, eligible for composite selection\n scriptSet[script.name] = script;\n foundAny = true;\n foreach(script[\"dependencies\"], visit);\n }\n if (currentState < loaded) {\n // this scripts executionDependencies may not be loaded,\n // also check them for composite candidates\n foreach(script[\"executionDependencies\"], visit);\n }\n }", "removeAllScriptNames() {\n this.scriptNames = [];\n }", "evalFound() {\n this._evalFound = true;\n this._closedOver = true;\n this._vars.forEach(closeOver);\n this.parent.evalFound();\n }", "loadAllScripts() {\n\t\tthis._scripts.forEach( function( scriptPlugin ) {\n\t\t\tif ( false === scriptPlugin._ranInline ) {\n\t\t\t\tscriptPlugin.theScript();\n\t\t\t}\n\t\t\tscriptPlugin.createScript();\n\t\t});\n\t}", "function setEvil(otherEval) {\n evil = otherEval;\n}", "function b(e,t){for(var n=0,o=e.length;n<o;n++)Fe.set(e[n],\"globalEval\",!t||Fe.get(t[n],\"globalEval\"))}", "runScripts(sticky = false, whiteListed) {\n const whitelistFunc = (src) => {\n var _a;\n return ((_a = whiteListed === null || whiteListed === void 0 ? void 0 : whiteListed(src)) !== null && _a !== void 0 ? _a : true) && !IS_FACES_SOURCE(src) && !IS_INTERNAL_SOURCE(src);\n };\n return super.runScripts(sticky, whitelistFunc);\n }", "function setGlobalEval( elems, refElements ) {\n var elem,\n i = 0;\n for ( ; (elem = elems[i]) != null; i++ ) {\n jQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n }\n }", "function setGlobalEval(elems, refElements) {\n var i = 0,\n l = elems.length;\n\n for (; i < l; i++) {\n data_priv.set(\n elems[i], \"globalEval\", !refElements || data_priv.get(refElements[i], \"globalEval\")\n );\n }\n }", "updatedContentsFor(file) {\n this.activeImports.forEach((item) => item.resetCompiled())\n }", "function setGlobalEval( elems, refElements ) {\n var elem,\n i = 0;\n for ( ; ( elem = elems[ i ] ) != null; i++ ) {\n jQuery._data(\n elem,\n \"globalEval\",\n !refElements || jQuery._data( refElements[ i ], \"globalEval\" )\n );\n }\n }", "resetCompiled() {\n this.resetState(\"scope\", \"compiled\")\n }", "function setGlobalEval( elems, refElements ) {\n\t\tvar elem,\n\t\t\ti = 0;\n\t\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t\t}\n\t}", "function setGlobalEval( elems, refElements ) {\n\t\tvar elem,\n\t\t\ti = 0;\n\t\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t\t}\n\t}", "function setGlobalEval(elems, refElements) {\n var l = elems.length,\n i = 0;\n\n for (; i < l; i++) {\n data_priv.set(\n elems[i], \"globalEval\", !refElements || data_priv.get(refElements[i], \"globalEval\"));\n }\n }", "function setGlobalEval( elems, refElements ) {\r\n\tvar elem,\r\n\t\ti = 0;\r\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\r\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\r\n\t}\r\n}", "function setGlobalEval(elems, refElements) {\n var i = 0,\n l = elems.length;\n\n for (; i < l; i++) {\n dataPriv.set(elems[i], \"globalEval\", !refElements || dataPriv.get(refElements[i], \"globalEval\"));\n }\n }", "function finish_load(){\n\twindow.ubm_loadedids = {};\n\twindow.ubm_incompScripts = new Set([]);\n\t//Get current url\n\tvar thisurl = new URL(window.location.href);\n\tvar hostname = thisurl.hostname;\n\tvar s = ubm_db[hostname];\n\tif (s) {\n\t\tvar keys = s.getKeys();\n\t\tfor (let baseurl of keys) {\n\t\t\tloadScript(baseurl + hostname + \".js\", `scriptfail(this, function(){console.log('Could not load script from site: ` + baseurl + `!')})`, `exeScript(\\`` + baseurl + `\\`, function(){loadAlwaysCheck(0, \"` + baseurl + `\");})`);\n\t\t}\n\t} else {\n\t\tloadAlwaysCheck(0, hostname);\n\t}\n}", "function setNumScripts(){\n $jQ('body').attr(vars.nscript,$jQ('script[src]').length);\n $jQ('body').attr(vars.ncss,$jQ('link[href]').length);\n}", "function setGlobalEval( elems, refElements ) {\n\t\tvar i = 0,\n\t\t\tl = elems.length;\n\t\n\t\tfor ( ; i < l; i++ ) {\n\t\t\tdata_priv.set(\n\t\t\t\telems[ i ], \"globalEval\", !refElements || data_priv.get( refElements[ i ], \"globalEval\" )\n\t\t\t);\n\t\t}\n\t}", "function setGlobalEval( elems, refElements ) {\n\t\tvar i = 0,\n\t\t\tl = elems.length;\n\t\n\t\tfor ( ; i < l; i++ ) {\n\t\t\tdata_priv.set(\n\t\t\t\telems[ i ], \"globalEval\", !refElements || data_priv.get( refElements[ i ], \"globalEval\" )\n\t\t\t);\n\t\t}\n\t}", "function setGlobalEval( elems, refElements ) {\n var elem,\n i = 0;\n for ( ; (elem = elems[i]) != null; i++ ) {\n jQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n }\n}", "function setGlobalEval( elems, refElements ) {\n var elem,\n i = 0;\n for ( ; (elem = elems[i]) != null; i++ ) {\n jQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n }\n}", "function setGlobalEval( elems, refElements ) {\n var elem,\n i = 0;\n for ( ; (elem = elems[i]) != null; i++ ) {\n jQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n }\n}", "function setGlobalEval(elems, refElements) {\n var elem,\n i = 0;\n for (; (elem = elems[i]) != null; i++) {\n jQuery._data(elem, \"globalEval\", !refElements || jQuery._data(refElements[i], \"globalEval\"));\n }\n }", "function setGlobalEval(elems, refElements) {\n var elem,\n i = 0;\n for (; ( elem = elems[i] ) != null; i++) {\n jQuery._data(\n elem,\n \"globalEval\",\n !refElements || jQuery._data(refElements[i], \"globalEval\")\n );\n }\n }", "function scriptLoaded(scriptSource, scriptSources, callWhenAllLoaded) {\n\tscriptSources.remove(scriptSource);\n\tif (scriptSources.empty()) {\n\t\tcallWhenAllLoaded();\n\t}\n}", "function stateChange() {\n // Execute as many scripts in order as we can\n\n var pendingScript;\n\n while (pendingScripts[0] && pendingScripts[0].readyState == 'loaded') {\n pendingScript = pendingScripts.shift();\n // avoid future loading events from this script (eg, if src changes)\n pendingScript.onreadystatechange = null;\n // can't just appendChild, old IE bug if element isn't closed\n firstScript.parentNode.insertBefore(pendingScript, firstScript);\n }\n\n }", "function setGlobalEval(elems, refElements) {\n\t\tvar i = 0,\n\t\t l = elems.length;\n\n\t\tfor (; i < l; i++) {\n\t\t\tdataPriv.set(elems[i], \"globalEval\", !refElements || dataPriv.get(refElements[i], \"globalEval\"));\n\t\t}\n\t}", "function setGlobalEval(elems, refElements) {\n\t\tvar i = 0,\n\t\t l = elems.length;\n\n\t\tfor (; i < l; i++) {\n\t\t\tdataPriv.set(elems[i], \"globalEval\", !refElements || dataPriv.get(refElements[i], \"globalEval\"));\n\t\t}\n\t}", "function setGlobalEval(elems, refElements) {\n\t\tvar i = 0,\n\t\t l = elems.length;\n\n\t\tfor (; i < l; i++) {\n\t\t\tdataPriv.set(elems[i], \"globalEval\", !refElements || dataPriv.get(refElements[i], \"globalEval\"));\n\t\t}\n\t}", "function setGlobalEval(elems, refElements) {\n\t\tvar i = 0,\n\t\t l = elems.length;\n\n\t\tfor (; i < l; i++) {\n\t\t\tdataPriv.set(elems[i], \"globalEval\", !refElements || dataPriv.get(refElements[i], \"globalEval\"));\n\t\t}\n\t}", "function setGlobalEval(elems, refElements) {\n\t\tvar elem,\n\t\t i = 0;\n\t\tfor (; (elem = elems[i]) != null; i++) {\n\t\t\tjQuery._data(elem, \"globalEval\", !refElements || jQuery._data(refElements[i], \"globalEval\"));\n\t\t}\n\t}", "function setGlobalEval( elems, refElements ) {\n\t\tvar i = 0,\n\t\t\tl = elems.length;\n\n\t\tfor ( ; i < l; i++ ) {\n\t\t\tdata_priv.set(\n\t\t\t\telems[ i ], \"globalEval\", !refElements || data_priv.get( refElements[ i ], \"globalEval\" )\n\t\t\t);\n\t\t}\n\t}", "function setGlobalEval( elems, refElements ) {\n\t\tvar i = 0,\n\t\t\tl = elems.length;\n\n\t\tfor ( ; i < l; i++ ) {\n\t\t\tdata_priv.set(\n\t\t\t\telems[ i ], \"globalEval\", !refElements || data_priv.get( refElements[ i ], \"globalEval\" )\n\t\t\t);\n\t\t}\n\t}", "function setGlobalEval( elems, refElements ) {\n\t\tvar i = 0,\n\t\t\tl = elems.length;\n\n\t\tfor ( ; i < l; i++ ) {\n\t\t\tdata_priv.set(\n\t\t\t\telems[ i ], \"globalEval\", !refElements || data_priv.get( refElements[ i ], \"globalEval\" )\n\t\t\t);\n\t\t}\n\t}", "function loadScripts(){\n renderer.setIPC();\n inject.uglifyScripts();\n inject.injectScripts();\n}", "function setGlobalEval(elems, refElements) {\n var i = 0,\n l = elems.length;\n\n for (; i < l; i++) {\n data_priv.set(\n elems[i], \"globalEval\", !refElements || data_priv.get(refElements[i], \"globalEval\")\n );\n }\n }", "function setGlobalEval(elems, refElements) {\n var elem,\n i = 0;\n for (;\n (elem = elems[i]) != null; i++) {\n jQuery._data(\n elem,\n \"globalEval\", !refElements || jQuery._data(refElements[i], \"globalEval\")\n );\n }\n }", "function setGlobalEval( elems, refElements ) {\n var i = 0,\n l = elems.length;\n\n for ( ; i < l; i++ ) {\n dataPriv.set(\n elems[ i ],\n \"globalEval\",\n !refElements || dataPriv.get( refElements[ i ], \"globalEval\" )\n );\n }\n }", "function triggerCompiled(){\n return `\n if(curNode.$compiled != true){\n if(curNode.compiledCallback)\n curNode.compiledCallback();\n \n curNode.$compiled = true;\n }\n `;\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}" ]
[ "0.5987435", "0.5798831", "0.5772783", "0.57142234", "0.5673525", "0.56659687", "0.5592892", "0.5492997", "0.5467838", "0.53731847", "0.5336245", "0.5309647", "0.5303123", "0.52803385", "0.52720535", "0.52717704", "0.52695596", "0.52677536", "0.52672625", "0.52672625", "0.52531016", "0.5244555", "0.5241059", "0.5237981", "0.52378947", "0.52315265", "0.52315265", "0.52314526", "0.52314526", "0.52314526", "0.5228619", "0.52208585", "0.5215757", "0.52150893", "0.5212857", "0.5212857", "0.5212857", "0.5212857", "0.5212799", "0.5207373", "0.5207373", "0.5207373", "0.5205576", "0.52044195", "0.52012235", "0.51982325", "0.51979375", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963" ]
0.0
-1
Support: IE <=9 11+ focus() and blur() are asynchronous, except when they are noop. So expect focus to be synchronous when the element is already active, and blur to be synchronous when the element is not already active. (focus and blur are always synchronous in other supported browsers, this just defines when we can count on it).
function expectSync( elem, type ) { return ( elem === safeActiveElement() ) === ( type === "focus" ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function focusAsync(element) {\r\n if (element) {\r\n // An element was already queued to be focused, so replace that one with the new element\r\n if (targetToFocusOnNextRepaint) {\r\n targetToFocusOnNextRepaint = element;\r\n return;\r\n }\r\n targetToFocusOnNextRepaint = element;\r\n var win = getWindow(element);\r\n if (win) {\r\n // element.focus() is a no-op if the element is no longer in the DOM, meaning this is always safe\r\n win.requestAnimationFrame(function () {\r\n targetToFocusOnNextRepaint && targetToFocusOnNextRepaint.focus();\r\n // We are done focusing for this frame, so reset the queued focus element\r\n targetToFocusOnNextRepaint = undefined;\r\n });\r\n }\r\n }\r\n}", "function focusAsync(element) {\r\n if (element) {\r\n // An element was already queued to be focused, so replace that one with the new element\r\n if (targetToFocusOnNextRepaint) {\r\n targetToFocusOnNextRepaint = element;\r\n return;\r\n }\r\n targetToFocusOnNextRepaint = element;\r\n var win = getWindow(element);\r\n if (win) {\r\n // element.focus() is a no-op if the element is no longer in the DOM, meaning this is always safe\r\n win.requestAnimationFrame(function () {\r\n targetToFocusOnNextRepaint && targetToFocusOnNextRepaint.focus();\r\n // We are done focusing for this frame, so reset the queued focus element\r\n targetToFocusOnNextRepaint = undefined;\r\n });\r\n }\r\n }\r\n}", "function SP_ValidateActiveElement()\n{\n\ttry\n\t{\n\t\tvar oActiveField = document.activeElement;\n\t\tvar eFieldEvent = 'blur';\n\t\n\t\tif(arguments.length > 0)\n\t\teFieldEvent = arguments[0];\n\t\n\t\n\t\t$(oActiveField).trigger(eFieldEvent);\n\t}\n\tcatch(ex)\n\t{}\n}", "function focusAsync(element) {\n if (element) {\n // An element was already queued to be focused, so replace that one with the new element\n if (targetToFocusOnNextRepaint) {\n targetToFocusOnNextRepaint = element;\n return;\n }\n targetToFocusOnNextRepaint = element;\n var win = Object(_dom_getWindow__WEBPACK_IMPORTED_MODULE_3__[\"getWindow\"])(element);\n if (win) {\n // element.focus() is a no-op if the element is no longer in the DOM, meaning this is always safe\n win.requestAnimationFrame(function () {\n targetToFocusOnNextRepaint && targetToFocusOnNextRepaint.focus();\n // We are done focusing for this frame, so reset the queued focus element\n targetToFocusOnNextRepaint = undefined;\n });\n }\n }\n}", "function focusAsync(element) {\n if (element) {\n // An element was already queued to be focused, so replace that one with the new element\n if (targetToFocusOnNextRepaint) {\n targetToFocusOnNextRepaint = element;\n return;\n }\n targetToFocusOnNextRepaint = element;\n var win = Object(__WEBPACK_IMPORTED_MODULE_0__dom__[\"i\" /* getWindow */])(element);\n if (win) {\n // element.focus() is a no-op if the element is no longer in the DOM, meaning this is always safe\n win.requestAnimationFrame(function () {\n targetToFocusOnNextRepaint && targetToFocusOnNextRepaint.focus();\n // We are done focusing for this frame, so reset the queued focus element\n targetToFocusOnNextRepaint = undefined;\n });\n }\n }\n}", "function focusAsync(element) {\n if (element) {\n // An element was already queued to be focused, so replace that one with the new element\n if (targetToFocusOnNextRepaint) {\n targetToFocusOnNextRepaint = element;\n return;\n }\n targetToFocusOnNextRepaint = element;\n var win = (0,_dom_getWindow__WEBPACK_IMPORTED_MODULE_3__.getWindow)(element);\n if (win) {\n // element.focus() is a no-op if the element is no longer in the DOM, meaning this is always safe\n win.requestAnimationFrame(function () {\n targetToFocusOnNextRepaint && targetToFocusOnNextRepaint.focus();\n // We are done focusing for this frame, so reset the queued focus element\n targetToFocusOnNextRepaint = undefined;\n });\n }\n }\n}", "function focusAsync(element) {\n if (element) {\n // An element was already queued to be focused, so replace that one with the new element\n if (targetToFocusOnNextRepaint) {\n targetToFocusOnNextRepaint = element;\n return;\n }\n targetToFocusOnNextRepaint = element;\n var win = (0,_dom_getWindow__WEBPACK_IMPORTED_MODULE_3__.getWindow)(element);\n if (win) {\n // element.focus() is a no-op if the element is no longer in the DOM, meaning this is always safe\n win.requestAnimationFrame(function () {\n targetToFocusOnNextRepaint && targetToFocusOnNextRepaint.focus();\n // We are done focusing for this frame, so reset the queued focus element\n targetToFocusOnNextRepaint = undefined;\n });\n }\n }\n}", "function expectSync(elem, type) {\n return elem === safeActiveElement() === (type === \"focus\");\n } // Support: IE <=9 only", "function expectSync(elem, type) {\n return elem === safeActiveElement() === (type === \"focus\");\n } // Support: IE <=9 only", "function expectSync(elem, type) {\n return elem === safeActiveElement() === (type === \"focus\");\n } // Support: IE <=9 only", "function expectSync(elem, type) {\n return elem === safeActiveElement() === (type === \"focus\");\n } // Support: IE <=9 only", "function expectSync(elem, type) {\n return elem === safeActiveElement() === (type === \"focus\");\n } // Support: IE <=9 only", "function expectSync(elem, type) {\n return elem === safeActiveElement() === (type === \"focus\");\n } // Support: IE <=9 only", "function expectSync(elem, type) {\n return elem === safeActiveElement() === (type === \"focus\");\n } // Support: IE <=9 only", "function expectSync(elem, type) {\n return elem === safeActiveElement() === (type === \"focus\");\n } // Support: IE <=9 only", "async setFocus() {\n var _a;\n (_a = this.focusEl) === null || _a === void 0 ? void 0 : _a.focus();\n }", "function checkFocus() {\n\t\t\tif ( settings.hasFocus && ! document.hasFocus() ) {\n\t\t\t\tblurred();\n\t\t\t} else if ( ! settings.hasFocus && document.hasFocus() ) {\n\t\t\t\tfocused();\n\t\t\t}\n\t\t}", "function ifNotFocusedDoOnBlur() { // was ifNotFocusedAttachFocusListener\n\tif (!document.hasFocus()) {\n\t\tattachFocusListener();\n\t}\n}", "function focusElement(element) {\n if (!element) return;\n if (b.browser.ie) {\n setTimeout(function(){element.focus();}, 200);\n } else {\n element.focus();\n }\n }", "function safeActiveElement() { // 4899\n\ttry { // 4900\n\t\treturn document.activeElement; // 4901\n\t} catch ( err ) { } // 4902\n} // 4903", "function expectSync( elem, type ) {\n return ( elem === safeActiveElement() ) === ( type === \"focus\" );\n }", "async isFocused() {\n await this._stabilize();\n return webdriver.WebElement.equals(this.element(), this.element().getDriver().switchTo().activeElement());\n }", "function expectSync( elem, type ) {\n \treturn ( elem === safeActiveElement() ) === ( type === \"focus\" );\n }", "_onFocus() {\n this.setState({ focused: this._containsDOMElement(document.activeElement) })\n }" ]
[ "0.66768336", "0.66768336", "0.65990996", "0.6543436", "0.654141", "0.6531115", "0.6531115", "0.63578004", "0.63578004", "0.63578004", "0.63578004", "0.63578004", "0.63578004", "0.63578004", "0.63578004", "0.6164437", "0.6159174", "0.61418015", "0.6100893", "0.60965294", "0.6044742", "0.6038906", "0.6011509", "0.60072666" ]
0.0
-1
Support: IE <=9 only Accessing document.activeElement can throw unexpectedly
function safeActiveElement() { try { return document.activeElement; } catch ( err ) { } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function safeActiveElement(){try{return document.activeElement;}catch(err){}}", "function safeActiveElement(){try{return document.activeElement;}catch(err){}}", "function safeActiveElement(){try{return document.activeElement;}catch(err){}}", "function safeActiveElement(){try{return document.activeElement;}catch(err){}}", "function safeActiveElement(){try{return document.activeElement;}catch(err){}}", "function safeActiveElement(){try{return document.activeElement;}catch(err){}}", "function safeActiveElement(){try{return document.activeElement;}catch(err){}}", "function safeActiveElement() { // 4899\n\ttry { // 4900\n\t\treturn document.activeElement; // 4901\n\t} catch ( err ) { } // 4902\n} // 4903", "function getActiveElement() { // 5053\n try { // 5054\n return document.activeElement // 5055\n } catch ( err ) { } // 5056\n} // 5057", "function safeActiveElement() {\n try {\n return document.activeElement;\n } catch ( err ) { }\n }", "function safeActiveElement() {\n try {\n return document.activeElement;\n } catch (err) {}\n }", "function safeActiveElement() {\n try {\n return document.activeElement;\n } catch ( err ) {}\n }", "function getActiveElement() /*?DOMElement*/{try{return document.activeElement || document.body;}catch(e) {return document.body;}}", "function getActiveElement() /*?DOMElement*/{try{return document.activeElement||document.body;}catch(e){return document.body;}}", "function safeActiveElement() {\n try {\n return document.activeElement;\n } catch ( err ) { }\n }", "function safeActiveElement() {\n try {\n return document.activeElement;\n } catch (err) {\n }\n }", "function safeActiveElement() {\n try {\n return document.activeElement;\n } catch ( err ) { }\n}", "function safeActiveElement() {\n try {\n return document.activeElement;\n } catch (err) {}\n }", "function safeActiveElement() {\n try {\n return document.activeElement;\n } catch (err) {}\n }", "function safeActiveElement() {\n try {\n return document.activeElement;\n } catch (err) {}\n }", "function safeActiveElement() {\n try {\n return document.activeElement;\n } catch (err) {}\n }", "function safeActiveElement() {\n try {\n return document.activeElement;\n } catch (err) {}\n }", "function safeActiveElement() {\n try {\n return document.activeElement;\n } catch (err) {}\n }", "function safeActiveElement() {\n try {\n return document.activeElement;\n } catch (err) {}\n }", "function safeActiveElement() {\n try {\n return document.activeElement;\n } catch (err) {}\n }", "function safeActiveElement() {\n try {\n return document.activeElement;\n } catch (err) {\n }\n }", "function safeActiveElement() {\n try {\n return document.activeElement;\n } catch (err) {\n }\n }", "function safeActiveElement() {\n try {\n return document.activeElement;\n } catch (err) {\n }\n }", "function safeActiveElement() {\n try {\n return document.activeElement;\n } catch (err) {}\n }", "function safeActiveElement() {\n try {\n return document.activeElement;\n } catch (err) {}\n }", "function safeActiveElement() {\n try {\n return document.activeElement;\n } catch (err) {}\n }", "function safeActiveElement() {\n try {\n return document.activeElement;\n } catch (err) {}\n }", "function safeActiveElement() {\n try {\n return document.activeElement;\n } catch (err) {}\n }", "function safeActiveElement() {\n try {\n return document.activeElement;\n } catch (err) { }\n }", "function getActiveElement() /*?DOMElement*/{if(typeof document==='undefined'){return null;}try{return document.activeElement||document.body;}catch(e){return document.body;}}", "function getActiveElement() /*?DOMElement*/{if(typeof document==='undefined'){return null;}try{return document.activeElement||document.body;}catch(e){return document.body;}}", "function safeActiveElement() {\n \ttry {\n \t\treturn document.activeElement;\n \t} catch ( err ) { }\n }", "function p(){try{return X.activeElement}catch(a){}}", "function safeActiveElement() {\r\n\ttry {\r\n\t\treturn document.activeElement;\r\n\t} catch ( err ) { }\r\n}", "function safeActiveElement() {\r\n\ttry {\r\n\t\treturn document.activeElement;\r\n\t} catch ( err ) { }\r\n}", "function fixActiveElement() {\n // IE9 throws an \"Unspecified error\" accessing document.activeElement from an <iframe>\n try {\n if (!document.activeElement && typeof (document.body.setActive) === \"function\") {\n document.body.setActive();\n }\n } catch ( error ) {}\n }", "function safeActiveElement() {\n /*eslint-disable no-empty */\n try {\n return document.activeElement;\n } catch (ex) {}\n /*eslint-enable no-empty */\n }", "function safeActiveElement() {\r\n\t\ttry {\r\n\t\t\treturn document.activeElement;\r\n\t\t} catch (err) { }\r\n\t}" ]
[ "0.877296", "0.877296", "0.877296", "0.877296", "0.877296", "0.877296", "0.877296", "0.8555537", "0.84866536", "0.84145314", "0.83721894", "0.83460915", "0.83449954", "0.8336473", "0.8319321", "0.8313553", "0.8287411", "0.82829833", "0.82829833", "0.82829833", "0.82829833", "0.82829833", "0.82829833", "0.82829833", "0.82829833", "0.8268934", "0.82297206", "0.82297206", "0.82254004", "0.82254004", "0.82254004", "0.82254004", "0.82254004", "0.82248116", "0.82189584", "0.82189584", "0.8213868", "0.82136875", "0.8209608", "0.8209608", "0.82040435", "0.8194778", "0.8174448" ]
0.0
-1
Ensure the presence of an event listener that handles manuallytriggered synthetic events by interrupting progress until reinvoked in response to native events that it fires directly, ensuring that state changes have already occurred before other listeners are invoked.
function leverageNative( el, type, expectSync ) { // Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add if ( !expectSync ) { if ( dataPriv.get( el, type ) === undefined ) { jQuery.event.add( el, type, returnTrue ); } return; } // Register the controller as a special universal handler for all event namespaces dataPriv.set( el, type, false ); jQuery.event.add( el, type, { namespace: false, handler: function( event ) { var notAsync, result, saved = dataPriv.get( this, type ); if ( ( event.isTrigger & 1 ) && this[ type ] ) { // Interrupt processing of the outer synthetic .trigger()ed event // Saved data should be false in such cases, but might be a leftover capture object // from an async native handler (gh-4350) if ( !saved.length ) { // Store arguments for use when handling the inner native event // There will always be at least one argument (an event object), so this array // will not be confused with a leftover capture object. saved = slice.call( arguments ); dataPriv.set( this, type, saved ); // Trigger the native event and capture its result // Support: IE <=9 - 11+ // focus() and blur() are asynchronous notAsync = expectSync( this, type ); this[ type ](); result = dataPriv.get( this, type ); if ( saved !== result || notAsync ) { dataPriv.set( this, type, false ); } else { result = {}; } if ( saved !== result ) { // Cancel the outer synthetic event event.stopImmediatePropagation(); event.preventDefault(); // Support: Chrome 86+ // In Chrome, if an element having a focusout handler is blurred by // clicking outside of it, it invokes the handler synchronously. If // that handler calls `.remove()` on the element, the data is cleared, // leaving `result` undefined. We need to guard against this. return result && result.value; } // If this is an inner synthetic event for an event with a bubbling surrogate // (focus or blur), assume that the surrogate already propagated from triggering the // native event and prevent that from happening again here. // This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the // bubbling surrogate propagates *after* the non-bubbling base), but that seems // less bad than duplication. } else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) { event.stopPropagation(); } // If this is a native event triggered above, everything is now in order // Fire an inner synthetic event with the original arguments } else if ( saved.length ) { // ...and capture the result dataPriv.set( this, type, { value: jQuery.event.trigger( // Support: IE <=9 - 11+ // Extend with the prototype to reset the above stopImmediatePropagation() jQuery.extend( saved[ 0 ], jQuery.Event.prototype ), saved.slice( 1 ), this ) } ); // Abort handling of the native event event.stopImmediatePropagation(); } } } ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dumbListener2(event) {}", "function dumbListener2(event) {}", "async function handleListenerStartedEvent() {\n logger.verbose( `handleListenerStartedEvent` );\n\n try {\n await switchListener( true );\n }\n catch ( e ) {\n /**\n * @todo\n */\n }\n}", "#setupTriggerEventListener() {\n this.#teardownTriggerEventListener = createListener(\n window,\n this.triggerEventName,\n this.#handleTiggerEvent.bind(this),\n );\n }", "_startEventListener(ev, data) {\n const el = ev.target;\n let isEventOnSlider = false;\n\n if (ev.which !== 1 && !('touches' in ev)) {\n return;\n }\n\n dom.forEachAncestors(el, el =>\n (isEventOnSlider = el.id === this.identifier && !dom.hasClass(el, this.options.disabledClass)),\n true);\n\n if (isEventOnSlider) {\n this._handleDown(ev, data);\n }\n }", "_dispatch(eventImpl, targetOverride /* , legacyOutputDidListenersThrowFlag */) {\n let targetImpl = this;\n let clearTargets = false;\n let activationTarget = null;\n\n eventImpl._dispatchFlag = true;\n\n targetOverride = targetOverride || targetImpl;\n let relatedTarget = retarget(eventImpl.relatedTarget, targetImpl);\n\n if (targetImpl !== relatedTarget || targetImpl === eventImpl.relatedTarget) {\n const touchTargets = [];\n\n appendToEventPath(eventImpl, targetImpl, targetOverride, relatedTarget, touchTargets, false);\n\n const isActivationEvent = MouseEvent.isImpl(eventImpl) && eventImpl.type === \"click\";\n\n if (isActivationEvent && targetImpl._hasActivationBehavior) {\n activationTarget = targetImpl;\n }\n\n let slotInClosedTree = false;\n let slotable = isSlotable(targetImpl) && targetImpl._assignedSlot ? targetImpl : null;\n let parent = getEventTargetParent(targetImpl, eventImpl);\n\n // Populate event path\n // https://dom.spec.whatwg.org/#event-path\n while (parent !== null) {\n if (slotable !== null) {\n if (parent.localName !== \"slot\") {\n throw new Error(`JSDOM Internal Error: Expected parent to be a Slot`);\n }\n\n slotable = null;\n\n const parentRoot = nodeRoot(parent);\n if (isShadowRoot(parentRoot) && parentRoot.mode === \"closed\") {\n slotInClosedTree = true;\n }\n }\n\n if (isSlotable(parent) && parent._assignedSlot) {\n slotable = parent;\n }\n\n relatedTarget = retarget(eventImpl.relatedTarget, parent);\n\n if (\n (isNode(parent) && isShadowInclusiveAncestor(nodeRoot(targetImpl), parent)) ||\n idlUtils.wrapperForImpl(parent).constructor.name === \"Window\"\n ) {\n if (isActivationEvent && eventImpl.bubbles && activationTarget === null &&\n parent._hasActivationBehavior) {\n activationTarget = parent;\n }\n\n appendToEventPath(eventImpl, parent, null, relatedTarget, touchTargets, slotInClosedTree);\n } else if (parent === relatedTarget) {\n parent = null;\n } else {\n targetImpl = parent;\n\n if (isActivationEvent && activationTarget === null && targetImpl._hasActivationBehavior) {\n activationTarget = targetImpl;\n }\n\n appendToEventPath(eventImpl, parent, targetImpl, relatedTarget, touchTargets, slotInClosedTree);\n }\n\n if (parent !== null) {\n parent = getEventTargetParent(parent, eventImpl);\n }\n\n slotInClosedTree = false;\n }\n\n let clearTargetsStructIndex = -1;\n for (let i = eventImpl._path.length - 1; i >= 0 && clearTargetsStructIndex === -1; i--) {\n if (eventImpl._path[i].target !== null) {\n clearTargetsStructIndex = i;\n }\n }\n const clearTargetsStruct = eventImpl._path[clearTargetsStructIndex];\n\n clearTargets =\n (isNode(clearTargetsStruct.target) && isShadowRoot(nodeRoot(clearTargetsStruct.target))) ||\n (isNode(clearTargetsStruct.relatedTarget) && isShadowRoot(nodeRoot(clearTargetsStruct.relatedTarget)));\n\n if (activationTarget !== null && activationTarget._legacyPreActivationBehavior) {\n activationTarget._legacyPreActivationBehavior();\n }\n\n for (let i = eventImpl._path.length - 1; i >= 0; --i) {\n const struct = eventImpl._path[i];\n\n if (struct.target !== null) {\n eventImpl.eventPhase = EVENT_PHASE.AT_TARGET;\n } else {\n eventImpl.eventPhase = EVENT_PHASE.CAPTURING_PHASE;\n }\n\n invokeEventListeners(struct, eventImpl, \"capturing\");\n }\n\n for (let i = 0; i < eventImpl._path.length; i++) {\n const struct = eventImpl._path[i];\n\n if (struct.target !== null) {\n eventImpl.eventPhase = EVENT_PHASE.AT_TARGET;\n } else {\n if (!eventImpl.bubbles) {\n continue;\n }\n\n eventImpl.eventPhase = EVENT_PHASE.BUBBLING_PHASE;\n }\n\n invokeEventListeners(struct, eventImpl, \"bubbling\");\n }\n }\n\n eventImpl.eventPhase = EVENT_PHASE.NONE;\n\n eventImpl.currentTarget = null;\n eventImpl._path = [];\n eventImpl._dispatchFlag = false;\n eventImpl._stopPropagationFlag = false;\n eventImpl._stopImmediatePropagationFlag = false;\n\n if (clearTargets) {\n eventImpl.target = null;\n eventImpl.relatedTarget = null;\n }\n\n if (activationTarget !== null) {\n if (!eventImpl._canceledFlag) {\n activationTarget._activationBehavior(eventImpl);\n } else if (activationTarget._legacyCanceledActivationBehavior) {\n activationTarget._legacyCanceledActivationBehavior();\n }\n }\n\n return !eventImpl._canceledFlag;\n }", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n }", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n }", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n }", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n }", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n }", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n }", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n }", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n }", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n }", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n }", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n }", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n }", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n }", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n }", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n }", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n }", "function disableEventListeners() {\n\t if (this.state.eventsEnabled) {\n\t cancelAnimationFrame(this.scheduleUpdate);\n\t this.state = removeEventListeners(this.reference, this.state);\n\t }\n\t}", "function disableEventListeners() {\n\t if (this.state.eventsEnabled) {\n\t cancelAnimationFrame(this.scheduleUpdate);\n\t this.state = removeEventListeners(this.reference, this.state);\n\t }\n\t}", "function disableEventListeners() {\n\t if (this.state.eventsEnabled) {\n\t cancelAnimationFrame(this.scheduleUpdate);\n\t this.state = removeEventListeners(this.reference, this.state);\n\t }\n\t}", "function InternalEvent() { }", "function InternalEvent() { }", "function InternalEvent() { }", "function InternalEvent() { }", "function InternalEvent() { }", "function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n window.cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n window.cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n window.cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n window.cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n window.cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n window.cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n window.cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n window.cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n window.cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n window.cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n window.cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}" ]
[ "0.5891748", "0.5891748", "0.5798613", "0.57236135", "0.565704", "0.56017524", "0.5593466", "0.5593466", "0.5593466", "0.5593466", "0.5593466", "0.5593466", "0.5593466", "0.5593466", "0.5593466", "0.5593466", "0.5593466", "0.5593466", "0.5593466", "0.5593466", "0.5593466", "0.5593466", "0.5565215", "0.5565215", "0.5565215", "0.5553265", "0.5553265", "0.5553265", "0.5553265", "0.5553265", "0.55402035", "0.55237657", "0.55237657", "0.55237657", "0.55237657", "0.55237657", "0.55237657", "0.55237657", "0.55237657", "0.55237657", "0.55237657", "0.55237657", "0.5519959", "0.5519959", "0.5519959", "0.5519959", "0.5519959", "0.5519959", "0.5519959", "0.5519959", "0.5519959", "0.5519959", "0.5519959", "0.5519959", "0.5519959", "0.5519959", "0.5519959", "0.5519959", "0.5519959", "0.5519959", "0.5519959", "0.5519959", "0.5519959", "0.5519959", "0.5519959", "0.5519959", "0.5519959", "0.5519959", "0.5519959", "0.5519959", "0.5519959", "0.5519959", "0.5519959", "0.5519959", "0.5519959", "0.5519959", "0.5519959", "0.5519959", "0.5519959", "0.5519959", "0.5519959", "0.5519959", "0.5519959", "0.5519959", "0.5519959", "0.5519959", "0.5519959", "0.5519959", "0.5519959", "0.5519959", "0.5519959", "0.5519959", "0.5519959", "0.5519959", "0.5519959", "0.5519959", "0.5519959", "0.5519959", "0.5519959", "0.5519959", "0.5519959" ]
0.0
-1
Prefer a tbody over its parent table for containing new rows
function manipulationTarget( elem, content ) { if ( nodeName( elem, "table" ) && nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) { return jQuery( elem ).children( "tbody" )[ 0 ] || elem; } return elem; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function r(a,b){return fa.nodeName(a,\"table\")&&fa.nodeName(11!==b.nodeType?b:b.firstChild,\"tr\")?a.getElementsByTagName(\"tbody\")[0]||a.appendChild(a.ownerDocument.createElement(\"tbody\")):a}", "_createDataRows(tbody) {\r\n const that = this,\r\n rowDetailTemplate = that.rowDetailTemplate,\r\n selection = that.selection,\r\n fragment = document.createDocumentFragment(),\r\n hierarchical = that.hasAttribute('hierarchy');\r\n\r\n for (let i = 0; i < that.rows.length; i++) {\r\n const rowObject = that.rows[i],\r\n data = rowObject.data;\r\n\r\n if (data.groupDataField) {\r\n that._createGroupHeader(data, selection, fragment);\r\n continue;\r\n }\r\n\r\n const id = data.$.id,\r\n rowElement = document.createElement('tr');\r\n let colspan = 0;\r\n\r\n rowElement.setAttribute('aria-rowindex', data.$.index + 1);\r\n\r\n if (selection) {\r\n const selectionTd = document.createElement('td'),\r\n selected = that._selectedIds.indexOf(id) !== -1;\r\n\r\n selectionTd.className = `smart-table-select-row freeze-near${selected ? ' selected' : ''}`;\r\n selectionTd.innerHTML = '<div class=\"selection-checkbox\"></div>';\r\n selectionTd.setAttribute('aria-colindex', 1);\r\n rowElement.appendChild(selectionTd);\r\n rowElement.setAttribute('aria-selected', selected);\r\n colspan++;\r\n }\r\n\r\n for (let j = 0; j < that._columns.length; j++) {\r\n const td = document.createElement('td'),\r\n column = that._columns[j];\r\n\r\n td.setAttribute('data-field', column.dataField);\r\n td.setAttribute('aria-colindex', j + 1 + (+selection));\r\n\r\n let value = that._formatCellValue(rowObject, column, td),\r\n isTreeCell;\r\n\r\n if (column.freeze) {\r\n td.classList.add('freeze-' + (column.freeze === 'far' ? 'far' : 'near'));\r\n }\r\n\r\n if (column.responsivePriority) {\r\n td.classList.add('priority-' + column.responsivePriority);\r\n }\r\n\r\n if (column.allowEdit === false) {\r\n td.classList.add('no-edit');\r\n td.setAttribute('aria-readonly', true);\r\n }\r\n\r\n if (j === 0 && hierarchical) {\r\n const childrenFiltered = that._areChildrenFiltered(data);\r\n\r\n if (!data.leaf) {\r\n td.classList.add('tree-cell');\r\n isTreeCell = childrenFiltered;\r\n }\r\n\r\n if (data.level) {\r\n td.classList.add('outline-level-' + Math.min(data.level, 10));\r\n\r\n if (data.leaf || !childrenFiltered) {\r\n td.classList.add('tree-leaf');\r\n }\r\n }\r\n }\r\n\r\n that._setCellContent(td, value, isTreeCell);\r\n\r\n if (that.onCellRender) {\r\n that.onCellRender(data, column.dataField, data[column.dataField], td);\r\n }\r\n\r\n that._applyConditionalFormattingToCell(td, column.dataField, data.$.index);\r\n\r\n rowElement.appendChild(td);\r\n colspan++;\r\n }\r\n\r\n rowElement.data = data;\r\n rowElement.setAttribute('row-id', id);\r\n\r\n if (that._disabledSelection.indexOf(id) !== -1) {\r\n rowElement.removeAttribute('aria-selected');\r\n rowElement.classList.add('disable-select');\r\n }\r\n\r\n if (data.expanded) {\r\n rowElement.setAttribute('aria-expanded', true);\r\n rowElement.classList.add('expanded');\r\n }\r\n\r\n if (data.level && that._isCollapsed(data)) {\r\n rowElement.setAttribute('aria-hidden', true);\r\n rowElement.classList.add('collapsed', 'smart-hidden');\r\n }\r\n\r\n fragment.appendChild(rowElement);\r\n\r\n if (rowDetailTemplate) {\r\n const detailTr = document.createElement('tr');\r\n\r\n detailTr.className = 'smart-table-row-detail';\r\n\r\n if (that._expandedIds.indexOf(id) === -1) {\r\n detailTr.setAttribute('aria-hidden', true);\r\n detailTr.classList.add('collapsed');\r\n }\r\n\r\n detailTr.innerHTML = `<td colspan=\"${colspan}\"><div class=\"smart-table-detail-container\">${that._applyRowDetailTemplate(rowObject)}</div></td>`;\r\n fragment.appendChild(detailTr);\r\n }\r\n }\r\n\r\n fragment.appendChild(that._createLastRow());\r\n tbody.appendChild(fragment);\r\n }", "function m(a,b){return _.nodeName(a,\"table\")&&_.nodeName(11!==b.nodeType?b:b.firstChild,\"tr\")?a.getElementsByTagName(\"tbody\")[0]||a.appendChild(a.ownerDocument.createElement(\"tbody\")):a}", "__$$getRawTbodyTrs() {\n\t\tconst tbody = _.chain(arrify(this.props.children))\n\t\t\t\t.filter(c => c.type == 'tbody')\n\t\t\t\t.last()\n\t\t\t\t.value() || <tbody></tbody>\n\n\t\treturn _.chain(arrify(tbody.props.children))\n\t\t\t.filter(c => c.type == 'tr')\n\t\t\t.value()\n\t}", "function manipulationTarget(elem, content) {\n return jQuery.nodeName(elem, \"table\") &&\n jQuery.nodeName(content.nodeType !== 11 ? content : content.firstChild, \"tr\") ?\n elem.getElementsByTagName(\"tbody\")[0] ||\n elem.appendChild(elem.ownerDocument.createElement(\"tbody\")) :\n elem;\n }", "function clearTableBody() {\n $('#data-table').find('tbody').replaceWith(document.createElement('tbody'));\n}", "_completeTableIfNeed() {\n const body = this.wwe.getEditor().getBody();\n\n toArray(body.children).forEach(node => {\n if (!this.isTableOrSubTableElement(node.nodeName)) {\n return;\n }\n\n if (node.nodeName === 'TABLE' && !node.querySelector('tbody')) {\n domUtils.remove(node);\n } else {\n this._completeIncompleteTable(node);\n }\n });\n }", "function manipulationTarget(elem, content) {\n return jQuery.nodeName(elem, \"table\") &&\n jQuery.nodeName(content.nodeType !== 11 ? content : content.firstChild, \"tr\") ?\n\n elem.getElementsByTagName(\"tbody\")[0] ||\n elem.appendChild(elem.ownerDocument.createElement(\"tbody\")) :\n elem;\n }", "function manipulationTarget(elem, content) {\n return jQuery.nodeName(elem, \"table\") &&\n jQuery.nodeName(content.nodeType !== 11 ? content : content.firstChild, \"tr\") ?\n\n elem.getElementsByTagName(\"tbody\")[0] ||\n elem.appendChild(elem.ownerDocument.createElement(\"tbody\")) :\n elem;\n }", "function manipulationTarget( elem, content ) {\n return jQuery.nodeName( elem, \"table\" ) &&\n jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n elem.getElementsByTagName(\"tbody\")[0] ||\n elem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n elem;\n}", "function manipulationTarget( elem, content ) {\n return jQuery.nodeName( elem, \"table\" ) &&\n jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n elem.getElementsByTagName(\"tbody\")[0] ||\n elem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n elem;\n}", "function manipulationTarget(elem, content) {\r\n\t\treturn jQuery.nodeName(elem, \"table\") &&\r\n\t\t\tjQuery.nodeName(content.nodeType !== 11 ? content : content.firstChild, \"tr\") ?\r\n\r\n\t\t\telem.getElementsByTagName(\"tbody\")[0] ||\r\n\t\t\telem.appendChild(elem.ownerDocument.createElement(\"tbody\")) :\r\n\t\t\telem;\r\n\t}", "function manipulationTarget(elem, content) {\n return jQuery.nodeName(elem, \"table\") &&\n jQuery.nodeName(content.nodeType !== 11 ? content : content.firstChild, \"tr\") ?\n\n elem.getElementsByTagName(\"tbody\")[0] ||\n elem.appendChild(elem.ownerDocument.createElement(\"tbody\")) :\n elem;\n }", "function manipulationTarget(elem, content) {\n return jQuery.nodeName(elem, \"table\") &&\n jQuery.nodeName(content.nodeType !== 11 ? content : content.firstChild, \"tr\") ?\n\n elem.getElementsByTagName(\"tbody\")[0] ||\n elem.appendChild(elem.ownerDocument.createElement(\"tbody\")) :\n elem;\n }", "function manipulationTarget( elem, content ) {\n return jQuery.nodeName( elem, \"table\" ) &&\n jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n elem.getElementsByTagName(\"tbody\")[0] ||\n elem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n elem;\n}", "function manipulationTarget( elem, content ) {\n return jQuery.nodeName( elem, \"table\" ) &&\n jQuery.nodeName( content.nodeType === 1 ? content : content.firstChild, \"tr\" ) ?\n\n elem.getElementsByTagName(\"tbody\")[0] ||\n elem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n elem;\n}", "function manipulationTarget( elem, content ) {\n return jQuery.nodeName( elem, \"table\" ) &&\n jQuery.nodeName( content.nodeType === 1 ? content : content.firstChild, \"tr\" ) ?\n\n elem.getElementsByTagName(\"tbody\")[0] ||\n elem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n elem;\n}", "function manipulationTarget( elem, content ) {\r\n\treturn jQuery.nodeName( elem, \"table\" ) &&\r\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\r\n\r\n\t\telem.getElementsByTagName( \"tbody\" )[ 0 ] ||\r\n\t\t\telem.appendChild( elem.ownerDocument.createElement( \"tbody\" ) ) :\r\n\t\telem;\r\n}", "function manipulationTarget(elem, content) {\n return jQuery.nodeName(elem, \"table\") &&\n jQuery.nodeName(content.nodeType !== 11 ? content : content.firstChild, \"tr\") ?\n\n elem.getElementsByTagName(\"tbody\")[0] ||\n elem.appendChild(elem.ownerDocument.createElement(\"tbody\")) :\n elem;\n }", "function manipulationTarget( elem, content ) {\n return jQuery.nodeName( elem, \"table\" ) &&\n jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n \n elem.getElementsByTagName(\"tbody\")[0] ||\n elem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n elem;\n }", "function manipulationTarget( elem, content ) {\n\t\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\t\n\t\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\t\telem;\n\t}", "function manipulationTarget( elem, content ) {\n\t\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\t\n\t\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\t\telem;\n\t}", "addRows() {\n if (this._data.constructor !== Array)\n throw TypeError('data property of table is not an array');\n\n this._data.forEach((item) => {\n\n if (item.constructor !== this._rowItemType)\n throw TypeError('invalid item type for table row');\n\n let $tr = $('<tr>');\n\n for (const prop in item) {\n let $td = $('<td>');\n $td.html(item[prop]);\n $tr.append($td);\n }\n\n this._body.append($tr);\n })\n }", "function newTbody(id) {\n let newTbody = document.createElement('tbody');\n newTbody.id = id;\n let oldTbody = document.getElementById(id);\n oldTbody.parentNode.replaceChild(newTbody, oldTbody);\n}", "function manipulationTarget(elem, content) {\n return jQuery.nodeName(elem, \"table\") && jQuery.nodeName(content.nodeType === 1 ? content : content.firstChild, \"tr\") ?\n\n elem.getElementsByTagName(\"tbody\")[0] || elem.appendChild(elem.ownerDocument.createElement(\"tbody\")) : elem;\n }", "function manipulationTarget( elem, content ) {\n\t\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\t\telem;\n\t}", "function manipulationTarget( elem, content ) {\n\t\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\t\telem;\n\t}", "function manipulationTarget( elem, content ) {\n\t\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\t\telem;\n\t}", "function manipulationTarget( elem, content ) {\n\t\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\t\telem;\n\t}", "function manipulationTarget( elem, content ) {\n\t\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\t\telem;\n\t}", "_reorderRows(){const body=this.$.items,items=body.querySelectorAll(\"tr\");if(!items.length){return}const adjustedVirtualStart=this._virtualStart+this._vidxOffset,targetRow=this._rowWithFocusedElement||Array.from(items).filter(row=>!row.hidden)[0];// Which row to use as a target?\nif(!targetRow){// All rows are hidden, don't reorder\nreturn}// Where the target row should be?\nconst targetPhysicalIndex=targetRow.index-adjustedVirtualStart,delta=Array.from(items).indexOf(targetRow)-targetPhysicalIndex;// Reodrer the DOM elements to keep the target row at the target physical index\nif(0<delta){for(let i=0;i<delta;i++){body.appendChild(items[i])}}else if(0>delta){for(let i=items.length+delta;i<items.length;i++){body.insertBefore(items[i],items[0])}}}", "buildBody() {\n let body = document.createElement('tbody');\n body.setAttribute('style', 'vertical-align: top');\n body.addEventListener('click', Table.cbToggleUserDetails, false);\n\n for (let i = 0; i < this.sortedData.length; i++) {\n let row = this.buildRow(this.sortedData[i]);\n\n body.appendChild(row);\n }\n\n return body;\n }", "static get_table_rows(table_body) {\n\n let first_row = $(table_body).find(\"tr\")[0];\n let rows = $(first_row).siblings();\n\n let table_rows = [\n $(first_row)\n ];\n\n rows.each(function(index, row) {\n table_rows.push($(row));\n });\n\n return table_rows;\n }", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}" ]
[ "0.71068895", "0.70123374", "0.69515854", "0.67283845", "0.6453831", "0.64362985", "0.6406883", "0.6403995", "0.6383349", "0.6368027", "0.6368027", "0.6327824", "0.63271356", "0.63271356", "0.6291889", "0.62862366", "0.62862366", "0.6275941", "0.62185556", "0.6214741", "0.6211158", "0.6211158", "0.61943436", "0.6191887", "0.6179049", "0.6175881", "0.6175881", "0.6175881", "0.6175881", "0.6175881", "0.61643064", "0.6163824", "0.6156686", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217", "0.61501217" ]
0.0
-1
Replace/restore the type attribute of script elements for safe DOM manipulation
function disableScript( elem ) { elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type; return elem; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function disableScript( elem ) {\r\n\tvar attr = elem.getAttributeNode(\"type\");\r\n\telem.type = ( attr && attr.specified ) + \"/\" + elem.type;\r\n\treturn elem;\r\n}", "function disableScript( elem ) {\n\tvar attr = elem.getAttributeNode(\"type\");\n\telem.type = ( attr && attr.specified ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\tvar attr = elem.getAttributeNode(\"type\");\n\telem.type = ( attr && attr.specified ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\tvar attr = elem.getAttributeNode(\"type\");\n\telem.type = ( attr && attr.specified ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\tvar attr = elem.getAttributeNode(\"type\");\n\telem.type = ( attr && attr.specified ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\tvar attr = elem.getAttributeNode(\"type\");\n\telem.type = ( attr && attr.specified ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\tvar attr = elem.getAttributeNode(\"type\");\n\telem.type = ( attr && attr.specified ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\tvar attr = elem.getAttributeNode(\"type\");\n\telem.type = ( attr && attr.specified ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\tvar attr = elem.getAttributeNode(\"type\");\n\telem.type = ( attr && attr.specified ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\tvar attr = elem.getAttributeNode(\"type\");\n\telem.type = ( attr && attr.specified ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\tvar attr = elem.getAttributeNode(\"type\");\n\telem.type = ( attr && attr.specified ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript(elem) {\n elem.type = (jQuery.find.attr(elem, \"type\") !== null) + \"/\" + elem.type;\n return elem;\n }", "function disableScript(elem) {\r\n\t\telem.type = (jQuery.find.attr(elem, \"type\") !== null) + \"/\" + elem.type;\r\n\t\treturn elem;\r\n\t}", "function manipulationTarget(elem,content){if(nodeName(elem,\"table\")&&nodeName(content.nodeType!==11?content:content.firstChild,\"tr\")){return jQuery(\">tbody\",elem)[0]||elem;}return elem;}// Replace/restore the type attribute of script elements for safe DOM manipulation", "function disableScript( elem ) {\n elem.type = (jQuery.find.attr( elem, \"type\" ) !== null) + \"/\" + elem.type;\n return elem;\n}", "function disableScript( elem ) {\n elem.type = (jQuery.find.attr( elem, \"type\" ) !== null) + \"/\" + elem.type;\n return elem;\n}", "function disableScript( elem ) {\n elem.type = (jQuery.find.attr( elem, \"type\" ) !== null) + \"/\" + elem.type;\n return elem;\n}", "function disableScript(elem) {\n elem.type = ( jQuery.find.attr(elem, \"type\") !== null ) + \"/\" + elem.type;\n return elem;\n }", "function disableScript(elem) {\n\t\telem.type = (jQuery.find.attr(elem, \"type\") !== null) + \"/\" + elem.type;\n\t\treturn elem;\n\t}", "function disableScript( elem ) {\n\tvar attr = elem.getAttributeNode( \"type\" );\n\telem.type = ( attr && attr.specified ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript(elem) {\n elem.type = (jQuery.find.attr(elem, \"type\") !== null) + \"/\" + elem.type;\n return elem;\n }", "function disableScript( elem ) { // 5645\n\telem.type = ( elem.getAttribute( \"type\" ) !== null ) + \"/\" + elem.type; // 5646\n\treturn elem; // 5647\n} // 5648", "function disableScript(elem) {\n elem.type = (elem.getAttribute(\"type\") !== null) + \"/\" + elem.type;\n return elem;\n }", "function disableScript( elem ) {\n elem.type = (jQuery.find.attr( elem, \"type\" ) !== null) + \"/\" + elem.type;\n return elem;\n}", "function manipulationTarget(elem,content){return jQuery.nodeName(elem,\"table\")&&jQuery.nodeName(content.nodeType!==11?content:content.firstChild,\"tr\")?elem.getElementsByTagName(\"tbody\")[0]||elem.appendChild(elem.ownerDocument.createElement(\"tbody\")):elem;}// Replace/restore the type attribute of script elements for safe DOM manipulation", "function disableScript( elem ) {\n elem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n return elem;\n }", "function manipulationTarget(elem,content){return jQuery.nodeName(elem,\"table\")&&jQuery.nodeName(content.nodeType===1?content:content.firstChild,\"tr\")?elem.getElementsByTagName(\"tbody\")[0]||elem.appendChild(elem.ownerDocument.createElement(\"tbody\")):elem;}// Replace/restore the type attribute of script elements for safe DOM manipulation", "function disableScript( elem ) {\n\t\telem.type = (jQuery.find.attr( elem, \"type\" ) !== null) + \"/\" + elem.type;\n\t\treturn elem;\n\t}", "function disableScript( elem ) {\n\t\telem.type = (jQuery.find.attr( elem, \"type\" ) !== null) + \"/\" + elem.type;\n\t\treturn elem;\n\t}", "function disableScript( elem ) {\n elem.type = (elem.getAttribute(\"type\") !== null) + \"/\" + elem.type;\n return elem;\n}", "function disableScript( elem ) {\n elem.type = (jQuery.find.attr( elem, \"type\" ) !== null) + \"/\" + elem.type;\n return elem;\n }", "function disableScript(elem) {\n\t\telem.type = (elem.getAttribute(\"type\") !== null) + \"/\" + elem.type;\n\t\treturn elem;\n\t}", "function disableScript(elem) {\n\t\telem.type = (elem.getAttribute(\"type\") !== null) + \"/\" + elem.type;\n\t\treturn elem;\n\t}", "function disableScript(elem) {\n\t\telem.type = (elem.getAttribute(\"type\") !== null) + \"/\" + elem.type;\n\t\treturn elem;\n\t}", "function disableScript(elem) {\n\t\telem.type = (elem.getAttribute(\"type\") !== null) + \"/\" + elem.type;\n\t\treturn elem;\n\t}", "function disableScript(elem) {\n elem.type = (elem.getAttribute(\"type\") !== null) + \"/\" + elem.type;\n return elem;\n }", "function disableScript(elem) {\n elem.type = (elem.getAttribute(\"type\") !== null) + \"/\" + elem.type;\n return elem;\n }", "function disableScript(elem) {\n elem.type = (elem.getAttribute(\"type\") !== null) + \"/\" + elem.type;\n return elem;\n }", "function disableScript(elem) {\n elem.type = (elem.getAttribute(\"type\") !== null) + \"/\" + elem.type;\n return elem;\n }", "function disableScript(elem) {\n elem.type = (elem.getAttribute(\"type\") !== null) + \"/\" + elem.type;\n return elem;\n }", "function disableScript(elem) {\n elem.type = (elem.getAttribute(\"type\") !== null) + \"/\" + elem.type;\n return elem;\n }", "function disableScript(elem) {\n elem.type = ( elem.getAttribute(\"type\") !== null ) + \"/\" + elem.type;\n return elem;\n }", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\t\telem.type = (elem.getAttribute(\"type\") !== null) + \"/\" + elem.type;\n\t\treturn elem;\n\t}", "function disableScript( elem ) {\n\t\telem.type = (elem.getAttribute(\"type\") !== null) + \"/\" + elem.type;\n\t\treturn elem;\n\t}", "function disableScript( elem ) {\n\t\telem.type = (elem.getAttribute(\"type\") !== null) + \"/\" + elem.type;\n\t\treturn elem;\n\t}", "function disableScript( elem ) {\n\t\telem.type = (elem.getAttribute(\"type\") !== null) + \"/\" + elem.type;\n\t\treturn elem;\n\t}", "function disableScript( elem ) {\n\t\telem.type = (elem.getAttribute(\"type\") !== null) + \"/\" + elem.type;\n\t\treturn elem;\n\t}", "function disableScript( elem ) {\n\telem.type = (jQuery.find.attr( elem, \"type\" ) !== null) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = (jQuery.find.attr( elem, \"type\" ) !== null) + \"/\" + elem.type;\n\treturn elem;\n}" ]
[ "0.7015204", "0.6983948", "0.6983948", "0.6983948", "0.6983948", "0.6983948", "0.6983948", "0.6983948", "0.6983948", "0.6983948", "0.6983948", "0.6941072", "0.69362515", "0.69002753", "0.68869877", "0.68869877", "0.68869877", "0.6885398", "0.6884041", "0.68813604", "0.68732643", "0.68662155", "0.68652165", "0.686206", "0.686054", "0.6855147", "0.6817917", "0.6816863", "0.6816863", "0.6813255", "0.68126845", "0.68087333", "0.68087333", "0.68087333", "0.68087333", "0.6794796", "0.6794796", "0.6794796", "0.6794796", "0.6794796", "0.6794796", "0.67853177", "0.67752373", "0.67752373", "0.67752373", "0.67752373", "0.67752373", "0.67752373", "0.67752373", "0.67752373", "0.67752373", "0.67752373", "0.67752373", "0.67752373", "0.67752373", "0.67752373", "0.67752373", "0.67752373", "0.67752373", "0.67752373", "0.67752373", "0.67752373", "0.67752373", "0.67752373", "0.67752373", "0.67752373", "0.67752373", "0.67752373", "0.67752373", "0.67752373", "0.67752373", "0.67752373", "0.67752373", "0.67752373", "0.67752373", "0.67752373", "0.67752373", "0.67752373", "0.67752373", "0.67752373", "0.67752373", "0.67752373", "0.67752373", "0.67752373", "0.67752373", "0.67752373", "0.67752373", "0.67752373", "0.67752373", "0.67752373", "0.67752373", "0.67752373", "0.67752373", "0.67752373", "0.67549783", "0.67549783", "0.67549783", "0.67549783", "0.67549783", "0.6754801", "0.6754801" ]
0.0
-1
Fix IE bugs, see support tests
function fixInput( src, dest ) { var nodeName = dest.nodeName.toLowerCase(); // Fails to persist the checked state of a cloned checkbox or radio button. if ( nodeName === "input" && rcheckableType.test( src.type ) ) { dest.checked = src.checked; // Fails to return the selected option to the default selected state when cloning options } else if ( nodeName === "input" || nodeName === "textarea" ) { dest.defaultValue = src.defaultValue; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function IEcompatibility() {\n\t// Only do anything if this is IE\n\tif(Browser.ie){\n\t\tvar __fix = $$(\"#kbbcode-size-options\", \"#kbbcode-size-options span\", \n\t\t\t\t\t\t\"#kbbcode-colortable\", \"#kbbcode-colortable td\");\n\t\tif (__fix) {\n\t\t\t__fix.setProperty('unselectable', 'on');\n\t\t}\n\t}\n}", "function fixIESelect() {\n return false;\n }", "function fixIE() {\n if (!Array.indexOf) {\n Array.prototype.indexOf = function(arg) {\n var index = -1;\n for (var i = 0; i < this.length; i++){\n var value = this[i];\n if (value == arg) {\n index = i;\n break;\n } \n }\n return index;\n };\n }\n\n if (!window.console) {\n window.console = {};\n window.console.log = window.console.debug = function(message) {\n return;\n var body = document.getElementsByTagName('body')[0];\n var messageDiv = document.createElement('div');\n messageDiv.innerHTML = message;\n body.insertBefore(messageDiv, body.lastChild);\n };\n } \n}", "function lpPatch_IE8(){\n\tif (typeof Array.prototype.indexOf !== 'function') {\n\t\tArray.prototype.indexOf = function(obj, start) {\n\t\t for (var i = (start || 0), j = this.length; i < j; i++) {\n\t\t if (this[i] === obj) { return i; }\n\t\t }\n\t\t return -1;\n\t\t} \n\t}\n\t\n\tif(typeof String.prototype.trim !== 'function') {\n\t\tString.prototype.trim = function() {\n\t \treturn this.replace(/^\\s+|\\s+$/g, ''); \n\t\t}\n\t}\t\n}", "function less_IE8() {\n if (/msie [1-8]{1}[^0-9]/.test(navigator.userAgent.toLowerCase())) {\n return true;\n }\n}", "function fixIeBug(e){return browser.msie?e.length-e.replace(/\\r*/g,\"\").length:0}", "function compIE(){\r\n\tvar agent = navigator.userAgent;\r\n\tif(agent.indexOf(\"MSIE 7.0\") > -1 || agent.indexOf(\"MSIE 8.0\") > - 1 || agent.indexOf(\"Trident 4.0\") > -1 || document.documentMode && document.documentMode <= 5)\r\n\t\treturn true;\r\n\treturn false;\r\n}", "function isIE() {\n return navigator.userAgent.toLowerCase().indexOf(\"trident\") > 0;\n }", "function isIE() {\n return navigator.userAgent.toLowerCase().indexOf(\"trident\") > 0;\n }", "function seven_isIE () {\n\t\t\tvar myNav = navigator.userAgent.toLowerCase();\n\t\t\treturn (myNav.indexOf('msie') != -1) ? parseInt(myNav.split('msie')[1]) : false;\n\t\t}", "function mg_is_old_IE() {\r\n\t\tif( navigator.appVersion.indexOf(\"MSIE 8.\") != -1 ) {return true;}\r\n\t\telse {return false;}\r\n\t}", "function isLowIE9() {\r\n var e = window.navigator.userAgent.toString().toUpperCase();\r\n var flag = false;\r\n if (e.indexOf(\"MSIE\") >= 0) {\r\n\r\n if (e.indexOf(\"MSIE 6.0\") > 0) flag = true;\r\n if (e.indexOf(\"MSIE 7.0\") > 0) flag = true;\r\n if (e.indexOf(\"MSIE 8.0\") > 0) flag = true;\r\n\r\n }\r\n\r\n\r\n return flag;\r\n\r\n }", "function fixIeFlexbox() {\r\n\t\t\t\t\tvar ua = window.navigator.userAgent,\r\n\t\t\t\t\tmsie = ua.indexOf(\"MSIE \");\r\n\t\t\t\t\t(msie > 0 || navigator.userAgent.match(/Trident.*rv\\:11\\./)) && $(\".vc_row-o-full-height\").each(function () {\r\n\t\t\t\t\t\t\"flex\" === $(this).find('> .span_12').css(\"display\") && $(this).wrap('<div class=\"vc_ie-flexbox-fixer\"></div>')\r\n\t\t\t\t\t})\r\n\t\t\t\t}", "function preIE10Check() {\n if (window.attachEvent && !window.navigator.msPointerEnabled) {\n return true;\n } else {\n return false;\n }\n }", "function Re(e){return!0===Ie(e)&&\"[object Object]\"===Object.prototype.toString.call(e)}", "function detectIE() {\n if (navigator.userAgent.indexOf(\"MSIE\") >= 0) {\n window.location = \"/static/badbrowser.html\";\n }\n return false;\n}", "function checkIeVersion() {\n var ie = gees.tools.internetExplorerVersion();\n if (ie == 7 || ie == 8 || ie == 9) {\n gees.dom.get('name_field').value = 'name';\n gees.dom.get('text_field').value = 'description';\n }\n}", "function autoComplete_func_isIE55() { // Private method\n return navigator.userAgent.indexOf(\"MSIE 5.5\") > -1;\n}", "function isIE() {\r\n return (navigator.userAgent.toLowerCase().indexOf('msie ') != -1) || (!!navigator.userAgent.match(/Trident.*rv[:]*11\\./));\r\n}", "function isIE() {\n return (navigator.userAgent.toLowerCase().indexOf('msie ') != -1) || (!!navigator.userAgent.match(/Trident.*rv[:]*11\\./));\n}", "function _overflowFixAdd() { ($.browser.msie) ? $(\"body, html\").css({ overflowX: 'visible' }) : $(\"body\").css({ overflowX: 'visible' }); }", "function isIE () {\n var myNav = navigator.userAgent.toLowerCase();\n return (myNav.indexOf('msie') != -1) ? parseInt(myNav.split('msie')[1]) : false;\n}", "function is_IE()\n{\n\tif (navigator.userAgent.indexOf(\"MSIE\")>-1) return true;\n\treturn false\n}", "function autoComplete_func_isIE7() { // Private method\n return navigator.userAgent.indexOf(\"MSIE 7\") > -1 && navigator.userAgent.indexOf(\"Opera\") == -1;\n}", "function ie() {\n var ua = window.navigator.userAgent;\n var msie = ua.indexOf(\"MSIE \");\n if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\\:11\\./))\n return true;\n else\n return false;\n}", "function isIE() { //ie?\n if (!!window.ActiveXObject || \"ActiveXObject\" in window)\n return true;\n else\n return false;\n}", "function StupidBug() {}", "function msieversion() {\n var ua = window.navigator.userAgent;\n var msie = ua.indexOf(\"MSIE \");\n if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\\:11\\./)) { \n var ieVersion = parseInt(ua.substring(msie + 5, ua.indexOf(\".\", msie)));\n if (ieVersion === 9) {$('body').addClass('no-js ie' + ieVersion);}\n return ieVersion;\n }\n else { return false; }\n }", "function msieversion() {\n var ua = window.navigator.userAgent;\n var msie = ua.indexOf(\"MSIE \");\n if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\\:11\\./)) { \n var ieVersion = parseInt(ua.substring(msie + 5, ua.indexOf(\".\", msie)));\n if (ieVersion === 9) {$('body').addClass('no-js ie' + ieVersion);}\n return ieVersion;\n }\n else { return false; }\n }", "function supportOldIE() {\n var oldIeVersion = document && (function() {\n var version = 3,\n div = document.createElement('div'),\n iElems = div.getElementsByTagName('i');\n\n // Keep constructing conditional HTML blocks until we hit one that resolves to an empty fragment\n while (\n div.innerHTML = '<!--[if gt IE ' + (++version) + ']><i></i><![endif]-->',\n iElems[0]\n ) {}\n return version > 4 ? version : undefined;\n }());\n\n if (oldIeVersion < 9) {\n // Support old IE by patching ko.components.register to ensure that we have called\n // document.createElement(componentName) at least once before trying to parse any\n // markup that might use a custom element with that name\n var allCustomComponentNames = [];\n ko.components.register = (function(underlyingRegisterFunc) {\n return function(componentName) {\n allCustomComponentNames.push(componentName);\n underlyingRegisterFunc.apply(this, arguments);\n document.createElement(componentName);\n };\n })(ko.components.register);\n\n // Also to enable custom elements on old IE, we have to call document.createElement(name)\n // on every document fragment that ever gets created. This is especially important\n // if you're also using jQuery, because its parseHTML code works by setting .innerHTML\n // on some element inside a temporary document fragment.\n // It would be nicer if jQuery exposed some API for registering custom element names,\n // but it doesn't.\n document.createDocumentFragment = (function(originalDocumentCreateDocumentFragment) {\n return function() {\n // Note that you *can't* do originalDocumentCreateDocumentFragment.apply(this, arguments)\n // because IE6/7 complain \"object doesn't support this method\". Fortunately the function\n // doesn't take any parameters, and doesn't need a \"this\" value.\n var docFrag = originalDocumentCreateDocumentFragment();\n ko.utils.arrayForEach(allCustomComponentNames, docFrag.createElement.bind(docFrag));\n return docFrag;\n };\n })(document.createDocumentFragment);\n }\n }", "function isIE() {\n\t\t\treturn typeof attachEvent !== \"undefined\" && typeof addEventListener === \"undefined\";\n\t\t}", "function podPress_is_modern_ie() {\r\n\t\tif ( -1 != navigator.userAgent.search(/Trident\\/([0-9]+\\.[0-9]+)/gi) && true == podPress_is_v1_gtoreq_v2(RegExp.$1, '5') && -1 != navigator.userAgent.search(/MSIE\\s([0-9]+\\.[0-9]+)/gi) && true == podPress_is_v1_gtoreq_v2(RegExp.$1, '9') ) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "function fixIeBug(string) {\n\t\t\t\tif (browser.msie) {\n\t\t\t\t\treturn string.length - string.replace(/\\r*/g, '').length;\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t}", "function fixIeBug(string) {\n\t\t\t\tif (browser.msie) {\n\t\t\t\t\treturn string.length - string.replace(/\\r*/g, '').length;\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t}", "function msieversion() {\r\n var ua = window.navigator.userAgent;\r\n var msie = ua.indexOf(\"MSIE \");\r\n if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\\:11\\./)) {\r\n var ieVersion = parseInt(ua.substring(msie + 5, ua.indexOf(\".\", msie)));\r\n if (ieVersion === 9) {\r\n $('body').addClass('no-js ie' + ieVersion);\r\n }\r\n return ieVersion;\r\n } else {\r\n return false;\r\n }\r\n }", "function vpb_IE_detected()\n{\n var ua = window.navigator.userAgent;\n var old_ie = ua.indexOf('MSIE ');\n var new_ie = ua.indexOf('Trident/');\n\n if ((old_ie > -1) || (new_ie > -1)) \n\t{\n return true;\n } else {\n\t\treturn false;\n\t}\n}", "function isIE() {\n return jQuery.browser.msie;\n }", "function isIE () {\n\tvar myNav = navigator.userAgent.toLowerCase();\n\treturn (myNav.indexOf('msie') != -1) ? parseInt(myNav.split('msie')[1]) : false;\n}", "function fixIeBug(string) {\r\n\t\t\t\tif ($.browser.msie) {\r\n\t\t\t\t\treturn string.length - string.replace(/\\r*/g, '').length;\r\n\t\t\t\t}\r\n\t\t\t\treturn 0;\r\n\t\t\t}", "function isIE() {\n var myNav = navigator.userAgent.toLowerCase();\n return (myNav.indexOf('msie') != -1) ? parseInt(myNav.split('msie')[1]) : false;\n }", "function autoComplete_func_isIE6() { // Private method\n return navigator.userAgent.indexOf(\"MSIE 6\") > -1 && navigator.userAgent.indexOf(\"Opera\") == -1;\n}", "function fixIeBug(string) {\n\t\t\t\tif ($.browser.msie) {\n\t\t\t\t\treturn string.length - string.replace(/\\r*/g, '').length;\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t}", "function fixIeBug(string) {\n\t\t\t\tif ($.browser.msie) {\n\t\t\t\t\treturn string.length - string.replace(/\\r*/g, '').length;\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t}", "function isIE() {\n\t\treturn typeof attachEvent !== \"undefined\" && typeof addEventListener === \"undefined\";\n\t}", "function isIE() {\n\t\treturn typeof attachEvent !== \"undefined\" && typeof addEventListener === \"undefined\";\n\t}", "function isIE() {\n\t\treturn typeof attachEvent !== \"undefined\" && typeof addEventListener === \"undefined\";\n\t}", "function isIE() {\n\t\treturn typeof attachEvent !== \"undefined\" && typeof addEventListener === \"undefined\";\n\t}", "function isIE() {\n\t\treturn typeof attachEvent !== \"undefined\" && typeof addEventListener === \"undefined\";\n\t}", "function isIE() {\n\t\treturn typeof attachEvent !== \"undefined\" && typeof addEventListener === \"undefined\";\n\t}", "function isIE() {\n\t\treturn typeof attachEvent !== \"undefined\" && typeof addEventListener === \"undefined\";\n\t}", "function isIE () {\n var myNav = navigator.userAgent.toLowerCase();\n return (myNav.indexOf('msie') != -1) ? parseInt(myNav.split('msie')[1], 10) : false;\n }", "function uTestBrowserIE()\n{\n return (uBrowserID == uIE);\n}", "function autoComplete_func_isIE() { // Private method\n return autoComplete_func_isIE5() || autoComplete_func_isIE6() || autoComplete_func_isIE7() ;\n}", "function is_IE() {\n return (window.navigator.userAgent.match(/MSIE|Trident/) !== null);\n}", "function fixIEMouseDown() {\n _ieSelectBack = doc.body.onselectstart;\n doc.body.onselectstart = fixIESelect;\n }", "function nofx_goodBrowser() {\n //IE6 is the bad browser. IE7 is 'mostly' ok.\n //IE8 FF Chrome Safari are good.\n if (BrowserDetect.browser == 'Explorer' && BrowserDetect.version < 7)\n return false;\n else\n return true;\n}", "private internal function m248() {}", "function ieViewportFix() {\n\n \t\t\tvar msViewportStyle = document.createElement(\"style\");\n\n \t\t\tmsViewportStyle.appendChild(\n \t\t\t\tdocument.createTextNode(\n \t\t\t\t\t\"@-ms-viewport { width: device-width; }\"\n \t\t\t\t)\n \t\t\t);\n \t\t\tif (navigator.userAgent.match(/IEMobile\\/10\\.0/)) {\n\n \t\t\t\tmsViewportStyle.appendChild(\n \t\t\t\t\tdocument.createTextNode(\n \t\t\t\t\t\t\"@-ms-viewport { width: auto !important; }\"\n \t\t\t\t\t)\n \t\t\t\t);\n \t\t\t}\n\n \t\t\tdocument.getElementsByTagName(\"head\")[0].\n \t\t\tappendChild(msViewportStyle);\n \t\t}", "function isIE() {\n return (navigator.appName == \"Microsoft Internet Explorer\");\n}", "function checkVersion() {\n\t\tvar msg = \"You're not using Internet Explorer.\";\n\t\tvar ver = getInternetExplorerVersion();\n\t\tif ( ver > -1 ) {\n\t\t\tif ( ver >= 8.0 ) {\n\t\t\t\tmsg = \"You're using a recent copy of Internet Explorer.\"\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmsg = \"You should upgrade your copy of Internet Explorer.\";\n\t\t\t}\n\t\t}\n\t\tconsole.log( msg );\n\t}", "function isIE () {\n var ms_ie = false;\n var ua = window.navigator.userAgent;\n var old_ie = ua.indexOf('MSIE ');\n var new_ie = ua.indexOf('Trident/');\n\n if ((old_ie > -1) || (new_ie > -1)) {\n ms_ie = true;\n }\n\n return ms_ie ;\n}", "function autoComplete_func_isIE5() { // Private method\n return navigator.userAgent.indexOf(\"MSIE 5\") > -1;\n}", "function manageIconIE(icon) {\r\n\t\t\t\tif($.browser.msie) {\r\n\t\t\t\t\t$('.'+icon).html('');\r\n\t\t\t\t\t$('.'+icon+' > .empty').hide();\r\n\t\t\t\t}\r\n\t\t\t}", "function detectIE() {\r\n\tvar ua = window.navigator.userAgent;\r\n\tvar msie = ua.indexOf('MSIE ');\r\n\tif (msie > 0) {\r\n\t\treturn parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);\r\n\t}\r\n\tvar trident = ua.indexOf('Trident/');\r\n\tif (trident > 0) {\r\n\t\tvar rv = ua.indexOf('rv:');\r\n\t\treturn parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\r\n\t}\r\n\tvar edge = ua.indexOf('Edge/');\r\n\tif (edge > 0) {\r\n\t\treturn parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\r\n\t}\r\n\treturn false;\r\n}", "function needsLayeringShim() {\n return isIE && (isWinXP || isWinVista || isWin7);\n}", "function preventCompatibilityIssues(){\t\n\t/* Add trim() function for IE*/\n\tif(typeof String.prototype.trim !== 'function') {\n\t\t String.prototype.trim = function() {\n\t\t return this.replace(/^\\s+|\\s+$/g, ''); \n\t\t }\n\t}\n\t\n\t/**\n\t * Protect window.console method calls, e.g. console is not defined on IE\n\t * unless dev tools are open, and IE doesn't define console.debug\n\t */\n\t(function() {\n\t if (!window.console) {\n\t window.console = {};\n\t }\n\t // union of Chrome, FF, IE, and Safari console methods\n\t var m = [\n\t \"log\", \"info\", \"warn\", \"error\", \"debug\", \"trace\", \"dir\", \"group\",\n\t \"groupCollapsed\", \"groupEnd\", \"time\", \"timeEnd\", \"profile\", \"profileEnd\",\n\t \"dirxml\", \"assert\", \"count\", \"markTimeline\", \"timeStamp\", \"clear\"\n\t ];\n\t // define undefined methods as noops to prevent errors\n\t for (var i = 0; i < m.length; i++) {\n\t if (!window.console[m[i]]) {\n\t window.console[m[i]] = function() {};\n\t } \n\t } \n\t})();\n}", "function alertBadBrowser(){\n var isIE = /*@cc_on!@*/false || !!document.documentMode;\n var isEdge = !isIE && !!window.StyleMedia;\n\n if(isIE||isEdge){\n alert(\"Your browser may cause display problems. You should obtain a modern webkit browser. While some versions of Microsoft Edge work, it can be buggy. Chrome, Firefox, Safari, and Opera all work consistently. Internet Explorer is not supported.\");\n }\n}", "function isIE()\n{\n return document.all;\n}", "function msieversion() \n{\n\ttry{\n\t var ua = window.navigator.userAgent;\n\t var msie = ua.indexOf(\"MSIE \");\n\t\n\t if (msie > 0) // Check for Internet Explorer\n\t {\n\t \tvar version = parseInt(ua.substring(msie + 5, ua.indexOf(\".\", msie)));\n\t \tif (version < 9) {\n\t \t\treturn true;\n\t \t}\n\t }\n\t} catch (err) {\n\t\t//ignore any error\n\t}\n return false;\n}", "function fixSelectWidthForIE() {\n\t// only target IE\n\tif($.browser.msie)\n\t{\n\t\t// bind mousedown\n\t\t$('select:not([multiple])').mousedown(function()\n\t\t{\n\t\t\t// not already auto-width\n\t\t\tif($(this).css('width') != 'auto')\n\t\t\t{\n\t\t\t\t// get current width\n\t\t\t\tvar width = $(this).width();\n\n\t\t\t\t// reset if needed\n\t\t\t\tif(typeof $(this).data('orginal-width') != 'undefined' && width > $(this).data('orginal-width')) width = $(this).data('orginal-width');\n\n\t\t\t\t// set data and new width\n\t\t\t\t$(this).data('orginal-width', width);\n\t\t\t\t$(this).css('width', 'auto');\n\n\t\t\t\t// if width is less then before, undo this\n\t\t\t\tif($(this).width() < width)\n\t\t\t\t{\n\t\t\t\t\t// unbind\n\t\t\t\t\t$(this).unbind('mousedown');\n\n\t\t\t\t\t// reset width\n\t\t\t\t\t$(this).css('width', $(this).data('orginal-width').toString() +'px');\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\n\t\t// bind blur, if the user doesn't change the value\n\t\t.blur(function() {\n\t\t\t$(this).css('width', $(this).data('orginal-width').toString() +'px');\n\t\t})\n\n\t\t// bind change, if the user changes the value\n\t\t.change(function() {\n\t\t\t$(this).css('width', $(this).data('orginal-width').toString() +'px');\n\t\t});\n }\n}", "function isIE(e,i){var t,n=\"IE\",m=document.createElement(\"B\"),o=document.documentElement;return e&&(n+=\" \"+e,i&&(n=i+\" \"+n)),m.innerHTML=\"<!--[if \"+n+']><b id=\"iecctest\"></b><![endif]-->',o.appendChild(m),t=!!document.getElementById(\"iecctest\"),o.removeChild(m),t}", "function resizingWindowIsIE()\n{\n\tif (navigator.appName == 'Microsoft Internet Explorer') {\n\t\treturn true;\n\t}\n\treturn false;\n}", "function isIe678 () {\n\t\tvar IE = eval('\"v\"==\"\\v\"');\n\t\treturn \tIE;\n\t}", "protected internal function m252() {}", "function iedetect(v) {\n\n\t var r = RegExp('msie' + (!isNaN(v) ? ('\\\\s' + v) : ''), 'i');\n\t\treturn r.test(navigator.userAgent);\n\t\t\t\n\t}", "function detectIE() {\n\tvar isie = false;\n\tvar ua = window.navigator.userAgent;\n\tvar msie = ua.indexOf('MSIE ');\n\tvar trident = ua.indexOf('Trident/');\n\tvar edge = ua.indexOf('Edge/');\n\tif (msie > 0) {\n\t\t// IE 10 or older\n\t\tisie = true;\n\t\tvar ieVer = parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);\n\t} else if (trident > 0) {\n\t\t// IE 11\n\t\tisie = true;\n\t\tvar rv = ua.indexOf('rv:');\n\t\tvar ieVer = parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\n\t} else if (edge > 0) {\n\t\t// Edge (IE 12+)\n\t\tisie = true;\n\t\tvar ieVer = parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\n\t}\n\tif (isie == true) {\n\t\t$('html').addClass('ie');\n\t\tif (ieVer == 11) $('html').addClass('ie11');\n\t}\n}", "function isIE() {\n\tif (navigator.appName.indexOf(\"Explorer\")>0)\n\t\treturn true;\n\telse\n\t\treturn false;\n}", "isIE() {\n return Boolean(\n (Object.getOwnPropertyDescriptor && Object.getOwnPropertyDescriptor(window, 'ActiveXObject')) ||\n 'ActiveXObject' in window\n )\n }", "function checkBrowser(){\n\tif(document.getElementById && document.attachEvent){\t\n\t\t//modern IE\n\t\tbrowser = 'modIE';\n\t}\n\telse if(document.getElementById){\t\n\t\t//modern, non-IE\n\t\tbrowser = 'gecko';\n\t}\n\telse{\t\t\n\t\t//ask to download new browser\n\t\twindow.location = \"browser.html\";\n\t}\n}", "function isIE() {\n var nav = navigator.userAgent.toLowerCase();\n\n return (nav.indexOf('msie') != -1) ? parseInt(nav.split('msie')[1]) : false;\n }", "function isBrowserIE () {\n var ua = window.navigator.userAgent\n var msie = ua.indexOf('MSIE ')\n var trident = ua.indexOf('Trident/')\n var edge = ua.indexOf('Edge/')\n if (msie > 0 || trident > 0 || edge > 0) {\n return true\n }\n }", "function isIE8() {\n if (window.attachEvent && !window.addEventListener) {\n return true;\n } else {\n return false;\n }\n }", "IE ():boolean {\n\n\t\treturn this.agent.match(/Trident/i) ? true : false;\n\t}", "function isIE() {\n\t//Create var for userAgent\n\tuserAg = navigator.userAgent;\n\t//Create var to store return of index of strings\n\tvar is_ie = userAg.indexOf(\"MSIE \") > -1 || userAg.indexOf(\"Trident/\") > -1 || userAg.indexOf(\"Edge\") > -1;\n\t//return result\n\treturn is_ie;\n}", "function placeholderSupport()\r\n{\r\n\t/* input placeholder for ie9 & ie8 & ie7 */\r\n jQuery.support.placeholder = ('placeholder' in document.createElement('input'));\r\n\t/* input placeholder for ie9 & ie8 & ie7 end*/\r\n\t\r\n\t/*fix for IE7 and IE8 */\r\n\tif (!jQuery.support.placeholder) {\r\n\t\tjQuery(\"[placeholder]\").focus(function () {\r\n\t\t\tif (jQuery(this).val() == jQuery(this).attr(\"placeholder\")) jQuery(this).val(\"\");\r\n\t\t}).blur(function () {\r\n\t\t\tif (jQuery(this).val() == \"\") jQuery(this).val(jQuery(this).attr(\"placeholder\"));\r\n\t\t}).blur();\r\n\r\n\t\tjQuery(\"[placeholder]\").parents(\"form\").submit(function () {\r\n\t\t\tjQuery(this).find('[placeholder]').each(function() {\r\n\t\t\t\tif (jQuery(this).val() == jQuery(this).attr(\"placeholder\")) {\r\n\t\t\t\t\t jQuery(this).val(\"\");\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t});\r\n\t}\r\n\t/*fix for IE7 and IE8 end */\r\n}", "function clickIE4(){\nif (event.button==2){\nreturn false;\n}\n}", "function ie(a){this.ra=a}", "function hasTransparentBug (browser) {\n return ~['ie 8', 'ie 9'].indexOf(browser);\n}", "function initIE(){\n\t\tvar head = document.getElementsByTagName('head')[0];\n\t\tvar style = document.createElement('style');\n\t\tstyle.type = 'text/css';\n\t\tstyle.styleSheet.cssText = ':before{content:none !important';\n\t\thead.appendChild(style);\n\t\tsetTimeout(function(){\n\t\t\thead.removeChild(style);\n\t\t}, 0);\n\t}", "function ElemToWindow(elem,dummy){\r\nif(!elem) return null;\r\nvar bod = document.body, doc = document.documentElement, rtl = 0;\r\n\r\nif(elem.getBoundingClientRect && !TGNoIEClientRect){\r\n if(!elem.parentNode) return [0,0]; \r\n var A = elem.getBoundingClientRect();\r\n var x = A.left, y = A.top;\r\n if(BIEStrict || (BMozilla||BOpera)&&BStrict){\r\n x += doc.scrollLeft;\r\n y += doc.scrollTop;\r\n if(!BIEA8) { x -= doc.clientLeft; y -= doc.clientTop; }\r\n \r\n }\r\n else {\r\n if(BChrome){\r\n var B = doc.getBoundingClientRect();\r\n x -= B.left-doc.offsetLeft; y -= B.top-doc.offsetTop;\r\n }\r\n \r\n else {\r\n x += bod.scrollLeft;\r\n y += bod.scrollTop;\r\n }\r\n \r\n if(BSafariMac&&!BSafariWin){\r\n x -= doc.offsetLeft;\r\n y -= doc.offsetTop;\r\n }\r\n else if(!BIE && !BChrome && !BSafariWin){\r\n x += bod.clientLeft;\r\n y += bod.clientTop;\r\n }\r\n }\r\n \r\n return [x/CZoom,y/CZoom];\r\n }\r\nvar x=elem.offsetLeft, y=elem.offsetTop,p,lp = elem;\r\ntry { p = elem.offsetParent; } catch(e){ return [x,y]; } \r\nif(!p) return AbsoluteToWindow(); \r\nif(BIEA){\r\n if(BIEStrict && CZoom!=1 && lp.style.position==\"absolute\"){\r\n x += Math.floor(lp.offsetLeft/CZoom-lp.offsetLeft);\r\n y += Math.floor(lp.offsetTop/CZoom-lp.offsetTop);\r\n }\r\n while(p && p!=doc){ \r\n if(p==bod){ \r\n x+=p.offsetLeft+p.clientLeft;\r\n y+=p.offsetTop+p.clientTop; \r\n break;\r\n }\r\n if((!BIEA8||!BStrict) && p.tagName.toLowerCase()==\"table\"){ \r\n x-=p.clientLeft;\r\n y-=p.clientTop;\r\n }\r\n x+=p.offsetLeft+p.clientLeft-p.scrollLeft;\r\n y+=p.offsetTop+p.clientTop-p.scrollTop; \r\n p = p.offsetParent;\r\n }\r\n if(BIEA8 && BStrict){ x-=bod.clientLeft; y-=bod.clientTop; }\r\n if(BIEStrict && CZoom!=1){\r\n x+=Math.floor(p.offsetLeft/CZoom-p.offsetLeft);\r\n y+=Math.floor(p.offsetTop/CZoom-p.offsetTop);\r\n } \r\n }\r\nelse { \r\n var po = elem;\r\n while(1){\r\n \r\n while(po!=p){\r\n po = po.parentNode;\r\n if(!po || po==bod) break; \r\n \r\n if(po!=bod&&!rtl){\r\n x-=po.scrollLeft;\r\n y-=po.scrollTop;\r\n }\r\n \r\n if((BOpera8 || BOpera&&BOperaVer<9.5)&&po.tagName){\r\n var tag = po.tagName.toLowerCase();\r\n if(tag=='tr'){ y+=po.offsetTop; x+=po.scrollLeft; } \r\n else if(tag=='tbody') x+=po.scrollLeft;\r\n else if(BOpera && tag=='table' && po.style.borderCollapse!='collapse') y+=Math.floor((po.offsetHeight-po.clientHeight)/2); \r\n }\r\n\r\n if(BFF3 && po.tagName){\r\n var tag = po.tagName.toLowerCase();\r\n if(tag==\"td\"){ x+=po.clientLeft; y+=po.clientTop; }\r\n } \r\n if((BIPAD||BSafariWin) && po.tagName){\r\n var tag = po.tagName.toLowerCase();\r\n if(tag==\"table\" || tag==\"td\"){ x+=po.clientLeft; y+=po.clientTop; }\r\n } \r\n }\r\n \r\n if(!p || p==bod) break;\r\n x+=p.offsetLeft;\r\n y+=p.offsetTop;\r\n lp = p; \r\n p = p.offsetParent;\r\n if(p==bod){\r\n var abs = lp.Absolute; if(abs==null){ var s = GetStyle(lp); abs = s.position==\"absolute\"; lp.Absolute = abs; }\r\n if(abs) {\r\n \r\n break;\r\n }\r\n }\r\n }\r\n \r\n if(BOpera8 || BMozilla || BSafariWin || BSafariMac){\r\n var abs = lp.Absolute; if(abs==null){ var s = GetStyle(lp); abs = s.position==\"absolute\"; lp.Absolute = abs; }\r\n if(abs){\r\n var A = AbsoluteToWindow();\r\n x += A[0]; y += A[1]; \r\n return [x,y];\r\n }\r\n if(BMozilla||BSafariWin){\r\n if(doc.marginLeft==null){\r\n var s = GetStyle(doc);\r\n var ml = parseInt(s.marginLeft), mt = parseInt(s.marginTop);\r\n doc.marginLeft = ml?ml:0; doc.marginTop = mt?mt:0;\r\n }\r\n x += doc.marginLeft; y += doc.marginTop;\r\n }\r\n \r\n if(BFF3&&!BStrict){ x -= bod.offsetLeft; y -= bod.offsetTop; }\r\n \r\n if(BSafariMac&&!abs){ x += bod.offsetLeft; y += bod.offsetTop; }\r\n if(BMozilla||BSafariWin){\r\n if(bod.clientLeft==null) {\r\n var s = GetStyle(bod);\r\n var bl = parseInt(s.borderLeftWidth), bt = parseInt(s.borderTopWidth);\r\n bod.clientLeft = bl?bl:0; bod.clientTop = bt?bt:0;\r\n }\r\n x += bod.clientLeft; y += bod.clientTop; \r\n }\r\n if(BOpera8){\r\n x += bod.offsetLeft+bod.clientLeft;\r\n y += bod.offsetTop+bod.clientTop;\r\n }\r\n \r\n } \r\n if(BKonqueror){ x += doc.offsetLeft; y += doc.offsetTop; }\r\n \r\n }\r\n\r\nreturn [x,y];\r\n}", "function isIE9() {\n var userAgent = navigator.userAgent.toLowerCase();\n return userAgent.indexOf(\"trident/5.0\") > 0 || userAgent.indexOf(\"msie 9.0\") > 0;\n }", "function isIE9() {\n var userAgent = navigator.userAgent.toLowerCase();\n return userAgent.indexOf(\"trident/5.0\") > 0 || userAgent.indexOf(\"msie 9.0\") > 0;\n }", "function ie03Clr(){ \r\n\tz_ie03_nav_details_flag = false;\r\n}", "function validateNav() {\n switch (navigator.sayswho) {\n // IE\n case 'IE 4':\n case 'IE 5':\n case 'IE 6':\n case 'IE 7':\n case 'IE 8':\n case 'IE 9':\n // safari\n case 'Safari 1':\n case 'Safari 2':\n case 'Safari 3':\n case 'Safari 4':\n case 'Safari 5':\n case 'Safari 6':\n if(ga('.browser-update')\n .length != 0) return false;\n var aj = jAjax(_THEME + '/body/old-browser.html', 'get', '');\n aj.done(function(data) {\n globalCont.prepend(data);\n });\n break;\n }\n}", "function Oe(){!function t(e){Ie[De++]^=255&e,Ie[De++]^=e>>8&255,Ie[De++]^=e>>16&255,Ie[De++]^=e>>24&255,De>=Le&&(De-=Le)}((new Date).getTime())}", "function ie(){this.i=0,this.j=0,this.S=new Array}", "function clickEventIE() {\r\n\tif (document.all) {\t\t\r\n\t\treturn false;\r\n\t\t}\r\n\t}", "function isMsieSevenOrNewer() {\n\t\tif (typeof window.XMLHttpRequest !== 'undefined') {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "screwIE () {\n let browser = new Browser();\n if (browser.screwIE === true) {\n this.$toast({\n type: 'warning',\n content: `\n <h4>Unsupported Browser</h4>\n <span>This app may not function properly in Internet Explorer! Please use another browser such as Chrome, Edge, or Firefox.</span>`\n });\n }\n }", "function ie(e,r){var n=o(e),a=void 0===w[0]\nr=void 0===r||!!r,t.animate&&!a&&i(_,t.cssClasses.tap,t.animationDuration),E.forEach((function(e){re(e,function(e,r){return null===e||!1===e||void 0===e?w[r]:(\"number\"==typeof e&&(e=String(e)),e=t.format.from(e),!1===(e=D.toStepping(e))||isNaN(e)?w[r]:e)}(n[e],e),!0,!1)})),E.forEach((function(e){re(e,w[e],!0,!0)})),te(),E.forEach((function(e){$(\"update\",e),null!==n[e]&&r&&$(\"set\",e)}))}", "function isIE() {\n let ua = navigator.userAgent;\n /* MSIE used to detect old browsers and Trident used to newer ones*/\n return ua.indexOf(\"MSIE \") > -1 || ua.indexOf(\"Trident/\") > -1;\n}" ]
[ "0.7220337", "0.70940924", "0.699044", "0.68625945", "0.66801953", "0.6574329", "0.6557123", "0.65142417", "0.65142417", "0.64660573", "0.64034224", "0.6379892", "0.6297539", "0.6296395", "0.62622595", "0.6166529", "0.6163856", "0.61358476", "0.61114734", "0.6054131", "0.60267335", "0.6011997", "0.6010439", "0.5999043", "0.59938425", "0.5992769", "0.59907323", "0.59887904", "0.59887904", "0.5986692", "0.59769297", "0.5964097", "0.5956743", "0.5956743", "0.5952554", "0.5933552", "0.5926419", "0.59256107", "0.5903011", "0.58982563", "0.5897483", "0.5891624", "0.5891624", "0.5881813", "0.5881813", "0.5881813", "0.5881813", "0.5881813", "0.5881813", "0.5881813", "0.58809835", "0.5873493", "0.5868973", "0.5865985", "0.58622867", "0.58622396", "0.5860273", "0.5857521", "0.58358437", "0.5831684", "0.58297247", "0.58136505", "0.57972383", "0.5765634", "0.57539", "0.5752738", "0.57393086", "0.5732631", "0.5731022", "0.57287157", "0.57261765", "0.5723398", "0.5699701", "0.56989235", "0.56913453", "0.5684657", "0.5668621", "0.56558335", "0.5642601", "0.5632942", "0.5620239", "0.56194705", "0.56158143", "0.5615281", "0.5608052", "0.55952054", "0.55694675", "0.5562909", "0.55596423", "0.5543752", "0.55268735", "0.55268735", "0.5522381", "0.55179256", "0.55138415", "0.5504441", "0.5498513", "0.549372", "0.54823655", "0.5482273", "0.5474742" ]
0.0
-1
Executing both pixelPosition & boxSizingReliable tests require only one layout so they're executed at the same time to save the second computation.
function computeStyleTests() { // This is a singleton, we need to execute it only once if ( !div ) { return; } container.style.cssText = "position:absolute;left:-11111px;width:60px;" + "margin-top:1px;padding:0;border:0"; div.style.cssText = "position:relative;display:block;box-sizing:border-box;overflow:scroll;" + "margin:auto;border:1px;padding:1px;" + "width:60%;top:1%"; documentElement.appendChild( container ).appendChild( div ); var divStyle = window.getComputedStyle( div ); pixelPositionVal = divStyle.top !== "1%"; // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44 reliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12; // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3 // Some styles come back with percentage values, even though they shouldn't div.style.right = "60%"; pixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36; // Support: IE 9 - 11 only // Detect misreporting of content dimensions for box-sizing:border-box elements boxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36; // Support: IE 9 only // Detect overflow:scroll screwiness (gh-3699) // Support: Chrome <=64 // Don't get tricked when zoom affects offsetWidth (gh-4029) div.style.position = "absolute"; scrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12; documentElement.removeChild( container ); // Nullify the div so it wouldn't be stored in the memory and // it will also be a sign that checks already performed div = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function computePixelPositionAndBoxSizingReliable() {\n\t\t\t// Support: Firefox, Android 2.3 (Prefixed box-sizing versions).\n\t\t\tdiv.style.cssText = \"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\t\"box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;\" +\n\t\t\t\t\"position:absolute;top:1%\";\n\t\t\tdocElem.appendChild( container );\n\n\t\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\t\tdocElem.removeChild( container );\n\t\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\t\tdiv.style.cssText =\n\t\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t\t// Vendor-prefix box-sizing\n\t\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\t\tdiv.innerHTML = \"\";\n\t\t\tdocElem.appendChild( container );\n\n\t\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\t\tdocElem.removeChild( container );\n\t\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\t\tdiv.style.cssText =\n\t\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t\t// Vendor-prefix box-sizing\n\t\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\t\tdiv.innerHTML = \"\";\n\t\t\tdocElem.appendChild( container );\n\n\t\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\t\tdocElem.removeChild( container );\n\t\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\t\tdiv.style.cssText =\n\t\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t\t// Vendor-prefix box-sizing\n\t\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\t\tdiv.innerHTML = \"\";\n\t\t\tdocElem.appendChild( container );\n\t\n\t\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\t\n\t\t\tdocElem.removeChild( container );\n\t\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\t\tdiv.style.cssText =\n\t\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t\t// Vendor-prefix box-sizing\n\t\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\t\tdiv.innerHTML = \"\";\n\t\t\tdocElem.appendChild( container );\n\t\n\t\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\t\n\t\t\tdocElem.removeChild( container );\n\t\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\t// Support: Firefox, Android 2.3 (Prefixed box-sizing versions).\n\t\tdiv.style.cssText = \"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;\" +\n\t\t\t\"position:absolute;top:1%\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\t// Support: Firefox, Android 2.3 (Prefixed box-sizing versions).\n\t\tdiv.style.cssText = \"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;\" +\n\t\t\t\"position:absolute;top:1%\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n div.style.cssText =\n // Support: Firefox<29, Android 2.3\n // Vendor-prefix box-sizing\n \"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n \"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n \"border:1px;padding:1px;width:4px;position:absolute\";\n div.innerHTML = \"\";\n docElem.appendChild(container);\n\n var divStyle = window.getComputedStyle(div, null);\n pixelPositionVal = divStyle.top !== \"1%\";\n boxSizingReliableVal = divStyle.width === \"4px\";\n\n docElem.removeChild(container);\n }", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n div.style.cssText =\n // Support: Firefox<29, Android 2.3\n // Vendor-prefix box-sizing\n \"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n \"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n \"border:1px;padding:1px;width:4px;position:absolute\";\n div.innerHTML = \"\";\n docElem.appendChild(container);\n\n var divStyle = window.getComputedStyle(div, null);\n pixelPositionVal = divStyle.top !== \"1%\";\n boxSizingReliableVal = divStyle.width === \"4px\";\n\n docElem.removeChild(container);\n }", "function computePixelPositionAndBoxSizingReliable(){div.style.cssText = // Support: Firefox<29, Android 2.3\n// Vendor-prefix box-sizing\n\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" + \"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" + \"border:1px;padding:1px;width:4px;position:absolute\";div.innerHTML = \"\";docElem.appendChild(container);var divStyle=window.getComputedStyle(div,null);pixelPositionVal = divStyle.top !== \"1%\";boxSizingReliableVal = divStyle.width === \"4px\";docElem.removeChild(container);} // Support: node.js jsdom", "function computeStyleTests() {\n\n\t\t\t// This is a singleton, we need to execute it only once\n\t\t\tif (!div) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tdiv.style.cssText = \"box-sizing:border-box;\" + \"position:relative;display:block;\" + \"margin:auto;border:1px;padding:1px;\" + \"top:1%;width:50%\";\n\t\t\tdiv.innerHTML = \"\";\n\t\t\tdocumentElement.appendChild(container);\n\n\t\t\tvar divStyle = window.getComputedStyle(div);\n\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only\n\t\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\t\tdiv.style.marginRight = \"50%\";\n\t\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\n\t\t\tdocumentElement.removeChild(container);\n\n\t\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t\t// it will also be a sign that checks already performed\n\t\t\tdiv = null;\n\t\t}", "function computeStyleTests() {\n\n \t\t// This is a singleton, we need to execute it only once\n \t\tif ( !div ) {\n \t\t\treturn;\n \t\t}\n\n \t\tcontainer.style.cssText = \"position:absolute;left:-11111px;width:60px;\" +\n \t\t\t\"margin-top:1px;padding:0;border:0\";\n \t\tdiv.style.cssText =\n \t\t\t\"position:relative;display:block;box-sizing:border-box;overflow:scroll;\" +\n \t\t\t\"margin:auto;border:1px;padding:1px;\" +\n \t\t\t\"width:60%;top:1%\";\n \t\tdocumentElement.appendChild( container ).appendChild( div );\n\n \t\tvar divStyle = window.getComputedStyle( div );\n \t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n \t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n \t\treliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12;\n\n \t\t// Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3\n \t\t// Some styles come back with percentage values, even though they shouldn't\n \t\tdiv.style.right = \"60%\";\n \t\tpixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36;\n\n \t\t// Support: IE 9 - 11 only\n \t\t// Detect misreporting of content dimensions for box-sizing:border-box elements\n \t\tboxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36;\n\n \t\t// Support: IE 9 only\n \t\t// Detect overflow:scroll screwiness (gh-3699)\n \t\t// Support: Chrome <=64\n \t\t// Don't get tricked when zoom affects offsetWidth (gh-4029)\n \t\tdiv.style.position = \"absolute\";\n \t\tscrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12;\n\n \t\tdocumentElement.removeChild( container );\n\n \t\t// Nullify the div so it wouldn't be stored in the memory and\n \t\t// it will also be a sign that checks already performed\n \t\tdiv = null;\n \t}", "function computeStyleTests() {\n\n\t\t\t// This is a singleton, we need to execute it only once\n\t\t\tif ( !div ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tcontainer.style.cssText = \"position:absolute;left:-11111px;width:60px;\" +\n\t\t\t\t\"margin-top:1px;padding:0;border:0\";\n\t\t\tdiv.style.cssText =\n\t\t\t\t\"position:relative;display:block;box-sizing:border-box;overflow:scroll;\" +\n\t\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\t\"width:60%;top:1%\";\n\t\t\tdocumentElement.appendChild( container ).appendChild( div );\n\n\t\t\tvar divStyle = window.getComputedStyle( div );\n\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\t\treliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12;\n\n\t\t\t// Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3\n\t\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\t\tdiv.style.right = \"60%\";\n\t\t\tpixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36;\n\n\t\t\t// Support: IE 9 - 11 only\n\t\t\t// Detect misreporting of content dimensions for box-sizing:border-box elements\n\t\t\tboxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36;\n\n\t\t\t// Support: IE 9 only\n\t\t\t// Detect overflow:scroll screwiness (gh-3699)\n\t\t\t// Support: Chrome <=64\n\t\t\t// Don't get tricked when zoom affects offsetWidth (gh-4029)\n\t\t\tdiv.style.position = \"absolute\";\n\t\t\tscrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12;\n\n\t\t\tdocumentElement.removeChild( container );\n\n\t\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t\t// it will also be a sign that checks already performed\n\t\t\tdiv = null;\n\t\t}", "function computeStyleTests() {\n\n\t\t\t// This is a singleton, we need to execute it only once\n\t\t\tif ( !div ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tcontainer.style.cssText = \"position:absolute;left:-11111px;width:60px;\" +\n\t\t\t\t\"margin-top:1px;padding:0;border:0\";\n\t\t\tdiv.style.cssText =\n\t\t\t\t\"position:relative;display:block;box-sizing:border-box;overflow:scroll;\" +\n\t\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\t\"width:60%;top:1%\";\n\t\t\tdocumentElement.appendChild( container ).appendChild( div );\n\n\t\t\tvar divStyle = window.getComputedStyle( div );\n\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\t\treliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12;\n\n\t\t\t// Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3\n\t\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\t\tdiv.style.right = \"60%\";\n\t\t\tpixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36;\n\n\t\t\t// Support: IE 9 - 11 only\n\t\t\t// Detect misreporting of content dimensions for box-sizing:border-box elements\n\t\t\tboxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36;\n\n\t\t\t// Support: IE 9 only\n\t\t\t// Detect overflow:scroll screwiness (gh-3699)\n\t\t\t// Support: Chrome <=64\n\t\t\t// Don't get tricked when zoom affects offsetWidth (gh-4029)\n\t\t\tdiv.style.position = \"absolute\";\n\t\t\tscrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12;\n\n\t\t\tdocumentElement.removeChild( container );\n\n\t\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t\t// it will also be a sign that checks already performed\n\t\t\tdiv = null;\n\t\t}", "function computeStyleTests() {\n\n\t\t\t// This is a singleton, we need to execute it only once\n\t\t\tif ( !div ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tdiv.style.cssText =\n\t\t\t\t\"box-sizing:border-box;\" +\n\t\t\t\t\"position:relative;display:block;\" +\n\t\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\t\"top:1%;width:50%\";\n\t\t\tdiv.innerHTML = \"\";\n\t\t\tdocumentElement.appendChild( container );\n\n\t\t\tvar divStyle = window.getComputedStyle( div );\n\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only\n\t\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\t\tdiv.style.marginRight = \"50%\";\n\t\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\n\t\t\tdocumentElement.removeChild( container );\n\n\t\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t\t// it will also be a sign that checks already performed\n\t\t\tdiv = null;\n\t\t}", "function computeStyleTests() {\n\n\t\t\t// This is a singleton, we need to execute it only once\n\t\t\tif ( !div ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tdiv.style.cssText =\n\t\t\t\t\"box-sizing:border-box;\" +\n\t\t\t\t\"position:relative;display:block;\" +\n\t\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\t\"top:1%;width:50%\";\n\t\t\tdiv.innerHTML = \"\";\n\t\t\tdocumentElement.appendChild( container );\n\n\t\t\tvar divStyle = window.getComputedStyle( div );\n\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only\n\t\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\t\tdiv.style.marginRight = \"50%\";\n\t\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\n\t\t\tdocumentElement.removeChild( container );\n\n\t\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t\t// it will also be a sign that checks already performed\n\t\t\tdiv = null;\n\t\t}", "function computeStyleTests() {\n\n\t\t\t// This is a singleton, we need to execute it only once\n\t\t\tif ( !div ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tdiv.style.cssText =\n\t\t\t\t\"box-sizing:border-box;\" +\n\t\t\t\t\"position:relative;display:block;\" +\n\t\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\t\"top:1%;width:50%\";\n\t\t\tdiv.innerHTML = \"\";\n\t\t\tdocumentElement.appendChild( container );\n\n\t\t\tvar divStyle = window.getComputedStyle( div );\n\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only\n\t\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\t\tdiv.style.marginRight = \"50%\";\n\t\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\n\t\t\tdocumentElement.removeChild( container );\n\n\t\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t\t// it will also be a sign that checks already performed\n\t\t\tdiv = null;\n\t\t}", "function computeStyleTests() {\n\n\t\t\t// This is a singleton, we need to execute it only once\n\t\t\tif ( !div ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tdiv.style.cssText =\n\t\t\t\t\"box-sizing:border-box;\" +\n\t\t\t\t\"position:relative;display:block;\" +\n\t\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\t\"top:1%;width:50%\";\n\t\t\tdiv.innerHTML = \"\";\n\t\t\tdocumentElement.appendChild( container );\n\n\t\t\tvar divStyle = window.getComputedStyle( div );\n\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only\n\t\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\t\tdiv.style.marginRight = \"50%\";\n\t\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\n\t\t\tdocumentElement.removeChild( container );\n\n\t\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t\t// it will also be a sign that checks already performed\n\t\t\tdiv = null;\n\t\t}", "function computeStyleTests() {\n\n\t\t\t// This is a singleton, we need to execute it only once\n\t\t\tif ( !div ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tdiv.style.cssText =\n\t\t\t\t\"box-sizing:border-box;\" +\n\t\t\t\t\"position:relative;display:block;\" +\n\t\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\t\"top:1%;width:50%\";\n\t\t\tdiv.innerHTML = \"\";\n\t\t\tdocumentElement.appendChild( container );\n\n\t\t\tvar divStyle = window.getComputedStyle( div );\n\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only\n\t\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\t\tdiv.style.marginRight = \"50%\";\n\t\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\n\t\t\tdocumentElement.removeChild( container );\n\n\t\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t\t// it will also be a sign that checks already performed\n\t\t\tdiv = null;\n\t\t}", "function computeStyleTests() {\n\n\t\t\t// This is a singleton, we need to execute it only once\n\t\t\tif ( !div ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tdiv.style.cssText =\n\t\t\t\t\"box-sizing:border-box;\" +\n\t\t\t\t\"position:relative;display:block;\" +\n\t\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\t\"top:1%;width:50%\";\n\t\t\tdiv.innerHTML = \"\";\n\t\t\tdocumentElement.appendChild( container );\n\n\t\t\tvar divStyle = window.getComputedStyle( div );\n\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only\n\t\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\t\tdiv.style.marginRight = \"50%\";\n\t\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\n\t\t\tdocumentElement.removeChild( container );\n\n\t\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t\t// it will also be a sign that checks already performed\n\t\t\tdiv = null;\n\t\t}", "function computeStyleTests() {\n\n\t\t\t// This is a singleton, we need to execute it only once\n\t\t\tif ( !div ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tdiv.style.cssText =\n\t\t\t\t\"box-sizing:border-box;\" +\n\t\t\t\t\"position:relative;display:block;\" +\n\t\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\t\"top:1%;width:50%\";\n\t\t\tdiv.innerHTML = \"\";\n\t\t\tdocumentElement.appendChild( container );\n\n\t\t\tvar divStyle = window.getComputedStyle( div );\n\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only\n\t\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\t\tdiv.style.marginRight = \"50%\";\n\t\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\n\t\t\tdocumentElement.removeChild( container );\n\n\t\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t\t// it will also be a sign that checks already performed\n\t\t\tdiv = null;\n\t\t}", "function computeStyleTests() {\n\n\t\t\t// This is a singleton, we need to execute it only once\n\t\t\tif ( !div ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tdiv.style.cssText =\n\t\t\t\t\"box-sizing:border-box;\" +\n\t\t\t\t\"position:relative;display:block;\" +\n\t\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\t\"top:1%;width:50%\";\n\t\t\tdiv.innerHTML = \"\";\n\t\t\tdocumentElement.appendChild( container );\n\n\t\t\tvar divStyle = window.getComputedStyle( div );\n\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only\n\t\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\t\tdiv.style.marginRight = \"50%\";\n\t\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\n\t\t\tdocumentElement.removeChild( container );\n\n\t\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t\t// it will also be a sign that checks already performed\n\t\t\tdiv = null;\n\t\t}", "function computeStyleTests() {\n\n\t\t\t// This is a singleton, we need to execute it only once\n\t\t\tif ( !div ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tdiv.style.cssText =\n\t\t\t\t\"box-sizing:border-box;\" +\n\t\t\t\t\"position:relative;display:block;\" +\n\t\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\t\"top:1%;width:50%\";\n\t\t\tdiv.innerHTML = \"\";\n\t\t\tdocumentElement.appendChild( container );\n\n\t\t\tvar divStyle = window.getComputedStyle( div );\n\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only\n\t\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\t\tdiv.style.marginRight = \"50%\";\n\t\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\n\t\t\tdocumentElement.removeChild( container );\n\n\t\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t\t// it will also be a sign that checks already performed\n\t\t\tdiv = null;\n\t\t}", "function computeStyleTests() {\n\n\t\t\t// This is a singleton, we need to execute it only once\n\t\t\tif ( !div ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tdiv.style.cssText =\n\t\t\t\t\"box-sizing:border-box;\" +\n\t\t\t\t\"position:relative;display:block;\" +\n\t\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\t\"top:1%;width:50%\";\n\t\t\tdiv.innerHTML = \"\";\n\t\t\tdocumentElement.appendChild( container );\n\n\t\t\tvar divStyle = window.getComputedStyle( div );\n\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only\n\t\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\t\tdiv.style.marginRight = \"50%\";\n\t\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\n\t\t\tdocumentElement.removeChild( container );\n\n\t\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t\t// it will also be a sign that checks already performed\n\t\t\tdiv = null;\n\t\t}", "function computeStyleTests() {\n\n\t\t\t// This is a singleton, we need to execute it only once\n\t\t\tif ( !div ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tdiv.style.cssText =\n\t\t\t\t\"box-sizing:border-box;\" +\n\t\t\t\t\"position:relative;display:block;\" +\n\t\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\t\"top:1%;width:50%\";\n\t\t\tdiv.innerHTML = \"\";\n\t\t\tdocumentElement.appendChild( container );\n\n\t\t\tvar divStyle = window.getComputedStyle( div );\n\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only\n\t\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\t\tdiv.style.marginRight = \"50%\";\n\t\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\n\t\t\tdocumentElement.removeChild( container );\n\n\t\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t\t// it will also be a sign that checks already performed\n\t\t\tdiv = null;\n\t\t}", "function computeStyleTests() {\n // This is a singleton, we need to execute it only once\n if (!div) {\n return;\n }\n\n container.style.cssText = \"position:absolute;left:-11111px;width:60px;\" + \"margin-top:1px;padding:0;border:0\";\n div.style.cssText = \"position:relative;display:block;box-sizing:border-box;overflow:scroll;\" + \"margin:auto;border:1px;padding:1px;\" + \"width:60%;top:1%\";\n documentElement.appendChild(container).appendChild(div);\n var divStyle = window.getComputedStyle(div);\n pixelPositionVal = divStyle.top !== \"1%\"; // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\n reliableMarginLeftVal = roundPixelMeasures(divStyle.marginLeft) === 12; // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3\n // Some styles come back with percentage values, even though they shouldn't\n\n div.style.right = \"60%\";\n pixelBoxStylesVal = roundPixelMeasures(divStyle.right) === 36; // Support: IE 9 - 11 only\n // Detect misreporting of content dimensions for box-sizing:border-box elements\n\n boxSizingReliableVal = roundPixelMeasures(divStyle.width) === 36; // Support: IE 9 only\n // Detect overflow:scroll screwiness (gh-3699)\n // Support: Chrome <=64\n // Don't get tricked when zoom affects offsetWidth (gh-4029)\n\n div.style.position = \"absolute\";\n scrollboxSizeVal = roundPixelMeasures(div.offsetWidth / 3) === 12;\n documentElement.removeChild(container); // Nullify the div so it wouldn't be stored in the memory and\n // it will also be a sign that checks already performed\n\n div = null;\n }", "function computeStyleTests() {\n // This is a singleton, we need to execute it only once\n if (!div) {\n return;\n }\n\n container.style.cssText = \"position:absolute;left:-11111px;width:60px;\" + \"margin-top:1px;padding:0;border:0\";\n div.style.cssText = \"position:relative;display:block;box-sizing:border-box;overflow:scroll;\" + \"margin:auto;border:1px;padding:1px;\" + \"width:60%;top:1%\";\n documentElement.appendChild(container).appendChild(div);\n var divStyle = window.getComputedStyle(div);\n pixelPositionVal = divStyle.top !== \"1%\"; // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\n reliableMarginLeftVal = roundPixelMeasures(divStyle.marginLeft) === 12; // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3\n // Some styles come back with percentage values, even though they shouldn't\n\n div.style.right = \"60%\";\n pixelBoxStylesVal = roundPixelMeasures(divStyle.right) === 36; // Support: IE 9 - 11 only\n // Detect misreporting of content dimensions for box-sizing:border-box elements\n\n boxSizingReliableVal = roundPixelMeasures(divStyle.width) === 36; // Support: IE 9 only\n // Detect overflow:scroll screwiness (gh-3699)\n // Support: Chrome <=64\n // Don't get tricked when zoom affects offsetWidth (gh-4029)\n\n div.style.position = \"absolute\";\n scrollboxSizeVal = roundPixelMeasures(div.offsetWidth / 3) === 12;\n documentElement.removeChild(container); // Nullify the div so it wouldn't be stored in the memory and\n // it will also be a sign that checks already performed\n\n div = null;\n }", "function computeStyleTests() {\n // This is a singleton, we need to execute it only once\n if (!div) {\n return;\n }\n\n container.style.cssText = \"position:absolute;left:-11111px;width:60px;\" + \"margin-top:1px;padding:0;border:0\";\n div.style.cssText = \"position:relative;display:block;box-sizing:border-box;overflow:scroll;\" + \"margin:auto;border:1px;padding:1px;\" + \"width:60%;top:1%\";\n documentElement.appendChild(container).appendChild(div);\n var divStyle = window.getComputedStyle(div);\n pixelPositionVal = divStyle.top !== \"1%\"; // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\n reliableMarginLeftVal = roundPixelMeasures(divStyle.marginLeft) === 12; // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3\n // Some styles come back with percentage values, even though they shouldn't\n\n div.style.right = \"60%\";\n pixelBoxStylesVal = roundPixelMeasures(divStyle.right) === 36; // Support: IE 9 - 11 only\n // Detect misreporting of content dimensions for box-sizing:border-box elements\n\n boxSizingReliableVal = roundPixelMeasures(divStyle.width) === 36; // Support: IE 9 only\n // Detect overflow:scroll screwiness (gh-3699)\n // Support: Chrome <=64\n // Don't get tricked when zoom affects offsetWidth (gh-4029)\n\n div.style.position = \"absolute\";\n scrollboxSizeVal = roundPixelMeasures(div.offsetWidth / 3) === 12;\n documentElement.removeChild(container); // Nullify the div so it wouldn't be stored in the memory and\n // it will also be a sign that checks already performed\n\n div = null;\n }", "function computeStyleTests() {\n // This is a singleton, we need to execute it only once\n if (!div) {\n return;\n }\n\n container.style.cssText = \"position:absolute;left:-11111px;width:60px;\" + \"margin-top:1px;padding:0;border:0\";\n div.style.cssText = \"position:relative;display:block;box-sizing:border-box;overflow:scroll;\" + \"margin:auto;border:1px;padding:1px;\" + \"width:60%;top:1%\";\n documentElement.appendChild(container).appendChild(div);\n var divStyle = window.getComputedStyle(div);\n pixelPositionVal = divStyle.top !== \"1%\"; // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\n reliableMarginLeftVal = roundPixelMeasures(divStyle.marginLeft) === 12; // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3\n // Some styles come back with percentage values, even though they shouldn't\n\n div.style.right = \"60%\";\n pixelBoxStylesVal = roundPixelMeasures(divStyle.right) === 36; // Support: IE 9 - 11 only\n // Detect misreporting of content dimensions for box-sizing:border-box elements\n\n boxSizingReliableVal = roundPixelMeasures(divStyle.width) === 36; // Support: IE 9 only\n // Detect overflow:scroll screwiness (gh-3699)\n // Support: Chrome <=64\n // Don't get tricked when zoom affects offsetWidth (gh-4029)\n\n div.style.position = \"absolute\";\n scrollboxSizeVal = roundPixelMeasures(div.offsetWidth / 3) === 12;\n documentElement.removeChild(container); // Nullify the div so it wouldn't be stored in the memory and\n // it will also be a sign that checks already performed\n\n div = null;\n }", "function computeStyleTests() {\n // This is a singleton, we need to execute it only once\n if (!div) {\n return;\n }\n\n container.style.cssText = \"position:absolute;left:-11111px;width:60px;\" + \"margin-top:1px;padding:0;border:0\";\n div.style.cssText = \"position:relative;display:block;box-sizing:border-box;overflow:scroll;\" + \"margin:auto;border:1px;padding:1px;\" + \"width:60%;top:1%\";\n documentElement.appendChild(container).appendChild(div);\n var divStyle = window.getComputedStyle(div);\n pixelPositionVal = divStyle.top !== \"1%\"; // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\n reliableMarginLeftVal = roundPixelMeasures(divStyle.marginLeft) === 12; // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3\n // Some styles come back with percentage values, even though they shouldn't\n\n div.style.right = \"60%\";\n pixelBoxStylesVal = roundPixelMeasures(divStyle.right) === 36; // Support: IE 9 - 11 only\n // Detect misreporting of content dimensions for box-sizing:border-box elements\n\n boxSizingReliableVal = roundPixelMeasures(divStyle.width) === 36; // Support: IE 9 only\n // Detect overflow:scroll screwiness (gh-3699)\n // Support: Chrome <=64\n // Don't get tricked when zoom affects offsetWidth (gh-4029)\n\n div.style.position = \"absolute\";\n scrollboxSizeVal = roundPixelMeasures(div.offsetWidth / 3) === 12;\n documentElement.removeChild(container); // Nullify the div so it wouldn't be stored in the memory and\n // it will also be a sign that checks already performed\n\n div = null;\n }", "function computeStyleTests() {\n // This is a singleton, we need to execute it only once\n if (!div) {\n return;\n }\n\n container.style.cssText = \"position:absolute;left:-11111px;width:60px;\" + \"margin-top:1px;padding:0;border:0\";\n div.style.cssText = \"position:relative;display:block;box-sizing:border-box;overflow:scroll;\" + \"margin:auto;border:1px;padding:1px;\" + \"width:60%;top:1%\";\n documentElement.appendChild(container).appendChild(div);\n var divStyle = window.getComputedStyle(div);\n pixelPositionVal = divStyle.top !== \"1%\"; // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\n reliableMarginLeftVal = roundPixelMeasures(divStyle.marginLeft) === 12; // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3\n // Some styles come back with percentage values, even though they shouldn't\n\n div.style.right = \"60%\";\n pixelBoxStylesVal = roundPixelMeasures(divStyle.right) === 36; // Support: IE 9 - 11 only\n // Detect misreporting of content dimensions for box-sizing:border-box elements\n\n boxSizingReliableVal = roundPixelMeasures(divStyle.width) === 36; // Support: IE 9 only\n // Detect overflow:scroll screwiness (gh-3699)\n // Support: Chrome <=64\n // Don't get tricked when zoom affects offsetWidth (gh-4029)\n\n div.style.position = \"absolute\";\n scrollboxSizeVal = roundPixelMeasures(div.offsetWidth / 3) === 12;\n documentElement.removeChild(container); // Nullify the div so it wouldn't be stored in the memory and\n // it will also be a sign that checks already performed\n\n div = null;\n }", "function computeStyleTests() {\n // This is a singleton, we need to execute it only once\n if (!div) {\n return;\n }\n\n container.style.cssText = \"position:absolute;left:-11111px;width:60px;\" + \"margin-top:1px;padding:0;border:0\";\n div.style.cssText = \"position:relative;display:block;box-sizing:border-box;overflow:scroll;\" + \"margin:auto;border:1px;padding:1px;\" + \"width:60%;top:1%\";\n documentElement.appendChild(container).appendChild(div);\n var divStyle = window.getComputedStyle(div);\n pixelPositionVal = divStyle.top !== \"1%\"; // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\n reliableMarginLeftVal = roundPixelMeasures(divStyle.marginLeft) === 12; // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3\n // Some styles come back with percentage values, even though they shouldn't\n\n div.style.right = \"60%\";\n pixelBoxStylesVal = roundPixelMeasures(divStyle.right) === 36; // Support: IE 9 - 11 only\n // Detect misreporting of content dimensions for box-sizing:border-box elements\n\n boxSizingReliableVal = roundPixelMeasures(divStyle.width) === 36; // Support: IE 9 only\n // Detect overflow:scroll screwiness (gh-3699)\n // Support: Chrome <=64\n // Don't get tricked when zoom affects offsetWidth (gh-4029)\n\n div.style.position = \"absolute\";\n scrollboxSizeVal = roundPixelMeasures(div.offsetWidth / 3) === 12;\n documentElement.removeChild(container); // Nullify the div so it wouldn't be stored in the memory and\n // it will also be a sign that checks already performed\n\n div = null;\n }", "function computeStyleTests() {\n // This is a singleton, we need to execute it only once\n if (!div) {\n return;\n }\n\n container.style.cssText = \"position:absolute;left:-11111px;width:60px;\" + \"margin-top:1px;padding:0;border:0\";\n div.style.cssText = \"position:relative;display:block;box-sizing:border-box;overflow:scroll;\" + \"margin:auto;border:1px;padding:1px;\" + \"width:60%;top:1%\";\n documentElement.appendChild(container).appendChild(div);\n var divStyle = window.getComputedStyle(div);\n pixelPositionVal = divStyle.top !== \"1%\"; // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\n reliableMarginLeftVal = roundPixelMeasures(divStyle.marginLeft) === 12; // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3\n // Some styles come back with percentage values, even though they shouldn't\n\n div.style.right = \"60%\";\n pixelBoxStylesVal = roundPixelMeasures(divStyle.right) === 36; // Support: IE 9 - 11 only\n // Detect misreporting of content dimensions for box-sizing:border-box elements\n\n boxSizingReliableVal = roundPixelMeasures(divStyle.width) === 36; // Support: IE 9 only\n // Detect overflow:scroll screwiness (gh-3699)\n // Support: Chrome <=64\n // Don't get tricked when zoom affects offsetWidth (gh-4029)\n\n div.style.position = \"absolute\";\n scrollboxSizeVal = roundPixelMeasures(div.offsetWidth / 3) === 12;\n documentElement.removeChild(container); // Nullify the div so it wouldn't be stored in the memory and\n // it will also be a sign that checks already performed\n\n div = null;\n }", "function computeStyleTests() {\n\n\t\t\t// This is a singleton, we need to execute it only once\n\t\t\tif (!div) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tcontainer.style.cssText = \"position:absolute;left:-11111px;width:60px;\" + \"margin-top:1px;padding:0;border:0\";\n\t\t\tdiv.style.cssText = \"position:relative;display:block;box-sizing:border-box;overflow:scroll;\" + \"margin:auto;border:1px;padding:1px;\" + \"width:60%;top:1%\";\n\t\t\tdocumentElement.appendChild(container).appendChild(div);\n\n\t\t\tvar divStyle = window.getComputedStyle(div);\n\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\t\treliableMarginLeftVal = roundPixelMeasures(divStyle.marginLeft) === 12;\n\n\t\t\t// Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3\n\t\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\t\tdiv.style.right = \"60%\";\n\t\t\tpixelBoxStylesVal = roundPixelMeasures(divStyle.right) === 36;\n\n\t\t\t// Support: IE 9 - 11 only\n\t\t\t// Detect misreporting of content dimensions for box-sizing:border-box elements\n\t\t\tboxSizingReliableVal = roundPixelMeasures(divStyle.width) === 36;\n\n\t\t\t// Support: IE 9 only\n\t\t\t// Detect overflow:scroll screwiness (gh-3699)\n\t\t\tdiv.style.position = \"absolute\";\n\t\t\tscrollboxSizeVal = div.offsetWidth === 36 || \"absolute\";\n\n\t\t\tdocumentElement.removeChild(container);\n\n\t\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t\t// it will also be a sign that checks already performed\n\t\t\tdiv = null;\n\t\t}", "function computeStyleTests() {\n\n\t\t\t// This is a singleton, we need to execute it only once\n\t\t\tif (!div) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tcontainer.style.cssText = \"position:absolute;left:-11111px;width:60px;\" + \"margin-top:1px;padding:0;border:0\";\n\t\t\tdiv.style.cssText = \"position:relative;display:block;box-sizing:border-box;overflow:scroll;\" + \"margin:auto;border:1px;padding:1px;\" + \"width:60%;top:1%\";\n\t\t\tdocumentElement.appendChild(container).appendChild(div);\n\n\t\t\tvar divStyle = window.getComputedStyle(div);\n\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\t\treliableMarginLeftVal = roundPixelMeasures(divStyle.marginLeft) === 12;\n\n\t\t\t// Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3\n\t\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\t\tdiv.style.right = \"60%\";\n\t\t\tpixelBoxStylesVal = roundPixelMeasures(divStyle.right) === 36;\n\n\t\t\t// Support: IE 9 - 11 only\n\t\t\t// Detect misreporting of content dimensions for box-sizing:border-box elements\n\t\t\tboxSizingReliableVal = roundPixelMeasures(divStyle.width) === 36;\n\n\t\t\t// Support: IE 9 only\n\t\t\t// Detect overflow:scroll screwiness (gh-3699)\n\t\t\tdiv.style.position = \"absolute\";\n\t\t\tscrollboxSizeVal = div.offsetWidth === 36 || \"absolute\";\n\n\t\t\tdocumentElement.removeChild(container);\n\n\t\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t\t// it will also be a sign that checks already performed\n\t\t\tdiv = null;\n\t\t}", "function computeStyleTests() {\n\t\n\t\t\t// This is a singleton, we need to execute it only once\n\t\t\tif ( !div ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tdiv.style.cssText =\n\t\t\t\t\"box-sizing:border-box;\" +\n\t\t\t\t\"position:relative;display:block;\" +\n\t\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\t\"top:1%;width:50%\";\n\t\t\tdiv.innerHTML = \"\";\n\t\t\tdocumentElement.appendChild( container );\n\t\n\t\t\tvar divStyle = window.getComputedStyle( div );\n\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\n\t\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\t\n\t\t\t// Support: Android 4.0 - 4.3 only\n\t\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\t\tdiv.style.marginRight = \"50%\";\n\t\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\t\n\t\t\tdocumentElement.removeChild( container );\n\t\n\t\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t\t// it will also be a sign that checks already performed\n\t\t\tdiv = null;\n\t\t}", "function computeStyleTests() {\n\t\n\t\t\t// This is a singleton, we need to execute it only once\n\t\t\tif ( !div ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tdiv.style.cssText =\n\t\t\t\t\"box-sizing:border-box;\" +\n\t\t\t\t\"position:relative;display:block;\" +\n\t\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\t\"top:1%;width:50%\";\n\t\t\tdiv.innerHTML = \"\";\n\t\t\tdocumentElement.appendChild( container );\n\t\n\t\t\tvar divStyle = window.getComputedStyle( div );\n\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\n\t\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\t\n\t\t\t// Support: Android 4.0 - 4.3 only\n\t\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\t\tdiv.style.marginRight = \"50%\";\n\t\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\t\n\t\t\tdocumentElement.removeChild( container );\n\t\n\t\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t\t// it will also be a sign that checks already performed\n\t\t\tdiv = null;\n\t\t}", "function computeStyleTests() {\n\t\n\t\t\t// This is a singleton, we need to execute it only once\n\t\t\tif ( !div ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tdiv.style.cssText =\n\t\t\t\t\"box-sizing:border-box;\" +\n\t\t\t\t\"position:relative;display:block;\" +\n\t\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\t\"top:1%;width:50%\";\n\t\t\tdiv.innerHTML = \"\";\n\t\t\tdocumentElement.appendChild( container );\n\t\n\t\t\tvar divStyle = window.getComputedStyle( div );\n\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\n\t\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\t\n\t\t\t// Support: Android 4.0 - 4.3 only\n\t\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\t\tdiv.style.marginRight = \"50%\";\n\t\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\t\n\t\t\tdocumentElement.removeChild( container );\n\t\n\t\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t\t// it will also be a sign that checks already performed\n\t\t\tdiv = null;\n\t\t}", "function computeStyleTests() {\n\t\n\t\t\t// This is a singleton, we need to execute it only once\n\t\t\tif ( !div ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tdiv.style.cssText =\n\t\t\t\t\"box-sizing:border-box;\" +\n\t\t\t\t\"position:relative;display:block;\" +\n\t\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\t\"top:1%;width:50%\";\n\t\t\tdiv.innerHTML = \"\";\n\t\t\tdocumentElement.appendChild( container );\n\t\n\t\t\tvar divStyle = window.getComputedStyle( div );\n\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\n\t\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\t\n\t\t\t// Support: Android 4.0 - 4.3 only\n\t\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\t\tdiv.style.marginRight = \"50%\";\n\t\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\t\n\t\t\tdocumentElement.removeChild( container );\n\t\n\t\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t\t// it will also be a sign that checks already performed\n\t\t\tdiv = null;\n\t\t}", "function computeStyleTests() {\n\t\n\t\t\t// This is a singleton, we need to execute it only once\n\t\t\tif ( !div ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tdiv.style.cssText =\n\t\t\t\t\"box-sizing:border-box;\" +\n\t\t\t\t\"position:relative;display:block;\" +\n\t\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\t\"top:1%;width:50%\";\n\t\t\tdiv.innerHTML = \"\";\n\t\t\tdocumentElement.appendChild( container );\n\t\n\t\t\tvar divStyle = window.getComputedStyle( div );\n\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\n\t\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\t\n\t\t\t// Support: Android 4.0 - 4.3 only\n\t\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\t\tdiv.style.marginRight = \"50%\";\n\t\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\t\n\t\t\tdocumentElement.removeChild( container );\n\t\n\t\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t\t// it will also be a sign that checks already performed\n\t\t\tdiv = null;\n\t\t}", "function computeStyleTests() {\n\t\n\t\t\t// This is a singleton, we need to execute it only once\n\t\t\tif ( !div ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tdiv.style.cssText =\n\t\t\t\t\"box-sizing:border-box;\" +\n\t\t\t\t\"position:relative;display:block;\" +\n\t\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\t\"top:1%;width:50%\";\n\t\t\tdiv.innerHTML = \"\";\n\t\t\tdocumentElement.appendChild( container );\n\t\n\t\t\tvar divStyle = window.getComputedStyle( div );\n\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\n\t\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\t\n\t\t\t// Support: Android 4.0 - 4.3 only\n\t\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\t\tdiv.style.marginRight = \"50%\";\n\t\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\t\n\t\t\tdocumentElement.removeChild( container );\n\t\n\t\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t\t// it will also be a sign that checks already performed\n\t\t\tdiv = null;\n\t\t}", "function computeStyleTests() {\n\t\n\t\t\t// This is a singleton, we need to execute it only once\n\t\t\tif ( !div ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tdiv.style.cssText =\n\t\t\t\t\"box-sizing:border-box;\" +\n\t\t\t\t\"position:relative;display:block;\" +\n\t\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\t\"top:1%;width:50%\";\n\t\t\tdiv.innerHTML = \"\";\n\t\t\tdocumentElement.appendChild( container );\n\t\n\t\t\tvar divStyle = window.getComputedStyle( div );\n\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\n\t\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\t\n\t\t\t// Support: Android 4.0 - 4.3 only\n\t\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\t\tdiv.style.marginRight = \"50%\";\n\t\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\t\n\t\t\tdocumentElement.removeChild( container );\n\t\n\t\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t\t// it will also be a sign that checks already performed\n\t\t\tdiv = null;\n\t\t}", "function computeStyleTests() {\n\n\t\t\t\t// This is a singleton, we need to execute it only once\n\t\t\t\tif ( !div ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tcontainer.style.cssText = \"position:absolute;left:-11111px;width:60px;\" +\n\t\t\t\t\t\"margin-top:1px;padding:0;border:0\";\n\t\t\t\tdiv.style.cssText =\n\t\t\t\t\t\"position:relative;display:block;box-sizing:border-box;overflow:scroll;\" +\n\t\t\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\t\t\"width:60%;top:1%\";\n\t\t\t\tdocumentElement.appendChild( container ).appendChild( div );\n\n\t\t\t\tvar divStyle = window.getComputedStyle( div );\n\t\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\t\t\treliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12;\n\n\t\t\t\t// Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3\n\t\t\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\t\t\tdiv.style.right = \"60%\";\n\t\t\t\tpixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36;\n\n\t\t\t\t// Support: IE 9 - 11 only\n\t\t\t\t// Detect misreporting of content dimensions for box-sizing:border-box elements\n\t\t\t\tboxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36;\n\n\t\t\t\t// Support: IE 9 only\n\t\t\t\t// Detect overflow:scroll screwiness (gh-3699)\n\t\t\t\t// Support: Chrome <=64\n\t\t\t\t// Don't get tricked when zoom affects offsetWidth (gh-4029)\n\t\t\t\tdiv.style.position = \"absolute\";\n\t\t\t\tscrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12;\n\n\t\t\t\tdocumentElement.removeChild( container );\n\n\t\t\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t\t\t// it will also be a sign that checks already performed\n\t\t\t\tdiv = null;\n\t\t\t}", "function computeStyleTests() { // 6092\n // 6093\n\t\t// This is a singleton, we need to execute it only once // 6094\n\t\tif ( !div ) { // 6095\n\t\t\treturn; // 6096\n\t\t} // 6097\n // 6098\n\t\tdiv.style.cssText = // 6099\n\t\t\t\"box-sizing:border-box;\" + // 6100\n\t\t\t\"position:relative;display:block;\" + // 6101\n\t\t\t\"margin:auto;border:1px;padding:1px;\" + // 6102\n\t\t\t\"top:1%;width:50%\"; // 6103\n\t\tdiv.innerHTML = \"\"; // 6104\n\t\tdocumentElement.appendChild( container ); // 6105\n // 6106\n\t\tvar divStyle = window.getComputedStyle( div ); // 6107\n\t\tpixelPositionVal = divStyle.top !== \"1%\"; // 6108\n // 6109\n\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44 // 6110\n\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\"; // 6111\n\t\tboxSizingReliableVal = divStyle.width === \"4px\"; // 6112\n // 6113\n\t\t// Support: Android 4.0 - 4.3 only // 6114\n\t\t// Some styles come back with percentage values, even though they shouldn't // 6115\n\t\tdiv.style.marginRight = \"50%\"; // 6116\n\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\"; // 6117\n // 6118\n\t\tdocumentElement.removeChild( container ); // 6119\n // 6120\n\t\t// Nullify the div so it wouldn't be stored in the memory and // 6121\n\t\t// it will also be a sign that checks already performed // 6122\n\t\tdiv = null; // 6123\n\t} // 6124" ]
[ "0.721427", "0.7209085", "0.7209085", "0.72081125", "0.72081125", "0.7152082", "0.7152082", "0.7149793", "0.7133515", "0.7133515", "0.7133515", "0.7133515", "0.7133515", "0.7133515", "0.7133515", "0.7133515", "0.7133515", "0.7133515", "0.7133515", "0.7133515", "0.7133515", "0.7133515", "0.7133515", "0.7133515", "0.7133515", "0.7133515", "0.7133515", "0.7133515", "0.7133515", "0.7133515", "0.7133515", "0.7133515", "0.7133515", "0.7133515", "0.7133515", "0.7133515", "0.7133515", "0.7133515", "0.7133515", "0.7133515", "0.7133515", "0.7133515", "0.7133515", "0.7133515", "0.7133515", "0.7133515", "0.7133515", "0.7133515", "0.7133515", "0.7133515", "0.7133515", "0.7133515", "0.7133515", "0.7133515", "0.7133515", "0.7133515", "0.7133515", "0.7133515", "0.7133515", "0.7133515", "0.7133515", "0.7133515", "0.7101062", "0.69560856", "0.66202855", "0.6513355", "0.6487813", "0.6487813", "0.64777875", "0.64777875", "0.64777875", "0.64777875", "0.64777875", "0.64777875", "0.64777875", "0.64777875", "0.64777875", "0.64777875", "0.64777875", "0.64764225", "0.64764225", "0.64764225", "0.64764225", "0.64764225", "0.64764225", "0.64764225", "0.64764225", "0.64581907", "0.64581907", "0.6449548", "0.6449548", "0.6449548", "0.6449548", "0.6449548", "0.6449548", "0.6449548", "0.6443816", "0.6431044" ]
0.0
-1
Return a vendorprefixed property or undefined
function vendorPropName( name ) { // Check for vendor prefixed names var capName = name[ 0 ].toUpperCase() + name.slice( 1 ), i = cssPrefixes.length; while ( i-- ) { name = cssPrefixes[ i ] + capName; if ( name in emptyStyle ) { return name; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function vendorPropName(name){// Shortcut for names that are not vendor prefixed\nif(name in emptyStyle){return name;}// Check for vendor prefixed names\nvar capName=name[0].toUpperCase()+name.slice(1),i=cssPrefixes.length;while(i--){name=cssPrefixes[i]+capName;if(name in emptyStyle){return name;}}}// Return a property mapped along what jQuery.cssProps suggests or to", "function vendorPropName(name){// Shortcut for names that are not vendor prefixed\nif(name in emptyStyle){return name;}// Check for vendor prefixed names\nvar capName=name[0].toUpperCase()+name.slice(1),i=cssPrefixes.length;while(i--){name=cssPrefixes[i]+capName;if(name in emptyStyle){return name;}}}// Return a property mapped along what jQuery.cssProps suggests or to", "function vendorPropName(name){ // Shortcut for names that are not vendor prefixed\nif(name in emptyStyle){return name;} // Check for vendor prefixed names\nvar capName=name[0].toUpperCase()+name.slice(1),i=cssPrefixes.length;while(i--){name=cssPrefixes[i]+capName;if(name in emptyStyle){return name;}}}", "function vendorPropName(name){// shortcut for names that are not vendor prefixed\nif(name in emptyStyle){return name;}// check for vendor prefixed names\nvar capName=name.charAt(0).toUpperCase()+name.slice(1),i=cssPrefixes.length;while(i--){name=cssPrefixes[i]+capName;if(name in emptyStyle){return name;}}}", "function vendorPropName(name){ // Shortcut for names that are not vendor prefixed\n\tif(name in emptyStyle){return name;} // Check for vendor prefixed names\n\tvar capName=name[0].toUpperCase()+name.slice(1),i=cssPrefixes.length;while(i--){name=cssPrefixes[i]+capName;if(name in emptyStyle){return name;}}}", "function vendorPropName(name) {\n // Check for vendor prefixed names\n var capName = name[0].toUpperCase() + name.slice(1),\n i = cssPrefixes.length;\n\n while (i--) {\n name = cssPrefixes[i] + capName;\n\n if (name in emptyStyle) {\n return name;\n }\n }\n } // Return a potentially-mapped jQuery.cssProps or vendor prefixed property", "function vendorPropName(name) {\n // Check for vendor prefixed names\n var capName = name[0].toUpperCase() + name.slice(1),\n i = cssPrefixes.length;\n\n while (i--) {\n name = cssPrefixes[i] + capName;\n\n if (name in emptyStyle) {\n return name;\n }\n }\n } // Return a potentially-mapped jQuery.cssProps or vendor prefixed property", "function vendorPropName(name) {\n // Check for vendor prefixed names\n var capName = name[0].toUpperCase() + name.slice(1),\n i = cssPrefixes.length;\n\n while (i--) {\n name = cssPrefixes[i] + capName;\n\n if (name in emptyStyle) {\n return name;\n }\n }\n } // Return a potentially-mapped jQuery.cssProps or vendor prefixed property", "function vendorPropName(name) {\n // Check for vendor prefixed names\n var capName = name[0].toUpperCase() + name.slice(1),\n i = cssPrefixes.length;\n\n while (i--) {\n name = cssPrefixes[i] + capName;\n\n if (name in emptyStyle) {\n return name;\n }\n }\n } // Return a potentially-mapped jQuery.cssProps or vendor prefixed property", "function vendorPropName(name) {\n // Check for vendor prefixed names\n var capName = name[0].toUpperCase() + name.slice(1),\n i = cssPrefixes.length;\n\n while (i--) {\n name = cssPrefixes[i] + capName;\n\n if (name in emptyStyle) {\n return name;\n }\n }\n } // Return a potentially-mapped jQuery.cssProps or vendor prefixed property", "function vendorPropName(name) {\n // Check for vendor prefixed names\n var capName = name[0].toUpperCase() + name.slice(1),\n i = cssPrefixes.length;\n\n while (i--) {\n name = cssPrefixes[i] + capName;\n\n if (name in emptyStyle) {\n return name;\n }\n }\n } // Return a potentially-mapped jQuery.cssProps or vendor prefixed property", "function vendorPropName(name) {\n // Check for vendor prefixed names\n var capName = name[0].toUpperCase() + name.slice(1),\n i = cssPrefixes.length;\n\n while (i--) {\n name = cssPrefixes[i] + capName;\n\n if (name in emptyStyle) {\n return name;\n }\n }\n } // Return a potentially-mapped jQuery.cssProps or vendor prefixed property", "function vendorPropName(name) {\n // Check for vendor prefixed names\n var capName = name[0].toUpperCase() + name.slice(1),\n i = cssPrefixes.length;\n\n while (i--) {\n name = cssPrefixes[i] + capName;\n\n if (name in emptyStyle) {\n return name;\n }\n }\n } // Return a potentially-mapped jQuery.cssProps or vendor prefixed property", "function vendorPropName( name ) { // 6256\n // 6257\n\t// Shortcut for names that are not vendor prefixed // 6258\n\tif ( name in emptyStyle ) { // 6259\n\t\treturn name; // 6260\n\t} // 6261\n // 6262\n\t// Check for vendor prefixed names // 6263\n\tvar capName = name[ 0 ].toUpperCase() + name.slice( 1 ), // 6264\n\t\ti = cssPrefixes.length; // 6265\n // 6266\n\twhile ( i-- ) { // 6267\n\t\tname = cssPrefixes[ i ] + capName; // 6268\n\t\tif ( name in emptyStyle ) { // 6269\n\t\t\treturn name; // 6270\n\t\t} // 6271\n\t} // 6272\n} // 6273", "function vendorPropName(name){// Shortcut for names that are not vendor prefixed\n\tif(name in emptyStyle){return name;}// Check for vendor prefixed names\n\tvar capName=name[0].toUpperCase()+name.slice(1),i=cssPrefixes.length;while(i--){name=cssPrefixes[i]+capName;if(name in emptyStyle){return name;}}}", "function vendorPropName(name){// Shortcut for names that are not vendor prefixed\r\n\tif(name in emptyStyle){return name;}// Check for vendor prefixed names\r\n\tvar capName=name[0].toUpperCase()+name.slice(1),i=cssPrefixes.length;while(i--){name=cssPrefixes[i]+capName;if(name in emptyStyle){return name;}}}", "function getVendorPrefix() {\n var property = {\n transformProperty : '',\n MozTransform : '-moz-',\n WebkitTransform : '-webkit-',\n OTransform : '-o-',\n msTransform : '-ms-'\n };\n for (var p in property) {\n if (typeof m_style[p] != 'undefined') {\n return property[p];\n }\n }\n return null;\n }", "function vendorPropName( name ) {\n\n // Shortcut for names that are not vendor prefixed\n if ( name in emptyStyle ) {\n return name;\n }\n\n // Check for vendor prefixed names\n var capName = name[ 0 ].toUpperCase() + name.slice( 1 ),\n i = cssPrefixes.length;\n\n while ( i-- ) {\n name = cssPrefixes[ i ] + capName;\n if ( name in emptyStyle ) {\n return name;\n }\n }\n}", "function getVendorPropertyName(prop) {\n // Handle unprefixed versions (FF16+, for example)\n if (prop in div.style) return prop;\n\n var prefixes = ['Moz', 'Webkit', 'O', 'ms'];\n var prop_ = prop.charAt(0).toUpperCase() + prop.substr(1);\n\n if (prop in div.style) { return prop; }\n\n for (var i=0; i<prefixes.length; ++i) {\n var vendorProp = prefixes[i] + prop_;\n if (vendorProp in div.style) { return vendorProp; }\n }\n }", "function getVendorPropertyName(prop) {\n // Handle unprefixed versions (FF16+, for example)\n if (prop in div.style)\n return prop;\n\n var prefixes = ['Moz', 'Webkit', 'O', 'ms'];\n var prop_ = prop.charAt(0).toUpperCase() + prop.substr(1);\n\n if (prop in div.style) {\n return prop;\n }\n\n for (var i = 0; i < prefixes.length; ++i) {\n var vendorProp = prefixes[i] + prop_;\n if (vendorProp in div.style) {\n return vendorProp;\n }\n }\n }", "function vendorPropName(style,name){ // Shortcut for names that are not vendor prefixed\nif(name in style){return name;} // Check for vendor prefixed names\nvar capName=name[0].toUpperCase() + name.slice(1),origName=name,i=cssPrefixes.length;while(i--) {name = cssPrefixes[i] + capName;if(name in style){return name;}}return origName;}", "function getVendorPropertyName(prop) {\n // Handle unprefixed versions (FF16+, for example)\n if (prop in div.style) return prop;\n\n var prefixes = ['Moz', 'Webkit', 'O', 'ms'];\n var prop_ = prop.charAt(0).toUpperCase() + prop.substr(1);\n\n for (var i=0; i<prefixes.length; ++i) {\n var vendorProp = prefixes[i] + prop_;\n if (vendorProp in div.style) { return vendorProp; }\n }\n }", "function getVendorPropertyName(prop) {\n\t // Handle unprefixed versions (FF16+, for example)\n\t if (prop in div.style) return prop;\n\t\n\t var prefixes = ['Moz', 'Webkit', 'O', 'ms'];\n\t var prop_ = prop.charAt(0).toUpperCase() + prop.substr(1);\n\t\n\t for (var i=0; i<prefixes.length; ++i) {\n\t var vendorProp = prefixes[i] + prop_;\n\t if (vendorProp in div.style) { return vendorProp; }\n\t }\n\t }", "function vendorPropName( name ) {\n\n // shortcut for names that are not vendor prefixed\n if ( name in emptyStyle ) {\n return name;\n }\n\n // check for vendor prefixed names\n var capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n i = cssPrefixes.length;\n\n while ( i-- ) {\n name = cssPrefixes[ i ] + capName;\n if ( name in emptyStyle ) {\n return name;\n }\n }\n }", "function getVendorPropertyName(prop) {\n // Handle unprefixed versions (FF16+, for example)\n if (prop in div.style) return prop;\n\n var prefixes = ['Moz', 'Webkit', 'O', 'ms'];\n var prop_ = prop.charAt(0).toUpperCase() + prop.substr(1);\n\n for (var i = 0; i < prefixes.length; ++i) {\n var vendorProp = prefixes[i] + prop_;\n if (vendorProp in div.style) {\n return vendorProp;\n }\n }\n }", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendor(el, prop) {\r\n var s = el.style\r\n , pp\r\n , i\r\n\r\n prop = prop.charAt(0).toUpperCase() + prop.slice(1)\r\n for(i=0; i<prefixes.length; i++) {\r\n pp = prefixes[i]+prop\r\n if(s[pp] !== undefined) return pp\r\n }\r\n if(s[prop] !== undefined) return prop\r\n }", "function vendor(el, prop) {\r\n var s = el.style\r\n , pp\r\n , i\r\n\r\n prop = prop.charAt(0).toUpperCase() + prop.slice(1)\r\n for(i=0; i<prefixes.length; i++) {\r\n pp = prefixes[i]+prop\r\n if(s[pp] !== undefined) return pp\r\n }\r\n if(s[prop] !== undefined) return prop\r\n }", "function vendorPropName( name ) {\r\n\r\n\t// Shortcut for names that are not vendor prefixed\r\n\tif ( name in emptyStyle ) {\r\n\t\treturn name;\r\n\t}\r\n\r\n\t// Check for vendor prefixed names\r\n\tvar capName = name[ 0 ].toUpperCase() + name.slice( 1 ),\r\n\t\ti = cssPrefixes.length;\r\n\r\n\twhile ( i-- ) {\r\n\t\tname = cssPrefixes[ i ] + capName;\r\n\t\tif ( name in emptyStyle ) {\r\n\t\t\treturn name;\r\n\t\t}\r\n\t}\r\n}", "function vendorPropName( name ) {\r\n\r\n\t// Shortcut for names that are not vendor prefixed\r\n\tif ( name in emptyStyle ) {\r\n\t\treturn name;\r\n\t}\r\n\r\n\t// Check for vendor prefixed names\r\n\tvar capName = name[ 0 ].toUpperCase() + name.slice( 1 ),\r\n\t\ti = cssPrefixes.length;\r\n\r\n\twhile ( i-- ) {\r\n\t\tname = cssPrefixes[ i ] + capName;\r\n\t\tif ( name in emptyStyle ) {\r\n\t\t\treturn name;\r\n\t\t}\r\n\t}\r\n}", "function vendor(el, prop) {\n var s = el.style\n , pp\n , i\n\n prop = prop.charAt(0).toUpperCase() + prop.slice(1)\n for(i=0; i<prefixes.length; i++) {\n pp = prefixes[i]+prop\n if(s[pp] !== undefined) return pp\n }\n if(s[prop] !== undefined) return prop\n }", "function vendor(el, prop) {\n var s = el.style\n , pp\n , i\n\n prop = prop.charAt(0).toUpperCase() + prop.slice(1)\n for(i=0; i<prefixes.length; i++) {\n pp = prefixes[i]+prop\n if(s[pp] !== undefined) return pp\n }\n if(s[prop] !== undefined) return prop\n }", "function vendor(el, prop) {\n var s = el.style\n , pp\n , i\n\n prop = prop.charAt(0).toUpperCase() + prop.slice(1)\n for(i=0; i<prefixes.length; i++) {\n pp = prefixes[i]+prop\n if(s[pp] !== undefined) return pp\n }\n if(s[prop] !== undefined) return prop\n }", "function vendor(el, prop) {\n var s = el.style\n , pp\n , i\n\n prop = prop.charAt(0).toUpperCase() + prop.slice(1)\n for(i=0; i<prefixes.length; i++) {\n pp = prefixes[i]+prop\n if(s[pp] !== undefined) return pp\n }\n if(s[prop] !== undefined) return prop\n }", "function vendor(el, prop) {\n var s = el.style\n , pp\n , i\n\n prop = prop.charAt(0).toUpperCase() + prop.slice(1)\n for(i=0; i<prefixes.length; i++) {\n pp = prefixes[i]+prop\n if(s[pp] !== undefined) return pp\n }\n if(s[prop] !== undefined) return prop\n }", "function vendor(el, prop) {\n var s = el.style\n , pp\n , i\n\n prop = prop.charAt(0).toUpperCase() + prop.slice(1)\n for(i=0; i<prefixes.length; i++) {\n pp = prefixes[i]+prop\n if(s[pp] !== undefined) return pp\n }\n if(s[prop] !== undefined) return prop\n }", "function vendor(el, prop) {\n var s = el.style\n , pp\n , i\n\n prop = prop.charAt(0).toUpperCase() + prop.slice(1)\n for(i=0; i<prefixes.length; i++) {\n pp = prefixes[i]+prop\n if(s[pp] !== undefined) return pp\n }\n if(s[prop] !== undefined) return prop\n }", "function vendor(el, prop) {\n var s = el.style\n , pp\n , i\n\n prop = prop.charAt(0).toUpperCase() + prop.slice(1)\n for(i=0; i<prefixes.length; i++) {\n pp = prefixes[i]+prop\n if(s[pp] !== undefined) return pp\n }\n if(s[prop] !== undefined) return prop\n }", "function vendor(el, prop) {\n var s = el.style\n , pp\n , i\n\n prop = prop.charAt(0).toUpperCase() + prop.slice(1)\n for(i=0; i<prefixes.length; i++) {\n pp = prefixes[i]+prop\n if(s[pp] !== undefined) return pp\n }\n if(s[prop] !== undefined) return prop\n }", "function vendor(el, prop) {\n var s = el.style\n , pp\n , i\n\n prop = prop.charAt(0).toUpperCase() + prop.slice(1)\n for(i=0; i<prefixes.length; i++) {\n pp = prefixes[i]+prop\n if(s[pp] !== undefined) return pp\n }\n if(s[prop] !== undefined) return prop\n }", "function vendor(el, prop) {\n var s = el.style\n , pp\n , i\n\n prop = prop.charAt(0).toUpperCase() + prop.slice(1)\n for(i=0; i<prefixes.length; i++) {\n pp = prefixes[i]+prop\n if(s[pp] !== undefined) return pp\n }\n if(s[prop] !== undefined) return prop\n }", "function vendor(el, prop) {\n var s = el.style\n , pp\n , i\n\n prop = prop.charAt(0).toUpperCase() + prop.slice(1)\n for(i=0; i<prefixes.length; i++) {\n pp = prefixes[i]+prop\n if(s[pp] !== undefined) return pp\n }\n if(s[prop] !== undefined) return prop\n }", "function vendorPropName( name ) {\n\n\t// Shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// Check for vendor prefixed names\n\tvar capName = name[ 0 ].toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// Shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// Check for vendor prefixed names\n\tvar capName = name[ 0 ].toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// Shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// Check for vendor prefixed names\n\tvar capName = name[ 0 ].toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// Shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// Check for vendor prefixed names\n\tvar capName = name[ 0 ].toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// Shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// Check for vendor prefixed names\n\tvar capName = name[ 0 ].toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// Shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// Check for vendor prefixed names\n\tvar capName = name[ 0 ].toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// Shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// Check for vendor prefixed names\n\tvar capName = name[ 0 ].toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// Shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// Check for vendor prefixed names\n\tvar capName = name[ 0 ].toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}" ]
[ "0.7707262", "0.7707262", "0.75569034", "0.751308", "0.74200445", "0.7405853", "0.7405853", "0.7405853", "0.7405853", "0.7405853", "0.7405853", "0.7405853", "0.7405853", "0.73776484", "0.73769224", "0.736673", "0.72982275", "0.718422", "0.7151027", "0.71010363", "0.7096066", "0.7086806", "0.7054719", "0.7050251", "0.7037128", "0.7023557", "0.7023557", "0.7023557", "0.7023557", "0.7023557", "0.7023557", "0.7023557", "0.7023557", "0.7023557", "0.7023557", "0.7023557", "0.7023557", "0.7023557", "0.7023557", "0.7023557", "0.7023557", "0.7023557", "0.7023557", "0.7023557", "0.7023557", "0.7023557", "0.7023557", "0.7023557", "0.7023557", "0.7023557", "0.7023557", "0.7023557", "0.7023557", "0.7023557", "0.7023557", "0.7023557", "0.7023557", "0.7023557", "0.7023557", "0.7023557", "0.7023557", "0.7023557", "0.7023557", "0.7023557", "0.7023557", "0.7023557", "0.7023557", "0.7023557", "0.7023557", "0.7023557", "0.7023557", "0.7023557", "0.7023557", "0.7023557", "0.7023557", "0.7023557", "0.7023557", "0.7021685", "0.7021685", "0.7013751", "0.7013751", "0.69959337", "0.69959337", "0.69959337", "0.69959337", "0.69959337", "0.69959337", "0.69959337", "0.69959337", "0.69959337", "0.69959337", "0.69959337", "0.69959337", "0.6992306", "0.6992306", "0.6992306", "0.6992306", "0.6992306", "0.6992306", "0.6992306", "0.6992306" ]
0.0
-1
Return a potentiallymapped jQuery.cssProps or vendor prefixed property
function finalPropName( name ) { var final = jQuery.cssProps[ name ] || vendorProps[ name ]; if ( final ) { return final; } if ( name in emptyStyle ) { return name; } return vendorProps[ name ] = vendorPropName( name ) || name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function vendorPropName(name){// Shortcut for names that are not vendor prefixed\nif(name in emptyStyle){return name;}// Check for vendor prefixed names\nvar capName=name[0].toUpperCase()+name.slice(1),i=cssPrefixes.length;while(i--){name=cssPrefixes[i]+capName;if(name in emptyStyle){return name;}}}// Return a property mapped along what jQuery.cssProps suggests or to", "function vendorPropName(name){// Shortcut for names that are not vendor prefixed\nif(name in emptyStyle){return name;}// Check for vendor prefixed names\nvar capName=name[0].toUpperCase()+name.slice(1),i=cssPrefixes.length;while(i--){name=cssPrefixes[i]+capName;if(name in emptyStyle){return name;}}}// Return a property mapped along what jQuery.cssProps suggests or to", "function vendorPropName(name) {\n // Check for vendor prefixed names\n var capName = name[0].toUpperCase() + name.slice(1),\n i = cssPrefixes.length;\n\n while (i--) {\n name = cssPrefixes[i] + capName;\n\n if (name in emptyStyle) {\n return name;\n }\n }\n } // Return a potentially-mapped jQuery.cssProps or vendor prefixed property", "function vendorPropName(name) {\n // Check for vendor prefixed names\n var capName = name[0].toUpperCase() + name.slice(1),\n i = cssPrefixes.length;\n\n while (i--) {\n name = cssPrefixes[i] + capName;\n\n if (name in emptyStyle) {\n return name;\n }\n }\n } // Return a potentially-mapped jQuery.cssProps or vendor prefixed property", "function vendorPropName(name) {\n // Check for vendor prefixed names\n var capName = name[0].toUpperCase() + name.slice(1),\n i = cssPrefixes.length;\n\n while (i--) {\n name = cssPrefixes[i] + capName;\n\n if (name in emptyStyle) {\n return name;\n }\n }\n } // Return a potentially-mapped jQuery.cssProps or vendor prefixed property", "function vendorPropName(name) {\n // Check for vendor prefixed names\n var capName = name[0].toUpperCase() + name.slice(1),\n i = cssPrefixes.length;\n\n while (i--) {\n name = cssPrefixes[i] + capName;\n\n if (name in emptyStyle) {\n return name;\n }\n }\n } // Return a potentially-mapped jQuery.cssProps or vendor prefixed property", "function vendorPropName(name) {\n // Check for vendor prefixed names\n var capName = name[0].toUpperCase() + name.slice(1),\n i = cssPrefixes.length;\n\n while (i--) {\n name = cssPrefixes[i] + capName;\n\n if (name in emptyStyle) {\n return name;\n }\n }\n } // Return a potentially-mapped jQuery.cssProps or vendor prefixed property", "function vendorPropName(name) {\n // Check for vendor prefixed names\n var capName = name[0].toUpperCase() + name.slice(1),\n i = cssPrefixes.length;\n\n while (i--) {\n name = cssPrefixes[i] + capName;\n\n if (name in emptyStyle) {\n return name;\n }\n }\n } // Return a potentially-mapped jQuery.cssProps or vendor prefixed property", "function vendorPropName(name) {\n // Check for vendor prefixed names\n var capName = name[0].toUpperCase() + name.slice(1),\n i = cssPrefixes.length;\n\n while (i--) {\n name = cssPrefixes[i] + capName;\n\n if (name in emptyStyle) {\n return name;\n }\n }\n } // Return a potentially-mapped jQuery.cssProps or vendor prefixed property", "function vendorPropName(name) {\n // Check for vendor prefixed names\n var capName = name[0].toUpperCase() + name.slice(1),\n i = cssPrefixes.length;\n\n while (i--) {\n name = cssPrefixes[i] + capName;\n\n if (name in emptyStyle) {\n return name;\n }\n }\n } // Return a potentially-mapped jQuery.cssProps or vendor prefixed property", "function finalPropName(name){var ret=jQuery.cssProps[name];if(!ret){ret=jQuery.cssProps[name]=vendorPropName(name)||name;}return ret;}", "function finalPropName(name){var ret=jQuery.cssProps[name];if(!ret){ret=jQuery.cssProps[name]=vendorPropName(name)||name;}return ret;}", "function finalPropName( name ) { // 6277\n\tvar ret = jQuery.cssProps[ name ]; // 6278\n\tif ( !ret ) { // 6279\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name; // 6280\n\t} // 6281\n\treturn ret; // 6282\n} // 6283", "function finalPropName( name ) {\n var ret = jQuery.cssProps[ name ];\n if ( !ret ) {\n ret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n }\n return ret;\n}", "function finalPropName( name ) {\r\n\tvar ret = jQuery.cssProps[ name ];\r\n\tif ( !ret ) {\r\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\r\n\t}\r\n\treturn ret;\r\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}", "function finalPropName( name ) {\n\tvar ret = jQuery.cssProps[ name ];\n\tif ( !ret ) {\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n\t}\n\treturn ret;\n}" ]
[ "0.78410184", "0.78410184", "0.7469924", "0.7469924", "0.7469924", "0.7469924", "0.7469924", "0.7469924", "0.7469924", "0.7469924", "0.726086", "0.726086", "0.71604884", "0.6958364", "0.6876957", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684" ]
0.0
-1
Animations created synchronously will run synchronously
function createFxNow() { window.setTimeout( function() { fxNow = undefined; } ); return ( fxNow = Date.now() ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_playAnimation() {\n if (this._animationLast === undefined && this._animationQueue.length > 0) {\n this._animationLast = this._animationCurrent;\n this._animationCurrent = this._animationQueue.shift();\n console.log(\"New: \" + this._animationCurrent.name);\n this._animationCurrent.runCount = 0;\n }\n this._serviceAnimation(this._animationCurrent, true);\n this._serviceAnimation(this._animationLast, false);\n if (this._animationLast && this._animationLast.cleanup) {\n this._animationLast.animation.stop();\n this._animationLast.animation = undefined;\n this._animationLast = undefined;\n }\n }", "createAnimations() {\r\n //#region Idle animation\r\n // Idle front\r\n this.anims.create({\r\n key: 'idle_front',\r\n frames: [\r\n {\r\n key: 'idle_front_0'\r\n },\r\n {\r\n key: 'idle_front_1'\r\n },\r\n {\r\n key: 'idle_front_2'\r\n },\r\n {\r\n key: 'idle_front_3'\r\n }\r\n ],\r\n frameRate: 2,\r\n repeat: -1,\r\n });\r\n\r\n // Idle back\r\n this.anims.create({\r\n key: 'idle_back',\r\n frames: [\r\n {\r\n key: 'idle_back_0'\r\n },\r\n {\r\n key: 'idle_back_1'\r\n },\r\n {\r\n key: 'idle_back_2'\r\n },\r\n {\r\n key: 'idle_back_3'\r\n }\r\n ],\r\n frameRate: 2,\r\n repeat: -1,\r\n });\r\n\r\n // Idle side\r\n this.anims.create({\r\n key: 'idle_side',\r\n frames: [\r\n {\r\n key: 'idle_side_0'\r\n },\r\n {\r\n key: 'idle_side_1'\r\n },\r\n {\r\n key: 'idle_side_2'\r\n },\r\n {\r\n key: 'idle_side_3'\r\n }\r\n ],\r\n frameRate: 2,\r\n repeat: -1,\r\n });\r\n\r\n //#endregion\r\n\r\n //#region Run animations\r\n\r\n // Run front\r\n this.anims.create({\r\n key: 'run_front',\r\n frames: [\r\n {\r\n key: 'run_front_0'\r\n },\r\n {\r\n key: 'run_front_1'\r\n },\r\n {\r\n key: 'run_front_2'\r\n },\r\n {\r\n key: 'run_front_3'\r\n }\r\n ],\r\n frameRate: 6,\r\n repeat: -1,\r\n });\r\n\r\n // Run back\r\n this.anims.create({\r\n key: 'run_back',\r\n frames: [\r\n {\r\n key: 'run_back_0'\r\n },\r\n {\r\n key: 'run_back_1'\r\n },\r\n {\r\n key: 'run_back_2'\r\n },\r\n {\r\n key: 'run_back_3'\r\n }\r\n ],\r\n frameRate: 6,\r\n repeat: -1,\r\n });\r\n\r\n // Run side\r\n this.anims.create({\r\n key: 'run_side',\r\n frames: [\r\n {\r\n key: 'run_side_0'\r\n },\r\n {\r\n key: 'run_side_1'\r\n },\r\n {\r\n key: 'run_side_2'\r\n },\r\n {\r\n key: 'run_side_3'\r\n }\r\n ],\r\n frameRate: 6,\r\n repeat: -1,\r\n });\r\n\r\n //#endregion\r\n }", "requestUpdateAnimations () {\n this.animationsUpdateNeeded = true;\n }", "animation() {}", "initAnimations() {\n this.animations = [];\n let interpolant = new TransformationInterpolant();\n\n for (var key in this.graph.animations) {\n if (this.graph.animations.hasOwnProperty(key)) {\n let animation = this.graph.animations[key];\n let keyframes = animation.keyframes;\n let keyframeTrack = new TransformationTrack(keyframes, interpolant);\n this.animations[key] = new KeyframeAnimation(keyframeTrack);\n }\n }\n\n this.interface.addAnimations();\n }", "updateAnimation() {\n this.animator.animate();\n }", "InitAnims() {\n this.scene.anims.create({\n key: 'idle',\n frames: this.scene.anims.generateFrameNumbers('player_idle', { start: 0, end: 5 }),\n frameRate: 8,\n repeat: -1\n });\n this.scene.anims.create({\n key: 'run',\n frames: this.scene.anims.generateFrameNumbers('player_run', { start: 0, end: 39 }),\n frameRate: 60,\n repeat: -1\n });\n this.scene.anims.create({\n key: 'jump',\n frames: [{ key: 'player_jump', frame: 0 }],\n frameRate: 24\n });\n this.scene.anims.create({\n key: 'attack',\n frames: this.scene.anims.generateFrameNumbers('player_attack', { start: 0, end: 7 }),\n frameRate: 24,\n showOnStart: true,\n hideOnComplete: true\n });\n this.scene.anims.create({\n key: 'death',\n frames: this.scene.anims.generateFrameNumbers('player_death', { start: 0, end: 7 }),\n frameRate: 4,\n showOnStart: true,\n hideOnComplete: false\n });\n }", "async function playAnimationSequence() {\n\ttry {\n\t\tdocument.getElementById(\"map-container\").innerHTML = \"\"; // clear any existing content\n\n\t\t// await renderSVGPromiseWrapper('roads', \"scenario-sync\", 10);\n\t\t// await renderSVGPromiseWrapper('parks', \"sync\", 120);\n\t\t// await renderSVGPromiseWrapper('buildings', \"delayed\", 120);\n\t\t// await renderSVGPromiseWrapper('trees', \"sync\", 15);\n\t\t// await renderSVGPromiseWrapper('blocks', \"scenario-sync\", 5);\n\t\t// await renderSVGPromiseWrapper('lots', \"sync\", 10);\n\n\n\t\t// console.log('animation complete.');\n\t} catch (error) {\n\t\tconsole.error(\"ERROR:\" + error);\n\t}\n}", "function runAnimay(){\n ropAnimation();\n headAnimation();\n bodyAnimation();\n larmAnimation();\n rarmAnimation();\n llegAnimation();\n rlegAnimation();\n}", "addAnimations() {\n\n // eyes animations (moving eyes of the inspector)\n let frameRate = 50; // frame rate of the animation\n\n // from mid to right\n this.anims.create({\n key: 'midToRight',\n frames: this.anims.generateFrameNames('eyes', {frames: [0, 1, 2, 3, 4, 5]}),\n frameRate: frameRate,\n paused: true\n });\n\n // from right to mid\n this.anims.create({\n key: 'rightToMid',\n frames: this.anims.generateFrameNames('eyes', {frames: [5, 4, 3, 2, 1, 0]}),\n frameRate: frameRate,\n paused: true\n });\n\n // from mid to left\n this.anims.create({\n key: 'midToLeft',\n frames: this.anims.generateFrameNames('eyes', {frames: [0, 6, 7, 8, 9, 10]}),\n frameRate: frameRate,\n paused: true\n });\n\n // from left to mid\n this.anims.create({\n key: 'leftToMid',\n frames: this.anims.generateFrameNames('eyes', {frames: [10, 9, 8, 7, 6, 0]}),\n frameRate: frameRate,\n paused: true\n });\n\n // from left to right\n this.anims.create({\n key: 'leftToRight',\n frames: this.anims.generateFrameNames('eyes', {frames: [10, 9, 8, 7, 6, 0, 1, 2, 3, 4, 5]}),\n frameRate: frameRate,\n paused: true\n });\n\n // from right to left\n this.anims.create({\n key: 'rightToLeft',\n frames: this.anims.generateFrameNames('eyes', {frames: [5, 4, 3, 2, 1, 0, 6, 7, 8, 9, 10]}),\n frameRate: frameRate,\n paused: true\n });\n\n }", "playAnimation() {\n for (var key in this.animations) {\n if (this.animations.hasOwnProperty(key)) {\n this.animations[key].setFinished(false);\n }\n }\n }", "function createAnimation(elems, values, duration, onFinishFn) {\n nativeGlobal.setTimeout(function() {\n var newAnimation = animate.animateTransforms(elems, values, duration, onFinishFn);\n runningAnimations.push(newAnimation);\n }, 18); // Wait one frame, for Firefox\n\n}", "updateAnimation() {\n return;\n }", "function animate (params) {\n // add new animation task to task queue\n tasks.push(new animationTask(params));\n\n if (tasks.length == 1) {\n // start animation interval timer since this is the first item in the task queue\n start();\n }\n }", "function fireInitialAnimations() {\n $mdUtil.nextTick(function() {\n $animate.addClass($element, 'md-noop');\n });\n }", "function animate() {\n requestAnimationFrame(animate);\n\n clockDelta = clock.getDelta();\n \n // update controls, including auto-rotation\n controls.update();\n\n // run each custom animation function.\n if (enableAnimation) {\n for (var x = 0; x < animFunctions.length; x++) {\n animFunctions[x]();\n }\n }\n\n // render with the composer\n composer.render();\n}", "function initAnimation() {\n}", "function animationManager () {\n for (var i = tasks.length; i--;) {\n if (tasks[i].step() == false) {\n // remove animation tasks\n logToScreen(\"remove animation\");\n tasks.splice(i, 1);\n }\n }\n }", "initAnimations() {\n this.animations = new Map();\n\n for (let [id, animation] of this.graph.animations) {\n let anim = new MyKeyframeAnimation(animation.keyframes);\n this.animations.set(id, anim);\n }\n }", "start() {\n this._enableAnimation = true;\n this._numberOfAnimationCycles = 0;\n }", "function anim() {\r\n Loop();\r\n requestAnimFrame(anim);\r\n }", "function test_animate() {\n //Do the preview (IS THIS NEEDED?)\n if (AUTO_ANIM) {\n for (var i = 0; i < NODES.length; i++) {\n if (NODES[i].parent) {\n var r = Math.min(Math.max(parseFloat(atob(NODES[i].id)), 0.3), 0.7);\n NODES[i].th = NODES[i].th0 + Math.sin((new Date()).getTime() * 0.003 / r + r * Math.PI * 2) * r * 0.5;\n } else {\n NODES[i].th = NODES[i].th0\n }\n }\n }\n doodleMeta.forwardKinematicsNodes(NODES);\n doodleMeta.calculateSkin(SKIN);\n\n //Do the transfered drawings\n if (AUTO_ANIM) {\n for (let i = 0; i < drawings.length; i++) {\n drawings[i].animate();\n }\n }\n //anim_render();\n master_render();\n}", "function animate() {\n requestAnimationFrame(animate);\n render();\n update();\n }", "function animate() {\r\n\tif (runAnim) {\r\n\t\trequestAnimationFrame(animate);\r\n\t}\r\n\trender();\r\n}", "createSpriteAnimations() {\n const haloFrames = this.anims.generateFrameNames('haloHit', { \n start: 1, end: 84, zeroPad: 5,\n prefix: 'Halo_' , suffix: '.png'\n });\n\n this.anims.create({ key: 'haloHit', frames: haloFrames, frameRate: 60, repeat: 0 });\n\n const sparkFrames = this.anims.generateFrameNames('sparkHit', { \n start: 1, end: 84, zeroPad: 5,\n prefix: 'Spark_' , suffix: '.png'\n });\n\n this.anims.create({ key: 'sparkHit', frames: sparkFrames, frameRate: 60, repeat: -1 });\n }", "static fromFrames(frames) {\nvar anim;\n//----------\nanim = new CASAnimation();\nanim.setFromFrames(frames);\nreturn anim;\n}", "addAnimation(anims,timeBetween = 1, loop = true){\n var animArr = []\n for (var i = 0; i < anims.length; i++){\n animArr[i] = new Image(this.width, this.height)\n animArr[i].src = anims[i]\n animArr[i].width = this.width\n animArr[i].height = this.height\n }\n\n this.animIndex = 0\n this.animsArray[this.numberOfAnimations] = animArr\n this.numberOfAnimations++;\n if (this.animsArray.length === 1){\n this.anims = animArr;\n this.timeBetweenAnim = timeBetween\n setInterval(function(){\n this.image = this.anims[this.animIndex];\n this.animIndex++;\n if (this.animIndex >=this.anims.length){\n this.animIndex =0\n }\n }.bind(this), this.timeBetweenAnim)\n }\n }", "function animate() {\n\n\t\tconst mixer = editor.mixer;\n\t\tconst delta = clock.getDelta();\n\n\t\tlet needsUpdate = false;\n\n\n\t\t//yomotsu camera\n\t\tneedsUpdate = controls.update( delta );\n\n\t\t// Animations\n\n\n\t\tconst actions = mixer.stats.actions;\n\n\t\tif ( actions.inUse > 0 || prevActionsInUse > 0 ) {\n\n\t\t\tprevActionsInUse = actions.inUse;\n\n\t\t\tmixer.update( delta );\n\t\t\tneedsUpdate = true;\n\n\t\t}\n\n\t\t// View Helper\n\n\t\tif ( viewHelper.animating === true ) {\n\n\t\t\tviewHelper.update( delta );\n\t\t\tneedsUpdate = true;\n\n\t\t}\n\n\t\tif ( vr.currentSession !== null ) {\n\n\t\t\tneedsUpdate = true;\n\n\t\t}\n\n\t\tif ( needsUpdate === true ) render();\n\n\t}", "function addAnimation() {\n const Burst1 = new mojs.Burst({\n parent: animationDiv,\n top: '50%',\n left: '50%',\n radius: {0: 80},\n count: 8,\n children: {\n shape: 'circle',\n fill: {'red': 'blue'},\n strokeWidth: 1,\n duration: 600,\n stroke: {'red': 'blue'}\n }\n });\n\n\n const Burst2 = new mojs.Burst({\n parent: animationDiv,\n top: '50%',\n left: '50%',\n radius: {0: 100},\n count: 4,\n children: {\n shape: 'rect',\n fill: 'white',\n strokeWidth: 1,\n duration: 300,\n stroke: 'white'\n }\n });\n\n\n const circle1 = new mojs.Shape({\n radius: {0: 40},\n parent: animationDiv,\n fill: 'none',\n stroke: 'white',\n strokeWidth: 15,\n duration: 300,\n opacity: {1: 0}\n });\n\n const circle2 = new mojs.Shape({\n radius: {0: 50},\n parent: animationDiv,\n fill: 'none',\n stroke: 'red',\n strokeWidth: 5,\n duration: 400,\n opacity: {1: 0}\n });\n\n\n const circle3 = new mojs.Shape({\n radius: {0: 60},\n parent: animationDiv,\n fill: 'none',\n stroke: 'blue',\n strokeWidth: 5,\n duration: 500,\n opacity: {1: 0}\n });\n\n const circle4 = new mojs.Shape({\n radius: {0: 70},\n parent: animationDiv,\n fill: 'white',\n\n stroke: 'white',\n strokeWidth: 5,\n duration: 600,\n opacity: {1: 0}\n });\n\n const timeline = new mojs.Timeline({\n\n repeat: 0\n }).add(circle4, circle1, circle2, circle3, Burst1, Burst2);\n\n timeline.play();\n }", "function animateButtons() {\n for (var i = 0; i < game.sequence.length; i++) {\n delayedAnimation(game.sequence[i], i * game.delayBetweenAnimations);\n console.log('here', game.sequence);\n }\n}", "function createObjectAnimations() {\r\n this.anims.create({\r\n key: 'jewelAnims',\r\n frames: this.anims.generateFrameNumbers('jewel', { start: 0, end: 4 }),\r\n frameRate: 10,\r\n repeat: -1,\r\n });\r\n\r\n this.anims.create({\r\n key: 'cherryAnims',\r\n frames: this.anims.generateFrameNumbers('cherry', { start: 0, end: 6 }),\r\n frameRate: 6,\r\n repeat: -1,\r\n });\r\n}", "function animate(){\n\t\trequestAnimationFrame( animate );\n\t\trender();\n\t}", "initiateAnimation() {\n let previousPosition = this.gameOrchestrator.gameboard.getPiecePosition(this.firstTile.col, this.firstTile.row);\n previousPosition[1] = 0; //in the start position, the height is not needed \n\n let nextPosition = this.gameOrchestrator.gameboard.getPiecePosition(this.secondTile.col, this.secondTile.row)\n\n let animation = new PieceAnimation(this.gameOrchestrator.scene, previousPosition, nextPosition, MOVE_SPEED);\n\n this.animations.push(animation);\n\n this.gameOrchestrator.gameboard.setPieceAnimation(this.firstTile.col, this.firstTile.row, animation);\n }", "updateAnimations() {\n this.animations.forEach((animation, index) => {\n if (animation.finished) {\n this.animations.splice(index, 1);\n }\n });\n }", "function animate() { \n console.log('animate')\n \n gsap.registerEffect({\n name: \"fadeIn\",\n effect: (targets, config) => {\n var tlEffect = gsap.timeline();\n tlEffect.from(targets, {duration: config.duration, y:config.y, force3D:true, rotation: 0.01, stagger:config.stagger, ease:\"power2\"})\n .from(targets, {duration: config.duration, stagger:config.stagger, alpha:0, ease:\"none\"}, \"<\")\n return tlEffect;\n },\n defaults: {duration: 1.5, y:\"-=7\", stagger:4.5},\n extendTimeline: true,\n });\n \n gsap.to(plantWraps, {duration:25, rotation:\"+=20\", ease:\"none\"})\n gsap.to(flowerWraps, {duration:25, rotation:\"+=100\", ease:\"none\"})\n \n var imageDivs = selectAll('.imageDiv');\n // logoIntro = false;\n\n\t\t\ttl\n .to(bannerCover, {duration:0.7, alpha:0, ease:\"none\"})\n \n .from(plants, {duration:3, drawSVG:\"50% 50%\", ease:\"sine.inOut\"}, \"<\")\n .from(flowers, {duration:2, alpha:0, ease:\"none\"}, \"<\")\n \n if(logoIntro) {\n tl\n .from(letter_w, {duration:0.5, drawSVG: 0, ease:\"sine.in\"}, \"<\")\n .from(letter_y, {duration:0.3, drawSVG: 0, ease:\"sine.in\"}, \">\")\n .from(letter_nn, {duration:0.8, drawSVG: 0, ease:\"sine.inOut\"}, \">\")\n .from(lasvegas, {duration:0.7, y:\"-=10\", alpha: 0, ease:\"sine\"}, \">\")\n .from(sign_r, {duration:0.5, alpha: 0, ease:\"none\"}, \"<\")\n\n .to(logo, {duration:0.7, alpha:0, ease:\"none\"}, \">1\")\n .set(logo, {scale: 0.37, y:99, x:-60}, \">\")\n } else {\n tl\n .set(logo, {scale: 0.37, alpha:0,y:99, x:-60}, \"<\")\n }\n \n tl\n .from(imageDivs, {duration:1.3, stagger:4, alpha:0, blur:10, force3D:true, rotation: 0.01, ease:\"none\"}, \"<\")\n \n .fadeIn(text_head, \"<0.4\")\n .fadeIn(text_subHead,{y:\"0\", duration: 1,},\"<0.6\")\n .to(logo, {duration:1, alpha:1, ease:\"none\"}, \"<0.4\")\n .from(cta, {duration:0.8, alpha: 0, ease:\"none\"}, \"<\")\n .from(cta, {duration:1.6, rotateX:90, ease:\"power2\"}, \"<\") \n\t\t}", "animateInorderNodes() {\r\n let queue = [];\r\n let animations = [];\r\n animations.push(new Animation(\"display\", \"Traversing Inorder\", \"\"));\r\n\r\n this.animateInorderNodesHelper(this.root, queue, animations);\r\n\r\n animations.push(new Animation(\"display\", \"Finished Travering\", \"\"));\r\n\r\n return [queue, animations];\r\n }", "function start () {\n animationInt = window.setInterval(animationManager, animatorIntervalTime);\n }", "addAnimations(...animations) {\n animations.forEach(animation => {\n Object.keys(animation).forEach(key => {\n UI.animations[key] = animation[key];\n });\n });\n }", "function createAnimations(that){\n \n that.anims.create({\n key: \"left\",\n frames: that.anims.generateFrameNumbers(\"personaje\", { start: 2, end: 0 }),\n repeat: 0\n });\n\n that.anims.create({\n key: \"finish-left\",\n frames: that.anims.generateFrameNumbers(\"personaje\", { start: 0, end: 2 }),\n repeat: 0\n });\n \n that.anims.create({\n key: \"right\",\n frames: that.anims.generateFrameNumbers(\"personaje\", { start: 2, end: 4 })\n });\n\n that.anims.create({\n key: \"finish-right\",\n frames: that.anims.generateFrameNumbers(\"personaje\", { start: 4, end: 2 })\n });\n\n that.anims.create({\n key: \"down\",\n frames: that.anims.generateFrameNumbers(\"personaje\", { start: 7, end: 2 }),\n });\n\n that.anims.create({\n key: \"up\",\n frames: that.anims.generateFrameNumbers(\"personaje\", { start: 2, end: 7 })\n });\n\n}", "function createAnimations(that){\n \n that.anims.create({\n key: \"left\",\n frames: that.anims.generateFrameNumbers(\"personaje\", { start: 2, end: 0 }),\n repeat: 0\n });\n\n that.anims.create({\n key: \"finish-left\",\n frames: that.anims.generateFrameNumbers(\"personaje\", { start: 0, end: 2 }),\n repeat: 0\n });\n \n that.anims.create({\n key: \"right\",\n frames: that.anims.generateFrameNumbers(\"personaje\", { start: 2, end: 4 })\n });\n\n that.anims.create({\n key: \"finish-right\",\n frames: that.anims.generateFrameNumbers(\"personaje\", { start: 4, end: 2 })\n });\n\n that.anims.create({\n key: \"down\",\n frames: that.anims.generateFrameNumbers(\"personaje\", { start: 7, end: 2 }),\n });\n\n that.anims.create({\n key: \"up\",\n frames: that.anims.generateFrameNumbers(\"personaje\", { start: 2, end: 7 })\n });\n\n}", "function animate() {\n // render\n controls0.update();\n controls1.update();\n controls2.update();\n controls3.update();\n\n if (ready) {\n renderer0.render(sceneScreen0, camera0);\n renderer1.render(sceneScreen1, camera1);\n renderer2.render(sceneScreen2, camera2);\n renderer3.render(sceneScreen3, camera3);\n }\n\n stats.update();\n\n // request new frame\n requestAnimationFrame(function() {\n animate();\n });\n }", "get importAnimation() {}", "queueVisualEffect(action, isAnimated) {\n if (this.isInAnimation) {\n // queue\n this.visualEffectQueue.push({\n isAnimated: isAnimated,\n action: action,\n });\n } else {\n // execute\n this.isInAnimation = isAnimated;\n action();\n }\n }", "function animate() {\n var timeNow = new Date().getTime();\n\n if (animate.timeLast) {\n var elapsed = timeNow - animate.timeLast;\n\n\n for (var i = 0; i < items.length; i++) {\n items[i].animate();\n }\n }\n animate.timeLast = timeNow;\n}", "runAnimation() {\n const animate = () => {\n const duration = this.getAnimationDuration();\n setStyle(this.slider, 'transform', 'translateX(0%)');\n setStyle(this.slider, 'transition', `transform ${duration}ms linear`);\n setStyle(this.slider, 'transform', 'translateX(-100%)');\n\n this.animationTimer = setTimeout(() => {\n this.stopAnimation();\n requestAnimationFrame(() => animate());\n }, duration / 2);\n };\n\n animate();\n }", "function animate() {\n // if (stackHelper) {\n // stackHelper.index += 1;\n // if (stackHelper.outOfBounds === true) {\n // stackHelper.orientation = (stackHelper.orientation + 1) % 3;\n // stackHelper.index = 0;\n // }\n // }\n\n controls.update();\n renderer.render(scene, camera);\n stats.update();\n\n // request new frame\n requestAnimationFrame(function() {\n animate();\n });\n }", "function animate() {\n\trequestAnimationFrame(animate);\n\trender();\n}", "function tick(){\n //iterate through animations and check for active state\n //if active, run position calculation on animations\n var activityCheck = false;\n var now = $.now();\n //console.log('$.animation.tick', now );\n\n for (var k in animations){\n //console.log(' ',k,animations[k].isActive());\n if (animations[k].isActive()){\n activityCheck = true;\n if ( !animations[k].isComplete() ){\n //console.log(' ','not complete');\n animations[k].enterFrame( now );\n }\n else{\n //console.log(' ','complete');\n //catch complete on next tick\n $.event.trigger(animations[k],'animationcomplete',false,false);\n delete animations[k];\n freeAnimationIds.push( parseInt(k) );\n }\n }\n }\n\n if (activityCheck){\n requestTick();\n }\n else {\n active = false;\n }\n }", "function loadEvents() {\r\n\r\n\t\t// Transition from 1st to 2nd sequence\r\n\t\t$('#ir-anim-container #white-circle').on('click', function() {\r\n\t\t\t$('#ir-anim-container #white-circle').css('background', 'white');\r\n\t\t\tsequence = 0;\r\n\r\n\t\t\t$('#ir-anim-container #gifts').fadeOut();\r\n\t\t\t$('#ir-anim-container #white-circle').find('h1, h2').fadeOut(function() {\r\n\r\n\t\t\t\t// Fallback for browsers without CSS animations\r\n\t\t\t\tif (Modernizr.cssanimations) {\r\n\t\t\t\t\t$('#ir-anim-container #white-circle').animate({ backgroundColor: 'white' }, 300);\r\n\t\t\t\t $('#ir-anim-container #white-circle').addClass('zoom');\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t$('#ir-anim-container #white-circle').animate({ left: '-250px', top: '-250px', width: '1000px', height: '1000px' }, 500);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tphysics.debugDraw.SetFlags(0);\r\n\r\n\t\t\t\t// Dummy animation to delay the start of the particle generation\r\n\t\t\t\t$('#ir-anim-container #white-circle').animate({'color':'#FFF'}, 500, function() {\r\n\r\n\t\t\t\t\tclearInterval(physics.generator);\r\n\t\t\t\t\tdelete physics.world;\r\n\t\t\t\t\tsequence = 2;\r\n\r\n\t\t\t\t\t$('body').css('background', '#FFF'); // This line is only for the demo. Remove on integration\r\n\t\t\t\t\t$('#ir-anim-container').css('background', '#FFF');\r\n\t\t\t\t\t$('#ir-anim-container #white-circle').remove();\r\n\r\n\t\t\t\t\t// Start assembling the gift after 5 secounds\r\n\t\t\t\t\tvar timer = setTimeout(function() {\r\n\r\n\t\t\t\t\t\tif (!initialized) {\r\n\t\t\t\t\t\t\tassembleShape();\r\n\r\n\t\t\t\t\t\t\tvar len = nodes.length;\r\n\r\n\t\t\t\t\t\t\t// Update the size of the nodes\r\n\t\t\t\t\t\t\twhile (len--) {\r\n\t\t\t\t\t\t\t\tnodes[len].fadeOut = true;\r\n\t\t\t\t\t\t\t\tnodes[len].speedScale = (Math.random() * 2.8) + 0.5;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tinitialized = true;\r\n\t\t\t\t\t\t\tsetTimeout(function() { $('#ir-anim-container #congrats').fadeIn() }, 4000);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}, 5000); // Display the gift after 5 seconds\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t});\r\n\t}", "function animate() {\n requestAnimationFrame(animate);\n update();\n render();\n }", "animatePreorderNodes() {\r\n let queue = [];\r\n let animations = [];\r\n animations.push(new Animation(\"display\", \"Traversing Preorder\", \"\"));\r\n\r\n this.aniamtePreorderNodesHelper(this.root, queue, animations);\r\n\r\n animations.push(new Animation(\"display\", \"Finished Traversing\", \"\"));\r\n\r\n return [queue, animations];\r\n }", "function animate() {\n requestAnimationFrame( animate );\n controls.update();\n render();\n }", "function startAnim() {\n console.log('startAnim');\n\n //TweenMax.from(closeButton, fadeTime/2, {delay:0, autoAlpha:0, ease:animTypeIn});\n\n TweenMax.from(bg1, fadeTime, {\n delay: 0,\n autoAlpha: 0,\n ease: animTypeIn\n });\n TweenMax.to(bg1, imagePanTime, {\n delay: 0,\n y: -50,\n ease: imagePanAnimType\n });\n\n TweenMax.from([bookmarkBase, map, location1, bookmarkDivider, pnzSmall], animTimeIn, {\n delay: 1,\n autoAlpha: 0,\n y: -animOffsetDist,\n ease: animTypeIn\n });\n TweenMax.from(headline1, animTimeIn, {\n delay: 1,\n autoAlpha: 0,\n y: animOffsetDist,\n ease: animTypeIn\n });\n TweenMax.from(mapMarker1, mapMarkerAnimTime, {\n delay: 2,\n autoAlpha: 0,\n scale: 0,\n ease: mapMarkerAnimType\n });\n\n TweenMax.from(expandButton, animTimeIn, {\n delay: 2,\n autoAlpha: 0,\n y: animOffsetDist,\n ease: animTypeIn\n });\n\n TweenMax.delayedCall(6, frame2);\n}", "loadAnimations() {\n for (var i = 0; i < 5; i++) { //Action State: 0-idle,1-walking,2-attacking,3-jumping,4-running\n this.animations.push([]);\n for (var j = 0; j < 2; j++) { //Direction State: 0-right, 1-left\n this.animations[i].push([]);\n for (var k = 0; k < 3; k++) { //Weapon State: 0-unequipped, 1-sword, 2-bow\n this.animations[i][j].push([]);\n }\n }\n }\n for (var h = 0; h < 3; h++) {\n this.deadAnimL.push([]);\n this.deadAnimR.push([]);\n }\n //idle animation for state 0\n // facing right\n this.animations[0][0][0] = new Animator(this.spritesheet, 35, 16, 65, 91, 12,\n 0.05, 125.05, false, true);\n\n // facing left\n this.animations[0][1][0] = new Animator(this.spritesheet, 30, 115, 75, 91, 12,\n 0.05, 115.05, true, true);\n\n //walking animation for state 1\n // facing right\n this.animations[1][0][0] = new Animator(this.spritesheet, 25, 218, 65, 91, 12,\n 0.05, 125.05, false, true);\n\n // facing left\n this.animations[1][1][0] = new Animator(this.spritesheet, 45, 322, 70, 91, 12,\n 0.05, 120.05, true, true);\n\n //attacking animation\n // facing right\n this.animations[2][0][0] = new Animator(this.spritesheet, 35, 630, 95, 91, 10,\n 0.038, 95.05, false, true);\n\n // facing left\n this.animations[2][1][0] = new Animator(this.spritesheet, 50, 735, 95, 91, 10,\n 0.038, 95.05, true, true);\n\n //jumping\n // facing right\n this.animations[3][0][0] = new Animator(this.spritesheet, 12, 1170, 90, 100, 1,\n .2, 100.05, false, true);\n //facing left\n this.animations[3][1][0] = new Animator(this.spritesheet, 20, 1270, 100, 100, 1,\n .2, 90.05, false, true);\n\n //running\n // facing right\n this.animations[4][0][0] = new Animator(this.spritesheet, 43, 415, 65, 91, 8,\n 0.07, 125.05, false, true);\n\n // facing left\n this.animations[4][1][0] = new Animator(this.spritesheet, 33, 520, 75, 91, 8,\n 0.05, 115.05, true, true);\n\n //death\n // facing right\n this.deadAnimR[0] = new Animator(this.spritesheet, 0, 860, 105, 120, 11,\n .07, 85.05, false, false);\n //facing left\n this.deadAnimL[0] = new Animator(this.spritesheet, 18, 1000, 105, 120, 11,\n .07, 85.05, true, false);\n\n //------------------------------for sword animations ---------------------------------\n\n //idle animation for state 0\n // facing right\n this.animations[0][0][1] = new Animator(this.spritesheetSword, 6, 16, 105, 91, 6,\n 0.09, 85.05, false, true);\n\n // facing left\n this.animations[0][1][1] = new Animator(this.spritesheetSword, 5, 115, 105, 91, 6,\n 0.09, 85.05, true, true);\n\n //walking animation for state 1\n // facing right\n this.animations[1][0][1] = new Animator(this.spritesheetSword, 25, 214, 105, 91, 10,\n 0.05, 85.05, false, true);\n\n // facing left\n this.animations[1][1][1] = new Animator(this.spritesheetSword, 10, 318, 105, 91, 12,\n 0.05, 85.05, true, true);\n\n //attacking animation\n // facing right\n this.animations[2][0][1] = new Animator(this.spritesheetSword, 18, 615, 155, 105, 10,\n 0.045, 35.05, false, true);\n\n // facing left\n this.animations[2][1][1] = new Animator(this.spritesheetSword, 0, 722, 155, 105, 10,\n 0.045, 35.05, true, true);\n\n //jumping\n // facing right\n this.animations[3][0][1] = new Animator(this.spritesheetSword, 12, 1155, 140, 100, 1,\n .2, 50.05, false, true);\n //facing left\n this.animations[3][1][1] = new Animator(this.spritesheetSword, 5, 1270, 140, 100, 1,\n .2, 50.05, false, true);\n\n //running\n // facing right\n this.animations[4][0][1] = new Animator(this.spritesheetSword, 43, 415, 105, 91, 8,\n 0.06, 85.05, false, true);\n\n // facing left\n this.animations[4][1][1] = new Animator(this.spritesheetSword, 0, 520, 105, 91, 8,\n 0.06, 85.05, true, true);\n\n //death\n // facing right\n this.deadAnimR[1] = new Animator(this.spritesheetSword, 0, 837, 115, 150, 12,\n .06, 75.05, false, false);\n //facing left\n this.deadAnimL[1] = new Animator(this.spritesheetSword, 50, 986, 125, 150, 9,\n .06, 65.05, true, false);\n\n this.swordEquipR = new Animator(this.spritesheetSword, 402, 1148, 105, 91, 7,\n .04, 85, false, false);\n this.swordEquipL = new Animator(this.spritesheetSword, 402, 1270, 105, 91, 7,\n .04, 85, true, false);\n\n\n //for bow animations ---------------------------------\n //idle animation for state 0\n // facing right\n this.animations[0][0][2] = new Animator(this.spritesheetBow, 2, 5, 85, 91, 6,\n 0.07, 105.05, false, true);\n\n // facing left\n this.animations[0][1][2] = new Animator(this.spritesheetBow, 8, 106, 75, 91, 6,\n 0.08, 115.05, true, true);\n\n //walking animation for state 1\n // facing right\n this.animations[1][0][2] = new Animator(this.spritesheetBow, 7, 216, 85, 91, 12,\n 0.05, 105.05, false, true);\n\n // facing left\n this.animations[1][1][2] = new Animator(this.spritesheetBow, 7, 320, 85, 91, 12,\n 0.05, 105.05, true, true);\n\n //attacking animation\n // facing right\n this.animations[2][0][2] = new Animator(this.spritesheetBow, 25, 630, 95, 91, 15,\n 0.05, 94.95, false, true);\n\n // facing left\n this.animations[2][1][2] = new Animator(this.spritesheetBow, 20, 743, 95, 91, 15,\n 0.05, 94.95, true, true);\n\n //jumping\n // facing right\n this.animations[3][0][2] = new Animator(this.spritesheetBow, 12, 1170, 100, 100, 1,\n .2, 90.05, false, true);\n //facing left\n this.animations[3][1][2] = new Animator(this.spritesheetBow, 20, 1270, 100, 100, 1,\n .2, 90.05, false, true);\n\n //running\n // facing right\n this.animations[4][0][2] = new Animator(this.spritesheetBow, 43, 420, 85, 91, 8,\n 0.07, 105.05, false, true);\n\n // facing left\n this.animations[4][1][2] = new Animator(this.spritesheetBow, 27, 525, 85, 91, 8,\n 0.05, 105.05, true, true);\n\n //death\n // facing right\n this.deadAnimR[2] = new Animator(this.spritesheetBow, 15, 845, 155, 135, 9,\n .07, 35.05, false, false);\n //facing left\n this.deadAnimL[2] = new Animator(this.spritesheetBow, 40, 1000, 155, 135, 9,\n .07, 35.05, true, false);\n\n\n }", "function animate() {\n\t\t\t\t\t\trequestAnimationFrame(animate);\n\t\t\t\t\t\tupdate();\n\t\t\t\t\t\trender();\n\t\t\t\t\t}", "preload() {\n this.anims.create({\n key: \"idle\", \n frameRate: 10, \n repeat: -1,\n frames: this.anims.generateFrameNumbers(\"IDLE\", {\n frames: [0,1]\n })\n });\n\n this.anims.create({\n key: \"idleLeft\", \n frameRate: 5, \n repeat: -1,\n frames: this.anims.generateFrameNumbers(\"IDLE\", {\n frames: [1,0]\n })\n });\n\n this.anims.create({\n key: \"runRight\", \n frameRate: 7, \n repeat: -1,\n frames: this.anims.generateFrameNumbers(\"IDLE\", {\n //frames: [2,3,4,5,6,7]\n frames: [0,1]\n })\n });\n \n this.anims.create({\n key: \"runLeft\", \n frameRate: 7, \n repeat: -1,\n frames: this.anims.generateFrameNumbers(\"RUN\", {\n frames: [7,6,5,4,3,2]\n })\n });\n\n this.anims.create({\n key: \"slash\", \n frameRate: 60, \n repeat: -1,\n frames: this.anims.generateFrameNumbers(\"SLASH\", {\n frames: [0,1,2,3,4,5,6,7,8]\n })\n });\n \n this.load.image(\"ground\", \"./assets/ground.png\");\n }", "if (m_bInitialAnim) { return; }", "function startAnimations(i) {\n\tsetInterval(function() {\n \tbetta = beta;\n \taalpha = alpha;\n \tanimateDiv(betta, aalpha, i);\n \t}, 1000);\n}", "restartAnimation() {\n for (var key in this.animations) {\n if (this.animations.hasOwnProperty(key)) {\n this.animations[key].setFinished(false);\n this.animations[key].reset();\n }\n }\n }", "run() {\n\t\tif(this.element.style.webkitAnimationPlayState !== 'running'){\n\t\t\tthis.element.style.webkitAnimationPlayState = 'running';\n\t\t\tthis.startTime = (new Date()).getTime();\n\t\t}\n\t}", "createAnimation() {\n this.scene.anims.create({\n key: 'bullet-hit',\n frames: this.scene.anims.generateFrameNumbers('bullet-hit', {\n start: 0,\n end: 10\n }),\n frameRate: FRAMERATE\n });\n }", "function animate() {\r\n\r\n\trequestAnimationFrame( animate );\r\n\trender();\r\n\r\n}", "handleAnimation() {\n Animated.timing(this.state.fadeAnim, {\n toValue: 1,\n duration: 1000,\n }).start();\n }", "function animate() {\n requestAnimationFrame( animate );\n render();\n}", "function doAnimate() {\n start = Date.now();\n do {\n if ((Date.now() - start) < 20000 && sunnySet == false) {\n setSceneSunny();\n sunnySet = true;\n console.log((Date.now() - start));\n }\n else if (((Date.now() - start) > 20000) && ((Date.now() - start) < 40000) && cloudSet == false) {\n cancelAnimationFrame( id );\n console.log((Date.now() - start));\n setSceneCloudy();\n cloudSet = true;\n }\n else if ((Date.now() - start) > 40000 && (Date.now() - start) < 60000 && rainSet == false) {\n cancelAnimationFrame( id );\n console.log((Date.now() - start));\n setSceneRain();\n rainSet = true;\n }\n else if ((Date.now() - start) > 60000 && (Date.now() - start) < 80000 && snowSet == false) {\n cancelAnimationFrame( id );\n console.log((Date.now() - start));\n setSceneSnow();\n snowSet = true;\n }\n else if ((Date.now() - start) > 80000 && (Date.now() - start) < 100000 && nightSet == false) {\n cancelAnimationFrame( id );\n console.log((Date.now() - start));\n setSceneNight();\n nightSet = true;\n }\n } while (playAnimationBool == true);\n }", "update() {\n this.animation.update()\n }", "handleAnimationOn(index) {\n //TODO: test adding text instead of animation on the same classes\n const animatedFrame = document.getElementsByClassName(\"itemOnTheList\");\n animatedFrame[index].classList.add('loadingAnimation');\n console.dir(animatedFrame[index]);\n this.setState({\n animationFrame: true\n })\n }", "async wait() {\n this.waitingAnimationFinish = true;\n await Utils.delay(1000);\n this.waitingAnimationFinish = false;\n }", "function addAnimator(animator) {\n animatorList.push(animator);\n if (animatorList.length === 1) {\n start();\n }\n }", "function addAnimator(animator) {\n animatorList.push(animator);\n if (animatorList.length === 1) {\n start();\n }\n }", "function animate() {\n requestAnimationFrame(animate);\n render();\n}", "function animate() {\n requestAnimationFrame(animate);\n render();\n}", "function addAnimation(){\n const Burst1 = new mojs.Burst ({\n parent: animationDiv,\n top: '50%',\n left: '50%', \n radius: {0: 80},\n count: 8,\n children: {\n shape: 'circle',\n fill: {'red':'blue'},\n strokeWidth: 1,\n duration: 600,\n stroke: {'red':'blue'}\n }\n });\n\n\n const Burst2 = new mojs.Burst ({\n parent: animationDiv,\n top: '50%',\n left: '50%', \n radius: {0: 100},\n count: 4,\n children: {\n shape: 'rect',\n fill: 'white',\n strokeWidth: 1,\n duration: 300,\n stroke: 'white'\n }\n });\n\n\n\n const circle1= new mojs.Shape ({\n radius: {0:40},\n parent: animationDiv,\n fill: 'none',\n stroke: 'white',\n strokeWidth:15,\n duration: 300,\n opacity: {1: 0}\n });\n\n const circle2= new mojs.Shape ({\n radius: {0:50},\n parent: animationDiv,\n fill: 'none',\n stroke: 'red',\n strokeWidth:5,\n duration: 400,\n opacity: {1: 0}\n });\n\n\n const circle3= new mojs.Shape ({\n radius: {0:60},\n parent: animationDiv,\n fill: 'none',\n stroke: 'blue',\n strokeWidth:5,\n duration: 500,\n opacity: {1: 0}\n });\n\n const circle4= new mojs.Shape ({\n radius: {0:70},\n parent: animationDiv,\n fill: 'white',\n \n stroke: 'white',\n strokeWidth:5,\n duration: 600,\n opacity: {1: 0}\n });\n\n const timeline = new mojs.Timeline ({\n \n repeat: 0\n }).add(circle4,circle1,circle2,circle3,Burst1,Burst2);\n\n timeline.play();\n}", "function animator() {\n var delay, speed;\n $('.animated').each(function() {\n var el = $(this);\n //console.log( elements[i] , i );\n if (el.visible(true)) {\n if (el.data('animtype') == 'animate-progress') {\n\n el.css('opacity', 1);\n el.addClass('animatedVisi');\n el.css('opacity', 1);\n el.css('width', el.attr('aria-valuenow'));\n //el.find('.progress .progress-bar').html(el.data('progress-to'));\n\n return;\n }\n\n delay = el.data('animdelay');\n if (!delay) {\n delay = 0;\n }\n\n el.css('-webkit-animation-delay', delay);\n el.css('-moz-animation-delay', delay);\n el.css('-o-animation-delay', delay);\n el.css('animation-delay', delay);\n\n speed = el.data('animspeed');\n\n if (!speed) {\n speed = 0.5;\n }\n\n el.css('-webkit-animation-duration', speed);\n el.css('-moz-animation-duration', speed);\n el.css('-o-animation-duration', speed);\n el.css('animation-duration', speed);\n\n if (el.data('animtype')) {\n el.addClass(el.data('animtype'));\n }\n\n el.addClass('animatedVisi');\n // que.push(this);\n }\n else if (el.data('animrepeat') == '1') {\n el.removeClass(el.data('animtype'));\n el.removeClass('animatedVisi');\n }\n });\n}", "function modalAnimation() {}", "function animate(){\r\n\t\t\t\r\n\t\t\tif (t == dur){\r\n\t\t\t\tif(cb) cb();\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\tanimate();\r\n\t\t\t},20)\r\n\t\t}", "initAnimations() {\n var idle = this.level.player.animations.add('idle', [0, 1, 2, 3], 5);\n var walk_left = this.level.player.animations.add('walk_left', [5, 6, 7, 8]);\n var walk_right = this.level.player.animations.add('walk_right', [10, 11, 12, 13]);\n var jump = this.level.player.animations.add('jump', [15, 16, 17, 18]);\n var attack_left = this.level.player.animations.add('attack_left', [20, 21, 22, 23, 24]);\n var attack_right = this.level.player.animations.add('attack_right', [25, 26, 27, 28, 29]);\n }", "function animateRestart() {\n animation1.restart();\n animation2.restart();\n animation3.restart();\n animation4.restart();\n}", "function animate(){\n\n\tanimateCloth();\n\trender();\n\trequestAnimationFrame( animate );\n\n\t\n}", "function animate() {\n oneStep();\n if( ! stopRequested ) {\n animationId = requestAnimationFrame(animate);\n }\n}", "function initScene() {\n animate();\n}", "function animate() {\n /*\n Apply animations\n */\n animator.execute();\n\n /*\n Update VR headset position and apply to camera.\n */\n controls.update();\n\n /*\n Render the scene through the VREffect.\n */\n effect.render( scene, camera );\n\n requestAnimationFrame( animate );\n}", "initAnimation() {\n\t\t// Create new AnimationMixer for clip playback\n\t\tthis.animMixer = new THREE.AnimationMixer( this.scene );\n\n\t\t// Create AnimationClips for each C4DLinkObject.\n\t\tthis.linkObjects.forEach( linkObject => {\n\t\t\tlinkObject.setLinkTargetFromScene( this.scene );\n\t\t\tlinkObject.setSourceClipFromClipArray( this.animClips );\n\n\t\t\tconst linkedClip = linkObject.getLinkedAnimationClip();\n\t\t\tif ( linkedClip ) this.animClips.push( linkedClip );\n\t\t});\n\n\t\t// Get the duration of the entire animation, which is the duration of the longest clip\n\t\tthis.animClips.forEach( clip => {\n\t\t\tthis.duration = Math.max( this.duration, clip.duration );\n\t\t});\n\n\t\t// Create AnimationActions for each clip\n\t\tthis.animActions = this.animClips.map( clip => {\n\t\t\treturn this.animMixer.clipAction( clip );\n\t\t});\n\n\t\t// Configure AnimationAction playback properties\n\t\tthis.animActions.forEach( action => {\n\t\t\taction.clampWhenFinished = true;\n\t\t\taction.loop = THREE.LoopOnce;\n\t\t\taction.play();\n\t\t});\n\n\t\t// Tick the mixer forward one frame, then reset immediately.\n\t\t// This ensures that the animation will pause at the first frame\n\t\t// until the play() function is called.\n\t\tthis.animMixer.update( 1 / 60 );\n\t\tthis.animMixer.stopAllAction();\n\t}", "async function displayAnimations(bars, index1, index2) {\r\n bars[index1].style.backgroundColor = 'red';\r\n bars[index2].style.backgroundColor = 'red';\r\n await new Promise(r => setTimeout(r, 20));\r\n bars[index1].style.backgroundColor = 'darkturquoise';\r\n bars[index2].style.backgroundColor = 'darkturquoise';\r\n}", "function animate() {\n // render\n controls.update();\n renderer.render(scene, camera);\n stats.update();\n\n // request new frame\n requestAnimationFrame(function() {\n animate();\n });\n }", "function animate() {\r\n if (!doAnim) {\r\n river.context=null; \r\n return;\r\n }\r\n\trequestAnimFrame( animate );\r\n river.background.draw();\r\n}", "function animateIt($elements) {\n $elements.each( function( i, el ) {\n\n var $el = $( el ),\n animationClass = $el.data( 'animation' );\n\n $el.addClass( animationClass );\n $el.addClass( 'animated' );\n $el.addClass( 'wait-animation' );\n\n $el.one( 'inview', function() {\n $el.removeClass( 'wait-animation' );\n $el.addClass( 'done-animation' );\n });\n });\n}", "function contentAnimation() {\n\n var tl = gsap.timeline();\n tl.from('.is-animated', { duration: 1, translateY: 60, opacity: 0, stagger: 0.4 });\n tl.from('.fadein', { duration: 0.5, opacity: 0.9 });\n}", "_createAnimatables() {\n // Create new animatables\n const oldAnimatables = [...this._babylonAnimatables];\n this._babylonAnimatables.length = 0;\n this._babylonAnimations.forEach(targetedAnimation => {\n const animatable = this._babylonScene.beginDirectAnimation(\n targetedAnimation.target,\n [targetedAnimation.animation],\n this._from,\n this._to,\n this._loopCount > 1,\n 0,\n this._onFinishedEvent,\n this._onLoopEvent,\n babylonBlendModes[this._blendMode]\n );\n animatable.weight = this._internalWeight;\n animatable.disposeOnEnd = false;\n this._babylonAnimatables.push(animatable);\n });\n\n // Dispose of the old animatables\n oldAnimatables.forEach(animatable => {\n animatable.stop();\n });\n }", "threeAnimate() {\n if (this._.updateTimerRunning) {\n requestAnimationFrame(this.threeAnimate);\n this.threeUpdate();\n this.threeRender();\n }\n }", "apply() {\n this.scene.multMatrix(this.animTransform);\n }", "function startAnimation() {\n waited += new Date().getTime() - stopTime\n stopAnim = false;\n Animation();\n}", "onTransitionEnd() {\n this.isInAnimation = false;\n // if any method in queue, then invoke it\n if (this.visualEffectQueue.length) {\n let action = this.visualEffectQueue.shift(); // remove method from queue and invoke it\n this.isInAnimation = action.isAnimated;\n action.action();\n }\n }", "function Animated() {\n this.payload = void 0;\n // This makes \"isAnimated\" return true.\n setAnimated(this, this);\n }", "function animate() {\n // render\n controls.update();\n renderer.render(scene, camera);\n stats.update();\n\n // request new frame\n requestAnimationFrame(function() {\n animate();\n });\n }", "function animate() {\n requestAnimationFrame(animate);\n renderer.render(stage);\n //checkHelp();\n}", "function loadAnims(){\n\tlog(\"load \" + animations.length + \" animations\");\t\n\tif(animations.length>0){\t\n\t\tyepnope([{\n\t\t\tload: animations,\n\t\t\tcallback: function (url, result, key) {\n\t\t\t\tprogress(\"loaded: \" + url);\n\t\t\t},\n\t\t\tcomplete: function(){\n\t\t\t\tlog(\"loading animations complete\"); \n\t\t\t\tstartNemoScript();\n\t\t\t}\n\t\t}]);\n\t}else{\n\t\tstartNemoScript();\n\t}\n}", "function animate() {\n\t\trequestAnimFrame(function(){\n animate();\n });\n\t\t\n\t\tplaceHover();\n\t\titemHover();\n\t\titemDrag();\n\t\t//$('#place').text(getSceneMembers(self.places));\n\t\t//$('#sticky').text(self.items);\n\t\t\n\t\t\n\n self.renderer.render(self.scene, self.camera);\n //self.controls.update(self.clock.getDelta());\n\t\t\n\t}", "function animate() {\n\t// render the 3D scene\n\trender();\n\t// relaunch the 'timer' \n\trequestAnimationFrame( animate );\n\t// update the stats\n\tstats.update();\n\t// update the tweens from TWEEN library\n\tTWEEN.update();\n}", "function addAnimations( FBXTree, connections, sceneGraph ) {\n \n sceneGraph.animations = [];\n \n var rawClips = parseAnimations( FBXTree, connections );\n \n if ( rawClips === undefined ) return;\n \n \n for ( var key in rawClips ) {\n \n var rawClip = rawClips[ key ];\n \n var clip = addClip( rawClip );\n \n sceneGraph.animations.push( clip );\n \n }\n \n }", "async restartAnimation() {\n await this.updateComplete;\n this.animationReady = false;\n await new Promise(requestAnimationFrame);\n this.animationReady = true;\n await this.updateComplete;\n }" ]
[ "0.72297084", "0.7172655", "0.6751781", "0.6701827", "0.66490537", "0.6644208", "0.66413045", "0.65767395", "0.6515558", "0.64943016", "0.64906734", "0.6407048", "0.6392758", "0.6383256", "0.63779354", "0.6373179", "0.63684577", "0.6353303", "0.63494754", "0.6331653", "0.6321073", "0.6315538", "0.6282902", "0.6262608", "0.62574196", "0.62490225", "0.62280315", "0.6222707", "0.62167084", "0.62161696", "0.62084895", "0.6207879", "0.6206824", "0.6199034", "0.6194853", "0.619034", "0.61874485", "0.61785597", "0.61779857", "0.61779857", "0.6172958", "0.6171962", "0.61671996", "0.61594796", "0.6155247", "0.61547256", "0.61522853", "0.61488783", "0.6142057", "0.61394465", "0.61344063", "0.6130749", "0.61243993", "0.6122645", "0.6120578", "0.6110278", "0.6106307", "0.6104745", "0.6104236", "0.60944784", "0.60934347", "0.6092567", "0.6089591", "0.6080137", "0.6053206", "0.6052352", "0.60479707", "0.6041109", "0.60391325", "0.60391325", "0.60361475", "0.60361475", "0.60337025", "0.6032074", "0.6029653", "0.6027071", "0.6025721", "0.6025113", "0.6023653", "0.60118324", "0.5998302", "0.599733", "0.59961855", "0.5988569", "0.59863454", "0.5982124", "0.5977584", "0.5976191", "0.5970291", "0.59691375", "0.59681934", "0.59492475", "0.594515", "0.5942073", "0.5940745", "0.5933432", "0.59323984", "0.5926493", "0.5920844", "0.59197015", "0.5913969" ]
0.0
-1
Generate parameters to create a standard animation
function genFx( type, includeWidth ) { var which, i = 0, attrs = { height: type }; // If we include width, step value is 1 to do all cssExpand values, // otherwise step value is 2 to skip over Left and Right includeWidth = includeWidth ? 1 : 0; for ( ; i < 4; i += 2 - includeWidth ) { which = cssExpand[ i ]; attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; } if ( includeWidth ) { attrs.opacity = attrs.width = type; } return attrs; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setParameters() {\n params.viscosity = 0.02;\n params.u0 = -amplitude;\n params.one36th = 1 / 36;\n params.one9th = 1 / 9;\n params.four9ths = 4 / 9;\n params.gridSize = 5;\n params.m = int(height / params.gridSize);\n params.n = int(width / params.gridSize);\n}", "function generateAnimationParams(animation) {\n const timeReg = /^(\\d+)?(\\.)?\\d+m?s$/i\n const loopReg = /^(\\d|infinite|forwards|steps\\(\\d+\\))$/i\n const timeConvert = n => parseFloat(n) * (/ms$/.test(n) ? 1 : 1e3)\n\n if (!animation) {\n return []\n }\n\n return animation\n .replace(/to\\((.*?)\\)/g, (_, $1) => `to(${$1.replace(/\\s*,\\s*/g, '__SPLIT__')})`)\n .split(',')\n .filter(item => !!item)\n .map(raw => {\n const params = raw.trim().replace(/\\s+/g, ' ').split(' ')\n return params.reduce(\n (ret, str) => {\n // the first parameter should be `aniName`\n if (ret.__aniName === undefined) {\n return { ...ret, __aniName: str }\n }\n // if the parameter satisfies time, it may be `duration` or `delay`\n if (timeReg.test(str)) {\n const type = ret.duration === undefined ? 'duration' : 'delay'\n return { ...ret, [type]: timeConvert(str) }\n }\n // it the parameter satisfies loop properties\n if (ret.duration !== undefined && loopReg.test(str)) {\n return { ...ret, loop: convertValue(str) }\n }\n // otherwise it may be easing name or bezier\n return { ...ret, easing: str }\n },\n {}\n )\n })\n}", "_getAnimationText() {\n const strokeCircumference = this._getStrokeCircumference();\n return INDETERMINATE_ANIMATION_TEMPLATE\n // Animation should begin at 5% and end at 80%\n .replace(/START_VALUE/g, `${0.95 * strokeCircumference}`)\n .replace(/END_VALUE/g, `${0.2 * strokeCircumference}`)\n .replace(/DIAMETER/g, `${this._spinnerAnimationLabel}`);\n }", "function generateAnim(type, size)\n{\n animObj['type'] = type;\n animObj['size'] = size;\n animObj['red'] = paintColor[0];\n animObj['green'] = paintColor[1];\n animObj['blue'] = paintColor[2];\n}", "animation() {}", "function build(){\n\n if ( parseInt( cfg.move ) !== 0 ){\n initial += ' translate' + cfg.axis + '(' + cfg.move + ')';\n target += ' translate' + cfg.axis + '(0)';\n }\n\n if ( parseInt( cfg.scale.power ) !== 0 ){\n\n if ( cfg.scale.direction === 'up' ){\n cfg.scale.value = 1 - ( parseFloat( cfg.scale.power ) * 0.01 );\n } else if ( cfg.scale.direction === 'down' ){\n cfg.scale.value = 1 + ( parseFloat( cfg.scale.power ) * 0.01 );\n }\n\n initial += ' scale(' + cfg.scale.value + ')';\n target += ' scale(1)';\n }\n\n if ( cfg.rotate.x ){\n initial += ' rotateX(' + cfg.rotate.x + ')';\n target += ' rotateX(0)';\n }\n\n if ( cfg.rotate.y ){\n initial += ' rotateY(' + cfg.rotate.y + ')';\n target += ' rotateY(0)';\n }\n\n if ( cfg.rotate.z ){\n initial += ' rotateZ(' + cfg.rotate.z + ')';\n target += ' rotateZ(0)';\n }\n\n initial += '; opacity: ' + cfg.opacity + '; ';\n target += '; opacity: 1; ';\n }", "function initAnimation() {\n}", "function AnimationParser() {}", "function AnimationStaggerMetadata() { }", "function AnimationStaggerMetadata() { }", "createSpriteAnimations() {\n const haloFrames = this.anims.generateFrameNames('haloHit', { \n start: 1, end: 84, zeroPad: 5,\n prefix: 'Halo_' , suffix: '.png'\n });\n\n this.anims.create({ key: 'haloHit', frames: haloFrames, frameRate: 60, repeat: 0 });\n\n const sparkFrames = this.anims.generateFrameNames('sparkHit', { \n start: 1, end: 84, zeroPad: 5,\n prefix: 'Spark_' , suffix: '.png'\n });\n\n this.anims.create({ key: 'sparkHit', frames: sparkFrames, frameRate: 60, repeat: -1 });\n }", "createanims(){\n Object.keys(this.mp()).forEach(key=>{\n let config = [\n {\n key: `${key}stand`,\n frames: this.anims.generateFrameNames('players', {\n start: 1,\n end: 1,\n prefix: `${this.mp()[key]}/`\n }),\n frameRate: 8,\n repeat: -1\n },\n {\n key: `${key}down`,\n frames: this.anims.generateFrameNames('players', {\n start: 0,\n end: 2,\n frames: [1,2,1,0],\n prefix: `${this.mp()[key]}/`\n }),\n frameRate: 8,\n repeat: -1,\n },\n {\n key: `${key}up`,\n frames: this.anims.generateFrameNames('players', {\n start: 3,\n end: 5,\n frames: [4,5,4,3],\n prefix: `${this.mp()[key]}/`\n }),\n frameRate: 8,\n repeat: -1\n },\n {\n key: `${key}left`,\n frames: this.anims.generateFrameNames('players', {\n start: 6,\n end: 8,\n frames: [7,8,7,6],\n prefix: `${this.mp()[key]}/`\n }),\n frameRate: 8,\n repeat: -1\n },\n {\n key: `${key}attack`,\n frames: this.anims.generateFrameNames('players', {\n start: 9,\n end: 10,\n prefix: `${this.mp()[key]}/`\n }),\n frameRate: 2,\n repeat: 0\n },\n {\n key: `${key}idle`,\n frames: this.anims.generateFrameNames('players', {\n start: 35,\n end: 37,\n frames: [36,37,36,35],\n prefix: `${this.mp()[key]}/`\n }),\n frameRate: 4,\n repeat: -1\n },\n {\n key: `${key}hurt`,\n frames: this.anims.generateFrameNames('players', {\n start: 11,\n end: 11,\n prefix: `${this.mp()[key]}/`\n }),\n frameRate: 4,\n repeat: 0\n },\n ];\n config.forEach(anim=> this.anims.create(anim));\n })\n }", "function shapeSettings(){\n rectMode(CENTER);\n noStroke();\n waveWidth = width;\n increment = (TWO_PI / period) * xSpacing;\n periodYValues = new Array( floor(waveWidth / xSpacing) );\n}", "function ParameterReader (parametersList) {\n\n return getAnimationInfo ();\n\n function getAnimationInfo () {\n var animationsInfo = [];\n for (var i = 0; i < parametersList.length; i++) {\n animationsInfo.push (readParameters(parametersList[i]));\n }\n return animationsInfo;\n };\n\n function readParameters (parameters = {}){\n var columns, rows, animation, depth, primaryImage, secondaryImage, transition, start, end, colorType, colorValue, opacity;\n var dimensions, color;\n\n rows = parameters.rows || 10;\n columns = parameters.columns || 10;\n animation = parameters.animation || \"scroll\";\n depth = parameters.depth || 1;\n primaryImage = parameters.image || parameters.primaryImage || './images/picasso.jpg';\n secondaryImage = parameters.secondaryImage || './images/picasso.jpg';\n transition = parameters.transition || 'exit';\n start = parameters.start || 0;\n end = parameters.end || 10;\n colorType = parameters.colorType || \"rainbow\";\n colorValue = parameters.colorValue || \"blue\";\n opacity = parameters.opacity || 1;\n\n dimensions = {\n rows: rows,\n columns: columns\n };\n\n color = {\n type: colorType,\n value: colorValue,\n opacity: opacity\n };\n\n if (isSideAnimation(animation)) {\n depth = 1;\n }\n\n return {\n dimensions,\n primaryImage,\n secondaryImage,\n animation,\n depth,\n transition,\n start,\n end,\n color,\n };\n };\n\n function isSideAnimation(animation) {\n return animation == \"slideshow\" ||\n animation == \"spiral\";\n };\n}", "function generatePathFrameParameters() {\n var path_sizes = [20, 50, 200, 300, 400];\n var quantities = [10, 20, 50, 100, 500, 1000, 2000];\n var shadow_blurs = [0, 1, 10, 20];\n\n // Only draw combinations that contain shadows with this probability\n // to reduce the number of permutations.\n var shadowedPermutationProbability = 0.1;\n\n var list_of_frame_parameters = [];\n\n for (shape_type in SHAPE_TYPE) {\n for (var size_i = 0; size_i < path_sizes.length; size_i++) {\n for (var qty_i = 0; qty_i < quantities.length; qty_i++) {\n for (var sh_i = 0; sh_i < shadow_blurs.length; sh_i++) {\n for (fill_style in SHAPE_STYLE) {\n if (shadow_blurs[sh_i] == 0\n || getTrueWithProbability(shadowedPermutationProbability)) {\n\n list_of_frame_parameters.push([\n new DrawParameter(CALL_TYPE.PATH, shape_type,\n path_sizes[size_i], shadow_blurs[sh_i],\n quantities[qty_i], fill_style)]);\n }\n }\n }\n }\n }\n }\n return list_of_frame_parameters;\n}", "function createFxNow(){window.setTimeout(function(){fxNow=undefined;});return fxNow=jQuery.now();}// Generate parameters to create a standard animation", "function getParameters(mode_num){\n\t\tswitch(android_interpolator.interpolatorTypesAry[mode_num].name) {\n\t\t\tcase \"CustomSpring\":\n\t\t\t\tprefixParameters = 'var factor = '+factor1.toString()+'; \\n';\n\t\t\t\tbreak;\n\t\t\tcase \"CustomBounce\":\n\t\t\t\tprefixParameters = 'var mTension = '+factor1.toString()+';\\nvar mFriction = '+factor2.toString()+';\\n';\n\t\t\t\tbreak;\n\t\t\tcase \"CustomDamping\":\n\t\t\t\tprefixParameters = 'var mTension = '+factor1.toString()+';\\nvar mFriction = '+factor2.toString()+';\\n';\n\t\t\t\tbreak;\n\t\t\tcase \"CustomMocosSpring\":\n\t\t\t\tprefixParameters = 'var tension = '+factor1.toString()+';\\nvar damping = '+factor2.toString()+';\\nvar v0 = '+factor3.toString()+';\\n';\n\t\t\t\tbreak;\n\t\t\tcase \"AndroidSpring\":\n\t\t\t\tprefixParameters = 'var mStiffness = '+factor1.toString()+';\\nvar mDampingRatio = '+factor2.toString()+';\\nvar mVelocity = '+factor3.toString()+';\\n';\n\t\t\t\tbreak;\n\t\t\tcase \"AndroidFling\":\n\t\t\t\tprefixParameters = 'var mStartVelocity = '+factor1.toString()+';\\nvar mDampingRatio = '+factor2.toString()+';\\n';\n\t\t\t\tbreak;\n\t\t\tcase \"Origami_POP_Spring\":\n\t\t\t\tOrigamiSpringConverter(factor1,factor2);\n\t\t\t\tprefixParameters = 'var mStiffness = '+ mStiffness.toString() +';\\nvar mDampingRatio = '+ mDampingRatio.toString() +';\\nvar mVelocity = 0;\\n';\n\t\t\t\tbreak;\n\t\t\tcase \"Framer_RK4_Spring\":\n\t\t\t\tFramerRK4Converter(factor1,factor2);\n\t\t\t\tprefixParameters = 'var mStiffness = '+ mStiffness.toString() +';\\nvar mDampingRatio = '+ mDampingRatio.toString() +';\\nvar mVelocity = 0;\\n';\n\t\t\t\tbreak;\n\t\t\tcase \"Framer_DHO_Spring\":\n\t\t\t\tFramerDHOConverter(factor1,factor2,factor3,factor4);\n\t\t\t\tprefixParameters = 'var mStiffness = '+ mStiffness.toString() +';\\nvar mDampingRatio = '+ mDampingRatio.toString() +';\\nvar mVelocity = ' + factor4.toString() +';\\n';\n\t\t\t\tbreak;\n\t\t\tcase \"CASpringAnimation\":\n\t\t\t\tFramerDHOConverter(factor1,factor2,factor3,factor4);\n\t\t\t\tprefixParameters = 'var mStiffness = '+ mStiffness.toString() +';\\nvar mDampingRatio = '+ mDampingRatio.toString() +';\\nvar mVelocity =' + factor4.toString() +';\\n';\n\t\t\t\tbreak;\n\t\t\tcase \"UIViewSpringAnimation\":\n\t\t\t\tUIViewSpringConverter(factor1,factor2);\n\t\t\t\tprefixParameters = 'var mStiffness = '+ mStiffness.toString() +';\\nvar mDampingRatio = '+ mDampingRatio.toString() +';\\nvar mVelocity = 0;\\n';\n\t\t\t\tbreak;\n\t\t\tcase \"Protopie_Spring\":\n\t\t\t\tFramerRK4Converter(factor1,factor2);\n\t\t\t\tprefixParameters = 'var mStiffness = '+ mStiffness.toString() +';\\nvar mDampingRatio = '+ mDampingRatio.toString()+ ';\\nvar mVelocity = 0;\\n';\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tdefault:\n\t\t\t\tif(android_interpolator.interpolatorTypesAry[mode_num].defaultPara == null){\n\t\t\t\t\tprefixParameters = '';\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tprefixParameters = 'var factor = '+factor1.toString()+';\\n';\n\t\t\t\t}\n\n\t\t}\n\t}", "function generate_trial_parameters(A_l, process_init, process_noise, observ_noise, observ_scale) {\n var duration = truncated_geometric(p, t_max - t_min) + t_min;;\n var x = sample_lds_states(A_l, process_init, process_noise, duration);\n var z = make_observations(x, observ_noise, observ_scale);\n \n // convert the sampled values to pixel space and present in usable format\n var posX = [];\n var posY = [];\n for (var ii=0; ii < z.length; ii ++){ \n posX.push(z[ii][0] + 350/2);\n posY.push(z[ii][1] + 350/2);\n }\n return {posX : posX, posY: posY, color_sequence: palette('tol', t_max + 1)}\n }", "addAnimations() {\n\n // eyes animations (moving eyes of the inspector)\n let frameRate = 50; // frame rate of the animation\n\n // from mid to right\n this.anims.create({\n key: 'midToRight',\n frames: this.anims.generateFrameNames('eyes', {frames: [0, 1, 2, 3, 4, 5]}),\n frameRate: frameRate,\n paused: true\n });\n\n // from right to mid\n this.anims.create({\n key: 'rightToMid',\n frames: this.anims.generateFrameNames('eyes', {frames: [5, 4, 3, 2, 1, 0]}),\n frameRate: frameRate,\n paused: true\n });\n\n // from mid to left\n this.anims.create({\n key: 'midToLeft',\n frames: this.anims.generateFrameNames('eyes', {frames: [0, 6, 7, 8, 9, 10]}),\n frameRate: frameRate,\n paused: true\n });\n\n // from left to mid\n this.anims.create({\n key: 'leftToMid',\n frames: this.anims.generateFrameNames('eyes', {frames: [10, 9, 8, 7, 6, 0]}),\n frameRate: frameRate,\n paused: true\n });\n\n // from left to right\n this.anims.create({\n key: 'leftToRight',\n frames: this.anims.generateFrameNames('eyes', {frames: [10, 9, 8, 7, 6, 0, 1, 2, 3, 4, 5]}),\n frameRate: frameRate,\n paused: true\n });\n\n // from right to left\n this.anims.create({\n key: 'rightToLeft',\n frames: this.anims.generateFrameNames('eyes', {frames: [5, 4, 3, 2, 1, 0, 6, 7, 8, 9, 10]}),\n frameRate: frameRate,\n paused: true\n });\n\n }", "function ANIMATE($anim) {\n var that = this, an = {}, myData = {}, styleCur = {}, isOverflowOnNode;\n /**\n * FUNCTION CLASS\n */\n /**\n * CHECK & INITIALIZATION ANIMATION\n */\n function Init() {\n /**\n * SETUP VARIABLE AT FIRST\n */\n an.rubyID = DB.GetRubyID($anim);\n myData = that.data = vData[an.rubyID];\n // Setup initialization timer of object\n if (myData.tsInit == UNDE)\n myData.tsInit = VA.tsCur;\n // Properties & options of object\n var prop = myData.prop, opts = myData.opts;\n an.propEnd = prop[prop.length - 1];\n an.optsEnd = opts[opts.length - 1];\n /**\n * SETUP AFTER START ANIMATION\n */\n SetupStyleBegin();\n Start();\n }\n /**\n * SETUP VALUE OF STYLE & TRANSFORM AT FIRST\n */\n function SetupStyleBegin() {\n // Setup properties of normal Style\n StyleBegin();\n // Setup properties of transform CSS\n TransformBegin();\n }\n /**\n * SETUP VALUE OF STYLE AT FIRST\n */\n function StyleBegin() {\n var styleBegin = an.optsEnd.styleBegin, styleEnd = an.optsEnd.styleEnd, opts = myData.opts, isAnimMulti = opts.length > 1;\n /**\n * LOOP TO SETUP VALUE NOT BE TRANSFORM CSS\n */\n for (var name in an.propEnd) {\n if ($.inArray(name, VA.nameTf) === -1) {\n /**\n * SETUP STYLE END\n * + Parse & convert value of StyleEnd\n */\n var valueCur = an['propEnd'][name];\n styleEnd[name] = M.ParseCssStyle(valueCur);\n /**\n * SETUP STYLE BEGIN\n */\n // Case: name of properties have fixed value -> inherit value of tfEnd\n if ($.inArray(name, VA.propFixed) !== -1) {\n styleBegin[name] = styleEnd[name];\n }\n else {\n // Parse & convert value of StyleBegin\n valueCur = $anim.css(name);\n styleBegin[name] = M.ParseCssStyle(valueCur);\n }\n }\n }\n // Inherit StyleEnd of animation before\n if (isAnimMulti)\n styleBegin = $.extend(styleBegin, opts[opts.length - 2]['styleEnd']);\n // Inherit properties of CSS Style 'point' have setup before\n if (myData.cssStyle !== null) {\n styleBegin = $.extend(true, styleBegin, myData.cssStyle);\n // Remove properties CSS Style after inherit\n myData.cssStyle = null;\n }\n /**\n * SETUP INHERIT PROPERTIES OF STYLE-END FROM STYLE-BEGIN\n */\n for (var name in styleBegin) {\n if (styleEnd[name] === UNDE) {\n styleEnd[name] = styleBegin[name];\n }\n }\n }\n /**\n * SETUP VALUE OF TRANSFORM AT FIRST\n */\n function TransformBegin() {\n var opts = myData.opts;\n /**\n * GET TRANSFORM OF OBJECT AT FIRST\n */\n // Case: have many continuous animation\n var tfBegin;\n if (opts.length > 1) {\n // Get Transform-begin from Transform-end before\n tfBegin = $.extend({}, opts[opts.length - 2]['tfEnd']);\n }\n else {\n tfBegin = myData.tfCur;\n if (tfBegin == UNDE) {\n var matrixBegin = MATRIX.getFromItem($anim);\n /**\n * PARSE MATRIX TO INITIAL PROPERTIES\n */\n tfBegin = MATRIX.parse(matrixBegin);\n }\n }\n // Inherit the properties CSS Transform 'point' have setup before\n if (myData.cssTf !== null) {\n tfBegin = $.extend(true, tfBegin, myData.cssTf);\n // Remove CSS Transform property after inherit\n myData.cssTf = null;\n }\n /**\n * GET TRANSFORM-END FROM SETUP PROPERTIES\n */\n var tfEnd = TF.FromProp(an.propEnd);\n /**\n * SETUP TRANSFORM INHERIT FROM PROPERTIES BEFORE\n */\n // Inherit 'tfBegin' properties but 'tfEnd' does not have, order of Transform depends on options\n tfEnd = TF.Extend(tfBegin, tfEnd, an.optsEnd);\n var tfDefault = VA.tfDefault;\n for (var name in tfEnd) {\n /**\n * ADDITIONAL PROPERTIES WITH TRANSFORM-BEGIN\n */\n if (tfBegin[name] === UNDE) {\n // Case: value of properties !== default value\n if (tfEnd[name] != tfDefault[name]) {\n // Case: name of property has fixed value -> inherit value from 'tfEnd'\n if ($.inArray(name, VA.propFixed) !== -1)\n tfBegin[name] = tfEnd[name];\n else\n tfBegin[name] = tfDefault[name];\n }\n else {\n delete tfEnd[name];\n }\n }\n /**\n * REMOVE PROPERTIES ON TRANSFORM BEGIN - END SIMILAR TO DEFAULT PROPERTIES\n */\n if (tfBegin[name] == tfDefault[name] && tfEnd[name] == tfDefault[name]) {\n delete tfBegin[name];\n delete tfEnd[name];\n }\n }\n an.optsEnd.tfBegin = tfBegin;\n an.optsEnd.tfEnd = tfEnd;\n }\n /**\n * SETUP VALUE WHEN BEGIN ANIMATION\n */\n function Start() {\n /**\n * INSERT STYLE 'OVERFLOW' AT FIRST: FIXED FOR OLD BROWSER\n */\n var style = $anim.attr('style');\n isOverflowOnNode = style && style.indexOf('overflow') !== -1;\n // Unavailable\n // !isOverflowOnNode && $anim.css('overflow', 'hidden');\n /**\n * EXECUTE FUNCTION 'START' AT FIRST\n */\n !!an.optsEnd.start && an.optsEnd.start();\n }\n /**\n * SETUP NEXT VALUE OF OBJECT, CALL FUNCTION FROM 'TWEEN'\n * @param boolean isForceAnim Allways setup style for object\n */\n that.next = function (isForceAnim) {\n /**\n * SETUP CURRENT TIME\n * @param Int an.xCur Current time, in range [0, 1]\n * @param Boolean isAnimate Check setup current animation\n */\n var opts = myData.opts, isAnimate = false, isComplete = false, tCur = myData.tCur = VA.tsCur - myData.tsInit;\n for (var i = 0, len = opts.length; i < len; i++) {\n var optsCur = opts[i];\n // Case: tCur at the forward position the first Aniamtion\n if (tCur < optsCur.tPlay && i == 0) {\n // Case: allways setup Style of object\n if (isForceAnim) {\n an.optsPos = i;\n an.xCur = 0;\n }\n else\n an.xCur = null;\n break;\n }\n else if (tCur > optsCur.tEnd && i == len - 1) {\n an.optsPos = i;\n an.xCur = 1;\n isComplete = true;\n break;\n }\n else if (optsCur.tPlay <= tCur && tCur <= optsCur.tEnd) {\n an.optsPos = i;\n an.xCur = $.GSGDEasing[optsCur.easing](null, tCur - optsCur.tPlay, 0, 1, optsCur.duration);\n isAnimate = true;\n break;\n }\n else if (!!opts[i + 1] && optsCur.tEnd < tCur && tCur < opts[i + 1].tPlay) {\n an.optsPos = i;\n an.xCur = 1;\n break;\n }\n }\n /**\n * SETUP VALUE OF CURRENT STYLE ON OBJECT\n */\n if (an.xCur !== null && opts.length) {\n // First, reset size of Item\n GetSizeItem();\n // Reset variable 'styleCur'\n styleCur = {};\n // Setup current Style value of the object\n StyleNormalCur();\n StyleTransformCur();\n $anim.css(styleCur);\n }\n /**\n * EXECUTE OPTION 'COMPLETE'\n */\n if (isComplete) {\n var optsCur = opts[an.optsPos];\n !!optsCur.complete && optsCur.complete();\n }\n /**\n * Return value check have Animation\n */\n return isAnimate;\n };\n /**\n * CONVERT VALUE HAS OTHER UNIT TO 'PX'\n * + Support convert '%' to 'px'\n */\n function ConvertValue(name, valueCur) {\n /*\n * CASE: STRING\n */\n if (typeof valueCur == 'string') {\n /**\n * CASE: UNIT IS 'PX'\n */\n if (/px$/.test(valueCur)) {\n valueCur = parseFloat(valueCur);\n }\n else if (/\\%$/.test(valueCur)) {\n // Name of property exist in conversion system\n var nameSizeFn = VA.percentRef[name];\n if (nameSizeFn !== UNDE) {\n var sizeCur = an['size'][nameSizeFn];\n valueCur = sizeCur * parseFloat(valueCur) / 100;\n }\n }\n }\n /**\n * RETURN VALUE AFTER SETUP\n */\n return valueCur;\n }\n /**\n * GET SIZE OF ITEM IN CURRENT TIME\n */\n function GetSizeItem() {\n an.size = {\n 'OuterWidth': M.OuterWidth($anim),\n 'OuterHeight': M.OuterHeight($anim)\n };\n }\n /**\n * SETUP VALUE PLUS DEPENDS ON PROPERTY NAME\n */\n function ValueCurForNumber(name, valueBegin, valueEnd) {\n var nameToFloat = ['opacity'], plus = (valueEnd - valueBegin) * an.xCur;\n // Case: rounded number float\n if ($.inArray(name, nameToFloat) !== -1) {\n plus = Math.round(plus * 1000) / 1000;\n }\n else {\n /**\n * ADDITIONAL 1 FRACTION : ANIMATE SMOOTHER\n */\n plus = Math.round(plus * 10) / 10;\n }\n return valueBegin + plus;\n }\n /**\n * SETUP VALUE OF PROPERTY IS ARRAY[]\n */\n function ValueCurForArray(name, valueBegin, valueEnd) {\n var aValue = [];\n /**\n * SETUP EACH VALUE IN ARRAY[]\n * + Remove element >= 2 : Browser not support Transform 3D\n */\n for (var i = 0, len = valueEnd.length; i < len && !(i >= 2 && !VA.isTf3D); i++) {\n /**\n * CONVERT VALUE BEGIN - END\n */\n var vaEndCur = ConvertValue(name + i, valueEnd[i]), vaBeginCur = ConvertValue(name + i, valueBegin[i]);\n // Case: value 'begin' not exist\n if (vaBeginCur === UNDE)\n vaBeginCur = vaEndCur;\n /**\n * SETUP CURRENT VALUE + STORE IN ARRAY[]\n */\n var plus = (vaEndCur - vaBeginCur) * an.xCur, valueCur = Math.round((vaBeginCur + plus) * 10) / 10;\n aValue.push(valueCur + 'px');\n }\n /**\n * CONVERT ARRAY TO STRING\n */\n return aValue.join(' ');\n }\n /**\n * SETUP NORMAL PROPERTIES AT THE CURRENT TIME\n */\n function StyleNormalCur() {\n var optsCur = myData['opts'][an.optsPos];\n for (var name in optsCur['styleBegin']) {\n var valueBegin = optsCur['styleBegin'][name], valueEnd = optsCur['styleEnd'][name], valueCur;\n /**\n * CASE: PROPERTY HAS VALUE IS ARRAY[]\n */\n if ($.isArray(valueBegin)) {\n valueCur = ValueCurForArray(name, valueBegin, valueEnd);\n }\n else {\n // Convert value String to Number (if posible)\n valueBegin = ConvertValue(name, valueBegin);\n valueEnd = ConvertValue(name, valueEnd);\n // Case: value of property is Number\n if ($.isNumeric(valueBegin) && $.isNumeric(valueEnd)) {\n valueCur = ValueCurForNumber(name, valueBegin, valueEnd);\n }\n else {\n valueCur = valueBegin;\n }\n }\n /**\n * REMOVE STYLES HAVE DEFAULT VALUE\n */\n if (optsCur.isClearStyleDefault && VA['styleDefault'][name] === valueCur) {\n valueCur = '';\n }\n /**\n * STORE VALUE OF CURRENT PROPERTY\n */\n styleCur[name] = valueCur;\n }\n }\n /**\n * SETUP 'TRANSFORM' IN CURRENT TIME\n */\n function StyleTransformCur() {\n /**\n * SETUP CURRENT VALUE EACH TRANSFORM PROPERTIES\n */\n var optsCur = myData['opts'][an.optsPos], tfBegin = optsCur.tfBegin, tfEnd = optsCur.tfEnd, tfCur = {};\n for (var name in tfEnd) {\n // Setup value 'plus' of each properties\n var tfBeginCur = TF.ConvertValueToPX($anim, name, tfBegin[name]), tfEndCur = TF.ConvertValueToPX($anim, name, tfEnd[name]), valuePlus = (tfEndCur - tfBeginCur) * an.xCur, valueCur = tfBeginCur + valuePlus;\n // Value of current property\n tfCur[name] = valueCur;\n }\n /**\n * CONVERT PARTICULAR PROPERTY OF TRANSFORM TO CSS\n */\n var cssTf = TF.ToCss(tfCur, optsCur);\n /**\n * STORE CURRENT TRANSFORM CSS\n */\n var nameTf = VA.prefix + 'transform';\n styleCur[nameTf] = cssTf;\n // Store current Transform into system\n myData.tfCur = tfCur;\n }\n // Initialize Animation\n Init();\n }", "constructor(spacing, width, theta, amplitude, period) {\n this.spacing = 2;\n this.size = 20;\n this.width = 800;\n this.theta = 0;\n this.amplitude = 175;\n this.period = 600;\n this.objs = [];\n }", "function AnimationMetadata() { }", "function AnimationMetadata() { }", "function Legato_Animation( element, run_time )\r\n{\r\n\r\n\t// Store the values.\r\n\tthis.element = $( element );\r\n\tthis.element_properties = Object();\r\n\tthis.run_time = run_time;\r\n\tthis.controller = new Legato_Animation_Controller();\r\n\r\n\tthis.onStart = null;\r\n\tthis.onInterval = null;\r\n\tthis.onAdvance = null;\r\n\tthis.onEventFrame = null;\r\n\tthis.onStop = null;\r\n\tthis.onFinish = null;\r\n\r\n\t// These values are used by the Legato_Animation system internally.\r\n\tthis.status = false;\r\n\tthis.event_frames = new Array();\r\n\r\n\tthis.start_time = null;\r\n\tthis.current_time = null;\r\n\r\n\tthis.begin_width = null;\r\n\tthis.begin_height = null;\r\n\tthis.begin_pos = null;\r\n\tthis.begin_back_color = null;\r\n\tthis.begin_border_color = null;\r\n\tthis.begin_text_color = null;\r\n\tthis.begin_opacity = null;\r\n\r\n\tthis.offset_width = null;\r\n\tthis.offset_height = null;\r\n\tthis.offset_pos = new Legato_Structure_Point();\r\n\tthis.offset_back_color = new Legato_Structure_Color();\r\n\tthis.offset_border_color = new Legato_Structure_Color();\r\n\tthis.offset_text_color = new Legato_Structure_Color();\r\n\tthis.offset_opacity = null;\r\n\r\n\tthis.desired_width = null;\r\n\tthis.desired_height = null;\r\n\tthis.desired_pos = new Legato_Structure_Point();\r\n\tthis.desired_back_color = null;\r\n\tthis.desired_border_color = null;\r\n\tthis.desired_text_color = null;\r\n\tthis.desired_opacity = null;\r\n\r\n}", "create() {\n this.hero = this.matter.add.sprite(this.game.config.width / 2, this.game.config.height / 2, 'hero');\n this.hero.depth = 1200;\n\n this.matter.world.setBounds(0, 0, game.config.width, game.config.height);\n\n this.anims.create({\n key: 'south_stop',\n frames: [{ key: 'hero', frame: '1.png' }]\n });\n\n this.anims.create({\n key: 'north_stop',\n frames: [{ key: 'hero', frame: '17.png' }]\n });\n\n this.anims.create({\n key: 'west_stop',\n frames: [{ key: 'hero', frame: '9.png' }]\n });\n\n this.anims.create({\n key: 'east_stop',\n frames: [{ key: 'hero', frame: '25.png' }]\n });\n\n this.anims.create({\n key: 'south_walk', // southeast in isometric\n frames: this.anims.generateFrameNames('hero', { prefix: '', suffix: '.png', start: 1, end: 4 }),\n frameRate: 4,\n repeat: -1\n });\n this.anims.create({\n key: 'north_walk', // northwest in isometric\n frames: this.anims.generateFrameNames('hero', { prefix: '', suffix: '.png', start: 17, end: 20 }),\n frameRate: 4,\n repeat: -1\n });\n this.anims.create({\n key: 'west_walk', // southwest in isometric\n frames: this.anims.generateFrameNames('hero', { prefix: '', suffix: '.png', start: 9, end: 12 }),\n frameRate: 4,\n repeat: -1\n });\n this.anims.create({\n key: 'east_walk', // northeast in isometric\n frames: this.anims.generateFrameNames('hero', { prefix: '', suffix: '.png', start: 25, end: 28 }),\n frameRate: 4,\n repeat: -1\n });\n\n // sorcerer.animations.add('southeast', ['1.png','2.png','3.png','4.png'], 6, true);\n // sorcerer.animations.add('south', ['5.png','6.png','7.png','8.png'], 6, true);\n // sorcerer.animations.add('southwest', ['9.png','10.png','11.png','12.png'], 6, true);\n // sorcerer.animations.add('west', ['13.png','14.png','15.png','16.png'], 6, true);\n // sorcerer.animations.add('northwest', ['17.png','18.png','19.png','20.png'], 6, true);\n // sorcerer.animations.add('north', ['21.png','22.png','23.png','24.png'], 6, true);\n // sorcerer.animations.add('northeast', ['25.png','26.png','27.png','28.png'], 6, true);\n // sorcerer.animations.add('east', ['29.png','30.png','31.png','32.png'], 6, true);\n\n //this.cameras.main.startFollow(this.hero);\n\n this.keyUp = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.UP, true, true);\n this.keyUp.on('down', this.key_down_callback, this);\n this.keyUp.on('up', this.key_up_callback, this);\n\n this.keyDown = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.DOWN, true, true);\n this.keyDown.on('down', this.key_down_callback, this);\n this.keyDown.on('up', this.key_up_callback, this);\n\n this.keyLeft = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.LEFT, true, true);\n this.keyLeft.on('down', this.key_down_callback, this);\n this.keyLeft.on('up', this.key_up_callback, this);\n\n this.keyRight = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.RIGHT, true, true);\n this.keyRight.on('down', this.key_down_callback, this);\n this.keyRight.on('up', this.key_up_callback, this);\n }", "function addAnimation(){\n const Burst1 = new mojs.Burst ({\n parent: animationDiv,\n top: '50%',\n left: '50%', \n radius: {0: 80},\n count: 8,\n children: {\n shape: 'circle',\n fill: {'red':'blue'},\n strokeWidth: 1,\n duration: 600,\n stroke: {'red':'blue'}\n }\n });\n\n\n const Burst2 = new mojs.Burst ({\n parent: animationDiv,\n top: '50%',\n left: '50%', \n radius: {0: 100},\n count: 4,\n children: {\n shape: 'rect',\n fill: 'white',\n strokeWidth: 1,\n duration: 300,\n stroke: 'white'\n }\n });\n\n\n\n const circle1= new mojs.Shape ({\n radius: {0:40},\n parent: animationDiv,\n fill: 'none',\n stroke: 'white',\n strokeWidth:15,\n duration: 300,\n opacity: {1: 0}\n });\n\n const circle2= new mojs.Shape ({\n radius: {0:50},\n parent: animationDiv,\n fill: 'none',\n stroke: 'red',\n strokeWidth:5,\n duration: 400,\n opacity: {1: 0}\n });\n\n\n const circle3= new mojs.Shape ({\n radius: {0:60},\n parent: animationDiv,\n fill: 'none',\n stroke: 'blue',\n strokeWidth:5,\n duration: 500,\n opacity: {1: 0}\n });\n\n const circle4= new mojs.Shape ({\n radius: {0:70},\n parent: animationDiv,\n fill: 'white',\n \n stroke: 'white',\n strokeWidth:5,\n duration: 600,\n opacity: {1: 0}\n });\n\n const timeline = new mojs.Timeline ({\n \n repeat: 0\n }).add(circle4,circle1,circle2,circle3,Burst1,Burst2);\n\n timeline.play();\n}", "function setUpAnim(){\r\n\tanimInstruction = animInstructionsRaw.split(',');\r\n\tanimCurrentInst = 0;\r\n\tmainInput.style.display = \"none\";\r\n\t//\t\tcreate 10 placerholder arrays for points on each line\r\n\tanimPoints.push([]);\r\n\tanimPoints.push([]);\r\n\tanimPoints.push([]);\r\n\tanimPoints.push([]);\r\n\tanimPoints.push([]);\r\n\tanimPoints.push([]);\r\n\tanimPoints.push([]);\r\n\tanimPoints.push([]);\r\n\tanimPoints.push([]);\r\n\tanimPoints.push([]);\r\n\t\r\n\tanimPointPos.push([]);\r\n\tanimPointPos.push([]);\r\n\tanimPointPos.push([]);\r\n\tanimPointPos.push([]);\r\n\tanimPointPos.push([]);\r\n\tanimPointPos.push([]);\r\n\tanimPointPos.push([]);\r\n\tanimPointPos.push([]);\r\n\tanimPointPos.push([]);\r\n\tanimPointPos.push([]);\r\n}", "function createAnimations(that){\n \n that.anims.create({\n key: \"left\",\n frames: that.anims.generateFrameNumbers(\"personaje\", { start: 2, end: 0 }),\n repeat: 0\n });\n\n that.anims.create({\n key: \"finish-left\",\n frames: that.anims.generateFrameNumbers(\"personaje\", { start: 0, end: 2 }),\n repeat: 0\n });\n \n that.anims.create({\n key: \"right\",\n frames: that.anims.generateFrameNumbers(\"personaje\", { start: 2, end: 4 })\n });\n\n that.anims.create({\n key: \"finish-right\",\n frames: that.anims.generateFrameNumbers(\"personaje\", { start: 4, end: 2 })\n });\n\n that.anims.create({\n key: \"down\",\n frames: that.anims.generateFrameNumbers(\"personaje\", { start: 7, end: 2 }),\n });\n\n that.anims.create({\n key: \"up\",\n frames: that.anims.generateFrameNumbers(\"personaje\", { start: 2, end: 7 })\n });\n\n}", "function createAnimations(that){\n \n that.anims.create({\n key: \"left\",\n frames: that.anims.generateFrameNumbers(\"personaje\", { start: 2, end: 0 }),\n repeat: 0\n });\n\n that.anims.create({\n key: \"finish-left\",\n frames: that.anims.generateFrameNumbers(\"personaje\", { start: 0, end: 2 }),\n repeat: 0\n });\n \n that.anims.create({\n key: \"right\",\n frames: that.anims.generateFrameNumbers(\"personaje\", { start: 2, end: 4 })\n });\n\n that.anims.create({\n key: \"finish-right\",\n frames: that.anims.generateFrameNumbers(\"personaje\", { start: 4, end: 2 })\n });\n\n that.anims.create({\n key: \"down\",\n frames: that.anims.generateFrameNumbers(\"personaje\", { start: 7, end: 2 }),\n });\n\n that.anims.create({\n key: \"up\",\n frames: that.anims.generateFrameNumbers(\"personaje\", { start: 2, end: 7 })\n });\n\n}", "function addAnimation() {\n const Burst1 = new mojs.Burst({\n parent: animationDiv,\n top: '50%',\n left: '50%',\n radius: {0: 80},\n count: 8,\n children: {\n shape: 'circle',\n fill: {'red': 'blue'},\n strokeWidth: 1,\n duration: 600,\n stroke: {'red': 'blue'}\n }\n });\n\n\n const Burst2 = new mojs.Burst({\n parent: animationDiv,\n top: '50%',\n left: '50%',\n radius: {0: 100},\n count: 4,\n children: {\n shape: 'rect',\n fill: 'white',\n strokeWidth: 1,\n duration: 300,\n stroke: 'white'\n }\n });\n\n\n const circle1 = new mojs.Shape({\n radius: {0: 40},\n parent: animationDiv,\n fill: 'none',\n stroke: 'white',\n strokeWidth: 15,\n duration: 300,\n opacity: {1: 0}\n });\n\n const circle2 = new mojs.Shape({\n radius: {0: 50},\n parent: animationDiv,\n fill: 'none',\n stroke: 'red',\n strokeWidth: 5,\n duration: 400,\n opacity: {1: 0}\n });\n\n\n const circle3 = new mojs.Shape({\n radius: {0: 60},\n parent: animationDiv,\n fill: 'none',\n stroke: 'blue',\n strokeWidth: 5,\n duration: 500,\n opacity: {1: 0}\n });\n\n const circle4 = new mojs.Shape({\n radius: {0: 70},\n parent: animationDiv,\n fill: 'white',\n\n stroke: 'white',\n strokeWidth: 5,\n duration: 600,\n opacity: {1: 0}\n });\n\n const timeline = new mojs.Timeline({\n\n repeat: 0\n }).add(circle4, circle1, circle2, circle3, Burst1, Burst2);\n\n timeline.play();\n }", "function runAnimation() {\n\t // Draw a straight line\n\t bsBackground.draw({\n\t points: [0, height / 2 - 40, width, height / 3]\n\t });\n\n\t // Draw a straight line\n\t bsBackground.draw({\n\t points: [50, height / 3 - 40, width, height / 3]\n\t });\n\n\n\t // Draw another straight line\n\t bsBackground.draw({\n\t points: [width, height / 2, 0, height / 1.5 - 40]\n\t });\n\n\t // Draw a curve generated using 20 random points\n\t bsBackground.draw({\n\t inkAmount: 3,\n\t frames: 100,\n\t size: 200,\n\t splashing: true,\n\t points: 20\n\t });\n\t}", "function animations() {\n\tarthur.srcX = arthur.currentFrame * arthur.width;\n\tif (arthur.goRight) {\n\t\tarthur.srcY = arthur.goRowRight * arthur.height;\n\t} else if (arthur.goLeft) {\n\t\tarthur.srcY = arthur.goRowLeft * arthur.height;\n\t} else if (arthur.duckRight) {\n\t\tarthur.srcY = arthur.duckRowRight * arthur.height;\n\t} else if (arthur.atkRight) {\n\t\tarthur.srcY = arthur.atkRowRight * arthur.height;\n\t} else if (arthur.jumpRight) {\n\t\tarthur.srcY = arthur.jumpRowRight * arthur.height;\n\t} else if (arthur.die) {\n\t\tarthur.srcY = arthur.dieRowRight * arthur.height;\n\t}\n}", "function animation_frame() {\n var datalen = animationState.order.length,\n styles = animationState.styleArrays,\n curTime = Date.now(), genTime, updateTime,\n position, i, idx, p;\n timeRecords.frames.push(curTime);\n animationState.raf = null;\n position = ((curTime - animationState.startTime) / animationState.duration) % 1;\n if (position < 0) {\n position += 1;\n }\n animationState.position = position;\n\n for (idx = 0; idx < datalen; idx += 1) {\n i = animationState.order[idx];\n p = idx / datalen + position;\n if (p > 1) {\n p -= 1;\n }\n styles.p[i] = p;\n }\n if (animationStyles.fill) {\n for (i = 0; i < datalen; i += 1) {\n styles.fill[i] = styles.p[i] >= 0.1 ? false : true;\n }\n }\n if (animationStyles.fillColor) {\n for (i = 0; i < datalen; i += 1) {\n p = styles.p[i];\n if (p >= 0.1) {\n styles.fillColor[i].r = 0;\n styles.fillColor[i].g = 0;\n styles.fillColor[i].b = 0;\n } else {\n styles.fillColor[i].r = p * 10;\n styles.fillColor[i].g = p * 8.39;\n styles.fillColor[i].b = p * 4.39;\n }\n }\n }\n if (animationStyles.fillOpacity) {\n for (i = 0; i < datalen; i += 1) {\n p = styles.p[i];\n styles.fillOpacity[i] = p >= 0.1 ? 0 : 1.0 - p * 10; // 1 - 0\n }\n }\n if (animationStyles.radius) {\n for (i = 0; i < datalen; i += 1) {\n p = styles.p[i];\n styles.radius[i] = p >= 0.1 ? 0 : 2 + 100 * p; // 2 - 12\n }\n }\n if (animationStyles.stroke) {\n for (i = 0; i < datalen; i += 1) {\n styles.stroke[i] = styles.p[i] >= 0.1 ? false : true;\n }\n }\n if (animationStyles.strokeColor) {\n for (i = 0; i < datalen; i += 1) {\n p = styles.p[i];\n if (p >= 0.1) {\n styles.strokeColor[i].r = 0;\n styles.strokeColor[i].g = 0;\n styles.strokeColor[i].b = 0;\n } else {\n styles.strokeColor[i].r = p * 8.51;\n styles.strokeColor[i].g = p * 6.04;\n styles.strokeColor[i].b = 0;\n }\n }\n }\n if (animationStyles.strokeOpacity) {\n for (i = 0; i < datalen; i += 1) {\n p = styles.p[i];\n styles.strokeOpacity[i] = p >= 0.1 ? 0 : 1.0 - p * p * 100; // (1 - 0) ^ 2\n }\n }\n if (animationStyles.strokeWidth) {\n for (i = 0; i < datalen; i += 1) {\n p = styles.p[i];\n styles.strokeWidth[i] = p >= 0.1 ? 0 : 3 - 30 * p; // 3 - 0\n }\n }\n var updateStyles = {};\n $.each(animationStyles, function (key, use) {\n if (use) {\n updateStyles[key] = styles[key];\n }\n });\n genTime = Date.now();\n pointFeature.updateStyleFromArray(updateStyles, null, true);\n updateTime = Date.now();\n timeRecords.generate.push(genTime - curTime);\n timeRecords.update.push(updateTime - genTime);\n show_framerate();\n if (animationState.mode === 'play') {\n animationState.raf = window.requestAnimationFrame(animation_frame);\n }\n }", "function AnimationSequenceMetadata() { }", "function AnimationSequenceMetadata() { }", "function getAnimSteps(data) {\n\n\t\t\t\t\t\tvar paramarray = data.split(\"animation:\");\n\t\t\t\t\t\tvar params = new Object();\n\n\t\t\t\t\t\tparams.animation = getAnimDatas(newAnimObject(),paramarray[1]);\n\t\t\t\t\t\tvar customarray = paramarray[0].split(';');\n\n\t\t\t\t\t\tjQuery.each(customarray,function(index,param) {\n\t\t\t\t\t\t\tparam = param.split(\":\")\n\t\t\t\t\t\t\tvar w = param[0],\n\t\t\t\t\t\t\t\tv = param[1];\n\t\t\t\t\t\t\tif (w==\"typ\") params.typ = v;\n\t\t\t\t\t\t\tif (w==\"speed\") params.speed = parseInt(v,0)/1000;\n\t\t\t\t\t\t\tif (w==\"start\") params.start = parseInt(v,0)/1000;\n\t\t\t\t\t\t\tif (w==\"elementdelay\") params.elementdelay = parseFloat(v);\n\t\t\t\t\t\t\tif (w==\"ease\") params.ease = v;\n\t\t\t\t\t\t})\n\n\t\t\t\t\treturn params;\n\t\t\t\t}", "function getAnimSteps(data) {\n\n\t\t\t\t\t\tvar paramarray = data.split(\"animation:\");\n\t\t\t\t\t\tvar params = new Object();\n\n\t\t\t\t\t\tparams.animation = getAnimDatas(newAnimObject(),paramarray[1]);\n\t\t\t\t\t\tvar customarray = paramarray[0].split(';');\n\n\t\t\t\t\t\tjQuery.each(customarray,function(index,param) {\n\t\t\t\t\t\t\tparam = param.split(\":\")\n\t\t\t\t\t\t\tvar w = param[0],\n\t\t\t\t\t\t\t\tv = param[1];\n\t\t\t\t\t\t\tif (w==\"typ\") params.typ = v;\n\t\t\t\t\t\t\tif (w==\"speed\") params.speed = parseInt(v,0)/1000;\n\t\t\t\t\t\t\tif (w==\"start\") params.start = parseInt(v,0)/1000;\n\t\t\t\t\t\t\tif (w==\"elementdelay\") params.elementdelay = parseFloat(v);\n\t\t\t\t\t\t\tif (w==\"ease\") params.ease = v;\n\t\t\t\t\t\t})\n\n\t\t\t\t\treturn params;\n\t\t\t\t}", "function sobrePage(do_sobre) {\r\n function startAnimation(element) {\r\n var animationData = {\r\n assets: [],\r\n v: \"4.2.0\",\r\n ddd: 0,\r\n layers: [{\r\n ddd: 0,\r\n ind: 0,\r\n ty: 4,\r\n nm: \"mask\",\r\n td: 1,\r\n ks: {\r\n o: {\r\n k: 100\r\n },\r\n r: {\r\n k: 0\r\n },\r\n p: {\r\n k: [9, 9, 0]\r\n },\r\n a: {\r\n k: [0, 0, 0]\r\n },\r\n s: {\r\n k: [50, 50, 100]\r\n }\r\n },\r\n shapes: [{\r\n ty: \"gr\",\r\n it: [{\r\n ind: 0,\r\n ty: \"sh\",\r\n closed: !0,\r\n ks: {\r\n k: [{\r\n i: {\r\n x: .833,\r\n y: .833\r\n },\r\n o: {\r\n x: .167,\r\n y: .167\r\n },\r\n n: \"0p833_0p833_0p167_0p167\",\r\n t: 0,\r\n s: [{\r\n i: [\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0]\r\n ],\r\n o: [\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0]\r\n ],\r\n v: [\r\n [23.25, -18.375],\r\n [0, -18.125],\r\n [0, 0],\r\n [0, -24.375],\r\n [25.913, -1.203],\r\n [35, -8.5]\r\n ]\r\n }],\r\n e: [{\r\n i: [\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0]\r\n ],\r\n o: [\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0]\r\n ],\r\n v: [\r\n [23.25, -18.375],\r\n [0, -18.125],\r\n [0, 0],\r\n [17.125, -.625],\r\n [25.913, -1.203],\r\n [35, -8.5]\r\n ]\r\n }]\r\n }, {\r\n i: {\r\n x: .833,\r\n y: .833\r\n },\r\n o: {\r\n x: .167,\r\n y: .167\r\n },\r\n n: \"0p833_0p833_0p167_0p167\",\r\n t: 4,\r\n s: [{\r\n i: [\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0]\r\n ],\r\n o: [\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0]\r\n ],\r\n v: [\r\n [23.25, -18.375],\r\n [0, -18.125],\r\n [0, 0],\r\n [17.125, -.625],\r\n [25.913, -1.203],\r\n [35, -8.5]\r\n ]\r\n }],\r\n e: [{\r\n i: [\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0]\r\n ],\r\n o: [\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0]\r\n ],\r\n v: [\r\n [23.25, -18.375],\r\n [0, -18.125],\r\n [0, 0],\r\n [.125, 26.625],\r\n [25.913, -1.203],\r\n [35, -8.5]\r\n ]\r\n }]\r\n }, {\r\n i: {\r\n x: .833,\r\n y: .833\r\n },\r\n o: {\r\n x: .167,\r\n y: .167\r\n },\r\n n: \"0p833_0p833_0p167_0p167\",\r\n t: 8,\r\n s: [{\r\n i: [\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0]\r\n ],\r\n o: [\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0]\r\n ],\r\n v: [\r\n [23.25, -18.375],\r\n [0, -18.125],\r\n [0, 0],\r\n [.125, 26.625],\r\n [25.913, -1.203],\r\n [35, -8.5]\r\n ]\r\n }],\r\n e: [{\r\n i: [\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0]\r\n ],\r\n o: [\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0]\r\n ],\r\n v: [\r\n [23.25, -18.375],\r\n [0, -18.125],\r\n [0, 0],\r\n [-28.5, -.125],\r\n [7.538, 38.672],\r\n [35.125, 33.875]\r\n ]\r\n }]\r\n }, {\r\n i: {\r\n x: .833,\r\n y: .833\r\n },\r\n o: {\r\n x: .167,\r\n y: .167\r\n },\r\n n: \"0p833_0p833_0p167_0p167\",\r\n t: 12,\r\n s: [{\r\n i: [\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0]\r\n ],\r\n o: [\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0]\r\n ],\r\n v: [\r\n [23.25, -18.375],\r\n [0, -18.125],\r\n [0, 0],\r\n [-28.5, -.125],\r\n [7.538, 38.672],\r\n [35.125, 33.875]\r\n ]\r\n }],\r\n e: [{\r\n i: [\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0]\r\n ],\r\n o: [\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0]\r\n ],\r\n v: [\r\n [23.25, -18.375],\r\n [0, -18.125],\r\n [0, 0],\r\n [.375, -18.25],\r\n [-50.212, 7.672],\r\n [19.75, 38]\r\n ]\r\n }]\r\n }, {\r\n t: 16.0000006516934\r\n }]\r\n },\r\n nm: \"Path 1\"\r\n }, {\r\n ty: \"fl\",\r\n fillEnabled: !0,\r\n c: {\r\n k: [.05, 1, 0, 1]\r\n },\r\n o: {\r\n k: 100\r\n },\r\n nm: \"Fill 1\"\r\n }, {\r\n ty: \"tr\",\r\n p: {\r\n k: [0, 0],\r\n ix: 2\r\n },\r\n a: {\r\n k: [0, 0],\r\n ix: 1\r\n },\r\n s: {\r\n k: [100, 100],\r\n ix: 3\r\n },\r\n r: {\r\n k: 0,\r\n ix: 6\r\n },\r\n o: {\r\n k: 100,\r\n ix: 7\r\n },\r\n sk: {\r\n k: 0,\r\n ix: 4\r\n },\r\n sa: {\r\n k: 0,\r\n ix: 5\r\n },\r\n nm: \"Transform\"\r\n }],\r\n nm: \"Shape 1\"\r\n }],\r\n bounds: {\r\n l: -51,\r\n t: -25,\r\n b: 39,\r\n r: 36\r\n },\r\n ip: 0,\r\n op: 600.000024438501,\r\n st: 0\r\n }, {\r\n ddd: 0,\r\n ind: 1,\r\n ty: 4,\r\n nm: \"circle cheio\",\r\n tt: 1,\r\n ks: {\r\n o: {\r\n k: 100\r\n },\r\n r: {\r\n k: 0\r\n },\r\n p: {\r\n k: [9.01, 9.045, 0]\r\n },\r\n a: {\r\n k: [-12.49, -7.08, 0]\r\n },\r\n s: {\r\n k: [50, 50, 100]\r\n }\r\n },\r\n shapes: [{\r\n ty: \"gr\",\r\n it: [{\r\n d: 1,\r\n ty: \"el\",\r\n s: {\r\n k: [26.84, 26.84]\r\n },\r\n p: {\r\n k: [0, 0]\r\n },\r\n nm: \"Ellipse Path 1\",\r\n closed: !0\r\n }, {\r\n d: 1,\r\n ty: \"el\",\r\n s: {\r\n k: [26.84, 26.84]\r\n },\r\n p: {\r\n k: [0, 0]\r\n },\r\n nm: \"Ellipse Path 1\",\r\n closed: !0\r\n }, {\r\n ty: \"fl\",\r\n fillEnabled: !0,\r\n c: {\r\n k: [1, 1, 1, 1]\r\n },\r\n o: {\r\n k: 100\r\n },\r\n nm: \"Fill 1\"\r\n }, {\r\n ty: \"tr\",\r\n p: {\r\n k: [-12.49, -7.08],\r\n ix: 2\r\n },\r\n a: {\r\n k: [0, 0],\r\n ix: 1\r\n },\r\n s: {\r\n k: [100, 100],\r\n ix: 3\r\n },\r\n r: {\r\n k: 0,\r\n ix: 6\r\n },\r\n o: {\r\n k: 100,\r\n ix: 7\r\n },\r\n sk: {\r\n k: 0,\r\n ix: 4\r\n },\r\n sa: {\r\n k: 0,\r\n ix: 5\r\n },\r\n nm: \"Transform\"\r\n }],\r\n nm: \"Ellipse 1\"\r\n }],\r\n bounds: {\r\n l: -31,\r\n t: -26,\r\n b: 11,\r\n r: 6\r\n },\r\n ip: 1.00000004073083,\r\n op: 128.000005213547,\r\n st: 1.00000004073083\r\n }, {\r\n ddd: 0,\r\n ind: 2,\r\n ty: 4,\r\n nm: \"circle\",\r\n ks: {\r\n o: {\r\n k: 100\r\n },\r\n r: {\r\n k: 0\r\n },\r\n p: {\r\n k: [9.01, 9.045, 0]\r\n },\r\n a: {\r\n k: [-12.49, -7.08, 0]\r\n },\r\n s: {\r\n k: [50, 50, 100]\r\n }\r\n },\r\n shapes: [{\r\n ty: \"gr\",\r\n it: [{\r\n d: 1,\r\n ty: \"el\",\r\n s: {\r\n k: [26.84, 26.84]\r\n },\r\n p: {\r\n k: [0, 0]\r\n },\r\n nm: \"Ellipse Path 1\",\r\n closed: !0\r\n }, {\r\n d: 1,\r\n ty: \"el\",\r\n s: {\r\n k: [26.84, 26.84]\r\n },\r\n p: {\r\n k: [0, 0]\r\n },\r\n nm: \"Ellipse Path 1\",\r\n closed: !0\r\n }, {\r\n ty: \"st\",\r\n fillEnabled: !0,\r\n c: {\r\n k: [1, 1, 1, 1]\r\n },\r\n o: {\r\n k: 100\r\n },\r\n w: {\r\n k: 2\r\n },\r\n lc: 1,\r\n lj: 1,\r\n ml: 4,\r\n nm: \"Stroke 1\"\r\n }, {\r\n ty: \"tr\",\r\n p: {\r\n k: [-12.49, -7.08],\r\n ix: 2\r\n },\r\n a: {\r\n k: [0, 0],\r\n ix: 1\r\n },\r\n s: {\r\n k: [100, 100],\r\n ix: 3\r\n },\r\n r: {\r\n k: 0,\r\n ix: 6\r\n },\r\n o: {\r\n k: 100,\r\n ix: 7\r\n },\r\n sk: {\r\n k: 0,\r\n ix: 4\r\n },\r\n sa: {\r\n k: 0,\r\n ix: 5\r\n },\r\n nm: \"Transform\"\r\n }],\r\n nm: \"Ellipse 1\"\r\n }],\r\n bounds: {\r\n l: -33,\r\n t: -28,\r\n b: 13,\r\n r: 8\r\n },\r\n ip: 0,\r\n op: 127.000005172816,\r\n st: 0\r\n }],\r\n ip: 0,\r\n op: 17.0000006924242,\r\n fr: 29.9700012207031,\r\n w: 18,\r\n h: 18\r\n };\r\n loaderHighPic = bodymovin.loadAnimation({\r\n container: element,\r\n renderer: \"svg\",\r\n loop: !1,\r\n autoplay: !1,\r\n animationData: animationData\r\n })\r\n } /*functions*/\r\n function initHeaderAnim(type) {\r\n \"init\" == type && (TweenMax.set($pageHeader.find(\"h2\"), {\r\n opacity: 0,\r\n y: \"50px\"\r\n }), TweenMax.set($pageHeader.find(\".circle-btn\"), {\r\n scale: 0,\r\n opacity: 1\r\n })), \"start\" == type && (TweenMax.to($pageHeader.find(\"h2\"), 1, {\r\n opacity: 1,\r\n y: \"0px\",\r\n ease: Circ.easeOut\r\n }, .1), TweenMax.to($pageHeader.find(\".circle-btn\"), 1, {\r\n scale: 1,\r\n delay: .5,\r\n ease: Elastic.easeOut.config(1, 1),\r\n onComplete: function() {\r\n TweenMax.set($pageHeader.find(\".circle-btn\"), {\r\n clearProps: \"scale\"\r\n })\r\n }\r\n }), $.doTimeout(700, function() {\r\n $pageHeader.find(\".circle-btn .arrow-down path\").addClass(\"active\")\r\n }))\r\n }\r\n\r\n function scrollTweens() {\r\n 0 == window.pageYOffset ? ($jsMaskDownWrapper.each(function() {\r\n var $this = $(this),\r\n $mask = $(\"<span class='mask-bg'></span>\");\r\n $mask.css({\r\n display: \"block\",\r\n position: \"absolute\",\r\n width: \"100%\",\r\n height: \"100%\",\r\n top: 0,\r\n left: 0,\r\n \"background-color\": \"#ffffff\"\r\n }), $this.find(\".js-mask-down\").append($mask)\r\n }), $jsMaskLeftWrapper.each(function() {\r\n var $this = $(this),\r\n $mask = $(\"<span class='mask-bg'></span>\");\r\n $mask.css({\r\n display: \"block\",\r\n position: \"absolute\",\r\n width: \"100%\",\r\n height: \"100%\",\r\n top: 0,\r\n left: 0,\r\n \"background-color\": \"#ffbb02\"\r\n }), $this.find(\".js-mask-left\").append($mask)\r\n }), $jsAnimUpGroup.each(function() {\r\n var $this = $(this);\r\n TweenMax.set($this.children(), {\r\n y: \"50px\",\r\n opacity: 0\r\n })\r\n }), $jsAnimUp.each(function() {\r\n var $this = $(this);\r\n TweenMax.set($this, {\r\n y: \"50px\",\r\n opacity: 0\r\n })\r\n }), $jsAnimReveal.each(function() {\r\n var $this = $(this);\r\n if (\"left\" == $this.attr(\"data-from\")) var offset_x = \"100px\",\r\n offset_y = \"0px\";\r\n if (\"right\" == $this.attr(\"data-from\")) var offset_x = \"-100px\",\r\n offset_y = \"0px\";\r\n if (\"top\" == $this.attr(\"data-from\")) var offset_y = \"100px\",\r\n offset_x = \"0px\";\r\n if (\"down\" == $this.attr(\"data-from\")) var offset_y = \"-100px\",\r\n offset_x = \"0px\";\r\n TweenMax.set($this, {\r\n x: offset_x,\r\n y: offset_y,\r\n opacity: 0\r\n })\r\n })) : ($jsMaskLeftWrapper.addClass(\"js-animated\"), $jsMaskDownWrapper.addClass(\"js-animated\"))\r\n } /*Animation Loop*/\r\n function sobrePage_scroll() {\r\n _raf_loop_id = _rAF_loop(sobrePage_scroll_rAF)\r\n }\r\n\r\n function sobrePage_scroll_rAF() {\r\n var $pageScrollHeader = $(\".page-scroll-header\");\r\n // Avoid calculations if not needed\r\n lastPosition != window.pageYOffset && (window.pageYOffset > lastPosition ? direction = \"down\" : direction = \"up\", lastPosition = window.pageYOffset, $thumbnail.hasClass(\"js-hover\") && $thumbnail.trigger(\"mouseleave\"), lastPosition > 10 && \"down\" == direction && !$_body.hasClass(\"js-scrolled-down\") && ($_body.addClass(\"js-scrolled-down\"), $pageScrollHeader.addClass(\"active\")), lastPosition < 10 && ($_body.removeClass(\"js-scrolled-down\"), $pageScrollHeader.removeClass(\"active\")), verge.inY($sobreTitle, -300) && $sobreTitle.find(\".picto\").addClass(\"active\"), $jsAnimUpGroup.each(function() {\r\n var $this = $(this);\r\n $this.hasClass(\"js-animated\") || verge.inY($this, -100) && ($this.addClass(\"js-animated\"), TweenMax.staggerTo($this.children(), 1, {\r\n y: 0,\r\n opacity: 1,\r\n ease: Power2.easeOut\r\n }, .2))\r\n }), $jsAnimUp.each(function() {\r\n var $this = $(this);\r\n $this.hasClass(\"js-animated\") || verge.inY($this, -100) && ($this.addClass(\"js-animated\"), TweenMax.staggerTo($this, 1, {\r\n y: 0,\r\n opacity: 1,\r\n ease: Power2.easeOut\r\n }, .2))\r\n }), $jsAnimReveal.each(function() {\r\n var $this = $(this);\r\n $this.hasClass(\"js-animated\") || verge.inY($this, -100) && ($this.addClass(\"js-animated active\"), TweenMax.staggerTo($this, 1, {\r\n x: 0,\r\n y: 0,\r\n opacity: 1,\r\n ease: Expo.easeOut\r\n }, .2))\r\n }), $jsMaskDownWrapper.each(function() {\r\n var $this = $(this);\r\n $this.hasClass(\"js-animated\") || verge.inY($this, -100) && ($this.addClass(\"js-animated\"), TweenMax.staggerTo($this.find(\".mask-bg\"), 1, {\r\n y: \"100%\",\r\n ease: Circ.easeInOut\r\n }, .2))\r\n }), $jsMaskLeftWrapper.each(function() {\r\n var $this = $(this);\r\n $this.hasClass(\"js-animated\") || verge.inY($this, -700) && ($this.addClass(\"js-animated\"), TweenMax.staggerTo($this.find(\".mask-bg\"), .8, {\r\n x: \"101%\",\r\n ease: Circ.easeInOut\r\n }, .1))\r\n }))\r\n }\r\n if (!do_sobre) return $_window.off(\"scroll.sobrePage\"), $_body.removeClass(\"sobre-page\"), !1;\r\n $_window.on(\"scroll.sobrePage\", sobrePage_scroll), $_body.addClass(\"sobre-page\");\r\n var loaderHighPic, lastPosition = -1,\r\n $pageHeader = $(\".page-header\"),\r\n $fullImages = $(\".full-images\"),\r\n $thumbnail = $(\".thumbnail\"),\r\n $jsMaskDownWrapper = ($(\".slideshow-container\"), $(\".js-mask-down-wrapper\")),\r\n $jsMaskLeftWrapper = $(\".js-mask-left-wrapper\"),\r\n $hiddenProtocols = $(\".hidden-protocols\"),\r\n $showHideProtocols = $(\".show-more-protocols\");\r\n $sobreTitle = $(\".sobre-title\"), $jsAnimUpGroup = $(\".js-anim-up-group\"), $jsAnimUp = $(\".js-anim-up\"), $jsAnimReveal = $(\".js-anim-reveal\"), /*Initializations*/\r\n initHeaderAnim(\"init\"), initHeaderAnim(\"start\"), pressAnime(), scrollTweens(), /*events*/\r\n $_body.hasClass(\"mobile\") ? (window.innerWidth > 767 ? $(\".slideshow-container\").vTicker({\r\n speed: 500,\r\n pause: 1500,\r\n height: 60,\r\n mousePause: !1\r\n }) : $(\".slideshow-container\").vTicker({\r\n speed: 500,\r\n pause: 1500,\r\n height: 40,\r\n mousePause: !1\r\n }), $thumbnail.on(\"click\", function() {\r\n var $this = $(this),\r\n $bgHover = $this.find(\".bg-hover\"),\r\n $goAnime = $this.find(\".go-anime\"),\r\n $closeToolTip = $this.find(\".close-tooltip\");\r\n if (!$this.hasClass(\"active\")) {\r\n if ($.each($thumbnail, function() {\r\n $(this).hasClass(\"active\") && ($(this).toggleClass(\"active\"), TweenMax.to($(this).find(\".close-tooltip\"), .1, {\r\n autoAlpha: 0,\r\n y: 0\r\n }), TweenMax.to($(this).find(\".bg-hover\"), .1, {\r\n delay: .35,\r\n autoAlpha: 0\r\n }), TweenMax.staggerTo($(this).find(\".go-anime\"), .4, {\r\n opacity: 0,\r\n y: 0\r\n }, .2))\r\n }), $this.addClass(\"js-hover\"), !$this.hasClass(\"js-hover\")) return !1;\r\n $this.hasClass(\"active\") || ($this.toggleClass(\"active\"), TweenMax.set($closeToolTip, {\r\n y: 10\r\n }), TweenMax.to($closeToolTip, .1, {\r\n delay: .25,\r\n autoAlpha: 1,\r\n y: 0\r\n }), TweenMax.to($bgHover, .1, {\r\n autoAlpha: 1\r\n }), TweenMax.staggerTo($goAnime, .4, {\r\n opacity: 1,\r\n y: -10,\r\n delay: .15\r\n }, .2))\r\n }\r\n }), $(document).on(\"click\", \".thumbnail.active .close-tooltip\", function() {\r\n var $this = $(this),\r\n $thisThumb = $this.parent(\".thumbnail\"),\r\n $bgHover = $this.parent(\".thumbnail\").find(\".bg-hover\"),\r\n $goAnime = $this.parent(\".thumbnail\").find(\".go-anime\");\r\n $thisThumb.toggleClass(\"active\"), TweenMax.to($this, .1, {\r\n autoAlpha: 0,\r\n y: 10\r\n }), TweenMax.to($bgHover, .1, {\r\n delay: .35,\r\n autoAlpha: 0\r\n }), TweenMax.staggerTo($goAnime, .4, {\r\n opacity: 0,\r\n y: 0\r\n }, .2)\r\n })) : ($(\".slideshow-container\").vTicker({\r\n speed: 500,\r\n pause: 1500,\r\n height: 60,\r\n mousePause: !1\r\n }), $thumbnail.on(\"mouseenter\", function(e) {\r\n var $this = $(this),\r\n $bgHover = $this.find(\".bg-hover\"),\r\n $goAnime = $this.find(\".go-anime\"),\r\n imageTarget = $this.attr(\"data-image-target\"),\r\n $loader = $this.find(\".loader\"),\r\n offset = $(this).offset();\r\n e.pageX - offset.left, e.pageY - offset.top;\r\n // relativeX = relativeX-$bgHover.width()/2;\r\n // relativeY = relativeY-$bgHover.height()/2;\r\n // $bgHover.css({\r\n // \"left\": 0,\r\n // \"top\": 0,\r\n // 'width':'100%',\r\n // 'height':'100%'\r\n // \"transform\": \"scale(2)\",\r\n // \"-webkit-transform\": \"scale(2)\"\r\n // });\r\n //TweenMax.to($bgHover, .1, {autoAlpha:.9});\r\n return startAnimation($loader[0]), $this.find(\"img\").hide(), $this.addClass(\"js-hover\"), !!$this.hasClass(\"js-hover\") && (TweenMax.to($bgHover, .1, {\r\n opacity: .9,\r\n visibility: \"visible\"\r\n }), TweenMax.staggerTo($goAnime, .4, {\r\n opacity: 1,\r\n y: 0,\r\n delay: .15\r\n }, .2), void $.doTimeout(0, function() {\r\n return !!$this.hasClass(\"js-hover\") && ($loader.css(\"opacity\", 1), loaderHighPic.play(), void loaderHighPic.addEventListener(\"complete\", function() {\r\n $(\".titles-columns\").css(\"opacity\", 0), $thumbnail.css(\"opacity\", .15), $this.css(\"opacity\", 1), $loader.css(\"opacity\", 0), TweenMax.to($fullImages.find(\".image-wrapper[data-image='\" + imageTarget + \"']\"), .2, {\r\n autoAlpha: 1,\r\n ease: Power4.easeOut,\r\n onComplete: function() {\r\n $fullImages.find(\".image-wrapper[data-image='\" + imageTarget + \"']\").addClass(\"js-scale\")\r\n }\r\n })\r\n }))\r\n }))\r\n }).on(\"mouseleave\", function(e) {\r\n var $this = $(this),\r\n $bgHover = $this.find(\".bg-hover\"),\r\n $loader = $this.find(\".loader\"),\r\n $goAnime = $this.find(\".go-anime\");\r\n $this.find(\".close-tooltip\");\r\n $this.removeClass(\"js-hover\"), $this.find(\"img\").show(), $(\".titles-columns\").css(\"opacity\", 1), TweenMax.to($bgHover, .1, {\r\n autoAlpha: 0\r\n }), TweenMax.killTweensOf($goAnime), TweenMax.killTweensOf($fullImages.find(\".image-wrapper\")), $thumbnail.css(\"opacity\", \"\"), TweenMax.to($fullImages.find(\".image-wrapper\"), .2, {\r\n autoAlpha: 0,\r\n ease: Power4.easeOut\r\n }), $fullImages.find(\".image-wrapper\").removeClass(\"js-scale\"), $loader.css(\"opacity\", 0), loaderHighPic.destroy(),\r\n // $bgHover.css({\r\n // \"transform\": \"scale(0)\",\r\n // \"-webkit-transform\": \"scale(0)\"\r\n // });\r\n TweenMax.to($goAnime, .2, {\r\n opacity: 0,\r\n y: 10\r\n })\r\n })), $showHideProtocols.on(\"click\", function() {\r\n var $this = $(this);\r\n $hiddenProtocols.toggleClass(\"active\"), TweenMax.set($hiddenProtocols.find(\"p\"), {\r\n y: \"20px\"\r\n }), $hiddenProtocols.hasClass(\"active\") ? ($this.text(\"Esconder\"), TweenMax.to($hiddenProtocols, 1.2, {\r\n autoAlpha: 1,\r\n height: $hiddenProtocols.find(\"p\").height() * $hiddenProtocols.find(\"p\").length,\r\n ease: Expo.easeOut\r\n }), TweenMax.staggerTo($hiddenProtocols.find(\"p\"), .5, {\r\n y: \"0px\",\r\n autoAlpha: 1,\r\n ease: Power4.easeOut\r\n }, .05)) : ($this.text(\"Mostrar Mais\"), TweenMax.set($hiddenProtocols.find(\"p\"), {\r\n y: \"20px\",\r\n autoAlpha: 0\r\n }), TweenMax.to($hiddenProtocols, .3, {\r\n autoAlpha: 0,\r\n height: \"0\"\r\n }))\r\n })\r\n}", "buildParams() {\n const classOpts = {\n flip: this.flip,\n spin: this.spin,\n pulse: this.pulse,\n border: this.border,\n inverse: this.inverse,\n size: this.size || null,\n pull: this.pull || null,\n rotate: this.rotate || null,\n fixedWidth: this.fixedWidth,\n };\n const parsedTransform = typeof this.transform === 'string' ? _fortawesome_fontawesome_svg_core__WEBPACK_IMPORTED_MODULE_3__[\"parse\"].transform(this.transform) : this.transform;\n return {\n transform: parsedTransform,\n classes: [...faClassList(classOpts), ...this.classes],\n title: this.title,\n styles: this.styles,\n };\n }", "function AnimationAnimateMetadata() { }", "function AnimationAnimateMetadata() { }", "static fromFrames(frames) {\nvar anim;\n//----------\nanim = new CASAnimation();\nanim.setFromFrames(frames);\nreturn anim;\n}", "function initStage015(stage){\n\nvar item;\n\n// Percent of one unit. if you want to change unit size, change this.\nvar u=8;\n\n/////Animation Parameter/////\n//\n//dsp :display (true/false) startIndex.... display or hide\n//x : position x (percent)\n//y : position y (percent)\n//w : width (percent)\n//h : height (percent)\n//bgc : background-color\n//bdc : border-color\n//img : background-image (filename)\n//opc : opacity (0.0....1.0) default=1.0\n//z : z-index (default=2)\n//wd : character of word\n\n//Answer String\n//helper original string=kkfh\" abc defghi\"kklkk0\" abc defghi\"kkfe\" abc defghi\"kk\nstage.setAnsStr(\"kkfhkklkk0kkfekk\");\nitem=stage.createNewItem();\n\n//class name\nitem.setName(\"vimrio\");\n\n//frame offset. default startindex=0\nitem.setFrameStartIndex(0);\nstage.addItem(item);\n\n//first frame\n//1 start\nitem.addAnimation({\"dsp\":true,\"x\":1*u,\"y\":11*u,\"w\":u,\"h\":u,\"bgc\":\"transparent\",\"bdc\":\"blue\",\"img\":\"vimrio01.png\",\"z\":5,\"opc\":1.0,\"wd\":\"\"});\n//following next frames\n\n//2 k\nitem.addAnimation({\"y\":10*u});\n//3 k\nitem.addAnimation({\"y\":9*u});\n//4 f\nitem.addAnimation({\"x\":10*u});\n//5 k\nitem.addAnimation({\"y\":8*u});\n//6 k\nitem.addAnimation({\"y\":7*u});\n//7 l\nitem.addAnimation({\"x\":11*u});\n//8 k\nitem.addAnimation({\"y\":6*u});\n//9 k\nitem.addAnimation({\"y\":5*u});\n//10 0\nitem.addAnimation({\"x\":1*u});\n//11 k\nitem.addAnimation({\"y\":4*u});\n//12 k\nitem.addAnimation({\"y\":3*u});\n//13 f\nitem.addAnimation({\"x\":7*u});\n//14 k\nitem.addAnimation({\"y\":2*u});\n//15 k\nitem.addAnimation({\"y\":1*u});\n\n//1 goal\nitem=stage.createNewItem();\nitem.setName(\"goal\");\nitem.addAnimation({\"dsp\":true,\"x\":7*u,\"y\":1*u,\"w\":u,\"h\":u,\"img\":\"goal01.png\",\"bgc\":\"yellow\",\"bdc\":\"yellow\"});\nstage.addItem(item);\n\n//word \" abc defghi\" [ ] 1\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":1*u,\"y\":9*u,\"w\":u,\"h\":u,\"img\":\"word02.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\" \"});\nstage.addItem(item);\n\n//word \" abc defghi\" [a] 2\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":2*u,\"y\":9*u,\"w\":u,\"h\":u,\"img\":\"word02.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\"a\"});\nstage.addItem(item);\n\n//word \" abc defghi\" [b] 3\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":3*u,\"y\":9*u,\"w\":u,\"h\":u,\"img\":\"word02.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\"b\"});\nstage.addItem(item);\n\n//word \" abc defghi\" [c] 4\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":4*u,\"y\":9*u,\"w\":u,\"h\":u,\"img\":\"word02.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\"c\"});\nstage.addItem(item);\n\n//word \" abc defghi\" [ ] 5\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":5*u,\"y\":9*u,\"w\":u,\"h\":u,\"img\":\"word02.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\" \"});\nstage.addItem(item);\n\n//word \" abc defghi\" [d] 6\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":6*u,\"y\":9*u,\"w\":u,\"h\":u,\"img\":\"word02.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\"d\"});\nstage.addItem(item);\n\n//word \" abc defghi\" [e] 7\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":7*u,\"y\":9*u,\"w\":u,\"h\":u,\"img\":\"word02.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\"e\"});\nstage.addItem(item);\n\n//word \" abc defghi\" [f] 8\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":8*u,\"y\":9*u,\"w\":u,\"h\":u,\"img\":\"word02.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\"f\"});\nstage.addItem(item);\n\n//word \" abc defghi\" [g] 9\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":9*u,\"y\":9*u,\"w\":u,\"h\":u,\"img\":\"word02.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\"g\"});\nstage.addItem(item);\n\n//word \" abc defghi\" [h] 10\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":10*u,\"y\":9*u,\"w\":u,\"h\":u,\"img\":\"word01.png\",\"bgc\":\"transparent\",\"bdc\":\"white\",\"wd\":\"h\"});\nstage.addItem(item);\n\n//word \" abc defghi\" [i] 11\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":11*u,\"y\":9*u,\"w\":u,\"h\":u,\"img\":\"word02.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\"i\"});\nstage.addItem(item);\n\n//word \" abc defghi\" [ ] 1\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":1*u,\"y\":5*u,\"w\":u,\"h\":u,\"img\":\"word01.png\",\"bgc\":\"transparent\",\"bdc\":\"white\",\"wd\":\" \"});\nstage.addItem(item);\n\n//word \" abc defghi\" [a] 2\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":2*u,\"y\":5*u,\"w\":u,\"h\":u,\"img\":\"word04.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\"a\"});\nstage.addItem(item);\n\n//word \" abc defghi\" [b] 3\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":3*u,\"y\":5*u,\"w\":u,\"h\":u,\"img\":\"word04.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\"b\"});\nstage.addItem(item);\n\n//word \" abc defghi\" [c] 4\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":4*u,\"y\":5*u,\"w\":u,\"h\":u,\"img\":\"word04.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\"c\"});\nstage.addItem(item);\n\n//word \" abc defghi\" [ ] 5\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":5*u,\"y\":5*u,\"w\":u,\"h\":u,\"img\":\"word04.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\" \"});\nstage.addItem(item);\n\n//word \" abc defghi\" [d] 6\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":6*u,\"y\":5*u,\"w\":u,\"h\":u,\"img\":\"word04.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\"d\"});\nstage.addItem(item);\n\n//word \" abc defghi\" [e] 7\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":7*u,\"y\":5*u,\"w\":u,\"h\":u,\"img\":\"word04.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\"e\"});\nstage.addItem(item);\n\n//word \" abc defghi\" [f] 8\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":8*u,\"y\":5*u,\"w\":u,\"h\":u,\"img\":\"word04.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\"f\"});\nstage.addItem(item);\n\n//word \" abc defghi\" [g] 9\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":9*u,\"y\":5*u,\"w\":u,\"h\":u,\"img\":\"word04.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\"g\"});\nstage.addItem(item);\n\n//word \" abc defghi\" [h] 10\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":10*u,\"y\":5*u,\"w\":u,\"h\":u,\"img\":\"word04.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\"h\"});\nstage.addItem(item);\n\n//word \" abc defghi\" [i] 11\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":11*u,\"y\":5*u,\"w\":u,\"h\":u,\"img\":\"word04.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\"i\"});\nstage.addItem(item);\n\n//word \" abc defghi\" [ ] 1\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":1*u,\"y\":3*u,\"w\":u,\"h\":u,\"img\":\"word02.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\" \"});\nstage.addItem(item);\n\n//word \" abc defghi\" [a] 2\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":2*u,\"y\":3*u,\"w\":u,\"h\":u,\"img\":\"word02.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\"a\"});\nstage.addItem(item);\n\n//word \" abc defghi\" [b] 3\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":3*u,\"y\":3*u,\"w\":u,\"h\":u,\"img\":\"word02.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\"b\"});\nstage.addItem(item);\n\n//word \" abc defghi\" [c] 4\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":4*u,\"y\":3*u,\"w\":u,\"h\":u,\"img\":\"word02.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\"c\"});\nstage.addItem(item);\n\n//word \" abc defghi\" [ ] 5\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":5*u,\"y\":3*u,\"w\":u,\"h\":u,\"img\":\"word02.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\" \"});\nstage.addItem(item);\n\n//word \" abc defghi\" [d] 6\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":6*u,\"y\":3*u,\"w\":u,\"h\":u,\"img\":\"word02.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\"d\"});\nstage.addItem(item);\n\n//word \" abc defghi\" [e] 7\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":7*u,\"y\":3*u,\"w\":u,\"h\":u,\"img\":\"word01.png\",\"bgc\":\"transparent\",\"bdc\":\"white\",\"wd\":\"e\"});\nstage.addItem(item);\n\n//word \" abc defghi\" [f] 8\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":8*u,\"y\":3*u,\"w\":u,\"h\":u,\"img\":\"word02.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\"f\"});\nstage.addItem(item);\n\n//word \" abc defghi\" [g] 9\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":9*u,\"y\":3*u,\"w\":u,\"h\":u,\"img\":\"word02.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\"g\"});\nstage.addItem(item);\n\n//word \" abc defghi\" [h] 10\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":10*u,\"y\":3*u,\"w\":u,\"h\":u,\"img\":\"word02.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\"h\"});\nstage.addItem(item);\n\n//word \" abc defghi\" [i] 11\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":11*u,\"y\":3*u,\"w\":u,\"h\":u,\"img\":\"word02.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\"i\"});\nstage.addItem(item);\n\n\n\n//wall 1\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":6*u,\"y\":0*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 2\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":7*u,\"y\":0*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 3\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":8*u,\"y\":0*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 4\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":6*u,\"y\":1*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 5\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":8*u,\"y\":1*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 6\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":0*u,\"y\":2*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 7\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":1*u,\"y\":2*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 8\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":2*u,\"y\":2*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 9\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":3*u,\"y\":2*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 10\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":4*u,\"y\":2*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 11\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":5*u,\"y\":2*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 12\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":6*u,\"y\":2*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 13\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":8*u,\"y\":2*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 14\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":9*u,\"y\":2*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 15\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":10*u,\"y\":2*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 16\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":11*u,\"y\":2*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 17\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":12*u,\"y\":2*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 18\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":0*u,\"y\":3*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 19\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":12*u,\"y\":3*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 20\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":0*u,\"y\":4*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 21\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":2*u,\"y\":4*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 22\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":3*u,\"y\":4*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 23\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":4*u,\"y\":4*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 24\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":5*u,\"y\":4*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 25\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":6*u,\"y\":4*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 26\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":7*u,\"y\":4*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 27\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":8*u,\"y\":4*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 28\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":9*u,\"y\":4*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 29\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":10*u,\"y\":4*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 30\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":11*u,\"y\":4*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 31\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":12*u,\"y\":4*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 32\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":0*u,\"y\":5*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 33\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":12*u,\"y\":5*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 34\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":0*u,\"y\":6*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 35\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":1*u,\"y\":6*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 36\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":2*u,\"y\":6*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 37\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":3*u,\"y\":6*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 38\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":4*u,\"y\":6*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 39\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":5*u,\"y\":6*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 40\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":6*u,\"y\":6*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 41\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":7*u,\"y\":6*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 42\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":8*u,\"y\":6*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 43\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":9*u,\"y\":6*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 44\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":10*u,\"y\":6*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 45\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":12*u,\"y\":6*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 46\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":9*u,\"y\":7*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 47\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":12*u,\"y\":7*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 48\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":0*u,\"y\":8*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 49\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":1*u,\"y\":8*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 50\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":2*u,\"y\":8*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 51\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":3*u,\"y\":8*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 52\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":4*u,\"y\":8*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 53\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":5*u,\"y\":8*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 54\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":6*u,\"y\":8*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 55\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":7*u,\"y\":8*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 56\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":8*u,\"y\":8*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 57\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":9*u,\"y\":8*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 58\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":11*u,\"y\":8*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 59\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":12*u,\"y\":8*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 60\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":0*u,\"y\":9*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 61\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":12*u,\"y\":9*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 62\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":0*u,\"y\":10*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 63\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":2*u,\"y\":10*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 64\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":3*u,\"y\":10*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 65\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":4*u,\"y\":10*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 66\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":5*u,\"y\":10*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 67\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":6*u,\"y\":10*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 68\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":7*u,\"y\":10*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 69\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":8*u,\"y\":10*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 70\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":9*u,\"y\":10*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 71\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":10*u,\"y\":10*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 72\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":11*u,\"y\":10*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 73\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":12*u,\"y\":10*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 74\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":0*u,\"y\":11*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 75\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":2*u,\"y\":11*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 76\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":0*u,\"y\":12*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 77\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":1*u,\"y\":12*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 78\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":2*u,\"y\":12*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n\n}", "function randomizeParameters() {\n CS.strokeS=randomRGBA();\n CS.fillS=randomRGBA();\n CS.lineW=Math.floor(Math.random()*9)+1;\n CS.brushSize=Math.floor(Math.random()*99)+1;\n updateControls();\n // canvas.dispatchEvent(new Event('mousemove')); // trigger updating in place of the brush on the preview layer\n //TODO trigger redraw \"in-place\" on new random event\n }", "function createFxNow(){setTimeout(function(){fxNow = undefined;});return fxNow = jQuery.now();} // Generate parameters to create a standard animation", "function Animations() {\n this.x = 0;\n this.y = 0;\n this.scale = 0\n this.\n}", "function page_animations() {\n\n var headerTl = new TimelineMax();\n\n headerTl.to('header', 0.25 ,{ opacity: 1})\n .to('header .logo h2', 0.25 ,{ opacity: 1})\n .staggerTo($('.color-box'), 0.3 ,{ opacity: 1}, 0.15, \"header\")\n .staggerTo($('#raw, #build'), 0.3 ,{ opacity: 0.3}, 0.15)\n .staggerTo($('.preview-window, .status'), 0.5 ,{ opacity: 1}, 0.15, \"header\")\n .to($('.tutorial, .about, footer'), 0.25 ,{ opacity: 1}, \"header\");\n\n\n\n // Animates footer heart.\n TweenMax.to('#heart', 1, {scale: 1.2, repeat: -1});\n\n // Animates Tutorial navigation.\n // Mouse in and out need to be monitored.\n $('.tutorial nav img').hover(over, out);\n function over(){\n TweenMax.to(this, 0.25, {y:5});\n //TweenMax.to('.tutorial_slides img', 1, {rotationY:360, immediateRender: false});\n }\n function out(){\n TweenMax.to(this, 0.25, {y:0});\n //TweenMax.to('.tutorial_slides img', 0, {rotationY:0});\n }\n\n}", "function genFx(type,includeWidth){var which,attrs={height:type},i=0;// if we include width, step value is 1 to do all cssExpand values,\n// if we don't include width, step value is 2 to skip over Left and Right\n includeWidth=includeWidth?1:0;for(;i<4;i+=2-includeWidth){which=cssExpand[i];attrs[\"margin\"+which]=attrs[\"padding\"+which]=type;}if(includeWidth){attrs.opacity=attrs.width=type;}return attrs;}// Generate shortcuts for custom animations", "createAnimations() {\r\n //#region Idle animation\r\n // Idle front\r\n this.anims.create({\r\n key: 'idle_front',\r\n frames: [\r\n {\r\n key: 'idle_front_0'\r\n },\r\n {\r\n key: 'idle_front_1'\r\n },\r\n {\r\n key: 'idle_front_2'\r\n },\r\n {\r\n key: 'idle_front_3'\r\n }\r\n ],\r\n frameRate: 2,\r\n repeat: -1,\r\n });\r\n\r\n // Idle back\r\n this.anims.create({\r\n key: 'idle_back',\r\n frames: [\r\n {\r\n key: 'idle_back_0'\r\n },\r\n {\r\n key: 'idle_back_1'\r\n },\r\n {\r\n key: 'idle_back_2'\r\n },\r\n {\r\n key: 'idle_back_3'\r\n }\r\n ],\r\n frameRate: 2,\r\n repeat: -1,\r\n });\r\n\r\n // Idle side\r\n this.anims.create({\r\n key: 'idle_side',\r\n frames: [\r\n {\r\n key: 'idle_side_0'\r\n },\r\n {\r\n key: 'idle_side_1'\r\n },\r\n {\r\n key: 'idle_side_2'\r\n },\r\n {\r\n key: 'idle_side_3'\r\n }\r\n ],\r\n frameRate: 2,\r\n repeat: -1,\r\n });\r\n\r\n //#endregion\r\n\r\n //#region Run animations\r\n\r\n // Run front\r\n this.anims.create({\r\n key: 'run_front',\r\n frames: [\r\n {\r\n key: 'run_front_0'\r\n },\r\n {\r\n key: 'run_front_1'\r\n },\r\n {\r\n key: 'run_front_2'\r\n },\r\n {\r\n key: 'run_front_3'\r\n }\r\n ],\r\n frameRate: 6,\r\n repeat: -1,\r\n });\r\n\r\n // Run back\r\n this.anims.create({\r\n key: 'run_back',\r\n frames: [\r\n {\r\n key: 'run_back_0'\r\n },\r\n {\r\n key: 'run_back_1'\r\n },\r\n {\r\n key: 'run_back_2'\r\n },\r\n {\r\n key: 'run_back_3'\r\n }\r\n ],\r\n frameRate: 6,\r\n repeat: -1,\r\n });\r\n\r\n // Run side\r\n this.anims.create({\r\n key: 'run_side',\r\n frames: [\r\n {\r\n key: 'run_side_0'\r\n },\r\n {\r\n key: 'run_side_1'\r\n },\r\n {\r\n key: 'run_side_2'\r\n },\r\n {\r\n key: 'run_side_3'\r\n }\r\n ],\r\n frameRate: 6,\r\n repeat: -1,\r\n });\r\n\r\n //#endregion\r\n }", "constructor(){\n this.inProgressAnimation;\n this.elementToAnimate;\n this.animationDuration;\n }", "getSignAndFrameInfo() {\n//------------------\n// Handle frame beyond end of animation\nif (this.fCur === this.fCount) {\nreturn [\"[none]\", this.signs.length, this.fCur];\n} else {\n// Rely on @frameCur being set according to @fCur\nreturn [this.frameCur.sign.gloss, this.frameCur.sign.i, this.fCur];\n}\n}", "static create(aframes, fps) {\nvar aa;\n//------\naa = new AmbientAnim();\naa.set(aframes, fps);\nreturn aa;\n}", "function createAnimation(begin, easing, attribute, fill, from, to, dur) {\n\t //Create the animation\n\t var animation = document.createElement('a-animation');\n\n\t //Set all of the given attributes\n\t begin && animation.setAttribute('begin', begin);\n\t easing && animation.setAttribute('easing', easing);\n\t attribute && animation.setAttribute('attribute', attribute);\n\t fill && animation.setAttribute('fill', fill);\n\t from && animation.setAttribute('from', from);\n\t to && animation.setAttribute('to', to);\n\t dur && animation.setAttribute('dur', dur);\n\n\t return animation;\n\t}", "generateGhostAnimation(sprite) {\n this.createAnimation(`${sprite}WalkLeft`, -1, 5, sprite, 'side_walk_');\n this.createAnimation(`${sprite}WalkRight`, -1, 5, sprite, 'right_walk_');\n this.createAnimation(`${sprite}WalkBackLeft`, -1, 5, sprite, 'back_side_walk_');\n this.createAnimation(`${sprite}WalkBackRight`, -1, 5, sprite, 'back_right_walk_');\n this.createAnimation(`${sprite}WalkBack`, -1, 5, sprite, 'back_walk_');\n this.createAnimation(`${sprite}WalkForward`, -1, 5, sprite, 'front_walk_');\n this.createAnimation(`${sprite}IdleForward`, -1, 5, sprite, 'front_stand_');\n this.createAnimation(`${sprite}IdleBack`, -1, 5, sprite, 'back_stand_');\n this.createAnimation(`${sprite}Hit`, -1, 5, sprite, 'front_hurt_');\n this.createAnimation(`${sprite}LeftHit`, -1, 5, sprite, 'side_hurt_');\n this.createAnimation(`${sprite}RightHit`, -1, 5, sprite, 'right_hurt_');\n this.createAnimation(`${sprite}BackHit`, -1, 5, sprite, 'back_hurt_');\n }", "putAnimationBoxes() {\n let cf = this.working_model.frames[this.current_frame];\n\n this.animation_display.selection = {\n x: cf.x,\n y: cf.y,\n w: cf.width,\n h: cf.height\n };\n this.animation_display.sprite_origin = {\n x: cf.offset_x,\n y: cf.offset_y\n };\n }", "function createFxNow(){window.setTimeout(function(){fxNow=undefined;});return fxNow=jQuery.now();} // Generate parameters to create a standard animation", "function createFxNow(){window.setTimeout(function(){fxNow=undefined;});return fxNow=jQuery.now();} // Generate parameters to create a standard animation", "setAnimation(levelName,entityName=`entity${this.data.id}`){ \n this.animationName = entityName // Set animation name as member variable\n $.keyframe.define([{ // Dynamically create keyframe animation\n name: `${levelName}_${entityName}_anim`,\n '100%': {'background-position': `-${this.data.entity.crop}px`} \n }]);\n }", "function initConstants()\n {\n constants.delay = 12; \n constants.initialTheta = 0;\n constants.thetaDelta = 0.3;\n svgElement = document.getElementById(\"svgElement\");\n transformObject = svgElement.createSVGTransform();\n transformObject2 = svgElement.createSVGTransform();\n }", "function renderAnimation(ctx, width, height, angle, length) {\n length = length * 200;\n // Attachment of the pendulum\n var baseX = width / 2;\n var baseY = 50;\n var weightX = baseX + length * Math.sin(angle);\n var weightY = baseY + length * Math.cos(angle);\n ctx.clearRect(0, 0, width, height);\n ctx.beginPath();\n ctx.fillStyle = \"#2B2\";\n ctx.arc(baseX, baseY, 5, 0, 2 * Math.PI);\n ctx.fill();\n ctx.beginPath();\n ctx.strokeStyle = \"#000\";\n ctx.moveTo(baseX, baseY);\n ctx.lineTo(weightX, weightY);\n ctx.stroke();\n ctx.beginPath();\n ctx.fillStyle = \"#22B\";\n ctx.arc(weightX, weightY, 10, 0, 2 * Math.PI);\n ctx.fill();\n}", "setFrameProperties(numberOfAnimations, indexAnimation) {\n this.frame.width = this.img.width / this.numberOfFrames\n this.frame.height = this.img.height / numberOfAnimations\n this.frame.posX = 0\n this.frame.posY = this.frame.height * indexAnimation\n }", "function output5() {\n var element = document.getElementById(\"output\");\n element.innerHTML = \"/*CSS*/ <br />\"\n + \".scenario5 { <br />\"\n + g_tab + scenarioTransformValues + \"<br />\"\n + g_tab + scenarioDurationValues + \"<br />\"\n + g_tab + scenarioDelayValues + \"<br />\"\n + g_tab + scenarioTimFunValues + \"<br />\"\n + \"}<br />\"\n + \"@keyframes animation2D { <br />\"\n + d_tab + scenarioKeyfrom + \"<br />\"\n + d_tab + scenarioKey50 + \"<br />\"\n + d_tab + scenarioKeyto + \"<br />\"\n + g_tab + \"} <br />\";\n }", "function animate_NAff() {\n defo= (defo+1.0) % 180\n loadVertices();\n}", "function animationSetUp() {\n // Pacman's frames\n for (let i = 0; i < 5; i++) {\n for (let j = 0; j < 4; j++) {\n let frame = pacmanImg.get(j * 32, i * 32, 32, 32)\n pacmanFrames.push(frame)\n }\n }\n\n for (let i = 0; i < 3; i++) {\n for (let j = 0; j < 2; j++) {\n leftImages.push(leftGhosts.get(j * 32, i * 32, 32, 32))\n rightImages.push(rightGhosts.get(j * 32, i * 32, 32, 32))\n upImages.push(upGhosts.get(j * 32, i * 32, 32, 32))\n downImages.push(downGhosts.get(j * 32, i * 32, 32, 32))\n }\n }\n}", "function initialisationOfVariables() {\n gravity = 9.8; /** Initial graviational value of environmetn */\n mass_of_flywheel = 5; /** Initial mass of fly wheel */\n diameter_of_flywheel = 10; /** Initial diameterof fly wheel */\n mass_of_rings = 200; /** Initial mass of hanging weight */\n diameter_of_axle = 2; /** Initial diameter of axl of fly wheel */\n no_of_wound = 1; /** Initial number of wounds on fly wheel */\n rotation_speed = wheel_rotation_speed = 33600/4; /** Initially speed rate of fly wheel in milli seconds */\n speed_correction = 2.0001; /** Speed correction value for adjusting the speed of fly wheel */\n thread_anim_frame = 0; /** First frame of thread animation image */\n time_slots =[]; /** Array store the time taken for each rotation */\n time_slot_indx = 0; /** Index of time slot array */\n line_mask = new createjs.Shape();\n line_mask.name = \"line_mask\";\n rotation = 0;\n rotation_decimal = 0;\n line_mask.graphics.drawRect(300, 0, 200, 555);\n line_mask.y = 0;\n long_string.mask = line_mask;\n thread_anim_width = 199.869; /** Variable to indicate the width of each frame of thread animation image */\n wound = new createjs.Shape(); /** Shape object to create wound over axl of fly wheel */\n string_x_pos = 0; /** Initial position of string wounded over axl of fly wheel */\n itration = 0; /** Variable to increment the length of long string while releasing string */\n x_decrement = 0; /** Variable to set the horizontal position of long string whilw releasing the string */\n drawLongString(385); /** Function to draw hanging string */\n rolling = false; /** Variable to indicate that strating of fly wheel rotation, and it used to differentiate initial wheel rotation and wheel rotation after pause */\n INTERVAL = 0.2; /** Basic time interval of simulation(200 milli second) */\n total_rotation = 360; /** One roation of fly wheel */\n angular_velocity = 0; /** Initial value of angular velocity */\n angular_distance = 0; /** Initial value of angular distance */\n number_of_rotation = 0; /** Initial value of number of rotation */\n final_rotation = false;\n getChildName(\"height_txt\").text = \"02cm\";\n}", "function setItemParams(themeNames) {\n\n themes.beach.items.beachball = {\n posX: 300, posY: 250, scale: 1, rotation: 10,\n movX: 20, movY: 70, scaleTo: 1, duration: 2, \n easing: \"BounceEaseOut\"};\n \n themes.beach.items.bucket = {posX: 200, posY: 300, scale: 0.6, rotation: 10,\n movX: 0, movY: 0, scaleTo: 0.6, duration: 1, easing: \"StrongEaseInOut\"};\n themes.beach.items.crab = {posX: 300, posY: 300, scale: 0.9,\n movX: 30, movY: 0, scaleTo: 0.9, duration: 1, easing: \"EaseOut\"};\n themes.beach.items.jellyfish = {posX: 300, posY: 100, scale: 1,\n movX: 30, movY: -40, scaleTo: 1, duration: 2, easing: \"EaseInOut\"};\n themes.beach.items.lifeguard = {posX: 300, posY: 200, scale: 1.1,\n movX: -20, movY: 0, scaleTo: 1.1, duration: 2, easing: \"Linear\"};\n themes.beach.items.sandcastle = {posX: 350, posY: 500, scale: 0.1,\n movX: 0, movY: -100, scaleTo: 0.9, duration: 4, easing: \"StrongEaseInOut\"};\n themes.beach.items.seagull = {posX: 200, posY: 100, scale: 0.7, rotation: 5,\n movX: -100, movY: 50, scaleTo: 0.8, duration: 2, easing: \"EaseInOut\"};\n themes.beach.items.seashell = {posX: 400, posY: 280, scale: 0.4,\n movX: 0, movY: 20, scaleTo: 1.1, duration: 2, easing: \"Linear\"};\n themes.beach.items.towel = {posX: 100, posY: 350, scale: 0,\n movX: 00, movY: 0, scaleTo: 1.2, duration: 1, easing: \"StrongEaseInOut\"};\n themes.beach.items.umbrella = {posX: 80, posY: -40, scale: 1,\n movX: 10, movY: 20, scaleTo: 1, duration: 1, easing: \"StrongEaseInOut\"};\n\n themes.home.items.backyard = {posX: 100, posY: 0, scale: 0.88,\n movX: 0, movY: 0, scaleTo: 0.9, duration: 1, easing: \"Linear\"};\n themes.home.items.bath = {posX: 100, posY: 200, scale: .99,\n movX: 0, movY: 0, scaleTo: 1, duration: 1, easing: \"Linear\"};\n themes.home.items.bed = {posX: 80, posY: 250, scale: .99,\n movX: 0, movY: 0, scaleTo: 1, duration: 1, easing: \"Linear\"};\n themes.home.items.fridge = {posX: 200, posY: 20, scale: 0.97,\n movX: 0, movY: 0, scaleTo: 1, duration: 1, easing: \"Linear\"};\n themes.home.items.lounge = {posX: 190, posY: 170, scale: 0.99,\n movX: 0, movY: 0, scaleTo: 1, duration: 1, easing: \"Linear\"};\n themes.home.items.oven = {posX: 100, posY: 200, scale: 0.9,\n movX: 0, movY: 0, scaleTo: 0.92, duration: 1, easing: \"Linear\"};\n themes.home.items.parents = {posX: 270, posY: 250, scale: 0.9,\n movX: 0, movY: 20, scaleTo: 1, duration: 1, easing: \"Linear\"};\n themes.home.items.toilet = {posX: 280, posY: 180, scale: 0.99,\n movX: 0, movY: 0, scaleTo: 1, duration: 1, easing: \"Linear\"};\n themes.home.items.tv = {posX: 280, posY: 60, scale: .99,\n movX: 0, movY: 0, scaleTo: 1, duration: 1, easing: \"Linear\"};\n themes.home.items.washing_machine = {posX: 400, posY: 160, scale: 0.98,\n movX: 0, movY: 0, scaleTo: 1, duration: 1, easing: \"Linear\"};\n\n themes.farm.items.chicken = {posX: 675, posY: 420, scale: 0.8,\n movX: -20, movY: 0, scaleTo: 0.8, duration: 1, easing: \"EaseInOut\"};\n themes.farm.items.cow = {posX: 350, posY: 350, scale: 1,\n movX: -20, movY: 0, scaleTo: 1, duration: 1, easing: \"Linear\"};\n themes.farm.items.duck = {posX: 540, posY: 380, scale: 1,\n movX: -20, movY: 0, scaleTo: 1, duration: 1, easing: \"Linear\"};\n themes.farm.items.farmer = {posX: 600, posY: 380, scale: 0.97,\n movX: 0, movY: 5, scaleTo: 1, duration: 1, easing: \"Linear\"};\n themes.farm.items.horse = {posX: 260, posY: 150, scale: 1,\n movX: -20, movY: 0, scaleTo: 1, duration: 1, easing: \"Linear\"};\n themes.farm.items.goat = {posX: 380, posY: 340, scale: 1,\n movX: 20, movY: 0, scaleTo: 1, duration: 1, easing: \"EaseInOut\"};\n themes.farm.items.pig = {posX: 350, posY: 380, scale: 1,\n movX: 20, movY: 0, scaleTo: 1, duration: 1, easing: \"Linear\"};\n themes.farm.items.scarecrow = {posX: 300, posY: 280, scale: 1,\n movX: 0, movY: 0, scaleTo: 1.2, duration: 1, easing: \"EaseInOut\"};\n themes.farm.items.sheep = {posX: 350, posY: 370, scale: 1,\n movX: -20, movY: 0, scaleTo: 1, duration: 1, easing: \"Linear\"};\n themes.farm.items.tractor = {posX: 230, posY: 250, scale: 0.98,\n movX: -20, movY: 10, scaleTo: 1, duration: 1, easing: \"Linear\"};\n\n themes.pets.items.bird = {posX: 180, posY: 390, scale: 1,\n movX: 20, movY: 0, scaleTo: 1, duration: 1, easing: \"EaseInOut\"};\n themes.pets.items.goldfish = {posX: 280, posY: 280, scale: 1,\n movX: -30, movY: 0, scaleTo: 1, duration: 2, easing: \"Linear\"};\n themes.pets.items.guineapig = {posX: 290, posY: 200, scale: 1,\n movX: -20, movY: 0, scaleTo: 1, duration: 4, easing: \"Linear\"};\n themes.pets.items.hermitcrab = {posX: 310, posY: 290, scale: 1,\n movX: 20, movY: 0, scaleTo: 1, duration: 4, easing: \"Linear\"};\n themes.pets.items.kitten = {posX: 430, posY: 370, scale: 0.95,\n movX: 0, movY: 0, scaleTo: 1, duration: 4, easing: \"Linear\"};\n themes.pets.items.lamb = {posX: 430, posY: 270, scale: 1,\n movX: 20, movY: 0, scaleTo: 1, duration: 1, easing: \"Linear\"};\n themes.pets.items.mouse = {posX: 420, posY: 220, scale: 1,\n movX: 0, movY: -20, scaleTo: 1, duration: 4, easing: \"Linear\"};\n themes.pets.items.puppy = {posX: 385, posY: 280, scale: 1, rotation: -3,\n movX: -5, movY: 10, scaleTo: 1, duration: 1, easing: \"EaseInOut\"};\n themes.pets.items.rabbit = {posX: 290, posY: 270, scale: 1,\n movX: 10, movY: 0, scaleTo: 1, duration: 1, easing: \"Linear\"};\n themes.pets.items.turtle = {posX: 390, posY: 251, scale: 1, rotation: 3,\n movX: 10, movY: 0, scaleTo: 1, duration: 2, easing: \"Linear\"};\n\n themes.picnic.items.ants = {posX: 180, posY: 320, scale: 1,\n movX: 50, movY: 0, scaleTo: 1, duration: 2, easing: \"EaseInOut\"};\n themes.picnic.items.bbq = {posX: 180, posY: 320, scale: 0,\n movX: 50, movY: 0, scaleTo: 0, duration: 2, easing: \"EaseInOut\"};\n themes.picnic.items.boomerang = {posX: 270, posY: 150, scale: 1, rotation: 360,\n movX: -200, movY: 0, scaleTo: 0.8, duration: 2, easing: \"Linear\"};\n themes.picnic.items.park_bench = {posX: 80, posY: 30, scale: 0.9,\n movX: 0, movY: 0, scaleTo: 0.9, duration: 1, easing: \"Linear\"};\n themes.picnic.items.picnic_basket = {posX: 120, posY: 320, scale: 1,\n movX: 0, movY: 0, scaleTo: 1, duration: 4, easing: \"Linear\"};\n themes.picnic.items.picnic_blanket = {posX: 240, posY: 260, scale: 1,\n movX: 0, movY: 0, scaleTo: 1, duration: 4, easing: \"Linear\"};\n themes.picnic.items.tennisball = {posX: 380, posY: 210, scale: 1,rotation: 90,\n movX: -130, movY: 20, scaleTo: 1, duration: 2, easing: \"Linear\"};\n \n themes.playground.items.slide = {posX: 200, posY: 50, scale: 1,\n movX: 0, movY: 0, scaleTo: 1, duration: 1, easing: \"Linear\"};\n themes.playground.items.swings = {posX: 150, posY: 130, scale: 1,\n movX: 0, movY: 0, scaleTo: 1, duration: 1, easing: \"Linear\"};\n themes.playground.items.trampoline = {posX: 230, posY: 120, scale: 1,\n movX: 0, movY: 0, scaleTo: 1, duration: 1, easing: \"Linear\"};\n themes.playground.items.tunnel = {posX: 260, posY: 150, scale: 1,\n movX: 0, movY: 0, scaleTo: 1, duration: 1, easing: \"Linear\"};\n\n themes.school.items.blackboard = {posX: 240, posY: 80, scale: 1,\n movX: 0, movY: 0, scaleTo: 1, duration: 1, easing: \"Linear\"};\n themes.school.items.lunchbox = {posX: 320, posY: 170, scale: 1,\n movX: 0, movY: 0, scaleTo: 1, duration: 1, easing: \"Linear\"};\n themes.school.items.pencils = {posX: 530, posY: 400, scale: 1,\n movX: 0, movY: 0, scaleTo: 1, duration: 1, easing: \"Linear\"};\n themes.school.items.singing = {posX: 230, posY: 200, scale: 1,\n movX: 0, movY: 0, scaleTo: 1, duration: 1, easing: \"Linear\"};\n\n themes.shops.items.icecream_truck = {posX: 40, posY: 180, scale: 1,rotation: -4,\n movX: -200, movY: 100, scaleTo: 1, duration: 4, easing: \"EaseIn\"};\n themes.shops.items.money = {posX: 250, posY: 90, scale: 1.1,\n movX: 0, movY: 0, scaleTo: 1.1, duration: 1, easing: \"Linear\"};\n themes.shops.items.vegetables = {posX: 190, posY: 265, scale: 0,\n movX: 0, movY: 0, scaleTo: 0, duration: 4, easing: \"Linear\"};\n\n themes.sport.items.basketball = {posX: 320, posY: 130, scale: 1,\n movX: 0, movY: -20, scaleTo: 1, duration: 1, easing: \"Linear\"};\n themes.sport.items.cricket = {posX: 200, posY: 290, scale: 1,\n movX: 0, movY: 0, scaleTo: 1, duration: 1, easing: \"Linear\"};\n themes.sport.items.football = {posX: 500, posY: 500, scale: 0.5,rotation: 180,\n movX: -100, movY: -440, scaleTo: 0.1, duration: 2, easing: \"EaseInOut\"};\n themes.sport.items.gymnastics = {posX: 280, posY: 120, scale: 1,\n movX: 10, movY: 0, scaleTo: 1, duration: 2, easing: \"Linear\"};\n themes.sport.items.netball = {posX: 300, posY: 100, scale: 1,\n movX: 10, movY: -20, scaleTo: 1, duration: 1, easing: \"EaseIn\"};\n themes.sport.items.soccer = {posX: 230, posY: 250, scale: 1,\n movX: 10, movY: 10, scaleTo: 1.1, duration: 1, easing: \"Linear\"};\n themes.sport.items.tennis = {posX: 100, posY: 230, scale: 1,\n movX: 10, movY: 0, scaleTo: 1, duration: 1, easing: \"Linear\"};\n\n themes.transport.items.bicycle = {posX: 360, posY: 220, scale: 1, rotation: 5,\n movX: 55, movY: 15, scaleTo: 1, duration: 1, easing: \"EaseOut\"};\n themes.transport.items.bus = {posX: 380, posY: 270, scale: 1, rotation: -2,\n movX: -40, movY: 0, scaleTo: 1, duration: 2, easing: \"Linear\"};\n themes.transport.items.car = {posX: 50, posY: 90, scale: .4, rotation: -3,\n movX: -40, movY: 30, scaleTo: .4, duration: 2, easing: \"Linear\"};\n themes.transport.items.motorcycle = {posX: 390, posY: 370, scale: 1,\n movX: -50, movY: 0, scaleTo: 1, duration: 2, easing: \"EaseInOut\"};\n themes.transport.items.plane = {posX: 40, posY: 170, scale: .4,rotation: 5,\n movX: 100, movY: 0, scaleTo: 1, duration: 2, easing: \"Linear\"};\n themes.transport.items.rocket = {posX: 100, posY: 380,rotation: -5,\n movX: 700, movY: -230, scale: 1, scaleTo: 0, duration: 4, easing: \"EaseOut\", };\n themes.transport.items.scooter = {posX: 220, posY: 150, scale: 0.96,\n movX: -60, movY: 10, scaleTo: 1, duration: 2, easing: \"EaseOut\"};\n themes.transport.items.ship = {posX: 200, posY: 280, scale: 0.9, rotation: -5,\n movX: 80, movY: 0, scaleTo: 1, duration: 2, easing: \"Linear\"};\n themes.transport.items.train = {posX: 260, posY: 230, scale: 1.17,rotation: -2,\n movX: -16, movY: 0, scaleTo: 1.24, duration: 1, easing: \"Linear\"};\n themes.transport.items.tram = {posX: 120, posY: 180, scale: 1.2,\n movX: -150, movY: 0, scaleTo: 1.2, duration: 3, easing: \"EaseOut\"};\n\n $.each(themeNames, function(themeName, items) {\n $.each(items, function(idx, item) {\n themes[themeName].items[item].imgName = item;\n themes[themeName].items[item].imgSrc = docUrl + \"themes/\" + themeName\n + \"/items/\" + item + \".png\";\n themes[themeName].items[item].callback = function() {\n };\n drawImage(themes[themeName].items[item]);\n });\n });\n}", "function createObjectAnimations() {\r\n this.anims.create({\r\n key: 'jewelAnims',\r\n frames: this.anims.generateFrameNumbers('jewel', { start: 0, end: 4 }),\r\n frameRate: 10,\r\n repeat: -1,\r\n });\r\n\r\n this.anims.create({\r\n key: 'cherryAnims',\r\n frames: this.anims.generateFrameNumbers('cherry', { start: 0, end: 6 }),\r\n frameRate: 6,\r\n repeat: -1,\r\n });\r\n}", "function InitValues_L2(){\n ggbApplet.setCoords(\"A\", 0.0, 3.5);\n ggbApplet.setCoords(\"B\", 1.5, 2.0);\n ggbApplet.setCoords(\"C\", 1.5, 4.0);\n ggbApplet.setCoords(\"D\", 2.5, 1.5);\n ggbApplet.setCoords(\"E\", 4.5, 2.5);\n ggbApplet.evalCommand(\"u = Vector(D, E)\");\n ggbApplet.evalCommand(\"t1 = Polygon(A, B, C)\");\n\n posA = [0.0, 3.5];\n posB = [1.5, 2.0];\n posC = [1.5, 4.0];\n posD = [2.5, 1.5];\n posE = [4.5, 2.5];\n vector = [2, 1];\n \n ggbApplet.stopAnimation();\n if(ggbApplet.exists(\"sldAnimation\") != true) {\n ggbApplet.evalCommand('sldAnimation = Slider('+ANIMATION_MIN+','+ANIMATION_MAX+','+ ANIMATION_INTERVAL+','+ANIMATION_SPEED+', 100, false, true, true, false)');\n }\n ggbApplet.evalCommand('sldAnimation = 0');\n}", "getAnimationStyle () {\n\n if ( this.sortableAnimation === 0 ) {\n return {};\n }\n\n const secs = this.sortableAnimation / 1000;\n\n return {\n transition: `all ${ secs }s ease-in`\n };\n\n }", "function setupAnimation(){\n\t// create canvas\n\tvar ctx = animation.persist.ctx = lib.canvas.create('canvas1');\n\n\twindow.requestAnimationFrame(animation.draw);\n}", "function animation() {\n\t\t\t\t// track time\n\t\t\t\tcurrent = Date.now();\n\t\t\t\telapsed = (current - lastTime) / 1000;\n\t\t\t\tif (elapsed > max_elapsed_wait) {\n\t\t\t\t\telapsed = max_elapsed_wait;\n\t\t\t\t}\n\n\n\t\t\t\tif (counter_time > time_step) {\n\n\n\n\t\t\t\t}\n\t\t\t\t//METEORITOS\n\t\t\t\tif(ygrados>-100000 && temp==1){\n\t\t\t\t\tygrados = ygrados - 0.01 * 70;\n\n\t\t\t\t\tmono.setT(CG.Matrix4.multiply(CG.Matrix4.multiply(CG.Matrix4.translate(new CG.Vector3(10,0,250)),CG.Matrix4.scale(new CG.Vector3(3,3,3))),CG.Matrix4.rotateY((Math.radians(ygrados)))));\n\t\t\t\t\tgeometry[0].setT(CG.Matrix4.multiply(CG.Matrix4.multiply(CG.Matrix4.rotateX(90*(-Math.PI/180)),CG.Matrix4.translate(new CG.Vector3(0,0,-1))),CG.Matrix4.rotateZ((Math.radians(ygrados)))));\n\n\n\t\t\t\t\tgeometry[4].setT(CG.Matrix4.multiply(CG.Matrix4.multiply(CG.Matrix4.rotateX(90*(-Math.PI/180)),CG.Matrix4.translate(new CG.Vector3(10,0,30))),CG.Matrix4.rotateZ((Math.radians(ygrados)))))\n\n\n\t\t\t\t\tgeometry[5].setT(CG.Matrix4.multiply(CG.Matrix4.multiply(CG.Matrix4.rotateX(90*(-Math.PI/180)),CG.Matrix4.translate(new CG.Vector3(50,0,-50))),CG.Matrix4.rotateZ((Math.radians(ygrados)))));\n\n\t\t\t\t\tgeometry[7].setT(CG.Matrix4.multiply(CG.Matrix4.multiply(CG.Matrix4.rotateX(90*(-Math.PI/180)),CG.Matrix4.translate(new CG.Vector3(80,40,-50))),CG.Matrix4.rotateZ((Math.radians(ygrados)))));\n\n\t\t\t\t\tgeometry[8].setT(CG.Matrix4.multiply(CG.Matrix4.multiply(CG.Matrix4.rotateX(90*(-Math.PI/180)),CG.Matrix4.translate(new CG.Vector3(30,20,50))),CG.Matrix4.rotateZ((Math.radians(ygrados)))));\n\n\t\t\t\t\tgeometry[9].setT(CG.Matrix4.multiply(CG.Matrix4.multiply(CG.Matrix4.rotateX(90*(-Math.PI/180)),CG.Matrix4.translate(new CG.Vector3(50,-80,20))),CG.Matrix4.rotateZ((Math.radians(ygrados)))));\n\n\t\t\t\t\tgeometry[10].setT(CG.Matrix4.multiply(CG.Matrix4.multiply(CG.Matrix4.rotateX(90*(-Math.PI/180)),CG.Matrix4.translate(new CG.Vector3(70,-150,-20))),CG.Matrix4.rotateZ((Math.radians(ygrados)))));\n\n\t\t\t\t\tgeometry[11].setT(CG.Matrix4.multiply(CG.Matrix4.multiply(CG.Matrix4.rotateX(90*(-Math.PI/180)),CG.Matrix4.translate(new CG.Vector3(20,100,-70))),CG.Matrix4.rotateZ((Math.radians(ygrados)))));\n\n\t\t\t\t\tgeometry[12].setT(CG.Matrix4.multiply(CG.Matrix4.multiply(CG.Matrix4.rotateX(90*(-Math.PI/180)),CG.Matrix4.translate(new CG.Vector3(20,10,-50))),CG.Matrix4.rotateZ((Math.radians(ygrados)))));\n\n\n\t\t\t\t\tgeometry[13].setT(CG.Matrix4.multiply(CG.Matrix4.multiply(CG.Matrix4.rotateX(90*(-Math.PI/180)),CG.Matrix4.translate(new CG.Vector3(80,60,-20))),CG.Matrix4.rotateZ((Math.radians(ygrados)))));\n\n\t\t\t\t}\n\n\n\t\t\t\tdraw();\n\t\t\t\tcounter_time = 0;\n\t\t\t}", "function AnimationStyleMetadata() { }", "function AnimationStyleMetadata() { }", "function Animation(logistics) {\n _classCallCheck(this, Animation);\n\n var time = 0;\n this.startTime = 0;\n this.currentTime = time;\n this.begin = logistics.begin;\n this.loop = logistics.loop;\n this.timeToFinish = logistics.timeToFinish;\n this.propsBegin = logistics.propsBegin;\n this.propsEnd = logistics.propsEnd;\n this.propsCurrent = {};\n this.complete = false;\n\n var propKeys = Object.keys(this.propsBegin);\n for (var i = 0; i < propKeys.length; i++) {\n var key = propKeys[i];\n this.propsCurrent[key] = this.propsBegin[key];\n }\n }", "function main() {\n var N = 22; //Number of animation frames from 0 e.g. N=1 is the same as having two images which swap...\n Conf.augment ? Conf.animate += 1 : Conf.animate -= 1;\n if(Conf.animate === 0 || Conf.animate === N) {\n Conf.augment ? Conf.augment = false : Conf.augment = true;\n }\n }", "keyFrameAnimate(){\n\t\tlet animationRules = '';\n\t\tthis.keyFrameStyle = document.createElement('style');\n\t\tthis.keyFrameStyle.type = 'text/css';\n\n\t\t//create proper keyframe string for style element\n\t\tthis.animationProperties\n\t\t\t.map(obj => this.keyFrameStateFrom(obj))\n\t\t\t.map(styleObj => this.stringify(styleObj))\n\t\t\t.forEach(stringified => animationRules += stringified);\n\n\t\tthis.keyFrameStyle.innerHTML = `@keyframes ${this.animationName} {${animationRules}}`;\n\t\tdocument.getElementsByTagName('head')[0].appendChild(this.keyFrameStyle);\n\n\t\t//cache the time when animation starts\n\t\tthis.element.addEventListener(\"animationstart\", () => this.startTime = (new Date()).getTime());\n\n\t\t//set styles of animation configs\n\t\tObject.assign(this.animationConfig, {'animation-name': this.animationName});\n\t\tthis.appendCssClass(`${this.animationName}_class`, this.animationConfig);\n\n\t\t//If button and range were provided set event handlers(range is pointless without animation-duration)\n\t\tif(this.playPauseButton !== null && !this.isPlayPauseEventAttached){\n\t\t\tthis.isPlayPauseEventAttached = true;\n\t\t\tthis.playPauseButton.addEventListener('click', this.switchRunningState.bind(this));\n\t\t}\n\t\tif(!this.isSeekEventAttached && this.seekRange !== null && this.animationConfig.hasOwnProperty('animation-duration')){\n\t\t\tthis.isSeekEventAttached = true;\n\t\t\tconst duration = +this.animationConfig['animation-duration'].split('s')[0];\n\t\t\tthis.seekRange.setAttribute('min', 0);\n\t\t\tthis.seekRange.setAttribute('max', 100);\n\t\t\tthis.seekRange.addEventListener('mousedown', this.pause.bind(this));\n\t\t\tthis.seekRange.addEventListener('input', this.seek(duration*1000).bind(this));\n\t\t\tthis.seekRange.addEventListener('mouseup', this.run.bind(this));\n\t\t}\n\t}", "function initValues_Step14(){\n valuesStep14 = {\n posistion: {x:37.5, y:-4, z:182},\n scale: {x:4, y:4, z:1},\n quat: {x:1, y:0, z:0,w:1},\n mass: 0,\n frictions: 0.9,\n restitution: 0.8,\n howMany: 2,\n placeObjectPosition: {x:0,y:0,z:7},\n groundMaterial : new THREE.MeshPhongMaterial( { color: 0x09F099, side: THREE.DoubleSide } )\n }\n}", "function Animation(opciones)\n{\n // Most of these opciones are null because the defaults are different depending on the type of animacion.\n let opcionesDefecto = {\n 'type' : 'spinOngoing', // For now there are only supported types are spinOngoing (continuous), spinToStop, spinAndBack, custom.\n 'direction' : 'clockwise', // clockwise or anti-clockwise.\n 'propertyName' : null, // The name of the winning wheel property to be affected by the animacion.\n 'propertyValue' : null, // The value the property is to be set to at the end of the animacion.\n 'duration' : 10, // Duration of the animacion.\n 'yoyo' : false, // If the animacion is to reverse back again i.e. yo-yo.\n 'repeat' : null, // The number of times the animacion is to repeat, -1 will cause it to repeat forever.\n 'easing' : null, // The easing to use for the animacion, default is the best for spin to stop. Use Linear.easeNone for no easing.\n 'stopAngle' : null, // Used for spinning, the angle at which the wheel is to stop.\n 'spins' : null, // Used for spinning, the number of complete 360 degree rotations the wheel is to do.\n 'limpiarElCanvas' : null, // If set to true the canvas1 will be cleared before the wheel is re-drawn, false it will not, null the animacion will abide by the value of this property for the parent wheel object.\n 'callbackFinished' : null, // Function to callback when the animacion has finished.\n 'callbackBefore' : null, // Function to callback before the wheel is drawn each animacion loop.\n 'callbackAfter' : null, // Function to callback after the wheel is drawn each animacion loop.\n 'callbackSound' : null, // Function to callback if a sound should be triggered on change of segment or pin.\n 'soundTrigger' : 'segment' // Sound trigger type. Default is segment which triggers when segment changes, can be pin if to trigger when pin passes the pointer.\n };\n\n // Now loop through the default opciones and create properties of this class set to the value for\n // the option passed in if a value was, or if not then set the value of the default.\n for (let llave in opcionesDefecto) {\n if ((opciones != null) && (typeof(opciones[llave]) !== 'undefined')) {\n this[llave] = opciones[llave];\n } else {\n this[llave] = opcionesDefecto[llave];\n }\n }\n\n // Also loop though the passed in opciones and add anything specified not part of the class in to it as a property.\n if (opciones != null) {\n for (let llave in opciones) {\n if (typeof(this[llave]) === 'undefined') {\n this[llave] = opciones[llave];\n }\n }\n }\n}", "init() {\n this.docElementNS = document.createElementNS(this.xmlns, 'animate');\n if (this.attributeName) {\n this.docElementNS.setAttribute('attributeName', this.attributeName);\n }\n if (this.attributeType) {\n this.docElementNS.setAttribute('attributeType', this.attributeType);\n }\n if (this.from) {\n this.docElementNS.setAttribute('from', this.from);\n }\n if (this.to) {\n this.docElementNS.setAttribute('to', this.to);\n }\n if (this.dur) {\n this.docElementNS.setAttribute('dur', this.dur);\n }\n if (this.values) {\n this.docElementNS.setAttribute('values', this.values);\n }\n if (this.repeatCount) {\n this.docElementNS.setAttribute('repeatCount', this.repeatCount);\n }\n if (this.autoBind) {\n this.bind();\n }\n }", "function Animation (){\n var animation = anime.timeline();\n \n animation.add({\n targets:'.animation',\n height:['100%',0],\n easing:'easeInOutCirc',\n delay:1000,\n duration:1000\n }).add({\n targets:'.animation h1',\n scale:[1.4, 1],\n duration:1000,\n easing :'easeOutExpo'\n },80);\n\n \n }", "InitAnims() {\n this.scene.anims.create({\n key: 'idle',\n frames: this.scene.anims.generateFrameNumbers('player_idle', { start: 0, end: 5 }),\n frameRate: 8,\n repeat: -1\n });\n this.scene.anims.create({\n key: 'run',\n frames: this.scene.anims.generateFrameNumbers('player_run', { start: 0, end: 39 }),\n frameRate: 60,\n repeat: -1\n });\n this.scene.anims.create({\n key: 'jump',\n frames: [{ key: 'player_jump', frame: 0 }],\n frameRate: 24\n });\n this.scene.anims.create({\n key: 'attack',\n frames: this.scene.anims.generateFrameNumbers('player_attack', { start: 0, end: 7 }),\n frameRate: 24,\n showOnStart: true,\n hideOnComplete: true\n });\n this.scene.anims.create({\n key: 'death',\n frames: this.scene.anims.generateFrameNumbers('player_death', { start: 0, end: 7 }),\n frameRate: 4,\n showOnStart: true,\n hideOnComplete: false\n });\n }", "preload() {\n this.anims.create({\n key: \"idle\", \n frameRate: 10, \n repeat: -1,\n frames: this.anims.generateFrameNumbers(\"IDLE\", {\n frames: [0,1]\n })\n });\n\n this.anims.create({\n key: \"idleLeft\", \n frameRate: 5, \n repeat: -1,\n frames: this.anims.generateFrameNumbers(\"IDLE\", {\n frames: [1,0]\n })\n });\n\n this.anims.create({\n key: \"runRight\", \n frameRate: 7, \n repeat: -1,\n frames: this.anims.generateFrameNumbers(\"IDLE\", {\n //frames: [2,3,4,5,6,7]\n frames: [0,1]\n })\n });\n \n this.anims.create({\n key: \"runLeft\", \n frameRate: 7, \n repeat: -1,\n frames: this.anims.generateFrameNumbers(\"RUN\", {\n frames: [7,6,5,4,3,2]\n })\n });\n\n this.anims.create({\n key: \"slash\", \n frameRate: 60, \n repeat: -1,\n frames: this.anims.generateFrameNumbers(\"SLASH\", {\n frames: [0,1,2,3,4,5,6,7,8]\n })\n });\n \n this.load.image(\"ground\", \"./assets/ground.png\");\n }", "constructor(p, data, startHrs, startMins, am, width, height, fogTimes) {\n this.p = p;\n this.baseTimeMinutes = timeInMins(startHrs, startMins);\n this.ampm = am;\n this.data = data;\n this.fogTimes = fogTimes;\n\n /**\n * ANIMATION TIME CONSTANTS\n */\n /* Canvas will refresh 60 times a second */\n this.fRate = 60;\n /* A 'minute' in the animation will last 100 frames. */\n this.framesPerMin = 100;\n /** The length of this animation, in minutes. \n * Based on latest departure time of any visitor in the data array.\n * Add 5 to allow time for the latest departure to exit the screen\n * before restarting the animation. */\n this.durationInMins = 5 + getLatestDeparture(data);\n console.log(this.durationInMins);\n\n /**\n * ANIMATION LIFECYCLE STATE\n * Reset at the start of every animation\n */\n this.frameCount = 0;\n\n /**\n * MINUTE-BY-MINUTE STATE\n * Updated every minute for visitors within that minute\n */\n /* Array of objects that have x;N, y;N, and data:VisitorData fields,\n where VisitorData is {type:{r|c|w}, dir{up|down}, arrival:Minute, [departure:Minute]} */\n this.activeVisitors = [];\n // Shallow copy of data that can be mutated\n this.waitingVisitors = this.data.slice();\n /* Number of frames that elapse between each visitor in the current minute */\n this.framesPerVisitor;\n /* Array of VisitorData objects, the visitors that will be added\n to the animation during the current minute */\n this.visitorsInMin = [];\n\n /**\n * DRAWING (size + color) CONSTANTS\n * Known / given constants,\n * and dynamically calculated constants.\n */\n this.myWidth = width; // should be windowWidth when constructed\n this.myHeight = height; // should be 400 when constructed\n this.visitorDotSize = 10; // size of visitor dots in animatino\n // Calculate + set width-dependent drawing constants.\n this.initSizeConstants();\n // Init the color constants.\n this.initColorConstants();\n }", "function setAnimationPoints(){\n var a = vec4(0, 0, 0, 1);\n var b = vec4(-5, -25, 0, 1);\n var c = vec4(5, -25, 0, 1);\n var d = vec4(0, 0, 0, 1);\n var bezier = new Bezier([a, b, c, d]);\n animationPoints = bezier.vertices;\n}", "function animateCommute() {\r\n var transformation1;\r\n var transformation2;\r\n var transformationSelector1 = document.getElementById('TransformationSelector1').value;\r\n var transformationSelector2 = document.getElementById('TransformationSelector2').value;\r\n var frameSize = 20;\r\n var extra = axes.slice();\r\n extra.push(sphere);\r\n\r\n if (transformationSelector1===\"Rotation1\"){\r\n\r\n var rotateAxis = document.getElementById('TransformationRelative1').value\r\n var slider = document.getElementById(\"rotator1\").value;\r\n var start1 = 0;\r\n var end1 = slider * Math.PI;\r\n\r\n if (rotateAxis === \"X\") {\r\n transformation1 = rotationX;\r\n } else if (rotateAxis === \"Y\") {\r\n transformation1 = rotationY;\r\n } else if (rotateAxis === \"Z\") {\r\n transformation1 = rotationZ;\r\n }\r\n }else if (transformationSelector1 ===\"Reflection1\"){\r\n var plane = document.getElementById(\"TransformationRelative1\").value;\r\n var start1 = 1.0;\r\n var end1 = -1.0;\r\n\r\n\r\n if (plane === \"X\") {\r\n transformation1 = scaleX;\r\n extra.push({\r\n x: [0, 0],\r\n y: [-4, 4],\r\n z: [[-4, 4],\r\n [-4, 4]],\r\n colorscale: [[0.0, \"#608bbf\"], [1.0, \"#ffffff\"]],\r\n opacity: 0.5,\r\n showscale: false,\r\n type: \"surface\"\r\n })\r\n } else if (plane === \"Y\") {\r\n transformation1 = scaleY;\r\n extra.push({\r\n x: [-4, 4],\r\n y: [0, 0],\r\n z: [[-4, -4],\r\n [4, 4]],\r\n colorscale: [[0.0, \"#f7fcfb\"], [1.0, \"#f7fcfb\"]],\r\n opacity: 0.5,\r\n showscale: false,\r\n type: \"surface\"\r\n })\r\n } else if (plane === \"Z\") {\r\n transformation1 = scaleZ;\r\n extra.push({\r\n x: [-4, 4],\r\n y: [-4, 4],\r\n z: [[0, 0],\r\n [0, 0]],\r\n colorscale: [[0.0, \"#608bbf\"], [1.0, \"#ffffff\"]],\r\n opacity: 0.5,\r\n showscale: false,\r\n type: \"surface\"\r\n })\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n if (transformationSelector2 ===\"Rotation2\"){\r\n\r\n var rotateAxis = document.getElementById('TransformationRelative2').value\r\n var slider = document.getElementById(\"rotator2\").value;\r\n var start2 = 0;\r\n var end2 = slider * Math.PI;\r\n\r\n if (rotateAxis === \"X\") {\r\n transformation2 = rotationX;\r\n } else if (rotateAxis === \"Y\") {\r\n transformation2 = rotationY;\r\n } else if (rotateAxis === \"Z\") {\r\n transformation2 = rotationZ;\r\n }\r\n }else if (transformationSelector2 ===\"Reflection2\"){\r\n var plane = document.getElementById('TransformationRelative2').value;\r\n var start2 = 1.0;\r\n var end2 = -1.0;\r\n\r\n\r\n if (plane === \"X\") {\r\n transformation2 = scaleX;\r\n extra.push({\r\n x: [0, 0],\r\n y: [-4, 4],\r\n z: [[-4, 4],\r\n [-4, 4]],\r\n colorscale: [[0.0, \"#608bbf\"], [1.0, \"#ffffff\"]],\r\n opacity: 0.5,\r\n showscale: false,\r\n type: \"surface\"\r\n })\r\n } else if (plane === \"Y\") {\r\n transformation2 = scaleY;\r\n extra.push({\r\n x: [-4, 4],\r\n y: [0, 0],\r\n z: [[-4, -4],\r\n [4, 4]],\r\n colorscale: [[0.0, \"#608bbf\"], [1.0, \"#ffffff\"]],\r\n opacity: 0.5,\r\n showscale: false,\r\n type: \"surface\"\r\n })\r\n } else if (plane === \"Z\") {\r\n transformation2 = scaleZ;\r\n extra.push({\r\n x: [-4, 4],\r\n y: [-4, 4],\r\n z: [[0, 0],\r\n [0, 0]],\r\n colorscale: [[0.0, \"#608bbf\"], [1.0, \"#ffffff\"]],\r\n opacity: 0.5,\r\n showscale: false,\r\n type: \"surface\"\r\n })\r\n }\r\n\r\n\r\n }\r\n var frames = computeCommute(transformation1, transformation2,start1, end1, start2, end2,frameSize)\r\n\r\n enableUndoReset();\r\n\r\n initAnimation(\"commuteAnimate\", frames, extra, layout);\r\n startAnimation();\r\n return frames;\r\n\r\n}", "function AnimationKeyframesSequenceMetadata() { }", "function AnimationKeyframesSequenceMetadata() { }", "getAnimationBoxes() {\n let sel = this.animation_display.selection;\n let ori = this.animation_display.sprite_origin;\n\n let f = {\n x: sel.x,\n y: sel.y,\n width: sel.w,\n height: sel.h,\n offset_x: ori.x,\n offset_y: ori.y\n };\n\n this.working_model.frames[this.current_frame] = f;\n }", "function Legato_Animation_Controller()\r\n{\r\n\r\n\t// Store the default values.\r\n\tthis.move = { to: new Legato_Structure_Point(),\r\n\t by: new Legato_Structure_Point(),\r\n\t\t\t\t\t\t\t ease: Legato_Animation.EASE_NONE };\r\n\r\n\tthis.width = { to: null,\r\n\t by: null,\r\n\t\t\t\t\t\t\t ease: Legato_Animation.EASE_NONE };\r\n\r\n\tthis.height = { to: null,\r\n\t by: null,\r\n\t\t\t\t\t\t\t ease: Legato_Animation.EASE_NONE };\r\n\r\n\tthis.opacity = { to: null,\r\n\t by: null,\r\n\t\t\t\t\t\t\t ease: Legato_Animation.EASE_NONE };\r\n\r\n\tthis.background_color = { to: new Legato_Structure_Color(),\r\n\t by: new Legato_Structure_Color() };\r\n\r\n\tthis.border_color = { to: new Legato_Structure_Color(),\r\n\t by: new Legato_Structure_Color() };\r\n\r\n\tthis.text_color = { to: new Legato_Structure_Color(),\r\n\t by: new Legato_Structure_Color() };\r\n\r\n\tthis.delay = 0;\r\n\r\n}", "set animatePhysics(value) {}", "function getAnimation2() {\n var element = $('.bulp2');\n //bezier magic provided by GSAP BezierPlugin (included with TweenMax)\n //https://api.greensock.com/js/com/greensock/plugins/BezierPlugin.html\n \n //create a semi-random tween \n var bezTween = new TweenMax(element, 6, {\n bezier:{\n type:\"soft\", \n //values:[{x:-200, y:300}, {x:300, y:30}, {x:500 + Math.random() *100, y:320*Math.random() + 50}, {x:650, y:320*Math.random() + 50}, {x:900, y:50}, {x:1100, y:50}, {x:1200, y:50}, {x:1400, y:50}, {x:1600, y:50}, {x:1900, y:50}],\n values:[{x:-430, y:0}, {x:0, y:50}, {x:100, y:70}, {x:500, y:70}, {x:650, y: 80}, {x:900, y:80}, {x:1100, y:90}, {x:1200, y:90}, {x:1400, y:90}, {x:1600, y:90}, {x:1900, y:90}],\n autoRotate:false\n },\n ease:Linear.easeNone});\n return bezTween;\n}", "function createFxNow() {\n window.setTimeout(function () {\n fxNow = undefined;\n });\n return fxNow = jQuery.now();\n } // Generate parameters to create a standard animation", "function setup() {\n createCanvas(windowWidth, windowHeight);\n\n w = 1600;\n dx = (TWO_PI / period) * xspacing;\n\n\n\n // var step = 0.4;\n}", "function drawDemo(t,duration) {\n push();\n translate(3*width/4,height/2);\n strokeWeight(1);\n let p = t/(duration);\n let g = (1-p)*100;\n stroke(40);\n // the first point of generation n and n-1\n let v1 = points3[0].copy();\n circle(v1.x,cy(v1.y),2)\n let v2 = points4[0].copy();\n circle(v2.x,cy(v2.y),2)\n line(v1.x,cy(v1.y),v2.x,cy(v2.y)); // line gen n to gen n-1 for the first point\n drawarrow(v1,v2);\n // the first point of the moving line\n v1.mult(p).add(v2.mult(1-p));\n stroke(255);\n circle(v1.x,cy(v1.y),2) // first point of the moving line\n for (let i=1;i<points3.length;i++) {\n // the 2 generations\n stroke(40)\n let v11 = points3[i-1]; \n let v12 = points3[i];\n line(v11.x,cy(v11.y),v12.x,cy(v12.y)) // line generation n-1\n circle(v12.x,cy(v12.y),2)\n let v21 = points4[i-1]\n let v22 = points4[i]\n line(v21.x,cy(v21.y),v22.x,cy(v22.y)) // line generation n\n circle(v22.x,cy(v22.y),2)\n line(v12.x,cy(v12.y),v22.x,cy(v22.y)); // line gen n to gen n-1\n drawarrow(v12,v22);\n // the line in between\n v1 = p5.Vector.add(v11.copy().mult(p),v21.copy().mult(1-p));\n v2 = p5.Vector.add(v12.copy().mult(p),v22.copy().mult(1-p));\n stroke(255);\n line(v1.x,cy(v1.y),v2.x,cy(v2.y)); // the moving line\n circle(v2.x,cy(v2.y),2)\n }\n pop();\n}", "function animate() { \n console.log('animate')\n \n gsap.registerEffect({\n name: \"fadeIn\",\n effect: (targets, config) => {\n var tlEffect = gsap.timeline();\n tlEffect.from(targets, {duration: config.duration, y:config.y, force3D:true, rotation: 0.01, stagger:config.stagger, ease:\"power2\"})\n .from(targets, {duration: config.duration, stagger:config.stagger, alpha:0, ease:\"none\"}, \"<\")\n return tlEffect;\n },\n defaults: {duration: 1.5, y:\"-=7\", stagger:4.5},\n extendTimeline: true,\n });\n \n gsap.to(plantWraps, {duration:25, rotation:\"+=20\", ease:\"none\"})\n gsap.to(flowerWraps, {duration:25, rotation:\"+=100\", ease:\"none\"})\n \n var imageDivs = selectAll('.imageDiv');\n // logoIntro = false;\n\n\t\t\ttl\n .to(bannerCover, {duration:0.7, alpha:0, ease:\"none\"})\n \n .from(plants, {duration:3, drawSVG:\"50% 50%\", ease:\"sine.inOut\"}, \"<\")\n .from(flowers, {duration:2, alpha:0, ease:\"none\"}, \"<\")\n \n if(logoIntro) {\n tl\n .from(letter_w, {duration:0.5, drawSVG: 0, ease:\"sine.in\"}, \"<\")\n .from(letter_y, {duration:0.3, drawSVG: 0, ease:\"sine.in\"}, \">\")\n .from(letter_nn, {duration:0.8, drawSVG: 0, ease:\"sine.inOut\"}, \">\")\n .from(lasvegas, {duration:0.7, y:\"-=10\", alpha: 0, ease:\"sine\"}, \">\")\n .from(sign_r, {duration:0.5, alpha: 0, ease:\"none\"}, \"<\")\n\n .to(logo, {duration:0.7, alpha:0, ease:\"none\"}, \">1\")\n .set(logo, {scale: 0.37, y:99, x:-60}, \">\")\n } else {\n tl\n .set(logo, {scale: 0.37, alpha:0,y:99, x:-60}, \"<\")\n }\n \n tl\n .from(imageDivs, {duration:1.3, stagger:4, alpha:0, blur:10, force3D:true, rotation: 0.01, ease:\"none\"}, \"<\")\n \n .fadeIn(text_head, \"<0.4\")\n .fadeIn(text_subHead,{y:\"0\", duration: 1,},\"<0.6\")\n .to(logo, {duration:1, alpha:1, ease:\"none\"}, \"<0.4\")\n .from(cta, {duration:0.8, alpha: 0, ease:\"none\"}, \"<\")\n .from(cta, {duration:1.6, rotateX:90, ease:\"power2\"}, \"<\") \n\t\t}", "function ChartAnimation(time) {\r\n\r\n //normikuvaajat\r\n for (var id in chartOptions) {\r\n if (chartOptions[id] != null) {;\r\n chartOptions[id].animation.duration = time;\r\n }\r\n\r\n }\r\n\r\n var tmpID;\r\n\r\n //googlen dashboardissa olevat kuvaajat\r\n for (var elo = 0; elo < 3; elo++) {\r\n for (var arranged = 0; arranged <= 1; arranged++) {\r\n for (var gameMode = 1; gameMode <= 4; gameMode++) {\r\n if (arranged == 1 && gameMode == 1) {\r\n continue;\r\n }\r\n tmpID = 'winRatioDaily' + 'M' + gameMode + 'E' + ELOdb[elo] + 'A' + arranged;\r\n chartChart[tmpID + \"_main\"].setOption('animation.duration', time);\r\n tmpID = 'gamesPlayedDaily' + 'M' + gameMode + 'E' + ELOdb[elo] + 'A' + arranged;\r\n chartChart[tmpID + \"_main\"].setOption('animation.duration', time);\r\n }\r\n }\r\n }\r\n\r\n for (var elo = 0; elo < 3; elo++) {\r\n for (var arranged = 0; arranged <= 1; arranged++) {\r\n tmpID = 'gamesPlayedDailyAll' + 'E' + ELOdb[elo] + 'A' + arranged;\r\n chartChart[tmpID + \"_main\"].setOption('animation.duration', time);\r\n }\r\n }\r\n\r\n\r\n}", "function Animator (args) {\n\t\targs = args || {};\n\n\t \tthis.easing = args.easing || function (t) { return t }; // default to linear easing\n\t \tthis.start_pos = args.start || 0;\n\t \tthis.end_pos = args.end || 1;\n\t \tthis.ratio = args.ratio || 0.25; // ratio to total animation --> normalize to 1\n\t \tthis.msec = args.msec || 1000; // default to 1000msec --> 1s\n\t \tthis.order = args.order || 0;\n\n\t \t// Called Flag\n\t \tthis.started = false;\n\n\t \t// Value to be returned\n\t \tthis.value = this.start_pos;\n\n\t \t// Global (local) reference to 'this'\n\t \tvar _this = this;\n\n\t\t// performance.now is guaranteed to increase and gives sub-millisecond resolution\n\t\t// Date.now is susceptible to system clock changes and gives some number of milliseconds resolution\n\t\t_this.start = window.performance.now(); \n\t\tvar delta = _this.end_pos - _this.start_pos; // displacement\n\n\t\tfunction frame() {\n\t\t\tvar now = window.performance.now();\n\t\t\tvar t = (now - _this.start) / _this.msec; // normalize to 0..1\n\n\t\t\tif (t >= 1) { // if animation complete or running over\n\t\t\t\t_this.value = _this.end_pos; // ensure the animation terminates in the specified state\n\t\t\t \treturn;\n\t\t\t}\n\n\t\t\tvar proportion = _this.easing(t); // Call upon the strange magic of your timing function\n\t\t\t\n\t\t\t// delta is our multiplier | this decides our current position relative to starting position\n\t\t\t// update your animation based on this value\n\t\t\t// trig functions are naturally really excited about this,\n\t\t\t// Can I make the whole thing less imperitive? --> Stateless?\n\n\t\t\t_this.value = _this.start_pos + proportion * delta; \t\n\t\t\trequestAnimationFrame(frame); // next frame!\n\t\t}\n\n\t\tthis.animate = function() {\n\t\t\t_this.started = true;\n\t\t\t_this.start = window.performance.now();\n\t\t\trequestAnimationFrame(frame); // you can use setInterval, but this will give a smoother animation --> Call it the first time and it loops forever until return\n\t\t}\n\t}", "function generateBottom480(){\r\n\tvar p1 = COLOR([0,0,0])(STRUCT([T([0,1,2])([-0.19,trainWidth+0.1,-trainHeight]),R([0,1])(-PI/2),\r\n\t\tCUBOID([trainWidth+0.15,trainLength+0.18])]));\r\n\tvar p2 = function(){\r\n\t\tvar adjust = 0.85;\r\n\t\tvar adjustBase = 0.25;\r\n\t\tvar c1 = BEZIER(S0)([[-adjustBase+0.2,trainHeight,-etr450adjust-0.3],[-adjustBase,trainHeight,-0.2],\r\n\t\t\t[trainWidth/2,trainHeight,1.8],[trainWidth+adjustBase,trainHeight,-0.2],\r\n\t\t\t[trainWidth+adjustBase-0.2,trainHeight,-etr450adjust-0.3]]);\r\n\r\n\t\tvar c2 = BEZIER(S0)([[-adjustBase+0.2,trainHeight,-etr450adjust-0.3-1],[-adjustBase,trainHeight+0.5,-0.2-0.5],\r\n\t\t\t[trainWidth/2,trainHeight+1,0.8],[trainWidth+adjustBase,trainHeight+0.5,-0.2-0.5],\r\n\t\t\t[trainWidth+adjustBase-0.2,trainHeight,-etr450adjust-0.3-1]]);\r\n\r\n\t\tvar c3 = BEZIER(S0)([[-adjustBase+0.2,trainHeight,-etr450adjust-0.3-1],[-adjustBase,trainHeight+0.5,-0.2-0.5],\r\n\t\t\t[trainWidth/2,trainHeight+1,2.5],[trainWidth+adjustBase,trainHeight+0.5,-0.2-0.5],\r\n\t\t\t[trainWidth+adjustBase-0.2,trainHeight,-etr450adjust-0.3-1]]);\r\n\r\n\t\tvar out = MAP(BEZIER(S1)([c1,c2,c3]))(dom2D);\r\n\r\n\t\treturn COLOR([0.5,0.5,0.5])(STRUCT([T([0,1,2])([-2.2,trainWidth,-trainHeight*2]),R([0,1])(-PI/2),R([1,2])(PI/2),out]));\r\n\r\n\t};\r\n\treturn STRUCT([p1,p2()]);\r\n}", "function constantGenerator (options) {\n var o = options || {};\n return function (i) {\n return {\n i : i,\n x : i / o.fps,\n y : options.value,\n length : o.length\n }\n }\n}", "constructor(x, color, translationRate) {\n // Position properties\n this.x = x;\n this.y = 0;\n // Display properties\n this.color = color;\n this.width = 500;\n this.height = 600;\n // Moving properties\n this.translationRate = translationRate;\n this.ninthFrameX = 4500; // offsetTargetX + timeFrameInterval * 9\n this.resetX = -500;\n }", "function keyframes(data, name, propertyValue,custom){\n \t // photo-click=>kf-namees-10p20p30p-bg-lg-blue-red---tf-r10deg--s2__40p50p80p-bgc-green atfeio ada aici adu1s\n//keyframe-name- already extracted\n//[from|to|20p]-classname--classname--classname__[to|20p]-classname--classname__[to|100p]\nlet statement=\"@keyframes \"+ name +\"{\\n\";\n let splits=data.split('__');\n splits.forEach(each=>{\n \tlet result=at(each,propertyValue,custom);\n \tif(result!==false) statement+='\\t'+result;\n });\n\n return statement+\"}\";\n}" ]
[ "0.6477499", "0.6449747", "0.6239411", "0.62102515", "0.62051743", "0.6019592", "0.599829", "0.594838", "0.5940393", "0.5940393", "0.5912163", "0.5873654", "0.5832134", "0.5828958", "0.58236474", "0.5820797", "0.5813001", "0.579854", "0.57910967", "0.57835335", "0.5780475", "0.5744776", "0.5744776", "0.5743037", "0.5725314", "0.57187176", "0.56824344", "0.5681388", "0.5681388", "0.5678651", "0.56618774", "0.5647999", "0.56424373", "0.56417084", "0.56417084", "0.5630118", "0.5630118", "0.5620743", "0.5609721", "0.56021315", "0.56021315", "0.56001645", "0.5594966", "0.55772984", "0.55669963", "0.55653876", "0.55635995", "0.55631703", "0.5558751", "0.5555574", "0.5549875", "0.5546244", "0.55430067", "0.5541023", "0.5540799", "0.55329746", "0.55329746", "0.5527512", "0.5519762", "0.55152524", "0.5485498", "0.54539764", "0.54531014", "0.5447024", "0.5445377", "0.54426", "0.54318804", "0.54289997", "0.5421807", "0.54158115", "0.54125386", "0.5410965", "0.5410965", "0.5398738", "0.5396087", "0.5393311", "0.53917104", "0.53820693", "0.53762", "0.5373947", "0.53671485", "0.53658193", "0.53646094", "0.53609955", "0.5353784", "0.53529763", "0.53529763", "0.5352467", "0.53397745", "0.53333664", "0.5332917", "0.53294826", "0.5324581", "0.53198284", "0.53193164", "0.53152305", "0.5314615", "0.53096515", "0.5307977", "0.53036606", "0.5299143" ]
0.0
-1
Strip and collapse whitespace according to HTML spec
function stripAndCollapse( value ) { var tokens = value.match( rnothtmlwhite ) || []; return tokens.join( " " ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function stripAndCollapse(value){var tokens=value.match(rnothtmlwhite)||[];return tokens.join(\" \");}", "function stripAndCollapse(value){var tokens=value.match(rnothtmlwhite)||[];return tokens.join(\" \");}", "function stripAndCollapse(value){var tokens=value.match(rnothtmlwhite)||[];return tokens.join(\" \");}", "function stripAndCollapse( value ) {\n var tokens = value.match( rnothtmlwhite ) || [];\n return tokens.join( \" \" );\n }", "function stripAndCollapse( value ) {\n\t\t\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\t\t\treturn tokens.join( \" \" );\n\t\t\t}", "function stripAndCollapse( value ) {\n var tokens = value.match( rnothtmlwhite ) || [];\n return tokens.join( \" \" );\n }", "function stripAndCollapse( value ) {\r\n\t\tvar tokens = value.match( rnothtmlwhite ) || [];\r\n\t\treturn tokens.join( \" \" );\r\n\t}", "function stripAndCollapse( value ) {\n \t\tvar tokens = value.match( rnothtmlwhite ) || [];\n \t\treturn tokens.join( \" \" );\n \t}", "function stripAndCollapse( value ) {\n\t\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\t\treturn tokens.join( \" \" );\n\t\t}", "function stripAndCollapse( value ) {\n\t\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\t\treturn tokens.join( \" \" );\n\t\t}", "function stripAndCollapse( value ) {\n\t\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\t\treturn tokens.join( \" \" );\n\t\t}", "function stripAndCollapse( value ) {\n\t\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\t\treturn tokens.join( \" \" );\n\t\t}", "function stripAndCollapse( value ) {\n\t\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\t\treturn tokens.join( \" \" );\n\t\t}", "function stripAndCollapse( value ) {\n\t\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\t\treturn tokens.join( \" \" );\n\t\t}", "function stripAndCollapse( value ) {\n\t\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\t\treturn tokens.join( \" \" );\n\t\t}", "function stripAndCollapse( value ) {\n\t\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\t\treturn tokens.join( \" \" );\n\t\t}", "function stripAndCollapse( value ) {\n\t\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\t\treturn tokens.join( \" \" );\n\t\t}", "function stripAndCollapse( value ) {\n\t\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\t\treturn tokens.join( \" \" );\n\t\t}", "function stripAndCollapse( value ) {\n\t\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\t\treturn tokens.join( \" \" );\n\t\t}", "function stripAndCollapse( value ) {\n\t\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\t\treturn tokens.join( \" \" );\n\t\t}", "function stripAndCollapse( value ) {\n\t\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\t\treturn tokens.join( \" \" );\n\t\t}", "function stripAndCollapse( value ) {\n\t\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\t\treturn tokens.join( \" \" );\n\t\t}", "function stripAndCollapse( value ) {\n\t\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\t\treturn tokens.join( \" \" );\n\t\t}", "function stripAndCollapse( value ) {\n\t\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\t\treturn tokens.join( \" \" );\n\t\t}", "function stripAndCollapse( value ) {\n\t\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\t\treturn tokens.join( \" \" );\n\t\t}", "function stripAndCollapse( value ) {\n\t\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\t\treturn tokens.join( \" \" );\n\t\t}", "function stripAndCollapse(value) {\n var tokens = value.match(rnothtmlwhite) || [];\n return tokens.join(\" \");\n }", "function stripAndCollapse(value) {\n var tokens = value.match(rnothtmlwhite) || [];\n return tokens.join(\" \");\n }", "function stripAndCollapse(value) {\n var tokens = value.match(rnothtmlwhite) || [];\n return tokens.join(\" \");\n }", "function stripAndCollapse(value) {\n var tokens = value.match(rnothtmlwhite) || [];\n return tokens.join(\" \");\n }", "function stripAndCollapse(value) {\n var tokens = value.match(rnothtmlwhite) || [];\n return tokens.join(\" \");\n }", "function stripAndCollapse(value) {\n var tokens = value.match(rnothtmlwhite) || [];\n return tokens.join(\" \");\n }", "function stripAndCollapse(value) {\n var tokens = value.match(rnothtmlwhite) || [];\n return tokens.join(\" \");\n }", "function stripAndCollapse(value) {\n var tokens = value.match(rnothtmlwhite) || [];\n return tokens.join(\" \");\n }" ]
[ "0.79224557", "0.79224557", "0.79224557", "0.76790833", "0.75981474", "0.7587476", "0.7583516", "0.7560448", "0.75548595", "0.75548595", "0.75548595", "0.75548595", "0.75548595", "0.75548595", "0.75548595", "0.75548595", "0.75548595", "0.75548595", "0.75548595", "0.75548595", "0.75548595", "0.75548595", "0.75548595", "0.75548595", "0.75548595", "0.75548595", "0.7553462", "0.7553462", "0.7553462", "0.7553462", "0.7553462", "0.7553462", "0.7553462", "0.7553462" ]
0.0
-1
Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
function addToPrefiltersOrTransports( structure ) { // dataTypeExpression is optional and defaults to "*" return function( dataTypeExpression, func ) { if ( typeof dataTypeExpression !== "string" ) { func = dataTypeExpression; dataTypeExpression = "*"; } var dataType, i = 0, dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || []; if ( isFunction( func ) ) { // For each dataType in the dataTypeExpression while ( ( dataType = dataTypes[ i++ ] ) ) { // Prepend if requested if ( dataType[ 0 ] === "+" ) { dataType = dataType.slice( 1 ) || "*"; ( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func ); // Otherwise append } else { ( structure[ dataType ] = structure[ dataType ] || [] ).push( func ); } } } }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor() {\n this.config = Config.ajax;\n this.xhr;\n this.Serialize;\n }", "function AjaxPipelineConstructor() {\r\n BaseObject.call(this,arguments);\r\n }", "function Ajax(__constructor) {\r\n if (Params.env.isFirefox) return GM_xmlhttpRequest(__constructor);\r\n else return new XHR(__constructor);\r\n}", "function ajax_legacy() {\n /* + when */\n jQuery.ajax\n (\n jQuery.extend\n (\n true , {} ,\n settings.ajax ,\n callbacks ,\n {\n url : url ,\n beforeSend : function () {\n XMLHttpRequest = arguments[ 0 ] ;\n \n XMLHttpRequest.setRequestHeader( settings.nss.requestHeader , 'true' ) ;\n XMLHttpRequest.setRequestHeader( settings.nss.requestHeader + '-Area' , settings.area ) ;\n XMLHttpRequest.setRequestHeader( settings.nss.requestHeader + '-CSS' , settings.load.css ) ;\n XMLHttpRequest.setRequestHeader( settings.nss.requestHeader + '-Script' , settings.load.script ) ;\n \n fire( settings.callbacks.ajax.beforeSend , context , [ event , settings.parameter , XMLHttpRequest ] , settings.callbacks.async ) ;\n } ,\n success : function () {\n data = arguments[ 0 ] ;\n dataType = arguments[ 1 ] ;\n XMLHttpRequest = arguments[ 2 ] ;\n \n fire( settings.callbacks.ajax.success , context , [ event , settings.parameter , data , dataType , XMLHttpRequest ] , settings.callbacks.async ) ;\n \n update() ;\n } ,\n error : function () {\n XMLHttpRequest = arguments[ 0 ] ;\n textStatus = arguments[ 1 ] ;\n errorThrown = arguments[ 2 ] ;\n \n /* validate */ var validate = plugin_data[ settings.id ] && plugin_data[ settings.id ].validate ? plugin_data[ settings.id ].validate.clone( { name : 'jquery.pjax.js - drive()' } ) : validate ;\n /* validate */ validate && validate.start() ;\n /* validate */ validate && validate.test( '++', 1, [ url, win.location.href ], 'ajax_legacy()' ) ;\n /* validate */ validate && validate.test( '++', 1, [ XMLHttpRequest, textStatus, errorThrown ], 'ajax error' ) ;\n fire( settings.callbacks.ajax.error , context , [ event , settings.parameter , XMLHttpRequest , textStatus , errorThrown ] , settings.callbacks.async ) ;\n if ( settings.fallback ) { return typeof settings.fallback === 'function' ? settings.fallback( event ) : fallback( event , validate ) ; } ;\n /* validate */ validate && validate.end() ;\n }\n }\n )\n )\n /* - when */\n }", "function getCorsAjaxTransport() {\n var xhrOrXdr;\n\n if (window.XMLHttpRequest || window.ActiveXObject) {\n xhrOrXdr = qq.createXhrInstance();\n\n if (xhrOrXdr.withCredentials === undefined) {\n xhrOrXdr = new XDomainRequest();\n // Workaround for XDR bug in IE9 - https://social.msdn.microsoft.com/Forums/ie/en-US/30ef3add-767c-4436-b8a9-f1ca19b4812e/ie9-rtm-xdomainrequest-issued-requests-may-abort-if-all-event-handlers-not-specified?forum=iewebdevelopment\n xhrOrXdr.onload = function() {};\n xhrOrXdr.onerror = function() {};\n xhrOrXdr.ontimeout = function() {};\n xhrOrXdr.onprogress = function() {};\n }\n }\n\n return xhrOrXdr;\n }", "_initXhr() {\n this._xhr = new XMLHttpRequest();\n this._xhr.upload.onprogress = this._onProgress.bind(this);\n this._xhr.onreadystatechange = this._onReadyStateChange.bind(this);\n this._xhr.open(this.method, this.getUrl(), true);\n\n try {\n this._xhr.withCredentials = true;\n } catch (e) {}\n\n // Set headers\n let headers = {};\n if (BrowserHelper.isWebkit() || BrowserHelper.isTrident()) {\n headers = {\n ...headers,\n 'If-None-Match': '*',\n 'If-Modified-Since': 'Mon, 26 Jul 1997 05:00:00 GMT',\n 'Cache-Control': 'no-cache',\n 'X-Requested-With': 'XMLHttpRequest'\n };\n }\n headers = {...headers, ...this.headers};\n Object.keys(headers).forEach(key => {\n this._xhr.setRequestHeader(key, headers[key]);\n });\n }", "useAjax( ajax ) {\n this._ajax = ajax;\n }", "useAjax( ajax ) {\n this._ajax = ajax;\n }", "function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:deep||(deep={}))[key]=src[key];}}if(deep){jQuery.extend(true,target,deep);}return target;}", "function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:deep||(deep={}))[key]=src[key];}}if(deep){jQuery.extend(true,target,deep);}return target;}", "function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:deep||(deep={}))[key]=src[key];}}if(deep){jQuery.extend(true,target,deep);}return target;}", "function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:deep||(deep={}))[key]=src[key];}}if(deep){jQuery.extend(true,target,deep);}return target;}", "function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:deep||(deep={}))[key]=src[key];}}if(deep){jQuery.extend(true,target,deep);}return target;}", "function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:deep||(deep={}))[key]=src[key];}}if(deep){jQuery.extend(true,target,deep);}return target;}", "function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions || {};for(key in src) {if(src[key] !== undefined){(flatOptions[key]?target:deep || (deep = {}))[key] = src[key];}}if(deep){jQuery.extend(true,target,deep);}return target;}", "function ajaxExtend(target,src){var deep,key,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:deep||(deep={}))[key]=src[key];}}if(deep){jQuery.extend(true,target,deep);}return target;}", "function ajaxExtend(target,src){var deep,key,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:deep||(deep={}))[key]=src[key];}}if(deep){jQuery.extend(true,target,deep);}return target;}", "function WrappedXMLHttpRequest() {\n this._inner = Cc[\"@mozilla.org/xmlextras/xmlhttprequest;1\"].createInstance();\n}", "function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:deep||(deep={}))[key]=src[key];}}if(deep){jQuery.extend(true,target,deep);}}", "function $Ajax(uri, fHandler, method) {\r\n\t\tthis.uri = uri || \"\";\r\n\t\tthis.fHandler = fHandler || null;\r\n\t\tthis.method = method || \"GET\";\r\n\t\tthis.xmlHttp = false;\r\n\t\ttry { this.xmlHttp = new XMLHttpRequest(); } catch(e) {}\r\n\t\tif (!this.xmlHttp) try { this.xmlHttp = new ActiveXObject(\"Msxml2.XMLHTTP\"); } catch(e) {}\r\n\t\tif (!this.xmlHttp) try { this.xmlHttp = new ActiveXObject(\"Microsoft.XMLHTTP\"); } catch(e) {}\r\n\t\tif (!this.xmlHttp) try { this.xmlHttp = new ActiveXObject(\"Msxml2.XMLHTTP.4.0\"); } catch(e) {}\r\n\t}", "function ajaxWithCookieFactory() {\n var jar = request.jar();\n\n return {\n\n addCookie: function(data) {\n jar.add(request.cookie(data));\n },\n\n getCookie: function(name) {\n var i, cookie;\n for (i = 0; i < jar.cookies.length; i += 1) {\n cookie = jar.cookies[i];\n if (cookie.name.localeCompare(name) === 0) {\n return cookie.value;\n }\n }\n },\n\n go: function(jqParams) {\n var options = {};\n if (typeof jqParams === 'string') {\n options.url = jqParams;\n } else {\n options.url = jqParams.url;\n options.method = jqParams.type; \n options.headers = jqParams.headers; \n options[(\"POST\".localeCompare(jqParams.type) === 0) ?\n \"form\" : \"qs\"] = jqParams.data;\n }\n options.jar = jar;\n \n var deferred = $.Deferred();\n request(options, function (error, response, body) {\n response.status = response.statusCode;\n if (!error && response.statusCode == 200) {\n if (\"json\".localeCompare(jqParams.dataType) === 0) {\n body = JSON.parse(body);\n }\n deferred.resolve(body, \"success\", response);\n } else {\n response.responseText = body;\n deferred.reject(response, error);\n }\n });\n return deferred.promise();\n }\n }\n}", "function NetworkResponseInterceptor() {\n this._originalAjax = $.ajax;\n this._successInterceptors = [];\n this._errorInterceptors = [];\n this._urlPatterns = [];\n}", "constructor(serverBase: String, idPrefix: String) {\n this.serverBase = serverBase;\n this.idPrefix = idPrefix;\n this.listeners = new Map();\n this.items = new Map();\n this.itemList = undefined;\n\n // Hmm, odd.\n window.$.ajaxSetup({\n scriptCharset: \"utf-8\",\n contentType: \"application/json; charset=utf-8\"\n });\n }", "function createAJAXObject(ajax) {\n //We want optionPromise to resolve asynchronously so we can use results from other promises in it\n var optionPromise = Promise.resolve({});\n return {\n get: function () { return ajax('get', optionPromise) },\n post: function () { return ajax('post', optionPromise) },\n put: function () { return ajax('put', optionPromise) },\n delete: function () { return ajax('delete', optionPromise) },\n head: function () { return ajax('head', optionPromise) },\n /* options is an object containing optionally the parameters:\n * - headers: (object) the headers to pass along with the request\n * - timeout: (number) the milliseconds following which to cancel the request\n */\n setOptions: function (o) {\n for (var key in o) {\n optionPromise.then(function (options) {\n options[key] = o[key];\n });\n }\n return this;\n },\n setOptionPromise: function (promise) {\n optionPromise = promise;\n return this;\n }\n }\n }", "function createJQueryRestAdapter (){\n // use jQuery to contact the Jive server\n\n var ajaxPath = \"\"; // value replaced when template is rendered\n var osapi = $r(\"osapi\");\n\n var dataFilter = function(data, type) {\n return (type === 'json' && data) ? jQuery.trim(data.replace(/^throw [^;]*;/, '')) : data;\n };\n\n /**\n * @param options.method {String} one of \"GET\", \"PUT\", \"POST\" or \"DELETE\"\n * @param options.endpoint {String} the short REST path, e.g.: \"users/1234?\"\n * @param options.queryParams {Object} map of query params to their values\n * @param options.body {String} body content to send with PUT or POST\n * @constructor\n */\n osapi.Request = function(options) {\n this.options = {\n method: options.method,\n endpoint: options.endpoint,\n ext: options.ext,\n v: options.v\n };\n if (isObjectWithProperties(options.queryParams)) {\n this.options.queryParams = options.queryParams\n }\n if (options.body != null) {\n this.options.body = options.body\n }\n };\n osapi.Request.prototype.execute = function(callback) {\n executeImpl.call(this, null, callback);\n };\n osapi.Request.prototype.executeAs = function(personURI, callback) {\n executeImpl.call(this, \"uri \" + personURI, callback);\n };\n function executeImpl(runAs, callback) {\n callback = callback || function(){};\n var endpoint = this.options.endpoint + buildQueryParams(this.options.queryParams);\n if (endpoint.charAt(0) == '/') {\n endpoint = endpoint.substring(1);\n }\n var path = this.options.ext\n ? \"ext/\" + this.options.ext + \"/\" + (this.options.version || this.options.v)\n : \"v3\";\n var url = [ajaxPath, \"api/core\", path, endpoint].join(\"/\");\n jQuery.ajax({\n url: url,\n type: this.options.method,\n contentType: this.options.body == null ? $u : \"application/json; charset=utf-8\",\n data: this.options.body == null ? $u : this.options.body,\n dataType: \"json\",\n dataFilter: dataFilter,\n beforeSend: function(req) {\n if (runAs != null) {\n req.setRequestHeader(\"X-Jive-Run-As\", runAs);\n }\n },\n success: function(data, textStatus, jqXHR) {\n if(data === null) {\n data = { status : jqXHR.status };\n }\n callback(interceptData(data));\n },\n error: function(xhr) {\n callback(buildErr(500, xhr.status, \"An error occurred while contacting the server\"));\n }\n });\n }\n\n /**\n * Object that may contain several Request objects to be executed in a\n * single REST call.\n * @constructor\n */\n osapi.BatchRequest = function() {\n this._requests = [];\n };\n osapi.BatchRequest.prototype.add = function(key, request) {\n if (this._requests == null) {\n throw \"BatchRequest is no longer valid\";\n }\n this._requests.push({\n key: key,\n request: request.options\n });\n };\n osapi.BatchRequest.prototype.execute = function(callback) {\n executeBatchImpl.call(this, null, callback);\n };\n osapi.BatchRequest.prototype.executeAs = function(personURI, callback) {\n executeBatchImpl.call(this, \"uri \" + personURI, callback);\n };\n function executeBatchImpl(runAs, callback) {\n if (this._requests == null) {\n throw \"BatchRequest is no longer valid\";\n }\n var req = this._requests;\n this._requests = null;\n callback = callback || function(){};\n if (req.length == 0) {\n callback({});\n return;\n }\n var url = [ajaxPath, \"api/core/v3/executeBatch\"].join(\"/\");\n jQuery.ajax({\n url: url,\n type: \"POST\",\n contentType: \"application/json; charset=utf-8\",\n data: JSON.stringify(req),\n dataType: \"json\",\n dataFilter: dataFilter,\n beforeSend: function(req) {\n if (runAs != null) {\n req.setRequestHeader(\"X-Jive-Run-As\", runAs);\n }\n },\n success: function(res) {\n var data = {}, i;\n for (i = 0; i < res.length; i++) {\n if (res[i].data) {\n data[res[i].id] = interceptData(res[i].data);\n } else if (res[i].error) {\n data[res[i].id] = buildErr(res[i].error.code || 500, res[i].status || 500, res[i].error.message);\n }\n }\n for (i = 0; i < req.length; i++) {\n if (!(data.hasOwnProperty(req[i].id) && data[req[i].id])) {\n data[req[i].id] = buildErr(500, 500, \"No data was returned from the server\");\n }\n }\n callback(data);\n },\n error: function(xhr) {\n var res = {};\n try {\n res = JSON.parse(xhr.responseText) || {};\n } catch (e) { /* don't care */ }\n var data = {};\n var err = buildErr(res.code || 500, xhr.status, res.message || \"An error occurred while contacting the server\");\n for (var i = 0; i < req.length; i++) {\n data[req[i].key] = err;\n }\n callback(data);\n }\n });\n }\n\n /**\n * Creates a new, empty BatchRequest\n * @return {osapi.BatchRequest}\n */\n osapi.newBatch = function() {\n return new osapi.BatchRequest();\n };\n\n function buildErr(code, status, msg) {\n return {\n error: {\n code: code,\n status: status,\n message: msg\n }\n };\n }\n\n function buildRequest(method, hasBody, options) {\n var o = {\n method: method,\n endpoint: options.href,\n queryParams: options.params\n };\n if (hasBody) {\n o.body = options.body == null ? \"\" : JSON.stringify(options.body);\n }\n if (options.ext) {\n o.ext = options.ext;\n o.v = options.v;\n }\n return new osapi.Request(o);\n }\n\n $r(\"osapi.jive.core\", function() { return {\n \"get\": function(options) {\n return buildRequest(\"GET\", false, options);\n },\n \"post\": function(options) {\n return buildRequest(\"POST\", true, options);\n },\n \"put\": function(options) {\n return buildRequest(\"PUT\", true, options);\n },\n \"delete\": function(options) {\n return buildRequest(\"DELETE\", false, options);\n }\n }});\n\n osapi.jive.core[\"get\"]._intercepted = true;\n osapi.jive.core[\"put\"]._intercepted = true;\n osapi.jive.core[\"post\"]._intercepted = true;\n osapi.jive.core[\"delete\"]._intercepted = true;\n\n initIntercept = bootstrapRest;\n }", "function AjaxUtil_requester() {\n /**\n * @type {String?} url the url of post target\n */\n this.url = null;\n /**\n * @type {String?} type the content-type of http request header\n */\n this.type = null;\n /**\n * @type {Object?} content the content to post\n */\n this.content = null;\n /**\n * @type {Number?}\n */\n this.timeout = null;\n /**\n * @type {Boolean?}\n */\n this.wait = null;\n}", "constructor() {\n //https://javascript.info/xmlhttprequest\n\n // var defs\n this.args = {\n url: false,\n method: false,\n data: false,\n dataType: false, // aka requestType this is either form or json xhr.setRequestHeader('Content-type', 'application/json; charset=utf-8');\n responseType: false, // for clientside processing response data type\n timeout: 0,\n onComplete: false,\n onError: false, // only triggers if the request couldn't be made at all\n onProgress: false,\n onCancel: false,\n username: false,\n password: false\n };\n\n this.url = false;\n this.urlParams = \"\";\n this.xhr = false;\n\n // Process arguments\n if (arguments[0] && typeof (arguments[0]) === \"object\") {\n for (let key in arguments[0]) {\n if (this.args.hasOwnProperty(key)) {\n this.args[key] = arguments[0][key];\n }\n }\n }\n // console.log(this.args);\n\n // Validate\n let valid = true;\n\n if (this.args.url === false) {\n let msg = `XHR(): Usage error: Option \"url\" has not been set!\nPlease enter a valid url to make a request to!`;\n console.error(msg);\n valid = false;\n return false;\n }\n\n if (this.args.method === false) {\n let msg = `XHR(): Usage error: Option \"method\" has not been set!\nValid options are:\n POST,\n GET`;\n console.error(msg);\n valid = false;\n return false;\n }\n\n\n\n\n // log(this.args);\n let showDataTypeError = false;\n if (this.args.data !== false){\n if (this.args.dataType === false){\n showDataTypeError = true;\n } else {\n if (typeof(this.args.dataType) == \"string\"){\n if (\n this.args.dataType.toLowerCase() !== \"json\" &&\n this.args.dataType.toLowerCase() !== \"form\" &&\n this.args.dataType.toLowerCase() !== \"text\"){\n showDataTypeError = true;\n }\n }\n }\n }\n\n\n if (showDataTypeError) {\n let msg = `XHR(): Usage error: Invalid \"dataType\" has been set!\nValid options are:\n JSON - send json string\n FORM - send form object\n TEXT - send url string\n`;\n console.error(msg);\n valid = false;\n return false;\n }\n\n\n\n\n\n let showResponseTypeError = false;\n if (this.args.responseType === false){\n showResponseTypeError = true;\n } else {\n if (typeof(this.args.dataType) == \"string\"){\n if (\n this.args.responseType.toLowerCase() != \"text\" &&\n this.args.responseType.toLowerCase() != \"document\" &&\n this.args.responseType.toLowerCase() != \"json\" &&\n this.args.responseType.toLowerCase() != \"arraybuffer\" &&\n this.args.responseType.toLowerCase() != \"blob\"){\n showResponseTypeError = true;\n }\n }\n }\n\n\n\n if (showResponseTypeError) {\n let msg =\n `XHR(): Usage warning: Option \"responseType\" not set!\nValid options are:\n json \\t\\t\\t JSON (parsed automatically)\n document \\t\\t XML Document (XPath etc),\n text \\t\\t\\t string,\n arraybuffer \\t ArrayBuffer for binary data,\n blob \\t\\t\\t Blob for binary data,\n`;\n console.error(msg);\n valid = false;\n return false;\n }\n\n\n\n\n\n\n if (this.args.onComplete === false) {\n let msg = `XHR(): Usage error: Option \"onComplete\" has not been set!\nYour making a request but are not doing anything with the response? Make sure to supply an onComplete callback function.`;\n console.error(msg);\n valid = false;\n return false;\n }\n\n\n\n if (valid) {\n this.makeRequest();\n }\n }", "function handleAjaxSetup() {\n jQuery.ajaxSetup(Object.create(null, {\n // Don't worry about the GET request, this option will be ignored by jQuery when using HTTP GET method.\n 'contentType': { value: 'application/json; charset=UTF-8', enumerable: true, writable: true },\n 'headers': { value: csrfToken, enumerable: true, writable: true },\n 'dataType': { value: 'json', enumerable: true, writable: true },\n 'dataFilter': { value: filterAjaxData, enumerable: true, writable: true },\n }));\n }", "function KAJAX()\n{\n\t// ======= OBJECT DELCARATIONS =======\n\tthis._browserDetect = new KAJAX_browserDetect();\n}", "constructor( url, jxon=false, method='POST', credential='*' ){ \n super(url, method, credential) \n if(jxon){\n this.parse = function(xhttp){\n var resp = xhttp.response==\"\"?\"{}\":xhttp.response\n return JXON.parse(resp)\n } \n this.stringify = function(obj){ return JXON.stringify(obj) }\n }else{\n this.parse = function(xhttp){\n var resp = xhttp.response==\"\"?\"{}\":xhttp.response\n return JSON.parse(resp)\n } \n this.stringify = function(obj){ return JSON.stringify(obj) }\n }\n }", "function xhrInterceptor() {\n var originalXHR = window.XMLHttpRequest;\n var xhrSend = XMLHttpRequest.prototype.send;\n var xhrOpen = XMLHttpRequest.prototype.open;\n originalXHR.getRequestConfig = [];\n function ajaxEventTrigger(event) {\n var ajaxEvent = new CustomEvent(event, { detail: this });\n window.dispatchEvent(ajaxEvent);\n }\n function customizedXHR() {\n var liveXHR = new originalXHR();\n liveXHR.addEventListener('readystatechange', function () {\n ajaxEventTrigger.call(this, 'xhrReadyStateChange');\n }, false);\n liveXHR.open = function (method, url, async, username, password) {\n this.getRequestConfig = arguments;\n return xhrOpen.apply(this, arguments);\n };\n liveXHR.send = function (body) {\n return xhrSend.apply(this, arguments);\n };\n return liveXHR;\n }\n window.XMLHttpRequest = customizedXHR;\n }", "function NetworkResponseInterceptor () {\n this._originalAjax = $.ajax;\n this._successInterceptors = [];\n this._errorInterceptors = [];\n this._urlPatterns = [];\n}", "function getAjaxTransport() {\n\treturn validFuncOf(\n function() {return new XMLHttpRequest()},\n function() {return new ActiveXObject('Msxml2.XMLHTTP')},\n function() {return new ActiveXObject('Microsoft.XMLHTTP')}\n ) \n}", "constructor(url, method='POST'){\n this.url = url\n this.method = method \n }", "function request() {\n var ajax = new _ajaxRequest.default();\n return ajax.request.apply(ajax, arguments);\n }", "function AbstractDataProxy(options)\n{\n\tvar self = this;\n\n\t// default options\n\tself._defaultOpts = {\n\t\tinitMode: \"lazy\", // \"lazy\" or \"full\"\n\t\tservletName: \"\", // name of the servlet to retrieve the actual data (used for AJAX query)\n\t\tdata: {} // actual data, will be used only if it is a full init, i.e {initMode: \"full\"}\n\t};\n\n\tself._queryQueue = new RequestQueue();\n\n\t// merge options with default options to use defaults for missing values\n\tself._options = jQuery.extend(true, {}, self._defaultOpts, options);\n\n\t/**\n\t * Initializes the data proxy with respect to init mode.\n\t */\n\tself.init = function()\n\t{\n\t\tself._queryQueue.init(function(options) {\n\t\t\t$.ajax(options);\n\t\t});\n\n\t\tif (self.isFullInit())\n\t\t{\n\t\t\tself.fullInit(self._options);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tself.lazyInit(self._options);\n\t\t}\n\t};\n\n\t/**\n\t * Initializes the proxy without actually grabbing anything from the server.\n\t * Provided servlet name will be used later.\n\t *\n\t * @param options data proxy options\n\t */\n\tself.lazyInit = function(options)\n\t{\n\t\t// no default implementation, can be overridden by subclasses\n\t};\n\n\t/**\n\t * Initializes with full data. Once initialized with full data,\n\t * this proxy class assumes that there will be no additional data.\n\t *\n\t * @param options data proxy options\n\t */\n\tself.fullInit = function(options)\n\t{\n\t\t// method body should be overridden by subclasses\n\t};\n\n\t/**\n\t * Checks if the initialization is full or lazy.\n\t *\n\t * @return {boolean} true if full init, false otherwise\n\t */\n\tself.isFullInit = function()\n\t{\n\t\treturn !(self._options.initMode.toLowerCase() === \"lazy\");\n\t};\n\n\n\t/**\n\t * This function ensures that at most only one ajax request is\n\t * sent from a particular DataProxy instance. This is to prevent\n\t * too many simultaneous requests.\n\t *\n\t * @ajaxOptions jQuery ajax options\n\t */\n\tself.requestData = function(ajaxOptions)\n\t{\n\t\tvar complete = ajaxOptions.complete;\n\n\t\tvar defaultOpts = {\n\t\t\tcomplete: function(request, status)\n\t\t\t{\n\t\t\t\tself._queryQueue.complete();\n\n\t\t\t\tif (_.isFunction(complete))\n\t\t\t\t{\n\t\t\t\t\tcomplete(request, status);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t// extend options with default options\n\t\tvar options = jQuery.extend(true, {}, ajaxOptions, defaultOpts);\n\n\t\tself._queryQueue.add(options);\n\t};\n}", "function ajaxSyncInit() { \r\n\tvar localObjRequest;\r\n\r\n\tif (window.XMLHttpRequest) {\r\n\r\n \t\t// Mozilla,Safari, Chrome, IE7+\r\n \t\ttry { \r\n\t \t\tlocalObjRequest = new XMLHttpRequest(); \r\n\t\t} catch(exc) { \r\n\t \talert(\"The browser cannot handler the Ajax resources.\"); \r\n\t \tlocalObjRequest = false; \r\n\t\t}\r\n\r\n\t} else if (window.ActiveXObject) {\r\n\t\t// IE6-\r\n\t\ttry {\r\n\t\t\tlocalObjRequest = new ActiveXObject(\"Microsoft.XMLHTTP\");\r\n\t\t} catch(e) {\r\n\t\t\ttry { \r\n\t \t\t\tlocalObjRequest = new ActiveXObject(\"Msxml2.XMLHTTP\"); \r\n\t\t\t} catch(ex) { \r\n\t \t\talert(\"The browser cannot handler the Ajax resources.\"); \r\n \t\t\t\tlocalObjRequest = false; \r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn localObjRequest;\r\n}", "function ajaxExtend(target, src) {\n var deep, key,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for (key in src) {\n if (src[ key ] !== undefined) {\n (flatOptions[ key ] ? target : (deep || (deep = {})))[ key ] = src[ key ];\n }\n }\n if (deep) {\n jQuery.extend(true, target, deep);\n }\n\n return target;\n }", "function request() {\n const ajax = new _ajaxRequest.default();\n return ajax.request(...arguments);\n }", "function cjAjaxClass() {\n this.getTable = cjAjaxGetTable;\n this.getNameArray = cjAjaxGetNameArray;\n this.getNameValue = cjAjaxGetNameValue;\n this.update = cjAjaxUpdate;\n this.data = cjAjaxData;\n this.setVisitProperty = cjAjaxSetVisitProperty;\n this.getVisitProperty = cjAjaxGetVisitProperty;\n this.url = cjAjaxURL;\n this.addon = cjAjaxAddon;\n this.addonCallback = cjAjaxAddonCallback;\n this.qs = cjAjaxQs;\n this.qsCallback = cjAjaxQsCallback;\n}", "function n(e,t,n,o){var i,r,a,s,u,c=t;\n// Ignore repeat invocations\nh||(h=!0,\n// Clear timeout if it exists\np&&_.clearTimeout(p),\n// Dereference transport for early garbage collection\n// (no matter how long the jqXHR object will be used)\nl=void 0,\n// Cache response headers\nd=o||\"\",\n// Set readyState\nT.readyState=0<e?4:0,\n// Determine if successful\ni=200<=e&&e<300||304===e,\n// Get response data\nn&&(s=Z(g,T,n)),\n// Convert no matter what (that way responseXXX fields are always set)\ns=ee(g,s,T,i),\n// If successful, handle type chaining\ni?(\n// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\ng.ifModified&&((u=T.getResponseHeader(\"Last-Modified\"))&&(me.lastModified[f]=u),(u=T.getResponseHeader(\"etag\"))&&(me.etag[f]=u)),\n// if no content\n204===e||\"HEAD\"===g.type?c=\"nocontent\":304===e?c=\"notmodified\":(c=s.state,r=s.data,i=!(a=s.error))):(\n// Extract error from statusText and normalize for non-aborts\na=c,!e&&c||(c=\"error\",e<0&&(e=0))),\n// Set data for the fake xhr object\nT.status=e,T.statusText=(t||c)+\"\",\n// Success/Error\ni?b.resolveWith(v,[r,c,T]):b.rejectWith(v,[T,c,a]),\n// Status-dependent callbacks\nT.statusCode(x),x=void 0,m&&y.trigger(i?\"ajaxSuccess\":\"ajaxError\",[T,g,i?r:a]),\n// Complete\nw.fireWith(v,[T,c]),m&&(y.trigger(\"ajaxComplete\",[T,g]),\n// Handle the global AJAX counter\n--me.active||me.event.trigger(\"ajaxStop\")))}", "function Ajax(opt) {\n var finalCfg = _merge(defaultCfg, opt || {}),\n data = _serializenData(finalCfg.data),\n timeout = null,\n hasTimeout = false,\n supportCors = true,\n xhr, headers, scriptNode, response, data, dataType;\n\n data = _serializenData(finalCfg.data);\n dataType = _getDataType(finalCfg.dataType);\n\n if (finalCfg.method.toLowerCase() === \"get\") {\n if (finalCfg.url.indexOf(\"?\") === -1) {\n finalCfg.url += (\"?\" + data);\n } else {\n finalCfg.url += (\"&\" + data);\n }\n data = null;\n }\n\n // configed the timeout\n if (finalCfg.timeout > 0) {\n timeout = setTimeout(function() {\n if (_typeOf(finalCfg.abort) === \"Function\") {\n finalCfg.abort.call(finalCfg.context, xhr || null);\n }\n hasTimeout = true;\n }, finalCfg.timeout);\n }\n\n // jsonp type request\n if (dataType === \"jsonp\") {\n scriptNode = document.createElement(\"script\");\n scriptNode.type = \"text/javascript\";\n if (finalCfg.url.indexOf(\"?\") > -1 && data !== \"undefined\") {\n finalCfg.url += data;\n } else {\n finalCfg.url += (\"?\" + data);\n }\n scriptNode.src = finalCfg.url;\n head.appendChild(scriptNode);\n scriptNode.onload = function() {\n head.removeChild(scriptNode);\n if (!hasTimeout && timeout) {\n clearTimeout(timeout);\n }\n // excute the success callback\n if (_typeOf(finalCfg.success) === \"Function\") {\n finalCfg.success.call(finalCfg.context, response, null);\n }\n };\n } else {\n xhr = root.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject(\"Microsoft.XMLHTTP\");\n supportCors = \"withCredentials\" in xhr;\n\n for(var i = 0, len = requestInterceptors.length; i < len; i ++) {\n requestInterceptors[i](xhr);\n }\n\n // bind the readystate change event\n xhr.onreadystatechange = function() {\n // already timeout\n if (hasTimeout) {\n return;\n }\n\n for(var i = 0, len = responseInterceptors.length; i < len; i ++) {\n responseInterceptors[i](xhr);\n }\n\n if (xhr.readyState === 4) {\n // setted the time out, and not timeout until now\n if (timeout) {\n clearTimeout(timeout);\n }\n\n response = xhr.responseText;\n\n // 2xx -> success\n // 304 -> not modified\n if (xhr.status >= 200 && xhr.status < 300 || xhr.status === 304) {\n try {\n if (dataType === \"script\") {\n response = (new Function(\"return \" + response)).call(root);\n } else if (dataType === \"xml\") {\n // responseXML is not empty\n if (xhr.responseXML !== null) {\n response = xhr.responseXML;\n }\n } else if (dataType === \"json\") {\n response = response ? JSON.parse(response) : null;\n } else {\n response = xhr.responseText;\n }\n // excute the success callback\n if (_typeOf(finalCfg.success) === \"Function\") {\n finalCfg.success.call(finalCfg.context, response, xhr);\n }\n } catch (ex) {\n if (_typeOf(finalCfg.error) === \"Function\") {\n // excute the error callback\n finalCfg.error.call(finalCfg.context, response, ex, xhr);\n }\n }\n } else {\n if (_typeOf(finalCfg.error) === \"Function\") {\n // excute the error callback\n finalCfg.error.call(finalCfg.context, response, null, xhr);\n }\n }\n }\n };\n\n // mark this request is a XMLHttpRequest(ajax), not a common request\n // cross domain can not distinguish \"X-Requested-With\"\n if (!finalCfg.withCredentials) {\n finalCfg.headers = _merge(finalCfg.headers, {\n \"X-Requested-With\": \"XMLHttpRequest\",\n \"Content-Type\": \"application/x-www-form-urlencoded\",\n \"Accept\": typeMaps[dataType].indexOf(\",\") > -1 ? typeMaps[dataType].split(\",\")[0] : typeMaps[dataType]\n });\n } else {\n finalCfg.headers = _merge(finalCfg.headers, {\n \"Content-Type\": \"application/x-www-form-urlencoded\",\n \"Accept\": typeMaps[dataType].indexOf(\",\") > -1 ? typeMaps[dataType].split(\",\")[0] : typeMaps[dataType]\n });\n }\n\n // set the withCredentials attribute\n if (supportCors) {\n xhr.withCredentials = finalCfg.withCredentials;\n }\n\n xhr.open(finalCfg.method, finalCfg.url, finalCfg.async);\n _setHeaders(xhr, finalCfg.headers);\n xhr.send(data);\n\n return xhr;\n }\n }", "create() {\n const opts = (0, util_js_1.pick)(this.opts, \"agent\", \"pfx\", \"key\", \"passphrase\", \"cert\", \"ca\", \"ciphers\", \"rejectUnauthorized\", \"autoUnref\");\n opts.xdomain = !!this.opts.xd;\n opts.xscheme = !!this.opts.xs;\n const xhr = (this.xhr = new xmlhttprequest_js_1.default(opts));\n try {\n debug(\"xhr open %s: %s\", this.method, this.uri);\n xhr.open(this.method, this.uri, this.async);\n try {\n if (this.opts.extraHeaders) {\n xhr.setDisableHeaderCheck && xhr.setDisableHeaderCheck(true);\n for (let i in this.opts.extraHeaders) {\n if (this.opts.extraHeaders.hasOwnProperty(i)) {\n xhr.setRequestHeader(i, this.opts.extraHeaders[i]);\n }\n }\n }\n }\n catch (e) { }\n if (\"POST\" === this.method) {\n try {\n xhr.setRequestHeader(\"Content-type\", \"text/plain;charset=UTF-8\");\n }\n catch (e) { }\n }\n try {\n xhr.setRequestHeader(\"Accept\", \"*/*\");\n }\n catch (e) { }\n // ie6 check\n if (\"withCredentials\" in xhr) {\n xhr.withCredentials = this.opts.withCredentials;\n }\n if (this.opts.requestTimeout) {\n xhr.timeout = this.opts.requestTimeout;\n }\n xhr.onreadystatechange = () => {\n if (4 !== xhr.readyState)\n return;\n if (200 === xhr.status || 1223 === xhr.status) {\n this.onLoad();\n }\n else {\n // make sure the `error` event handler that's user-set\n // does not throw in the same tick and gets caught here\n this.setTimeoutFn(() => {\n this.onError(typeof xhr.status === \"number\" ? xhr.status : 0);\n }, 0);\n }\n };\n debug(\"xhr data %s\", this.data);\n xhr.send(this.data);\n }\n catch (e) {\n // Need to defer since .create() is called directly from the constructor\n // and thus the 'error' event can only be only bound *after* this exception\n // occurs. Therefore, also, we cannot throw here at all.\n this.setTimeoutFn(() => {\n this.onError(e);\n }, 0);\n return;\n }\n if (typeof document !== \"undefined\") {\n this.index = Request.requestsCount++;\n Request.requests[this.index] = this;\n }\n }", "function fXMLHttpRequest() {\n\t\tthis._object = oXMLHttpRequest && !bIE7 ? new oXMLHttpRequest : new window.ActiveXObject(\"Microsoft.XMLHTTP\");\n\t\tthis._listeners = [];\n\t}", "function fXMLHttpRequest() {\n\t\tthis._object = oXMLHttpRequest && !bIE7 ? new oXMLHttpRequest : new window.ActiveXObject(\"Microsoft.XMLHTTP\");\n\t\tthis._listeners = [];\n\t}", "function fXMLHttpRequest() {\n this._object = oXMLHttpRequest && !bIE7 ? new oXMLHttpRequest : new window.ActiveXObject(\"Microsoft.XMLHTTP\");\n this._listeners = [];\n }", "function fXMLHttpRequest() {\n this._object = oXMLHttpRequest && !bIE7 ? new oXMLHttpRequest : new window.ActiveXObject(\"Microsoft.XMLHTTP\");\n this._listeners = [];\n }", "function wirejQueryInterceptor() {\n $(document).ajaxStart(function () { processRequest(); });\n $(document).ajaxComplete(function () { processResponse(); });\n $(document).ajaxError(function () { processResponse(); });\n }", "function microAjax(B,A){this.bindFunction=function(E,D){return function(){return E.apply(D,[D])}};this.stateChange=function(D){if(this.request.readyState==4){this.callbackFunction(this.request.responseText)}};this.getRequest=function(){if(window.ActiveXObject){return new ActiveXObject(\"Microsoft.XMLHTTP\")}else{if(window.XMLHttpRequest){return new XMLHttpRequest()}}return false};this.postBody=(arguments[2]||\"\");this.callbackFunction=A;this.url=B;this.request=this.getRequest();if(this.request){var C=this.request;C.onreadystatechange=this.bindFunction(this.stateChange,this);if(this.postBody!==\"\"){C.open(\"POST\",B,true);C.setRequestHeader(\"X-Requested-With\",\"XMLHttpRequest\");C.setRequestHeader(\"Content-type\",\"application/x-www-form-urlencoded\");C.setRequestHeader(\"Connection\",\"close\")}else{C.open(\"GET\",B,true)}C.send(this.postBody)}}", "function initFiltersPanel()\n{\n jQuery('div.task_filters ul li a').click(function(){\n jQuery('#search_filter_keys').effect(\"highlight\", {color: '#FF9900'}, 3000);\n jQuery.ajax({\n beforeSend: function(){ showProgress(); },\n complete: function(request){ tasklistReload(); hideProgress(); } ,\n data:'',\n success: function(request){jQuery('#search_filter_keys').html(request);},\n type:'post',\n url: this.href\n });\n return false;\n });\n}", "function EngineWrapper(adapter) {\n var AjaxEngine = function () {\n function AjaxEngine() {\n _classCallCheck(this, AjaxEngine);\n\n this.requestHeaders = {};\n this.readyState = 0;\n this.timeout = 0; // 0 stands for no timeout\n this.responseURL = \"\";\n this.responseHeaders = {};\n }\n\n _createClass(AjaxEngine, [{\n key: \"_call\",\n value: function _call(name) {\n this[name] && this[name].apply(this, [].splice.call(arguments, 1));\n }\n }, {\n key: \"_changeReadyState\",\n value: function _changeReadyState(state) {\n this.readyState = state;\n this._call(\"onreadystatechange\");\n }\n }, {\n key: \"open\",\n value: function open(method, url) {\n this.method = method;\n if (!url) {\n url = location.href;\n } else {\n url = util.trim(url);\n if (url.indexOf(\"http\") !== 0) {\n // Normalize the request url\n if (isBrowser) {\n var t = document.createElement(\"a\");\n t.href = url;\n url = t.href;\n }\n }\n }\n this.responseURL = url;\n this._changeReadyState(1);\n }\n }, {\n key: \"send\",\n value: function send(arg) {\n var _this = this;\n\n arg = arg || null;\n var self = this;\n if (adapter) {\n var request = {\n method: self.method,\n url: self.responseURL,\n headers: self.requestHeaders || {},\n body: arg\n };\n util.merge(request, self._options || {});\n if (request.method === \"GET\") {\n request.body = null;\n }\n self._changeReadyState(3);\n var timer = void 0;\n self.timeout = self.timeout || 0;\n if (self.timeout > 0) {\n timer = setTimeout(function () {\n if (self.readyState === 3) {\n _this._call(\"onloadend\");\n self._changeReadyState(0);\n self._call(\"ontimeout\");\n }\n }, self.timeout);\n }\n request.timeout = self.timeout;\n adapter(request, function (response) {\n\n function getAndDelete(key) {\n var t = response[key];\n delete response[key];\n return t;\n }\n\n // If the request has already timeout, return\n if (self.readyState !== 3) return;\n clearTimeout(timer);\n\n // Make sure the type of status is integer\n self.status = getAndDelete(\"statusCode\") - 0;\n\n var responseText = getAndDelete(\"responseText\");\n var statusMessage = getAndDelete(\"statusMessage\");\n\n // Network error, set the status code 0\n if (!self.status) {\n self.statusText = responseText;\n self._call(\"onerror\", { msg: statusMessage });\n } else {\n // Parsing the response headers to array in a object, because\n // there may be multiple values with the same header name\n var responseHeaders = getAndDelete(\"headers\");\n var headers = {};\n for (var field in responseHeaders) {\n var value = responseHeaders[field];\n var key = field.toLowerCase();\n // Is array\n if ((typeof value === \"undefined\" ? \"undefined\" : _typeof(value)) === \"object\") {\n headers[key] = value;\n } else {\n headers[key] = headers[key] || [];\n headers[key].push(value);\n }\n }\n var cookies = headers[\"set-cookie\"];\n if (isBrowser && cookies) {\n cookies.forEach(function (e) {\n // Remove the http-Only property of the cookie\n // so that JavaScript can operate it.\n document.cookie = e.replace(/;\\s*httpOnly/ig, \"\");\n });\n }\n self.responseHeaders = headers;\n // Set the fields of engine from response\n self.statusText = statusMessage || \"\";\n self.response = self.responseText = responseText;\n self._response = response;\n self._changeReadyState(4);\n self._call(\"onload\");\n }\n self._call(\"onloadend\");\n });\n } else {\n console.error(\"Ajax require adapter\");\n }\n }\n }, {\n key: \"setRequestHeader\",\n value: function setRequestHeader(key, value) {\n this.requestHeaders[util.trim(key)] = value;\n }\n }, {\n key: \"getResponseHeader\",\n value: function getResponseHeader(key) {\n return (this.responseHeaders[key.toLowerCase()] || \"\").toString() || null;\n }\n }, {\n key: \"getAllResponseHeaders\",\n value: function getAllResponseHeaders() {\n var str = \"\";\n for (var key in this.responseHeaders) {\n str += key + \":\" + this.getResponseHeader(key) + \"\\r\\n\";\n }\n return str || null;\n }\n }, {\n key: \"abort\",\n value: function abort(msg) {\n this._changeReadyState(0);\n this._call(\"onerror\", { msg: msg });\n this._call(\"onloadend\");\n }\n }], [{\n key: \"setAdapter\",\n value: function setAdapter(requestAdapter) {\n adapter = requestAdapter;\n }\n }]);\n\n return AjaxEngine;\n }();\n\n return AjaxEngine;\n}", "function EngineWrapper(adapter) {\n var AjaxEngine = function () {\n function AjaxEngine() {\n _classCallCheck(this, AjaxEngine);\n\n this.requestHeaders = {};\n this.readyState = 0;\n this.timeout = 0; // 0 stands for no timeout\n this.responseURL = \"\";\n this.responseHeaders = {};\n }\n\n _createClass(AjaxEngine, [{\n key: \"_call\",\n value: function _call(name) {\n this[name] && this[name].apply(this, [].splice.call(arguments, 1));\n }\n }, {\n key: \"_changeReadyState\",\n value: function _changeReadyState(state) {\n this.readyState = state;\n this._call(\"onreadystatechange\");\n }\n }, {\n key: \"open\",\n value: function open(method, url) {\n this.method = method;\n if (!url) {\n url = location.href;\n } else {\n url = util.trim(url);\n if (url.indexOf(\"http\") !== 0) {\n // Normalize the request url\n if (isBrowser) {\n var t = document.createElement(\"a\");\n t.href = url;\n url = t.href;\n }\n }\n }\n this.responseURL = url;\n this._changeReadyState(1);\n }\n }, {\n key: \"send\",\n value: function send(arg) {\n var _this = this;\n\n arg = arg || null;\n var self = this;\n if (adapter) {\n var request = {\n method: self.method,\n url: self.responseURL,\n headers: self.requestHeaders || {},\n body: arg\n };\n util.merge(request, self._options || {});\n if (request.method === \"GET\") {\n request.body = null;\n }\n self._changeReadyState(3);\n var timer = void 0;\n self.timeout = self.timeout || 0;\n if (self.timeout > 0) {\n timer = setTimeout(function () {\n if (self.readyState === 3) {\n _this._call(\"onloadend\");\n self._changeReadyState(0);\n self._call(\"ontimeout\");\n }\n }, self.timeout);\n }\n request.timeout = self.timeout;\n adapter(request, function (response) {\n\n function getAndDelete(key) {\n var t = response[key];\n delete response[key];\n return t;\n }\n\n // If the request has already timeout, return\n if (self.readyState !== 3) return;\n clearTimeout(timer);\n\n // Make sure the type of status is integer\n self.status = getAndDelete(\"statusCode\") - 0;\n\n var responseText = getAndDelete(\"responseText\");\n var statusMessage = getAndDelete(\"statusMessage\");\n\n // Network error, set the status code 0\n if (!self.status) {\n self.statusText = responseText;\n self._call(\"onerror\", { msg: statusMessage });\n } else {\n // Parsing the response headers to array in a object, because\n // there may be multiple values with the same header name\n var responseHeaders = getAndDelete(\"headers\");\n var headers = {};\n for (var field in responseHeaders) {\n var value = responseHeaders[field];\n var key = field.toLowerCase();\n // Is array\n if ((typeof value === \"undefined\" ? \"undefined\" : _typeof(value)) === \"object\") {\n headers[key] = value;\n } else {\n headers[key] = headers[key] || [];\n headers[key].push(value);\n }\n }\n var cookies = headers[\"set-cookie\"];\n if (isBrowser && cookies) {\n cookies.forEach(function (e) {\n // Remove the http-Only property of the cookie\n // so that JavaScript can operate it.\n document.cookie = e.replace(/;\\s*httpOnly/ig, \"\");\n });\n }\n self.responseHeaders = headers;\n // Set the fields of engine from response\n self.statusText = statusMessage || \"\";\n self.response = self.responseText = responseText;\n self._response = response;\n self._changeReadyState(4);\n self._call(\"onload\");\n }\n self._call(\"onloadend\");\n });\n } else {\n console.error(\"Ajax require adapter\");\n }\n }\n }, {\n key: \"setRequestHeader\",\n value: function setRequestHeader(key, value) {\n this.requestHeaders[util.trim(key)] = value;\n }\n }, {\n key: \"getResponseHeader\",\n value: function getResponseHeader(key) {\n return (this.responseHeaders[key.toLowerCase()] || \"\").toString() || null;\n }\n }, {\n key: \"getAllResponseHeaders\",\n value: function getAllResponseHeaders() {\n var str = \"\";\n for (var key in this.responseHeaders) {\n str += key + \":\" + this.getResponseHeader(key) + \"\\r\\n\";\n }\n return str || null;\n }\n }, {\n key: \"abort\",\n value: function abort(msg) {\n this._changeReadyState(0);\n this._call(\"onerror\", { msg: msg });\n this._call(\"onloadend\");\n }\n }], [{\n key: \"setAdapter\",\n value: function setAdapter(requestAdapter) {\n adapter = requestAdapter;\n }\n }]);\n\n return AjaxEngine;\n }();\n\n return AjaxEngine;\n}", "function AjaxClient(){\n this.client = null;\n try{\n this.client = new XMLHttpRequest();\n } catch (e) {\n try {\n this.client = new ActiveXObject(\"Msxml2.XMLHTTP\");\n } catch (e) {\n try {\n\t\t\t\tthis.client = new ActiveXObject(\"Microsoft.XMLHTTP\");\n\t\t\t} catch (e) {\n\t\t\t\tthis.client = null;\n\t\t\t}\n }\n }\n\n this.request = function(method, url, data, responseHandler){\n if(!this.client){\n window.alert(\"AJAX required, but not supported by your browser. You can no longer use this site.\");\n return ;\n }\n\n if(data){\n // encode both for get and for post requests\n data = JSONtoURL(data);\n }\n if (method == \"GET\"){\n // before opening connection\n // we must know the complete url\n url += \"?\" + (data ? data : \"\");\n console.log(\"GET \" + url);\n }\n this.client.open(method, url, true);\n if (method == \"POST\") {\n // we can only set headers after\n // having opened the connection\n this.client.setRequestHeader(\n 'Content-Type',\n // php $_POST can only be used with :\n // application/x-www-form-urlencoded\n // multipart/form-data\n 'application/x-www-form-urlencoded');\n }\n var thatclient = this.client;\n this.client.onreadystatechange = function(){\n if(thatclient.readyState == 4){\n console.log(thatclient);\n var response = JSON.parse(thatclient.responseText);\n responseHandler(response);\n }\n }\n this.client.send(data);\n }\n\n this.get = function (url, responseHandler) {\n return this.request(\"GET\", url, null, responseHandler);\n }\n\n this.post = function (url, data, responseHandler) {\n return this.request(\"POST\", url, data, responseHandler);\n }\n}", "function http() {\n\tthis.hint = 'url,queryType,dataType,async,data,timeout\\n\\nПри передаче данных в виде аргументов следует соблюдать их порядок, как в примере выше\\n\\nИмя свойств в передаваемом объекте должны быть одноименны с названиями аргументов в примере выше';\n\tthis.control = false;\n\tthis.lastQuery = false;\n\tthis.config = new Object();\n\tthis.defined = {\n\t\turl : '',\n\t\tqueryType : 'POST',\n\t\tdataType : 'json',\n\t\tasync : true,\n\t\tdata : false,\n\t\ttimeout : 500\n\t}\n\tthis.log = new Array();\n\tthis.log.console = true;\n\tthis.log.show = function(){\n\t\tfor (var i=0; i<this.length; i++) {\n\t\t\tconsole.log(this[i]);\n\t\t}\n\t}\n\tthis.log.clean = function(){\n\t\tthis.splice( 0,this.length );\n\t}\n\tthis.fromObject = function(arg) {\n\t\tif( arg != null && typeof(arg) == 'object' && arg.url != undefined ) {\n\t\t\tthis.control = true;\n\t\t\tthis.config.url = arg.url;\n\t\t\targ.queryType ? this.config.queryType = arg.queryType : this.config.queryType = this.defined.queryType;\n\t\t\targ.dataType ? this.config.dataType = arg.dataType : this.config.dataType = this.defined.dataType;\n\t\t\targ.async ? this.config.async = arg.async : this.config.async = this.defined.async;\n\t\t\targ.data ? this.config.data = arg.data : this.config.data = this.defined.data;\n\t\t\targ.timeout ? this.config.timeout = arg.timeout : this.config.timeout = this.defined.timeout;\n\t\t} else {\n\t\t\tif( typeof(arg) == 'string' ) { this.fromArguments(new Array(arg)) }\n\t\t}\n\t}\n\tthis.fromArguments = function(args) {\n\t\tif ( !args[0] ) { console.error('No URL'); return false }\n\t\t\telse { this.config.url = args[0]; this.control = true; }\n\t\tif ( args[1] === undefined ) this.config.queryType = this.defined.queryType;\n\t\t\telse this.config.queryType = args[1];\n\t\tif ( args[2] === undefined ) this.config.dataType = this.defined.dataType;\n\t\t\telse this.config.dataType = args[2];\n\t\tif ( args[3] === undefined ) this.config.async = this.defined.async;\n\t\t\telse this.config.async = args[3];\n\t\tif ( args[4] === undefined ) this.config.data = this.defined.data;\n\t\t\telse this.config.data = args[4];\n\t\tif ( args[5] === undefined ) this.config.timeout = this.defined.timeout;\n\t\t\telse this.config.timeout = args[5];\n\t}\n\tthis.router = function(ARGS){\n\t\tswitch( ARGS.length ) {\n\t\t\tcase 0 : this.lastQuery ? this.control = true : 0; break;\n\t\t\tcase 1 : this.fromObject(ARGS[0]); break;\n\t\t\tdefault : this.fromArguments(ARGS);\n\t\t}\n\t}\n\tthis.request = function() {\n\t\tthis.router(arguments);\n\t\tif( this.control ) {\n\t\t\treturn new Promise( function(resolve,reject) {\n\t\t\t\t$.ajax({\n\t\t\t\t\ttimeout : document.http.config.url,\n\t\t\t\t\turl : document.http.config.url,\n\t\t\t\t\ttype : document.http.config.queryType,\n\t\t\t\t\tdataType : document.http.config.dataType,\n\t\t\t\t\tasync : document.http.config.async,\n\t\t\t\t\tdata : document.http.config.data,\n\t\t\t\t\tsuccess : function( data, control ) { document.http.lastQuery = true; resolve(data) },\n\t\t\t\t\terror : function (xhr, errorType, exception) { var errorMessage = exception || xhr.controlText; reject(errorMessage); },\n\t\t\t\t\tcomplete : function() {\n\t\t\t\t\t\tdocument.http.control = false;\n\t\t\t\t\t\tvar msg = 'Request to ' + document.http.config.url+ ' completed'\n\t\t\t\t\t\tif ( document.http.log.console ) console.log(msg);\n\t\t\t\t\t\tdocument.http.log.push(msg);\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t} )\n\t\t} else {\n\t\t\tconsole.error('Cannot to request'); return false;\n\t\t}\n\t}\n}", "function _initializeRequestHandler()\n\t{\n\t\t/** Initialize */\n\t\tvar xhr = new XMLHttpRequest();\n\n\t\t/** Check if the XMLHttpRequest object has a \"withCredentials\" property.\n\t\t * \"withCredentials\" only exits on the XMLHttpRequest2 object. */\n \t\tif (\"withCredentials\" in xhr) {\n\t\t\txhr.withCredentials = true; // This is very important for server-side cookies to be sent to the server.\n\t\t\t\treturn xhr;\n\n\t\t/** Check the type of handler available. */\n\t\t} else if (typeof XDomainRequest !== \"undefined\") {\n\t\t\t/** Otherwise, check if XDomainRequest.\n\t\t\t * XDomainRequest only exists in IE, and is IE's way of making CORS requests. */\n\t\t\txhr = new XDomainRequest();\n\t\t\t_isDomainRequest = true;\n\n\t\t\t/** Assigned the jQuery ajax settings. */\n\t\t\t$.ajaxSettings.xhr = function() {\n\t\t\t\ttry {\n\t\t\t\t\tif (xhr)\n\t\t\t\t\t{\n\t\t\t\t\t\txhr.onerror = _failureWrapperIE;\n\t\t\t\t\t\txhr.onload = _successWrapperIE;\n\t\t\t\t\t}\n\t\t\t\t\treturn xhr;\n\t\t\t\t}\n\t\t\t\tcatch(e)\n\t\t\t\t{\n\t\t\t\t\tSSE.Lib.MessageBox.Critical(SSE.Model.Message.new({\n\t\t\t\t\t\ttitle: \"Exception thrown configuring XDomainRequest\"\n\t\t\t\t\t\t, messageBody: \"The following exception was thrown: \" + e\n\t\t\t\t\t}));\n\n\t\t\t\t\t/** Needs to return something in the event of an error. */\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t};\n\t\t} else {\n\t\t\t/** Otherwise CORS is not supported in this browser. */\n\t\t\tSSE.Lib.MessageBox.Critical(SSE.Models.Message.new({\n\t\t\t\ttitle: \"Broken Transport\"\n\t\t\t\t, messageBody: 'This client does not support the transport protocol our API uses.\\r\\nPlease use Chrome or FF browser.'\n\t\t\t}));\n\n\t\t\t/** Exit the function. */\n\t\t\treturn null;\n\t\t}\n\n\t\t/** Set default configs. */\n\t\t$.support.cors = true;\n\n\t\t/** Return handler. */\n\t\treturn xhr;\n\t}", "function AJAXICache(method, url, data, callback)\n {\n this._url = url;\n this._data = data;\n this._method = method;\n this._callback = callback;\n }", "function AjaxRequest (url, opts){\r\n var headers = {\r\n 'X-Requested-With': 'XMLHttpRequest',\r\n 'X-Prototype-Version': '1.6.1',\r\n 'Accept': 'text/javascript, text/html, application/xml, text/xml, */*'\r\n };\r\n var ajax = null;\r\n\r\nif (DEBUG_TRACE_AJAX) logit (\"AJAX: \"+ url +\"\\n\" + inspect (opts, 3, 1)); \r\n \r\n if (window.XMLHttpRequest)\r\n ajax=new XMLHttpRequest();\r\n else\r\n ajax=new ActiveXObject(\"Microsoft.XMLHTTP\");\r\n \r\n if (opts.method==null || opts.method=='')\r\n method = 'GET';\r\n else\r\n method = opts.method.toUpperCase(); \r\n \r\n if (method == 'POST'){\r\n headers['Content-type'] = 'application/x-www-form-urlencoded; charset=UTF-8';\r\n } else if (method == 'GET'){\r\n addUrlArgs (url, opts.parameters);\r\n }\r\n\r\n ajax.onreadystatechange = function(){\r\n// ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete']; states 0-4\r\n if (ajax.readyState==4) {\r\n if (ajax.status >= 200 && ajax.status < 305)\r\n if (opts.onSuccess) opts.onSuccess(ajax);\r\n else\r\n if (opts.onFailure) opts.onFailure(ajax);\r\n } else {\r\n if (opts.onChange) opts.onChange (ajax);\r\n }\r\n } \r\n \r\n ajax.open(method, url, true); // always async!\r\n\r\n for (var k in headers)\r\n ajax.setRequestHeader (k, headers[k]);\r\n if (matTypeof(opts.requestHeaders)=='object')\r\n for (var k in opts.requestHeaders)\r\n ajax.setRequestHeader (k, opts.requestHeaders[k]);\r\n \r\n if (method == 'POST'){\r\n var a = [];\r\n for (k in opts.parameters){\r\n\t if(matTypeof(opts.parameters[k]) == 'object')\r\n\t\tfor(var h in opts.parameters[k])\r\n\t\t\ta.push (k+'['+h+'] ='+ opts.parameters[k][h] );\r\n\t else\r\n a.push (k +'='+ opts.parameters[k] );\r\n\t}\r\n ajax.send (a.join ('&'));\r\n } else {\r\n ajax.send();\r\n }\r\n}", "function easyHTTP() {\n this.http = new XMLHttpRequest();\n}", "function AjaxContextParametersRequester(domEl) {\r\n BaseObject.apply(this, arguments);\r\n this.root = domEl;\r\n for (var e in AjaxContextParameterFlags) {\r\n this[\"get_\" + e] = AjaxContextParametersRequester.$createParamExtractor(AjaxContextParameterFlags[e]);\r\n }\r\n}", "function IAjaxHttpHook() { }", "function XMLHttpRequestAdapter () {\n this.xdr = null;\n this.withCredentials = false;\n this.status = '';\n this.readyState = 0;\n this.responseType = null;\n this.responseText = '';\n this.isXHR = false;\n }", "createRequest(settings) {\n // PERFORMANCE HACK:\n // Reduce OPTIONS preflight requests by removing the Accept-Datetime header\n // on requests for resources that are presumed to have been time-negotiated\n if (this.negotiatedResources[this.removeQuery(settings.url)]) {\n delete settings.headers['accept-datetime'];\n }\n // Create the actual XMLHttpRequest\n const request = new XMLHttpRequest();\n const reqHeaders = settings.headers;\n request.open(settings.method, settings.url, true);\n request.timeout = settings.timeout;\n for (const header in reqHeaders) {\n if (!(header in UNSAFE_REQUEST_HEADERS) && reqHeaders[header]) {\n request.setRequestHeader(header, reqHeaders[header]);\n }\n }\n // Create a proxy for the XMLHttpRequest\n const requestProxy = new events_1.EventEmitter();\n requestProxy.abort = () => { request.abort(); };\n // Handle the arrival of a response\n request.onload = () => {\n // Convert the response into an iterator\n const response = new stream_1.Readable();\n response.push(request.responseText || '');\n response.push(null);\n response.statusCode = request.status;\n response.responseUrl = request.responseURL;\n // Parse the response headers\n response.headers = {};\n const resHeaders = response.headers;\n const rawHeaders = request.getAllResponseHeaders() || '';\n const headerMatcher = /^([^:\\n\\r]+):[ \\t]*([^\\r\\n]*)$/mg;\n let match = headerMatcher.exec(rawHeaders);\n while (match) {\n resHeaders[match[1].toLowerCase()] = match[2];\n match = headerMatcher.exec(rawHeaders);\n }\n // Emit the response\n requestProxy.emit('response', response);\n // If the resource was time-negotiated, store its queryless URI\n // to enable the PERFORMANCE HACK explained above\n if (reqHeaders['accept-datetime'] && resHeaders['memento-datetime']) {\n const resource = this.removeQuery(resHeaders['content-location'] || settings.url);\n if (!this.negotiatedResources[resource]) {\n // Ensure the resource is not a timegate\n const links = resHeaders.link && parseLink(resHeaders.link);\n const timegate = this.removeQuery(links && links.timegate && links.timegate.url);\n if (resource !== timegate) {\n this.negotiatedResources[resource] = true;\n }\n }\n }\n };\n // Report errors and timeouts\n request.onerror = () => {\n requestProxy.emit('error', new Error('Error requesting ' + settings.url));\n };\n request.ontimeout = () => {\n requestProxy.emit('error', new Error('Timeout requesting ' + settings.url));\n };\n // Execute the request\n request.send();\n return requestProxy;\n }", "function inicializa_xhr() {\n if (window.XMLHttpRequest) {\n return new XMLHttpRequest();\n } else if (window.ActiveXObject) {\n return new ActiveXObject(\"Microsoft.XMLHTTP\");\n }\n}", "function xhr_function() {\n // Get new xhr object using default factory\n var xhr = jQuery.ajaxSettings.xhr(); /*global jQuery */\n // Copy the browser's native setRequestHeader method\n var setRequestHeader = xhr.setRequestHeader;\n // Replace with a wrapper\n xhr.setRequestHeader = function(name, value) {\n // Ignore the X-Requested-With header\n if (String(name) === \"X-Requested-With\") {\n return;\n }\n // Otherwise call the native setRequestHeader method\n // Note: setRequestHeader requires its 'this' to be the xhr object,\n // which is what 'this' is here when executed.\n setRequestHeader.call(this, name, value);\n };\n // pass it on to jQuery\n return xhr;\n}", "function ajaxExtend( target, src ) { // 8596\n\tvar key, deep, // 8597\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {}; // 8598\n // 8599\n\tfor ( key in src ) { // 8600\n\t\tif ( src[ key ] !== undefined ) { // 8601\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; // 8602\n\t\t} // 8603\n\t} // 8604\n\tif ( deep ) { // 8605\n\t\tjQuery.extend( true, target, deep ); // 8606\n\t} // 8607\n // 8608\n\treturn target; // 8609\n} // 8610", "create() {\n const opts = pick$1(\n this.opts,\n \"agent\",\n \"enablesXDR\",\n \"pfx\",\n \"key\",\n \"passphrase\",\n \"cert\",\n \"ca\",\n \"ciphers\",\n \"rejectUnauthorized\"\n );\n opts.xdomain = !!this.opts.xd;\n opts.xscheme = !!this.opts.xs;\n\n const xhr = (this.xhr = new xmlhttprequest(opts));\n const self = this;\n\n try {\n debug$1(\"xhr open %s: %s\", this.method, this.uri);\n xhr.open(this.method, this.uri, this.async);\n try {\n if (this.opts.extraHeaders) {\n xhr.setDisableHeaderCheck && xhr.setDisableHeaderCheck(true);\n for (let i in this.opts.extraHeaders) {\n if (this.opts.extraHeaders.hasOwnProperty(i)) {\n xhr.setRequestHeader(i, this.opts.extraHeaders[i]);\n }\n }\n }\n } catch (e) {}\n\n if (\"POST\" === this.method) {\n try {\n xhr.setRequestHeader(\"Content-type\", \"text/plain;charset=UTF-8\");\n } catch (e) {}\n }\n\n try {\n xhr.setRequestHeader(\"Accept\", \"*/*\");\n } catch (e) {}\n\n // ie6 check\n if (\"withCredentials\" in xhr) {\n xhr.withCredentials = this.opts.withCredentials;\n }\n\n if (this.opts.requestTimeout) {\n xhr.timeout = this.opts.requestTimeout;\n }\n\n if (this.hasXDR()) {\n xhr.onload = function() {\n self.onLoad();\n };\n xhr.onerror = function() {\n self.onError(xhr.responseText);\n };\n } else {\n xhr.onreadystatechange = function() {\n if (4 !== xhr.readyState) return;\n if (200 === xhr.status || 1223 === xhr.status) {\n self.onLoad();\n } else {\n // make sure the `error` event handler that's user-set\n // does not throw in the same tick and gets caught here\n setTimeout(function() {\n self.onError(typeof xhr.status === \"number\" ? xhr.status : 0);\n }, 0);\n }\n };\n }\n\n debug$1(\"xhr data %s\", this.data);\n xhr.send(this.data);\n } catch (e) {\n // Need to defer since .create() is called directly from the constructor\n // and thus the 'error' event can only be only bound *after* this exception\n // occurs. Therefore, also, we cannot throw here at all.\n setTimeout(function() {\n self.onError(e);\n }, 0);\n return;\n }\n\n if (typeof document !== \"undefined\") {\n this.index = Request.requestsCount++;\n Request.requests[this.index] = this;\n }\n }", "create() {\n const opts = pick(\n this.opts,\n \"agent\",\n \"enablesXDR\",\n \"pfx\",\n \"key\",\n \"passphrase\",\n \"cert\",\n \"ca\",\n \"ciphers\",\n \"rejectUnauthorized\"\n );\n opts.xdomain = !!this.opts.xd;\n opts.xscheme = !!this.opts.xs;\n\n const xhr = (this.xhr = new XMLHttpRequest(opts));\n const self = this;\n\n try {\n debug(\"xhr open %s: %s\", this.method, this.uri);\n xhr.open(this.method, this.uri, this.async);\n try {\n if (this.opts.extraHeaders) {\n xhr.setDisableHeaderCheck && xhr.setDisableHeaderCheck(true);\n for (let i in this.opts.extraHeaders) {\n if (this.opts.extraHeaders.hasOwnProperty(i)) {\n xhr.setRequestHeader(i, this.opts.extraHeaders[i]);\n }\n }\n }\n } catch (e) {}\n\n if (\"POST\" === this.method) {\n try {\n xhr.setRequestHeader(\"Content-type\", \"text/plain;charset=UTF-8\");\n } catch (e) {}\n }\n\n try {\n xhr.setRequestHeader(\"Accept\", \"*/*\");\n } catch (e) {}\n\n // ie6 check\n if (\"withCredentials\" in xhr) {\n xhr.withCredentials = this.opts.withCredentials;\n }\n\n if (this.opts.requestTimeout) {\n xhr.timeout = this.opts.requestTimeout;\n }\n\n if (this.hasXDR()) {\n xhr.onload = function() {\n self.onLoad();\n };\n xhr.onerror = function() {\n self.onError(xhr.responseText);\n };\n } else {\n xhr.onreadystatechange = function() {\n if (4 !== xhr.readyState) return;\n if (200 === xhr.status || 1223 === xhr.status) {\n self.onLoad();\n } else {\n // make sure the `error` event handler that's user-set\n // does not throw in the same tick and gets caught here\n setTimeout(function() {\n self.onError(typeof xhr.status === \"number\" ? xhr.status : 0);\n }, 0);\n }\n };\n }\n\n debug(\"xhr data %s\", this.data);\n xhr.send(this.data);\n } catch (e) {\n // Need to defer since .create() is called directly from the constructor\n // and thus the 'error' event can only be only bound *after* this exception\n // occurs. Therefore, also, we cannot throw here at all.\n setTimeout(function() {\n self.onError(e);\n }, 0);\n return;\n }\n\n if (typeof document !== \"undefined\") {\n this.index = Request.requestsCount++;\n Request.requests[this.index] = this;\n }\n }", "create() {\n const opts = pick(\n this.opts,\n \"agent\",\n \"enablesXDR\",\n \"pfx\",\n \"key\",\n \"passphrase\",\n \"cert\",\n \"ca\",\n \"ciphers\",\n \"rejectUnauthorized\"\n );\n opts.xdomain = !!this.opts.xd;\n opts.xscheme = !!this.opts.xs;\n\n const xhr = (this.xhr = new XMLHttpRequest(opts));\n const self = this;\n\n try {\n debug(\"xhr open %s: %s\", this.method, this.uri);\n xhr.open(this.method, this.uri, this.async);\n try {\n if (this.opts.extraHeaders) {\n xhr.setDisableHeaderCheck && xhr.setDisableHeaderCheck(true);\n for (let i in this.opts.extraHeaders) {\n if (this.opts.extraHeaders.hasOwnProperty(i)) {\n xhr.setRequestHeader(i, this.opts.extraHeaders[i]);\n }\n }\n }\n } catch (e) {}\n\n if (\"POST\" === this.method) {\n try {\n xhr.setRequestHeader(\"Content-type\", \"text/plain;charset=UTF-8\");\n } catch (e) {}\n }\n\n try {\n xhr.setRequestHeader(\"Accept\", \"*/*\");\n } catch (e) {}\n\n // ie6 check\n if (\"withCredentials\" in xhr) {\n xhr.withCredentials = this.opts.withCredentials;\n }\n\n if (this.opts.requestTimeout) {\n xhr.timeout = this.opts.requestTimeout;\n }\n\n if (this.hasXDR()) {\n xhr.onload = function() {\n self.onLoad();\n };\n xhr.onerror = function() {\n self.onError(xhr.responseText);\n };\n } else {\n xhr.onreadystatechange = function() {\n if (4 !== xhr.readyState) return;\n if (200 === xhr.status || 1223 === xhr.status) {\n self.onLoad();\n } else {\n // make sure the `error` event handler that's user-set\n // does not throw in the same tick and gets caught here\n setTimeout(function() {\n self.onError(typeof xhr.status === \"number\" ? xhr.status : 0);\n }, 0);\n }\n };\n }\n\n debug(\"xhr data %s\", this.data);\n xhr.send(this.data);\n } catch (e) {\n // Need to defer since .create() is called directly from the constructor\n // and thus the 'error' event can only be only bound *after* this exception\n // occurs. Therefore, also, we cannot throw here at all.\n setTimeout(function() {\n self.onError(e);\n }, 0);\n return;\n }\n\n if (typeof document !== \"undefined\") {\n this.index = Request.requestsCount++;\n Request.requests[this.index] = this;\n }\n }", "function JsonRpcSenderJquery(url, logger) {\n this.url = url;\n this.method = 'POST';\n this.logger = logger;\n }", "function xAR(options) { return AjaxRequest(options); }", "function easyHTTP() {\n this.http = new XMLHttpRequest();\n\n}", "function Ajax() {\n var xhr = new XMLHttpRequest();\n this.get = function (fetchFunc, options, cb) {\n if (fetchFunc === true) {\n var err,\n response = {};\n fetch(options.url, {\n method: options.method ? options.method : \"get\",\n mode: options.mode ? options.mode : \"\",\n headers: options.headers ? options.headers : {}\n }).then(function (res) {\n response.res = res;\n return res.json();\n }).then(function (data) {\n response.data = data\n return cb(err, response);\n }).catch(function (error) {\n err = error;\n return cb(err, response);\n });\n } else {\n xhr.open(\"get\", options.url, options.async ? options.async: true);\n if (options.type) {\n this.responseType = options.type;\n }\n if (options.headers) {\n Object.keys(options.headers).forEach(function (index) {\n xhr.setRequestHeader(index, options.headers[index]);\n });\n }\n xhr.setRequestHeader(\"ajax\", \"express\");\n xhr.onreadystatechange = function () {\n if (this.readyState === 0) {\n if (options.beforStart) {\n options.beforStart();\n }\n }\n if (this.readyState === 1) {\n if (options.onStart) {\n options.onStart(xhr);\n }\n }\n if (this.readyState === 3) {\n if (options.onProgress) {\n options.onProgress(xhr);\n }\n }\n var err;\n var data;\n if (this.readyState === 4) {\n if (this.status === 404 || this.status === 403 || this.status === 500) {\n err = {status: this.status};\n }\n if (this.readyState === 4 && this.status === 200) {\n data = {response: this.response, responseText: this.responseText, responseUrl: this.responseURL, responseXML: this.responseXML, responseType: this.responseType};\n }\n return cb(err, data);\n }\n };\n xhr.send();\n }\n }\n this.post = function (options, cb) {\n var err;\n var data;\n var formData = new FormData();\n if (options.url) {\n xhr.open(\"post\", options.url, options.async ? options.async : true);\n if (options.headers) {\n Object.keys(options.headers).forEach(function (index) {\n xhr.setRequestHeader(index, options.headers[index]);\n });\n }\n if (options.fullAjax) {\n return fullAjax(this);\n }\n if (options.data) {\n if (options.upload) {\n var file;\n file = options.upload.file;\n Array.from(file).forEach(function (fil) {\n formData.append(options.upload.fileName, fil);\n });\n if (options.upload.onload) {\n xhr.upload.onload = function (e) {\n return options.upload.onload(e);\n }\n }\n if (options.upload.onprogress) {\n xhr.upload.onprogress = function (e) {\n return options.upload.onprogress(e);\n }\n }\n if (options.upload.onerror) {\n xhr.upload.onerror = function (e) {\n return options.upload.onerror(e);\n }\n }\n }\n if (typeof options.data === \"object\") {\n Object.keys(options.data).forEach(function (item) {\n formData.append(item, options.data[item]);\n });\n options.data = formData;\n } else if (typeof options.data === \"string\") {\n xhr.setRequestHeader(\"Content-type\", \"application/x-www-form-urlencoded\");\n }\n xhr.setRequestHeader(\"ajax\", \"express\");\n if (options.onabort) {\n xhr.onabort = function (e) {\n\n return options.onabort(e);\n };\n }\n xhr.onreadystatechange = function () {\n if (this.readyState === 0) {\n if (options.beforStart) {\n options.beforStart();\n }\n }\n if (this.readyState === 1) {\n if (options.onStart) {\n options.onStart();\n }\n }\n if (this.readyState === 3) {\n if (options.onProgress) {\n options.onProgress();\n }\n }\n\n if (this.status === 404 || this.status === 403 || this.status === 500) {\n err = {status: this.status};\n }\n if (this.readyState === 4 && this.status === 200) {\n data = {response: this.response, responseText: this.responseText, responseUrl: this.responseURL, responseXML: this.responseXML, responseType: this.responseType};\n }\n if (cb) {\n return cb(err, data);\n }\n };\n xhr.send(options.data);\n } else {\n err = new Error(\"bad request\");\n return console.error(\"cannot send empty data\");\n }\n } else {\n err = new Error(\"bad request\");\n return console.error(\"cannot send empty url\");\n }\n }\n }", "function initRequest() {\n if (window.XMLHttpRequest) {\n return new XMLHttpRequest();\n } else if (window.ActiveXObject) {\n isIE = true;\n return new ActiveXObject(\"Microsoft.XMLHTTP\");\n }\n }", "function xhrShim(opts){\n this.xhr = {\n getAllResponseHeaders: function(){ return ''; },\n getResponseHeader: function(){ return 'application/json'; },\n responseText: opts['responseText'],\n status: opts['status']\n };\n return this;\n}", "constructor(){\n super(...arguments);\n this._handlers = {};\n this._proxies = [];\n }", "function xhrFactory() {\n return new XMLHttpRequest();\n }", "function Ajax (options) {\n this.options = options || {};\n if (!this.options.url) return;\n var async = this.options.async === undefined ? true : !!this.options.async;\n this.request = window.XMLHttpRequest ?\n new XMLHttpRequest() :\n new ActiveXObject(\"Microsoft.XMLHTTP\");\n var _this = this;\n\n if (this.options.headers) {\n for (var name in this.options.headers) {\n this.request.setRequestHeader(name, this.options.headers[name]);\n }\n }\n\n this.request.open(this.options.method || CONST.METHOD.GET, this.getUrl(), async);\n var dataToSend = this.options.onrequest &&\n this.options.onrequest(this.options.data, this.request) ||\n this.options.data;\n (typeof dataToSend === CONST.STRING) || (dataToSend = JSON.stringify(dataToSend));\n this.request.send(dataToSend);\n\n if (async) {\n this.request.onreadystatechange = function () {\n if (_this.request.readyState === 4) {\n _this.options.onresponse && _this.options.onresponse(_this.request.responseText, _this.request, _this.options.data);\n }\n }\n } else {\n this.options.onresponse && this.options.onresponse(this.request.responseText, this.request, this.options.data);\n }\n }", "function initAjax(){\n\tif (window.XMLHttpRequest){\n\t\treturn new XMLHttpRequest(); // Firefox, Safari, ...\n\t}\n\telse if (window.ActiveXObject){\n\t\treturn new ActiveXObject('Microsoft.XMLHTTP'); // Internet Explorer \n\t}\n\telse{\n\t\treturn false;\n\t}\n}", "function ajaxExtend( target, src ) {\n var deep, key,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for ( key in src ) {\n if ( src[ key ] !== undefined ) {\n ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];\n }\n }\n if ( deep ) {\n jQuery.extend( true, target, deep );\n }\n\n return target;\n}", "function ajaxExtend( target, src ) {\n var deep, key,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for ( key in src ) {\n if ( src[ key ] !== undefined ) {\n ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];\n }\n }\n if ( deep ) {\n jQuery.extend( true, target, deep );\n }\n\n return target;\n}", "function ajaxExtend( target, src ) {\n var deep, key,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for ( key in src ) {\n if ( src[ key ] !== undefined ) {\n ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];\n }\n }\n if ( deep ) {\n jQuery.extend( true, target, deep );\n }\n\n return target;\n}", "function ajaxExtend( target, src ) {\n var key, deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for ( key in src ) {\n if ( src[ key ] !== undefined ) {\n ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];\n }\n }\n if ( deep ) {\n jQuery.extend( true, target, deep );\n }\n\n return target;\n}", "function AjaxRequest(token) {\n this.mode = \"ajax\";\n this.token = token;\n }", "function ajaxExtend( target, src ) {\r\n\tvar deep, key,\r\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\r\n\r\n\tfor ( key in src ) {\r\n\t\tif ( src[ key ] !== undefined ) {\r\n\t\t\t( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];\r\n\t\t}\r\n\t}\r\n\tif ( deep ) {\r\n\t\tjQuery.extend( true, target, deep );\r\n\t}\r\n\r\n\treturn target;\r\n}", "request( method, endpoint, query = true, data = {}, loading = this.loading ) { \n\n // Validate the endpoint.\n if( this.utils().validate(method, endpoint) ) {\n\n // Save the endpoint and method.\n this.method = method;\n this.endpoint = endpoint;\n\n // Start loading.\n if( loading ) event.trigger('loading', true);\n \n // Generate a unique ID for the request.\n const pid = this.utils().pid();\n\n // Send the request.\n const request = $.ajax({\n dataType: 'json',\n url: this.utils().url(pid, query),\n method: method,\n data: data,\n context: this,\n cache: false\n }).always((response) => {\n \n // Capture response data.\n if( response.hasOwnProperty('paging') ) {\n \n const paging = {increments: this.paging.increments};\n \n this.$set(this, 'paging', $.extend(true, {}, paging, response.paging));\n \n }\n if( response.hasOwnProperty('filter') ) {\n \n this.$set(this, 'filter', $.extend(true, {}, response.filter));\n \n }\n if( response.hasOwnProperty('sort') ) {\n \n this.$set(this, 'sort', $.extend(true, {}, response.sort));\n \n }\n if( response.hasOwnProperty('index') ) {\n \n this.$set(this, 'indexing', $.extend(true, {}, response.index.data));\n this.index.order = response.index.order;\n \n }\n \n // Add the query string to the response data.\n response.query = query ? this.utils().query() : {};\n \n // End the loading animation.\n if( loading ) setTimeout(() => {\n \n event.trigger('loading', false);\n \n }, 250);\n\n });\n\n // Poll for request progress.\n this.progress(pid);\n \n // Return the request.\n return request;\n\n }\n\n }", "function HttpRequestArgs() {\n var _this = this;\n var __arguments = new Array(arguments.length);\n for (var __argumentIndex = 0; __argumentIndex < __arguments.length; ++__argumentIndex) {\n __arguments[__argumentIndex] = arguments[__argumentIndex];\n }\n if (__arguments.length == 0) {\n _this = _super.call(this) || this;\n _this.fmliveswitchHttpRequestArgsInit();\n _this.setTimeout(15000);\n _this.setMethod(fm.liveswitch.HttpMethod.Post);\n _this.__headers = new fm.liveswitch.NameValueCollection();\n }\n else {\n throw new fm.liveswitch.Exception('Constructor overload does not exist with specified parameter count/type combination.');\n }\n return _this;\n }", "function createStandardXHR() {\n try {\n return new window.XMLHttpRequest();\n } catch (e) {\n }\n }", "function ajaxExtend( target, src ) {\r\n\tvar key, deep,\r\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\r\n\r\n\tfor ( key in src ) {\r\n\t\tif ( src[ key ] !== undefined ) {\r\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\r\n\t\t}\r\n\t}\r\n\tif ( deep ) {\r\n\t\tjQuery.extend( true, target, deep );\r\n\t}\r\n\r\n\treturn target;\r\n}", "function ajaxExtend( target, src ) {\r\n\tvar key, deep,\r\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\r\n\r\n\tfor ( key in src ) {\r\n\t\tif ( src[ key ] !== undefined ) {\r\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\r\n\t\t}\r\n\t}\r\n\tif ( deep ) {\r\n\t\tjQuery.extend( true, target, deep );\r\n\t}\r\n\r\n\treturn target;\r\n}", "function ajaxExtend( target, src ) {\n var deep, key,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for ( key in src ) {\n if ( src[ key ] !== undefined ) {\n ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];\n }\n }\n if ( deep ) {\n jQuery.extend( true, target, deep );\n }\n\n return target;\n}", "function LongPollingTransport() {\n var _super = new _cometd.LongPollingTransport();\n var that = (0, _cometd.derive)(_super);\n\n that.xhrSend = function (packet) {\n return $.ajax({\n url: packet.url,\n async: packet.sync !== true,\n type: 'POST',\n contentType: 'application/json;charset=UTF-8',\n data: packet.body,\n global: false,\n xhrFields: {\n // For asynchronous calls.\n withCredentials: true\n },\n beforeSend: function beforeSend(xhr) {\n // For synchronous calls.\n xhr.withCredentials = true;\n _setHeaders(xhr, packet.headers);\n // Returning false will abort the XHR send.\n return true;\n },\n success: packet.onSuccess,\n error: function error(xhr, reason, exception) {\n packet.onError(reason, exception);\n }\n });\n };\n\n return that;\n}", "function LongPollingTransport() {\n var _super = new _cometd.LongPollingTransport();\n var that = (0, _cometd.derive)(_super);\n\n that.xhrSend = function (packet) {\n return $.ajax({\n url: packet.url,\n async: packet.sync !== true,\n type: 'POST',\n contentType: 'application/json;charset=UTF-8',\n data: packet.body,\n global: false,\n xhrFields: {\n // For asynchronous calls.\n withCredentials: true\n },\n beforeSend: function beforeSend(xhr) {\n // For synchronous calls.\n xhr.withCredentials = true;\n _setHeaders(xhr, packet.headers);\n // Returning false will abort the XHR send.\n return true;\n },\n success: packet.onSuccess,\n error: function error(xhr, reason, exception) {\n packet.onError(reason, exception);\n }\n });\n };\n\n return that;\n}", "setAjaxData(ajax){\n\t\tif (_.isPlainObject(ajax))\n\t\t\tsuper.setAjaxData(ajax);\n\t\telse\n\t\t\tthis.values.ajax = (ajax===null) ? {} : ajax;\n\t\treturn this;\n\t}", "function Ajax() {\n\t\n\tthis.req = null;\t\t\t\t// XMLHttpRequest object\n\tthis.url = null;\t\t\t\t// Location of Server Script\n\tthis.method = \"POST\";\t\t\t// Method of delivery\n\tthis.async = true;\t\t\t\t// Continue JS execution\n\tthis.status = null;\t\t\t// HTTP status code\n\tthis.statusText = \"\";\t\t\t// HTTP status text\n\tthis.postData = null;\t\t\t// Data to send\n\tthis.readyState = null;\t\t// 0:Open, 1:loading, 2:loaded, 3:downloading, 4:completed\n\tthis.responseText = null;\t\t// Response as a String\n\tthis.responseXML = null;\t\t// Response as XML document\n\tthis.handleResp = null;\t\t// Response handler\n\tthis.responseFormat = \"text\"; \t// text, xml, object\n\tthis.mimeType = null;\t\t\t// Our MimeType\n\t\n\t\n\t// Init function\n\t// Create the XMLHttpRequest Object\n\tthis.init = function() {\n\t\tif(!this.req) {\n\t\t\ttry {\n\t\t\t\t// Try to create object for Firefox, Safari, IE7\n\t\t\t\tthis.req = new XMLHttpRequest();\n\t\t\t} catch(e) {\n\t\t\t\ttry {\n\t\t\t\t\t// Try to create object for later versions of IE\n\t\t\t\t\tthis.req = new ActiveXObject(\"MSXML2.XMLHTTP\");\n\t\t\t\t} catch(e) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// Try to create object for early versions of IE\n\t\t\t\t\t\tthis.req = new ActiveXObject(\"Microsoft.XMLHTTP\");\n\t\t\t\t\t} catch(e) {\n\t\t\t\t\t\t// Could not create an XMLHttpRequest object\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn this.req;\n\t};\n\t\n\t// doReq function\n\t// Call init, prepare request, send and error if fail \n\t// Also deal with readyStates\n\tthis.doReq = function() {\n\t\tif(!this.init()) {\n\t\t\talert(\"ERROR: Could not create XMLHttpRequest object\");\n\t\t\treturn;\n\t\t}\n\t\tthis.req.open(this.method, this.url, this.async);\n\t\t\n\t\tif(this.mimeType) {\n\t\t\ttry {\n\t\t\t\treq.overrideMimeType(this.mimeType);\n\t\t\t} catch(e) {\n\t\t\t\talert(\"ERROR: Couldn't override MIME type\");\n\t\t\t}\n\t\t}\n\t\t\n\t\tvar self = this; // Fix loss of scope\n\t\tthis.req.onreadystatechange = function() {\n\t\t\t\n\t\t\t// Switch on current ready state\n\t\t\tswitch(self.req.readyState) {\n\t\t\t\tcase 0: // open\n\t\t\t\t\t// Handle open\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1: // loading\n\t\t\t\t\t// Handle loading\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2: // loaded\n\t\t\t\t\t// Handle loaded\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3: // downloading\n\t\t\t\t\t// Handle downloading\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4: // completed\n\t\t\t\t\t\n\t\t\t\t\tswitch(self.responseFormat) {\n\t\t\t\t\t\tcase \"text\":\n\t\t\t\t\t\t\tresp = self.req.responseText;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"xml\":\n\t\t\t\t\t\t\tresp = self.req.responseXML;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"object\":\n\t\t\t\t\t\t\tresp = req;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(self.req.status >= 200 && self.req.status <=299) {\n\t\t\t\t\t\tself.handleResp(resp);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tself.handleErr(resp);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\talert(\"ERROR: Fatal readyState\");\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t};\n\t\t\n\t\tthis.req.send(this.postData);\n\t};\n\t\n\t// setMimeType Function\n\t// Set our MimeType\n\tthis.sexMimeType = function(mimeType) {\n\t\tthis.mimeType = mimeType;\n\t};\n\t\n\t// handleErr Function\n\t// Handle an error\n\tthis.handleErr = function() {\n\t\tvar errorWin;\n\t\ttry {\n\t\t\t//errorWin = window.open(\"\", \"errorWin\");\n\t\t\t//errorWin.document.body.innerHTML = this.responseText;\n\t\t} catch(e) {\n\t\t\talert( \"ERROR: An error occurred, but the error message cannot \"\n\t\t\t\t +\"be displayed.\\nPopup blockers must be disabled to see it.\\n\"\n\t\t\t\t +\"Status Code: \"+this.req.status+\"\\n\"\n\t\t\t\t +\"Status Description: \"+this.req.statusText);\n\t\t}\n\t};\n\t\n\t// setHandlerErr Function\n\t// Custom error handler\n\tthis.setHandlerErr = function(funcRef) {\n\t\tthis.handleErr = funcRef;\n\t};\n\t\n\t// setHandlerBoth Function\n\t// Handle both successes and errors\n\tthis.setHandlerBoth = function(funcRef) {\n\t\tthis.handleResp = funcRef;\n\t\tthis.handleErr = funcRef;\n\t};\n\t\n\t// abort Function\n\t// Stop a bad script\n\tthis.abort = function() {\n\t\tif(this.req) {\n\t\t\tthis.req.onreadystatechange = function() { };\n\t\t\tthis.req.abort();\n\t\t\tthis.req = null;\n\t\t}\n\t};\n\t\n\t// doGet Function\n\t// User function to call ajax script\n\tthis.doGet = function(url, hand, format) {\n\t\tthis.url = url;\n\t\tthis.handleResp = hand;\n\t\tthis.responseFormat = format || \"text\";\n\t\tthis.doReq();\n\t};\n}", "function ajaxExtend( target, src ) {\n var key, deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for ( key in src ) {\n if ( src[ key ] !== undefined ) {\n ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n }\n }\n if ( deep ) {\n jQuery.extend( true, target, deep );\n }\n\n return target;\n }", "function ajaxExtend( target, src ) {\n var key, deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for ( key in src ) {\n if ( src[ key ] !== undefined ) {\n ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n }\n }\n if ( deep ) {\n jQuery.extend( true, target, deep );\n }\n\n return target;\n}", "constructor () {\n this.xhr = new XMLHttpRequest(); //(AJAX ISLEMINI BASLATMAK ICIN XHR xhr objemizi olusturduk\n }", "create() {\n const opts = pick(this.opts, \"agent\", \"enablesXDR\", \"pfx\", \"key\", \"passphrase\", \"cert\", \"ca\", \"ciphers\", \"rejectUnauthorized\", \"autoUnref\");\n opts.xdomain = !!this.opts.xd;\n opts.xscheme = !!this.opts.xs;\n const xhr = this.xhr = new XMLHttpRequest(opts);\n\n try {\n debug(\"xhr open %s: %s\", this.method, this.uri);\n xhr.open(this.method, this.uri, this.async);\n\n try {\n if (this.opts.extraHeaders) {\n xhr.setDisableHeaderCheck && xhr.setDisableHeaderCheck(true);\n\n for (let i in this.opts.extraHeaders) {\n if (this.opts.extraHeaders.hasOwnProperty(i)) {\n xhr.setRequestHeader(i, this.opts.extraHeaders[i]);\n }\n }\n }\n } catch (e) {}\n\n if (\"POST\" === this.method) {\n try {\n xhr.setRequestHeader(\"Content-type\", \"text/plain;charset=UTF-8\");\n } catch (e) {}\n }\n\n try {\n xhr.setRequestHeader(\"Accept\", \"*/*\");\n } catch (e) {} // ie6 check\n\n\n if (\"withCredentials\" in xhr) {\n xhr.withCredentials = this.opts.withCredentials;\n }\n\n if (this.opts.requestTimeout) {\n xhr.timeout = this.opts.requestTimeout;\n }\n\n if (this.hasXDR()) {\n xhr.onload = () => {\n this.onLoad();\n };\n\n xhr.onerror = () => {\n this.onError(xhr.responseText);\n };\n } else {\n xhr.onreadystatechange = () => {\n if (4 !== xhr.readyState) return;\n\n if (200 === xhr.status || 1223 === xhr.status) {\n this.onLoad();\n } else {\n // make sure the `error` event handler that's user-set\n // does not throw in the same tick and gets caught here\n setTimeout(() => {\n this.onError(typeof xhr.status === \"number\" ? xhr.status : 0);\n }, 0);\n }\n };\n }\n\n debug(\"xhr data %s\", this.data);\n xhr.send(this.data);\n } catch (e) {\n // Need to defer since .create() is called directly from the constructor\n // and thus the 'error' event can only be only bound *after* this exception\n // occurs. Therefore, also, we cannot throw here at all.\n setTimeout(() => {\n this.onError(e);\n }, 0);\n return;\n }\n\n if (typeof document !== \"undefined\") {\n this.index = Request.requestsCount++;\n Request.requests[this.index] = this;\n }\n }", "function ajaxExtend( target, src ) {\r\r\n\tvar key, deep,\r\r\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\r\r\n\tfor ( key in src ) {\r\r\n\t\tif ( src[ key ] !== undefined ) {\r\r\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\r\r\n\t\t}\r\r\n\t}\r\r\n\tif ( deep ) {\r\r\n\t\tjQuery.extend( true, target, deep );\r\r\n\t}\r\r\n}", "function createAJAXObj() {\n\t\t try {\n\t\t return new XMLHttpRequest();\n\t\t } catch (er1) {\n\t\t try {\n\t\t return new ActiveXObject(\"Msxml3.XMLHTTP\");\n\t\t } catch (er2) {\n\t\t try {\n\t\t return new ActiveXObject(\"Msxml2.XMLHTTP.6.0\");\n\t\t } catch (er3) {\n\t\t try {\n\t\t return new ActiveXObject(\"Msxml2.XMLHTTP.3.0\");\n\t\t } catch (er4) {\n\t\t try {\n\t\t return new ActiveXObject(\"Msxml2.XMLHTTP\");\n\t\t } catch (er5) {\n\t\t try {\n\t\t return new ActiveXObject(\"Microsoft.XMLHTTP\");\n\t\t } catch (er6) {\n\t\t return false;\n\t\t }\n\t\t }\n\t\t }\n\t\t }\n\t\t }\n\t\t }\n\t\t}", "function XMLHttpRequest0() {\n \tthis._requestHeaders = [];\n \tthis.responseHeaders = {};\n \tthis.withCredentials = false;\n }" ]
[ "0.69918233", "0.6821871", "0.63700444", "0.61642385", "0.59259677", "0.5838953", "0.5837507", "0.5837507", "0.5830251", "0.5830251", "0.5830251", "0.5830251", "0.5830251", "0.5830251", "0.5798855", "0.5788467", "0.5788467", "0.5743906", "0.5731205", "0.573042", "0.56617373", "0.56433624", "0.5643356", "0.5611567", "0.5601168", "0.5589537", "0.5586774", "0.5569377", "0.5568666", "0.5564875", "0.5556283", "0.5554984", "0.55507296", "0.554904", "0.55331033", "0.55126506", "0.55125505", "0.5509473", "0.5486752", "0.5485027", "0.5471208", "0.54654276", "0.5458457", "0.5455879", "0.5455879", "0.54494846", "0.54494846", "0.54429454", "0.5441364", "0.5432581", "0.5429965", "0.5429965", "0.5428044", "0.54275244", "0.541188", "0.5403915", "0.53916705", "0.5388504", "0.53706", "0.5369933", "0.53595936", "0.53542453", "0.53524876", "0.53391755", "0.5338892", "0.53179306", "0.5313428", "0.5313428", "0.5308073", "0.5305941", "0.5305717", "0.53022856", "0.5296565", "0.529574", "0.52903485", "0.52896005", "0.52782375", "0.52721286", "0.52717984", "0.52717984", "0.52717984", "0.52597034", "0.5250755", "0.5249773", "0.5249269", "0.52432853", "0.5242136", "0.52394533", "0.52394533", "0.5223559", "0.52213", "0.52213", "0.52177763", "0.5212598", "0.5199583", "0.51920855", "0.5191155", "0.5184211", "0.5181164", "0.51805204", "0.51689094" ]
0.0
-1
Base inspection function for prefilters and transports
function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { var inspected = {}, seekingTransport = ( structure === transports ); function inspect( dataType ) { var selected; inspected[ dataType ] = true; jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); if ( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) { options.dataTypes.unshift( dataTypeOrTransport ); inspect( dataTypeOrTransport ); return false; } else if ( seekingTransport ) { return !( selected = dataTypeOrTransport ); } } ); return selected; } return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function inspectPrefiltersOrTransports(structure, options, originalOptions, jqXHR) {\n\n var inspected = {},\n seekingTransport = (structure === transports);\n\n function inspect(dataType) {\n var selected;\n inspected[ dataType ] = true;\n jQuery.each(structure[ dataType ] || [], function (_, prefilterOrFactory) {\n var dataTypeOrTransport = prefilterOrFactory(options, originalOptions, jqXHR);\n if (typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ]) {\n options.dataTypes.unshift(dataTypeOrTransport);\n inspect(dataTypeOrTransport);\n return false;\n } else if (seekingTransport) {\n return !(selected = dataTypeOrTransport);\n }\n });\n return selected;\n }\n\n return inspect(options.dataTypes[ 0 ]) || !inspected[ \"*\" ] && inspect(\"*\");\n }", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { // 8567\n // 8568\n\tvar inspected = {}, // 8569\n\t\tseekingTransport = ( structure === transports ); // 8570\n // 8571\n\tfunction inspect( dataType ) { // 8572\n\t\tvar selected; // 8573\n\t\tinspected[ dataType ] = true; // 8574\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { // 8575\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); // 8576\n\t\t\tif ( typeof dataTypeOrTransport === \"string\" && // 8577\n\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) { // 8578\n // 8579\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport ); // 8580\n\t\t\t\tinspect( dataTypeOrTransport ); // 8581\n\t\t\t\treturn false; // 8582\n\t\t\t} else if ( seekingTransport ) { // 8583\n\t\t\t\treturn !( selected = dataTypeOrTransport ); // 8584\n\t\t\t} // 8585\n\t\t} ); // 8586\n\t\treturn selected; // 8587\n\t} // 8588\n // 8589\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" ); // 8590\n} // 8591", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\t\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\t\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\t\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\t\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\t\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\t\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\t\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\t\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\t\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\t\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\t\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\t\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\t\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\t\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\t\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\t\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\t\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\t\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\t\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\t\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\t\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\t\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\t\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\t\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\t\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\t\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\t\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\t\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\t\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\t\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n \tvar inspected = {},\n \t\tseekingTransport = ( structure === transports );\n\n \tfunction inspect( dataType ) {\n \t\tvar selected;\n \t\tinspected[ dataType ] = true;\n \t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n \t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n \t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n \t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n \t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n \t\t\t\tinspect( dataTypeOrTransport );\n \t\t\t\treturn false;\n \t\t\t} else if ( seekingTransport ) {\n \t\t\t\treturn !( selected = dataTypeOrTransport );\n \t\t\t}\n \t\t} );\n \t\treturn selected;\n \t}\n\n \treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n }", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\t\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\t\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn selected;\n\t\t}\n\t\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\t\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\t\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn selected;\n\t\t}\n\t\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n var inspected = {},\n seekingTransport = ( structure === transports );\n\n function inspect( dataType ) {\n var selected;\n inspected[ dataType ] = true;\n jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n if ( typeof dataTypeOrTransport === \"string\" &&\n !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n options.dataTypes.unshift( dataTypeOrTransport );\n inspect( dataTypeOrTransport );\n return false;\n } else if ( seekingTransport ) {\n return !( selected = dataTypeOrTransport );\n }\n } );\n return selected;\n }\n\n return inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n }", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n var inspected = {},\n seekingTransport = ( structure === transports );\n\n function inspect( dataType ) {\n var selected;\n inspected[ dataType ] = true;\n jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n if( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n options.dataTypes.unshift( dataTypeOrTransport );\n inspect( dataTypeOrTransport );\n return false;\n } else if ( seekingTransport ) {\n return !( selected = dataTypeOrTransport );\n }\n });\n return selected;\n }\n\n return inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n var inspected = {},\n seekingTransport = ( structure === transports );\n\n function inspect( dataType ) {\n var selected;\n inspected[ dataType ] = true;\n jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n if( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n options.dataTypes.unshift( dataTypeOrTransport );\n inspect( dataTypeOrTransport );\n return false;\n } else if ( seekingTransport ) {\n return !( selected = dataTypeOrTransport );\n }\n });\n return selected;\n }\n\n return inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\t\tvar inspected = {},\n\t\t\t\tseekingTransport = ( structure === transports );\n\n\t\t\tfunction inspect( dataType ) {\n\t\t\t\tvar selected;\n\t\t\t\tinspected[ dataType ] = true;\n\t\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t\treturn selected;\n\t\t\t}\n\n\t\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n var inspected = {},\n seekingTransport = ( structure === transports );\n\n function inspect( dataType ) {\n var selected;\n inspected[ dataType ] = true;\n jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n if ( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n options.dataTypes.unshift( dataTypeOrTransport );\n inspect( dataTypeOrTransport );\n return false;\n } else if ( seekingTransport ) {\n return !( selected = dataTypeOrTransport );\n }\n });\n return selected;\n }\n\n return inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n var inspected = {},\n seekingTransport = ( structure === transports );\n\n function inspect( dataType ) {\n var selected;\n inspected[ dataType ] = true;\n jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n if ( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n options.dataTypes.unshift( dataTypeOrTransport );\n inspect( dataTypeOrTransport );\n return false;\n } else if ( seekingTransport ) {\n return !( selected = dataTypeOrTransport );\n }\n });\n return selected;\n }\n\n return inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n var inspected = {},\n seekingTransport = ( structure === transports );\n\n function inspect( dataType ) {\n var selected;\n inspected[ dataType ] = true;\n jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n if ( typeof dataTypeOrTransport === \"string\" &&\n !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n options.dataTypes.unshift( dataTypeOrTransport );\n inspect( dataTypeOrTransport );\n return false;\n } else if ( seekingTransport ) {\n return !( selected = dataTypeOrTransport );\n }\n } );\n return selected;\n }\n\n return inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\r\n\r\n\tvar inspected = {},\r\n\t\tseekingTransport = ( structure === transports );\r\n\r\n\tfunction inspect( dataType ) {\r\n\t\tvar selected;\r\n\t\tinspected[ dataType ] = true;\r\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\r\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\r\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\r\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\r\n\t\t\t\tinspect( dataTypeOrTransport );\r\n\t\t\t\treturn false;\r\n\t\t\t} else if ( seekingTransport ) {\r\n\t\t\t\treturn !( selected = dataTypeOrTransport );\r\n\t\t\t}\r\n\t\t});\r\n\t\treturn selected;\r\n\t}\r\n\r\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\r\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n var inspected = {},\n seekingTransport = ( structure === transports );\n\n function inspect( dataType ) {\n var selected;\n inspected[ dataType ] = true;\n jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n if ( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n options.dataTypes.unshift( dataTypeOrTransport );\n inspect( dataTypeOrTransport );\n return false;\n } else if ( seekingTransport ) {\n return !( selected = dataTypeOrTransport );\n }\n });\n return selected;\n }\n\n return inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n \n var inspected = {},\n seekingTransport = ( structure === transports );\n \n function inspect( dataType ) {\n var selected;\n inspected[ dataType ] = true;\n jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n if ( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n options.dataTypes.unshift( dataTypeOrTransport );\n inspect( dataTypeOrTransport );\n return false;\n } else if ( seekingTransport ) {\n return !( selected = dataTypeOrTransport );\n }\n });\n return selected;\n }\n \n return inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n }", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\r\n\r\n\tvar inspected = {},\r\n\t\tseekingTransport = ( structure === transports );\r\n\r\n\tfunction inspect( dataType ) {\r\n\t\tvar selected;\r\n\t\tinspected[ dataType ] = true;\r\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\r\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\r\n\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\r\n\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\r\n\r\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\r\n\t\t\t\tinspect( dataTypeOrTransport );\r\n\t\t\t\treturn false;\r\n\t\t\t} else if ( seekingTransport ) {\r\n\t\t\t\treturn !( selected = dataTypeOrTransport );\r\n\t\t\t}\r\n\t\t} );\r\n\t\treturn selected;\r\n\t}\r\n\r\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\r\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\r\n\r\n\tvar inspected = {},\r\n\t\tseekingTransport = ( structure === transports );\r\n\r\n\tfunction inspect( dataType ) {\r\n\t\tvar selected;\r\n\t\tinspected[ dataType ] = true;\r\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\r\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\r\n\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\r\n\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\r\n\r\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\r\n\t\t\t\tinspect( dataTypeOrTransport );\r\n\t\t\t\treturn false;\r\n\t\t\t} else if ( seekingTransport ) {\r\n\t\t\t\treturn !( selected = dataTypeOrTransport );\r\n\t\t\t}\r\n\t\t} );\r\n\t\treturn selected;\r\n\t}\r\n\r\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\r\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n var inspected = {},\n seekingTransport = ( structure === transports );\n\n function inspect( dataType ) {\n var selected;\n inspected[ dataType ] = true;\n jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n if ( typeof dataTypeOrTransport === \"string\" &&\n !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n options.dataTypes.unshift( dataTypeOrTransport );\n inspect( dataTypeOrTransport );\n return false;\n } else if ( seekingTransport ) {\n return !( selected = dataTypeOrTransport );\n }\n } );\n return selected;\n }\n\n return inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n }", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif ( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif ( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif ( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif ( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif ( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif ( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif ( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif ( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif ( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif ( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}" ]
[ "0.6271232", "0.62278324", "0.6089844", "0.6089844", "0.6089844", "0.6089844", "0.6089844", "0.6089844", "0.6089844", "0.6089844", "0.6089844", "0.6089844", "0.607385", "0.60586876", "0.60586876", "0.6036968", "0.601241", "0.601241", "0.601241", "0.601241", "0.601241", "0.60117346", "0.60117346", "0.60115844", "0.601093", "0.601093", "0.6002863", "0.5991916", "0.5991916", "0.5991916", "0.5991916", "0.5991916", "0.5991916", "0.5991916", "0.5991916", "0.5991916", "0.5991916", "0.5991916", "0.5991916", "0.5991916", "0.5991916", "0.5991916", "0.5991916", "0.5991916", "0.5991916", "0.5991916", "0.5991916", "0.5991916", "0.5991916", "0.5991916", "0.5991916", "0.5991916", "0.5991916", "0.5991916", "0.5987543", "0.59847116", "0.59779847", "0.59711784", "0.59711784", "0.5951495", "0.5951495", "0.5951495", "0.5951495", "0.5951495", "0.5951495", "0.5951495", "0.5951495", "0.5951495", "0.5951495", "0.5951495", "0.5951495", "0.5951495", "0.5951495", "0.5951495", "0.5951495", "0.5951495", "0.5951495", "0.5951495", "0.5951495", "0.5951495", "0.5951495", "0.5951495", "0.5951495", "0.5951495", "0.5951495", "0.5951495", "0.5951495", "0.5951495", "0.5951495", "0.5951495", "0.5948276", "0.5947033", "0.5947033", "0.5947033", "0.5947033", "0.5947033", "0.5947033", "0.5947033", "0.5947033", "0.5947033", "0.5947033" ]
0.0
-1
A special extend for ajax options that takes "flat" options (not to be deep extended) Fixes 9887
function ajaxExtend( target, src ) { var key, deep, flatOptions = jQuery.ajaxSettings.flatOptions || {}; for ( key in src ) { if ( src[ key ] !== undefined ) { ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; } } if ( deep ) { jQuery.extend( true, target, deep ); } return target; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:deep||(deep={}))[key]=src[key];}}if(deep){jQuery.extend(true,target,deep);}}", "function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions || {};for(key in src) {if(src[key] !== undefined){(flatOptions[key]?target:deep || (deep = {}))[key] = src[key];}}if(deep){jQuery.extend(true,target,deep);}return target;}", "function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:deep||(deep={}))[key]=src[key];}}if(deep){jQuery.extend(true,target,deep);}return target;}", "function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:deep||(deep={}))[key]=src[key];}}if(deep){jQuery.extend(true,target,deep);}return target;}", "function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:deep||(deep={}))[key]=src[key];}}if(deep){jQuery.extend(true,target,deep);}return target;}", "function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:deep||(deep={}))[key]=src[key];}}if(deep){jQuery.extend(true,target,deep);}return target;}", "function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:deep||(deep={}))[key]=src[key];}}if(deep){jQuery.extend(true,target,deep);}return target;}", "function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:deep||(deep={}))[key]=src[key];}}if(deep){jQuery.extend(true,target,deep);}return target;}", "function ajaxExtend(target,src){var deep,key,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:deep||(deep={}))[key]=src[key];}}if(deep){jQuery.extend(true,target,deep);}return target;}", "function ajaxExtend(target,src){var deep,key,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:deep||(deep={}))[key]=src[key];}}if(deep){jQuery.extend(true,target,deep);}return target;}", "function ajaxExtend(target, src) {\n var deep, key,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for (key in src) {\n if (src[ key ] !== undefined) {\n (flatOptions[ key ] ? target : (deep || (deep = {})))[ key ] = src[ key ];\n }\n }\n if (deep) {\n jQuery.extend(true, target, deep);\n }\n\n return target;\n }", "function K(e,t){var n,o,i=me.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:o||(o={}))[n]=t[n]);return o&&me.extend(!0,e,o),e}", "function ajaxExtend( target, src ) { // 8596\n\tvar key, deep, // 8597\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {}; // 8598\n // 8599\n\tfor ( key in src ) { // 8600\n\t\tif ( src[ key ] !== undefined ) { // 8601\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; // 8602\n\t\t} // 8603\n\t} // 8604\n\tif ( deep ) { // 8605\n\t\tjQuery.extend( true, target, deep ); // 8606\n\t} // 8607\n // 8608\n\treturn target; // 8609\n} // 8610", "function R(a,b){var c,d,e=fa.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&fa.extend(!0,a,d),a}", "function ajaxExtend( target, src ) {\n var key, deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for ( key in src ) {\n if ( src[ key ] !== undefined ) {\n ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n }\n }\n if ( deep ) {\n jQuery.extend( true, target, deep );\n }\n\n return target;\n }", "function ajaxExtend( target, src ) {\n\t var key, deep,\n\t flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\t for ( key in src ) {\n\t if ( src[ key ] !== undefined ) {\n\t ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t }\n\t }\n\t if ( deep ) {\n\t jQuery.extend( true, target, deep );\n\t }\n\t}", "function ajaxExtend(target, src) {\r\n\t\tvar key, deep,\r\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\r\n\t\tfor (key in src) {\r\n\t\t\tif (src[key] !== undefined) {\r\n\t\t\t\t(flatOptions[key] ? target : (deep || (deep = {})))[key] = src[key];\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (deep) {\r\n\t\t\tjQuery.extend(true, target, deep);\r\n\t\t}\r\n\t\treturn target;\r\n\t}", "function ajaxExtend(target, src) {\n var key, deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for (key in src) {\n if (src[key] !== undefined) {\n (flatOptions[key] ? target : (deep || (deep = {})))[key] = src[key];\n }\n }\n if (deep) {\n jQuery.extend(true, target, deep);\n }\n\n return target;\n }", "function ajaxExtend( target, src ) {\r\n\tvar key, deep,\r\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\r\n\r\n\tfor ( key in src ) {\r\n\t\tif ( src[ key ] !== undefined ) {\r\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\r\n\t\t}\r\n\t}\r\n\tif ( deep ) {\r\n\t\tjQuery.extend( true, target, deep );\r\n\t}\r\n\r\n\treturn target;\r\n}", "function ajaxExtend( target, src ) {\r\n\tvar key, deep,\r\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\r\n\r\n\tfor ( key in src ) {\r\n\t\tif ( src[ key ] !== undefined ) {\r\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\r\n\t\t}\r\n\t}\r\n\tif ( deep ) {\r\n\t\tjQuery.extend( true, target, deep );\r\n\t}\r\n\r\n\treturn target;\r\n}", "function ajaxExtend( target, src ) {\r\n\tvar key, deep,\r\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\r\n\tfor ( key in src ) {\r\n\t\tif ( src[ key ] !== undefined ) {\r\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\r\n\t\t}\r\n\t}\r\n\tif ( deep ) {\r\n\t\tjQuery.extend( true, target, deep );\r\n\t}\r\n}", "function ajaxExtend( target, src ) {\r\n\tvar deep, key,\r\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\r\n\r\n\tfor ( key in src ) {\r\n\t\tif ( src[ key ] !== undefined ) {\r\n\t\t\t( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];\r\n\t\t}\r\n\t}\r\n\tif ( deep ) {\r\n\t\tjQuery.extend( true, target, deep );\r\n\t}\r\n\r\n\treturn target;\r\n}", "function ajaxExtend(target, src) {\n var deep,\n key,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for (key in src) {\n if (src[key] !== undefined) {\n (flatOptions[key] ? target : deep || (deep = {}))[key] = src[key];\n }\n }\n\n if (deep) {\n jQuery.extend(true, target, deep);\n }\n\n return target;\n }", "function ajaxExtend(target, src) {\n var key, deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for (key in src) {\n if (src[key] !== undefined) {\n ( flatOptions[key] ? target : ( deep || ( deep = {} ) ) )[key] = src[key];\n }\n }\n if (deep) {\n jQuery.extend(true, target, deep);\n }\n\n return target;\n }", "function ajaxExtend( target, src ) {\n var key, deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n for ( key in src ) {\n if ( src[ key ] !== undefined ) {\n ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n }\n }\n if ( deep ) {\n jQuery.extend( true, target, deep );\n }\n }", "function ajaxExtend( target, src ) {\r\r\n\tvar key, deep,\r\r\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\r\r\n\tfor ( key in src ) {\r\r\n\t\tif ( src[ key ] !== undefined ) {\r\r\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\r\r\n\t\t}\r\r\n\t}\r\r\n\tif ( deep ) {\r\r\n\t\tjQuery.extend( true, target, deep );\r\r\n\t}\r\r\n}", "function ajaxExtend( target, src ) {\n \tvar key, deep,\n \t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n \tfor ( key in src ) {\n \t\tif ( src[ key ] !== undefined ) {\n \t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n \t\t}\n \t}\n \tif ( deep ) {\n \t\tjQuery.extend( true, target, deep );\n \t}\n\n \treturn target;\n }", "function ajaxExtend( target, src ) {\n var key, deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n for ( key in src ) {\n if ( src[ key ] !== undefined ) {\n ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n }\n }\n if ( deep ) {\n jQuery.extend( true, target, deep );\n }\n}", "function ajaxExtend( target, src ) {\n var key, deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n for ( key in src ) {\n if ( src[ key ] !== undefined ) {\n ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n }\n }\n if ( deep ) {\n jQuery.extend( true, target, deep );\n }\n}", "function ajaxExtend( target, src ) {\n var key, deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n for ( key in src ) {\n if ( src[ key ] !== undefined ) {\n ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n }\n }\n if ( deep ) {\n jQuery.extend( true, target, deep );\n }\n}", "function ajaxExtend( target, src ) {\n var key, deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n for ( key in src ) {\n if ( src[ key ] !== undefined ) {\n ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n }\n }\n if ( deep ) {\n jQuery.extend( true, target, deep );\n }\n}", "function L(a,b){var c,d,e=_.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&_.extend(!0,a,d),a}", "function ajaxExtend( target, src ) {\n\t\t\tvar key, deep,\n\t\t\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\t\t\tfor ( key in src ) {\n\t\t\t\tif ( src[ key ] !== undefined ) {\n\t\t\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( deep ) {\n\t\t\t\tjQuery.extend( true, target, deep );\n\t\t\t}\n\n\t\t\treturn target;\n\t\t}", "function ajaxExtend(target, src) {\n var key, deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for (key in src) {\n if (src[key] !== undefined) {\n (flatOptions[key] ? target : (deep || (deep = {})))[key] = src[key];\n }\n }\n if (deep) {\n jQuery.extend(true, target, deep);\n }\n\n return target;\n }", "function ajaxExtend( target, src ) {\n var deep, key,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n \n for ( key in src ) {\n if ( src[ key ] !== undefined ) {\n ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];\n }\n }\n if ( deep ) {\n jQuery.extend( true, target, deep );\n }\n \n return target;\n }", "function ajaxExtend( target, src ) {\n\t\tvar key, deep,\n\t\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\t\n\t\tfor ( key in src ) {\n\t\t\tif ( src[ key ] !== undefined ) {\n\t\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t\t}\n\t\t}\n\t\tif ( deep ) {\n\t\t\tjQuery.extend( true, target, deep );\n\t\t}\n\t\n\t\treturn target;\n\t}", "function ajaxExtend( target, src ) {\n\t\tvar key, deep,\n\t\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\t\n\t\tfor ( key in src ) {\n\t\t\tif ( src[ key ] !== undefined ) {\n\t\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t\t}\n\t\t}\n\t\tif ( deep ) {\n\t\t\tjQuery.extend( true, target, deep );\n\t\t}\n\t\n\t\treturn target;\n\t}", "function ajaxExtend( target, src ) {\n\t\tvar key, deep,\n\t\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\t\n\t\tfor ( key in src ) {\n\t\t\tif ( src[ key ] !== undefined ) {\n\t\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t\t}\n\t\t}\n\t\tif ( deep ) {\n\t\t\tjQuery.extend( true, target, deep );\n\t\t}\n\t\n\t\treturn target;\n\t}", "function ajaxExtend( target, src ) {\n\t\tvar key, deep,\n\t\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\t\n\t\tfor ( key in src ) {\n\t\t\tif ( src[ key ] !== undefined ) {\n\t\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t\t}\n\t\t}\n\t\tif ( deep ) {\n\t\t\tjQuery.extend( true, target, deep );\n\t\t}\n\t\n\t\treturn target;\n\t}", "function ajaxExtend( target, src ) {\n\t\tvar key, deep,\n\t\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\t\n\t\tfor ( key in src ) {\n\t\t\tif ( src[ key ] !== undefined ) {\n\t\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t\t}\n\t\t}\n\t\tif ( deep ) {\n\t\t\tjQuery.extend( true, target, deep );\n\t\t}\n\t\n\t\treturn target;\n\t}", "function ajaxExtend( target, src ) {\n\t\tvar key, deep,\n\t\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\t\n\t\tfor ( key in src ) {\n\t\t\tif ( src[ key ] !== undefined ) {\n\t\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t\t}\n\t\t}\n\t\tif ( deep ) {\n\t\t\tjQuery.extend( true, target, deep );\n\t\t}\n\t\n\t\treturn target;\n\t}", "function ajaxExtend( target, src ) {\n\t\tvar key, deep,\n\t\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\t\n\t\tfor ( key in src ) {\n\t\t\tif ( src[ key ] !== undefined ) {\n\t\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t\t}\n\t\t}\n\t\tif ( deep ) {\n\t\t\tjQuery.extend( true, target, deep );\n\t\t}\n\t\n\t\treturn target;\n\t}", "function ajaxExtend( target, src ) {\n\t\tvar key, deep,\n\t\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\t\n\t\tfor ( key in src ) {\n\t\t\tif ( src[ key ] !== undefined ) {\n\t\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t\t}\n\t\t}\n\t\tif ( deep ) {\n\t\t\tjQuery.extend( true, target, deep );\n\t\t}\n\t\n\t\treturn target;\n\t}", "function ajaxExtend( target, src ) {\n\t\tvar key, deep,\n\t\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\t\n\t\tfor ( key in src ) {\n\t\t\tif ( src[ key ] !== undefined ) {\n\t\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t\t}\n\t\t}\n\t\tif ( deep ) {\n\t\t\tjQuery.extend( true, target, deep );\n\t\t}\n\t\n\t\treturn target;\n\t}", "function ajaxExtend( target, src ) {\n\t\tvar key, deep,\n\t\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\t\n\t\tfor ( key in src ) {\n\t\t\tif ( src[ key ] !== undefined ) {\n\t\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t\t}\n\t\t}\n\t\tif ( deep ) {\n\t\t\tjQuery.extend( true, target, deep );\n\t\t}\n\t\n\t\treturn target;\n\t}", "function ajaxExtend(target, src) {\n var key, deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n for (key in src) {\n if (src[key] !== undefined) {\n (flatOptions[key] ? target : (deep || (deep = {})))[key] = src[key];\n }\n }\n if (deep) {\n jQuery.extend(true, target, deep);\n }\n }", "function ajaxExtend(target, src) {\n var key, deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n for (key in src) {\n if (src[key] !== undefined) {\n (flatOptions[key] ? target : (deep || (deep = {})))[key] = src[key];\n }\n }\n if (deep) {\n jQuery.extend(true, target, deep);\n }\n }", "function ajaxExtend(target, src) {\r\n\t\tvar deep, key,\r\n\t\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\r\n\r\n\t\tfor (key in src) {\r\n\t\t\tif (src[key] !== undefined) {\r\n\t\t\t\t(flatOptions[key] ? target : (deep || (deep = {})))[key] = src[key];\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (deep) {\r\n\t\t\tjQuery.extend(true, target, deep);\r\n\t\t}\r\n\r\n\t\treturn target;\r\n\t}", "function ajaxExtend( target, src ) {\n\t\tvar key, deep,\n\t\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\t\n\t\tfor ( key in src ) {\n\t\t\tif ( src[ key ] !== undefined ) {\n\t\t\t\t( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];\n\t\t\t}\n\t\t}\n\t\tif ( deep ) {\n\t\t\tjQuery.extend( true, target, deep );\n\t\t}\n\t\n\t\treturn target;\n\t}", "function ajaxExtend( target, src ) {\n\t\tvar key, deep,\n\t\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\t\n\t\tfor ( key in src ) {\n\t\t\tif ( src[ key ] !== undefined ) {\n\t\t\t\t( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];\n\t\t\t}\n\t\t}\n\t\tif ( deep ) {\n\t\t\tjQuery.extend( true, target, deep );\n\t\t}\n\t\n\t\treturn target;\n\t}", "function ajaxExtend( target, src ) {\n var key, deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n for ( key in src ) {\n if ( src[ key ] !== undefined ) {\n ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n }\n }\n if ( deep ) {\n jQuery.extend( true, target, deep );\n }\n}", "function ajaxExtend( target, src ) {\n var deep, key,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for ( key in src ) {\n if ( src[ key ] !== undefined ) {\n ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];\n }\n }\n if ( deep ) {\n jQuery.extend( true, target, deep );\n }\n\n return target;\n}", "function ajaxExtend( target, src ) {\n var deep, key,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for ( key in src ) {\n if ( src[ key ] !== undefined ) {\n ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];\n }\n }\n if ( deep ) {\n jQuery.extend( true, target, deep );\n }\n\n return target;\n}", "function ajaxExtend( target, src ) {\n var deep, key,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for ( key in src ) {\n if ( src[ key ] !== undefined ) {\n ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];\n }\n }\n if ( deep ) {\n jQuery.extend( true, target, deep );\n }\n\n return target;\n}", "function ajaxExtend( target, src ) {\n var key, deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for ( key in src ) {\n if ( src[ key ] !== undefined ) {\n ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];\n }\n }\n if ( deep ) {\n jQuery.extend( true, target, deep );\n }\n\n return target;\n}", "function ajaxExtend(target, src) {\n var key, deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for (key in src) {\n if (src[key] !== undefined) {\n ( flatOptions[key] ? target : ( deep || (deep = {}) ) )[key] = src[key];\n }\n }\n if (deep) {\n jQuery.extend(true, target, deep);\n }\n\n return target;\n }", "function ajaxExtend( target, src ) {\n var deep, key,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for ( key in src ) {\n if ( src[ key ] !== undefined ) {\n ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n }\n }\n if ( deep ) {\n jQuery.extend( true, target, deep );\n }\n\n return target;\n }", "function ajaxExtend(target, src) {\n var key,\n deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for (key in src) {\n if (src[key] !== undefined) {\n (flatOptions[key] ? target : deep || (deep = {}))[key] = src[key];\n }\n }\n\n if (deep) {\n jQuery.extend(true, target, deep);\n }\n\n return target;\n }", "function ajaxExtend(target, src) {\n var key,\n deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for (key in src) {\n if (src[key] !== undefined) {\n (flatOptions[key] ? target : deep || (deep = {}))[key] = src[key];\n }\n }\n\n if (deep) {\n jQuery.extend(true, target, deep);\n }\n\n return target;\n }", "function ajaxExtend(target, src) {\n var key,\n deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for (key in src) {\n if (src[key] !== undefined) {\n (flatOptions[key] ? target : deep || (deep = {}))[key] = src[key];\n }\n }\n\n if (deep) {\n jQuery.extend(true, target, deep);\n }\n\n return target;\n }", "function ajaxExtend(target, src) {\n var key,\n deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for (key in src) {\n if (src[key] !== undefined) {\n (flatOptions[key] ? target : deep || (deep = {}))[key] = src[key];\n }\n }\n\n if (deep) {\n jQuery.extend(true, target, deep);\n }\n\n return target;\n }", "function ajaxExtend(target, src) {\n var key,\n deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for (key in src) {\n if (src[key] !== undefined) {\n (flatOptions[key] ? target : deep || (deep = {}))[key] = src[key];\n }\n }\n\n if (deep) {\n jQuery.extend(true, target, deep);\n }\n\n return target;\n }", "function ajaxExtend(target, src) {\n var key,\n deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for (key in src) {\n if (src[key] !== undefined) {\n (flatOptions[key] ? target : deep || (deep = {}))[key] = src[key];\n }\n }\n\n if (deep) {\n jQuery.extend(true, target, deep);\n }\n\n return target;\n }", "function ajaxExtend(target, src) {\n var key,\n deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for (key in src) {\n if (src[key] !== undefined) {\n (flatOptions[key] ? target : deep || (deep = {}))[key] = src[key];\n }\n }\n\n if (deep) {\n jQuery.extend(true, target, deep);\n }\n\n return target;\n }", "function ajaxExtend(target, src) {\n var key,\n deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for (key in src) {\n if (src[key] !== undefined) {\n (flatOptions[key] ? target : deep || (deep = {}))[key] = src[key];\n }\n }\n\n if (deep) {\n jQuery.extend(true, target, deep);\n }\n\n return target;\n }", "function ajaxExtend(target, src) {\n var deep, key,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for (key in src) {\n if (src[key] !== undefined) {\n ( flatOptions[key] ? target : ( deep || ( deep = {} ) ) )[key] = src[key];\n }\n }\n if (deep) {\n jQuery.extend(true, target, deep);\n }\n\n return target;\n }" ]
[ "0.76669925", "0.7610233", "0.7565974", "0.7565974", "0.7565974", "0.7565974", "0.7565974", "0.7565974", "0.75467765", "0.75467765", "0.7526759", "0.7455252", "0.7317883", "0.7311789", "0.72914684", "0.72906107", "0.72556823", "0.7241331", "0.7240382", "0.7240382", "0.72255903", "0.7219329", "0.721556", "0.7209959", "0.7206073", "0.72036004", "0.7202657", "0.7199208", "0.7199208", "0.7199208", "0.7199208", "0.7175735", "0.7174516", "0.7171529", "0.7170705", "0.7168237", "0.7168237", "0.7168237", "0.7168237", "0.7168237", "0.7168237", "0.7168237", "0.7168237", "0.7168237", "0.7168237", "0.71678305", "0.71678305", "0.71672416", "0.7166351", "0.7166351", "0.7157022", "0.7153194", "0.7153194", "0.7153194", "0.7151608", "0.7147467", "0.71456414", "0.71440125", "0.71440125", "0.71440125", "0.71440125", "0.71440125", "0.71440125", "0.71440125", "0.71440125", "0.7139797" ]
0.0
-1
Handles responses to an ajax request: finds the right dataType (mediates between contenttype and expected dataType) returns the corresponding response
function ajaxHandleResponses( s, jqXHR, responses ) { var ct, type, finalDataType, firstDataType, contents = s.contents, dataTypes = s.dataTypes; // Remove auto dataType and get content-type in the process while ( dataTypes[ 0 ] === "*" ) { dataTypes.shift(); if ( ct === undefined ) { ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" ); } } // Check if we're dealing with a known content-type if ( ct ) { for ( type in contents ) { if ( contents[ type ] && contents[ type ].test( ct ) ) { dataTypes.unshift( type ); break; } } } // Check to see if we have a response for the expected dataType if ( dataTypes[ 0 ] in responses ) { finalDataType = dataTypes[ 0 ]; } else { // Try convertible dataTypes for ( type in responses ) { if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) { finalDataType = type; break; } if ( !firstDataType ) { firstDataType = type; } } // Or just use first one finalDataType = finalDataType || firstDataType; } // If we found a dataType // We add the dataType to the list if needed // and return the corresponding response if ( finalDataType ) { if ( finalDataType !== dataTypes[ 0 ] ) { dataTypes.unshift( finalDataType ); } return responses[ finalDataType ]; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ajaxHandleResponses(s,jqXHR,responses){var firstDataType,ct,finalDataType,type,contents=s.contents,dataTypes=s.dataTypes;// Remove auto dataType and get content-type in the process\nwhile(dataTypes[0]===\"*\"){dataTypes.shift();if(ct===undefined){ct=s.mimeType||jqXHR.getResponseHeader(\"Content-Type\");}}// Check if we're dealing with a known content-type\nif(ct){for(type in contents){if(contents[type]&&contents[type].test(ct)){dataTypes.unshift(type);break;}}}// Check to see if we have a response for the expected dataType\nif(dataTypes[0]in responses){finalDataType=dataTypes[0];}else{// Try convertible dataTypes\nfor(type in responses){if(!dataTypes[0]||s.converters[type+\" \"+dataTypes[0]]){finalDataType=type;break;}if(!firstDataType){firstDataType=type;}}// Or just use first one\nfinalDataType=finalDataType||firstDataType;}// If we found a dataType\n// We add the dataType to the list if needed\n// and return the corresponding response\nif(finalDataType){if(finalDataType!==dataTypes[0]){dataTypes.unshift(finalDataType);}return responses[finalDataType];}}", "function ajaxHandleResponses(s,jqXHR,responses){var ct,type,finalDataType,firstDataType,contents=s.contents,dataTypes=s.dataTypes;// Remove auto dataType and get content-type in the process\nwhile(dataTypes[0]===\"*\"){dataTypes.shift();if(ct===undefined){ct=s.mimeType||jqXHR.getResponseHeader(\"Content-Type\");}}// Check if we're dealing with a known content-type\nif(ct){for(type in contents){if(contents[type]&&contents[type].test(ct)){dataTypes.unshift(type);break;}}}// Check to see if we have a response for the expected dataType\nif(dataTypes[0]in responses){finalDataType=dataTypes[0];}else{// Try convertible dataTypes\nfor(type in responses){if(!dataTypes[0]||s.converters[type+\" \"+dataTypes[0]]){finalDataType=type;break;}if(!firstDataType){firstDataType=type;}}// Or just use first one\nfinalDataType=finalDataType||firstDataType;}// If we found a dataType\n// We add the dataType to the list if needed\n// and return the corresponding response\nif(finalDataType){if(finalDataType!==dataTypes[0]){dataTypes.unshift(finalDataType);}return responses[finalDataType];}}", "function ajaxHandleResponses(s,jqXHR,responses){var ct,type,finalDataType,firstDataType,contents=s.contents,dataTypes=s.dataTypes;// Remove auto dataType and get content-type in the process\nwhile(dataTypes[0]===\"*\"){dataTypes.shift();if(ct===undefined){ct=s.mimeType||jqXHR.getResponseHeader(\"Content-Type\");}}// Check if we're dealing with a known content-type\nif(ct){for(type in contents){if(contents[type]&&contents[type].test(ct)){dataTypes.unshift(type);break;}}}// Check to see if we have a response for the expected dataType\nif(dataTypes[0]in responses){finalDataType=dataTypes[0];}else{// Try convertible dataTypes\nfor(type in responses){if(!dataTypes[0]||s.converters[type+\" \"+dataTypes[0]]){finalDataType=type;break;}if(!firstDataType){firstDataType=type;}}// Or just use first one\nfinalDataType=finalDataType||firstDataType;}// If we found a dataType\n// We add the dataType to the list if needed\n// and return the corresponding response\nif(finalDataType){if(finalDataType!==dataTypes[0]){dataTypes.unshift(finalDataType);}return responses[finalDataType];}}", "function ajaxHandleResponses(s,jqXHR,responses){var ct,type,finalDataType,firstDataType,contents=s.contents,dataTypes=s.dataTypes; // Remove auto dataType and get content-type in the process\nwhile(dataTypes[0] === \"*\") {dataTypes.shift();if(ct === undefined){ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");}} // Check if we're dealing with a known content-type\nif(ct){for(type in contents) {if(contents[type] && contents[type].test(ct)){dataTypes.unshift(type);break;}}} // Check to see if we have a response for the expected dataType\nif(dataTypes[0] in responses){finalDataType = dataTypes[0];}else { // Try convertible dataTypes\nfor(type in responses) {if(!dataTypes[0] || s.converters[type + \" \" + dataTypes[0]]){finalDataType = type;break;}if(!firstDataType){firstDataType = type;}} // Or just use first one\nfinalDataType = finalDataType || firstDataType;} // If we found a dataType\n// We add the dataType to the list if needed\n// and return the corresponding response\nif(finalDataType){if(finalDataType !== dataTypes[0]){dataTypes.unshift(finalDataType);}return responses[finalDataType];}}", "function ajaxHandleResponses(s,jqXHR,responses){var ct,type,finalDataType,firstDataType,contents=s.contents,dataTypes=s.dataTypes; // Remove auto dataType and get content-type in the process\nwhile(dataTypes[0]===\"*\"){dataTypes.shift();if(ct===undefined){ct=s.mimeType||jqXHR.getResponseHeader(\"Content-Type\");}} // Check if we're dealing with a known content-type\nif(ct){for(type in contents){if(contents[type]&&contents[type].test(ct)){dataTypes.unshift(type);break;}}} // Check to see if we have a response for the expected dataType\nif(dataTypes[0] in responses){finalDataType=dataTypes[0];}else { // Try convertible dataTypes\nfor(type in responses){if(!dataTypes[0]||s.converters[type+\" \"+dataTypes[0]]){finalDataType=type;break;}if(!firstDataType){firstDataType=type;}} // Or just use first one\nfinalDataType=finalDataType||firstDataType;} // If we found a dataType\n// We add the dataType to the list if needed\n// and return the corresponding response\nif(finalDataType){if(finalDataType!==dataTypes[0]){dataTypes.unshift(finalDataType);}return responses[finalDataType];}}", "function ajaxHandleResponses(s,jqXHR,responses){var ct,type,finalDataType,firstDataType,contents=s.contents,dataTypes=s.dataTypes;// Remove auto dataType and get content-type in the process\n\twhile(dataTypes[0]===\"*\"){dataTypes.shift();if(ct===undefined){ct=s.mimeType||jqXHR.getResponseHeader(\"Content-Type\");}}// Check if we're dealing with a known content-type\n\tif(ct){for(type in contents){if(contents[type]&&contents[type].test(ct)){dataTypes.unshift(type);break;}}}// Check to see if we have a response for the expected dataType\n\tif(dataTypes[0]in responses){finalDataType=dataTypes[0];}else{// Try convertible dataTypes\n\tfor(type in responses){if(!dataTypes[0]||s.converters[type+\" \"+dataTypes[0]]){finalDataType=type;break;}if(!firstDataType){firstDataType=type;}}// Or just use first one\n\tfinalDataType=finalDataType||firstDataType;}// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif(finalDataType){if(finalDataType!==dataTypes[0]){dataTypes.unshift(finalDataType);}return responses[finalDataType];}}", "function ajaxHandleResponses(s,jqXHR,responses){var ct,type,finalDataType,firstDataType,contents=s.contents,dataTypes=s.dataTypes; // Remove auto dataType and get content-type in the process\n\twhile(dataTypes[0]===\"*\"){dataTypes.shift();if(ct===undefined){ct=s.mimeType||jqXHR.getResponseHeader(\"Content-Type\");}} // Check if we're dealing with a known content-type\n\tif(ct){for(type in contents){if(contents[type]&&contents[type].test(ct)){dataTypes.unshift(type);break;}}} // Check to see if we have a response for the expected dataType\n\tif(dataTypes[0] in responses){finalDataType=dataTypes[0];}else { // Try convertible dataTypes\n\tfor(type in responses){if(!dataTypes[0]||s.converters[type+\" \"+dataTypes[0]]){finalDataType=type;break;}if(!firstDataType){firstDataType=type;}} // Or just use first one\n\tfinalDataType=finalDataType||firstDataType;} // If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif(finalDataType){if(finalDataType!==dataTypes[0]){dataTypes.unshift(finalDataType);}return responses[finalDataType];}}", "function ajaxHandleResponses(s,jqXHR,responses){var ct,type,finalDataType,firstDataType,contents=s.contents,dataTypes=s.dataTypes;// Remove auto dataType and get content-type in the process\r\n\twhile(dataTypes[0]===\"*\"){dataTypes.shift();if(ct===undefined){ct=s.mimeType||jqXHR.getResponseHeader(\"Content-Type\");}}// Check if we're dealing with a known content-type\r\n\tif(ct){for(type in contents){if(contents[type]&&contents[type].test(ct)){dataTypes.unshift(type);break;}}}// Check to see if we have a response for the expected dataType\r\n\tif(dataTypes[0]in responses){finalDataType=dataTypes[0];}else{// Try convertible dataTypes\r\n\tfor(type in responses){if(!dataTypes[0]||s.converters[type+\" \"+dataTypes[0]]){finalDataType=type;break;}if(!firstDataType){firstDataType=type;}}// Or just use first one\r\n\tfinalDataType=finalDataType||firstDataType;}// If we found a dataType\r\n\t// We add the dataType to the list if needed\r\n\t// and return the corresponding response\r\n\tif(finalDataType){if(finalDataType!==dataTypes[0]){dataTypes.unshift(finalDataType);}return responses[finalDataType];}}", "function ajaxHandleResponses(s,jqXHR,responses){var firstDataType,ct,finalDataType,type,contents=s.contents,dataTypes=s.dataTypes;// Remove auto dataType and get content-type in the process\n while(dataTypes[0]===\"*\"){dataTypes.shift();if(ct===undefined){ct=s.mimeType||jqXHR.getResponseHeader(\"Content-Type\");}}// Check if we're dealing with a known content-type\n if(ct){for(type in contents){if(contents[type]&&contents[type].test(ct)){dataTypes.unshift(type);break;}}}// Check to see if we have a response for the expected dataType\n if(dataTypes[0]in responses){finalDataType=dataTypes[0];}else{// Try convertible dataTypes\n for(type in responses){if(!dataTypes[0]||s.converters[type+\" \"+dataTypes[0]]){finalDataType=type;break;}if(!firstDataType){firstDataType=type;}}// Or just use first one\n finalDataType=finalDataType||firstDataType;}// If we found a dataType\n// We add the dataType to the list if needed\n// and return the corresponding response\n if(finalDataType){if(finalDataType!==dataTypes[0]){dataTypes.unshift(finalDataType);}return responses[finalDataType];}}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n var firstDataType, ct, finalDataType, type,\n contents = s.contents,\n dataTypes = s.dataTypes;\n \n // Remove auto dataType and get content-type in the process\n while ( dataTypes[ 0 ] === \"*\" ) {\n dataTypes.shift();\n if ( ct === undefined ) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n }\n \n // Check if we're dealing with a known content-type\n if ( ct ) {\n for ( type in contents ) {\n if ( contents[ type ] && contents[ type ].test( ct ) ) {\n dataTypes.unshift( type );\n break;\n }\n }\n }\n \n // Check to see if we have a response for the expected dataType\n if ( dataTypes[ 0 ] in responses ) {\n finalDataType = dataTypes[ 0 ];\n } else {\n // Try convertible dataTypes\n for ( type in responses ) {\n if ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n finalDataType = type;\n break;\n }\n if ( !firstDataType ) {\n firstDataType = type;\n }\n }\n // Or just use first one\n finalDataType = finalDataType || firstDataType;\n }\n \n // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n if ( finalDataType ) {\n if ( finalDataType !== dataTypes[ 0 ] ) {\n dataTypes.unshift( finalDataType );\n }\n return responses[ finalDataType ];\n }\n }", "function ajaxHandleResponses( s, jqXHR, responses ) {\n var firstDataType, ct, finalDataType, type,\n contents = s.contents,\n dataTypes = s.dataTypes;\n\n // Remove auto dataType and get content-type in the process\n while ( dataTypes[ 0 ] === \"*\" ) {\n dataTypes.shift();\n if ( ct === undefined ) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n }\n\n // Check if we're dealing with a known content-type\n if ( ct ) {\n for ( type in contents ) {\n if ( contents[ type ] && contents[ type ].test( ct ) ) {\n dataTypes.unshift( type );\n break;\n }\n }\n }\n\n // Check to see if we have a response for the expected dataType\n if ( dataTypes[ 0 ] in responses ) {\n finalDataType = dataTypes[ 0 ];\n } else {\n // Try convertible dataTypes\n for ( type in responses ) {\n if ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n finalDataType = type;\n break;\n }\n if ( !firstDataType ) {\n firstDataType = type;\n }\n }\n // Or just use first one\n finalDataType = finalDataType || firstDataType;\n }\n\n // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n if ( finalDataType ) {\n if ( finalDataType !== dataTypes[ 0 ] ) {\n dataTypes.unshift( finalDataType );\n }\n return responses[ finalDataType ];\n }\n}", "function ajaxHandleResponses(s, jqXHR, responses) {\n var firstDataType,\n ct,\n finalDataType,\n type,\n contents = s.contents,\n dataTypes = s.dataTypes; // Remove auto dataType and get content-type in the process\n\n while (dataTypes[0] === \"*\") {\n dataTypes.shift();\n\n if (ct === undefined) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n } // Check if we're dealing with a known content-type\n\n\n if (ct) {\n for (type in contents) {\n if (contents[type] && contents[type].test(ct)) {\n dataTypes.unshift(type);\n break;\n }\n }\n } // Check to see if we have a response for the expected dataType\n\n\n if (dataTypes[0] in responses) {\n finalDataType = dataTypes[0];\n } else {\n // Try convertible dataTypes\n for (type in responses) {\n if (!dataTypes[0] || s.converters[type + \" \" + dataTypes[0]]) {\n finalDataType = type;\n break;\n }\n\n if (!firstDataType) {\n firstDataType = type;\n }\n } // Or just use first one\n\n\n finalDataType = finalDataType || firstDataType;\n } // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n\n\n if (finalDataType) {\n if (finalDataType !== dataTypes[0]) {\n dataTypes.unshift(finalDataType);\n }\n\n return responses[finalDataType];\n }\n }", "function ajaxHandleResponses(s, jqXHR, responses) {\n var firstDataType, ct, finalDataType, type,\n contents = s.contents,\n dataTypes = s.dataTypes;\n\n // Remove auto dataType and get content-type in the process\n while (dataTypes[ 0 ] === \"*\") {\n dataTypes.shift();\n if (ct === undefined) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n }\n\n // Check if we're dealing with a known content-type\n if (ct) {\n for (type in contents) {\n if (contents[ type ] && contents[ type ].test(ct)) {\n dataTypes.unshift(type);\n break;\n }\n }\n }\n\n // Check to see if we have a response for the expected dataType\n if (dataTypes[ 0 ] in responses) {\n finalDataType = dataTypes[ 0 ];\n } else {\n // Try convertible dataTypes\n for (type in responses) {\n if (!dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ]) {\n finalDataType = type;\n break;\n }\n if (!firstDataType) {\n firstDataType = type;\n }\n }\n // Or just use first one\n finalDataType = finalDataType || firstDataType;\n }\n\n // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n if (finalDataType) {\n if (finalDataType !== dataTypes[ 0 ]) {\n dataTypes.unshift(finalDataType);\n }\n return responses[ finalDataType ];\n }\n }", "function ajaxHandleResponses( s, jqXHR, responses ) {\n var firstDataType, ct, finalDataType, type,\n contents = s.contents,\n dataTypes = s.dataTypes;\n\n // Remove auto dataType and get content-type in the process\n while ( dataTypes[ 0 ] === \"*\" ) {\n dataTypes.shift();\n if ( ct === undefined ) {\n ct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n }\n }\n\n // Check if we're dealing with a known content-type\n if ( ct ) {\n for ( type in contents ) {\n if ( contents[ type ] && contents[ type ].test( ct ) ) {\n dataTypes.unshift( type );\n break;\n }\n }\n }\n\n // Check to see if we have a response for the expected dataType\n if ( dataTypes[ 0 ] in responses ) {\n finalDataType = dataTypes[ 0 ];\n } else {\n\n // Try convertible dataTypes\n for ( type in responses ) {\n if ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n finalDataType = type;\n break;\n }\n if ( !firstDataType ) {\n firstDataType = type;\n }\n }\n\n // Or just use first one\n finalDataType = finalDataType || firstDataType;\n }\n\n // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n if ( finalDataType ) {\n if ( finalDataType !== dataTypes[ 0 ] ) {\n dataTypes.unshift( finalDataType );\n }\n return responses[ finalDataType ];\n }\n }", "function ajaxHandleResponses(s, jqXHR, responses) {\n var ct,\n type,\n finalDataType,\n firstDataType,\n contents = s.contents,\n dataTypes = s.dataTypes; // Remove auto dataType and get content-type in the process\n\n while (dataTypes[0] === \"*\") {\n dataTypes.shift();\n\n if (ct === undefined) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n } // Check if we're dealing with a known content-type\n\n\n if (ct) {\n for (type in contents) {\n if (contents[type] && contents[type].test(ct)) {\n dataTypes.unshift(type);\n break;\n }\n }\n } // Check to see if we have a response for the expected dataType\n\n\n if (dataTypes[0] in responses) {\n finalDataType = dataTypes[0];\n } else {\n // Try convertible dataTypes\n for (type in responses) {\n if (!dataTypes[0] || s.converters[type + \" \" + dataTypes[0]]) {\n finalDataType = type;\n break;\n }\n\n if (!firstDataType) {\n firstDataType = type;\n }\n } // Or just use first one\n\n\n finalDataType = finalDataType || firstDataType;\n } // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n\n\n if (finalDataType) {\n if (finalDataType !== dataTypes[0]) {\n dataTypes.unshift(finalDataType);\n }\n\n return responses[finalDataType];\n }\n }", "function ajaxHandleResponses(s, jqXHR, responses) {\n var ct,\n type,\n finalDataType,\n firstDataType,\n contents = s.contents,\n dataTypes = s.dataTypes; // Remove auto dataType and get content-type in the process\n\n while (dataTypes[0] === \"*\") {\n dataTypes.shift();\n\n if (ct === undefined) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n } // Check if we're dealing with a known content-type\n\n\n if (ct) {\n for (type in contents) {\n if (contents[type] && contents[type].test(ct)) {\n dataTypes.unshift(type);\n break;\n }\n }\n } // Check to see if we have a response for the expected dataType\n\n\n if (dataTypes[0] in responses) {\n finalDataType = dataTypes[0];\n } else {\n // Try convertible dataTypes\n for (type in responses) {\n if (!dataTypes[0] || s.converters[type + \" \" + dataTypes[0]]) {\n finalDataType = type;\n break;\n }\n\n if (!firstDataType) {\n firstDataType = type;\n }\n } // Or just use first one\n\n\n finalDataType = finalDataType || firstDataType;\n } // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n\n\n if (finalDataType) {\n if (finalDataType !== dataTypes[0]) {\n dataTypes.unshift(finalDataType);\n }\n\n return responses[finalDataType];\n }\n }", "function ajaxHandleResponses(s, jqXHR, responses) {\n var ct,\n type,\n finalDataType,\n firstDataType,\n contents = s.contents,\n dataTypes = s.dataTypes; // Remove auto dataType and get content-type in the process\n\n while (dataTypes[0] === \"*\") {\n dataTypes.shift();\n\n if (ct === undefined) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n } // Check if we're dealing with a known content-type\n\n\n if (ct) {\n for (type in contents) {\n if (contents[type] && contents[type].test(ct)) {\n dataTypes.unshift(type);\n break;\n }\n }\n } // Check to see if we have a response for the expected dataType\n\n\n if (dataTypes[0] in responses) {\n finalDataType = dataTypes[0];\n } else {\n // Try convertible dataTypes\n for (type in responses) {\n if (!dataTypes[0] || s.converters[type + \" \" + dataTypes[0]]) {\n finalDataType = type;\n break;\n }\n\n if (!firstDataType) {\n firstDataType = type;\n }\n } // Or just use first one\n\n\n finalDataType = finalDataType || firstDataType;\n } // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n\n\n if (finalDataType) {\n if (finalDataType !== dataTypes[0]) {\n dataTypes.unshift(finalDataType);\n }\n\n return responses[finalDataType];\n }\n }", "function ajaxHandleResponses(s, jqXHR, responses) {\n var ct,\n type,\n finalDataType,\n firstDataType,\n contents = s.contents,\n dataTypes = s.dataTypes; // Remove auto dataType and get content-type in the process\n\n while (dataTypes[0] === \"*\") {\n dataTypes.shift();\n\n if (ct === undefined) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n } // Check if we're dealing with a known content-type\n\n\n if (ct) {\n for (type in contents) {\n if (contents[type] && contents[type].test(ct)) {\n dataTypes.unshift(type);\n break;\n }\n }\n } // Check to see if we have a response for the expected dataType\n\n\n if (dataTypes[0] in responses) {\n finalDataType = dataTypes[0];\n } else {\n // Try convertible dataTypes\n for (type in responses) {\n if (!dataTypes[0] || s.converters[type + \" \" + dataTypes[0]]) {\n finalDataType = type;\n break;\n }\n\n if (!firstDataType) {\n firstDataType = type;\n }\n } // Or just use first one\n\n\n finalDataType = finalDataType || firstDataType;\n } // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n\n\n if (finalDataType) {\n if (finalDataType !== dataTypes[0]) {\n dataTypes.unshift(finalDataType);\n }\n\n return responses[finalDataType];\n }\n }", "function ajaxHandleResponses(s, jqXHR, responses) {\n var ct,\n type,\n finalDataType,\n firstDataType,\n contents = s.contents,\n dataTypes = s.dataTypes; // Remove auto dataType and get content-type in the process\n\n while (dataTypes[0] === \"*\") {\n dataTypes.shift();\n\n if (ct === undefined) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n } // Check if we're dealing with a known content-type\n\n\n if (ct) {\n for (type in contents) {\n if (contents[type] && contents[type].test(ct)) {\n dataTypes.unshift(type);\n break;\n }\n }\n } // Check to see if we have a response for the expected dataType\n\n\n if (dataTypes[0] in responses) {\n finalDataType = dataTypes[0];\n } else {\n // Try convertible dataTypes\n for (type in responses) {\n if (!dataTypes[0] || s.converters[type + \" \" + dataTypes[0]]) {\n finalDataType = type;\n break;\n }\n\n if (!firstDataType) {\n firstDataType = type;\n }\n } // Or just use first one\n\n\n finalDataType = finalDataType || firstDataType;\n } // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n\n\n if (finalDataType) {\n if (finalDataType !== dataTypes[0]) {\n dataTypes.unshift(finalDataType);\n }\n\n return responses[finalDataType];\n }\n }", "function ajaxHandleResponses(s, jqXHR, responses) {\n var ct,\n type,\n finalDataType,\n firstDataType,\n contents = s.contents,\n dataTypes = s.dataTypes; // Remove auto dataType and get content-type in the process\n\n while (dataTypes[0] === \"*\") {\n dataTypes.shift();\n\n if (ct === undefined) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n } // Check if we're dealing with a known content-type\n\n\n if (ct) {\n for (type in contents) {\n if (contents[type] && contents[type].test(ct)) {\n dataTypes.unshift(type);\n break;\n }\n }\n } // Check to see if we have a response for the expected dataType\n\n\n if (dataTypes[0] in responses) {\n finalDataType = dataTypes[0];\n } else {\n // Try convertible dataTypes\n for (type in responses) {\n if (!dataTypes[0] || s.converters[type + \" \" + dataTypes[0]]) {\n finalDataType = type;\n break;\n }\n\n if (!firstDataType) {\n firstDataType = type;\n }\n } // Or just use first one\n\n\n finalDataType = finalDataType || firstDataType;\n } // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n\n\n if (finalDataType) {\n if (finalDataType !== dataTypes[0]) {\n dataTypes.unshift(finalDataType);\n }\n\n return responses[finalDataType];\n }\n }", "function ajaxHandleResponses(s, jqXHR, responses) {\n var ct,\n type,\n finalDataType,\n firstDataType,\n contents = s.contents,\n dataTypes = s.dataTypes; // Remove auto dataType and get content-type in the process\n\n while (dataTypes[0] === \"*\") {\n dataTypes.shift();\n\n if (ct === undefined) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n } // Check if we're dealing with a known content-type\n\n\n if (ct) {\n for (type in contents) {\n if (contents[type] && contents[type].test(ct)) {\n dataTypes.unshift(type);\n break;\n }\n }\n } // Check to see if we have a response for the expected dataType\n\n\n if (dataTypes[0] in responses) {\n finalDataType = dataTypes[0];\n } else {\n // Try convertible dataTypes\n for (type in responses) {\n if (!dataTypes[0] || s.converters[type + \" \" + dataTypes[0]]) {\n finalDataType = type;\n break;\n }\n\n if (!firstDataType) {\n firstDataType = type;\n }\n } // Or just use first one\n\n\n finalDataType = finalDataType || firstDataType;\n } // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n\n\n if (finalDataType) {\n if (finalDataType !== dataTypes[0]) {\n dataTypes.unshift(finalDataType);\n }\n\n return responses[finalDataType];\n }\n }", "function ajaxHandleResponses(s, jqXHR, responses) {\n var ct,\n type,\n finalDataType,\n firstDataType,\n contents = s.contents,\n dataTypes = s.dataTypes; // Remove auto dataType and get content-type in the process\n\n while (dataTypes[0] === \"*\") {\n dataTypes.shift();\n\n if (ct === undefined) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n } // Check if we're dealing with a known content-type\n\n\n if (ct) {\n for (type in contents) {\n if (contents[type] && contents[type].test(ct)) {\n dataTypes.unshift(type);\n break;\n }\n }\n } // Check to see if we have a response for the expected dataType\n\n\n if (dataTypes[0] in responses) {\n finalDataType = dataTypes[0];\n } else {\n // Try convertible dataTypes\n for (type in responses) {\n if (!dataTypes[0] || s.converters[type + \" \" + dataTypes[0]]) {\n finalDataType = type;\n break;\n }\n\n if (!firstDataType) {\n firstDataType = type;\n }\n } // Or just use first one\n\n\n finalDataType = finalDataType || firstDataType;\n } // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n\n\n if (finalDataType) {\n if (finalDataType !== dataTypes[0]) {\n dataTypes.unshift(finalDataType);\n }\n\n return responses[finalDataType];\n }\n }", "function ajaxHandleResponses( s, jqXHR, responses ) {\r\n\r\n\tvar ct, type, finalDataType, firstDataType,\r\n\t\tcontents = s.contents,\r\n\t\tdataTypes = s.dataTypes;\r\n\r\n\t// Remove auto dataType and get content-type in the process\r\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\r\n\t\tdataTypes.shift();\r\n\t\tif ( ct === undefined ) {\r\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\r\n\t\t}\r\n\t}\r\n\r\n\t// Check if we're dealing with a known content-type\r\n\tif ( ct ) {\r\n\t\tfor ( type in contents ) {\r\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\r\n\t\t\t\tdataTypes.unshift( type );\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Check to see if we have a response for the expected dataType\r\n\tif ( dataTypes[ 0 ] in responses ) {\r\n\t\tfinalDataType = dataTypes[ 0 ];\r\n\t} else {\r\n\r\n\t\t// Try convertible dataTypes\r\n\t\tfor ( type in responses ) {\r\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\r\n\t\t\t\tfinalDataType = type;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif ( !firstDataType ) {\r\n\t\t\t\tfirstDataType = type;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Or just use first one\r\n\t\tfinalDataType = finalDataType || firstDataType;\r\n\t}\r\n\r\n\t// If we found a dataType\r\n\t// We add the dataType to the list if needed\r\n\t// and return the corresponding response\r\n\tif ( finalDataType ) {\r\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\r\n\t\t\tdataTypes.unshift( finalDataType );\r\n\t\t}\r\n\t\treturn responses[ finalDataType ];\r\n\t}\r\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\r\n\r\n\tvar ct, type, finalDataType, firstDataType,\r\n\t\tcontents = s.contents,\r\n\t\tdataTypes = s.dataTypes;\r\n\r\n\t// Remove auto dataType and get content-type in the process\r\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\r\n\t\tdataTypes.shift();\r\n\t\tif ( ct === undefined ) {\r\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\r\n\t\t}\r\n\t}\r\n\r\n\t// Check if we're dealing with a known content-type\r\n\tif ( ct ) {\r\n\t\tfor ( type in contents ) {\r\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\r\n\t\t\t\tdataTypes.unshift( type );\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Check to see if we have a response for the expected dataType\r\n\tif ( dataTypes[ 0 ] in responses ) {\r\n\t\tfinalDataType = dataTypes[ 0 ];\r\n\t} else {\r\n\r\n\t\t// Try convertible dataTypes\r\n\t\tfor ( type in responses ) {\r\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\r\n\t\t\t\tfinalDataType = type;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif ( !firstDataType ) {\r\n\t\t\t\tfirstDataType = type;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Or just use first one\r\n\t\tfinalDataType = finalDataType || firstDataType;\r\n\t}\r\n\r\n\t// If we found a dataType\r\n\t// We add the dataType to the list if needed\r\n\t// and return the corresponding response\r\n\tif ( finalDataType ) {\r\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\r\n\t\t\tdataTypes.unshift( finalDataType );\r\n\t\t}\r\n\t\treturn responses[ finalDataType ];\r\n\t}\r\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n var firstDataType, ct, finalDataType, type,\n contents = s.contents,\n dataTypes = s.dataTypes;\n\n // Remove auto dataType and get content-type in the process\n while( dataTypes[ 0 ] === \"*\" ) {\n dataTypes.shift();\n if ( ct === undefined ) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n }\n\n // Check if we're dealing with a known content-type\n if ( ct ) {\n for ( type in contents ) {\n if ( contents[ type ] && contents[ type ].test( ct ) ) {\n dataTypes.unshift( type );\n break;\n }\n }\n }\n\n // Check to see if we have a response for the expected dataType\n if ( dataTypes[ 0 ] in responses ) {\n finalDataType = dataTypes[ 0 ];\n } else {\n // Try convertible dataTypes\n for ( type in responses ) {\n if ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n finalDataType = type;\n break;\n }\n if ( !firstDataType ) {\n firstDataType = type;\n }\n }\n // Or just use first one\n finalDataType = finalDataType || firstDataType;\n }\n\n // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n if ( finalDataType ) {\n if ( finalDataType !== dataTypes[ 0 ] ) {\n dataTypes.unshift( finalDataType );\n }\n return responses[ finalDataType ];\n }\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n var firstDataType, ct, finalDataType, type,\n contents = s.contents,\n dataTypes = s.dataTypes;\n\n // Remove auto dataType and get content-type in the process\n while ( dataTypes[ 0 ] === \"*\" ) {\n dataTypes.shift();\n if ( ct === undefined ) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n }\n\n // Check if we're dealing with a known content-type\n if ( ct ) {\n for ( type in contents ) {\n if ( contents[ type ] && contents[ type ].test( ct ) ) {\n dataTypes.unshift( type );\n break;\n }\n }\n }\n\n // Check to see if we have a response for the expected dataType\n if ( dataTypes[ 0 ] in responses ) {\n finalDataType = dataTypes[ 0 ];\n } else {\n // Try convertible dataTypes\n for ( type in responses ) {\n if ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n finalDataType = type;\n break;\n }\n if ( !firstDataType ) {\n firstDataType = type;\n }\n }\n // Or just use first one\n finalDataType = finalDataType || firstDataType;\n }\n\n // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n if ( finalDataType ) {\n if ( finalDataType !== dataTypes[ 0 ] ) {\n dataTypes.unshift( finalDataType );\n }\n return responses[ finalDataType ];\n }\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n var firstDataType, ct, finalDataType, type,\n contents = s.contents,\n dataTypes = s.dataTypes;\n\n // Remove auto dataType and get content-type in the process\n while ( dataTypes[ 0 ] === \"*\" ) {\n dataTypes.shift();\n if ( ct === undefined ) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n }\n\n // Check if we're dealing with a known content-type\n if ( ct ) {\n for ( type in contents ) {\n if ( contents[ type ] && contents[ type ].test( ct ) ) {\n dataTypes.unshift( type );\n break;\n }\n }\n }\n\n // Check to see if we have a response for the expected dataType\n if ( dataTypes[ 0 ] in responses ) {\n finalDataType = dataTypes[ 0 ];\n } else {\n // Try convertible dataTypes\n for ( type in responses ) {\n if ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n finalDataType = type;\n break;\n }\n if ( !firstDataType ) {\n firstDataType = type;\n }\n }\n // Or just use first one\n finalDataType = finalDataType || firstDataType;\n }\n\n // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n if ( finalDataType ) {\n if ( finalDataType !== dataTypes[ 0 ] ) {\n dataTypes.unshift( finalDataType );\n }\n return responses[ finalDataType ];\n }\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\n\t\t\tvar ct, type, finalDataType, firstDataType,\n\t\t\t\tcontents = s.contents,\n\t\t\t\tdataTypes = s.dataTypes;\n\n\t\t\t// Remove auto dataType and get content-type in the process\n\t\t\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\t\t\tdataTypes.shift();\n\t\t\t\tif ( ct === undefined ) {\n\t\t\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Check if we're dealing with a known content-type\n\t\t\tif ( ct ) {\n\t\t\t\tfor ( type in contents ) {\n\t\t\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\t\t\tdataTypes.unshift( type );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Check to see if we have a response for the expected dataType\n\t\t\tif ( dataTypes[ 0 ] in responses ) {\n\t\t\t\tfinalDataType = dataTypes[ 0 ];\n\t\t\t} else {\n\n\t\t\t\t// Try convertible dataTypes\n\t\t\t\tfor ( type in responses ) {\n\t\t\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\t\t\tfinalDataType = type;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ( !firstDataType ) {\n\t\t\t\t\t\tfirstDataType = type;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Or just use first one\n\t\t\t\tfinalDataType = finalDataType || firstDataType;\n\t\t\t}\n\n\t\t\t// If we found a dataType\n\t\t\t// We add the dataType to the list if needed\n\t\t\t// and return the corresponding response\n\t\t\tif ( finalDataType ) {\n\t\t\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\t\t\tdataTypes.unshift( finalDataType );\n\t\t\t\t}\n\t\t\t\treturn responses[ finalDataType ];\n\t\t\t}\n\t\t}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\n var ct, type, finalDataType, firstDataType,\n contents = s.contents,\n dataTypes = s.dataTypes;\n\n // Remove auto dataType and get content-type in the process\n while ( dataTypes[ 0 ] === \"*\" ) {\n dataTypes.shift();\n if ( ct === undefined ) {\n ct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n }\n }\n\n // Check if we're dealing with a known content-type\n if ( ct ) {\n for ( type in contents ) {\n if ( contents[ type ] && contents[ type ].test( ct ) ) {\n dataTypes.unshift( type );\n break;\n }\n }\n }\n\n // Check to see if we have a response for the expected dataType\n if ( dataTypes[ 0 ] in responses ) {\n finalDataType = dataTypes[ 0 ];\n } else {\n\n // Try convertible dataTypes\n for ( type in responses ) {\n if ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n finalDataType = type;\n break;\n }\n if ( !firstDataType ) {\n firstDataType = type;\n }\n }\n\n // Or just use first one\n finalDataType = finalDataType || firstDataType;\n }\n\n // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n if ( finalDataType ) {\n if ( finalDataType !== dataTypes[ 0 ] ) {\n dataTypes.unshift( finalDataType );\n }\n return responses[ finalDataType ];\n }\n}", "function ajaxHandleResponses( s, jqXHR, responses ) { // 8616\n // 8617\n\tvar ct, type, finalDataType, firstDataType, // 8618\n\t\tcontents = s.contents, // 8619\n\t\tdataTypes = s.dataTypes; // 8620\n // 8621\n\t// Remove auto dataType and get content-type in the process // 8622\n\twhile ( dataTypes[ 0 ] === \"*\" ) { // 8623\n\t\tdataTypes.shift(); // 8624\n\t\tif ( ct === undefined ) { // 8625\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" ); // 8626\n\t\t} // 8627\n\t} // 8628\n // 8629\n\t// Check if we're dealing with a known content-type // 8630\n\tif ( ct ) { // 8631\n\t\tfor ( type in contents ) { // 8632\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) { // 8633\n\t\t\t\tdataTypes.unshift( type ); // 8634\n\t\t\t\tbreak; // 8635\n\t\t\t} // 8636\n\t\t} // 8637\n\t} // 8638\n // 8639\n\t// Check to see if we have a response for the expected dataType // 8640\n\tif ( dataTypes[ 0 ] in responses ) { // 8641\n\t\tfinalDataType = dataTypes[ 0 ]; // 8642\n\t} else { // 8643\n // 8644\n\t\t// Try convertible dataTypes // 8645\n\t\tfor ( type in responses ) { // 8646\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) { // 8647\n\t\t\t\tfinalDataType = type; // 8648\n\t\t\t\tbreak; // 8649\n\t\t\t} // 8650\n\t\t\tif ( !firstDataType ) { // 8651\n\t\t\t\tfirstDataType = type; // 8652\n\t\t\t} // 8653\n\t\t} // 8654\n // 8655\n\t\t// Or just use first one // 8656\n\t\tfinalDataType = finalDataType || firstDataType; // 8657\n\t} // 8658\n // 8659\n\t// If we found a dataType // 8660\n\t// We add the dataType to the list if needed // 8661\n\t// and return the corresponding response // 8662\n\tif ( finalDataType ) { // 8663\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) { // 8664\n\t\t\tdataTypes.unshift( finalDataType ); // 8665\n\t\t} // 8666\n\t\treturn responses[ finalDataType ]; // 8667\n\t} // 8668\n} // 8669", "function ajaxHandleResponses(s, jqXHR, responses) {\n var firstDataType, ct, finalDataType, type,\n contents = s.contents,\n dataTypes = s.dataTypes;\n\n // Remove auto dataType and get content-type in the process\n while (dataTypes[0] === \"*\") {\n dataTypes.shift();\n if (ct === undefined) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n }\n\n // Check if we're dealing with a known content-type\n if (ct) {\n for (type in contents) {\n if (contents[type] && contents[type].test(ct)) {\n dataTypes.unshift(type);\n break;\n }\n }\n }\n\n // Check to see if we have a response for the expected dataType\n if (dataTypes[0] in responses) {\n finalDataType = dataTypes[0];\n } else {\n\n // Try convertible dataTypes\n for (type in responses) {\n if (!dataTypes[0] || s.converters[type + \" \" + dataTypes[0]]) {\n finalDataType = type;\n break;\n }\n if (!firstDataType) {\n firstDataType = type;\n }\n }\n\n // Or just use first one\n finalDataType = finalDataType || firstDataType;\n }\n\n // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n if (finalDataType) {\n if (finalDataType !== dataTypes[0]) {\n dataTypes.unshift(finalDataType);\n }\n return responses[finalDataType];\n }\n }", "function ajaxHandleResponses(s, jqXHR, responses) {\n var firstDataType, ct, finalDataType, type,\n contents = s.contents,\n dataTypes = s.dataTypes;\n\n // Remove auto dataType and get content-type in the process\n while (dataTypes[0] === \"*\") {\n dataTypes.shift();\n if (ct === undefined) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n }\n\n // Check if we're dealing with a known content-type\n if (ct) {\n for (type in contents) {\n if (contents[type] && contents[type].test(ct)) {\n dataTypes.unshift(type);\n break;\n }\n }\n }\n\n // Check to see if we have a response for the expected dataType\n if (dataTypes[0] in responses) {\n finalDataType = dataTypes[0];\n } else {\n\n // Try convertible dataTypes\n for (type in responses) {\n if (!dataTypes[0] || s.converters[type + \" \" + dataTypes[0]]) {\n finalDataType = type;\n break;\n }\n if (!firstDataType) {\n firstDataType = type;\n }\n }\n\n // Or just use first one\n finalDataType = finalDataType || firstDataType;\n }\n\n // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n if (finalDataType) {\n if (finalDataType !== dataTypes[0]) {\n dataTypes.unshift(finalDataType);\n }\n return responses[finalDataType];\n }\n }", "function ajaxHandleResponses( s, jqXHR, responses ) {\r\n\tvar firstDataType, ct, finalDataType, type,\r\n\t\tcontents = s.contents,\r\n\t\tdataTypes = s.dataTypes,\r\n\t\tresponseFields = s.responseFields;\r\n\r\n\t// Fill responseXXX fields\r\n\tfor ( type in responseFields ) {\r\n\t\tif ( type in responses ) {\r\n\t\t\tjqXHR[ responseFields[type] ] = responses[ type ];\r\n\t\t}\r\n\t}\r\n\r\n\t// Remove auto dataType and get content-type in the process\r\n\twhile( dataTypes[ 0 ] === \"*\" ) {\r\n\t\tdataTypes.shift();\r\n\t\tif ( ct === undefined ) {\r\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\r\n\t\t}\r\n\t}\r\n\r\n\t// Check if we're dealing with a known content-type\r\n\tif ( ct ) {\r\n\t\tfor ( type in contents ) {\r\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\r\n\t\t\t\tdataTypes.unshift( type );\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Check to see if we have a response for the expected dataType\r\n\tif ( dataTypes[ 0 ] in responses ) {\r\n\t\tfinalDataType = dataTypes[ 0 ];\r\n\t} else {\r\n\t\t// Try convertible dataTypes\r\n\t\tfor ( type in responses ) {\r\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\r\n\t\t\t\tfinalDataType = type;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif ( !firstDataType ) {\r\n\t\t\t\tfirstDataType = type;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Or just use first one\r\n\t\tfinalDataType = finalDataType || firstDataType;\r\n\t}\r\n\r\n\t// If we found a dataType\r\n\t// We add the dataType to the list if needed\r\n\t// and return the corresponding response\r\n\tif ( finalDataType ) {\r\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\r\n\t\t\tdataTypes.unshift( finalDataType );\r\n\t\t}\r\n\t\treturn responses[ finalDataType ];\r\n\t}\r\n}", "function ajaxHandleResponses(s, jqXHR, responses) {\n\n var ct, type, finalDataType, firstDataType,\n contents = s.contents,\n dataTypes = s.dataTypes;\n\n // Remove auto dataType and get content-type in the process\n while (dataTypes[0] === \"*\") {\n dataTypes.shift();\n if (ct === undefined) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n }\n\n // Check if we're dealing with a known content-type\n if (ct) {\n for (type in contents) {\n if (contents[type] && contents[type].test(ct)) {\n dataTypes.unshift(type);\n break;\n }\n }\n }\n\n // Check to see if we have a response for the expected dataType\n if (dataTypes[0] in responses) {\n finalDataType = dataTypes[0];\n } else {\n // Try convertible dataTypes\n for (type in responses) {\n if (!dataTypes[0] || s.converters[type + \" \" + dataTypes[0]]) {\n finalDataType = type;\n break;\n }\n if (!firstDataType) {\n firstDataType = type;\n }\n }\n // Or just use first one\n finalDataType = finalDataType || firstDataType;\n }\n\n // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n if (finalDataType) {\n if (finalDataType !== dataTypes[0]) {\n dataTypes.unshift(finalDataType);\n }\n return responses[finalDataType];\n }\n }", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\n \tvar ct, type, finalDataType, firstDataType,\n \t\tcontents = s.contents,\n \t\tdataTypes = s.dataTypes;\n\n \t// Remove auto dataType and get content-type in the process\n \twhile ( dataTypes[ 0 ] === \"*\" ) {\n \t\tdataTypes.shift();\n \t\tif ( ct === undefined ) {\n \t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n \t\t}\n \t}\n\n \t// Check if we're dealing with a known content-type\n \tif ( ct ) {\n \t\tfor ( type in contents ) {\n \t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n \t\t\t\tdataTypes.unshift( type );\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \t}\n\n \t// Check to see if we have a response for the expected dataType\n \tif ( dataTypes[ 0 ] in responses ) {\n \t\tfinalDataType = dataTypes[ 0 ];\n \t} else {\n\n \t\t// Try convertible dataTypes\n \t\tfor ( type in responses ) {\n \t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n \t\t\t\tfinalDataType = type;\n \t\t\t\tbreak;\n \t\t\t}\n \t\t\tif ( !firstDataType ) {\n \t\t\t\tfirstDataType = type;\n \t\t\t}\n \t\t}\n\n \t\t// Or just use first one\n \t\tfinalDataType = finalDataType || firstDataType;\n \t}\n\n \t// If we found a dataType\n \t// We add the dataType to the list if needed\n \t// and return the corresponding response\n \tif ( finalDataType ) {\n \t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n \t\t\tdataTypes.unshift( finalDataType );\n \t\t}\n \t\treturn responses[ finalDataType ];\n \t}\n }", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\t\tvar firstDataType, ct, finalDataType, type,\n\t\t\tcontents = s.contents,\n\t\t\tdataTypes = s.dataTypes;\n\n\t\t// Remove auto dataType and get content-type in the process\n\t\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\t\tdataTypes.shift();\n\t\t\tif ( ct === undefined ) {\n\t\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t\t}\n\t\t}\n\n\t\t// Check if we're dealing with a known content-type\n\t\tif ( ct ) {\n\t\t\tfor ( type in contents ) {\n\t\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\t\tdataTypes.unshift( type );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Check to see if we have a response for the expected dataType\n\t\tif ( dataTypes[ 0 ] in responses ) {\n\t\t\tfinalDataType = dataTypes[ 0 ];\n\t\t} else {\n\t\t\t// Try convertible dataTypes\n\t\t\tfor ( type in responses ) {\n\t\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\t\tfinalDataType = type;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( !firstDataType ) {\n\t\t\t\t\tfirstDataType = type;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Or just use first one\n\t\t\tfinalDataType = finalDataType || firstDataType;\n\t\t}\n\n\t\t// If we found a dataType\n\t\t// We add the dataType to the list if needed\n\t\t// and return the corresponding response\n\t\tif ( finalDataType ) {\n\t\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\t\tdataTypes.unshift( finalDataType );\n\t\t\t}\n\t\t\treturn responses[ finalDataType ];\n\t\t}\n\t}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\t\tvar firstDataType, ct, finalDataType, type,\n\t\t\tcontents = s.contents,\n\t\t\tdataTypes = s.dataTypes;\n\n\t\t// Remove auto dataType and get content-type in the process\n\t\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\t\tdataTypes.shift();\n\t\t\tif ( ct === undefined ) {\n\t\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t\t}\n\t\t}\n\n\t\t// Check if we're dealing with a known content-type\n\t\tif ( ct ) {\n\t\t\tfor ( type in contents ) {\n\t\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\t\tdataTypes.unshift( type );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Check to see if we have a response for the expected dataType\n\t\tif ( dataTypes[ 0 ] in responses ) {\n\t\t\tfinalDataType = dataTypes[ 0 ];\n\t\t} else {\n\t\t\t// Try convertible dataTypes\n\t\t\tfor ( type in responses ) {\n\t\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\t\tfinalDataType = type;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( !firstDataType ) {\n\t\t\t\t\tfirstDataType = type;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Or just use first one\n\t\t\tfinalDataType = finalDataType || firstDataType;\n\t\t}\n\n\t\t// If we found a dataType\n\t\t// We add the dataType to the list if needed\n\t\t// and return the corresponding response\n\t\tif ( finalDataType ) {\n\t\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\t\tdataTypes.unshift( finalDataType );\n\t\t\t}\n\t\t\treturn responses[ finalDataType ];\n\t\t}\n\t}", "function ajaxHandleResponses(s, jqXHR, responses) {\r\n\t\tvar firstDataType, ct, finalDataType, type,\r\n\t\t\tcontents = s.contents,\r\n\t\t\tdataTypes = s.dataTypes;\r\n\r\n\t\t// Remove auto dataType and get content-type in the process\r\n\t\twhile (dataTypes[0] === \"*\") {\r\n\t\t\tdataTypes.shift();\r\n\t\t\tif (ct === undefined) {\r\n\t\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Check if we're dealing with a known content-type\r\n\t\tif (ct) {\r\n\t\t\tfor (type in contents) {\r\n\t\t\t\tif (contents[type] && contents[type].test(ct)) {\r\n\t\t\t\t\tdataTypes.unshift(type);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Check to see if we have a response for the expected dataType\r\n\t\tif (dataTypes[0] in responses) {\r\n\t\t\tfinalDataType = dataTypes[0];\r\n\t\t} else {\r\n\r\n\t\t\t// Try convertible dataTypes\r\n\t\t\tfor (type in responses) {\r\n\t\t\t\tif (!dataTypes[0] || s.converters[type + \" \" + dataTypes[0]]) {\r\n\t\t\t\t\tfinalDataType = type;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif (!firstDataType) {\r\n\t\t\t\t\tfirstDataType = type;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Or just use first one\r\n\t\t\tfinalDataType = finalDataType || firstDataType;\r\n\t\t}\r\n\r\n\t\t// If we found a dataType\r\n\t\t// We add the dataType to the list if needed\r\n\t\t// and return the corresponding response\r\n\t\tif (finalDataType) {\r\n\t\t\tif (finalDataType !== dataTypes[0]) {\r\n\t\t\t\tdataTypes.unshift(finalDataType);\r\n\t\t\t}\r\n\t\t\treturn responses[finalDataType];\r\n\t\t}\r\n\t}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\t\n\t\tvar ct, type, finalDataType, firstDataType,\n\t\t\tcontents = s.contents,\n\t\t\tdataTypes = s.dataTypes;\n\t\n\t\t// Remove auto dataType and get content-type in the process\n\t\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\t\tdataTypes.shift();\n\t\t\tif ( ct === undefined ) {\n\t\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t\t}\n\t\t}\n\t\n\t\t// Check if we're dealing with a known content-type\n\t\tif ( ct ) {\n\t\t\tfor ( type in contents ) {\n\t\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\t\tdataTypes.unshift( type );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\t// Check to see if we have a response for the expected dataType\n\t\tif ( dataTypes[ 0 ] in responses ) {\n\t\t\tfinalDataType = dataTypes[ 0 ];\n\t\t} else {\n\t\t\t// Try convertible dataTypes\n\t\t\tfor ( type in responses ) {\n\t\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\t\tfinalDataType = type;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( !firstDataType ) {\n\t\t\t\t\tfirstDataType = type;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Or just use first one\n\t\t\tfinalDataType = finalDataType || firstDataType;\n\t\t}\n\t\n\t\t// If we found a dataType\n\t\t// We add the dataType to the list if needed\n\t\t// and return the corresponding response\n\t\tif ( finalDataType ) {\n\t\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\t\tdataTypes.unshift( finalDataType );\n\t\t\t}\n\t\t\treturn responses[ finalDataType ];\n\t\t}\n\t}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\t\n\t\tvar ct, type, finalDataType, firstDataType,\n\t\t\tcontents = s.contents,\n\t\t\tdataTypes = s.dataTypes;\n\t\n\t\t// Remove auto dataType and get content-type in the process\n\t\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\t\tdataTypes.shift();\n\t\t\tif ( ct === undefined ) {\n\t\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t\t}\n\t\t}\n\t\n\t\t// Check if we're dealing with a known content-type\n\t\tif ( ct ) {\n\t\t\tfor ( type in contents ) {\n\t\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\t\tdataTypes.unshift( type );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\t// Check to see if we have a response for the expected dataType\n\t\tif ( dataTypes[ 0 ] in responses ) {\n\t\t\tfinalDataType = dataTypes[ 0 ];\n\t\t} else {\n\t\t\t// Try convertible dataTypes\n\t\t\tfor ( type in responses ) {\n\t\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\t\tfinalDataType = type;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( !firstDataType ) {\n\t\t\t\t\tfirstDataType = type;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Or just use first one\n\t\t\tfinalDataType = finalDataType || firstDataType;\n\t\t}\n\t\n\t\t// If we found a dataType\n\t\t// We add the dataType to the list if needed\n\t\t// and return the corresponding response\n\t\tif ( finalDataType ) {\n\t\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\t\tdataTypes.unshift( finalDataType );\n\t\t\t}\n\t\t\treturn responses[ finalDataType ];\n\t\t}\n\t}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\n var ct, type, finalDataType, firstDataType,\n contents = s.contents,\n dataTypes = s.dataTypes;\n\n // Remove auto dataType and get content-type in the process\n while( dataTypes[ 0 ] === \"*\" ) {\n dataTypes.shift();\n if ( ct === undefined ) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n }\n\n // Check if we're dealing with a known content-type\n if ( ct ) {\n for ( type in contents ) {\n if ( contents[ type ] && contents[ type ].test( ct ) ) {\n dataTypes.unshift( type );\n break;\n }\n }\n }\n\n // Check to see if we have a response for the expected dataType\n if ( dataTypes[ 0 ] in responses ) {\n finalDataType = dataTypes[ 0 ];\n } else {\n // Try convertible dataTypes\n for ( type in responses ) {\n if ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n finalDataType = type;\n break;\n }\n if ( !firstDataType ) {\n firstDataType = type;\n }\n }\n // Or just use first one\n finalDataType = finalDataType || firstDataType;\n }\n\n // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n if ( finalDataType ) {\n if ( finalDataType !== dataTypes[ 0 ] ) {\n dataTypes.unshift( finalDataType );\n }\n return responses[ finalDataType ];\n }\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\t\n\t\tvar ct, type, finalDataType, firstDataType,\n\t\t\tcontents = s.contents,\n\t\t\tdataTypes = s.dataTypes;\n\t\n\t\t// Remove auto dataType and get content-type in the process\n\t\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\t\tdataTypes.shift();\n\t\t\tif ( ct === undefined ) {\n\t\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t\t}\n\t\t}\n\t\n\t\t// Check if we're dealing with a known content-type\n\t\tif ( ct ) {\n\t\t\tfor ( type in contents ) {\n\t\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\t\tdataTypes.unshift( type );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\t// Check to see if we have a response for the expected dataType\n\t\tif ( dataTypes[ 0 ] in responses ) {\n\t\t\tfinalDataType = dataTypes[ 0 ];\n\t\t} else {\n\t\n\t\t\t// Try convertible dataTypes\n\t\t\tfor ( type in responses ) {\n\t\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\t\tfinalDataType = type;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( !firstDataType ) {\n\t\t\t\t\tfirstDataType = type;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// Or just use first one\n\t\t\tfinalDataType = finalDataType || firstDataType;\n\t\t}\n\t\n\t\t// If we found a dataType\n\t\t// We add the dataType to the list if needed\n\t\t// and return the corresponding response\n\t\tif ( finalDataType ) {\n\t\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\t\tdataTypes.unshift( finalDataType );\n\t\t\t}\n\t\t\treturn responses[ finalDataType ];\n\t\t}\n\t}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\t\n\t\tvar ct, type, finalDataType, firstDataType,\n\t\t\tcontents = s.contents,\n\t\t\tdataTypes = s.dataTypes;\n\t\n\t\t// Remove auto dataType and get content-type in the process\n\t\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\t\tdataTypes.shift();\n\t\t\tif ( ct === undefined ) {\n\t\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t\t}\n\t\t}\n\t\n\t\t// Check if we're dealing with a known content-type\n\t\tif ( ct ) {\n\t\t\tfor ( type in contents ) {\n\t\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\t\tdataTypes.unshift( type );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\t// Check to see if we have a response for the expected dataType\n\t\tif ( dataTypes[ 0 ] in responses ) {\n\t\t\tfinalDataType = dataTypes[ 0 ];\n\t\t} else {\n\t\n\t\t\t// Try convertible dataTypes\n\t\t\tfor ( type in responses ) {\n\t\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\t\tfinalDataType = type;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( !firstDataType ) {\n\t\t\t\t\tfirstDataType = type;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// Or just use first one\n\t\t\tfinalDataType = finalDataType || firstDataType;\n\t\t}\n\t\n\t\t// If we found a dataType\n\t\t// We add the dataType to the list if needed\n\t\t// and return the corresponding response\n\t\tif ( finalDataType ) {\n\t\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\t\tdataTypes.unshift( finalDataType );\n\t\t\t}\n\t\t\treturn responses[ finalDataType ];\n\t\t}\n\t}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\t\n\t\tvar ct, type, finalDataType, firstDataType,\n\t\t\tcontents = s.contents,\n\t\t\tdataTypes = s.dataTypes;\n\t\n\t\t// Remove auto dataType and get content-type in the process\n\t\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\t\tdataTypes.shift();\n\t\t\tif ( ct === undefined ) {\n\t\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t\t}\n\t\t}\n\t\n\t\t// Check if we're dealing with a known content-type\n\t\tif ( ct ) {\n\t\t\tfor ( type in contents ) {\n\t\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\t\tdataTypes.unshift( type );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\t// Check to see if we have a response for the expected dataType\n\t\tif ( dataTypes[ 0 ] in responses ) {\n\t\t\tfinalDataType = dataTypes[ 0 ];\n\t\t} else {\n\t\n\t\t\t// Try convertible dataTypes\n\t\t\tfor ( type in responses ) {\n\t\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\t\tfinalDataType = type;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( !firstDataType ) {\n\t\t\t\t\tfirstDataType = type;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// Or just use first one\n\t\t\tfinalDataType = finalDataType || firstDataType;\n\t\t}\n\t\n\t\t// If we found a dataType\n\t\t// We add the dataType to the list if needed\n\t\t// and return the corresponding response\n\t\tif ( finalDataType ) {\n\t\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\t\tdataTypes.unshift( finalDataType );\n\t\t\t}\n\t\t\treturn responses[ finalDataType ];\n\t\t}\n\t}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\t\n\t\tvar ct, type, finalDataType, firstDataType,\n\t\t\tcontents = s.contents,\n\t\t\tdataTypes = s.dataTypes;\n\t\n\t\t// Remove auto dataType and get content-type in the process\n\t\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\t\tdataTypes.shift();\n\t\t\tif ( ct === undefined ) {\n\t\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t\t}\n\t\t}\n\t\n\t\t// Check if we're dealing with a known content-type\n\t\tif ( ct ) {\n\t\t\tfor ( type in contents ) {\n\t\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\t\tdataTypes.unshift( type );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\t// Check to see if we have a response for the expected dataType\n\t\tif ( dataTypes[ 0 ] in responses ) {\n\t\t\tfinalDataType = dataTypes[ 0 ];\n\t\t} else {\n\t\n\t\t\t// Try convertible dataTypes\n\t\t\tfor ( type in responses ) {\n\t\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\t\tfinalDataType = type;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( !firstDataType ) {\n\t\t\t\t\tfirstDataType = type;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// Or just use first one\n\t\t\tfinalDataType = finalDataType || firstDataType;\n\t\t}\n\t\n\t\t// If we found a dataType\n\t\t// We add the dataType to the list if needed\n\t\t// and return the corresponding response\n\t\tif ( finalDataType ) {\n\t\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\t\tdataTypes.unshift( finalDataType );\n\t\t\t}\n\t\t\treturn responses[ finalDataType ];\n\t\t}\n\t}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\t\n\t\tvar ct, type, finalDataType, firstDataType,\n\t\t\tcontents = s.contents,\n\t\t\tdataTypes = s.dataTypes;\n\t\n\t\t// Remove auto dataType and get content-type in the process\n\t\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\t\tdataTypes.shift();\n\t\t\tif ( ct === undefined ) {\n\t\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t\t}\n\t\t}\n\t\n\t\t// Check if we're dealing with a known content-type\n\t\tif ( ct ) {\n\t\t\tfor ( type in contents ) {\n\t\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\t\tdataTypes.unshift( type );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\t// Check to see if we have a response for the expected dataType\n\t\tif ( dataTypes[ 0 ] in responses ) {\n\t\t\tfinalDataType = dataTypes[ 0 ];\n\t\t} else {\n\t\n\t\t\t// Try convertible dataTypes\n\t\t\tfor ( type in responses ) {\n\t\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\t\tfinalDataType = type;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( !firstDataType ) {\n\t\t\t\t\tfirstDataType = type;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// Or just use first one\n\t\t\tfinalDataType = finalDataType || firstDataType;\n\t\t}\n\t\n\t\t// If we found a dataType\n\t\t// We add the dataType to the list if needed\n\t\t// and return the corresponding response\n\t\tif ( finalDataType ) {\n\t\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\t\tdataTypes.unshift( finalDataType );\n\t\t\t}\n\t\t\treturn responses[ finalDataType ];\n\t\t}\n\t}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\t\n\t\tvar ct, type, finalDataType, firstDataType,\n\t\t\tcontents = s.contents,\n\t\t\tdataTypes = s.dataTypes;\n\t\n\t\t// Remove auto dataType and get content-type in the process\n\t\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\t\tdataTypes.shift();\n\t\t\tif ( ct === undefined ) {\n\t\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t\t}\n\t\t}\n\t\n\t\t// Check if we're dealing with a known content-type\n\t\tif ( ct ) {\n\t\t\tfor ( type in contents ) {\n\t\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\t\tdataTypes.unshift( type );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\t// Check to see if we have a response for the expected dataType\n\t\tif ( dataTypes[ 0 ] in responses ) {\n\t\t\tfinalDataType = dataTypes[ 0 ];\n\t\t} else {\n\t\n\t\t\t// Try convertible dataTypes\n\t\t\tfor ( type in responses ) {\n\t\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\t\tfinalDataType = type;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( !firstDataType ) {\n\t\t\t\t\tfirstDataType = type;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// Or just use first one\n\t\t\tfinalDataType = finalDataType || firstDataType;\n\t\t}\n\t\n\t\t// If we found a dataType\n\t\t// We add the dataType to the list if needed\n\t\t// and return the corresponding response\n\t\tif ( finalDataType ) {\n\t\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\t\tdataTypes.unshift( finalDataType );\n\t\t\t}\n\t\t\treturn responses[ finalDataType ];\n\t\t}\n\t}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\t\n\t\tvar ct, type, finalDataType, firstDataType,\n\t\t\tcontents = s.contents,\n\t\t\tdataTypes = s.dataTypes;\n\t\n\t\t// Remove auto dataType and get content-type in the process\n\t\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\t\tdataTypes.shift();\n\t\t\tif ( ct === undefined ) {\n\t\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t\t}\n\t\t}\n\t\n\t\t// Check if we're dealing with a known content-type\n\t\tif ( ct ) {\n\t\t\tfor ( type in contents ) {\n\t\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\t\tdataTypes.unshift( type );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\t// Check to see if we have a response for the expected dataType\n\t\tif ( dataTypes[ 0 ] in responses ) {\n\t\t\tfinalDataType = dataTypes[ 0 ];\n\t\t} else {\n\t\n\t\t\t// Try convertible dataTypes\n\t\t\tfor ( type in responses ) {\n\t\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\t\tfinalDataType = type;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( !firstDataType ) {\n\t\t\t\t\tfirstDataType = type;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// Or just use first one\n\t\t\tfinalDataType = finalDataType || firstDataType;\n\t\t}\n\t\n\t\t// If we found a dataType\n\t\t// We add the dataType to the list if needed\n\t\t// and return the corresponding response\n\t\tif ( finalDataType ) {\n\t\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\t\tdataTypes.unshift( finalDataType );\n\t\t\t}\n\t\t\treturn responses[ finalDataType ];\n\t\t}\n\t}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\t\n\t\tvar ct, type, finalDataType, firstDataType,\n\t\t\tcontents = s.contents,\n\t\t\tdataTypes = s.dataTypes;\n\t\n\t\t// Remove auto dataType and get content-type in the process\n\t\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\t\tdataTypes.shift();\n\t\t\tif ( ct === undefined ) {\n\t\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t\t}\n\t\t}\n\t\n\t\t// Check if we're dealing with a known content-type\n\t\tif ( ct ) {\n\t\t\tfor ( type in contents ) {\n\t\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\t\tdataTypes.unshift( type );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\t// Check to see if we have a response for the expected dataType\n\t\tif ( dataTypes[ 0 ] in responses ) {\n\t\t\tfinalDataType = dataTypes[ 0 ];\n\t\t} else {\n\t\n\t\t\t// Try convertible dataTypes\n\t\t\tfor ( type in responses ) {\n\t\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\t\tfinalDataType = type;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( !firstDataType ) {\n\t\t\t\t\tfirstDataType = type;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// Or just use first one\n\t\t\tfinalDataType = finalDataType || firstDataType;\n\t\t}\n\t\n\t\t// If we found a dataType\n\t\t// We add the dataType to the list if needed\n\t\t// and return the corresponding response\n\t\tif ( finalDataType ) {\n\t\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\t\tdataTypes.unshift( finalDataType );\n\t\t\t}\n\t\t\treturn responses[ finalDataType ];\n\t\t}\n\t}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\t\n\t\tvar ct, type, finalDataType, firstDataType,\n\t\t\tcontents = s.contents,\n\t\t\tdataTypes = s.dataTypes;\n\t\n\t\t// Remove auto dataType and get content-type in the process\n\t\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\t\tdataTypes.shift();\n\t\t\tif ( ct === undefined ) {\n\t\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t\t}\n\t\t}\n\t\n\t\t// Check if we're dealing with a known content-type\n\t\tif ( ct ) {\n\t\t\tfor ( type in contents ) {\n\t\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\t\tdataTypes.unshift( type );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\t// Check to see if we have a response for the expected dataType\n\t\tif ( dataTypes[ 0 ] in responses ) {\n\t\t\tfinalDataType = dataTypes[ 0 ];\n\t\t} else {\n\t\n\t\t\t// Try convertible dataTypes\n\t\t\tfor ( type in responses ) {\n\t\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\t\tfinalDataType = type;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( !firstDataType ) {\n\t\t\t\t\tfirstDataType = type;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// Or just use first one\n\t\t\tfinalDataType = finalDataType || firstDataType;\n\t\t}\n\t\n\t\t// If we found a dataType\n\t\t// We add the dataType to the list if needed\n\t\t// and return the corresponding response\n\t\tif ( finalDataType ) {\n\t\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\t\tdataTypes.unshift( finalDataType );\n\t\t\t}\n\t\t\treturn responses[ finalDataType ];\n\t\t}\n\t}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\t\n\t\tvar ct, type, finalDataType, firstDataType,\n\t\t\tcontents = s.contents,\n\t\t\tdataTypes = s.dataTypes;\n\t\n\t\t// Remove auto dataType and get content-type in the process\n\t\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\t\tdataTypes.shift();\n\t\t\tif ( ct === undefined ) {\n\t\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t\t}\n\t\t}\n\t\n\t\t// Check if we're dealing with a known content-type\n\t\tif ( ct ) {\n\t\t\tfor ( type in contents ) {\n\t\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\t\tdataTypes.unshift( type );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\t// Check to see if we have a response for the expected dataType\n\t\tif ( dataTypes[ 0 ] in responses ) {\n\t\t\tfinalDataType = dataTypes[ 0 ];\n\t\t} else {\n\t\n\t\t\t// Try convertible dataTypes\n\t\t\tfor ( type in responses ) {\n\t\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\t\tfinalDataType = type;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( !firstDataType ) {\n\t\t\t\t\tfirstDataType = type;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// Or just use first one\n\t\t\tfinalDataType = finalDataType || firstDataType;\n\t\t}\n\t\n\t\t// If we found a dataType\n\t\t// We add the dataType to the list if needed\n\t\t// and return the corresponding response\n\t\tif ( finalDataType ) {\n\t\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\t\tdataTypes.unshift( finalDataType );\n\t\t\t}\n\t\t\treturn responses[ finalDataType ];\n\t\t}\n\t}", "function ajaxHandleResponses(s, jqXHR, responses) {\n\n var ct, type, finalDataType, firstDataType,\n contents = s.contents,\n dataTypes = s.dataTypes;\n\n // Remove auto dataType and get content-type in the process\n while (dataTypes[0] === \"*\") {\n dataTypes.shift();\n if (ct === undefined) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n }\n\n // Check if we're dealing with a known content-type\n if (ct) {\n for (type in contents) {\n if (contents[type] && contents[type].test(ct)) {\n dataTypes.unshift(type);\n break;\n }\n }\n }\n\n // Check to see if we have a response for the expected dataType\n if (dataTypes[0] in responses) {\n finalDataType = dataTypes[0];\n } else {\n // Try convertible dataTypes\n for (type in responses) {\n if (!dataTypes[0] || s.converters[type + \" \" + dataTypes[0]]) {\n finalDataType = type;\n break;\n }\n if (!firstDataType) {\n firstDataType = type;\n }\n }\n // Or just use first one\n finalDataType = finalDataType || firstDataType;\n }\n\n // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n if (finalDataType) {\n if (finalDataType !== dataTypes[0]) {\n dataTypes.unshift(finalDataType);\n }\n return responses[finalDataType];\n }\n }", "function ajaxHandleResponses(s, jqXHR, responses) {\n\n var ct, type, finalDataType, firstDataType,\n contents = s.contents,\n dataTypes = s.dataTypes;\n\n // Remove auto dataType and get content-type in the process\n while (dataTypes[0] === \"*\") {\n dataTypes.shift();\n if (ct === undefined) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n }\n\n // Check if we're dealing with a known content-type\n if (ct) {\n for (type in contents) {\n if (contents[type] && contents[type].test(ct)) {\n dataTypes.unshift(type);\n break;\n }\n }\n }\n\n // Check to see if we have a response for the expected dataType\n if (dataTypes[0] in responses) {\n finalDataType = dataTypes[0];\n } else {\n // Try convertible dataTypes\n for (type in responses) {\n if (!dataTypes[0] || s.converters[type + \" \" + dataTypes[0]]) {\n finalDataType = type;\n break;\n }\n if (!firstDataType) {\n firstDataType = type;\n }\n }\n // Or just use first one\n finalDataType = finalDataType || firstDataType;\n }\n\n // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n if (finalDataType) {\n if (finalDataType !== dataTypes[0]) {\n dataTypes.unshift(finalDataType);\n }\n return responses[finalDataType];\n }\n }", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}" ]
[ "0.78496015", "0.7837405", "0.7837405", "0.77763313", "0.7761825", "0.7757081", "0.7718662", "0.77154136", "0.76727474", "0.7629757", "0.76141524", "0.7604442", "0.7600189", "0.75992036", "0.7597217", "0.7597217", "0.7597217", "0.7597217", "0.7597217", "0.7597217", "0.7597217", "0.7597217", "0.7588686", "0.7588686", "0.757677", "0.7576657", "0.7576657", "0.757483", "0.7573355", "0.75631374", "0.7558744", "0.7558744", "0.7553063", "0.75475806", "0.75474864", "0.7545951", "0.7545951", "0.7544553", "0.7537983", "0.7537983", "0.7536785", "0.7530402", "0.7530402", "0.7530402", "0.7530402", "0.7530402", "0.7530402", "0.7530402", "0.7530402", "0.7530402", "0.7530402", "0.75238466", "0.75231117", "0.75229144", "0.75229144", "0.75229144", "0.75229144", "0.75229144", "0.75229144", "0.75229144", "0.75229144", "0.75229144", "0.75229144", "0.75229144", "0.75229144", "0.7522185", "0.7522185", "0.7522185", "0.7522185", "0.7522185", "0.7522185", "0.7522185", "0.7522185", "0.7522185", "0.7522185", "0.7522185", "0.7522185", "0.7522185", "0.7522185", "0.7522185", "0.7522185", "0.7522185", "0.7522185", "0.7522185", "0.7522185", "0.7522185", "0.7522185", "0.7522185", "0.7522185", "0.7522185", "0.7522185", "0.7522185", "0.7522185", "0.7522185", "0.7522185", "0.7522185", "0.7522185", "0.7522185", "0.7522185", "0.7522185", "0.7522185" ]
0.0
-1
Chain conversions given the request and the original response Also sets the responseXXX fields on the jqXHR instance
function ajaxConvert( s, response, jqXHR, isSuccess ) { var conv2, current, conv, tmp, prev, converters = {}, // Work with a copy of dataTypes in case we need to modify it for conversion dataTypes = s.dataTypes.slice(); // Create converters map with lowercased keys if ( dataTypes[ 1 ] ) { for ( conv in s.converters ) { converters[ conv.toLowerCase() ] = s.converters[ conv ]; } } current = dataTypes.shift(); // Convert to each sequential dataType while ( current ) { if ( s.responseFields[ current ] ) { jqXHR[ s.responseFields[ current ] ] = response; } // Apply the dataFilter if provided if ( !prev && isSuccess && s.dataFilter ) { response = s.dataFilter( response, s.dataType ); } prev = current; current = dataTypes.shift(); if ( current ) { // There's only work to do if current dataType is non-auto if ( current === "*" ) { current = prev; // Convert response if prev dataType is non-auto and differs from current } else if ( prev !== "*" && prev !== current ) { // Seek a direct converter conv = converters[ prev + " " + current ] || converters[ "* " + current ]; // If none found, seek a pair if ( !conv ) { for ( conv2 in converters ) { // If conv2 outputs current tmp = conv2.split( " " ); if ( tmp[ 1 ] === current ) { // If prev can be converted to accepted input conv = converters[ prev + " " + tmp[ 0 ] ] || converters[ "* " + tmp[ 0 ] ]; if ( conv ) { // Condense equivalence converters if ( conv === true ) { conv = converters[ conv2 ]; // Otherwise, insert the intermediate dataType } else if ( converters[ conv2 ] !== true ) { current = tmp[ 0 ]; dataTypes.unshift( tmp[ 1 ] ); } break; } } } } // Apply converter (if not an equivalence) if ( conv !== true ) { // Unless errors are allowed to bubble, catch and return them if ( conv && s.throws ) { response = conv( response ); } else { try { response = conv( response ); } catch ( e ) { return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current }; } } } } } } return { state: "success", data: response }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ajaxConvert(s,response,jqXHR,isSuccess){var conv2,current,conv,tmp,prev,converters={}, // Work with a copy of dataTypes in case we need to modify it for conversion\ndataTypes=s.dataTypes.slice(); // Create converters map with lowercased keys\nif(dataTypes[1]){for(conv in s.converters){converters[conv.toLowerCase()]=s.converters[conv];}}current=dataTypes.shift(); // Convert to each sequential dataType\nwhile(current){if(s.responseFields[current]){jqXHR[s.responseFields[current]]=response;} // Apply the dataFilter if provided\nif(!prev&&isSuccess&&s.dataFilter){response=s.dataFilter(response,s.dataType);}prev=current;current=dataTypes.shift();if(current){ // There's only work to do if current dataType is non-auto\nif(current===\"*\"){current=prev; // Convert response if prev dataType is non-auto and differs from current\n}else if(prev!==\"*\"&&prev!==current){ // Seek a direct converter\nconv=converters[prev+\" \"+current]||converters[\"* \"+current]; // If none found, seek a pair\nif(!conv){for(conv2 in converters){ // If conv2 outputs current\ntmp=conv2.split(\" \");if(tmp[1]===current){ // If prev can be converted to accepted input\nconv=converters[prev+\" \"+tmp[0]]||converters[\"* \"+tmp[0]];if(conv){ // Condense equivalence converters\nif(conv===true){conv=converters[conv2]; // Otherwise, insert the intermediate dataType\n}else if(converters[conv2]!==true){current=tmp[0];dataTypes.unshift(tmp[1]);}break;}}}} // Apply converter (if not an equivalence)\nif(conv!==true){ // Unless errors are allowed to bubble, catch and return them\nif(conv&&s.throws){response=conv(response);}else {try{response=conv(response);}catch(e){return {state:\"parsererror\",error:conv?e:\"No conversion from \"+prev+\" to \"+current};}}}}}}return {state:\"success\",data:response};}", "function ajaxConvert(s,response,jqXHR,isSuccess){var conv2,current,conv,tmp,prev,converters={}, // Work with a copy of dataTypes in case we need to modify it for conversion\ndataTypes=s.dataTypes.slice(); // Create converters map with lowercased keys\nif(dataTypes[1]){for(conv in s.converters) {converters[conv.toLowerCase()] = s.converters[conv];}}current = dataTypes.shift(); // Convert to each sequential dataType\nwhile(current) {if(s.responseFields[current]){jqXHR[s.responseFields[current]] = response;} // Apply the dataFilter if provided\nif(!prev && isSuccess && s.dataFilter){response = s.dataFilter(response,s.dataType);}prev = current;current = dataTypes.shift();if(current){ // There's only work to do if current dataType is non-auto\nif(current === \"*\"){current = prev; // Convert response if prev dataType is non-auto and differs from current\n}else if(prev !== \"*\" && prev !== current){ // Seek a direct converter\nconv = converters[prev + \" \" + current] || converters[\"* \" + current]; // If none found, seek a pair\nif(!conv){for(conv2 in converters) { // If conv2 outputs current\ntmp = conv2.split(\" \");if(tmp[1] === current){ // If prev can be converted to accepted input\nconv = converters[prev + \" \" + tmp[0]] || converters[\"* \" + tmp[0]];if(conv){ // Condense equivalence converters\nif(conv === true){conv = converters[conv2]; // Otherwise, insert the intermediate dataType\n}else if(converters[conv2] !== true){current = tmp[0];dataTypes.unshift(tmp[1]);}break;}}}} // Apply converter (if not an equivalence)\nif(conv !== true){ // Unless errors are allowed to bubble, catch and return them\nif(conv && s[\"throws\"]){response = conv(response);}else {try{response = conv(response);}catch(e) {return {state:\"parsererror\",error:conv?e:\"No conversion from \" + prev + \" to \" + current};}}}}}}return {state:\"success\",data:response};}", "function ajaxConvert(s,response,jqXHR,isSuccess){var conv2,current,conv,tmp,prev,converters={}, // Work with a copy of dataTypes in case we need to modify it for conversion\n\tdataTypes=s.dataTypes.slice(); // Create converters map with lowercased keys\n\tif(dataTypes[1]){for(conv in s.converters){converters[conv.toLowerCase()]=s.converters[conv];}}current=dataTypes.shift(); // Convert to each sequential dataType\n\twhile(current){if(s.responseFields[current]){jqXHR[s.responseFields[current]]=response;} // Apply the dataFilter if provided\n\tif(!prev&&isSuccess&&s.dataFilter){response=s.dataFilter(response,s.dataType);}prev=current;current=dataTypes.shift();if(current){ // There's only work to do if current dataType is non-auto\n\tif(current===\"*\"){current=prev; // Convert response if prev dataType is non-auto and differs from current\n\t}else if(prev!==\"*\"&&prev!==current){ // Seek a direct converter\n\tconv=converters[prev+\" \"+current]||converters[\"* \"+current]; // If none found, seek a pair\n\tif(!conv){for(conv2 in converters){ // If conv2 outputs current\n\ttmp=conv2.split(\" \");if(tmp[1]===current){ // If prev can be converted to accepted input\n\tconv=converters[prev+\" \"+tmp[0]]||converters[\"* \"+tmp[0]];if(conv){ // Condense equivalence converters\n\tif(conv===true){conv=converters[conv2]; // Otherwise, insert the intermediate dataType\n\t}else if(converters[conv2]!==true){current=tmp[0];dataTypes.unshift(tmp[1]);}break;}}}} // Apply converter (if not an equivalence)\n\tif(conv!==true){ // Unless errors are allowed to bubble, catch and return them\n\tif(conv&&s.throws){response=conv(response);}else {try{response=conv(response);}catch(e){return {state:\"parsererror\",error:conv?e:\"No conversion from \"+prev+\" to \"+current};}}}}}}return {state:\"success\",data:response};}", "function ajaxConvert(s,response,jqXHR,isSuccess){var conv2,current,conv,tmp,prev,converters={},// Work with a copy of dataTypes in case we need to modify it for conversion\ndataTypes=s.dataTypes.slice();// Create converters map with lowercased keys\nif(dataTypes[1]){for(conv in s.converters){converters[conv.toLowerCase()]=s.converters[conv];}}current=dataTypes.shift();// Convert to each sequential dataType\nwhile(current){if(s.responseFields[current]){jqXHR[s.responseFields[current]]=response;}// Apply the dataFilter if provided\nif(!prev&&isSuccess&&s.dataFilter){response=s.dataFilter(response,s.dataType);}prev=current;current=dataTypes.shift();if(current){// There's only work to do if current dataType is non-auto\nif(current===\"*\"){current=prev;// Convert response if prev dataType is non-auto and differs from current\n}else if(prev!==\"*\"&&prev!==current){// Seek a direct converter\nconv=converters[prev+\" \"+current]||converters[\"* \"+current];// If none found, seek a pair\nif(!conv){for(conv2 in converters){// If conv2 outputs current\ntmp=conv2.split(\" \");if(tmp[1]===current){// If prev can be converted to accepted input\nconv=converters[prev+\" \"+tmp[0]]||converters[\"* \"+tmp[0]];if(conv){// Condense equivalence converters\nif(conv===true){conv=converters[conv2];// Otherwise, insert the intermediate dataType\n}else if(converters[conv2]!==true){current=tmp[0];dataTypes.unshift(tmp[1]);}break;}}}}// Apply converter (if not an equivalence)\nif(conv!==true){// Unless errors are allowed to bubble, catch and return them\nif(conv&&s[\"throws\"]){// jscs:ignore requireDotNotation\nresponse=conv(response);}else{try{response=conv(response);}catch(e){return{state:\"parsererror\",error:conv?e:\"No conversion from \"+prev+\" to \"+current};}}}}}}return{state:\"success\",data:response};}", "function ajaxConvert(s,response,jqXHR,isSuccess){var conv2,current,conv,tmp,prev,converters={},// Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes=s.dataTypes.slice();// Create converters map with lowercased keys\n if(dataTypes[1]){for(conv in s.converters){converters[conv.toLowerCase()]=s.converters[conv];}}current=dataTypes.shift();// Convert to each sequential dataType\n while(current){if(s.responseFields[current]){jqXHR[s.responseFields[current]]=response;}// Apply the dataFilter if provided\n if(!prev&&isSuccess&&s.dataFilter){response=s.dataFilter(response,s.dataType);}prev=current;current=dataTypes.shift();if(current){// There's only work to do if current dataType is non-auto\n if(current===\"*\"){current=prev;// Convert response if prev dataType is non-auto and differs from current\n }else if(prev!==\"*\"&&prev!==current){// Seek a direct converter\n conv=converters[prev+\" \"+current]||converters[\"* \"+current];// If none found, seek a pair\n if(!conv){for(conv2 in converters){// If conv2 outputs current\n tmp=conv2.split(\" \");if(tmp[1]===current){// If prev can be converted to accepted input\n conv=converters[prev+\" \"+tmp[0]]||converters[\"* \"+tmp[0]];if(conv){// Condense equivalence converters\n if(conv===true){conv=converters[conv2];// Otherwise, insert the intermediate dataType\n }else if(converters[conv2]!==true){current=tmp[0];dataTypes.unshift(tmp[1]);}break;}}}}// Apply converter (if not an equivalence)\n if(conv!==true){// Unless errors are allowed to bubble, catch and return them\n if(conv&&s[\"throws\"]){response=conv(response);}else{try{response=conv(response);}catch(e){return{state:\"parsererror\",error:conv?e:\"No conversion from \"+prev+\" to \"+current};}}}}}}return{state:\"success\",data:response};}// Install script dataType", "function ajaxConvert(s,response,jqXHR,isSuccess){var conv2,current,conv,tmp,prev,converters={},// Work with a copy of dataTypes in case we need to modify it for conversion\ndataTypes=s.dataTypes.slice();// Create converters map with lowercased keys\nif(dataTypes[1]){for(conv in s.converters){converters[conv.toLowerCase()]=s.converters[conv];}}current=dataTypes.shift();// Convert to each sequential dataType\nwhile(current){if(s.responseFields[current]){jqXHR[s.responseFields[current]]=response;}// Apply the dataFilter if provided\nif(!prev&&isSuccess&&s.dataFilter){response=s.dataFilter(response,s.dataType);}prev=current;current=dataTypes.shift();if(current){// There's only work to do if current dataType is non-auto\nif(current===\"*\"){current=prev;// Convert response if prev dataType is non-auto and differs from current\n}else if(prev!==\"*\"&&prev!==current){// Seek a direct converter\nconv=converters[prev+\" \"+current]||converters[\"* \"+current];// If none found, seek a pair\nif(!conv){for(conv2 in converters){// If conv2 outputs current\ntmp=conv2.split(\" \");if(tmp[1]===current){// If prev can be converted to accepted input\nconv=converters[prev+\" \"+tmp[0]]||converters[\"* \"+tmp[0]];if(conv){// Condense equivalence converters\nif(conv===true){conv=converters[conv2];// Otherwise, insert the intermediate dataType\n}else if(converters[conv2]!==true){current=tmp[0];dataTypes.unshift(tmp[1]);}break;}}}}// Apply converter (if not an equivalence)\nif(conv!==true){// Unless errors are allowed to bubble, catch and return them\nif(conv&&s.throws){response=conv(response);}else{try{response=conv(response);}catch(e){return{state:\"parsererror\",error:conv?e:\"No conversion from \"+prev+\" to \"+current};}}}}}}return{state:\"success\",data:response};}", "function ajaxConvert(s,response,jqXHR,isSuccess){var conv2,current,conv,tmp,prev,converters={},// Work with a copy of dataTypes in case we need to modify it for conversion\ndataTypes=s.dataTypes.slice();// Create converters map with lowercased keys\nif(dataTypes[1]){for(conv in s.converters){converters[conv.toLowerCase()]=s.converters[conv];}}current=dataTypes.shift();// Convert to each sequential dataType\nwhile(current){if(s.responseFields[current]){jqXHR[s.responseFields[current]]=response;}// Apply the dataFilter if provided\nif(!prev&&isSuccess&&s.dataFilter){response=s.dataFilter(response,s.dataType);}prev=current;current=dataTypes.shift();if(current){// There's only work to do if current dataType is non-auto\nif(current===\"*\"){current=prev;// Convert response if prev dataType is non-auto and differs from current\n}else if(prev!==\"*\"&&prev!==current){// Seek a direct converter\nconv=converters[prev+\" \"+current]||converters[\"* \"+current];// If none found, seek a pair\nif(!conv){for(conv2 in converters){// If conv2 outputs current\ntmp=conv2.split(\" \");if(tmp[1]===current){// If prev can be converted to accepted input\nconv=converters[prev+\" \"+tmp[0]]||converters[\"* \"+tmp[0]];if(conv){// Condense equivalence converters\nif(conv===true){conv=converters[conv2];// Otherwise, insert the intermediate dataType\n}else if(converters[conv2]!==true){current=tmp[0];dataTypes.unshift(tmp[1]);}break;}}}}// Apply converter (if not an equivalence)\nif(conv!==true){// Unless errors are allowed to bubble, catch and return them\nif(conv&&s.throws){response=conv(response);}else{try{response=conv(response);}catch(e){return{state:\"parsererror\",error:conv?e:\"No conversion from \"+prev+\" to \"+current};}}}}}}return{state:\"success\",data:response};}", "function ajaxConvert(s,response,jqXHR,isSuccess){var conv2,current,conv,tmp,prev,converters={},// Work with a copy of dataTypes in case we need to modify it for conversion\r\n\tdataTypes=s.dataTypes.slice();// Create converters map with lowercased keys\r\n\tif(dataTypes[1]){for(conv in s.converters){converters[conv.toLowerCase()]=s.converters[conv];}}current=dataTypes.shift();// Convert to each sequential dataType\r\n\twhile(current){if(s.responseFields[current]){jqXHR[s.responseFields[current]]=response;}// Apply the dataFilter if provided\r\n\tif(!prev&&isSuccess&&s.dataFilter){response=s.dataFilter(response,s.dataType);}prev=current;current=dataTypes.shift();if(current){// There's only work to do if current dataType is non-auto\r\n\tif(current===\"*\"){current=prev;// Convert response if prev dataType is non-auto and differs from current\r\n\t}else if(prev!==\"*\"&&prev!==current){// Seek a direct converter\r\n\tconv=converters[prev+\" \"+current]||converters[\"* \"+current];// If none found, seek a pair\r\n\tif(!conv){for(conv2 in converters){// If conv2 outputs current\r\n\ttmp=conv2.split(\" \");if(tmp[1]===current){// If prev can be converted to accepted input\r\n\tconv=converters[prev+\" \"+tmp[0]]||converters[\"* \"+tmp[0]];if(conv){// Condense equivalence converters\r\n\tif(conv===true){conv=converters[conv2];// Otherwise, insert the intermediate dataType\r\n\t}else if(converters[conv2]!==true){current=tmp[0];dataTypes.unshift(tmp[1]);}break;}}}}// Apply converter (if not an equivalence)\r\n\tif(conv!==true){// Unless errors are allowed to bubble, catch and return them\r\n\tif(conv&&s.throws){response=conv(response);}else{try{response=conv(response);}catch(e){return{state:\"parsererror\",error:conv?e:\"No conversion from \"+prev+\" to \"+current};}}}}}}return{state:\"success\",data:response};}", "function ajaxConvert(s,response,jqXHR,isSuccess){var conv2,current,conv,tmp,prev,converters={},// Work with a copy of dataTypes in case we need to modify it for conversion\n\tdataTypes=s.dataTypes.slice();// Create converters map with lowercased keys\n\tif(dataTypes[1]){for(conv in s.converters){converters[conv.toLowerCase()]=s.converters[conv];}}current=dataTypes.shift();// Convert to each sequential dataType\n\twhile(current){if(s.responseFields[current]){jqXHR[s.responseFields[current]]=response;}// Apply the dataFilter if provided\n\tif(!prev&&isSuccess&&s.dataFilter){response=s.dataFilter(response,s.dataType);}prev=current;current=dataTypes.shift();if(current){// There's only work to do if current dataType is non-auto\n\tif(current===\"*\"){current=prev;// Convert response if prev dataType is non-auto and differs from current\n\t}else if(prev!==\"*\"&&prev!==current){// Seek a direct converter\n\tconv=converters[prev+\" \"+current]||converters[\"* \"+current];// If none found, seek a pair\n\tif(!conv){for(conv2 in converters){// If conv2 outputs current\n\ttmp=conv2.split(\" \");if(tmp[1]===current){// If prev can be converted to accepted input\n\tconv=converters[prev+\" \"+tmp[0]]||converters[\"* \"+tmp[0]];if(conv){// Condense equivalence converters\n\tif(conv===true){conv=converters[conv2];// Otherwise, insert the intermediate dataType\n\t}else if(converters[conv2]!==true){current=tmp[0];dataTypes.unshift(tmp[1]);}break;}}}}// Apply converter (if not an equivalence)\n\tif(conv!==true){// Unless errors are allowed to bubble, catch and return them\n\tif(conv&&s.throws){response=conv(response);}else{try{response=conv(response);}catch(e){return{state:\"parsererror\",error:conv?e:\"No conversion from \"+prev+\" to \"+current};}}}}}}return{state:\"success\",data:response};}", "function ajaxConvert(s, response, jqXHR, isSuccess) {\n var conv2, current, conv, tmp, prev,\n converters = {},\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice();\n\n // Create converters map with lowercased keys\n if (dataTypes[ 1 ]) {\n for (conv in s.converters) {\n converters[ conv.toLowerCase() ] = s.converters[ conv ];\n }\n }\n\n current = dataTypes.shift();\n\n // Convert to each sequential dataType\n while (current) {\n\n if (s.responseFields[ current ]) {\n jqXHR[ s.responseFields[ current ] ] = response;\n }\n\n // Apply the dataFilter if provided\n if (!prev && isSuccess && s.dataFilter) {\n response = s.dataFilter(response, s.dataType);\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if (current) {\n\n // There's only work to do if current dataType is non-auto\n if (current === \"*\") {\n\n current = prev;\n\n // Convert response if prev dataType is non-auto and differs from current\n } else if (prev !== \"*\" && prev !== current) {\n\n // Seek a direct converter\n conv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n // If none found, seek a pair\n if (!conv) {\n for (conv2 in converters) {\n\n // If conv2 outputs current\n tmp = conv2.split(\" \");\n if (tmp[ 1 ] === current) {\n\n // If prev can be converted to accepted input\n conv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n converters[ \"* \" + tmp[ 0 ] ];\n if (conv) {\n // Condense equivalence converters\n if (conv === true) {\n conv = converters[ conv2 ];\n\n // Otherwise, insert the intermediate dataType\n } else if (converters[ conv2 ] !== true) {\n current = tmp[ 0 ];\n dataTypes.unshift(tmp[ 1 ]);\n }\n break;\n }\n }\n }\n }\n\n // Apply converter (if not an equivalence)\n if (conv !== true) {\n\n // Unless errors are allowed to bubble, catch and return them\n if (conv && s[ \"throws\" ]) {\n response = conv(response);\n } else {\n try {\n response = conv(response);\n } catch (e) {\n return {state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current};\n }\n }\n }\n }\n }\n }\n\n return {state: \"success\", data: response};\n }", "function ajaxConvert(s, response, jqXHR, isSuccess) {\n var conv2,\n current,\n conv,\n tmp,\n prev,\n converters = {},\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice(); // Create converters map with lowercased keys\n\n if (dataTypes[1]) {\n for (conv in s.converters) {\n converters[conv.toLowerCase()] = s.converters[conv];\n }\n }\n\n current = dataTypes.shift(); // Convert to each sequential dataType\n\n while (current) {\n if (s.responseFields[current]) {\n jqXHR[s.responseFields[current]] = response;\n } // Apply the dataFilter if provided\n\n\n if (!prev && isSuccess && s.dataFilter) {\n response = s.dataFilter(response, s.dataType);\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if (current) {\n // There's only work to do if current dataType is non-auto\n if (current === \"*\") {\n current = prev; // Convert response if prev dataType is non-auto and differs from current\n } else if (prev !== \"*\" && prev !== current) {\n // Seek a direct converter\n conv = converters[prev + \" \" + current] || converters[\"* \" + current]; // If none found, seek a pair\n\n if (!conv) {\n for (conv2 in converters) {\n // If conv2 outputs current\n tmp = conv2.split(\" \");\n\n if (tmp[1] === current) {\n // If prev can be converted to accepted input\n conv = converters[prev + \" \" + tmp[0]] || converters[\"* \" + tmp[0]];\n\n if (conv) {\n // Condense equivalence converters\n if (conv === true) {\n conv = converters[conv2]; // Otherwise, insert the intermediate dataType\n } else if (converters[conv2] !== true) {\n current = tmp[0];\n dataTypes.unshift(tmp[1]);\n }\n\n break;\n }\n }\n }\n } // Apply converter (if not an equivalence)\n\n\n if (conv !== true) {\n // Unless errors are allowed to bubble, catch and return them\n if (conv && s[\"throws\"]) {\n // jscs:ignore requireDotNotation\n response = conv(response);\n } else {\n try {\n response = conv(response);\n } catch (e) {\n return {\n state: \"parsererror\",\n error: conv ? e : \"No conversion from \" + prev + \" to \" + current\n };\n }\n }\n }\n }\n }\n }\n\n return {\n state: \"success\",\n data: response\n };\n }", "function ajaxConvert(s, response, jqXHR, isSuccess) {\n var conv2,\n current,\n conv,\n tmp,\n prev,\n converters = {},\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice(); // Create converters map with lowercased keys\n\n if (dataTypes[1]) {\n for (conv in s.converters) {\n converters[conv.toLowerCase()] = s.converters[conv];\n }\n }\n\n current = dataTypes.shift(); // Convert to each sequential dataType\n\n while (current) {\n if (s.responseFields[current]) {\n jqXHR[s.responseFields[current]] = response;\n } // Apply the dataFilter if provided\n\n\n if (!prev && isSuccess && s.dataFilter) {\n response = s.dataFilter(response, s.dataType);\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if (current) {\n // There's only work to do if current dataType is non-auto\n if (current === \"*\") {\n current = prev; // Convert response if prev dataType is non-auto and differs from current\n } else if (prev !== \"*\" && prev !== current) {\n // Seek a direct converter\n conv = converters[prev + \" \" + current] || converters[\"* \" + current]; // If none found, seek a pair\n\n if (!conv) {\n for (conv2 in converters) {\n // If conv2 outputs current\n tmp = conv2.split(\" \");\n\n if (tmp[1] === current) {\n // If prev can be converted to accepted input\n conv = converters[prev + \" \" + tmp[0]] || converters[\"* \" + tmp[0]];\n\n if (conv) {\n // Condense equivalence converters\n if (conv === true) {\n conv = converters[conv2]; // Otherwise, insert the intermediate dataType\n } else if (converters[conv2] !== true) {\n current = tmp[0];\n dataTypes.unshift(tmp[1]);\n }\n\n break;\n }\n }\n }\n } // Apply converter (if not an equivalence)\n\n\n if (conv !== true) {\n // Unless errors are allowed to bubble, catch and return them\n if (conv && s[\"throws\"]) {\n response = conv(response);\n } else {\n try {\n response = conv(response);\n } catch (e) {\n return {\n state: \"parsererror\",\n error: conv ? e : \"No conversion from \" + prev + \" to \" + current\n };\n }\n }\n }\n }\n }\n }\n\n return {\n state: \"success\",\n data: response\n };\n }", "function ajaxConvert(s, response, jqXHR, isSuccess) {\n var conv2,\n current,\n conv,\n tmp,\n prev,\n converters = {},\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice(); // Create converters map with lowercased keys\n\n if (dataTypes[1]) {\n for (conv in s.converters) {\n converters[conv.toLowerCase()] = s.converters[conv];\n }\n }\n\n current = dataTypes.shift(); // Convert to each sequential dataType\n\n while (current) {\n if (s.responseFields[current]) {\n jqXHR[s.responseFields[current]] = response;\n } // Apply the dataFilter if provided\n\n\n if (!prev && isSuccess && s.dataFilter) {\n response = s.dataFilter(response, s.dataType);\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if (current) {\n // There's only work to do if current dataType is non-auto\n if (current === \"*\") {\n current = prev; // Convert response if prev dataType is non-auto and differs from current\n } else if (prev !== \"*\" && prev !== current) {\n // Seek a direct converter\n conv = converters[prev + \" \" + current] || converters[\"* \" + current]; // If none found, seek a pair\n\n if (!conv) {\n for (conv2 in converters) {\n // If conv2 outputs current\n tmp = conv2.split(\" \");\n\n if (tmp[1] === current) {\n // If prev can be converted to accepted input\n conv = converters[prev + \" \" + tmp[0]] || converters[\"* \" + tmp[0]];\n\n if (conv) {\n // Condense equivalence converters\n if (conv === true) {\n conv = converters[conv2]; // Otherwise, insert the intermediate dataType\n } else if (converters[conv2] !== true) {\n current = tmp[0];\n dataTypes.unshift(tmp[1]);\n }\n\n break;\n }\n }\n }\n } // Apply converter (if not an equivalence)\n\n\n if (conv !== true) {\n // Unless errors are allowed to bubble, catch and return them\n if (conv && s[\"throws\"]) {\n response = conv(response);\n } else {\n try {\n response = conv(response);\n } catch (e) {\n return {\n state: \"parsererror\",\n error: conv ? e : \"No conversion from \" + prev + \" to \" + current\n };\n }\n }\n }\n }\n }\n }\n\n return {\n state: \"success\",\n data: response\n };\n }", "function ajaxConvert(s, response, jqXHR, isSuccess) {\n var conv2,\n current,\n conv,\n tmp,\n prev,\n converters = {},\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice(); // Create converters map with lowercased keys\n\n if (dataTypes[1]) {\n for (conv in s.converters) {\n converters[conv.toLowerCase()] = s.converters[conv];\n }\n }\n\n current = dataTypes.shift(); // Convert to each sequential dataType\n\n while (current) {\n if (s.responseFields[current]) {\n jqXHR[s.responseFields[current]] = response;\n } // Apply the dataFilter if provided\n\n\n if (!prev && isSuccess && s.dataFilter) {\n response = s.dataFilter(response, s.dataType);\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if (current) {\n // There's only work to do if current dataType is non-auto\n if (current === \"*\") {\n current = prev; // Convert response if prev dataType is non-auto and differs from current\n } else if (prev !== \"*\" && prev !== current) {\n // Seek a direct converter\n conv = converters[prev + \" \" + current] || converters[\"* \" + current]; // If none found, seek a pair\n\n if (!conv) {\n for (conv2 in converters) {\n // If conv2 outputs current\n tmp = conv2.split(\" \");\n\n if (tmp[1] === current) {\n // If prev can be converted to accepted input\n conv = converters[prev + \" \" + tmp[0]] || converters[\"* \" + tmp[0]];\n\n if (conv) {\n // Condense equivalence converters\n if (conv === true) {\n conv = converters[conv2]; // Otherwise, insert the intermediate dataType\n } else if (converters[conv2] !== true) {\n current = tmp[0];\n dataTypes.unshift(tmp[1]);\n }\n\n break;\n }\n }\n }\n } // Apply converter (if not an equivalence)\n\n\n if (conv !== true) {\n // Unless errors are allowed to bubble, catch and return them\n if (conv && s[\"throws\"]) {\n response = conv(response);\n } else {\n try {\n response = conv(response);\n } catch (e) {\n return {\n state: \"parsererror\",\n error: conv ? e : \"No conversion from \" + prev + \" to \" + current\n };\n }\n }\n }\n }\n }\n }\n\n return {\n state: \"success\",\n data: response\n };\n }", "function ajaxConvert(s, response, jqXHR, isSuccess) {\n var conv2,\n current,\n conv,\n tmp,\n prev,\n converters = {},\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice(); // Create converters map with lowercased keys\n\n if (dataTypes[1]) {\n for (conv in s.converters) {\n converters[conv.toLowerCase()] = s.converters[conv];\n }\n }\n\n current = dataTypes.shift(); // Convert to each sequential dataType\n\n while (current) {\n if (s.responseFields[current]) {\n jqXHR[s.responseFields[current]] = response;\n } // Apply the dataFilter if provided\n\n\n if (!prev && isSuccess && s.dataFilter) {\n response = s.dataFilter(response, s.dataType);\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if (current) {\n // There's only work to do if current dataType is non-auto\n if (current === \"*\") {\n current = prev; // Convert response if prev dataType is non-auto and differs from current\n } else if (prev !== \"*\" && prev !== current) {\n // Seek a direct converter\n conv = converters[prev + \" \" + current] || converters[\"* \" + current]; // If none found, seek a pair\n\n if (!conv) {\n for (conv2 in converters) {\n // If conv2 outputs current\n tmp = conv2.split(\" \");\n\n if (tmp[1] === current) {\n // If prev can be converted to accepted input\n conv = converters[prev + \" \" + tmp[0]] || converters[\"* \" + tmp[0]];\n\n if (conv) {\n // Condense equivalence converters\n if (conv === true) {\n conv = converters[conv2]; // Otherwise, insert the intermediate dataType\n } else if (converters[conv2] !== true) {\n current = tmp[0];\n dataTypes.unshift(tmp[1]);\n }\n\n break;\n }\n }\n }\n } // Apply converter (if not an equivalence)\n\n\n if (conv !== true) {\n // Unless errors are allowed to bubble, catch and return them\n if (conv && s[\"throws\"]) {\n response = conv(response);\n } else {\n try {\n response = conv(response);\n } catch (e) {\n return {\n state: \"parsererror\",\n error: conv ? e : \"No conversion from \" + prev + \" to \" + current\n };\n }\n }\n }\n }\n }\n }\n\n return {\n state: \"success\",\n data: response\n };\n }", "function ajaxConvert(s, response, jqXHR, isSuccess) {\n var conv2,\n current,\n conv,\n tmp,\n prev,\n converters = {},\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice(); // Create converters map with lowercased keys\n\n if (dataTypes[1]) {\n for (conv in s.converters) {\n converters[conv.toLowerCase()] = s.converters[conv];\n }\n }\n\n current = dataTypes.shift(); // Convert to each sequential dataType\n\n while (current) {\n if (s.responseFields[current]) {\n jqXHR[s.responseFields[current]] = response;\n } // Apply the dataFilter if provided\n\n\n if (!prev && isSuccess && s.dataFilter) {\n response = s.dataFilter(response, s.dataType);\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if (current) {\n // There's only work to do if current dataType is non-auto\n if (current === \"*\") {\n current = prev; // Convert response if prev dataType is non-auto and differs from current\n } else if (prev !== \"*\" && prev !== current) {\n // Seek a direct converter\n conv = converters[prev + \" \" + current] || converters[\"* \" + current]; // If none found, seek a pair\n\n if (!conv) {\n for (conv2 in converters) {\n // If conv2 outputs current\n tmp = conv2.split(\" \");\n\n if (tmp[1] === current) {\n // If prev can be converted to accepted input\n conv = converters[prev + \" \" + tmp[0]] || converters[\"* \" + tmp[0]];\n\n if (conv) {\n // Condense equivalence converters\n if (conv === true) {\n conv = converters[conv2]; // Otherwise, insert the intermediate dataType\n } else if (converters[conv2] !== true) {\n current = tmp[0];\n dataTypes.unshift(tmp[1]);\n }\n\n break;\n }\n }\n }\n } // Apply converter (if not an equivalence)\n\n\n if (conv !== true) {\n // Unless errors are allowed to bubble, catch and return them\n if (conv && s[\"throws\"]) {\n response = conv(response);\n } else {\n try {\n response = conv(response);\n } catch (e) {\n return {\n state: \"parsererror\",\n error: conv ? e : \"No conversion from \" + prev + \" to \" + current\n };\n }\n }\n }\n }\n }\n }\n\n return {\n state: \"success\",\n data: response\n };\n }", "function ajaxConvert(s, response, jqXHR, isSuccess) {\n var conv2,\n current,\n conv,\n tmp,\n prev,\n converters = {},\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice(); // Create converters map with lowercased keys\n\n if (dataTypes[1]) {\n for (conv in s.converters) {\n converters[conv.toLowerCase()] = s.converters[conv];\n }\n }\n\n current = dataTypes.shift(); // Convert to each sequential dataType\n\n while (current) {\n if (s.responseFields[current]) {\n jqXHR[s.responseFields[current]] = response;\n } // Apply the dataFilter if provided\n\n\n if (!prev && isSuccess && s.dataFilter) {\n response = s.dataFilter(response, s.dataType);\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if (current) {\n // There's only work to do if current dataType is non-auto\n if (current === \"*\") {\n current = prev; // Convert response if prev dataType is non-auto and differs from current\n } else if (prev !== \"*\" && prev !== current) {\n // Seek a direct converter\n conv = converters[prev + \" \" + current] || converters[\"* \" + current]; // If none found, seek a pair\n\n if (!conv) {\n for (conv2 in converters) {\n // If conv2 outputs current\n tmp = conv2.split(\" \");\n\n if (tmp[1] === current) {\n // If prev can be converted to accepted input\n conv = converters[prev + \" \" + tmp[0]] || converters[\"* \" + tmp[0]];\n\n if (conv) {\n // Condense equivalence converters\n if (conv === true) {\n conv = converters[conv2]; // Otherwise, insert the intermediate dataType\n } else if (converters[conv2] !== true) {\n current = tmp[0];\n dataTypes.unshift(tmp[1]);\n }\n\n break;\n }\n }\n }\n } // Apply converter (if not an equivalence)\n\n\n if (conv !== true) {\n // Unless errors are allowed to bubble, catch and return them\n if (conv && s.throws) {\n response = conv(response);\n } else {\n try {\n response = conv(response);\n } catch (e) {\n return {\n state: \"parsererror\",\n error: conv ? e : \"No conversion from \" + prev + \" to \" + current\n };\n }\n }\n }\n }\n }\n }\n\n return {\n state: \"success\",\n data: response\n };\n }", "function ajaxConvert(s, response, jqXHR, isSuccess) {\n var conv2,\n current,\n conv,\n tmp,\n prev,\n converters = {},\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice(); // Create converters map with lowercased keys\n\n if (dataTypes[1]) {\n for (conv in s.converters) {\n converters[conv.toLowerCase()] = s.converters[conv];\n }\n }\n\n current = dataTypes.shift(); // Convert to each sequential dataType\n\n while (current) {\n if (s.responseFields[current]) {\n jqXHR[s.responseFields[current]] = response;\n } // Apply the dataFilter if provided\n\n\n if (!prev && isSuccess && s.dataFilter) {\n response = s.dataFilter(response, s.dataType);\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if (current) {\n // There's only work to do if current dataType is non-auto\n if (current === \"*\") {\n current = prev; // Convert response if prev dataType is non-auto and differs from current\n } else if (prev !== \"*\" && prev !== current) {\n // Seek a direct converter\n conv = converters[prev + \" \" + current] || converters[\"* \" + current]; // If none found, seek a pair\n\n if (!conv) {\n for (conv2 in converters) {\n // If conv2 outputs current\n tmp = conv2.split(\" \");\n\n if (tmp[1] === current) {\n // If prev can be converted to accepted input\n conv = converters[prev + \" \" + tmp[0]] || converters[\"* \" + tmp[0]];\n\n if (conv) {\n // Condense equivalence converters\n if (conv === true) {\n conv = converters[conv2]; // Otherwise, insert the intermediate dataType\n } else if (converters[conv2] !== true) {\n current = tmp[0];\n dataTypes.unshift(tmp[1]);\n }\n\n break;\n }\n }\n }\n } // Apply converter (if not an equivalence)\n\n\n if (conv !== true) {\n // Unless errors are allowed to bubble, catch and return them\n if (conv && s.throws) {\n response = conv(response);\n } else {\n try {\n response = conv(response);\n } catch (e) {\n return {\n state: \"parsererror\",\n error: conv ? e : \"No conversion from \" + prev + \" to \" + current\n };\n }\n }\n }\n }\n }\n }\n\n return {\n state: \"success\",\n data: response\n };\n }", "function ajaxConvert(s, response, jqXHR, isSuccess) {\n var conv2,\n current,\n conv,\n tmp,\n prev,\n converters = {},\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice(); // Create converters map with lowercased keys\n\n if (dataTypes[1]) {\n for (conv in s.converters) {\n converters[conv.toLowerCase()] = s.converters[conv];\n }\n }\n\n current = dataTypes.shift(); // Convert to each sequential dataType\n\n while (current) {\n if (s.responseFields[current]) {\n jqXHR[s.responseFields[current]] = response;\n } // Apply the dataFilter if provided\n\n\n if (!prev && isSuccess && s.dataFilter) {\n response = s.dataFilter(response, s.dataType);\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if (current) {\n // There's only work to do if current dataType is non-auto\n if (current === \"*\") {\n current = prev; // Convert response if prev dataType is non-auto and differs from current\n } else if (prev !== \"*\" && prev !== current) {\n // Seek a direct converter\n conv = converters[prev + \" \" + current] || converters[\"* \" + current]; // If none found, seek a pair\n\n if (!conv) {\n for (conv2 in converters) {\n // If conv2 outputs current\n tmp = conv2.split(\" \");\n\n if (tmp[1] === current) {\n // If prev can be converted to accepted input\n conv = converters[prev + \" \" + tmp[0]] || converters[\"* \" + tmp[0]];\n\n if (conv) {\n // Condense equivalence converters\n if (conv === true) {\n conv = converters[conv2]; // Otherwise, insert the intermediate dataType\n } else if (converters[conv2] !== true) {\n current = tmp[0];\n dataTypes.unshift(tmp[1]);\n }\n\n break;\n }\n }\n }\n } // Apply converter (if not an equivalence)\n\n\n if (conv !== true) {\n // Unless errors are allowed to bubble, catch and return them\n if (conv && s.throws) {\n response = conv(response);\n } else {\n try {\n response = conv(response);\n } catch (e) {\n return {\n state: \"parsererror\",\n error: conv ? e : \"No conversion from \" + prev + \" to \" + current\n };\n }\n }\n }\n }\n }\n }\n\n return {\n state: \"success\",\n data: response\n };\n }", "function ajaxConvert( s, response, jqXHR, isSuccess ) { // 8674\n\tvar conv2, current, conv, tmp, prev, // 8675\n\t\tconverters = {}, // 8676\n // 8677\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion // 8678\n\t\tdataTypes = s.dataTypes.slice(); // 8679\n // 8680\n\t// Create converters map with lowercased keys // 8681\n\tif ( dataTypes[ 1 ] ) { // 8682\n\t\tfor ( conv in s.converters ) { // 8683\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ]; // 8684\n\t\t} // 8685\n\t} // 8686\n // 8687\n\tcurrent = dataTypes.shift(); // 8688\n // 8689\n\t// Convert to each sequential dataType // 8690\n\twhile ( current ) { // 8691\n // 8692\n\t\tif ( s.responseFields[ current ] ) { // 8693\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response; // 8694\n\t\t} // 8695\n // 8696\n\t\t// Apply the dataFilter if provided // 8697\n\t\tif ( !prev && isSuccess && s.dataFilter ) { // 8698\n\t\t\tresponse = s.dataFilter( response, s.dataType ); // 8699\n\t\t} // 8700\n // 8701\n\t\tprev = current; // 8702\n\t\tcurrent = dataTypes.shift(); // 8703\n // 8704\n\t\tif ( current ) { // 8705\n // 8706\n\t\t\t// There's only work to do if current dataType is non-auto // 8707\n\t\t\tif ( current === \"*\" ) { // 8708\n // 8709\n\t\t\t\tcurrent = prev; // 8710\n // 8711\n\t\t\t// Convert response if prev dataType is non-auto and differs from current // 8712\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) { // 8713\n // 8714\n\t\t\t\t// Seek a direct converter // 8715\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ]; // 8716\n // 8717\n\t\t\t\t// If none found, seek a pair // 8718\n\t\t\t\tif ( !conv ) { // 8719\n\t\t\t\t\tfor ( conv2 in converters ) { // 8720\n // 8721\n\t\t\t\t\t\t// If conv2 outputs current // 8722\n\t\t\t\t\t\ttmp = conv2.split( \" \" ); // 8723\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) { // 8724\n // 8725\n\t\t\t\t\t\t\t// If prev can be converted to accepted input // 8726\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] || // 8727\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ]; // 8728\n\t\t\t\t\t\t\tif ( conv ) { // 8729\n // 8730\n\t\t\t\t\t\t\t\t// Condense equivalence converters // 8731\n\t\t\t\t\t\t\t\tif ( conv === true ) { // 8732\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ]; // 8733\n // 8734\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType // 8735\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) { // 8736\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ]; // 8737\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] ); // 8738\n\t\t\t\t\t\t\t\t} // 8739\n\t\t\t\t\t\t\t\tbreak; // 8740\n\t\t\t\t\t\t\t} // 8741\n\t\t\t\t\t\t} // 8742\n\t\t\t\t\t} // 8743\n\t\t\t\t} // 8744\n // 8745\n\t\t\t\t// Apply converter (if not an equivalence) // 8746\n\t\t\t\tif ( conv !== true ) { // 8747\n // 8748\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them // 8749\n\t\t\t\t\tif ( conv && s.throws ) { // 8750\n\t\t\t\t\t\tresponse = conv( response ); // 8751\n\t\t\t\t\t} else { // 8752\n\t\t\t\t\t\ttry { // 8753\n\t\t\t\t\t\t\tresponse = conv( response ); // 8754\n\t\t\t\t\t\t} catch ( e ) { // 8755\n\t\t\t\t\t\t\treturn { // 8756\n\t\t\t\t\t\t\t\tstate: \"parsererror\", // 8757\n\t\t\t\t\t\t\t\terror: conv ? e : \"No conversion from \" + prev + \" to \" + current // 8758\n\t\t\t\t\t\t\t}; // 8759\n\t\t\t\t\t\t} // 8760\n\t\t\t\t\t} // 8761\n\t\t\t\t} // 8762\n\t\t\t} // 8763\n\t\t} // 8764\n\t} // 8765\n // 8766\n\treturn { state: \"success\", data: response }; // 8767\n} // 8768", "function ajaxConvert(s, response, jqXHR, isSuccess) {\n var conv2, current, conv, tmp, prev,\n converters = {},\n\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice();\n\n // Create converters map with lowercased keys\n if (dataTypes[1]) {\n for (conv in s.converters) {\n converters[conv.toLowerCase()] = s.converters[conv];\n }\n }\n\n current = dataTypes.shift();\n\n // Convert to each sequential dataType\n while (current) {\n\n if (s.responseFields[current]) {\n jqXHR[s.responseFields[current]] = response;\n }\n\n // Apply the dataFilter if provided\n if (!prev && isSuccess && s.dataFilter) {\n response = s.dataFilter(response, s.dataType);\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if (current) {\n\n // There's only work to do if current dataType is non-auto\n if (current === \"*\") {\n\n current = prev;\n\n // Convert response if prev dataType is non-auto and differs from current\n } else if (prev !== \"*\" && prev !== current) {\n\n // Seek a direct converter\n conv = converters[prev + \" \" + current] || converters[\"* \" + current];\n\n // If none found, seek a pair\n if (!conv) {\n for (conv2 in converters) {\n\n // If conv2 outputs current\n tmp = conv2.split(\" \");\n if (tmp[1] === current) {\n\n // If prev can be converted to accepted input\n conv = converters[prev + \" \" + tmp[0]] ||\n converters[\"* \" + tmp[0]];\n if (conv) {\n\n // Condense equivalence converters\n if (conv === true) {\n conv = converters[conv2];\n\n // Otherwise, insert the intermediate dataType\n } else if (converters[conv2] !== true) {\n current = tmp[0];\n dataTypes.unshift(tmp[1]);\n }\n break;\n }\n }\n }\n }\n\n // Apply converter (if not an equivalence)\n if (conv !== true) {\n\n // Unless errors are allowed to bubble, catch and return them\n if (conv && s.throws) {\n response = conv(response);\n } else {\n try {\n response = conv(response);\n } catch (e) {\n return {\n state: \"parsererror\",\n error: conv ? e : \"No conversion from \" + prev + \" to \" + current\n };\n }\n }\n }\n }\n }\n }\n\n return {state: \"success\", data: response};\n }", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n var conv2, current, conv, tmp, prev,\n converters = {},\n\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice();\n\n // Create converters map with lowercased keys\n if ( dataTypes[ 1 ] ) {\n for ( conv in s.converters ) {\n converters[ conv.toLowerCase() ] = s.converters[ conv ];\n }\n }\n\n current = dataTypes.shift();\n\n // Convert to each sequential dataType\n while ( current ) {\n\n if ( s.responseFields[ current ] ) {\n jqXHR[ s.responseFields[ current ] ] = response;\n }\n\n // Apply the dataFilter if provided\n if ( !prev && isSuccess && s.dataFilter ) {\n response = s.dataFilter( response, s.dataType );\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if ( current ) {\n\n // There's only work to do if current dataType is non-auto\n if ( current === \"*\" ) {\n\n current = prev;\n\n // Convert response if prev dataType is non-auto and differs from current\n } else if ( prev !== \"*\" && prev !== current ) {\n\n // Seek a direct converter\n conv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n // If none found, seek a pair\n if ( !conv ) {\n for ( conv2 in converters ) {\n\n // If conv2 outputs current\n tmp = conv2.split( \" \" );\n if ( tmp[ 1 ] === current ) {\n\n // If prev can be converted to accepted input\n conv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n converters[ \"* \" + tmp[ 0 ] ];\n if ( conv ) {\n\n // Condense equivalence converters\n if ( conv === true ) {\n conv = converters[ conv2 ];\n\n // Otherwise, insert the intermediate dataType\n } else if ( converters[ conv2 ] !== true ) {\n current = tmp[ 0 ];\n dataTypes.unshift( tmp[ 1 ] );\n }\n break;\n }\n }\n }\n }\n\n // Apply converter (if not an equivalence)\n if ( conv !== true ) {\n\n // Unless errors are allowed to bubble, catch and return them\n if ( conv && s.throws ) {\n response = conv( response );\n } else {\n try {\n response = conv( response );\n } catch ( e ) {\n return {\n state: \"parsererror\",\n error: conv ? e : \"No conversion from \" + prev + \" to \" + current\n };\n }\n }\n }\n }\n }\n }\n\n return { state: \"success\", data: response };\n }", "function ajaxConvert(s, response, jqXHR, isSuccess) {\n var conv2,\n current,\n conv,\n tmp,\n prev,\n converters = {},\n\n\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice();\n\n // Create converters map with lowercased keys\n if (dataTypes[1]) {\n for (conv in s.converters) {\n converters[conv.toLowerCase()] = s.converters[conv];\n }\n }\n\n current = dataTypes.shift();\n\n // Convert to each sequential dataType\n while (current) {\n\n if (s.responseFields[current]) {\n jqXHR[s.responseFields[current]] = response;\n }\n\n // Apply the dataFilter if provided\n if (!prev && isSuccess && s.dataFilter) {\n response = s.dataFilter(response, s.dataType);\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if (current) {\n\n // There's only work to do if current dataType is non-auto\n if (current === \"*\") {\n\n current = prev;\n\n // Convert response if prev dataType is non-auto and differs from current\n } else if (prev !== \"*\" && prev !== current) {\n\n // Seek a direct converter\n conv = converters[prev + \" \" + current] || converters[\"* \" + current];\n\n // If none found, seek a pair\n if (!conv) {\n for (conv2 in converters) {\n\n // If conv2 outputs current\n tmp = conv2.split(\" \");\n if (tmp[1] === current) {\n\n // If prev can be converted to accepted input\n conv = converters[prev + \" \" + tmp[0]] || converters[\"* \" + tmp[0]];\n if (conv) {\n\n // Condense equivalence converters\n if (conv === true) {\n conv = converters[conv2];\n\n // Otherwise, insert the intermediate dataType\n } else if (converters[conv2] !== true) {\n current = tmp[0];\n dataTypes.unshift(tmp[1]);\n }\n break;\n }\n }\n }\n }\n\n // Apply converter (if not an equivalence)\n if (conv !== true) {\n\n // Unless errors are allowed to bubble, catch and return them\n if (conv && s.throws) {\n response = conv(response);\n } else {\n try {\n response = conv(response);\n } catch (e) {\n return {\n state: \"parsererror\",\n error: conv ? e : \"No conversion from \" + prev + \" to \" + current\n };\n }\n }\n }\n }\n }\n }\n\n return { state: \"success\", data: response };\n }", "function ajaxConvert(s, response, jqXHR, isSuccess) {\n var conv2, current, conv, tmp, prev,\n converters = {},\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice();\n\n // Create converters map with lowercased keys\n if (dataTypes[1]) {\n for (conv in s.converters) {\n converters[conv.toLowerCase()] = s.converters[conv];\n }\n }\n\n current = dataTypes.shift();\n\n // Convert to each sequential dataType\n while (current) {\n\n if (s.responseFields[current]) {\n jqXHR[s.responseFields[current]] = response;\n }\n\n // Apply the dataFilter if provided\n if (!prev && isSuccess && s.dataFilter) {\n response = s.dataFilter(response, s.dataType);\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if (current) {\n\n // There's only work to do if current dataType is non-auto\n if (current === \"*\") {\n\n current = prev;\n\n // Convert response if prev dataType is non-auto and differs from current\n } else if (prev !== \"*\" && prev !== current) {\n\n // Seek a direct converter\n conv = converters[prev + \" \" + current] || converters[\"* \" + current];\n\n // If none found, seek a pair\n if (!conv) {\n for (conv2 in converters) {\n\n // If conv2 outputs current\n tmp = conv2.split(\" \");\n if (tmp[1] === current) {\n\n // If prev can be converted to accepted input\n conv = converters[prev + \" \" + tmp[0]] || converters[\"* \" + tmp[0]];\n if (conv) {\n // Condense equivalence converters\n if (conv === true) {\n conv = converters[conv2];\n\n // Otherwise, insert the intermediate dataType\n } else if (converters[conv2] !== true) {\n current = tmp[0];\n dataTypes.unshift(tmp[1]);\n }\n break;\n }\n }\n }\n }\n\n // Apply converter (if not an equivalence)\n if (conv !== true) {\n\n // Unless errors are allowed to bubble, catch and return them\n if (conv && s[\"throws\"]) {\n response = conv(response);\n } else {\n try {\n response = conv(response);\n } catch (e) {\n return {\n state: \"parsererror\",\n error: conv ? e : \"No conversion from \" + prev + \" to \" + current\n };\n }\n }\n }\n }\n }\n }\n\n return {\n state: \"success\",\n data: response\n };\n }", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n var conv2, current, conv, tmp, prev,\n converters = {},\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice();\n\n // Create converters map with lowercased keys\n if ( dataTypes[ 1 ] ) {\n for ( conv in s.converters ) {\n converters[ conv.toLowerCase() ] = s.converters[ conv ];\n }\n }\n\n current = dataTypes.shift();\n\n // Convert to each sequential dataType\n while ( current ) {\n\n if ( s.responseFields[ current ] ) {\n jqXHR[ s.responseFields[ current ] ] = response;\n }\n\n // Apply the dataFilter if provided\n if ( !prev && isSuccess && s.dataFilter ) {\n response = s.dataFilter( response, s.dataType );\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if ( current ) {\n\n // There's only work to do if current dataType is non-auto\n if ( current === \"*\" ) {\n\n current = prev;\n\n // Convert response if prev dataType is non-auto and differs from current\n } else if ( prev !== \"*\" && prev !== current ) {\n\n // Seek a direct converter\n conv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n // If none found, seek a pair\n if ( !conv ) {\n for ( conv2 in converters ) {\n\n // If conv2 outputs current\n tmp = conv2.split( \" \" );\n if ( tmp[ 1 ] === current ) {\n\n // If prev can be converted to accepted input\n conv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n converters[ \"* \" + tmp[ 0 ] ];\n if ( conv ) {\n // Condense equivalence converters\n if ( conv === true ) {\n conv = converters[ conv2 ];\n\n // Otherwise, insert the intermediate dataType\n } else if ( converters[ conv2 ] !== true ) {\n current = tmp[ 0 ];\n dataTypes.unshift( tmp[ 1 ] );\n }\n break;\n }\n }\n }\n }\n\n // Apply converter (if not an equivalence)\n if ( conv !== true ) {\n\n // Unless errors are allowed to bubble, catch and return them\n if ( conv && s[ \"throws\" ] ) {\n response = conv( response );\n } else {\n try {\n response = conv( response );\n } catch ( e ) {\n return { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n }\n }\n }\n }\n }\n }\n\n return { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n var conv2, current, conv, tmp, prev,\n converters = {},\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice();\n \n // Create converters map with lowercased keys\n if ( dataTypes[ 1 ] ) {\n for ( conv in s.converters ) {\n converters[ conv.toLowerCase() ] = s.converters[ conv ];\n }\n }\n \n current = dataTypes.shift();\n \n // Convert to each sequential dataType\n while ( current ) {\n \n if ( s.responseFields[ current ] ) {\n jqXHR[ s.responseFields[ current ] ] = response;\n }\n \n // Apply the dataFilter if provided\n if ( !prev && isSuccess && s.dataFilter ) {\n response = s.dataFilter( response, s.dataType );\n }\n \n prev = current;\n current = dataTypes.shift();\n \n if ( current ) {\n \n // There's only work to do if current dataType is non-auto\n if ( current === \"*\" ) {\n \n current = prev;\n \n // Convert response if prev dataType is non-auto and differs from current\n } else if ( prev !== \"*\" && prev !== current ) {\n \n // Seek a direct converter\n conv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n \n // If none found, seek a pair\n if ( !conv ) {\n for ( conv2 in converters ) {\n \n // If conv2 outputs current\n tmp = conv2.split( \" \" );\n if ( tmp[ 1 ] === current ) {\n \n // If prev can be converted to accepted input\n conv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n converters[ \"* \" + tmp[ 0 ] ];\n if ( conv ) {\n // Condense equivalence converters\n if ( conv === true ) {\n conv = converters[ conv2 ];\n \n // Otherwise, insert the intermediate dataType\n } else if ( converters[ conv2 ] !== true ) {\n current = tmp[ 0 ];\n dataTypes.unshift( tmp[ 1 ] );\n }\n break;\n }\n }\n }\n }\n \n // Apply converter (if not an equivalence)\n if ( conv !== true ) {\n \n // Unless errors are allowed to bubble, catch and return them\n if ( conv && s[ \"throws\" ] ) {\n response = conv( response );\n } else {\n try {\n response = conv( response );\n } catch ( e ) {\n return { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n }\n }\n }\n }\n }\n }\n \n return { state: \"success\", data: response };\n }", "function ajaxConvert(s, response, jqXHR, isSuccess) {\n var conv2, current, conv, tmp, prev,\n converters = {},\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice();\n\n // Create converters map with lowercased keys\n if (dataTypes[1]) {\n for (conv in s.converters) {\n converters[conv.toLowerCase()] = s.converters[conv];\n }\n }\n\n current = dataTypes.shift();\n\n // Convert to each sequential dataType\n while (current) {\n\n if (s.responseFields[current]) {\n jqXHR[s.responseFields[current]] = response;\n }\n\n // Apply the dataFilter if provided\n if (!prev && isSuccess && s.dataFilter) {\n response = s.dataFilter(response, s.dataType);\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if (current) {\n\n // There's only work to do if current dataType is non-auto\n if (current === \"*\") {\n\n current = prev;\n\n // Convert response if prev dataType is non-auto and differs from current\n } else if (prev !== \"*\" && prev !== current) {\n\n // Seek a direct converter\n conv = converters[prev + \" \" + current] || converters[\"* \" + current];\n\n // If none found, seek a pair\n if (!conv) {\n for (conv2 in converters) {\n\n // If conv2 outputs current\n tmp = conv2.split(\" \");\n if (tmp[1] === current) {\n\n // If prev can be converted to accepted input\n conv = converters[prev + \" \" + tmp[0]] ||\n converters[\"* \" + tmp[0]];\n if (conv) {\n // Condense equivalence converters\n if (conv === true) {\n conv = converters[conv2];\n\n // Otherwise, insert the intermediate dataType\n } else if (converters[conv2] !== true) {\n current = tmp[0];\n dataTypes.unshift(tmp[1]);\n }\n break;\n }\n }\n }\n }\n\n // Apply converter (if not an equivalence)\n if (conv !== true) {\n\n // Unless errors are allowed to bubble, catch and return them\n if (conv && s[\"throws\"]) {\n response = conv(response);\n } else {\n try {\n response = conv(response);\n } catch (e) {\n return {\n state: \"parsererror\",\n error: conv ? e : \"No conversion from \" + prev + \" to \" + current\n };\n }\n }\n }\n }\n }\n }\n\n return {state: \"success\", data: response};\n }", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n var conv2, current, conv, tmp, prev,\n converters = {},\n\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice();\n\n // Create converters map with lowercased keys\n if ( dataTypes[ 1 ] ) {\n for ( conv in s.converters ) {\n converters[ conv.toLowerCase() ] = s.converters[ conv ];\n }\n }\n\n current = dataTypes.shift();\n\n // Convert to each sequential dataType\n while ( current ) {\n\n if ( s.responseFields[ current ] ) {\n jqXHR[ s.responseFields[ current ] ] = response;\n }\n\n // Apply the dataFilter if provided\n if ( !prev && isSuccess && s.dataFilter ) {\n response = s.dataFilter( response, s.dataType );\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if ( current ) {\n\n // There's only work to do if current dataType is non-auto\n if ( current === \"*\" ) {\n\n current = prev;\n\n // Convert response if prev dataType is non-auto and differs from current\n } else if ( prev !== \"*\" && prev !== current ) {\n\n // Seek a direct converter\n conv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n // If none found, seek a pair\n if ( !conv ) {\n for ( conv2 in converters ) {\n\n // If conv2 outputs current\n tmp = conv2.split( \" \" );\n if ( tmp[ 1 ] === current ) {\n\n // If prev can be converted to accepted input\n conv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n converters[ \"* \" + tmp[ 0 ] ];\n if ( conv ) {\n\n // Condense equivalence converters\n if ( conv === true ) {\n conv = converters[ conv2 ];\n\n // Otherwise, insert the intermediate dataType\n } else if ( converters[ conv2 ] !== true ) {\n current = tmp[ 0 ];\n dataTypes.unshift( tmp[ 1 ] );\n }\n break;\n }\n }\n }\n }\n\n // Apply converter (if not an equivalence)\n if ( conv !== true ) {\n\n // Unless errors are allowed to bubble, catch and return them\n if ( conv && s.throws ) {\n response = conv( response );\n } else {\n try {\n response = conv( response );\n } catch ( e ) {\n return {\n state: \"parsererror\",\n error: conv ? e : \"No conversion from \" + prev + \" to \" + current\n };\n }\n }\n }\n }\n }\n }\n\n return { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n var conv2, current, conv, tmp, prev,\n converters = {},\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice();\n\n // Create converters map with lowercased keys\n if ( dataTypes[ 1 ] ) {\n for ( conv in s.converters ) {\n converters[ conv.toLowerCase() ] = s.converters[ conv ];\n }\n }\n\n current = dataTypes.shift();\n\n // Convert to each sequential dataType\n while ( current ) {\n\n if ( s.responseFields[ current ] ) {\n jqXHR[ s.responseFields[ current ] ] = response;\n }\n\n // Apply the dataFilter if provided\n if ( !prev && isSuccess && s.dataFilter ) {\n response = s.dataFilter( response, s.dataType );\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if ( current ) {\n\n // There's only work to do if current dataType is non-auto\n if ( current === \"*\" ) {\n\n current = prev;\n\n // Convert response if prev dataType is non-auto and differs from current\n } else if ( prev !== \"*\" && prev !== current ) {\n\n // Seek a direct converter\n conv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n // If none found, seek a pair\n if ( !conv ) {\n for ( conv2 in converters ) {\n\n // If conv2 outputs current\n tmp = conv2.split( \" \" );\n if ( tmp[ 1 ] === current ) {\n\n // If prev can be converted to accepted input\n conv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n converters[ \"* \" + tmp[ 0 ] ];\n if ( conv ) {\n // Condense equivalence converters\n if ( conv === true ) {\n conv = converters[ conv2 ];\n\n // Otherwise, insert the intermediate dataType\n } else if ( converters[ conv2 ] !== true ) {\n current = tmp[ 0 ];\n dataTypes.unshift( tmp[ 1 ] );\n }\n break;\n }\n }\n }\n }\n\n // Apply converter (if not an equivalence)\n if ( conv !== true ) {\n\n // Unless errors are allowed to bubble, catch and return them\n if ( conv && s[ \"throws\" ] ) {\n response = conv( response );\n } else {\n try {\n response = conv( response );\n } catch ( e ) {\n return { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n }\n }\n }\n }\n }\n }\n\n return { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n var conv2, current, conv, tmp, prev,\n converters = {},\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice();\n\n // Create converters map with lowercased keys\n if ( dataTypes[ 1 ] ) {\n for ( conv in s.converters ) {\n converters[ conv.toLowerCase() ] = s.converters[ conv ];\n }\n }\n\n current = dataTypes.shift();\n\n // Convert to each sequential dataType\n while ( current ) {\n\n if ( s.responseFields[ current ] ) {\n jqXHR[ s.responseFields[ current ] ] = response;\n }\n\n // Apply the dataFilter if provided\n if ( !prev && isSuccess && s.dataFilter ) {\n response = s.dataFilter( response, s.dataType );\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if ( current ) {\n\n // There's only work to do if current dataType is non-auto\n if ( current === \"*\" ) {\n\n current = prev;\n\n // Convert response if prev dataType is non-auto and differs from current\n } else if ( prev !== \"*\" && prev !== current ) {\n\n // Seek a direct converter\n conv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n // If none found, seek a pair\n if ( !conv ) {\n for ( conv2 in converters ) {\n\n // If conv2 outputs current\n tmp = conv2.split( \" \" );\n if ( tmp[ 1 ] === current ) {\n\n // If prev can be converted to accepted input\n conv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n converters[ \"* \" + tmp[ 0 ] ];\n if ( conv ) {\n // Condense equivalence converters\n if ( conv === true ) {\n conv = converters[ conv2 ];\n\n // Otherwise, insert the intermediate dataType\n } else if ( converters[ conv2 ] !== true ) {\n current = tmp[ 0 ];\n dataTypes.unshift( tmp[ 1 ] );\n }\n break;\n }\n }\n }\n }\n\n // Apply converter (if not an equivalence)\n if ( conv !== true ) {\n\n // Unless errors are allowed to bubble, catch and return them\n if ( conv && s[ \"throws\" ] ) {\n response = conv( response );\n } else {\n try {\n response = conv( response );\n } catch ( e ) {\n return { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n }\n }\n }\n }\n }\n }\n\n return { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n var conv2, current, conv, tmp, prev,\n converters = {},\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice();\n\n // Create converters map with lowercased keys\n if ( dataTypes[ 1 ] ) {\n for ( conv in s.converters ) {\n converters[ conv.toLowerCase() ] = s.converters[ conv ];\n }\n }\n\n current = dataTypes.shift();\n\n // Convert to each sequential dataType\n while ( current ) {\n\n if ( s.responseFields[ current ] ) {\n jqXHR[ s.responseFields[ current ] ] = response;\n }\n\n // Apply the dataFilter if provided\n if ( !prev && isSuccess && s.dataFilter ) {\n response = s.dataFilter( response, s.dataType );\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if ( current ) {\n\n // There's only work to do if current dataType is non-auto\n if ( current === \"*\" ) {\n\n current = prev;\n\n // Convert response if prev dataType is non-auto and differs from current\n } else if ( prev !== \"*\" && prev !== current ) {\n\n // Seek a direct converter\n conv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n // If none found, seek a pair\n if ( !conv ) {\n for ( conv2 in converters ) {\n\n // If conv2 outputs current\n tmp = conv2.split( \" \" );\n if ( tmp[ 1 ] === current ) {\n\n // If prev can be converted to accepted input\n conv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n converters[ \"* \" + tmp[ 0 ] ];\n if ( conv ) {\n // Condense equivalence converters\n if ( conv === true ) {\n conv = converters[ conv2 ];\n\n // Otherwise, insert the intermediate dataType\n } else if ( converters[ conv2 ] !== true ) {\n current = tmp[ 0 ];\n dataTypes.unshift( tmp[ 1 ] );\n }\n break;\n }\n }\n }\n }\n\n // Apply converter (if not an equivalence)\n if ( conv !== true ) {\n\n // Unless errors are allowed to bubble, catch and return them\n if ( conv && s[ \"throws\" ] ) {\n response = conv( response );\n } else {\n try {\n response = conv( response );\n } catch ( e ) {\n return { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n }\n }\n }\n }\n }\n }\n\n return { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n var conv2, current, conv, tmp, prev,\n converters = {},\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice();\n\n // Create converters map with lowercased keys\n if ( dataTypes[ 1 ] ) {\n for ( conv in s.converters ) {\n converters[ conv.toLowerCase() ] = s.converters[ conv ];\n }\n }\n\n current = dataTypes.shift();\n\n // Convert to each sequential dataType\n while ( current ) {\n\n if ( s.responseFields[ current ] ) {\n jqXHR[ s.responseFields[ current ] ] = response;\n }\n\n // Apply the dataFilter if provided\n if ( !prev && isSuccess && s.dataFilter ) {\n response = s.dataFilter( response, s.dataType );\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if ( current ) {\n\n // There's only work to do if current dataType is non-auto\n if ( current === \"*\" ) {\n\n current = prev;\n\n // Convert response if prev dataType is non-auto and differs from current\n } else if ( prev !== \"*\" && prev !== current ) {\n\n // Seek a direct converter\n conv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n // If none found, seek a pair\n if ( !conv ) {\n for ( conv2 in converters ) {\n\n // If conv2 outputs current\n tmp = conv2.split( \" \" );\n if ( tmp[ 1 ] === current ) {\n\n // If prev can be converted to accepted input\n conv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n converters[ \"* \" + tmp[ 0 ] ];\n if ( conv ) {\n // Condense equivalence converters\n if ( conv === true ) {\n conv = converters[ conv2 ];\n\n // Otherwise, insert the intermediate dataType\n } else if ( converters[ conv2 ] !== true ) {\n current = tmp[ 0 ];\n dataTypes.unshift( tmp[ 1 ] );\n }\n break;\n }\n }\n }\n }\n\n // Apply converter (if not an equivalence)\n if ( conv !== true ) {\n\n // Unless errors are allowed to bubble, catch and return them\n if ( conv && s[ \"throws\" ] ) {\n response = conv( response );\n } else {\n try {\n response = conv( response );\n } catch ( e ) {\n return { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n }\n }\n }\n }\n }\n }\n\n return { state: \"success\", data: response };\n}", "function ajaxConvert(s, response, jqXHR, isSuccess) {\n var conv2, current, conv, tmp, prev,\n converters = {},\n\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice();\n\n // Create converters map with lowercased keys\n if (dataTypes[1]) {\n for (conv in s.converters) {\n converters[conv.toLowerCase()] = s.converters[conv];\n }\n }\n\n current = dataTypes.shift();\n\n // Convert to each sequential dataType\n while (current) {\n\n if (s.responseFields[current]) {\n jqXHR[s.responseFields[current]] = response;\n }\n\n // Apply the dataFilter if provided\n if (!prev && isSuccess && s.dataFilter) {\n response = s.dataFilter(response, s.dataType);\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if (current) {\n\n // There's only work to do if current dataType is non-auto\n if (current === \"*\") {\n\n current = prev;\n\n // Convert response if prev dataType is non-auto and differs from current\n } else if (prev !== \"*\" && prev !== current) {\n\n // Seek a direct converter\n conv = converters[prev + \" \" + current] || converters[\"* \" + current];\n\n // If none found, seek a pair\n if (!conv) {\n for (conv2 in converters) {\n\n // If conv2 outputs current\n tmp = conv2.split(\" \");\n if (tmp[1] === current) {\n\n // If prev can be converted to accepted input\n conv = converters[prev + \" \" + tmp[0]] ||\n converters[\"* \" + tmp[0]];\n if (conv) {\n\n // Condense equivalence converters\n if (conv === true) {\n conv = converters[conv2];\n\n // Otherwise, insert the intermediate dataType\n } else if (converters[conv2] !== true) {\n current = tmp[0];\n dataTypes.unshift(tmp[1]);\n }\n break;\n }\n }\n }\n }\n\n // Apply converter (if not an equivalence)\n if (conv !== true) {\n\n // Unless errors are allowed to bubble, catch and return them\n if (conv && s.throws) {\n response = conv(response);\n } else {\n try {\n response = conv(response);\n } catch (e) {\n return {\n state: \"parsererror\",\n error: conv ? e : \"No conversion from \" + prev + \" to \" + current\n };\n }\n }\n }\n }\n }\n }\n\n return { state: \"success\", data: response };\n }", "function ajaxConvert(s, response, jqXHR, isSuccess) {\n var conv2, current, conv, tmp, prev,\n converters = {},\n\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice();\n\n // Create converters map with lowercased keys\n if (dataTypes[1]) {\n for (conv in s.converters) {\n converters[conv.toLowerCase()] = s.converters[conv];\n }\n }\n\n current = dataTypes.shift();\n\n // Convert to each sequential dataType\n while (current) {\n\n if (s.responseFields[current]) {\n jqXHR[s.responseFields[current]] = response;\n }\n\n // Apply the dataFilter if provided\n if (!prev && isSuccess && s.dataFilter) {\n response = s.dataFilter(response, s.dataType);\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if (current) {\n\n // There's only work to do if current dataType is non-auto\n if (current === \"*\") {\n\n current = prev;\n\n // Convert response if prev dataType is non-auto and differs from current\n } else if (prev !== \"*\" && prev !== current) {\n\n // Seek a direct converter\n conv = converters[prev + \" \" + current] || converters[\"* \" + current];\n\n // If none found, seek a pair\n if (!conv) {\n for (conv2 in converters) {\n\n // If conv2 outputs current\n tmp = conv2.split(\" \");\n if (tmp[1] === current) {\n\n // If prev can be converted to accepted input\n conv = converters[prev + \" \" + tmp[0]] ||\n converters[\"* \" + tmp[0]];\n if (conv) {\n\n // Condense equivalence converters\n if (conv === true) {\n conv = converters[conv2];\n\n // Otherwise, insert the intermediate dataType\n } else if (converters[conv2] !== true) {\n current = tmp[0];\n dataTypes.unshift(tmp[1]);\n }\n break;\n }\n }\n }\n }\n\n // Apply converter (if not an equivalence)\n if (conv !== true) {\n\n // Unless errors are allowed to bubble, catch and return them\n if (conv && s.throws) {\n response = conv(response);\n } else {\n try {\n response = conv(response);\n } catch (e) {\n return {\n state: \"parsererror\",\n error: conv ? e : \"No conversion from \" + prev + \" to \" + current\n };\n }\n }\n }\n }\n }\n }\n\n return { state: \"success\", data: response };\n }", "function ajaxConvert(s, response, jqXHR, isSuccess) {\n var conv2, current, conv, tmp, prev,\n converters = {},\n\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice();\n\n // Create converters map with lowercased keys\n if (dataTypes[1]) {\n for (conv in s.converters) {\n converters[conv.toLowerCase()] = s.converters[conv];\n }\n }\n\n current = dataTypes.shift();\n\n // Convert to each sequential dataType\n while (current) {\n\n if (s.responseFields[current]) {\n jqXHR[s.responseFields[current]] = response;\n }\n\n // Apply the dataFilter if provided\n if (!prev && isSuccess && s.dataFilter) {\n response = s.dataFilter(response, s.dataType);\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if (current) {\n\n // There's only work to do if current dataType is non-auto\n if (current === \"*\") {\n\n current = prev;\n\n // Convert response if prev dataType is non-auto and differs from current\n } else if (prev !== \"*\" && prev !== current) {\n\n // Seek a direct converter\n conv = converters[prev + \" \" + current] || converters[\"* \" + current];\n\n // If none found, seek a pair\n if (!conv) {\n for (conv2 in converters) {\n\n // If conv2 outputs current\n tmp = conv2.split(\" \");\n if (tmp[1] === current) {\n\n // If prev can be converted to accepted input\n conv = converters[prev + \" \" + tmp[0]] ||\n converters[\"* \" + tmp[0]];\n if (conv) {\n\n // Condense equivalence converters\n if (conv === true) {\n conv = converters[conv2];\n\n // Otherwise, insert the intermediate dataType\n } else if (converters[conv2] !== true) {\n current = tmp[0];\n dataTypes.unshift(tmp[1]);\n }\n break;\n }\n }\n }\n }\n\n // Apply converter (if not an equivalence)\n if (conv !== true) {\n\n // Unless errors are allowed to bubble, catch and return them\n if (conv && s.throws) {\n response = conv(response);\n } else {\n try {\n response = conv(response);\n } catch (e) {\n return {\n state: \"parsererror\",\n error: conv ? e : \"No conversion from \" + prev + \" to \" + current\n };\n }\n }\n }\n }\n }\n }\n\n return {state: \"success\", data: response};\n }", "function ajaxConvert(s, response, jqXHR, isSuccess) {\n var conv2, current, conv, tmp, prev,\n converters = {},\n\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice();\n\n // Create converters map with lowercased keys\n if (dataTypes[1]) {\n for (conv in s.converters) {\n converters[conv.toLowerCase()] = s.converters[conv];\n }\n }\n\n current = dataTypes.shift();\n\n // Convert to each sequential dataType\n while (current) {\n\n if (s.responseFields[current]) {\n jqXHR[s.responseFields[current]] = response;\n }\n\n // Apply the dataFilter if provided\n if (!prev && isSuccess && s.dataFilter) {\n response = s.dataFilter(response, s.dataType);\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if (current) {\n\n // There's only work to do if current dataType is non-auto\n if (current === \"*\") {\n\n current = prev;\n\n // Convert response if prev dataType is non-auto and differs from current\n } else if (prev !== \"*\" && prev !== current) {\n\n // Seek a direct converter\n conv = converters[prev + \" \" + current] || converters[\"* \" + current];\n\n // If none found, seek a pair\n if (!conv) {\n for (conv2 in converters) {\n\n // If conv2 outputs current\n tmp = conv2.split(\" \");\n if (tmp[1] === current) {\n\n // If prev can be converted to accepted input\n conv = converters[prev + \" \" + tmp[0]] ||\n converters[\"* \" + tmp[0]];\n if (conv) {\n\n // Condense equivalence converters\n if (conv === true) {\n conv = converters[conv2];\n\n // Otherwise, insert the intermediate dataType\n } else if (converters[conv2] !== true) {\n current = tmp[0];\n dataTypes.unshift(tmp[1]);\n }\n break;\n }\n }\n }\n }\n\n // Apply converter (if not an equivalence)\n if (conv !== true) {\n\n // Unless errors are allowed to bubble, catch and return them\n if (conv && s[\"throws\"]) { // jscs:ignore requireDotNotation\n response = conv(response);\n } else {\n try {\n response = conv(response);\n } catch (e) {\n return {\n state: \"parsererror\",\n error: conv ? e : \"No conversion from \" + prev + \" to \" + current\n };\n }\n }\n }\n }\n }\n }\n\n return {\n state: \"success\",\n data: response\n };\n }", "function ajaxConvert(s, response, jqXHR, isSuccess) {\n var conv2, current, conv, tmp, prev,\n converters = {},\n\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice();\n\n // Create converters map with lowercased keys\n if (dataTypes[1]) {\n for (conv in s.converters) {\n converters[conv.toLowerCase()] = s.converters[conv];\n }\n }\n\n current = dataTypes.shift();\n\n // Convert to each sequential dataType\n while (current) {\n\n if (s.responseFields[current]) {\n jqXHR[s.responseFields[current]] = response;\n }\n\n // Apply the dataFilter if provided\n if (!prev && isSuccess && s.dataFilter) {\n response = s.dataFilter(response, s.dataType);\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if (current) {\n\n // There's only work to do if current dataType is non-auto\n if (current === \"*\") {\n\n current = prev;\n\n // Convert response if prev dataType is non-auto and differs from current\n } else if (prev !== \"*\" && prev !== current) {\n\n // Seek a direct converter\n conv = converters[prev + \" \" + current] || converters[\"* \" + current];\n\n // If none found, seek a pair\n if (!conv) {\n for (conv2 in converters) {\n\n // If conv2 outputs current\n tmp = conv2.split(\" \");\n if (tmp[1] === current) {\n\n // If prev can be converted to accepted input\n conv = converters[prev + \" \" + tmp[0]] ||\n converters[\"* \" + tmp[0]];\n if (conv) {\n\n // Condense equivalence converters\n if (conv === true) {\n conv = converters[conv2];\n\n // Otherwise, insert the intermediate dataType\n } else if (converters[conv2] !== true) {\n current = tmp[0];\n dataTypes.unshift(tmp[1]);\n }\n break;\n }\n }\n }\n }\n\n // Apply converter (if not an equivalence)\n if (conv !== true) {\n\n // Unless errors are allowed to bubble, catch and return them\n if (conv && s[\"throws\"]) { // jscs:ignore requireDotNotation\n response = conv(response);\n } else {\n try {\n response = conv(response);\n } catch (e) {\n return {\n state: \"parsererror\",\n error: conv ? e : \"No conversion from \" + prev + \" to \" + current\n };\n }\n }\n }\n }\n }\n }\n\n return {state: \"success\", data: response};\n }", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n var conv2, current, conv, tmp, prev,\n converters = {},\n\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice();\n\n // Create converters map with lowercased keys\n if ( dataTypes[ 1 ] ) {\n for ( conv in s.converters ) {\n converters[ conv.toLowerCase() ] = s.converters[ conv ];\n }\n }\n\n current = dataTypes.shift();\n\n // Convert to each sequential dataType\n while ( current ) {\n\n if ( s.responseFields[ current ] ) {\n jqXHR[ s.responseFields[ current ] ] = response;\n }\n\n // Apply the dataFilter if provided\n if ( !prev && isSuccess && s.dataFilter ) {\n response = s.dataFilter( response, s.dataType );\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if ( current ) {\n\n // There's only work to do if current dataType is non-auto\n if ( current === \"*\" ) {\n\n current = prev;\n\n // Convert response if prev dataType is non-auto and differs from current\n } else if ( prev !== \"*\" && prev !== current ) {\n\n // Seek a direct converter\n conv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n // If none found, seek a pair\n if ( !conv ) {\n for ( conv2 in converters ) {\n\n // If conv2 outputs current\n tmp = conv2.split( \" \" );\n if ( tmp[ 1 ] === current ) {\n\n // If prev can be converted to accepted input\n conv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n converters[ \"* \" + tmp[ 0 ] ];\n if ( conv ) {\n\n // Condense equivalence converters\n if ( conv === true ) {\n conv = converters[ conv2 ];\n\n // Otherwise, insert the intermediate dataType\n } else if ( converters[ conv2 ] !== true ) {\n current = tmp[ 0 ];\n dataTypes.unshift( tmp[ 1 ] );\n }\n break;\n }\n }\n }\n }\n\n // Apply converter (if not an equivalence)\n if ( conv !== true ) {\n\n // Unless errors are allowed to bubble, catch and return them\n if ( conv && s[ \"throws\" ] ) { // jscs:ignore requireDotNotation\n response = conv( response );\n } else {\n try {\n response = conv( response );\n } catch ( e ) {\n return {\n state: \"parsererror\",\n error: conv ? e : \"No conversion from \" + prev + \" to \" + current\n };\n }\n }\n }\n }\n }\n }\n\n return { state: \"success\", data: response };\n }", "function ajaxConvert(s, response, jqXHR, isSuccess) {\n var conv2, current, conv, tmp, prev,\n converters = {},\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice();\n\n // Create converters map with lowercased keys\n if (dataTypes[1]) {\n for (conv in s.converters) {\n converters[conv.toLowerCase()] = s.converters[conv];\n }\n }\n\n current = dataTypes.shift();\n\n // Convert to each sequential dataType\n while (current) {\n\n if (s.responseFields[current]) {\n jqXHR[s.responseFields[current]] = response;\n }\n\n // Apply the dataFilter if provided\n if (!prev && isSuccess && s.dataFilter) {\n response = s.dataFilter(response, s.dataType);\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if (current) {\n\n // There's only work to do if current dataType is non-auto\n if (current === \"*\") {\n\n current = prev;\n\n // Convert response if prev dataType is non-auto and differs from current\n } else if (prev !== \"*\" && prev !== current) {\n\n // Seek a direct converter\n conv = converters[prev + \" \" + current] || converters[\"* \" + current];\n\n // If none found, seek a pair\n if (!conv) {\n for (conv2 in converters) {\n\n // If conv2 outputs current\n tmp = conv2.split(\" \");\n if (tmp[1] === current) {\n\n // If prev can be converted to accepted input\n conv = converters[prev + \" \" + tmp[0]] ||\n converters[\"* \" + tmp[0]];\n if (conv) {\n // Condense equivalence converters\n if (conv === true) {\n conv = converters[conv2];\n\n // Otherwise, insert the intermediate dataType\n } else if (converters[conv2] !== true) {\n current = tmp[0];\n dataTypes.unshift(tmp[1]);\n }\n break;\n }\n }\n }\n }\n\n // Apply converter (if not an equivalence)\n if (conv !== true) {\n\n // Unless errors are allowed to bubble, catch and return them\n if (conv && s[\"throws\"]) {\n response = conv(response);\n } else {\n try {\n response = conv(response);\n } catch (e) {\n return {\n state: \"parsererror\",\n error: conv ? e : \"No conversion from \" + prev + \" to \" + current\n };\n }\n }\n }\n }\n }\n }\n\n return {\n state: \"success\",\n data: response\n };\n }", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n \tvar conv2, current, conv, tmp, prev,\n \t\tconverters = {},\n\n \t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n \t\tdataTypes = s.dataTypes.slice();\n\n \t// Create converters map with lowercased keys\n \tif ( dataTypes[ 1 ] ) {\n \t\tfor ( conv in s.converters ) {\n \t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n \t\t}\n \t}\n\n \tcurrent = dataTypes.shift();\n\n \t// Convert to each sequential dataType\n \twhile ( current ) {\n\n \t\tif ( s.responseFields[ current ] ) {\n \t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n \t\t}\n\n \t\t// Apply the dataFilter if provided\n \t\tif ( !prev && isSuccess && s.dataFilter ) {\n \t\t\tresponse = s.dataFilter( response, s.dataType );\n \t\t}\n\n \t\tprev = current;\n \t\tcurrent = dataTypes.shift();\n\n \t\tif ( current ) {\n\n \t\t\t// There's only work to do if current dataType is non-auto\n \t\t\tif ( current === \"*\" ) {\n\n \t\t\t\tcurrent = prev;\n\n \t\t\t// Convert response if prev dataType is non-auto and differs from current\n \t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n \t\t\t\t// Seek a direct converter\n \t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n \t\t\t\t// If none found, seek a pair\n \t\t\t\tif ( !conv ) {\n \t\t\t\t\tfor ( conv2 in converters ) {\n\n \t\t\t\t\t\t// If conv2 outputs current\n \t\t\t\t\t\ttmp = conv2.split( \" \" );\n \t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n \t\t\t\t\t\t\t// If prev can be converted to accepted input\n \t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n \t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n \t\t\t\t\t\t\tif ( conv ) {\n\n \t\t\t\t\t\t\t\t// Condense equivalence converters\n \t\t\t\t\t\t\t\tif ( conv === true ) {\n \t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n \t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n \t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n \t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n \t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\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\t}\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t}\n\n \t\t\t\t// Apply converter (if not an equivalence)\n \t\t\t\tif ( conv !== true ) {\n\n \t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n \t\t\t\t\tif ( conv && s.throws ) {\n \t\t\t\t\t\tresponse = conv( response );\n \t\t\t\t\t} else {\n \t\t\t\t\t\ttry {\n \t\t\t\t\t\t\tresponse = conv( response );\n \t\t\t\t\t\t} catch ( e ) {\n \t\t\t\t\t\t\treturn {\n \t\t\t\t\t\t\t\tstate: \"parsererror\",\n \t\t\t\t\t\t\t\terror: conv ? e : \"No conversion from \" + prev + \" to \" + current\n \t\t\t\t\t\t\t};\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}\n\n \treturn { state: \"success\", data: response };\n }", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\r\n\tvar conv2, current, conv, tmp, prev,\r\n\t\tconverters = {},\r\n\r\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\r\n\t\tdataTypes = s.dataTypes.slice();\r\n\r\n\t// Create converters map with lowercased keys\r\n\tif ( dataTypes[ 1 ] ) {\r\n\t\tfor ( conv in s.converters ) {\r\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\r\n\t\t}\r\n\t}\r\n\r\n\tcurrent = dataTypes.shift();\r\n\r\n\t// Convert to each sequential dataType\r\n\twhile ( current ) {\r\n\r\n\t\tif ( s.responseFields[ current ] ) {\r\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\r\n\t\t}\r\n\r\n\t\t// Apply the dataFilter if provided\r\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\r\n\t\t\tresponse = s.dataFilter( response, s.dataType );\r\n\t\t}\r\n\r\n\t\tprev = current;\r\n\t\tcurrent = dataTypes.shift();\r\n\r\n\t\tif ( current ) {\r\n\r\n\t\t\t// There's only work to do if current dataType is non-auto\r\n\t\t\tif ( current === \"*\" ) {\r\n\r\n\t\t\t\tcurrent = prev;\r\n\r\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\r\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\r\n\r\n\t\t\t\t// Seek a direct converter\r\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\r\n\r\n\t\t\t\t// If none found, seek a pair\r\n\t\t\t\tif ( !conv ) {\r\n\t\t\t\t\tfor ( conv2 in converters ) {\r\n\r\n\t\t\t\t\t\t// If conv2 outputs current\r\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\r\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\r\n\r\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\r\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\r\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\r\n\t\t\t\t\t\t\tif ( conv ) {\r\n\r\n\t\t\t\t\t\t\t\t// Condense equivalence converters\r\n\t\t\t\t\t\t\t\tif ( conv === true ) {\r\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\r\n\r\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\r\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\r\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\r\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\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}\r\n\r\n\t\t\t\t// Apply converter (if not an equivalence)\r\n\t\t\t\tif ( conv !== true ) {\r\n\r\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\r\n\t\t\t\t\tif ( conv && s.throws ) {\r\n\t\t\t\t\t\tresponse = conv( response );\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tresponse = conv( response );\r\n\t\t\t\t\t\t} catch ( e ) {\r\n\t\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\t\tstate: \"parsererror\",\r\n\t\t\t\t\t\t\t\terror: conv ? e : \"No conversion from \" + prev + \" to \" + current\r\n\t\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}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn { state: \"success\", data: response };\r\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\r\n\tvar conv2, current, conv, tmp, prev,\r\n\t\tconverters = {},\r\n\r\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\r\n\t\tdataTypes = s.dataTypes.slice();\r\n\r\n\t// Create converters map with lowercased keys\r\n\tif ( dataTypes[ 1 ] ) {\r\n\t\tfor ( conv in s.converters ) {\r\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\r\n\t\t}\r\n\t}\r\n\r\n\tcurrent = dataTypes.shift();\r\n\r\n\t// Convert to each sequential dataType\r\n\twhile ( current ) {\r\n\r\n\t\tif ( s.responseFields[ current ] ) {\r\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\r\n\t\t}\r\n\r\n\t\t// Apply the dataFilter if provided\r\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\r\n\t\t\tresponse = s.dataFilter( response, s.dataType );\r\n\t\t}\r\n\r\n\t\tprev = current;\r\n\t\tcurrent = dataTypes.shift();\r\n\r\n\t\tif ( current ) {\r\n\r\n\t\t// There's only work to do if current dataType is non-auto\r\n\t\t\tif ( current === \"*\" ) {\r\n\r\n\t\t\t\tcurrent = prev;\r\n\r\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\r\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\r\n\r\n\t\t\t\t// Seek a direct converter\r\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\r\n\r\n\t\t\t\t// If none found, seek a pair\r\n\t\t\t\tif ( !conv ) {\r\n\t\t\t\t\tfor ( conv2 in converters ) {\r\n\r\n\t\t\t\t\t\t// If conv2 outputs current\r\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\r\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\r\n\r\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\r\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\r\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\r\n\t\t\t\t\t\t\tif ( conv ) {\r\n\r\n\t\t\t\t\t\t\t\t// Condense equivalence converters\r\n\t\t\t\t\t\t\t\tif ( conv === true ) {\r\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\r\n\r\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\r\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\r\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\r\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\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}\r\n\r\n\t\t\t\t// Apply converter (if not an equivalence)\r\n\t\t\t\tif ( conv !== true ) {\r\n\r\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\r\n\t\t\t\t\tif ( conv && s.throws ) {\r\n\t\t\t\t\t\tresponse = conv( response );\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tresponse = conv( response );\r\n\t\t\t\t\t\t} catch ( e ) {\r\n\t\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\t\tstate: \"parsererror\",\r\n\t\t\t\t\t\t\t\terror: conv ? e : \"No conversion from \" + prev + \" to \" + current\r\n\t\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}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn { state: \"success\", data: response };\r\n}", "function ajaxConvert(s, response, jqXHR, isSuccess) {\n\t\tvar conv2,\n\t\t current,\n\t\t conv,\n\t\t tmp,\n\t\t prev,\n\t\t converters = {},\n\n\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t\t// Create converters map with lowercased keys\n\t\tif (dataTypes[1]) {\n\t\t\tfor (conv in s.converters) {\n\t\t\t\tconverters[conv.toLowerCase()] = s.converters[conv];\n\t\t\t}\n\t\t}\n\n\t\tcurrent = dataTypes.shift();\n\n\t\t// Convert to each sequential dataType\n\t\twhile (current) {\n\n\t\t\tif (s.responseFields[current]) {\n\t\t\t\tjqXHR[s.responseFields[current]] = response;\n\t\t\t}\n\n\t\t\t// Apply the dataFilter if provided\n\t\t\tif (!prev && isSuccess && s.dataFilter) {\n\t\t\t\tresponse = s.dataFilter(response, s.dataType);\n\t\t\t}\n\n\t\t\tprev = current;\n\t\t\tcurrent = dataTypes.shift();\n\n\t\t\tif (current) {\n\n\t\t\t\t// There's only work to do if current dataType is non-auto\n\t\t\t\tif (current === \"*\") {\n\n\t\t\t\t\tcurrent = prev;\n\n\t\t\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t\t} else if (prev !== \"*\" && prev !== current) {\n\n\t\t\t\t\t// Seek a direct converter\n\t\t\t\t\tconv = converters[prev + \" \" + current] || converters[\"* \" + current];\n\n\t\t\t\t\t// If none found, seek a pair\n\t\t\t\t\tif (!conv) {\n\t\t\t\t\t\tfor (conv2 in converters) {\n\n\t\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\t\ttmp = conv2.split(\" \");\n\t\t\t\t\t\t\tif (tmp[1] === current) {\n\n\t\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\t\tconv = converters[prev + \" \" + tmp[0]] || converters[\"* \" + tmp[0]];\n\t\t\t\t\t\t\t\tif (conv) {\n\n\t\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\t\tif (conv === true) {\n\t\t\t\t\t\t\t\t\t\tconv = converters[conv2];\n\n\t\t\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t\t} else if (converters[conv2] !== true) {\n\t\t\t\t\t\t\t\t\t\tcurrent = tmp[0];\n\t\t\t\t\t\t\t\t\t\tdataTypes.unshift(tmp[1]);\n\t\t\t\t\t\t\t\t\t}\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}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\t\tif (conv !== true) {\n\n\t\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\t\tif (conv && s.throws) {\n\t\t\t\t\t\t\tresponse = conv(response);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tresponse = conv(response);\n\t\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\tstate: \"parsererror\",\n\t\t\t\t\t\t\t\t\terror: conv ? e : \"No conversion from \" + prev + \" to \" + current\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}\n\t\t\t}\n\t\t}\n\n\t\treturn { state: \"success\", data: response };\n\t}", "function ajaxConvert(s, response, jqXHR, isSuccess) {\n\t\tvar conv2,\n\t\t current,\n\t\t conv,\n\t\t tmp,\n\t\t prev,\n\t\t converters = {},\n\n\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t\t// Create converters map with lowercased keys\n\t\tif (dataTypes[1]) {\n\t\t\tfor (conv in s.converters) {\n\t\t\t\tconverters[conv.toLowerCase()] = s.converters[conv];\n\t\t\t}\n\t\t}\n\n\t\tcurrent = dataTypes.shift();\n\n\t\t// Convert to each sequential dataType\n\t\twhile (current) {\n\n\t\t\tif (s.responseFields[current]) {\n\t\t\t\tjqXHR[s.responseFields[current]] = response;\n\t\t\t}\n\n\t\t\t// Apply the dataFilter if provided\n\t\t\tif (!prev && isSuccess && s.dataFilter) {\n\t\t\t\tresponse = s.dataFilter(response, s.dataType);\n\t\t\t}\n\n\t\t\tprev = current;\n\t\t\tcurrent = dataTypes.shift();\n\n\t\t\tif (current) {\n\n\t\t\t\t// There's only work to do if current dataType is non-auto\n\t\t\t\tif (current === \"*\") {\n\n\t\t\t\t\tcurrent = prev;\n\n\t\t\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t\t} else if (prev !== \"*\" && prev !== current) {\n\n\t\t\t\t\t// Seek a direct converter\n\t\t\t\t\tconv = converters[prev + \" \" + current] || converters[\"* \" + current];\n\n\t\t\t\t\t// If none found, seek a pair\n\t\t\t\t\tif (!conv) {\n\t\t\t\t\t\tfor (conv2 in converters) {\n\n\t\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\t\ttmp = conv2.split(\" \");\n\t\t\t\t\t\t\tif (tmp[1] === current) {\n\n\t\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\t\tconv = converters[prev + \" \" + tmp[0]] || converters[\"* \" + tmp[0]];\n\t\t\t\t\t\t\t\tif (conv) {\n\n\t\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\t\tif (conv === true) {\n\t\t\t\t\t\t\t\t\t\tconv = converters[conv2];\n\n\t\t\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t\t} else if (converters[conv2] !== true) {\n\t\t\t\t\t\t\t\t\t\tcurrent = tmp[0];\n\t\t\t\t\t\t\t\t\t\tdataTypes.unshift(tmp[1]);\n\t\t\t\t\t\t\t\t\t}\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}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\t\tif (conv !== true) {\n\n\t\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\t\tif (conv && s.throws) {\n\t\t\t\t\t\t\tresponse = conv(response);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tresponse = conv(response);\n\t\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\tstate: \"parsererror\",\n\t\t\t\t\t\t\t\t\terror: conv ? e : \"No conversion from \" + prev + \" to \" + current\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}\n\t\t\t}\n\t\t}\n\n\t\treturn { state: \"success\", data: response };\n\t}", "function ajaxConvert(s, response, jqXHR, isSuccess) {\n\t\tvar conv2,\n\t\t current,\n\t\t conv,\n\t\t tmp,\n\t\t prev,\n\t\t converters = {},\n\n\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t\t// Create converters map with lowercased keys\n\t\tif (dataTypes[1]) {\n\t\t\tfor (conv in s.converters) {\n\t\t\t\tconverters[conv.toLowerCase()] = s.converters[conv];\n\t\t\t}\n\t\t}\n\n\t\tcurrent = dataTypes.shift();\n\n\t\t// Convert to each sequential dataType\n\t\twhile (current) {\n\n\t\t\tif (s.responseFields[current]) {\n\t\t\t\tjqXHR[s.responseFields[current]] = response;\n\t\t\t}\n\n\t\t\t// Apply the dataFilter if provided\n\t\t\tif (!prev && isSuccess && s.dataFilter) {\n\t\t\t\tresponse = s.dataFilter(response, s.dataType);\n\t\t\t}\n\n\t\t\tprev = current;\n\t\t\tcurrent = dataTypes.shift();\n\n\t\t\tif (current) {\n\n\t\t\t\t// There's only work to do if current dataType is non-auto\n\t\t\t\tif (current === \"*\") {\n\n\t\t\t\t\tcurrent = prev;\n\n\t\t\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t\t} else if (prev !== \"*\" && prev !== current) {\n\n\t\t\t\t\t// Seek a direct converter\n\t\t\t\t\tconv = converters[prev + \" \" + current] || converters[\"* \" + current];\n\n\t\t\t\t\t// If none found, seek a pair\n\t\t\t\t\tif (!conv) {\n\t\t\t\t\t\tfor (conv2 in converters) {\n\n\t\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\t\ttmp = conv2.split(\" \");\n\t\t\t\t\t\t\tif (tmp[1] === current) {\n\n\t\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\t\tconv = converters[prev + \" \" + tmp[0]] || converters[\"* \" + tmp[0]];\n\t\t\t\t\t\t\t\tif (conv) {\n\n\t\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\t\tif (conv === true) {\n\t\t\t\t\t\t\t\t\t\tconv = converters[conv2];\n\n\t\t\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t\t} else if (converters[conv2] !== true) {\n\t\t\t\t\t\t\t\t\t\tcurrent = tmp[0];\n\t\t\t\t\t\t\t\t\t\tdataTypes.unshift(tmp[1]);\n\t\t\t\t\t\t\t\t\t}\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}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\t\tif (conv !== true) {\n\n\t\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\t\tif (conv && s.throws) {\n\t\t\t\t\t\t\tresponse = conv(response);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tresponse = conv(response);\n\t\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\tstate: \"parsererror\",\n\t\t\t\t\t\t\t\t\terror: conv ? e : \"No conversion from \" + prev + \" to \" + current\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}\n\t\t\t}\n\t\t}\n\n\t\treturn { state: \"success\", data: response };\n\t}", "function ajaxConvert(s, response, jqXHR, isSuccess) {\n\t\tvar conv2,\n\t\t current,\n\t\t conv,\n\t\t tmp,\n\t\t prev,\n\t\t converters = {},\n\n\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t\t// Create converters map with lowercased keys\n\t\tif (dataTypes[1]) {\n\t\t\tfor (conv in s.converters) {\n\t\t\t\tconverters[conv.toLowerCase()] = s.converters[conv];\n\t\t\t}\n\t\t}\n\n\t\tcurrent = dataTypes.shift();\n\n\t\t// Convert to each sequential dataType\n\t\twhile (current) {\n\n\t\t\tif (s.responseFields[current]) {\n\t\t\t\tjqXHR[s.responseFields[current]] = response;\n\t\t\t}\n\n\t\t\t// Apply the dataFilter if provided\n\t\t\tif (!prev && isSuccess && s.dataFilter) {\n\t\t\t\tresponse = s.dataFilter(response, s.dataType);\n\t\t\t}\n\n\t\t\tprev = current;\n\t\t\tcurrent = dataTypes.shift();\n\n\t\t\tif (current) {\n\n\t\t\t\t// There's only work to do if current dataType is non-auto\n\t\t\t\tif (current === \"*\") {\n\n\t\t\t\t\tcurrent = prev;\n\n\t\t\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t\t} else if (prev !== \"*\" && prev !== current) {\n\n\t\t\t\t\t// Seek a direct converter\n\t\t\t\t\tconv = converters[prev + \" \" + current] || converters[\"* \" + current];\n\n\t\t\t\t\t// If none found, seek a pair\n\t\t\t\t\tif (!conv) {\n\t\t\t\t\t\tfor (conv2 in converters) {\n\n\t\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\t\ttmp = conv2.split(\" \");\n\t\t\t\t\t\t\tif (tmp[1] === current) {\n\n\t\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\t\tconv = converters[prev + \" \" + tmp[0]] || converters[\"* \" + tmp[0]];\n\t\t\t\t\t\t\t\tif (conv) {\n\n\t\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\t\tif (conv === true) {\n\t\t\t\t\t\t\t\t\t\tconv = converters[conv2];\n\n\t\t\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t\t} else if (converters[conv2] !== true) {\n\t\t\t\t\t\t\t\t\t\tcurrent = tmp[0];\n\t\t\t\t\t\t\t\t\t\tdataTypes.unshift(tmp[1]);\n\t\t\t\t\t\t\t\t\t}\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}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\t\tif (conv !== true) {\n\n\t\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\t\tif (conv && s[\"throws\"]) {\n\t\t\t\t\t\t\t// jscs:ignore requireDotNotation\n\t\t\t\t\t\t\tresponse = conv(response);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tresponse = conv(response);\n\t\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\tstate: \"parsererror\",\n\t\t\t\t\t\t\t\t\terror: conv ? e : \"No conversion from \" + prev + \" to \" + current\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}\n\t\t\t}\n\t\t}\n\n\t\treturn { state: \"success\", data: response };\n\t}", "function ajaxConvert(s, response, jqXHR, isSuccess) {\r\n\t\tvar conv2, current, conv, tmp, prev,\r\n\t\t\tconverters = {},\r\n\r\n\t\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\r\n\t\t\tdataTypes = s.dataTypes.slice();\r\n\r\n\t\t// Create converters map with lowercased keys\r\n\t\tif (dataTypes[1]) {\r\n\t\t\tfor (conv in s.converters) {\r\n\t\t\t\tconverters[conv.toLowerCase()] = s.converters[conv];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tcurrent = dataTypes.shift();\r\n\r\n\t\t// Convert to each sequential dataType\r\n\t\twhile (current) {\r\n\r\n\t\t\tif (s.responseFields[current]) {\r\n\t\t\t\tjqXHR[s.responseFields[current]] = response;\r\n\t\t\t}\r\n\r\n\t\t\t// Apply the dataFilter if provided\r\n\t\t\tif (!prev && isSuccess && s.dataFilter) {\r\n\t\t\t\tresponse = s.dataFilter(response, s.dataType);\r\n\t\t\t}\r\n\r\n\t\t\tprev = current;\r\n\t\t\tcurrent = dataTypes.shift();\r\n\r\n\t\t\tif (current) {\r\n\r\n\t\t\t\t// There's only work to do if current dataType is non-auto\r\n\t\t\t\tif (current === \"*\") {\r\n\r\n\t\t\t\t\tcurrent = prev;\r\n\r\n\t\t\t\t\t// Convert response if prev dataType is non-auto and differs from current\r\n\t\t\t\t} else if (prev !== \"*\" && prev !== current) {\r\n\r\n\t\t\t\t\t// Seek a direct converter\r\n\t\t\t\t\tconv = converters[prev + \" \" + current] || converters[\"* \" + current];\r\n\r\n\t\t\t\t\t// If none found, seek a pair\r\n\t\t\t\t\tif (!conv) {\r\n\t\t\t\t\t\tfor (conv2 in converters) {\r\n\r\n\t\t\t\t\t\t\t// If conv2 outputs current\r\n\t\t\t\t\t\t\ttmp = conv2.split(\" \");\r\n\t\t\t\t\t\t\tif (tmp[1] === current) {\r\n\r\n\t\t\t\t\t\t\t\t// If prev can be converted to accepted input\r\n\t\t\t\t\t\t\t\tconv = converters[prev + \" \" + tmp[0]] ||\r\n\t\t\t\t\t\t\t\t\tconverters[\"* \" + tmp[0]];\r\n\t\t\t\t\t\t\t\tif (conv) {\r\n\r\n\t\t\t\t\t\t\t\t\t// Condense equivalence converters\r\n\t\t\t\t\t\t\t\t\tif (conv === true) {\r\n\t\t\t\t\t\t\t\t\t\tconv = converters[conv2];\r\n\r\n\t\t\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\r\n\t\t\t\t\t\t\t\t\t} else if (converters[conv2] !== true) {\r\n\t\t\t\t\t\t\t\t\t\tcurrent = tmp[0];\r\n\t\t\t\t\t\t\t\t\t\tdataTypes.unshift(tmp[1]);\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\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}\r\n\r\n\t\t\t\t\t// Apply converter (if not an equivalence)\r\n\t\t\t\t\tif (conv !== true) {\r\n\r\n\t\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\r\n\t\t\t\t\t\tif (conv && s[\"throws\"]) { // jscs:ignore requireDotNotation\r\n\t\t\t\t\t\t\tresponse = conv(response);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tresponse = conv(response);\r\n\t\t\t\t\t\t\t} catch (e) {\r\n\t\t\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\t\t\tstate: \"parsererror\",\r\n\t\t\t\t\t\t\t\t\terror: conv ? e : \"No conversion from \" + prev + \" to \" + current\r\n\t\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}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn { state: \"success\", data: response };\r\n\t}", "function ajaxConvert(s, response, jqXHR, isSuccess) {\n\t\tvar conv2,\n\t\t current,\n\t\t conv,\n\t\t tmp,\n\t\t prev,\n\t\t converters = {},\n\n\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t\t// Create converters map with lowercased keys\n\t\tif (dataTypes[1]) {\n\t\t\tfor (conv in s.converters) {\n\t\t\t\tconverters[conv.toLowerCase()] = s.converters[conv];\n\t\t\t}\n\t\t}\n\n\t\tcurrent = dataTypes.shift();\n\n\t\t// Convert to each sequential dataType\n\t\twhile (current) {\n\n\t\t\tif (s.responseFields[current]) {\n\t\t\t\tjqXHR[s.responseFields[current]] = response;\n\t\t\t}\n\n\t\t\t// Apply the dataFilter if provided\n\t\t\tif (!prev && isSuccess && s.dataFilter) {\n\t\t\t\tresponse = s.dataFilter(response, s.dataType);\n\t\t\t}\n\n\t\t\tprev = current;\n\t\t\tcurrent = dataTypes.shift();\n\n\t\t\tif (current) {\n\n\t\t\t\t// There's only work to do if current dataType is non-auto\n\t\t\t\tif (current === \"*\") {\n\n\t\t\t\t\tcurrent = prev;\n\n\t\t\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t\t} else if (prev !== \"*\" && prev !== current) {\n\n\t\t\t\t\t\t// Seek a direct converter\n\t\t\t\t\t\tconv = converters[prev + \" \" + current] || converters[\"* \" + current];\n\n\t\t\t\t\t\t// If none found, seek a pair\n\t\t\t\t\t\tif (!conv) {\n\t\t\t\t\t\t\tfor (conv2 in converters) {\n\n\t\t\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\t\t\ttmp = conv2.split(\" \");\n\t\t\t\t\t\t\t\tif (tmp[1] === current) {\n\n\t\t\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\t\t\tconv = converters[prev + \" \" + tmp[0]] || converters[\"* \" + tmp[0]];\n\t\t\t\t\t\t\t\t\tif (conv) {\n\n\t\t\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\t\t\tif (conv === true) {\n\t\t\t\t\t\t\t\t\t\t\tconv = converters[conv2];\n\n\t\t\t\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t\t\t} else if (converters[conv2] !== true) {\n\t\t\t\t\t\t\t\t\t\t\t\tcurrent = tmp[0];\n\t\t\t\t\t\t\t\t\t\t\t\tdataTypes.unshift(tmp[1]);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\t\t\tif (conv !== true) {\n\n\t\t\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\t\t\tif (conv && s.throws) {\n\t\t\t\t\t\t\t\tresponse = conv(response);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tresponse = conv(response);\n\t\t\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\t\tstate: \"parsererror\",\n\t\t\t\t\t\t\t\t\t\terror: conv ? e : \"No conversion from \" + prev + \" to \" + current\n\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn { state: \"success\", data: response };\n\t}", "function done( status, statusText, responses, headers ) {\n\n\t\t\t// Called once\n\t\t\tif ( state === 2 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// State is \"done\" now\n\t\t\tstate = 2;\n\n\t\t\t// Clear timeout if it exists\n\t\t\tif ( timeoutTimer ) {\n\t\t\t\tclearTimeout( timeoutTimer );\n\t\t\t}\n\n\t\t\t// Dereference transport for early garbage collection\n\t\t\t// (no matter how long the jqXHR object will be used)\n\t\t\ttransport = undefined;\n\n\t\t\t// Cache response headers\n\t\t\tresponseHeadersString = headers || \"\";\n\n\t\t\t// Set readyState\n\t\t\tjqXHR.readyState = status ? 4 : 0;\n\n\t\t\tvar isSuccess,\n\t\t\t\tsuccess,\n\t\t\t\terror,\n\t\t\t\tresponse = responses ? ajaxHandleResponses( s, jqXHR, responses ) : undefined,\n\t\t\t\tlastModified,\n\t\t\t\tetag;\n\n\t\t\t// If successful, handle type chaining\n\t\t\tif ( status >= 200 && status < 300 || status === 304 ) {\n\n\t\t\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\t\t\tif ( s.ifModified ) {\n\n\t\t\t\t\tif ( ( lastModified = jqXHR.getResponseHeader( \"Last-Modified\" ) ) ) {\n\t\t\t\t\t\tjQuery.lastModified[ ifModifiedKey ] = lastModified;\n\t\t\t\t\t}\n\t\t\t\t\tif ( ( etag = jqXHR.getResponseHeader( \"Etag\" ) ) ) {\n\t\t\t\t\t\tjQuery.etag[ ifModifiedKey ] = etag;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// If not modified\n\t\t\t\tif ( status === 304 ) {\n\n\t\t\t\t\tstatusText = \"notmodified\";\n\t\t\t\t\tisSuccess = true;\n\n\t\t\t\t// If we have data\n\t\t\t\t} else {\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tsuccess = ajaxConvert( s, response );\n\t\t\t\t\t\tstatusText = \"success\";\n\t\t\t\t\t\tisSuccess = true;\n\t\t\t\t\t} catch(e) {\n\t\t\t\t\t\t// We have a parsererror\n\t\t\t\t\t\tstatusText = \"parsererror\";\n\t\t\t\t\t\terror = e;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// We extract error from statusText\n\t\t\t\t// then normalize statusText and status for non-aborts\n\t\t\t\terror = statusText;\n\t\t\t\tif( !statusText || status ) {\n\t\t\t\t\tstatusText = \"error\";\n\t\t\t\t\tif ( status < 0 ) {\n\t\t\t\t\t\tstatus = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set data for the fake xhr object\n\t\t\tjqXHR.status = status;\n\t\t\tjqXHR.statusText = statusText;\n\n\t\t\t// Success/Error\n\t\t\tif ( isSuccess ) {\n\t\t\t\tdeferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );\n\t\t\t} else {\n\t\t\t\tdeferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );\n\t\t\t}\n\n\t\t\t// Status-dependent callbacks\n\t\t\tjqXHR.statusCode( statusCode );\n\t\t\tstatusCode = undefined;\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajax\" + ( isSuccess ? \"Success\" : \"Error\" ),\n\t\t\t\t\t\t[ jqXHR, s, isSuccess ? success : error ] );\n\t\t\t}\n\n\t\t\t// Complete\n\t\t\tcompleteDeferred.resolveWith( callbackContext, [ jqXHR, statusText ] );\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxComplete\", [ jqXHR, s] );\n\t\t\t\t// Handle the global AJAX counter\n\t\t\t\tif ( !( --jQuery.active ) ) {\n\t\t\t\t\tjQuery.event.trigger( \"ajaxStop\" );\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function done( status, statusText, responses, headers ) {\n\n\t\t\t// Called once\n\t\t\tif ( state === 2 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// State is \"done\" now\n\t\t\tstate = 2;\n\n\t\t\t// Clear timeout if it exists\n\t\t\tif ( timeoutTimer ) {\n\t\t\t\tclearTimeout( timeoutTimer );\n\t\t\t}\n\n\t\t\t// Dereference transport for early garbage collection\n\t\t\t// (no matter how long the jqXHR object will be used)\n\t\t\ttransport = undefined;\n\n\t\t\t// Cache response headers\n\t\t\tresponseHeadersString = headers || \"\";\n\n\t\t\t// Set readyState\n\t\t\tjqXHR.readyState = status ? 4 : 0;\n\n\t\t\tvar isSuccess,\n\t\t\t\tsuccess,\n\t\t\t\terror,\n\t\t\t\tresponse = responses ? ajaxHandleResponses( s, jqXHR, responses ) : undefined,\n\t\t\t\tlastModified,\n\t\t\t\tetag;\n\n\t\t\t// If successful, handle type chaining\n\t\t\tif ( status >= 200 && status < 300 || status === 304 ) {\n\n\t\t\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\t\t\tif ( s.ifModified ) {\n\n\t\t\t\t\tif ( ( lastModified = jqXHR.getResponseHeader( \"Last-Modified\" ) ) ) {\n\t\t\t\t\t\tjQuery.lastModified[ ifModifiedKey ] = lastModified;\n\t\t\t\t\t}\n\t\t\t\t\tif ( ( etag = jqXHR.getResponseHeader( \"Etag\" ) ) ) {\n\t\t\t\t\t\tjQuery.etag[ ifModifiedKey ] = etag;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// If not modified\n\t\t\t\tif ( status === 304 ) {\n\n\t\t\t\t\tstatusText = \"notmodified\";\n\t\t\t\t\tisSuccess = true;\n\n\t\t\t\t// If we have data\n\t\t\t\t} else {\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tsuccess = ajaxConvert( s, response );\n\t\t\t\t\t\tstatusText = \"success\";\n\t\t\t\t\t\tisSuccess = true;\n\t\t\t\t\t} catch(e) {\n\t\t\t\t\t\t// We have a parsererror\n\t\t\t\t\t\tstatusText = \"parsererror\";\n\t\t\t\t\t\terror = e;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// We extract error from statusText\n\t\t\t\t// then normalize statusText and status for non-aborts\n\t\t\t\terror = statusText;\n\t\t\t\tif( !statusText || status ) {\n\t\t\t\t\tstatusText = \"error\";\n\t\t\t\t\tif ( status < 0 ) {\n\t\t\t\t\t\tstatus = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set data for the fake xhr object\n\t\t\tjqXHR.status = status;\n\t\t\tjqXHR.statusText = statusText;\n\n\t\t\t// Success/Error\n\t\t\tif ( isSuccess ) {\n\t\t\t\tdeferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );\n\t\t\t} else {\n\t\t\t\tdeferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );\n\t\t\t}\n\n\t\t\t// Status-dependent callbacks\n\t\t\tjqXHR.statusCode( statusCode );\n\t\t\tstatusCode = undefined;\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajax\" + ( isSuccess ? \"Success\" : \"Error\" ),\n\t\t\t\t\t\t[ jqXHR, s, isSuccess ? success : error ] );\n\t\t\t}\n\n\t\t\t// Complete\n\t\t\tcompleteDeferred.resolveWith( callbackContext, [ jqXHR, statusText ] );\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxComplete\", [ jqXHR, s] );\n\t\t\t\t// Handle the global AJAX counter\n\t\t\t\tif ( !( --jQuery.active ) ) {\n\t\t\t\t\tjQuery.event.trigger( \"ajaxStop\" );\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function done(status, nativeStatusText, responses, headers) {\n var isSuccess, success, error, response, modified,\n statusText = nativeStatusText;\n\n // Called once\n if (state === 2) {\n return;\n }\n\n // State is \"done\" now\n state = 2;\n\n // Clear timeout if it exists\n if (timeoutTimer) {\n clearTimeout(timeoutTimer);\n }\n\n // Dereference transport for early garbage collection\n // (no matter how long the jqXHR object will be used)\n transport = undefined;\n\n // Cache response headers\n responseHeadersString = headers || \"\";\n\n // Set readyState\n jqXHR.readyState = status > 0 ? 4 : 0;\n\n // Determine if successful\n isSuccess = status >= 200 && status < 300 || status === 304;\n\n // Get response data\n if (responses) {\n response = ajaxHandleResponses(s, jqXHR, responses);\n }\n\n // Convert no matter what (that way responseXXX fields are always set)\n response = ajaxConvert(s, response, jqXHR, isSuccess);\n\n // If successful, handle type chaining\n if (isSuccess) {\n\n // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n if (s.ifModified) {\n modified = jqXHR.getResponseHeader(\"Last-Modified\");\n if (modified) {\n jQuery.lastModified[ cacheURL ] = modified;\n }\n modified = jqXHR.getResponseHeader(\"etag\");\n if (modified) {\n jQuery.etag[ cacheURL ] = modified;\n }\n }\n\n // if no content\n if (status === 204 || s.type === \"HEAD\") {\n statusText = \"nocontent\";\n\n // if not modified\n } else if (status === 304) {\n statusText = \"notmodified\";\n\n // If we have data, let's convert it\n } else {\n statusText = response.state;\n success = response.data;\n error = response.error;\n isSuccess = !error;\n }\n } else {\n // We extract error from statusText\n // then normalize statusText and status for non-aborts\n error = statusText;\n if (status || !statusText) {\n statusText = \"error\";\n if (status < 0) {\n status = 0;\n }\n }\n }\n\n // Set data for the fake xhr object\n jqXHR.status = status;\n jqXHR.statusText = (nativeStatusText || statusText) + \"\";\n\n // Success/Error\n if (isSuccess) {\n deferred.resolveWith(callbackContext, [success, statusText, jqXHR]);\n } else {\n deferred.rejectWith(callbackContext, [jqXHR, statusText, error]);\n }\n\n // Status-dependent callbacks\n jqXHR.statusCode(statusCode);\n statusCode = undefined;\n\n if (fireGlobals) {\n globalEventContext.trigger(isSuccess ? \"ajaxSuccess\" : \"ajaxError\",\n [jqXHR, s, isSuccess ? success : error]);\n }\n\n // Complete\n completeDeferred.fireWith(callbackContext, [jqXHR, statusText]);\n\n if (fireGlobals) {\n globalEventContext.trigger(\"ajaxComplete\", [jqXHR, s]);\n // Handle the global AJAX counter\n if (!(--jQuery.active)) {\n jQuery.event.trigger(\"ajaxStop\");\n }\n }\n }", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\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\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\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\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\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\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\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\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\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\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\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\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\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\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\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\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\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\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\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\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\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\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\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\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\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\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\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\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\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\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\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\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\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\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\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\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\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\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\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\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\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\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\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\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\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\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\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\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\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\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\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\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\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\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\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\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\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\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\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\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\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\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\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\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\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\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\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\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\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\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\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\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\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\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\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\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\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\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\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\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\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\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\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\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\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\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\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\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\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\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\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\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\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\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\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\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\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\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\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\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}" ]
[ "0.62697154", "0.62630993", "0.6203375", "0.6193772", "0.6193154", "0.6177705", "0.6177705", "0.6174955", "0.61516523", "0.60946137", "0.6089439", "0.6086175", "0.6086175", "0.6086175", "0.6086175", "0.6086175", "0.60740083", "0.60740083", "0.60740083", "0.60494006", "0.60179794", "0.60177964", "0.6012095", "0.5984489", "0.5982954", "0.59819955", "0.5976497", "0.59712416", "0.5967986", "0.5967986", "0.5967986", "0.59656835", "0.59629375", "0.59629375", "0.59629375", "0.5957023", "0.5957023", "0.5952732", "0.5938568", "0.5836934", "0.57509893", "0.57499564", "0.57364357", "0.57364357", "0.57364357", "0.57364357", "0.57234216", "0.5717095", "0.5705808", "0.5705808", "0.57012147", "0.5693499", "0.5693499", "0.5693499", "0.5693499", "0.5693499", "0.5693499", "0.5693499", "0.5693499", "0.5693499", "0.5693499", "0.5693499", "0.5693499", "0.5693499", "0.5693499", "0.5693499", "0.5693499", "0.5693499", "0.5693499", "0.5693499", "0.5693499", "0.5693499", "0.5693499", "0.5693499", "0.5693499", "0.5693499", "0.5693499", "0.5693499", "0.5693499", "0.5693499", "0.5693499", "0.5693499", "0.5693499", "0.5693499", "0.5693499", "0.5693499", "0.5693499", "0.5693499", "0.5693499", "0.5693499", "0.5693499", "0.5693499", "0.5693499", "0.5693499", "0.5693499", "0.5693499", "0.5693499", "0.5693499", "0.5693499", "0.5693499", "0.5693499" ]
0.0
-1
Callback for when everything is done
function done( status, nativeStatusText, responses, headers ) { var isSuccess, success, error, response, modified, statusText = nativeStatusText; // Ignore repeat invocations if ( completed ) { return; } completed = true; // Clear timeout if it exists if ( timeoutTimer ) { window.clearTimeout( timeoutTimer ); } // Dereference transport for early garbage collection // (no matter how long the jqXHR object will be used) transport = undefined; // Cache response headers responseHeadersString = headers || ""; // Set readyState jqXHR.readyState = status > 0 ? 4 : 0; // Determine if successful isSuccess = status >= 200 && status < 300 || status === 304; // Get response data if ( responses ) { response = ajaxHandleResponses( s, jqXHR, responses ); } // Use a noop converter for missing script but not if jsonp if ( !isSuccess && jQuery.inArray( "script", s.dataTypes ) > -1 && jQuery.inArray( "json", s.dataTypes ) < 0 ) { s.converters[ "text script" ] = function() {}; } // Convert no matter what (that way responseXXX fields are always set) response = ajaxConvert( s, response, jqXHR, isSuccess ); // If successful, handle type chaining if ( isSuccess ) { // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. if ( s.ifModified ) { modified = jqXHR.getResponseHeader( "Last-Modified" ); if ( modified ) { jQuery.lastModified[ cacheURL ] = modified; } modified = jqXHR.getResponseHeader( "etag" ); if ( modified ) { jQuery.etag[ cacheURL ] = modified; } } // if no content if ( status === 204 || s.type === "HEAD" ) { statusText = "nocontent"; // if not modified } else if ( status === 304 ) { statusText = "notmodified"; // If we have data, let's convert it } else { statusText = response.state; success = response.data; error = response.error; isSuccess = !error; } } else { // Extract error from statusText and normalize for non-aborts error = statusText; if ( status || !statusText ) { statusText = "error"; if ( status < 0 ) { status = 0; } } } // Set data for the fake xhr object jqXHR.status = status; jqXHR.statusText = ( nativeStatusText || statusText ) + ""; // Success/Error if ( isSuccess ) { deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); } else { deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); } // Status-dependent callbacks jqXHR.statusCode( statusCode ); statusCode = undefined; if ( fireGlobals ) { globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError", [ jqXHR, s, isSuccess ? success : error ] ); } // Complete completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); if ( fireGlobals ) { globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); // Handle the global AJAX counter if ( !( --jQuery.active ) ) { jQuery.event.trigger( "ajaxStop" ); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function done() {}", "function finished(err){\n }", "onFinish() {}", "function AllDone(){\n \n}", "async onFinished() {}", "done() {}", "_onEnd() {}", "done () {}", "complete() {}", "function onFinish() {\n console.log('finished!');\n}", "function complete(){\r\n callbackCount++;\r\n if(callbackCount >= 3){\t\t\t\t//CHANGE IF FUNCTIONS BEING CALLED CHANGES!!\r\n res.render('search_topic', context);\r\n }\r\n\r\n }", "function allDone() {\n pub.stop();\n console.info('Alle Tests beendet.');\n console.info(app.persistence.getResults());\n $(document).trigger('testQueueDone');\n }", "function complete() {\n Y.log('complete');\n }", "function complete() {\n Y.log('complete');\n }", "function complete() {\n Y.log('complete');\n }", "function complete() {\n Y.log('complete');\n }", "function completelyDone() {\n _rdbConn.close();\n console.log(\"ALL DONE\");\n}", "function doDone() {\r\n // in FF this is empty.\r\n\r\n }", "function doDone() {\r\n // in FF this is empty.\r\n\r\n }", "function complete() {\n Y.log('complete');\n }", "function uploadCompleteHandler() {\n console.log(\"Upload finished.\");\n getAllFiles();\n /*\n Do what you like here.\n */\n}", "function finish(){\n if( settings.onFinish ) {\n settings.onFinish( data );\n }\n }", "function complete() {\n\t\t\tcallbackCount++;\n\t\t\tif(callbackCount >= 1) {\n\t\t\t\t//console.log(context);\n\t\t\t\tres.render('UpdateCoach', context);\n\t\t\t}\n\t\t}", "function onCompletion(err) {\n if (err) { return console.error(err);}\n else { console.log(\"All done.\") }\n}", "function callbackDone() {\n module.presentation.set('contents', module.contents);\n module.callback(module.command);\n }", "completed(data) {}", "function allDone(){\n\t\tinitCalculator(currenciesData,feesData,userData);\n\t}", "function all_done() {\n console.log('\\n------------------------------------------ All Done ------------------------------------------\\n');\n broadcast_state('registered_owners');\n process.env.app_first_setup = 'no';\n\n logger.debug('hash is', helper.getHash());\n helper.write({ hash: helper.getHash() });\t\t\t\t\t\t\t//write state file so we know we started before\n ws_server.check_for_updates(null);\t\t\t\t\t\t\t\t//call the periodic task to get the state of everything\n}", "function done() {\n\tupdateProgressById(\"uploadProgress\", 95)\n\n\t// console.log('finished');\n}", "function complete() {\n\tconsole.log('Completed');\n}", "function callback() {}", "function callback() {}", "function callback() {}", "function callback() {}", "function callback() {}", "function complete(){\r\n console.log(context.pokemon);\r\n callbackCount++;\r\n if(callbackCount >= 1){\r\n res.render('update-discord', context);\r\n }\r\n\r\n }", "function callback(){}", "function checkDone() {\r\n\t\t\tif (todo===0) {\r\n\t\t\t\tresultCallback(unmarshalledTable);\r\n\t\t\t}\r\n\t\t}", "function onAllFinished() {\n //we're finished crawling so we set the endtime to the current time and still crawling to false\n endTime = new Date().getTime();\n stillCrawling = false;\n //clear the console for final output since stillCrawling is now false reportCrawling will not write again\n console.clear();\n //output how many urls wer crawld and how long it took\n console.log(`Finished crawling ${crawler.crawledUrls.length} urls in ${(endTime - startTime) / 1000} seconds\\n`);\n //if pages have been added to errorPages we will print them\n if (errorPages.length > 0) {\n console.log('The Following Pages Had Errors:');\n printErrors();\n } \n //else we congratulate the user\n else {\n console.log('Congratulations There Were No Errors!');\n }\n}", "_done() {\n this.worker = this.task = -1;\n this.callbacks = []; this.callback = 0;\n }", "function onProcessFinal() {\n chai_1.expect(loopResult, 'LoopResult should contain 10').to.contain(10);\n chai_1.expect(loopResult, 'LoopResult should contain 5').to.contain(5);\n chai_1.expect(loopResult, 'LoopResult should contain 1').to.contain(1);\n done();\n }", "function done() {\n self._server = null;\n\n if (callback) {\n callback.apply(null, arguments);\n }\n }", "onEnd() {\n\t\tthis.debug('onEnd');\n\t}", "_finished( ) { \n\n\t\tif( this.verbose ) { this.log( \"All stages finished.\" ); }\n\n\t\tif( this.rollback ) {\n\t\t\tif( this.verbose ) { this.log( \"Processing failed.\" ); }\n\t\t\tthis.callback.failure( \"failed because of stage \\\"\" + this.failed + \"\\\"\" );\n\t\t} else {\n\t\t\tif( this.verbose ) { this.log( \"Processing succeeded.\" ); }\n\t\t\tthis.callback.success( this.results ); \n\t\t}\n\t\t\n\t}", "function complete(){\r\n callbackCount++;\r\n if(callbackCount >= 1){\r\n res.render('browsecustomerorders', context);\r\n }\r\n\r\n }", "function onAllCallbacksCreated() {\n allCallbacksCreated = true;\n tryOnComplete();\n }", "function my_callback(json_result) {\n console.log(\"Done\");\n }", "onend() {\n if (this.done)\n return;\n this.done = true;\n this.parser = null;\n this.handleCallback(null);\n }", "function complete() {\n callbackCount++;\n if(callbackCount >= 2) {\n res.render('charactersInFilms', context);\n }\n }", "function onFinish() {\n\t\tclbk();\n\t}", "function onFinished(notAborted, arr) {\n Machine.find(function(err, instances){\n console.log(\"Done with importing!\");\n });\n }", "_onTasksDone() {\n // meant to be implemented by subclass if needed\n }", "finish() {}", "function executeCallbacks(){\n\t\t\t\t\t\tcallbacks[lib].forEach(function(cb) {\n\t\t\t\t\t\t\tcb();\n\t\t\t\t\t\t});\n\t\t\t\t\t\tloading[lib].status = 1;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}", "_onComplete() {\n // Ensure worker queues for all paths are stopped at the end of the query\n this.stop();\n }", "function finalizeUploading() {\n\n}", "onloadend() {}", "loadComplete() {\n // Nothing\n }", "finish() {\n this.done = true;\n }", "function tellMeWhenDone(callback) {\n\tconsole.log('I\\'m done, now let\\'s run the call back!');\n\tconsole.log('------');\n\n\tcallback();\n}", "afterHandling() {}", "function _callComplete(){\n if( this.callback ){\n this.callback( this.response );\n }\n }", "onAllCompleted() {\n this.clearRefresher();\n }", "onComplete() {// Do nothing, this is defined for flow if extended classes implement this function\n }", "function final() { console.log('Done and Final'); process.exit() ; }", "function end(done) {\n done();\n}", "function finished (err) {\n\t\tif (err){\n\t\t\tconsole.error(\"oops, something went wrong.\");\n\t\t\tconsole.error(err);\n\t\t} else {\n\t\t\tconsole.log(\"Data saved successfully\");\n\t\t\tpickColor();\n\t\t}\n\t}", "function done () {\n //console.error(\"Finish ...\");\n session.output.write(DetailsArray);\n apim.output('application/json');\n apim.setvariable('message.status.code', 200);\n}", "function done(err, result) {\n callback(err, result);\n }", "function done(err, result) {\n callback(err, result);\n }", "function done() {\r\n\tif (verbose) console.log('done function')\r\n\tcurrentSong = tallyVotes()\r\n\tvotes = []\r\n}", "async end() { }", "function loadComplete() {\n cnt--;\n if (!cnt) {\n execComplete();\n }\n }", "function done(doneItem){\n \n}", "function finishProcess(){\n self.updateBars(callback);\n }", "function loadDone() {\n return true;\n }", "function done() {\n //if (count == ready && that.components + 1 >= _cmps.length) {\n if (count == ready ) {\n callback(null, that.template); //module return\n } else {\n return false;\n }\n }", "function tryOnComplete() {\n if (numCallbacks == numComplete && allCallbacksCreated) {\n onComplete();\n }\n }", "function cb () {\n\t\tcallback();\n\t}", "function finished(err) {\n if (err) {\n console.error('ooops, something went wrong.');\n console.error(err);\n } else {\n console.log('Data saved successfully');\n pickColor();\n }\n }", "onMessageEnd() { }", "function stateSetComplete()\n\t\t{\n\t\t\t_cb();\n\t\t}", "function check_done() {\n\t\t\tif (!controller_done || interface_source === undefined) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tcallback(interface_source);\n\t\t}", "function complete(){\n callbackCount++;\n if(callbackCount >= 1){\n // console.log(context)\n res.render('users', context);\n }\n }", "function done() {\n if (!invoked) {\n invoked = true\n\n callback.apply(null, arguments)\n }\n }", "function done() {\n if (!invoked) {\n invoked = true\n\n callback.apply(null, arguments)\n }\n }", "function done() {\n if (!invoked) {\n invoked = true\n\n callback.apply(null, arguments)\n }\n }", "function done() {\n if (!invoked) {\n invoked = true\n\n callback.apply(null, arguments)\n }\n }", "function done() {\n if (!invoked) {\n invoked = true\n\n callback.apply(null, arguments)\n }\n }", "function done() {\n if (!invoked) {\n invoked = true\n\n callback.apply(null, arguments)\n }\n }", "function done() {\n if (!invoked) {\n invoked = true\n\n callback.apply(null, arguments)\n }\n }", "function done() {\n if (!invoked) {\n invoked = true\n\n callback.apply(null, arguments)\n }\n }", "function _onAllFilesProcessed()\n {\n process.exit(0);\n }", "function done() {\n if (!invoked) {\n invoked = true;\n\n callback.apply(null, arguments);\n }\n }", "function doneWithIt() {\n // the download was skipped and not an error, so call the progress callback; then either move on to the next one, or else call our success callback\n if (cbprog) cbprog(tile, { x: x, y: y, z: z });\n continueOnNext();\n }", "async end() {\n return;\n }", "function narrDone(){}", "function handleFinish(values) {\n job.current = getJob(values, job.current, writeMessage);\n setBusy(job.current.pendingTime);\n }", "onSuccess() {\n this.emit(\"success\");\n this.cleanup();\n }", "function complete()\n\t{\n\t\t_queryInProgress = false;\n\t\t_dispatcher.trigger(_options.completeEvent);\n\t}", "function maybeFinish() {\n if (waiting) return;\n callback();\n }" ]
[ "0.7607877", "0.73473793", "0.73289984", "0.7317956", "0.7304225", "0.72417575", "0.7235767", "0.69856775", "0.68565404", "0.6855536", "0.6845145", "0.6817738", "0.6773241", "0.6773241", "0.6773241", "0.6773241", "0.677228", "0.67654777", "0.67654777", "0.6763289", "0.6711056", "0.6708692", "0.6690419", "0.66873217", "0.6683349", "0.6678777", "0.667268", "0.66554224", "0.6632247", "0.66023386", "0.6590042", "0.6590042", "0.6590042", "0.6590042", "0.6590042", "0.65870875", "0.65709007", "0.65467453", "0.6541239", "0.653074", "0.65232486", "0.64992446", "0.6490515", "0.64667886", "0.6460307", "0.645314", "0.643666", "0.6432198", "0.6424091", "0.641224", "0.63919014", "0.6388806", "0.63845104", "0.6384352", "0.63568944", "0.6344052", "0.63423425", "0.63169664", "0.6292031", "0.6278252", "0.62615126", "0.62501496", "0.6240956", "0.62379813", "0.6237373", "0.6234511", "0.622723", "0.62248915", "0.622093", "0.622093", "0.6213284", "0.61970186", "0.6190086", "0.61857873", "0.6181972", "0.61767", "0.61761075", "0.6171341", "0.6165241", "0.6155899", "0.614456", "0.61438334", "0.6138033", "0.6123965", "0.61212635", "0.61212635", "0.61212635", "0.61212635", "0.61212635", "0.61212635", "0.61212635", "0.61212635", "0.6120697", "0.61173594", "0.6097582", "0.6082847", "0.60795003", "0.60784286", "0.6075249", "0.6064888", "0.60642475" ]
0.0
-1
This is just a junk drawer, containing anything used across multiple classes. Because Luxon is small(ish), this should stay small and we won't worry about splitting it up into, say, parsingUtil.js and basicUtil.js and so on. But they are divided up by feature area.
function isUndefined(o) { return typeof o === "undefined"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function featuresDiv() {\n let classFeatures;\n if (classes === 'Fighter') {\n classFeatures =\n `\n <h3>Class Features</h3>\n <p>Hit Points at 1st Level: 10 + your Constitution modifier</p>\n <p class=\"underline\">Proficiency</p>\n <ul>\n <li class=\"profskills\">${fighterSkill1}</li>\n <li class=\"profskills\">${fighterSkill2}</li>\n </ul>\n <p class=\"underline\">Fighting style</p>\n <p>\n You adopt a particular style of fighting as your specialty. Choose one of the following options. \n You can’t take a Fighting Style option more than once, even if you later get to choose again.\n </p>\n <ul>\n <li>${fighterStyle}</li>\n </ul>\n <p class=\"underline\">Second wind</p>\n <p>\n You have a limited well of stamina that you can draw on to protect yourself from harm.\n On your turn, you can use a bonus action to regain hit points equal to 1d10 + your fighter level. \n Once you use this feature, you must finish a short or long rest before you can use it again.\n </p>\n `;\n }\n if (classes === 'Ranger') {\n classFeatures =\n `\n <h3>Class Features</h3>\n <p>Hit Points at 1st Level: 8 + your Constitution modifier</p>\n <p class=\"underline\">Proficiency</p>\n <ul>\n <li class=\"profskills\">${rangerSkill1}</li>\n <li class=\"profskills\">${rangerSkill2}</li>\n <li class=\"profskills\">${rangerSkill3}</li>\n </ul>\n <p class=\"underline\">Favored Enemy</p>\n <p>\n Beginning at 1st level, you have significant experience studying, tracking, hunting, and even talking to a certain type of enemy.\n </p>\n <ul>\n <li>${favoredEnemy}</li>\n </ul>\n <p class=\"underline\">Language</p>\n <ul>\n <li>${language}</li>\n </ul>\n <p class=\"underline\">Natural Explorer</p>\n <p>\n You are particularly familiar with one type of natural environment and are adept at traveling and surviving in such regions.\n </p>\n <ul>\n <li>${naturalExplorer}</li>\n </ul>\n `;\n }\n if (classes === 'Rogue') {\n classFeatures =\n `\n <h3>Class Features</h3>\n <p>Hit Points at 1st Level: 8 + your Constitution modifier</p>\n <p class=\"underline\">Proficiency</p>\n <ul>\n <li class=\"profskills\">${rogueSkill1}</li>\n <li class=\"profskills\">${rogueSkill2}</li>\n <li class=\"profskills\">${rogueSkill3}</li>\n <li class=\"profskills\">${rogueSkill4}</li>\n </ul>\n <p class=\"underline\">Expertise</p>\n <p>\n Your proficiency bonus is doubled for any ability check you make that uses either of the chosen proficiencies.\n </p>\n <ul>\n <li>${expertise1}</li>\n <li>${expertise2}</li>\n </ul>\n <p class=\"underline\">Sneak Attack</p>\n <p>\n Beginning at 1st level, you know how to strike subtly and exploit a foe’s distraction. \n Once per turn, you can deal an extra 1d6 damage to one creature you hit with an attack if you have advantage on the attack roll. \n The attack must use a finesse or a ranged weapon.\n </p>\n <p class=\"underline\">Thieve's Cant</p>\n <p>\n During your rogue training you learned thieves’ cant, a secret mix of dialect, jargon, \n and code that allows you to hide messages in seemingly normal conversation. \n Only another creature that knows thieves’ cant understands such messages. \n It takes four times longer to convey such a message than it does to speak the same idea plainly.\n </p>\n `;\n }\n if (classes === 'Sorcerer') {\n classFeatures =\n `\n <h3>Class Features</h3>\n <p>Hit Points at 1st Level: 6 + your Constitution modifier</p>\n <p class=\"underline\">Proficiency</p>\n <ul>\n <li class=\"profskills\">${sorcereSkill1}</li>\n <li class=\"profskills\">${sorcereSkill2}</li>\n </ul>\n <p class=\"underline\">Spellcasting</p>\n <p>\n An event in your past, or in the life of a parent or ancestor, left an indelible mark on you, \n infusing you with arcane magic. This font of magic, whatever its origin, fuels your spells.\n </p>\n <p class=\"underline\">Cantrips</p>\n <p>\n At 1st level, you know four cantrips of your choice from the sorcerer spell list. \n You learn additional sorcerer cantrips of your choice at higher levels, \n as shown in the Cantrips Known column of the Sorcerer table.\n </p>\n <p class=\"underline\">Spell Slots</p>\n <p>\n The Sorcerer table shows how many spell slots you have to cast your sorcerer spells of 1st level and higher. \n To cast one of these sorcerer spells, you must expend a slot of the spell’s level or higher. \n You regain all expended spell slots when you finish a long rest.\n </p>\n <p>\n Spell save DC = 8 + your proficiency bonus + your Charisma modifier\n </p>\n <p>\n Spell attack modifier = your proficiency bonus + your Charisma modifier\n </p>\n `;\n }\n return classFeatures;\n}", "function DrawerTool() {\n /* a tool to open and fill drawers\n\n this tool has to (and should!) only be instantiated once\n */\n this.drawers = {};\n this.current_drawer = null;\n \n this.initialize = function(editor) {\n this.editor = editor;\n // this essentially makes the drawertool a singleton\n window.drawertool = this;\n };\n\n this.registerDrawer = function(id, drawer) {\n \n this.drawers[id] = drawer;\n drawer.initialize(this.editor, this);\n };\n \n this.openDrawer = function(id) {\n /* open a drawer */\n if (this.current_drawer) {\n this.closeDrawer();\n };\n var drawer = this.drawers[id];\n drawer.createContent();\n this.current_drawer = drawer;\n };\n \n this.updateState = function(selNode) {\n if (this.current_drawer) {\n this.closeDrawer();\n };\n };\n\n this.closeDrawer = function() {\n if (!this.current_drawer) {\n return;\n };\n \n this.current_drawer.hide();\n this.current_drawer = null;\n };\n\n this.getDrawerEnv = function(iframe_win) {\n var drawer = null;\n for (var id in this.drawers) {\n var ldrawer = this.drawers[id];\n // Note that we require drawers to provide us with an\n // element property!\n if (ldrawer.element.contentWindow == iframe_win) {\n drawer = ldrawer;\n };\n };\n if (!drawer) {\n this.editor.logMessage(\"Drawer not found\", 1);\n return;\n };\n return {\n 'drawer': drawer,\n 'drawertool': this,\n 'tool': drawer.tool\n };\n };\n}", "function PenguinClass() {}", "function ciniki_classes_class() {\n //\n // Panels\n //\n this.classWebflags = {\n '1':{'name':'Visible'},\n };\n this.init = function() {\n //\n // The panel for editing a class\n //\n this.edit = new M.panel('Class',\n 'ciniki_classes_class', 'edit',\n 'mc', 'medium mediumaside', 'sectioned', 'ciniki.classes.class.edit');\n this.edit.data = null;\n this.edit.class_id = 0;\n this.edit.additional_images = [];\n this.edit.sections = { \n '_image':{'label':'', 'aside':'yes', 'type':'imageform', 'fields':{\n 'primary_image_id':{'label':'', 'type':'image_id', 'hidelabel':'yes', \n 'controls':'all', 'history':'no',\n 'addDropImage':function(iid) {\n M.ciniki_classes_class.edit.setFieldValue('primary_image_id',iid);\n return true;\n },\n 'addDropImageRefresh':'',\n 'deleteImage':'M.ciniki_classes_class.edit.deletePrimaryImage',\n },\n }},\n 'details':{'label':'', 'aside':'yes', 'fields':{\n 'name':{'label':'Title', 'hint':'Title', 'type':'text'},\n 'category':{'label':'Category', 'type':'text', 'livesearch':'yes', 'livesearchempty':'yes'},\n 'subcat':{'label':'Sub-Category', 'type':'text', 'livesearch':'yes', 'livesearchempty':'yes'},\n 'webflags':{'label':'Website', 'hint':'', 'type':'flags', 'flags':this.classWebflags},\n }}, \n '_synopsis':{'label':'Synopsis', 'fields':{\n 'synopsis':{'label':'', 'hidelabel':'yes', 'hint':'', 'size':'small', 'type':'textarea'},\n }},\n '_description':{'label':'Description', 'fields':{\n 'description':{'label':'', 'hidelabel':'yes', 'hint':'', 'type':'textarea'},\n }},\n 'images':{'label':'Gallery', 'type':'simplethumbs'},\n '_images':{'label':'', 'type':'simplegrid', 'num_cols':1,\n 'addTxt':'Add Additional Image',\n 'addFn':'M.ciniki_classes_class.editImage(0);',\n },\n '_buttons':{'label':'', 'buttons':{\n 'save':{'label':'Save', 'fn':'M.ciniki_classes_class.saveClass();'},\n 'delete':{'label':'Delete', 'fn':'M.ciniki_classes_class.removeClass();'},\n }},\n }; \n this.edit.sectionData = function(s) { return this.data[s]; }\n this.edit.fieldValue = function(s, i, d) { return this.data[i]; }\n this.edit.liveSearchCb = function(s, i, value) {\n if( i == 'category' || i == 'subcat' ) {\n var rsp = M.api.getJSONBgCb('ciniki.classes.classSearchField', {'tnid':M.curTenantID, 'field':i, 'start_needle':value, 'limit':15},\n function(rsp) {\n M.ciniki_classes_class.edit.liveSearchShow(s, i, M.gE(M.ciniki_classes_class.edit.panelUID + '_' + i), rsp.results);\n });\n }\n };\n this.edit.liveSearchResultValue = function(s, f, i, j, d) {\n if( (f == 'category' || f == 'subcat' ) && d.result != null ) { return d.result.name; }\n return '';\n };\n this.edit.liveSearchResultRowFn = function(s, f, i, j, d) { \n if( (f == 'category' || f == 'subcat' ) && d.result != null ) {\n return 'M.ciniki_classes_class.edit.updateField(\\'' + s + '\\',\\'' + f + '\\',\\'' + escape(d.result.name) + '\\');';\n }\n };\n this.edit.updateField = function(s, fid, result) {\n M.gE(this.panelUID + '_' + fid).value = unescape(result);\n this.removeLiveSearch(s, fid);\n };\n this.edit.fieldHistoryArgs = function(s, i) {\n return {'method':'ciniki.classes.classHistory', 'args':{'tnid':M.curTenantID, \n 'class_id':this.class_id, 'field':i}};\n }\n this.edit.deletePrimaryImage = function(fid) {\n this.setFieldValue(fid, 0, null, null);\n return true;\n };\n this.edit.addDropImage = function(iid) {\n if( M.ciniki_classes_class.edit.class_id > 0 ) {\n var rsp = M.api.getJSON('ciniki.classes.classImageAdd', \n {'tnid':M.curTenantID, 'image_id':iid, \n 'class_id':M.ciniki_classes_class.edit.class_id});\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n return true;\n } else {\n var name = M.ciniki_classes_class.edit.formValue('name');\n if( name == '' ) {\n M.alert('You must enter the name of the class first');\n return false;\n }\n // Save the class\n var c = M.ciniki_classes_class.edit.serializeForm('yes');\n c += '&images=' + iid;\n var rsp = M.api.postJSON('ciniki.classes.classAdd', {'tnid':M.curTenantID}, c);\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_classes_class.edit.class_id = rsp.id;\n// , function(rsp) {\n// if( rsp.stat != 'ok' ) {\n// M.api.err(rsp);\n// return false;\n// }\n// M.ciniki_classes_class.edit.class_id = rsp.id;\n// });\n return true;\n }\n };\n this.edit.addDropImageRefresh = function() {\n if( M.ciniki_classes_class.edit.class_id > 0 ) {\n var rsp = M.api.getJSONCb('ciniki.classes.classGet', {'tnid':M.curTenantID, \n 'class_id':M.ciniki_classes_class.edit.class_id, 'images':'yes'}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_classes_class.edit;\n p.data.images = rsp.class.images;\n p.refreshSection('images');\n p.show();\n });\n }\n return true;\n };\n this.edit.thumbFn = function(s, i, d) {\n return 'M.ciniki_classes_class.editImage(\\'' + d.image.id + '\\');';\n };\n this.edit.addButton('save', 'Save', 'M.ciniki_classes_class.saveClass();');\n this.edit.addClose('Cancel');\n }\n\n //\n // Arguments:\n // aG - The arguments to be parsed into args\n //\n this.start = function(cb, appPrefix, aG) {\n args = {};\n if( aG != null ) { args = eval(aG); }\n\n //\n // Create the app container if it doesn't exist, and clear it out\n // if it does exist.\n //\n var appContainer = M.createContainer(appPrefix, 'ciniki_classes_class', 'yes');\n if( appContainer == null ) {\n M.alert('App Error');\n return false;\n } \n\n this.editClass(cb, args.class_id);\n }\n\n this.editClass = function(cb, cid) {\n this.edit.reset();\n if( cid != null ) { this.edit.class_id = cid; }\n this.edit.sections.details.fields.category.active = ((M.curTenant.modules['ciniki.classes'].flags&0x01)>0)?'yes':'no';\n this.edit.sections.details.fields.subcat.active = ((M.curTenant.modules['ciniki.classes'].flags&0x02)>0)?'yes':'no';\n if( this.edit.class_id > 0 ) {\n this.edit.sections._buttons.buttons.delete.visible = 'yes';\n M.api.getJSONCb('ciniki.classes.classGet', {'tnid':M.curTenantID, \n 'class_id':this.edit.class_id, 'images':'yes', 'files':'yes'}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_classes_class.edit;\n p.data = rsp.class;\n p.refresh();\n p.show(cb);\n });\n } else {\n this.edit.sections._buttons.buttons.delete.visible = 'no';\n this.edit.data = {};\n this.edit.additional_images = [];\n this.edit.refresh();\n this.edit.show(cb);\n }\n };\n\n this.saveClass = function() {\n if( this.edit.class_id > 0 ) {\n var c = this.edit.serializeForm('no');\n if( c != '' ) {\n M.api.postJSONCb('ciniki.classes.classUpdate', \n {'tnid':M.curTenantID, 'class_id':M.ciniki_classes_class.edit.class_id}, c,\n function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n } \n M.ciniki_classes_class.edit.close();\n });\n } else {\n this.edit.close();\n }\n } else {\n var name = this.edit.formValue('name');\n if( name == '' ) {\n M.alert('You must enter the name of the class first');\n return false;\n }\n var c = this.edit.serializeForm('yes');\n M.api.postJSONCb('ciniki.classes.classAdd', \n {'tnid':M.curTenantID}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n } \n M.ciniki_classes_class.edit.close();\n });\n }\n };\n\n this.editImage = function(iid) {\n if( this.edit.class_id > 0 ) {\n M.startApp('ciniki.classes.classimages',null,'M.ciniki_classes_class.edit.addDropImageRefresh();','mc',{'class_id':this.edit.class_id,'class_image_id':iid});\n } else {\n var name = this.edit.formValue('name');\n if( name == '' ) {\n M.alert('You must enter the name of the class first');\n return false;\n }\n // Save the class\n var c = this.edit.serializeForm('yes');\n M.api.postJSONCb('ciniki.classes.classAdd', {'tnid':M.curTenantID}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_classes_class.edit.class_id = rsp.id;\n M.startApp('ciniki.classes.classimages',null,'M.ciniki_classes_class.editClass();','mc',{'class_id':rsp.id,'class_image_id':iid});\n });\n }\n };\n\n this.removeClass = function() {\n M.confirm(\"Are you sure you want to remove this class and all the images and files associated with it?\",null,function() {\n M.api.getJSONCb('ciniki.classes.classDelete', \n {'tnid':M.curTenantID, 'class_id':M.ciniki_classes_class.edit.class_id}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_classes_class.edit.close();\n });\n });\n }\n}", "function classUI() {\n\t\n\tthis.selected_item = \"\";\n\tthis.space = new classSpace(this);\n\tthis.hud = new classHUD(this);\n\tvar space = this.space;\n\tvar ui = this;\n\t\n\tthis.init = function() {\n\t\t// INIT HUD\n\t\tthis.hud.init();\n\t\t// HIGHLIGHT PANEL BUTTONS\n\t\tthis.highlightTopButtonColor(\".fs-hud\", \"#8f99ba\");\n\t\tthis.highlightTopButtonColor(\".fs-panels\", \"#8f99ba\");\n\t\tthis.highlightTopButtonColor(\".fs-sound\", \"#8f99ba\");\n\t\tthis.highlightButtonColor('.fs-planet')\n\t\tthis.highlightViewButtonColor(\".fs-sideview\");\n\t\t// RESET SELECTOR\n\t\t$('#selector').val('');\n\t\t// SET LISTENERS\n\t\t$(window).on('resize', ui.onWindowResize);\n\t\t$(document).keyup(function(e) {documentKeyUp(e);});\n\t\t$(document).mousedown(function(event) {ui.showPanels(event);});\n\t\t$(\".textcontainer\").on(\"mousedown click\", \"a\", function (e) {ui.linkClicked(e);} );\n\t\t$('#textcontainer_L').mousedown(function(e) {ui.HUDLmousedown(e);});\n\t\t$('#textcontainer_R').mousedown(function(e) {ui.HUDRmousedown(e);});\n\t\t$('.fs-hud').on('click', function() {ui.toggleHUD();});\n\t\t$('.fs-panels').on('click', function() {ui.hidePanels();});\n\t\t$('.fs-sound').on('click', function() {ui.toggleSound();});\n\t\t$('.fs-orbit').on('click', function() {ui.showOrbitClicked();});\n\t\t$('.fs-planet').on('click', function() {ui.showPlanetClicked();});\n\t\t$(\".fs-topview\").click(function() {ui.showTopViewClicked();});\n\t\t$(\".fs-sideview\").click(function() {ui.showSideViewClicked();});\n\t\t$(\".fs-hover\").click(function() {ui.showHoverClicked();});\n\t\t$(\".fs-compare\").click(function() {ui.showCompareClicked();});\n\t\t$('#selector_button').on('click', function() {ui.selectorButtonClicked();})\n\t\t$('.selector_item').on('click', function() {ui.selectorItemClicked(this);})\n\t\t$('#sun').on('click', function() {ui.showPlanetClicked(\"sun\");})\n\t\t$('#mercury .planet').on('click', function() {ui.showPlanetClicked(\"mercury\");})\n\t\t$('#venus .planet').on('click', function() {ui.showPlanetClicked(\"venus\");})\n\t\t$('#earth .planet').on('click', function() {ui.showPlanetClicked(\"earth\");})\n\t\t$('#moon .planet').on('click', function() {ui.showPlanetClicked(\"moon\");})\n\t\t$('#mars .planet').on('click', function() {ui.showPlanetClicked(\"mars\");})\n\t\t$('#jupiter .planet').on('click', function() {ui.showPlanetClicked(\"jupiter\");})\n\t\t$('#saturn .planet').on('click', function() {ui.showPlanetClicked(\"saturn\");})\n\t\t$('#uranus .planet').on('click', function() {ui.showPlanetClicked(\"uranus\");})\n\t\t$('#neptune .planet').on('click', function() {ui.showPlanetClicked(\"neptune\");})\n\t}\n\n\tthis.update = function() {\n\t\tif (this.hud.visible) {\n\t\t\tui.hud.LUpdate();\n\t\t\tui.hud.RUpdate();\n\t\t}\n\t}\n\t\n\tthis.onWindowResize = function() {\n\t\tui.update();\n\t}\n\t\n\tthis.documentKeyUp = function() {\n\t\tif (e.keyCode === 27) {\n\t\t\t$('.panel').toggle();\n\t\t}\n\t}\n\t\n\tthis.showHoverClicked = function() {\n\t\tthis.hideMenu(); \n\t\tthis.highlightButtonColor('.fs-hover');\n\t\t//$(\"h1\").html(toProperCase(ui.space.object_name));\n\t\tspace.showHover();\n\t}\n\t\n\tthis.showSideViewClicked = function() {\n\t\tthis.hideMenu(); \n\t\tthis.highlightViewButtonColor('.fs-sideview');\n\t\tspace.showSideView()\n\t}\n\t\n\tthis.showTopViewClicked = function() {\n\t\tthis.hideMenu(); \n\t\tthis.highlightViewButtonColor('.fs-topview');\n\t\tspace.showTopView();\n\t}\n\t\n\tthis.showPlanetClicked = function(iobject_name) {\n\t\tif (typeof iobject_name !== \"undefined\") space.object_name = iobject_name;\n\t\tthis.hideMenu(); \n\t\tthis.highlightButtonColor('.fs-planet');\n\t\t//$(\"h1\").html(toProperCase(space.object_name));\n\t\t$(\"#selector_label\").html(space.object_name.toUpperCase());\n\t\tif ((this.hud.visible) || (typeof this.hud.visible === \"undefined\")) {\n\t\t\t$(\".line\").show();\n\t\t\t$(\".textcontainer\").show();\n\t\t}\n\t\tspace.showPlanet(space.object_name);\n\t}\n\t\n\tthis.showOrbitClicked = function() {\n\t\tthis.hideMenu(); \n\t\tthis.highlightButtonColor('.fs-orbit');\n\t\tthis.space.showOrbit();\n\t}\n\t\n\tthis.showCompareClicked = function() {\n\t\tthis.hideMenu(); \n\t\tthis.highlightButtonColor('.fs-compare');\n\t\tthis.space.showCompare();\n\t}\n\t\n\tthis.showPanels = function(e) {\n\t\tswitch (e.which) {\n\t\t\tcase 3:\n\t\t\t\t$(\".panel\").show(); \n\t\t\t\tthis.highlightTopButtonColor(\".fs-panels\", \"#8f99ba\");\n\t\t\t\taudioPlay(\"button-click\"); \n\t\t\t\tbreak;\n\t\t}\n\t}\n\t\n\tthis.highlightViewButtonColor = function(className) {\n\t\t$('.fs-sideview').css(\"color\",\"#aaa\");\n\t\t$('.fs-topview').css(\"color\",\"#aaa\");\n\t\t$(className).css(\"color\",\"#a5daba\");\n\t\t}\n\t\n\tthis.highlightButtonColor = function(className) {\n\t\t$('.fs-orbit').css(\"color\",\"#aaa\");\n\t\t$('.fs-planet').css(\"color\",\"#aaa\");\n\t\t$('.fs-compare').css(\"color\",\"#aaa\");\n\t\t$('.fs-hover').css(\"color\",\"#aaa\");\n\t\t$(className).css(\"color\",\"rgb(182, 173, 216)\");\n\t}\n\t\n\tthis.linkClicked = function(e) {\n\t\twindow.location.href = this.href;\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\t}\n\t\n\tthis.HUDLmousedown = function(e) {\n\t\tswitch (e.which) {\n\t\t\tcase 1:\n\t\t\t\tui.hud.LNext();\n\t\t\t\taudioPlay(\"hud-click\"); \n\t\t\tcase 2:\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tui.hud.LBack();\n\t\t\t\taudioPlay(\"hud-click\"); \n\t\t\t\tbreak;\n\t\t}\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\t}\n\t\n\tthis.HUDRmousedown = function(e) {\n\t\tswitch (e.which) {\n\t\t\tcase 1:\n\t\t\t\tui.hud.RNext();\n\t\t\t\taudioPlay(\"hud-click\"); \n\t\t\tcase 2:\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tui.hud.RBack();\n\t\t\t\taudioPlay(\"hud-click\"); \n\t\t\t\tbreak;\n\t\t}\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\t}\n\t\n\tthis.toggleHUD = function(e) {\n\t\tif ($('#universe').is(\":hidden\")) {\n\t\t\tif ((ui.hud.visible) || (typeof ui.hud.visible === \"undefined\")) {\n\t\t\t\tui.hud.visible = false;\n\t\t\t\tthis.highlightTopButtonColor(\".fs-hud\", \"#aaa\");\n\t\t\t\t$('#textcontainer_R').hide();\n\t\t\t\t$('#textcontainer_L').hide();\n\t\t\t\t$('.line').hide();\n\t\t\t\t//$('h1').hide();\n\t\t\t}\n\t\t\telse {\n\t\t\t\t\n\t\t\t\tui.hud.visible = true;\n\t\t\t\tthis.highlightTopButtonColor(\".fs-hud\", \"#8f99ba\");\n\t\t\t\tui.hud.loadInfoAndStats(space.object_name);\n\t\t\t\t$('.line').show();\n\t\t\t\t//$('h1').show();\n\t\t\t}\n\t\t\taudioPlay(\"button-click\");\n\t\t}\n\t}\n\t\n\tthis.hidePanels = function() {\n\t\t$(\".panel\").hide(); \n\t\tthis.highlightTopButtonColor(\".fs-panels\", \"#aaa\");\n\t\taudioPlay(\"button-click\"); \n\t}\n\t\n\tthis.toggleSound = function() {\n\t\tif (soundon) {\n\t\t\tsoundon = false;\n\t\t\tthis.highlightTopButtonColor(\".fs-sound\", \"#aaa\");\n\t\t\tsnd1.pause();\n\t\t\tsnd2.pause();\n\t\t} else {\n\t\t\tsoundon = true;\n\t\t\tthis.highlightTopButtonColor(\".fs-sound\", \"#8f99ba\");\n\t\t\tsnd1.play();\n\t\t\tsnd2.play();\n\t\t}\n\t\taudioPlay(\"button-click\"); \n\t}\n\t\n\tthis.highlightTopButtonColor = function(className, color) {\n\t\t$(className).css(\"color\", color);\n\t}\n\t\n\tthis.hideMenu = function() {\n\t\t$('.selector').css('bottom', '-550px');\n\t}\n\t\n\tthis.selectorButtonClicked = function() {\n\t\taudioPlay(\"screen\"); \n\t\tif (parseInt($('.selector').css('bottom')) < 0) {\n\t\t\t$('.selector').css('bottom', '0px');\n\t\t\t$('.selector').css('width', '300px');\n\t\t}\n\t\telse {\n\t\t\t$('.selector').css('bottom', '-550px');\t\t\t\n\t\t}\n\t}\n\t\n\tthis.selectorItemClicked = function(item) {\n\t\tvar value = $(item).data(\"value\");\n\t\tselectedItemChanged(value);\n\t\t// HIDE MENU\n\t\t$('.selector').css('bottom', '-550px');\n\t}\n\t\n\tfunction selectedItemChanged(value) {\n\t\tif ((value != space.object_name) && (typeof value !== \"undefined\")) {\n\t\t\t// $(\"h1\").html(toProperCase(value));\n\t\t\taudioPlay(\"beep\"); \n\t\t\tif ($('#universe').is(\":hidden\")) {\n\t\t\t\tspace.drawObject(value);\n\t\t\t}\n\t\t\t// SELECT 3DCssSolarSystem\n\t\t\tspace.select3DCssSolarSystem(value);\n\t\t\t$('#selector_label').html(space.object_name.toUpperCase());\n\t\t}\n\t}\n\t\n\tfunction toProperCase(str) {\n\t\treturn str.replace(/\\w\\S*/g, function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();});\n\t}\n}", "constructor() {\n super();\n this.drawerState = false;\n this.darkMode = false;\n this.playSvg = html([playSvg]);\n this.contrastSvg = html([contrastSvg]);\n this.codeSvg = html([codeSvg]);\n this.storeInstance = storeInstance;\n }", "overrideClassFunctions(subClassName=\"State Senator\"){\n var self = this;\n switch(subClassName){\n case \"US Representative\":\n self.selectedExtractID = usRepresentativeExtractIDFunction;\n self.meshFunction = usRepresentativeMeshFunction;\n break;\n default:\n self.selectedExtractID = genericExtractIDFunction;\n self.meshFunction = genericMeshFunction;\n }\n }", "addTool(tool){\n if (tool.classList.contains(\"pen\")){this.toolss = \"pen\";};\n if (tool.classList.contains(\"rectangle\")){this.toolss = \"rectangle\";};\n if (tool.classList.contains(\"circle\")){this.toolss = \"circle\";};\n if (tool.classList.contains(\"triangle\")){this.toolss = \"triangle\";};\n if (tool.classList.contains(\"oval\")){this.toolss = \"oval\";};\n if (tool.classList.contains(\"eraser\")){this.toolss = \"eraser\";};\n if (tool.classList.contains(\"line\")){this.toolss = \"line\";};\n if (tool.classList.contains(\"diamond\")){this.toolss = \"diamond\";};\n if (tool.classList.contains(\"pentagon\")){this.toolss = \"pentagon\";};\n if (tool.classList.contains(\"hexagon\")){this.toolss = \"hexagon\";};\n if (tool.classList.contains(\"right-triangle\")){this.toolss = \"right-triangle\";};\n if (tool.classList.contains(\"right-arrow\")){this.toolss = \"right-arrow\";};\n if (tool.classList.contains(\"left-arrow\")){this.toolss = \"left-arrow\";};\n if (tool.classList.contains(\"up-arrow\")){this.toolss = \"up-arrow\";};\n if (tool.classList.contains(\"down-arrow\")){this.toolss = \"down-arrow\";};\n if (tool.classList.contains(\"six-point-star\")){this.toolss = \"six-point-star\";};\n if (tool.classList.contains(\"four-point-star\")){this.toolss = \"four-point-star\";};\n if (tool.classList.contains(\"five-point-star\")){this.toolss = \"five-point-star\";};\n if (tool.classList.contains(\"heart\")){this.toolss = \"heart\";};\n if (tool.classList.contains(\"rounded-rectangular-callout\")){this.toolss = \"rounded-rectangular-callout\";};\n if (tool.classList.contains(\"color-picker\")){this.toolss = \"color-picker\";};\n if (tool.classList.contains(\"slct\")){this.toolss = \"select\";};\n if (tool.classList.contains(\"cpy\")){this.toolss = \"copy\";};\n if (tool.classList.contains(\"cuts\")){this.toolss = \"cut\";};\n if (tool.classList.contains(\"pst\")){this.toolss = \"paste\";};\n if (tool.classList.contains(\"text\")){this.toolss = \"text\";};\n if (tool.classList.contains(\"resize\")){this.toolss = \"resize\";};\n if (tool.classList.contains(\"fillers\")){this.toolss = \"fillers\";};\n if (tool.classList.contains(\"rotate-flip-hor\")){this.toolss = \"rotate-flip-hor\";};\n if (tool.classList.contains(\"rotate-flip-ver\")){this.toolss = \"rotate-flip-ver\";};\n if (tool.classList.contains(\"rotate-right-90-deg\")){this.toolss = \"rotate-right-90-deg\";};\n if (tool.classList.contains(\"rotate-left-90-deg\")){this.toolss = \"rotate-left-90-deg\";};\n if (tool.classList.contains(\"rotate-180-deg\")){this.toolss = \"rotate-180-deg\";};\n if (tool.classList.contains(\"f\")){this.toolss = \"f\";};\n if (tool.classList.contains(\"marker\")){this.toolss = \"marker\";};\n if (tool.classList.contains(\"oil\")){this.toolss = \"oil\";};\n if (tool.classList.contains(\"watercolor\")){this.toolss = \"watercolor\";};\n if (tool.classList.contains(\"size-1\")){this.toolss = \"size-1\";};\n if (tool.classList.contains(\"size-2\")){this.toolss = \"size-2\";};\n if (tool.classList.contains(\"size-3\")){this.toolss = \"size-3\";};\n if (tool.classList.contains(\"size-4\")){this.toolss = \"size-4\";};\n if (tool.classList.contains(\"fills-no-color\")){this.toolss = \"fills-no-color\";};\n if (tool.classList.contains(\"fills-solid-color\")){this.toolss = \"fills-solid-color\";};\n if (tool.classList.contains(\"fills-marker\")){this.toolss = \"fills-marker\";};\n if (tool.classList.contains(\"outline-no-color\")){this.toolss = \"outline-no-color\";};\n if (tool.classList.contains(\"outline-solid-color\")){this.toolss = \"outline-solid-color\";};\n if (tool.classList.contains(\"brush-option-pencil\")){this.toolss = \"pen\";};\n if (tool.classList.contains(\"file-open\")){this.toolss = \"file-open\";};\n if (tool.classList.contains(\"file-save\")){this.toolss = \"file-save\";};\n \n }", "get featureClass() {}", "function initMandalaClass()\n{\n\nvar LayerClass = initMandalaLayerClass();\n\nclass Mandala\n{\n\tget className()\t\t\t\t\t{ return \"Mandala\"; };\n\tget channelName()\t\t\t\t\t{ return \"Mandala\" };\n\n\t// -------------------------------------------------------------------------\n\tconstructor()\n\t{\n\t\tthis.LayerClass = LayerClass;\n\n\t\tthis.next_layer_index = 0;\n\n\t\t// --- DATA ---\n\t\tthis.layers = {};\n\n\t\t// render order\n\t\t// note that added layers are added to end of array, so currently\n\t\t// render order goes from back to front with increasing index\n\t\tthis.layers_order = [];\n\t};\n\n\t// -------------------------------------------------------------------------\n\t// --- METHODS ---\n\t// -------------------------------------------------------------------------\n\tgetNextLayerIndex()\n\t{ \n\t\tthis.next_layer_index += 1; \n\t\treturn this.next_layer_index; \n\t};\n\t\n\t// -------------------------------------------------------------------------\n\tgetLayer(layer_name)\n\t{\n\t\t// TODO: handle not having requested layer\n\t\treturn this.layers[layer_name];\n\t};\n\n\t// -------------------------------------------------------------------------\n\t// returns layer by index from render order\n\tgetLayerByIndex(index)\n\t{\n\t\tif (index >= 0 && index < this.layers_order.length)\n\t\t{\n\t\t\treturn this.layers[this.layers_order[index]];\n\t\t}\n\t\telse\n\t\t{\n\t\t\tconsole.log(this.channelName, `ERROR: getLayerByIndex() index ${index} out of bounds`);\t\n\t\t}\n\t};\n\n\t// -------------------------------------------------------------------------\n\tgetLayerCount()\n\t{\n\t\treturn this.layers_order.length;\n\t};\n\n\t// -------------------------------------------------------------------------\n\t// NOTE: does NOT add to layers_order\n\tnewCirclesLayer(parameters)\n\t{\n\t\tvar new_layer = new this.LayerClass(parameters);\n\n\t\tnew_layer.name = `circles_${this.getNextLayerIndex()}`;\n\n\t\tthis.layers[new_layer.name] =new_layer;\n\n\t\treturn new_layer;\n\t}\n\n\t// -------------------------------------------------------------------------\n\tpreRender()\n\t{\n\t\tObject.keys(this.layers).forEach( (current_layer_key) => {\n\t\t\tthis.layers[current_layer_key].preRender();\n\t\t});\n\t}\n\n\t// -------------------------------------------------------------------------\n\taddCirclesLayer(parameters)\n\t{\n\t\tvar new_layer = this.newCirclesLayer(parameters);\n\n\t\tthis.layers_order.push(new_layer.name);\n\n\t\treturn new_layer;\n\t};\n\n\t// -------------------------------------------------------------------------\n\t// removes layer with specified name\n\t// returns name of next higher layer in render order\n\t// or layer at index 0 if deleted first layer, \n\t// or \"\" if deleted last layer\n\tdeleteLayer(layer_name)\n\t{\n\t\tvar return_name = \"\";\n\n\t\tif (this.layers.hasOwnProperty(layer_name))\n\t\t{\n\t\t\tconsole.log(this.channelName, `layer ${layer_name} deleted`);\n\t\t\tdelete this.layers[layer_name];\n\t\t\t// take out of layers_order\n\t\t\tvar removed = false;\n\t\t\tfor (var delete_index = 0; delete_index < this.layers_order.length; delete_index += 1)\n\t\t\t{\n\t\t\t\tif (this.layers_order[delete_index] == layer_name)\n\t\t\t\t{\n\t\t\t\t\tremoved = true;\n\t\t\t\t\t// note: want returned layer to be next HIGHEST in order array\n\t\t\t\t\tthis.layers_order.splice(delete_index,1);\n\t\t\t\t\tif (0 == this.layers_order.length)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn_name = \"\";\t// empty\n\t\t\t\t\t}\n\t\t\t\t\telse if (1 == this.layers_order.length)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn_name = this.layers_order[0];\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// since array was effectively shifted down one, can return deleted index, unless\n\t\t\t\t\t\t// removed highest index\n\t\t\t\t\t\treturn_name = this.layers_order[Math.min(this.layers_order.length - 1, delete_index)];\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!removed)\n\t\t\t{\n\t\t\t\tconsole.log(this.channelName, `could not find layer ${layer_name} in layers_order`);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tconsole.log(this.channelName, `ERROR: layer ${layer_name} not found for deletion`);\n\t\t}\n\n\t\treturn return_name;\n\t}\n\n\t// ----------------------------------------------------------------------------\n\tdeleteAllLayers()\n\t{\n\t\tconsole.log(this.channelName, \"deleting all layers\");\n\t\tthis.layers = {};\n\t\tthis.layers_order = [];\n\t}\n\n\t// ----------------------------------------------------------------------------\n\tcloneLayer(layer_name)\n\t{\n\t\tconsole.log(this.channelName, `cloneLayer(${layer_name})`);\n\n\t\t// note: not added to layers_order\n\t\tvar new_layer = this.newCirclesLayer();\n\n\t\tvar existing_layer = this.getLayer(layer_name);\n\t\t// use keys of default parameters to tell what to copy out of existing_layer\n\t\t// TODO: this should of course eventually be done by a function in the eventual class layer\n\t\t// Object.keys(this.layer_default_parameters).forEach( (current_parameter) =>\n\t\tObject.keys(existing_layer.defaultLayerParameters).forEach( (current_parameter) =>\t\t\n\t\t{\n\t\t\t// new_layer[current_parameter] = existing_layer[current_parameter];\n\t\t\tnew_layer.setProperty(current_parameter, existing_layer[current_parameter]);\n\t\t});\n\n\t\t// place immediately BEFORE existing layer in render order\n\t\tvar existing_layer_index = this.layers_order.indexOf(layer_name);\n\n\t\tif (existing_layer_index >= 0)\n\t\t{\n\t\t\t// note that new layer goes AFTER cloned layer in array, as greater indices indicate\n\t\t\t// higher layers\n\t\t\tthis.layers_order.splice(existing_layer_index+1, 0, new_layer.name);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.layers_order.push(new_layer);\n\n\t\t\tthrow `layer ${layer_name} could not be found in layers_order`;\n\t\t}\n\n\t\treturn new_layer.name; \n\t}\n\n\t// ----------------------------------------------------------------------------\n\ttoJSON()\n\t{\n\t\tvar json_obj = {};\n\t\t\n\t\t// layers\n\t\tvar json_layers = {};\n\t\t// json_obj.layers = this.layers;\n\t\tObject.keys(this.layers).forEach( (current_layer_name) => {\n\t\t\tvar current_layer = this.layers[current_layer_name];\n\t\t\tjson_layers[current_layer.name] = current_layer.toJSON();\n\t\t});\n\n\t\t// get layers_order\n\t\tjson_obj.layers = json_layers;\n\t\tjson_obj.layers_order = this.layers_order;\n\t\tjson_obj.next_layer_index = this.next_layer_index;\n\n\t\treturn JSON.stringify(json_obj);\n\t};\n\n\t// ----------------------------------------------------------------------------\n\tfromJSON(json_obj)\n\t{\n\t\t// get layers\t\t\n\t\t// this.layers = json_obj.layers;\n\n\t\tObject.keys(json_obj.layers).forEach( (current_layer) => {\n\t\t\tvar new_layer = new this.LayerClass(json_obj.layers[current_layer]);\n\n\t\t\tthis.layers[new_layer.name] = new_layer;\n\t\t});\n\n\t\t// get layers_order\n\t\tthis.layers_order = json_obj.layers_order;\n\t\tthis.next_layer_index = json_obj.next_layer_index;\n\t};\n\n\t// ============================================================================\n\t// INTEGRITY CHECKS\n\t// ============================================================================\n\tlayers_and_layers_order_same_length() \n\t{\n\t\tif (Object.keys(this.layers).length !== this.layers_order.length) {\n\t\t\tthrow \"layers and layers_order lengths differ\";\n\t\t};\n\t};\n\n\t// ----------------------------------------------------------------------------\n\tall_layer_names_appear_in_layers_order() \n\t{\n\t\tvar layers_not_in_layers_order = [];\n\t\tObject.keys(this.layers).forEach( (current_layer_key) => {\n\t\t\tvar layer_name_index = this.layers_order.indexOf(current_layer_key);\n\t\t\tif (layer_name_index < 0) {\n\t\t\t\tlayers_not_in_layers_order.push(current_layer_key);\n\t\t\t};\n\t\t});\n\n\t\tif (layers_not_in_layers_order.length > 0)\n\t\t{\n\t\t\tthrow `layers [${layers_not_in_layers_order.join()}] not in layer_orders`;\n\t\t}\n\n\t};\n\n\t// ----------------------------------------------------------------------------\n\tlayers_order_names_are_unique()\n\t{\n\t\tvar non_unique_names = [];\n\n\t\t// for each name in layers_order, loop over layers_order testing for uniqueness\n\t\tthis.layers_order.forEach( (current_name, current_name_index) => {\n\t\t\tfor (var test_index = 0; test_index < this.layers_order.length; test_index += 1)\n\t\t\t{\n\t\t\t\tvar current_test_name = this.layers_order[test_index];\n\t\t\t\tif ((current_name_index !== test_index) && (current_test_name == current_name)) \n\t\t\t\t{\n\t\t\t\t\t// add to non-unique list (unless already there)\n\t\t\t\t\tif (non_unique_names.indexOf(current_test_name) < 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tnon_unique_names.push(current_test_name);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tif (non_unique_names.length > 0)\n\t\t{\n\t\t\tthrow `non-unique layer names found in layers_order [${non_unique_names.join()}]`;\n\t\t}\n\t}\n\n\t// ----------------------------------------------------------------------------\n\tall_layers_have_expected_properties()\n\t{\t\t\n\t\tvar layers_missing_properties = [];\n\n\t\tvar expected_properties = [\n\t\t\t\"name\",\n\t\t];\n\n\t\tObject.keys(this.layers).forEach( (current_layer_key) => {\n\t\t\tvar current_missing_properties = [];\n\t\t\tvar current_layer = this.layers[current_layer_key];\n\n\t\t\texpected_properties.forEach( (current_property) => {\n\t\t\t\tif (!current_layer.hasOwnProperty(current_property))\n\t\t\t\t{\n\t\t\t\t\tcurrent_missing_properties.push(current_property);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tif ( current_missing_properties.length > 0)\n\t\t\t{\n\t\t\t\tlayers_missing_properties.push(current_layer_key);\n\t\t\t}\n\n\t\t});\n\n\t\tif (layers_missing_properties.length > 0)\n\t\t{\n\t\t\tthrow `layers ${layers_missing_properties.join()} are missing properties`;\n\t\t}\n\t}\n\n\t// =========================================================================\n\ttestIntegrity()\n\t{\n\t\tvar log_channel = \"mandala_integrity\";\n\n\t\tvar test_list = [\n\t\t\t\"layers_and_layers_order_same_length\",\n\t\t\t\"all_layer_names_appear_in_layers_order\",\n\t\t\t\"layers_order_names_are_unique\",\n\t\t\t\"all_layers_have_expected_properties\",\n\t\t];\n\n\t\tvar integrity_tester = new MiniTester(\"mandala int chk\", this, test_list );\n\n\t\tvar results = integrity_tester.test();\n\n\t\tif (results.tests_failed > 0)\n\t\t{\n\t\t\tresults.messages.forEach( (current_message) => {\n\t\t\t\tconsole.log(log_channel, current_message);\n\t\t\t});\n\t\t}\n\t\telse\n\t\t{\n\t\t\tconsole.log(log_channel, \"all tests passed\");\n\t\t}\n\t};\n};\t// end Mandala\n\nreturn Mandala;\n}", "function handleFeatureCLick()\n{\n console.log('img.feature was clicked..');\n //Now Grab the HTMLElement with a .feature and a .description class\n var desc = document.querySelector('.feature.description');\n //All HTMLElement object have .classList property that is a collection of class names\n desc.classList.remove('hidden'); //in main.css we have a class called hidden\n}", "function Tool(){}", "_ConstructElements() {\n // Create the container that all the other elements will be contained within\n this.container = document.createElement('div');\n this.container.classList.add(styles['guify-container']);\n\n let containerCSS = {};\n\n // Position the container relative to the root based on `opts`\n if(this.opts.barMode == 'overlay' || this.opts.barMode == 'above' || this.opts.barMode == 'none'){\n containerCSS.position = 'absolute';\n }\n if(this.hasRoot && this.opts.barMode == 'above'){\n containerCSS.top = `-${theme.sizing.menuBarHeight}`;\n }\n css(this.container, containerCSS);\n\n // Insert the container into the root as the first element\n this.opts.root.insertBefore(this.container, this.opts.root.childNodes[0]);\n\n // Create a menu bar if specified in `opts`\n if(this.opts.barMode !== 'none') {\n this.bar = new MenuBar(this.container, this.opts);\n this.bar.addListener('ontogglepanel', () => {\n this.panel.ToggleVisible();\n });\n }\n\n // Create panel\n this.panel = new Panel(this.container, this.opts);\n\n // Show the panel by default if there's no menu bar or it's requested\n if(this.opts.barMode === 'none' || this.opts.open === true) {\n this.panel.SetVisible(true);\n } else {\n // Otherwise hide it by default\n this.panel.SetVisible(false);\n }\n\n // Create toast area\n this.toaster = new ToastArea(this.container, this.opts);\n\n }", "function Tools(){}", "function ClassHandle() {\n}", "function highLight() {\n\tthis.className = 'special';\n}", "function addElementClasses() {\n\n $(layout_classes.layout__wrapper).each(function(index, element) {\n var $wrapper = $(this),\n $header = $wrapper.children(layout_classes.layout__header),\n $drawer = $wrapper.children(layout_classes.layout__drawer);\n\n // Scroll header\n if ($header.hasClass(layout_classes.header_scroll)) {\n $wrapper.addClass(layout_classes.wrapper_has_scrolling_header);\n }\n\n // Drawer\n if ($drawer.length > 0) {\n $wrapper.addClass(layout_classes.wrapper_has_drawer);\n }\n\n // Upgraded\n if ($wrapper.length > 0) {\n $wrapper.addClass(layout_classes.wrapper_is_upgraded);\n }\n });\n }", "function ciniki_library_main() {\n this.webFlags = {\n '1':{'name':'Hidden'},\n '5':{'name':'Category Highlight'},\n };\n // Web flags for additional image\n this.webFlags2 = {\n '1':{'name':'Hidden'},\n };\n this.wantedPriorities = {\n '0':'',\n '1':'$',\n '2':'$$',\n '3':'$$$',\n '4':'$$$$',\n '5':'$$$$$',\n };\n this.musicFormats = {\n '11':'Vinyl',\n '12':'CD',\n '15':'Digital',\n };\n this.bookFormats = {\n '30':'Hardcover',\n '41':'Trade Paperback',\n '42':'Mass Paperback',\n '51':'epub',\n '52':'mobi',\n };\n this.musicFlags = {\n '1':{'name':'Owned'},\n '2':{'name':'Wanted'},\n };\n this.bookFlags = {\n '1':{'name':'Owned'},\n '2':{'name':'Wanted'},\n };\n this.ratingToggles = {\n '1':'*',\n '2':'**',\n '3':'***',\n '4':'****',\n '5':'*****',\n };\n this.priorityToggles = {\n '1':'$',\n '2':'$$',\n '3':'$$$',\n '4':'$$$$',\n '5':'$$$$$',\n };\n //\n // Setup the main panel to list the collection\n //\n this.menu = new M.panel('Library', 'ciniki_library_main', 'menu', 'mc', 'medium', 'sectioned', 'ciniki.library.main.menu');\n this.menu.data = {};\n this.menu.item_type = 10;\n this.menu.cur_tab = 'genres';\n this.menu.sections = {\n 'search':{'label':'', 'aside':'yes', 'autofocus':'yes', 'type':'livesearchgrid', 'livesearchcols':1,\n 'hint':'Search', \n 'noData':'No items found',\n 'headerValues':null,\n },\n 'tabs':{'label':'', 'aside':'yes', 'type':'paneltabs', 'selected':this.menu.item_type, 'tabs':{\n '10':{'label':'Music', 'fn':'M.ciniki_library_main.menu.switchMenuTab(\\'10\\');'},\n '20':{'label':'Books', 'fn':'M.ciniki_library_main.menu.switchMenuTab(\\'20\\');'},\n }},\n 'menu':{'label':'', 'aside':'yes', 'list':{\n 'wanted':{'label':'Wanted', 'visible':'no', 'fn':'M.ciniki_library_main.list.showWanted();'},\n // IF MORE ADDED MAKE SURE TO UPDATE this.start\n }},\n 'formats':{'label':'Formats', 'aside':'yes', 'type':'simplegrid', 'num_cols':1,\n 'noData':'No formats found',\n },\n '_tabs':{'label':'', 'aside':'yes', 'type':'paneltabs', 'selected':this.menu.cur_tab, 'tabs':{\n 'genres':{'label':'Genres', 'fn':'M.ciniki_library_main.menu.switchTab(\\'genres\\');'},\n 'tags':{'label':'Tags', 'fn':'M.ciniki_library_main.menu.switchTab(\\'tags\\');'},\n 'locations':{'label':'Locations', 'fn':'M.ciniki_library_main.menu.switchTab(\\'locations\\');'},\n 'purchased_places':{'label':'Purchased', 'fn':'M.ciniki_library_main.menu.switchTab(\\'purchased_places\\');'},\n }},\n 'genres':{'label':'Genres', 'visible':'no', 'aside':'yes', 'type':'simplegrid', 'num_cols':1,\n 'noData':'No genres found',\n },\n 'tags':{'label':'Tags', 'visible':'no', 'aside':'yes', 'type':'simplegrid', 'num_cols':1,\n 'noData':'No tags found',\n },\n 'locations':{'label':'Locations', 'visible':'no', 'aside':'yes', 'type':'simplegrid', 'num_cols':1,\n 'noData':'No locations found',\n },\n 'purchased_places':{'label':'Purchased', 'visible':'no', 'aside':'yes', 'type':'simplegrid', 'num_cols':1,\n 'noData':'No places found',\n 'addTxt':'more',\n 'addFn':'M.ciniki_library_main.purchased.open(\\'M.ciniki_library_main.menu.open();\\',M.ciniki_library_main.menu.item_type);',\n },\n 'items':{'label':'', 'visible':'no', 'type':'simplegrid', 'num_cols':1,\n 'sortable':'yes',\n },\n };\n this.menu.listby = 'category';\n this.menu.liveSearchCb = function(s, i, v) {\n if( v != '' ) {\n M.api.getJSONBgCb('ciniki.library.itemSearch', {'tnid':M.curTenantID, 'start_needle':v, 'limit':'15'},\n function(rsp) {\n M.ciniki_library_main.menu.liveSearchShow(s, null, M.gE(M.ciniki_library_main.menu.panelUID + '_' + s), rsp.items);\n });\n }\n return true;\n };\n this.menu.liveSearchResultValue = function(s, f, i, j, d) {\n var priority = '';\n if( d.item.ratings != null && d.item.ratings.length > 0 ) {\n if( M.curTenant.numEmployees > 1 ) {\n for(i in d.item.ratings) {\n if( M.curTenant.employees[d.item.ratings[i].rating.user_id] != null \n && d.item.ratings[i].rating.rating > 0\n ) {\n priority += ', ' + M.curTenant.employees[d.item.ratings[i].rating.user_id] + ': ' + M.ciniki_library_main.wantedPriorities[d.item.ratings[0].rating.rating];\n }\n }\n } else if( M.curTenant.numEmployees == 1 ) {\n priority = ', ' + M.ciniki_library_main.wantedPriorities[d.item.ratings[0].rating.rating];\n }\n }\n return (d.item.author_display!=''?d.item.author_display+', ':'') + d.item.title \n + (d.item.wanted=='yes'?' [WANTED' + (priority!=''?priority:'') + ']':'');\n };\n this.menu.liveSearchResultRowFn = function(s, f, i, j, d) {\n// return 'M.startApp(\\'ciniki.library.item\\',null,\\'M.ciniki_library_main.menu.open();\\',\\'mc\\',{\\'item_id\\':\\'' + d.item.id + '\\'});';\n return 'M.ciniki_library_main.edit.open(\\'M.ciniki_library_main.menu.open();\\',\\'' + d.item.id + '\\');';\n };\n this.menu.liveSearchResultRowStyle = function(s, f, i, d) { return ''; };\n// Currently not allowing full search\n// this.menu.liveSearchSubmitFn = function(s, search_str) {\n// M.ciniki_library_main.searchArtCatalog('M.ciniki_library_main.menu.open();', search_str);\n// };\n this.menu.cellValue = function(s, i, j, d) {\n if( s == 'formats' ) {\n return d.format.item_format_text + ' <span class=\"count\">' + d.format.num_items + '</span>';\n }\n if( s == 'genres' ) {\n return d.name.tag_name + ' <span class=\"count\">' + d.name.num_items + '</span>';\n }\n if( s == 'tags' ) {\n return d.name.tag_name + ' <span class=\"count\">' + d.name.num_items + '</span>';\n }\n if( s == 'locations' ) {\n return (d.location.name==''?'Unknown':d.location.name) + ' <span class=\"count\">' + d.location.num_items + '</span>';\n }\n if( s == 'purchased_places' ) {\n return d.place.purchased_place + ' <span class=\"count\">' + d.place.num_items + '</span>';\n }\n if( s == 'items' ) {\n if( this.title == 'Wanted' && j > 1 ) {\n d.item[this.sections[s].dataMaps[j]]\n var r = (d.item[this.sections[s].dataMaps[j]]!=null?d.item[this.sections[s].dataMaps[j]]:0);\n var v = '';\n for(k=1;k<6;k++) {\n v += '<span class=\"' + (k>r?'rating_off':'rating_on') + '\" onclick=\"event.stopPropagation();M.ciniki_library_main.updateRating(event,\\'' + d.item.id + '\\',\\'' + this.sections[s].dataMaps[j] + '\\',\\'' + (k==r?0:k) + '\\');\">$</span>';\n }\n return v;\n }\n return d.item[this.sections[s].dataMaps[j]];\n }\n };\n this.menu.cellSortValue = function(s, i, j, d) {\n if( s == 'items' ) {\n if( j == 0 ) {\n return d.item.author_sort;\n }\n if( j > 1 ) {\n if( d.item[this.sections[s].dataMaps[j]] != null ) { \n return d.item[this.sections[s].dataMaps[j]];\n }\n return 0;\n }\n }\n };\n this.menu.rowFn = function(s, i, d) {\n if( s == 'formats' ) {\n return 'M.ciniki_library_main.list.open(\\'M.ciniki_library_main.menu.open();\\',\\'' + escape(d.format.item_format_text) + '\\',\\'format\\',\\'' + M.ciniki_library_main.menu.item_type + '\\',null,null,\\'' + d.format.item_format + '\\');'\n }\n if( s == 'genres' ) {\n return 'M.ciniki_library_main.list.open(\\'M.ciniki_library_main.menu.open();\\',\\'' + escape(d.name.tag_name) + '\\',\\'genre\\',\\'' + M.ciniki_library_main.menu.item_type + '\\',\\'' + d.name.tag_type + '\\',\\'' + d.name.permalink + '\\');'\n }\n if( s == 'tags' ) {\n return 'M.ciniki_library_main.list.open(\\'M.ciniki_library_main.menu.open();\\',\\'' + escape(d.name.tag_name) + '\\',\\'tag\\',\\'' + M.ciniki_library_main.menu.item_type + '\\',\\'' + d.name.tag_type + '\\',\\'' + d.name.permalink + '\\');'\n }\n if( s == 'locations' ) {\n return 'M.ciniki_library_main.list.open(\\'M.ciniki_library_main.menu.open();\\',\\'' + escape(d.location.name) + '\\',\\'location\\',\\'' + M.ciniki_library_main.menu.item_type + '\\',null,null,null,null,\\'' + escape(d.location.name) + '\\');'\n }\n if( s == 'purchased_places' ) {\n return 'M.ciniki_library_main.list.open(\\'M.ciniki_library_main.menu.open();\\',\\'' + escape(d.place.purchased_place) + '\\',\\'purchased_place\\',\\'' + M.ciniki_library_main.menu.item_type + '\\',null,null,null,\\'' + escape(d.place.purchased_place) + '\\');'\n }\n if( s == 'items' ) {\n //return 'M.startApp(\\'ciniki.library.item\\',null,\\'M.ciniki_library_main.menu.open();\\',\\'mc\\',{\\'item_id\\':\\'' + d.item.id + '\\'});';\n return 'M.ciniki_library_main.edit.open(\\'M.ciniki_library_main.menu.open();\\',\\'' + d.item.id + '\\');';\n }\n };\n// this.menu.listCount = function(s, i, d) { \n// if( d.count != null ) { return d.count; }\n// return ''; \n// };\n this.menu.listFn = function(s, i, d) { return d.fn; }\n this.menu.noData = function(s) {\n if( this.sections[s].noData != null ) { return this.sections[s].noData; }\n return '';\n }\n this.menu.sectionData = function(s) { \n if( s == 'menu' ) { return this.sections[s].list; }\n return this.data[s];\n };\n this.menu.open = function(cb, item_type) {\n if( cb != null ) { this.cb = cb; }\n if( item_type != null ) { \n this.item_type = item_type; \n this.sections.tabs.selected = item_type; \n }\n this.data = {};\n this.list_type = '';\n M.api.getJSONCb('ciniki.library.itemStats', {'tnid':M.curTenantID}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_library_main.menu;\n p.data = rsp;\n // \n // Add the uncategoried to bottom of genres\n //\n for(i in p.data.item_types) {\n if( p.data.item_types[i].type.item_type == p.item_type ) {\n // If we find a matching item_type, then go through the tag types to find the genres\n for(j in p.data.item_types[i].type.tag_types) {\n if( p.data.item_types[i].type.tag_types[j].type.tag_type == '20' ) {\n // Look for tag type to add uncategoried for genre\n if( p.data.item_types[i].type.tag_types[j].type.uncategorized != null \n && p.data.item_types[i].type.tag_types[j].type.uncategorized > 0 ) {\n p.data.item_types[i].type.tag_types[j].type.names.push({'name':{'permalink':'', \n 'tag_name':'No Genre', 'tag_type':'20',\n 'num_items':p.data.item_types[i].type.tag_types[j].type.uncategorized}});\n }\n }\n }\n }\n }\n p.switchMenuTab(p.item_type);\n });\n };\n this.menu.switchMenuTab = function(item_type) {\n var p = this;\n this.item_type = item_type;\n this.sections.tabs.selected = item_type;\n //\n // Go through the list of item types looking for a match to this item type\n //\n this.data.formats = [];\n this.data.genres = [];\n this.data.tags = [];\n this.data.purchased_places = [];\n this.data.locations = [];\n this.sections.menu.visible = 'no';\n this.sections.menu.list.wanted.count = 0;\n this.sections.menu.list.wanted.visible = 'no';\n for(i in this.data.item_types) {\n if( this.data.item_types[i].type.item_type == this.item_type ) {\n if( this.data.item_types[i].type.wanted != null ) {\n this.sections.menu.list.wanted.count = this.data.item_types[i].type.wanted;\n this.sections.menu.visible = 'yes';\n this.sections.menu.list.wanted.visible = 'yes';\n }\n // \n // If we find a matching item_type, then go through the tag types to find the genres\n //\n if( this.data.item_types[i].type.formats != null ) {\n this.data.formats = this.data.item_types[i].type.formats;\n }\n for(j in this.data.item_types[i].type.tag_types) {\n if( this.data.item_types[i].type.tag_types[j].type.tag_type == '20' ) {\n this.data.genres = this.data.item_types[i].type.tag_types[j].type.names;\n }\n if( this.data.item_types[i].type.tag_types[j].type.tag_type == '40' ) {\n this.data.tags = this.data.item_types[i].type.tag_types[j].type.names;\n }\n }\n if( this.data.item_types[i].type.locations != null ) {\n this.data.locations = this.data.item_types[i].type.locations;\n }\n if( this.data.item_types[i].type.purchased_places != null ) {\n this.data.purchased_places = this.data.item_types[i].type.purchased_places;\n }\n }\n }\n var ct = 0;\n this.sections.formats.visible = (this.data.formats.length==0?'no':'yes');\n if( this.data.genres.length == 0 ) {\n this.sections.genres.visible = 'no';\n this.sections._tabs.tabs.genres.visible = 'no';\n } else {\n this.sections.genres.visible = 'yes';\n this.sections._tabs.tabs.genres.visible = 'yes';\n ct++;\n }\n if( this.data.tags.length == 0 ) {\n this.sections.tags.visible = 'no';\n this.sections._tabs.tabs.tags.visible = 'no';\n } else {\n this.sections.tags.visible = 'yes';\n this.sections._tabs.tabs.tags.visible = 'yes';\n ct++;\n }\n if( this.data.locations.length == 0 ) {\n this.sections.locations.visible = 'no';\n this.sections._tabs.tabs.locations.visible = 'no';\n } else {\n this.sections.locations.visible = 'yes';\n this.sections._tabs.tabs.locations.visible = 'yes';\n ct++;\n }\n if( this.data.purchased_places.length == 0 ) {\n this.sections.purchased_places.visible = 'no';\n this.sections._tabs.tabs.purchased_places.visible = 'no';\n } else {\n this.sections.purchased_places.visible = 'yes';\n this.sections._tabs.tabs.purchased_places.visible = 'yes';\n ct++;\n }\n if( ct > 1 ) {\n this.sections._tabs.visible = 'yes';\n }\n\n this.switchTab();\n }\n this.menu.switchTab = function(tab) {\n var p = this;\n if( tab != null ) { this.cur_tab = tab; }\n //\n // Setup the tabs\n //\n for(i in this.sections._tabs.tabs) {\n if( this.cur_tab == i ) {\n this.sections[i].visible = 'yes';\n this.sections._tabs.selected = i;\n } else {\n this.sections[i].visible = 'no';\n }\n }\n if( this.list_type != null && this.list_type != '' ) {\n this.size = 'medium mediumaside';\n this.sections.items.visible = 'yes';\n M.ciniki_library_main.list.open();\n } else {\n this.size = 'medium';\n this.sections.items.visible = 'no';\n this.refresh();\n this.show();\n }\n }\n this.menu.addButton('add', 'Add', 'M.ciniki_library_main.edit.open(\\'M.ciniki_library_main.menu.open();\\',0);');\n //'M.startApp(\\'ciniki.library.item\\',null,\\'M.ciniki_library_main.menu.open();\\',\\'mc\\',{\\'add\\':M.ciniki_library_main.menu.item_type});');\n// this.menu.addButton('tools', 'Tools', 'M.ciniki_library_main.tools.show(\\'M.ciniki_library_main.menu.open();\\');');\n this.menu.addClose('Back');\n\n //\n // The album list\n //\n this.list = new M.panel('Library', 'ciniki_library_main', 'list', 'mc', 'medium mediumflex', 'sectioned', 'ciniki.library.main.list');\n this.list.data = {};\n this.list.item_type = 10;\n this.list.sections = {\n 'search':{'label':'', 'autofocus':'yes', 'type':'livesearchgrid', 'livesearchcols':1,\n 'hint':'Search', \n 'noData':'No items found',\n 'headerValues':null,\n },\n 'items':{'label':'', 'type':'simplegrid', 'num_cols':1,\n 'sortable':'yes',\n },\n };\n this.list.liveSearchCb = function(s, i, v) {\n if( v != '' ) {\n M.api.getJSONBgCb('ciniki.library.itemSearch', {'tnid':M.curTenantID, 'start_needle':v, 'flags':(M.ciniki_library_main.list.title=='Wanted'?2:0), 'limit':'15'},\n function(rsp) {\n M.ciniki_library_main.list.liveSearchShow(s, null, M.gE(M.ciniki_library_main.list.panelUID + '_' + s), rsp.items);\n });\n }\n return true;\n };\n this.list.liveSearchResultValue = this.menu.liveSearchResultValue;\n this.list.liveSearchResultRowFn = function(s, f, i, j, d) {\n return 'M.ciniki_library_main.edit.open(\\'M.ciniki_library_main.menu.open();\\',\\'' + d.item.id + '\\');';\n // return 'M.startApp(\\'ciniki.library.item\\',null,\\'M.ciniki_library_main.list.open();\\',\\'mc\\',{\\'item_id\\':\\'' + d.item.id + '\\'});';\n };\n this.list.liveSearchResultRowStyle = function(s, f, i, d) { return ''; };\n// Currently not allowing full search\n// this.list.liveSearchSubmitFn = function(s, search_str) {\n// M.ciniki_library_main.searchArtCatalog('M.ciniki_library_main.menu.open();', search_str);\n// };\n this.list.sectionData = function(s) { \n return this.data[s];\n };\n this.list.cellValue = function(s, i, j, d) {\n if( this.title == 'Wanted' && j > 1 ) {\n d.item[this.sections[s].dataMaps[j]]\n var r = (d.item[this.sections[s].dataMaps[j]]!=null?d.item[this.sections[s].dataMaps[j]]:0);\n var v = '';\n for(k=1;k<6;k++) {\n v += '<span class=\"' + (k>r?'rating_off':'rating_on') + '\" onclick=\"event.stopPropagation();M.ciniki_library_main.updateRating(event,\\'' + d.item.id + '\\',\\'' + this.sections[s].dataMaps[j] + '\\',\\'' + (k==r?0:k) + '\\');\">$</span>';\n }\n return v;\n }\n return d.item[this.sections[s].dataMaps[j]];\n };\n this.list.cellSortValue = function(s, i, j, d) {\n if( j == 0 ) {\n return d.item.author_sort;\n }\n if( j > 1 ) {\n if( d.item[this.sections[s].dataMaps[j]] != null ) { \n return d.item[this.sections[s].dataMaps[j]];\n }\n return 0;\n }\n };\n this.list.cellFn = function(s, i, j, d) {\n if( this.title == 'Wanted' && j > 1 ) {\n return 'event.stopPropagation();';\n }\n };\n this.list.rowFn = function(s, i, d) {\n return 'M.ciniki_library_main.edit.open(\\'M.ciniki_library_main.menu.open();\\',\\'' + d.item.id + '\\');';\n // return 'M.startApp(\\'ciniki.library.item\\',null,\\'M.ciniki_library_main.list.open();\\',\\'mc\\',{\\'item_id\\':\\'' + d.item.id + '\\'});';\n };\n this.list.footerValue = function(s, i, d) {\n if( s == 'items' && this.list_type == 'purchased_place' && this.data.totals != null ) {\n switch(i) {\n case 4: return this.data.totals.purchased_price;\n }\n return '';\n }\n return null;\n };\n this.list.addButton('add', 'Add', 'M.ciniki_library_main.edit.open(\\'M.ciniki_library_main.menu.open();\\',0);');\n// 'M.startApp(\\'ciniki.library.item\\',null,\\'M.ciniki_library_main.list.open();\\',\\'mc\\',{\\'add\\':M.ciniki_library_main.list.item_type});');\n this.list.addClose('Back');\n\n //\n // The panel for display the list of places and amount spent\n //\n this.purchased = new M.panel('Purchased', 'ciniki_library_main', 'purchased', 'mc', 'medium', 'sectioned', 'ciniki.library.main.purchased');\n this.purchased.data = {};\n this.purchased.item_type = 10;\n this.purchased.sections = {\n 'places':{'label':'Purchased', 'type':'simplegrid', 'num_cols':2,\n 'headerValues':['Place', 'Amount'],\n 'sortable':'yes',\n 'sortTypes':['text', 'altnumber'],\n 'noData':'No places found',\n },\n };\n this.purchased.sectionData = function(s) { \n return this.data[s];\n };\n this.purchased.cellValue = function(s, i, j, d) {\n switch(j) {\n case 0: return d.place.name;\n case 1: return d.place.total_amount;\n }\n };\n this.purchased.cellSortValue = function(s, i, j, d) {\n switch(j) {\n case 0: return d.place.name;\n case 1: return d.place.total_amount.replace(/\\$/, '');\n }\n };\n this.purchased.rowFn = function(s, i, d) {\n return 'M.ciniki_library_main.list.open(\\'M.ciniki_library_main.purchased.open();\\',\\'' + escape(d.place.name) + '\\',\\'purchased_place\\',\\'' + M.ciniki_library_main.purchased.item_type + '\\',null,null,null,\\'' + escape(d.place.name) + '\\');'\n };\n this.purchased.footerValue = function(s, i, d) {\n if( this.data.totals != null ) {\n switch(i) {\n case 1: return this.data.totals.total_amount;\n }\n return '';\n }\n return null;\n };\n this.purchased.open = function(cb, item_type) {\n if( item_type != null ) { this.item_type = item_type; }\n M.api.getJSONCb('ciniki.library.purchasedStats', {'tnid':M.curTenantID, 'item_type':this.item_type}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_library_main.purchased;\n p.data = rsp;\n p.refresh();\n p.show(cb);\n });\n };\n this.list.open = function(cb, title, list_type, item_type, tag_type, tag_permalink, format, purchased_place, location) {\n if( M.size == 'normal' ) {\n var p = M.ciniki_library_main.menu;\n p.sections.items.visible = 'yes';\n p.size = 'medium mediumaside';\n } else {\n var p = M.ciniki_library_main.list;\n M.ciniki_library_main.menu.sections.items.visible = 'no';\n M.ciniki_library_main.menu.size = 'medium';\n }\n if( title != null ) { p.title = unescape(title); p.sections.items.label = unescape(title); }\n if( list_type != null ) { p.list_type = list_type; }\n if( item_type != null ) { p.item_type = item_type; }\n if( tag_type != null ) { p.tag_type = tag_type; }\n if( tag_permalink != null ) { p.tag_permalink = tag_permalink; }\n if( format != null ) { p.item_format = format; }\n if( purchased_place != null ) { p.purchased_place = unescape(purchased_place); }\n if( location != null ) { p.location = unescape(location); }\n if( p.item_type == '10' ) {\n p.sections.items.num_cols = 3;\n p.sections.items.headerValues = ['Artist', 'Album', 'Year'];\n p.sections.items.sortTypes = ['alttext', 'text', 'number'];\n p.sections.items.dataMaps = ['author_display', 'title', 'year'];\n } else if( p.item_type == '20' ) {\n p.sections.items.num_cols = 3;\n p.sections.items.headerValues = ['Author', 'Title', 'Year'];\n p.sections.items.sortTypes = ['alttext', 'text', 'number'];\n p.sections.items.dataMaps = ['author_display', 'title', 'year'];\n }\n if( p.list_type == 'genre' || p.list_type == 'tag' ) {\n M.api.getJSONCb('ciniki.library.itemList', {'tnid':M.curTenantID, \n 'item_type':p.item_type, 'tag_type':p.tag_type, \n 'tag_permalink':p.tag_permalink, 'flags':0x01}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n// var p = M.ciniki_library_main.list;\n// p.data = rsp;\n p.data.items = rsp.items;\n p.refresh();\n p.show(cb);\n });\n } \n else if( p.list_type == 'format' ) {\n M.api.getJSONCb('ciniki.library.itemList', {'tnid':M.curTenantID, \n 'item_type':p.item_type, 'flags':0x01, 'item_format':p.item_format}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n// var p = M.ciniki_library_main.list;\n// p.data = rsp;\n p.data.items = rsp.items;\n p.refresh();\n p.show(cb);\n });\n } \n else if( p.list_type == 'location' ) {\n M.api.getJSONCb('ciniki.library.itemList', {'tnid':M.curTenantID, \n 'item_type':p.item_type, 'flags':0x01, 'location':encodeURIComponent(p.location)}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n// var p = M.ciniki_library_main.list;\n// p.data = rsp;\n p.data.items = rsp.items;\n p.refresh();\n p.show(cb);\n });\n } \n else if( p.list_type == 'purchased_place' ) {\n p.sections.items.num_cols = 5;\n p.sections.items.headerValues[2] = 'Place';\n p.sections.items.headerValues[3] = 'Date';\n p.sections.items.headerValues[4] = 'Price';\n p.sections.items.sortTypes = ['alttext', 'text', 'number', 'text', 'date', 'number'];\n p.sections.items.dataMaps = ['author_display', 'title', 'purchased_place', 'purchased_date', 'purchased_price'];\n M.api.getJSONCb('ciniki.library.itemList', {'tnid':M.curTenantID, \n 'item_type':p.item_type, 'flags':0x01, 'purchased_place':encodeURIComponent(p.purchased_place)}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n// var p = M.ciniki_library_main.list;\n// p.data = rsp;\n p.data.items = rsp.items;\n p.refresh();\n p.show(cb);\n });\n } \n else if( p.list_type == 'wanted' ) {\n p.sections.items.num_cols = 3;\n p.sections.items.headerValues = ['Author', 'Title'];\n var col = 2;\n for(i in M.curTenant.employees) {\n p.sections.items.headerValues[col] = M.curTenant.employees[i];\n p.sections.items.sortTypes[col] = 'altnumber';\n p.sections.items.dataMaps[col] = 'user-' + i + '-rating';\n col++;\n }\n p.sections.items.num_cols = col;\n M.api.getJSONCb('ciniki.library.itemListWanted', {'tnid':M.curTenantID, \n 'item_type':p.item_type}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n// var p = M.ciniki_library_main.list;\n p.data.items = rsp.items;\n p.refresh();\n p.show(cb);\n });\n }\n };\n this.list.showWanted = function() {\n this.open('M.ciniki_library_main.menu.open();','Wanted','wanted',M.ciniki_library_main.menu.item_type);\n };\n this.purchased.addClose('Back');\n\n //\n // The edit panel\n //\n this.edit = new M.panel('Item', 'ciniki_library_main', 'edit', 'mc', 'medium mediumaside', 'sectioned', 'ciniki.library.main.edit');\n this.edit.item_id = 0;\n this.edit.data = {'item_type':10};\n this.edit.owned_wanted = 'owned';\n this.edit.formtabs = {'label':'', 'field':'item_type', 'tabs':{}};\n this.edit.forms = {};\n this.edit.forms.music = {\n '_image':{'label':'', 'aside':'yes', 'type':'imageform', 'fields':{\n 'primary_image_id':{'label':'', 'type':'image_id', 'hidelabel':'yes', 'controls':'all', 'history':'no'},\n }},\n 'details':{'label':'', 'aside':'yes', 'fields':{\n 'item_format':{'label':'Format', 'type':'toggle', 'default':'11', 'toggles':this.musicFormats},\n 'title':{'label':'Title', 'type':'text'},\n 'author_display':{'label':'Artist/Band', 'type':'text', 'livesearch':'yes', 'livesearchempty':'no'},\n 'author_sort':{'label':'Sort Artist', 'type':'text', 'livesearch':'yes', 'livesearchempty':'no'},\n 'year':{'label':'Year', 'type':'text'},\n 'location':{'label':'Location', 'type':'text'},\n// 'flags':{'label':'Options', 'type':'flags', 'flags':this.musicFlags},\n }},\n '_owned':{'label':'', 'type':'paneltabs', 'aside':'yes', 'selected':'owned', 'tabs':{\n 'owned':{'label':'Owned', 'fn':'M.ciniki_library_main.edit.toggleOwnedWanted(\\'owned\\');'},\n 'wanted':{'label':'Wanted', 'fn':'M.ciniki_library_main.edit.toggleOwnedWanted(\\'wanted\\');'},\n }},\n 'ratings':{'label':'', 'aside':'yes', 'visible':'yes', 'aside':'yes', 'fields':{\n }},\n 'purchased':{'label':'', 'aside':'yes', 'visible':'hidden', 'aside':'yes', 'fields':{\n 'purchased_date':{'label':'Purchased Date', 'type':'date'},\n 'purchased_price':{'label':'Purchased Price', 'type':'text'},\n 'purchased_place':{'label':'Purchased Place', 'type':'text', 'livesearch':'yes', 'livesearchempty':'yes'},\n }},\n '_genres':{'label':'Genres', 'aside':'yes', 'fields':{\n 'genres':{'label':'', 'hidelabel':'yes', 'type':'tags', 'tags':[], 'hint':'Enter a new genre:'},\n }},\n '_tags':{'label':'Tags', 'aside':'yes', 'fields':{\n 'tags':{'label':'', 'hidelabel':'yes', 'type':'tags', 'tags':[], 'hint':'Enter a new tag:'},\n }},\n '_synopsis':{'label':'Synopsis', 'fields':{\n 'synopsis':{'label':'', 'hidelabel':'yes', 'type':'textarea', 'size':'small'},\n }},\n '_description':{'label':'Description', 'fields':{\n 'description':{'label':'', 'hidelabel':'yes', 'type':'textarea', 'size':'large'},\n }},\n '_notes':{'label':'Notes', 'fields':{\n 'notes':{'label':'', 'hidelabel':'yes', 'type':'textarea', 'size':'small'},\n }},\n '_buttons':{'label':'', 'buttons':{\n 'save':{'label':'Save', 'fn':'M.ciniki_library_main.edit.save();'},\n 'delete':{'label':'Delete', 'fn':'M.ciniki_library_main.edit.remove();'},\n }},\n };\n this.edit.forms.book = {\n '_image':{'label':'', 'aside':'yes', 'type':'imageform', 'fields':{\n 'primary_image_id':{'label':'', 'type':'image_id', 'hidelabel':'yes', 'controls':'all', 'history':'no'},\n }},\n 'details':{'label':'', 'aside':'yes', 'fields':{\n 'item_format':{'label':'Format', 'type':'toggle', 'default':'11', 'toggles':this.bookFormats},\n 'title':{'label':'Title', 'type':'text'},\n 'author_display':{'label':'Author', 'type':'text', 'livesearch':'yes', 'livesearchempty':'no'},\n 'author_sort':{'label':'Sort Author', 'type':'text', 'livesearch':'yes', 'livesearchempty':'no'},\n 'year':{'label':'Year', 'type':'text'},\n 'location':{'label':'Location', 'type':'text'},\n// 'flags':{'label':'Options', 'type':'flags', 'flags':this.bookFlags},\n }},\n '_owned':{'label':'', 'aside':'yes', 'type':'paneltabs', 'selected':'owned', 'tabs':{\n 'owned':{'label':'Owned', 'fn':'M.ciniki_library_main.edit.toggleOwnedWanted(\\'owned\\');'},\n 'wanted':{'label':'Wanted', 'fn':'M.ciniki_library_main.edit.toggleOwnedWanted(\\'wanted\\');'},\n }},\n 'ratings':{'label':'', 'aside':'yes', 'visible':'yes', 'aside':'yes', 'fields':{\n }},\n 'purchased':{'label':'', 'active':'no', 'aside':'yes', 'fields':{\n 'purchased_date':{'label':'Purchased Date', 'type':'date'},\n 'purchased_price':{'label':'Purchased Price', 'type':'text'},\n 'purchased_place':{'label':'Purchased Place', 'type':'text', 'livesearch':'yes', 'livesearchempty':'yes'},\n }},\n '_genres':{'label':'Genres', 'aside':'yes', 'fields':{\n 'genres':{'label':'', 'hidelabel':'yes', 'type':'tags', 'tags':[], 'hint':'Enter a new genre:'},\n }},\n '_tags':{'label':'Tags', 'aside':'yes', 'fields':{\n 'tags':{'label':'', 'hidelabel':'yes', 'type':'tags', 'tags':[], 'hint':'Enter a new tag:'},\n }},\n '_synopsis':{'label':'Synopsis', 'fields':{\n 'synopsis':{'label':'', 'hidelabel':'', 'type':'textarea', 'size':'small'},\n }},\n '_description':{'label':'Description', 'fields':{\n 'description':{'label':'', 'hidelabel':'', 'type':'textarea', 'size':'large'},\n }},\n '_notes':{'label':'Notes', 'fields':{\n 'notes':{'label':'', 'hidelabel':'', 'type':'textarea', 'size':'small'},\n }},\n '_buttons':{'label':'', 'buttons':{\n 'save':{'label':'Save', 'fn':'M.ciniki_library_main.edit.save();'},\n 'delete':{'label':'Delete', 'fn':'M.ciniki_library_main.edit.remove();'},\n }},\n };\n this.edit.sectionData = function(s) { \n return this.data[s]; \n };\n this.edit.fieldValue = function(s, i, d) {\n return this.data[i];\n };\n this.edit.liveSearchCb = function(s, i, value) {\n if( i == 'author_display' || i == 'author_sort' || i == 'purchased_place') {\n var rsp = M.api.getJSONBgCb('ciniki.library.itemSearchField', {'tnid':M.curTenantID, 'field':i, 'start_needle':value, 'limit':15},\n function(rsp) {\n M.ciniki_library_main.edit.liveSearchShow(s, i, M.gE(M.ciniki_library_main.edit.panelUID + '_' + i), rsp.results);\n });\n }\n };\n this.edit.liveSearchResultValue = function(s, f, i, j, d) {\n if( (f == 'author_display' || f == 'author_sort' || f == 'purchased_place' ) && d.result != null ) { \n return d.result.name;\n }\n return '';\n };\n this.edit.liveSearchResultRowFn = function(s, f, i, j, d) { \n if( (f == 'author_display' || f == 'author_sort' ) && d.result != null ) {\n return 'M.ciniki_library_main.edit.updateAuthor(\\'' + s + '\\',\\'' + f + '\\',\\'' + escape(d.result.author_display) + '\\',\\'' + escape(d.result.author_sort) + '\\');';\n }\n if( f == 'purchased_place' && d.result != null ) {\n return 'M.ciniki_library_main.edit.updateField(\\'' + s + '\\',\\'' + f + '\\',\\'' + escape(d.result.name) + '\\');';\n }\n };\n this.edit.updateAuthor = function(s, fid, author_display, author_sort) {\n M.gE(this.panelUID + '_author_display').value = unescape(author_display);\n M.gE(this.panelUID + '_author_sort').value = unescape(author_sort);\n this.removeLiveSearch(s, fid);\n };\n this.edit.updateField = function(s, fid, result) {\n M.gE(this.panelUID + '_' + fid).value = unescape(result);\n this.removeLiveSearch(s, fid);\n };\n this.edit.fieldHistoryArgs = function(s, i) {\n return {'method':'ciniki.library.itemHistory', 'args':{'tnid':M.curTenantID, 'item_id':this.item_id, 'field':i}};\n };\n this.edit.addDropImage = function(iid) {\n M.ciniki_library_main.edit.setFieldValue('primary_image_id', iid, null, null);\n return true;\n };\n this.edit.deleteImage = function(fid) {\n this.setFieldValue(fid, 0, null, null);\n return true;\n };\n this.edit.open = function(cb, iid, type) {\n if( iid != null ) { this.item_id = iid; }\n if( type != null ) { this.item_type = type; }\n if( this.item_id > 0 ) {\n this.forms.music._buttons.buttons.delete.visible = 'yes';\n this.forms.book._buttons.buttons.delete.visible = 'yes';\n M.api.getJSONCb('ciniki.library.itemGet', {'tnid':M.curTenantID,\n 'item_id':this.item_id, 'tags':'yes'}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_library_main.edit;\n p.data = rsp.item;\n var genres = [];\n if( rsp.genres != null ) {\n for(i in rsp.genres) { genres.push(rsp.genres[i].tag.name); }\n }\n var tags = [];\n if( rsp.tags != null ) {\n for(i in rsp.tags) { tags.push(rsp.tags[i].tag.name); }\n }\n p.forms.music._genres.fields.genres.tags = genres;\n p.forms.book._genres.fields.genres.tags = genres;\n p.forms.music._tags.fields.tags.tags = tags;\n p.forms.book._tags.fields.tags.tags = tags;\n if( (p.data.flags&0x02) == 2 ) {\n M.ciniki_library_main.edit.toggleOwnedWanted('wanted');\n } else {\n M.ciniki_library_main.edit.toggleOwnedWanted('owned');\n }\n p.refresh();\n p.show(cb);\n });\n } else {\n this.reset();\n this.forms.music._buttons.buttons.delete.visible = 'no';\n this.forms.book._buttons.buttons.delete.visible = 'no';\n // Get tags\n M.api.getJSONCb('ciniki.library.itemTags', {'tnid':M.curTenantID, \n 'item_type':this.item_type}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_library_main.edit;\n p.data = {'flags':1, 'item_type':M.ciniki_library_main.edit.item_type};\n var genres = [];\n if( rsp.genres != null ) {\n for(i in rsp.genres) { genres.push(rsp.genres[i].tag.name); }\n }\n var tags = [];\n if( rsp.tags != null ) {\n for(i in rsp.tags) { tags.push(rsp.tags[i].tag.name); }\n }\n p.forms.music._genres.fields.genres.tags = genres;\n p.forms.book._genres.fields.genres.tags = genres;\n p.forms.music._tags.fields.tags.tags = tags;\n p.forms.book._tags.fields.tags.tags = tags;\n p.cb = cb;\n if( (p.data.flags&0x02) == 2 ) {\n M.ciniki_library_main.edit.toggleOwnedWanted('wanted');\n } else {\n M.ciniki_library_main.edit.toggleOwnedWanted('owned');\n }\n p.refresh();\n p.show(cb);\n });\n }\n };\n this.edit.toggleOwnedWanted = function(v, r) {\n if( v == 'owned') {\n this.forms.music._owned.selected = 'owned';\n this.forms.book._owned.selected = 'owned';\n this.forms.music.purchased.visible = 'yes';\n this.forms.book.purchased.visible = 'yes';\n if( this.sections.purchased != null ) {\n this.sections.purchased.visible = 'yes';\n }\n this.forms.music.ratings.label = 'Ratings';\n this.forms.book.ratings.label = 'Ratings';\n for(i in this.forms.music.ratings.fields) {\n this.forms.music.ratings.fields[i].toggles = this.ratingToggles;\n this.forms.book.ratings.fields[i].toggles = this.ratingToggles;\n }\n if( this.sections.ratings != null && this.sections.ratings.label != '' ) {\n this.sections.ratings.label = 'Ratings';\n }\n } else {\n this.forms.music._owned.selected = 'wanted';\n this.forms.book._owned.selected = 'wanted';\n this.forms.music.purchased.visible = 'hidden';\n this.forms.book.purchased.visible = 'hidden';\n if( this.sections.purchased != null ) {\n this.sections.purchased.visible = 'hidden';\n }\n this.forms.music.ratings.label = 'Priority';\n this.forms.book.ratings.label = 'Priority';\n for(i in this.forms.music.ratings.fields) {\n this.forms.music.ratings.fields[i].toggles = this.priorityToggles;\n this.forms.book.ratings.fields[i].toggles = this.priorityToggles;\n }\n if( this.sections.ratings != null && this.sections.ratings.label != '' ) {\n this.sections.ratings.label = 'Priority';\n }\n }\n if( r == null || r == 'yes' ) {\n this.refreshSection('_owned');\n this.refreshSection('ratings');\n this.refreshSection('purchased');\n }\n// this.edit.show();\n };\n this.edit.save = function() {\n var f = 1;\n if( this.sections._owned.selected == 'wanted' ) {\n f = 2;\n }\n if( this.item_id > 0 ) {\n var c = this.serializeForm('no');\n if( f != this.data.flags ) {\n c += '&flags=' + f;\n }\n if( c != '' ) {\n M.api.postJSONCb('ciniki.library.itemUpdate', {'tnid':M.curTenantID,\n 'item_id':this.item_id}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_library_main.edit.close();\n });\n } else {\n this.close();\n }\n } else {\n var c = this.serializeForm('yes');\n c += 'flags=' + f + '&';\n M.api.postJSONCb('ciniki.library.itemAdd', {'tnid':M.curTenantID}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_library_main.edit.close();\n });\n }\n };\n this.edit.remove = function() {\n if( this.item_id <= 0 ) { return false; }\n M.confirm(\"Are you sure you want to remove this item from the library?\",null,function() {\n M.api.getJSONCb('ciniki.library.itemDelete', {'tnid':M.curTenantID, 'item_id':M.ciniki_library_main.edit.item_id}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_library_main.edit.close();\n });\n });\n };\n this.edit.addButton('save', 'Save', 'M.ciniki_library_main.edit.save();');\n this.edit.addClose('Cancel');\n\n //\n // Start the app\n //\n this.start = function(cb, appPrefix, aG) {\n args = {};\n if( aG != null ) { args = eval(aG); }\n\n //\n // Create container\n //\n var appContainer = M.createContainer(appPrefix, 'ciniki_library_main', 'yes');\n if( appContainer == null ) {\n M.alert('App Error');\n return false;\n }\n\n //\n // Decide what to display\n //\n this.edit.formtabs.tabs = {};\n this.menu.sections.tabs.tabs = {};\n var default_tab = 0;\n var ct = 0;\n if( M.modFlagOn('ciniki.library', 0x01) ) {\n default_tab = 10;\n ct++;\n this.menu.sections.tabs.tabs['10'] = {'label':'Music', 'fn':'M.ciniki_library_main.menu.switchMenuTab(\\'10\\');'};\n this.edit.formtabs.tabs['music'] = {'label':'Music', 'field_id':10};\n }\n if( M.modFlagOn('ciniki.library', 0x02) ) {\n if( default_tab == 0 ) { default_tab = 20; }\n ct++;\n this.menu.sections.tabs.tabs['20'] = {'label':'Books', 'fn':'M.ciniki_library_main.menu.switchMenuTab(\\'20\\');'};\n this.edit.formtabs.tabs['book'] = {'label':'Books', 'field_id':20};\n }\n this.menu.sections.tabs.visible = (ct>1?'yes':'no');\n this.edit.formtabs.selected = default_tab;\n this.edit.formtabs.visible = (ct>1?'yes':'no');\n\n //\n // Check if Wanted is turned on\n //\n if( M.modFlagOn('ciniki.library', 0x04) ) {\n this.menu.sections.menu.list.wanted.visible = 'yes';\n this.menu.sections.menu.visible = 'yes';\n } else {\n this.menu.sections.menu.list.wanted.visible = 'no';\n this.menu.sections.menu.visible = 'no';\n }\n\n //\n // Check if wanted is enabled\n //\n if( M.modFlagOn('ciniki.library', 0x08) ) {\n this.edit.forms.music._owned.visible = 'yes';\n this.edit.forms.book._owned.visible = 'yes';\n } else {\n this.edit.forms.music._owned.visible = 'no';\n this.edit.forms.book._owned.visible = 'no';\n }\n\n //\n // Check if ratings/priorities are enabled\n //\n if( M.modFlagOn('ciniki.library', 0x08) ) {\n //\n // Setup the employee ratings\n //\n var fields = {};\n if( M.curTenant.employees != null) {\n var ct = 0;\n var uid = 0;\n for(i in M.curTenant.employees) {\n fields['user-' + i + '-rating'] = {'label':M.curTenant.employees[i], 'type':'toggle', 'none':'yes', 'toggles':this.ratingToggles};\n uid = i;\n ct++;\n }\n if( ct == 1 ) {\n this.edit.forms.music.ratings.label = '';\n fields['user-' + uid + '-rating'].label = 'Your Rating';\n } else {\n this.edit.forms.music.ratings.label = 'Ratings';\n }\n }\n this.edit.forms.music.ratings.fields = fields;\n this.edit.forms.book.ratings.fields = fields;\n } else {\n this.edit.forms.music.ratings.fields = {};\n this.edit.forms.book.ratings.fields = 'no';\n this.edit.forms.music.ratings.active = 'no';\n this.edit.forms.book.ratings.active = 'no';\n }\n this.menu.open(cb, default_tab);\n }\n\n this.updateRating = function(e, item_id, field, rating) {\n var args = {'tnid':M.curTenantID, 'item_id':item_id};\n args[field] = rating;\n M.api.getJSONCb('ciniki.library.itemUpdate', args, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_library_main.list;\n p.data = rsp;\n var v = '';\n for(k=1;k<6;k++) {\n v += '<span class=\"' + (k>rating?'rating_off':'rating_on') + '\" onclick=\"event.stopPropagation();M.ciniki_library_main.updateRating(event,\\'' + item_id + '\\',\\'' + field + '\\',\\'' + (k==rating?0:k) + '\\');\">$</span>';\n }\n e.target.parentNode.innerHTML = v;\n });\n };\n}", "function switchClasses() {\n // Toggle shutter navigation\n var $shutterNavSwitcher = $('.shutter-nav-switcher-js'), shutterNavSwitcherJs;\n if ($shutterNavSwitcher.length) {\n shutterNavSwitcherJs = $shutterNavSwitcher.switchClass({\n switchClassTo: $('.shutter-nav-js').add('.shutter-overlay-js')\n , remover: $('.shutter-nav-close-js')\n , modifiers: {\n activeClass: 'shutter-nav_is-open'\n }\n , cssScrollFixed: true\n , removeOutsideClick: true\n });\n }\n\n // При добавлении классов одним экземпляром плагина,\n // вызывать метод удаления классов другими\n shutterNavSwitcherJs.on('switchClass.beforeAdded', function () {\n // otherShutter.switchClass('remove');\n });\n\n // Toggle callback form\n var $callbackFromOpener = $('.form-opener-js');\n\n if ($callbackFromOpener.length) {\n $.each($callbackFromOpener, function () {\n var $thisOpener = $(this),\n $thisDrop = $thisOpener.closest('form').find('.form-drop-js');\n\n $thisOpener.switchClass({\n switchClassTo: $thisDrop\n , modifiers: {\n activeClass: 'form-is-open'\n }\n , cssScrollFixed: false\n , removeOutsideClick: false\n });\n });\n }\n}", "function Light() {}", "static get tag() {\n return \"simple-drawer\";\n }", "function Tools()\n\t{\n\tthis.initTools() ;\n\t}", "constructor() {\n this.gl = new Context('#glCanvas');\n this.controls = document.getElementById('controls');\n\n this.viewControl = new ViewControl(this.gl);\n this.controls.append(this.viewControl.element);\n\n this.lightControl = new LightControl(this.gl);\n this.controls.append(this.lightControl.element);\n\n this.picker = new Picker(this.gl);\n this.controls.append(this.picker.element);\n\n this.textureView = new TextureView(this.gl);\n this.controls.append(this.textureView.element);\n\n this.dlistViewer = new DlistViewer(this.gl.gx);\n this.controls.append(this.dlistViewer.element);\n }", "function f(a){a.className?\"string\"==typeof a.className&&(a.className=a.className.split(/\\s+/)):a.className=[];for(var b=Ia.sourceNormalizers,c=0;c<b.length;c++)b[c](a)}", "function beetle_lvl4() {}", "function Library() {\n \n}", "constructor () {\n this.hdrCubeLoader = new HDRCubeTextureLoader();\n this.gltfLoader = new GLTFLoader();\n this.fbxLoader = new FBXLoader();\n this.jsonLoader = new JSONLoader();\n this.textureLoader = new TextureLoader();\n this.fontLoader = new FontLoader();\n this.isLoaded = false;\n }", "function _interface () {\n\ttry {\n\t\t_jqr ['ui'] = {};\n\t\t_jqr ['ui']['sections'] = {};\n\t\ts = {name: 'Profile', div: '_profile', state:'on', more:{}};\n\t\t_jqr ['ui']['sections']['_profile'] = s;\n\t\ts = {name: 'Skills', div: '_skills', state:'on', more:{}};\n\t\t_jqr ['ui']['sections']['_skills'] = s;\n\t\ts = {name: 'Employment', div: '_employment', state:'on', more:{}};\n\t\t_jqr ['ui']['sections']['_employment'] = s;\n\t\ts = {name: 'Recommendations', div: '_recommendations', state:'on', more:{}};\n\t\t_jqr ['ui']['sections']['_recommendations'] = s;\n\t\ts = {name: 'Examples', div: '_examples', state:'on', more:{}};\n\t\t_jqr ['ui']['sections']['_examples'] = s;\n\t\ts = {name: 'Education', div: '_education', state:'on', more:{}};\n\t\t_jqr ['ui']['sections']['_education'] = s;\n\t\t//_title_toggle ('_education', false);\n\t\t//_title_toggle ('_examples', false);\n\t\t_title_toggle ('_recommendations', false);\n\t\t//_title_toggle ('_employment', false);\n\t\t//_title_toggle ('_skills', false);\n\t\t//_title_toggle ('_profile', false);\n\t\t$( \"._title_toggle\" ).click (function(){\n\t\t\ttry{\n\t\t\t\t_title_toggle ($(this).attr ('title'), true);\n\t\t\t}catch (err){\n\t\t\t\t//alert (err);\n\t\t\t}\n\t\t\treturn false;\n\t\t});\n\t\t////////////////////////////////\n\t\tvar show_menu = false;\n\t\tif (show_menu){\n\t\t\t_jqr_css ($('#_jqr_a'), 'float', 'right');\n\t\t\t_jqr_css ($('#_jqr_b'), 'float', 'left');\n\t\t\t_jqr_css ($('#_jqr_b'), 'width', '20%');\n\t\t\t_jqr_css ($('#_jqr_a'), 'width', '75%');\n\t\t\t_jqr_css ($('#_jqr_b'), 'padding-top', '25px');\n\t\t\t$('#_jqr_b').show ();\n\t\t}else{\n\t\t\t_jqr_css ($('#_jqr_a'), 'float', 'left');\n\t\t\t_jqr_css ($('#_jqr_a'), 'width', '100%');\n\t\t\t$('#_jqr_b').hide ();\n\t\t}\n\t\t//_ui_buttons ();\n\t}catch (err){\n\t\talert ( '_interface\\n\\n'+err);\n\t}\n}", "function Animation() { // A class. An example of a displayable object that our class GL_Context can manage. \n (function init( self ) {\n self.context = new GL_Context( \"gl-canvas\", Color( .6, .9, 1, .7 ) ); // Set your background color here\n\t\tself.context.register_display_object( self );\n\t\t\n shaders = { \"Default\": new Shader( \"vertex-shader-id\", \"fragment-shader-id\" ), \n \"Demo_Shader\": new Shader( \"vertex-shader-id\", \"demo-shader-id\" ) };\n \n\t\tfor( var i = 0; i < texture_filenames_to_load.length; i++ ) {\n\t\t\tinitTexture( texture_filenames_to_load[i], true );\n }\n\n self.mouse = { \"from_center\": vec2() };\n \n self.m_strip = new Old_Square(); // At the beginning of our program, instantiate all shapes we plan to use, \n self.m_tip = new Tip( 3, 10 ); // each with only one instance in the graphics card's memory.\n self.m_cylinder = new Cylindrical_Tube( 10, 10 ); // For example we'll only create one \"cube\" blueprint in the GPU, but we'll re-use \n self.m_torus = new Torus( 25, 25 ); // it many times per call to display to get multiple cubes in the scene.\n self.m_sphere = new Sphere( 10, 10 );\n self.poly = new N_Polygon( 7 );\n self.m_cone = new Cone( 10, 10 );\n self.m_capped = new Capped_Cylinder( 4, 12 );\n self.m_prism = new Prism( 8, 8 );\n self.m_cube = new Cube();\n self.m_obj = new Shape_From_File( \"teapot.obj\", scale( .1, .1, .1 ) );\n self.m_sub = new Subdivision_Sphere( 6, true );\n self.m_axis = new Axis();\n self.m_kite = new Kite();\n self.m_triangle = new Triangle();\n \n // 1st parameter is our starting camera matrix. 2nd parameter is the projection: The matrix that determines how depth is treated. It projects 3D points onto a plane.\n self.graphicsState = new GraphicsState( translation(0, 0,-25), perspective(45, canvas.width/canvas.height, .1, 1000), 0 );\n \n self.context.render();\t\n\t} ) ( this );\n\t\n // *** Mouse controls: ***\n var mouse_position = function( e ) { return vec2( e.clientX - canvas.width/2, e.clientY - canvas.height/2 ); }; // Measure mouse steering, for rotating the flyaround camera. \n canvas.addEventListener(\"mouseup\", ( function(self) { return function(e)\t{ e = e || window.event;\t\tself.mouse.anchor = undefined; } } ) (this), false );\n\tcanvas.addEventListener(\"mousedown\", ( function(self) { return function(e)\t{\te = e || window.event; self.mouse.anchor = mouse_position(e); } } ) (this), false );\n canvas.addEventListener(\"mousemove\", ( function(self) { return function(e)\t{ e = e || window.event; self.mouse.from_center = mouse_position(e); } } ) (this), false ); \n canvas.addEventListener(\"mouseout\", ( function(self) { return function(e)\t{ self.mouse.from_center = vec2(); }; } ) (this), false ); // Stop steering if the mouse leaves the canvas. \n}", "function classmates (){\n\n\n\n\n}", "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 init() {\n\n\t\t\tvar features = $('.features-module .set-size');\n\t\t\t// mobile-portrait: 360x640\n\t\t\t// mobile-landscape: 640x360\n\t\t\t// tablet-portrait: 800x1150\n\t\t\t// tablet-landscape: 1280x700\n\t\t\t// desktop: 1920x1129\n\n\t\t\tvar onResize = function(e, metrics) {\n\t\t\t\tvar h,\n\t\t\t\tw = metrics.width,\n\t\t\t\tdevice = metrics.device;\n\n\t\t\t\tif (device === 'mobile') {\n\t\t\t\t\th = (w * 1150) / 800;\n\t\t\t\t} else if (device === 'mobile-landscape') {\n\t\t\t\t\th = (w * 1150) / 800;\n\t\t\t\t} else if (device === 'tablet-portrait') {\n\t\t\t\t\th = (w * 1472) / 1024;\n\t\t\t\t} else if (device === 'tablet-landscape') {\n\t\t\t\t\th = (w * 684) / 1280;\n\t\t\t\t} else {\n\t\t\t\t\th = (w * 1026) / 1920;\n\t\t\t\t}\n\n\t\t\t\tif (ss.metrics.isIE8() === 8) {\n\t\t\t\t\tw = 1280;\n\t\t\t\t\th = (w * 684) / 1280;\n\t\t\t\t}\n\n\t\t\t\tfeatures.css({\n\t\t\t\t\twidth: w,\n\t\t\t\t\theight: h\n\t\t\t\t});\n\t\t\t};\n\t\t\teventBridge.on(eventDictionary.global.RESIZE, function() {\n\t\t\t\tonResize(null, ss.metrics);\n\n\t\t\t\tif (!window.tmpCnt) {\n\t\t\t\t\twindow.tmpCnt = 0;\n\t\t\t\t}\n\t\t\t\twindow.tmpCnt += 1;\n\t\t\t/*\n\t\t\t * $('#s7viewer').hide(); if (window.scene7 &&\n\t\t\t * window.scene7.container && window.scene7.container.resize ) { var\n\t\t\t * tmp=setTimeout(function(){\n\t\t\t *\n\t\t\t * window.tmpCnt -= 1; clearTimeout(tmp); if ( window.tmpCnt == 0 ) {\n\t\t\t * window.scene7.container.resize($('#s7viewer').width(),\n\t\t\t * $('#s7viewer').height());\n\t\t\t * window.scene7.zoomView.resize($('#s7viewer').width(),\n\t\t\t * $('#s7viewer').height()); $('#s7viewer').show(); } },200); }\n\t\t\t */\n\n\t\t\t});\n\t\t\t// todo toggle refer\n\t\t\tcontainer.find('.view-more-features .module-heading').on(ss.clickEvent, function() {\n\n\t\t\t\tif (!$(this).hasClass('expanded')) {\n\t\t\t\t\t$(this).addClass('expanded');\n\n\t\t\t\t\tmoreFeatures.show();\n\n\t\t\t\t\tvar offset = ss.metrics.elemTop(moreFeaturesWrapper);\n\t\t\t\t\tss.htmlBody.animate({scrollTop: offset}, 1000);\n\t\t\t\t} else {\n\t\t\t\t\t$(this).removeClass('expanded');\n\n\t\t\t\t\tmoreFeatures.hide();\n\t\t\t\t}\n\n\t\t\t\tcontainer.find('.icon-plus').toggleClass('icon-minus');\n\n\t\t\t});\n\n\t\t\tonResize(null, ss.metrics);\n\t\t}", "function Class(){}", "function Class(){}", "function Class(){}", "prepare() {\n var nodes = document.getElementsByClassName(\"region bottom bar\")\n var pos = nodes[0].querySelector(\".container\")\n var children = pos.children\n var module = document.createElement(\"div\")\n module.id = \"module_EXT_Spotify\"\n module.style.display= \"none\"\n module.classList.add(\"module\", \"EXT_Spotify\")\n var header = document.createElement(\"header\")\n header.classList.add(\"module-header\")\n header.style.display = \"none\"\n module.appendChild(header)\n var content = document.createElement(\"div\")\n content.classList.add(\"module-content\")\n var viewDom = document.createElement(\"div\")\n viewDom.id = \"EXT_SPOTIFY\"\n viewDom.classList.add(\"inactive\")\n\n content.appendChild(viewDom)\n module.appendChild(content)\n pos.insertBefore(module, children[children.length])\n this.getMinimalistBarDom(viewDom)\n }", "function SuperclassBare() {}", "function SuperclassBare() {}", "function ClassName(){\n }", "constructor(context) {\n super(context)\n this.metadata = MSApplicationMetadata.metadata()\n\n // this is a slightly clumsy way to pass related classes into Layer\n // without setting up a circular dependency between classes (eg Layer imports Artboard which imports Layer...)\n // there has to be a better way to do this...\n this.factory = {\n \"Group\" : Group,\n \"Page\" : Page,\n \"Artboard\" : Artboard,\n \"Shape\" : Shape,\n \"Image\" : Image,\n \"Text\" : Text\n }\n }", "function beetle_lvl5() {}", "function Utils() {}", "function Utils() {}", "function ArethusaClasses() {\n // Used to define plugin settings\n function Setting(label, model, change) {\n this.label = label;\n this.model = model;\n this.change = change;\n }\n\n this.setting = function(l, m, c) { return new Setting(l, m, c); };\n\n\n // Used by retrievers to place documents in the document store\n function Doc(xml, json, conf) {\n this.xml = xml;\n this.json = json;\n this.conf = conf;\n }\n\n this.doc = function(x, j, c) { return new Doc(x, j, c); };\n\n // Used by retrievers to define sentences\n function Sentence(id, tokens, cite) {\n this.id = id;\n this.tokens = tokens;\n this.cite = cite;\n }\n\n this.sentence = function(i, t, c) { return new Sentence(i, t, c); };\n\n // A simple token container\n function Token(string, sId) {\n this.string = string;\n this.sentenceId = sId;\n }\n\n this.token = function (s, sId) { return new Token(s, sId); };\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}", "function initAddClasses() {\n jQuery('.tabset-holder .opener').clickClass({\n classAdd: 'active',\n addToParent: 'tabset-holder'\n });\n jQuery('.rating-opener').clickClass({\n classAdd: 'active',\n addToParent: 'user-rating'\n });\n}", "function initAddClasses() {\n jQuery('.tabset-holder .opener').clickClass({\n classAdd: 'active',\n addToParent: 'tabset-holder'\n });\n jQuery('.rating-opener').clickClass({\n classAdd: 'active',\n addToParent: 'user-rating'\n });\n}", "constructor() {\n super()\n this.drawer = new Components.window.Drawer({\n parent: document.body,\n id: 'drawer',\n onclose: () => {\n this.gui.drawer.hide();\n }\n });\n }", "prepareBackground () {\n var nodes = document.getElementsByClassName(\"region fullscreen above\")\n var pos = nodes[0].querySelector(\".container\")\n var children = pos.children\n var module = document.createElement(\"div\")\n module.id = \"module_Fake_GA_DOM\"\n module.classList.add(\"module\", \"GA_DOM\", \"hidden\")\n var header = document.createElement(\"header\")\n header.classList.add(\"module-header\")\n header.style.display = \"none\"\n module.appendChild(header)\n var content = document.createElement(\"div\")\n content.classList.add(\"module-content\")\n var viewDom = document.createElement(\"div\")\n viewDom.id = \"GA_DOM\"\n\n content.appendChild(viewDom)\n module.appendChild(content)\n pos.insertBefore(module, children[children.length])\n }", "function Class() {}", "function EffectClass () {}", "function basicStyle() {\n $(\"div[id^=zz][id$=_V4QuickLaunchMenu]\").addClass(\"base\");\n $(\"div[id^=zz][id$=_V4QuickLaunchMenu] li\").addClass(\"baseBorder\");\n $(\"div[id^=zz][id$=_V4QuickLaunchMenu] span\").addClass(\"baseText\");\n $(\"div[id^=zz][id$=_V4QuickLaunchMenu] ul li\").has('ul').addClass('Office365Icon');\n $(\"[id^=zz][id$=_RootAspMenu] li\").children('ul').hide();\n }", "loadFeatureData(){\n let featureHtml = `<div class=\"grid\">\n <div class=\"row space-bot\">\n <div class=\"c12\">\n <div class=\"royalcontent\">\n <h1 class=\"royalheader\">${ this.utilityData.homeTitle }</h1>\n <h1 class=\"title\" style=\"text-transform:none;\">${ this.utilityData.homeSubTitle }</h1>\n </div>\n </div>`\n this.features.forEach(feature => {\n featureHtml += `<div class=\"c4\">\n <h2 class=\"title hometitlebg\"><i class=\"${ feature.homeFeatureIcon } smallrightmargin\"></i> ${ feature.homeFeatureTitle }</h2>\n <div class=\"noshadowbox\">\n <p>\n ${ feature.homeFeatureDetail }\n </p>\n </div>\n </div>`\n }, this);\n this.mainContainer.innerHTML += featureHtml + `</div></div>`;\n }", "function FeatureCollector()\n{\n this.current = [];\n this.features = {};\n this.featureCount = 0;\n \n this.openFeature = function() {\n this.current = [];\n }\n \n this.closeFeature = function() {\n this.features[this.featureCount++] = this.current;\n this.current = [];\n }\n \n this.addRect = function(rectText) {\n var r = rectText\n .split(/[ \\t\\n]+/)\n .filter(function(x) { return x.length > 0 })\n .map(function(x) { return parseFloat(x); });\n this.current.push(r);\n }\n}", "function NJ(e){let{basename:t,children:r,window:n}=e,i=b.useRef();i.current==null&&(i.current=BG({window:n,v5Compat:!0}));let l=i.current,[a,o]=b.useState({action:l.action,location:l.location});return b.useLayoutEffect(()=>l.listen(o),[l]),b.createElement(FJ,{basename:t,children:r,location:a.location,navigationType:a.action,navigator:l})}", "function beetle_lvl3() {}", "function classCleanup() {\n\n\t}", "function toString() {\n\t\t// Add namespace\n\t\tvar\tname = settings.ns + this.name,\n\t\t\tclassList = resolveClassName(name);\n\n\t\t// Add modifiers\n\t\tclassList = this.mods.reduce(function(classList, modObject) {\n\t\t\tvar modArray = objectToArray(modObject);\n\n\t\t\tif ( modArray.length ) {\n\t\t\t\tmodArray = modArray.map(function (mod) {\n\t\t\t\t\treturn resolveClassName(name + mod);\n\t\t\t\t});\n\n\t\t\t\tmodArray.unshift('');\n\t\t\t\tclassList += modArray.join(space);\n\t\t\t}\n\n\t\t\treturn classList;\n\t\t}, classList);\n\n\t\t// Mix with another classes\n\t\tif ( this.mixes.length ) {\n\t\t\tclassList += space + this.mixes.join(space);\n\t\t}\n\n\t\t// Add states\n\t\tvar states = this.states;\n\t\tclassList = Object.keys(states).reduce(function(classList, state) {\n\t\t\treturn classList += states[state] ? space + is + state : '';\n\t\t}, classList);\n\n\t\treturn classList;\n\t}", "function main(){\r\n // build the nav\r\n createNav();\r\n\r\n // Add class 'active' to section when near top of viewport\r\n toggleActive();\r\n}", "function JFather() {\r\n\t}", "function Class() { }", "function Class() { }", "function Class() { }", "function Class() { }", "function Class() { }", "function Class() { }", "function Class() { }", "function Class() { }", "function Class() { }", "function Class() { }", "function Class() { }", "function LView() {}", "function LView() {}", "function LView() {}", "function beetle_lvl2() {}", "setGridClassList(classList) {\n const me = this;\n classList.add(`b-grid-${me.positionMode}`); // TODO: enableTextSelection should be a setter, enabling toggling at any time\n\n if (!me.enableTextSelection) {\n classList.add('b-grid-notextselection');\n }\n\n if (me.autoHeight) {\n classList.add('b-autoheight');\n }\n\n if (me.fillLastColumn) {\n classList.add('b-fill-last-column');\n }\n\n if (me.showDirty) {\n classList.add('b-show-dirty');\n }\n\n for (const featureName in me.features) {\n const feature = me.features[featureName];\n let featureClass;\n\n if (Object.prototype.hasOwnProperty.call(feature.constructor, 'featureClass')) {\n featureClass = feature.constructor.featureClass;\n } else {\n featureClass = `b-${feature instanceof Base ? feature.$name : feature.constructor.name}`;\n }\n\n if (featureClass) {\n classList.add(featureClass.toLowerCase());\n }\n }\n }", "function beetle_lvl1() {}", "function App (){\n\n \n\n \n return (\n <div className=\"App\">\n <div className=\"header123\"><Header/></div>\n \n<div className=\"brightlow\">\n <div className=\"feature123\"><FeatureSection/></div>\n <div className=\"pocket123\"> <PocketSection/></div>\n <div className=\"action123\"> <ActionSection/></div>\n \n <div className=\"city123\"><CitySection/></div>\n <div className=\"footer123\"><Footer/></div>\n </div></div>\n \n );\n}", "function addInternalSelectors(){\n addClass($(options.sectionSelector, container), SECTION);\n addClass($(options.slideSelector, container), SLIDE);\n }", "function addInternalSelectors(){\n addClass($(options.sectionSelector, container), SECTION);\n addClass($(options.slideSelector, container), SLIDE);\n }", "function addInternalSelectors(){\n addClass($(options.sectionSelector, container), SECTION);\n addClass($(options.slideSelector, container), SLIDE);\n }", "getClassName(){return \"Core.UI.Render.CoreView\";}", "function UI() {} //Created prototype from which we can re use all methods", "function Core() {}", "function Core() {}", "function Core() {}", "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 addInternalSelectors(){\r\n addClass($(options.sectionSelector, container), SECTION);\r\n addClass($(options.slideSelector, container), SLIDE);\r\n }", "function addInternalSelectors(){\r\n addClass($(options.sectionSelector, container), SECTION);\r\n addClass($(options.slideSelector, container), SLIDE);\r\n }", "function renderStaticView() {\n\t// Text for class view\n\tclassViewText();\n\n\t// Rect for line under title\n\t//classViewLine();\n\t// ORDER LEVEL and FAMILY LEVEL label\n\tstaticLabels();\n\t// Legend\n\t//legend();\n\t//incrementProgress();\n\tinstructions();\n}", "function LView() { }", "function LView() { }", "constructor() {\n this._settings = {\n type: 'checkbox',\n title: 'hideSeedbox',\n scope: SettingGroup.Global,\n desc: 'Remove the \"Get A Seedbox\" menu item',\n };\n // An element that must exist in order for the feature to run\n this._tar = '#menu .sbDonCrypto';\n // Add 1+ valid page type. Exclude for global\n Util.startFeature(this._settings, this._tar, []).then((t) => {\n if (t) {\n this._init();\n }\n });\n }", "constructor(...args) {\n super(...args);\n\n\n // The following values should get overridden when delta states are merged, but we set them here as a reference for you to see what variables this class has.\n\n // default values for private member values\n this.length = 0;\n this.load = 0;\n this.nestA = null;\n this.nestB = null;\n this.spiderlings = [];\n this.strength = 0;\n\n //<<-- Creer-Merge: init -->> - Code you add between this comment and the end comment will be preserved between Creer re-runs.\n // any additional init logic you want can go here\n //<<-- /Creer-Merge: init -->>\n }", "function Scene_GFMenu() {\n this.initialize.apply(this, arguments);\n}", "initElements() {\n this.ringCore = new MyQuad(this, -0.5,-0.5,0.5,0.5);\n this.ringPost = new MyCylinderCovered(this, 20, 20);\n this.ringRope = new MyCylinderCovered(this, 20, 20);\n this.stairs = new MyStairs(this);\n this.ramp = new MyRamp(this, 20, 100, 40);\n this.barrier = new MyBarrier(this, 10, 40, 5);\n this.number_chairs = 20;\n this.chairs = new MyChairs(this, 5, this.number_chairs);\n this.stage = new MyStage(this);\n\n this.torus = new MyTorus(this,20,20,1,2);\n this.cylinder = new MyCylinder(this, 10.0, 2.0, 2.0, 4, 2);\n this.circle = new MyPoligon(this,20);\n\n this.sphere = new MySphere(this,5,20,10);\n\n this.floor = new MyQuad(this, -0.5,-0.5,0.5,0.5);\n this.triangle = new MyTriangle(this, 0,0,0,4,0,0,2,0,2.5);\n }", "function Mixin() {\n\t}", "function BasicFlower(){\n\n\t// size l represented by basic styles\n\tthis.flowerSizes = {\n\t\tcssClassS : 'flower__small',\n\t\tcssClassM : 'flower__medium',\n\t\tcssClassXl : 'flower__xlarge',\n\t}\n\n\tthis.flower = createFlower();\n\n\tfunction createFlower(){\n\t\tlet flower = document.createElement('div');\n\t\tflower.setAttribute('class', \"flower\");\n\n\t\tlet flowerLeaves = createAllLeaves();\n\t\tflowerLeaves.forEach((leave) => {\n\t\t\tflower.appendChild(leave);\n\t\t});\n\n\t\tlet flowerCenter = createFlowerCenter();\n\t\tflowerLeaves[2].appendChild(flowerCenter);\n\t\t\n\n\t\treturn {\n\t\t\twholeFlower : flower,\n\t\t\tflowerCenter : flowerCenter,\n\t\t\tflowerLeaves : flowerLeaves,\n\t\t}\n\t}\n\n\tfunction createAllLeaves(){\n\t\tlet leavesArr = [];\n\n\t\tfor(let i = 0; i <= 2; i++){\n\t\t\tleavesArr[i] = document.createElement('div');\n\n\t\t\tif (i === 0) {\n\t\t\t\tleavesArr[i].setAttribute('class', 'leave')\n\t\t\t} else if (i === 1) {\n\t\t\t\tleavesArr[i].setAttribute('class', 'leave leave__before')\n\t\t\t} else if (i === 2) {\n\t\t\t\tleavesArr[i].setAttribute('class', 'leave leave__after')\n\t\t\t}\n\n\t\t} // for\n\n\t\treturn leavesArr;\n\t}\n\n\tfunction createFlowerCenter(){\n\t\tlet flowerCenter = document.createElement('div');\n\t\tflowerCenter.setAttribute('class', 'center');\n\t\treturn flowerCenter;\n\t}\n\n}", "function init() {\n\t\tbuildBar();\n\t\tbuildBubble();\n\t\tbuildGauge();\n\t\t//buildMeta();\n\t}", "Init()\n {\n this.my_state_machine = new StateMachine();\n this.overlay_manager_inst = new OverlayManager();\n this.level_viewer = null;\n this.information_log = document.getElementById(\"informationLog\");\n this.level_object_manager = new LevelObjectManager();\n this.level_complete = document.getElementById(\"complete\");\n this.stats_manager = new StatManager();\n this.AI_bridge = new AIBridge();\n this.memento = new Memento();\n this.toolbar_manager = new ToolbarManager();\n }", "constructor(name, hull, firePower, accuracy) { // constructors are info about class (this. belongs to constructor)\n this.name = name;\n this.hull = hull;\n this.firePower = firePower;\n this.accuracy = accuracy;\n }" ]
[ "0.6091004", "0.58595735", "0.553654", "0.55306345", "0.55298185", "0.5506889", "0.54659706", "0.5441621", "0.54200846", "0.5391406", "0.5383551", "0.53450567", "0.53435653", "0.5343159", "0.5328044", "0.5322372", "0.5320054", "0.5310372", "0.52833444", "0.52764565", "0.5272861", "0.5261189", "0.5252601", "0.52085304", "0.5194108", "0.51908207", "0.5189178", "0.5187521", "0.51858467", "0.51753235", "0.5174101", "0.5170581", "0.5163219", "0.5163219", "0.5163219", "0.5150948", "0.5136021", "0.5136021", "0.51314235", "0.5125812", "0.51161516", "0.51136684", "0.51136684", "0.51113033", "0.5105538", "0.5103416", "0.5103416", "0.5094736", "0.5094583", "0.5094034", "0.5082417", "0.5080241", "0.50786686", "0.50728667", "0.50718886", "0.5069074", "0.50628895", "0.5061545", "0.50601697", "0.5059798", "0.50508076", "0.50508076", "0.50508076", "0.50508076", "0.50508076", "0.50508076", "0.50508076", "0.50508076", "0.50508076", "0.50508076", "0.50508076", "0.5050806", "0.5050806", "0.5050806", "0.5048694", "0.5045691", "0.5040011", "0.5034168", "0.5033741", "0.5033741", "0.5033741", "0.50302476", "0.50280327", "0.50268584", "0.50268584", "0.50268584", "0.5020419", "0.50164825", "0.50164825", "0.5015962", "0.5015495", "0.5015495", "0.50138175", "0.50036824", "0.5002589", "0.49984735", "0.49978167", "0.49970064", "0.49949053", "0.4994763", "0.4992989" ]
0.0
-1
clone really means "create another instance just like this one, but with these changes"
function clone(dur, alts, clear) { if (clear === void 0) { clear = false; } // deep merge for vals var conf = { values: clear ? alts.values : Object.assign({}, dur.values, alts.values || {}), loc: dur.loc.clone(alts.loc), conversionAccuracy: alts.conversionAccuracy || dur.conversionAccuracy }; return new Duration(conf); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Clone() {}", "function Clone() {}", "function Clone() {}", "function Clone() {}", "function Clone(){\n }", "function Clone() { }", "function Clone() { }", "function Clone() { }", "clone() {\n return new this.constructor(this);\n }", "Clone() {\n\n }", "Clone() {\n\n }", "Clone() {\n\n }", "Clone() {\n\n }", "clone() {\n let dupe = new this.constructor();\n dupe.reset(this);\n return dupe;\n }", "copy()\n\t{\n\t\treturn this.constructor.createNewInstance(this);\n\t}", "clone() {\n return Object.assign(Object.create(this), this)\n }", "clone() {\n\t\tlet data = JSON.parse(JSON.stringify(this.Serialize()));\n\t\treturn new this.constructor(data);\n\t}", "clone() {\n const cloner = new Cloner();\n return cloner.clone(this);\n }", "clone() {\n const clone = new this.constructor(this.model);\n clone.config = Object.assign(clone.config, this.config);\n clone.options = Object.assign(clone.options, this.options);\n return clone;\n }", "function clone(orig) {\n return Object.assign({}, orig);\n}", "clone() { \n\t let clone = new CircleNode()\n\t return clone\n\t}", "clone() {\n var clone = new Player(true);\n clone.brain = this.brain.clone();\n clone.fitness = this.fitness;\n clone.brain.generateNetwork();\n clone.gen = this.gen;\n clone.bestScore = this.score;\n return clone;\n }", "function bnClone(){var a=nbi();this.copyTo(a);return a}", "function bnClone(){var a=nbi();this.copyTo(a);return a}", "function bnClone(){var a=nbi();this.copyTo(a);return a}", "function bnClone(){var a=nbi();this.copyTo(a);return a}", "function bnClone(){var a=nbi();this.copyTo(a);return a}", "function clone(original) {\n return merge(true, {}, original);\n }", "clone(obj) {\n return Object.assign({}, obj);\n }", "function clone1(obj) {\r\n var newObj = obj;\r\n return newObj;\r\n}", "clone() {\n return new Pose(this);\n }", "function clone () {\n return new Light(this);\n}", "clone() { \n\t let clone = new DiamondNode\n\t return clone\n\t}", "cloneForReplay() {\n var clone = new Player(false);\n clone.brain = this.brain.clone();\n clone.fitness = this.fitness;\n clone.brain.generateNetwork();\n clone.gen = this.gen;\n clone.bestScore = this.score;\n //<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<replace\n return clone;\n }", "clone() {\r\n return _.cloneDeep(this)\r\n }", "function clone(original){\n var result = {};\n deepCopyInto(original, result);\n return result;\n}", "_copy () {\n return new this.constructor()\n }", "_copy () {\n return new this.constructor()\n }", "function clone(a) {if (!a) return a;var c, b = [Number, String, Boolean];if (b.forEach(function(b) { a instanceof b && (c = b(a)); }), \"undefined\" == typeof c) if (\"[object Array]\" === Object.prototype.toString.call(a)) c = [], a.forEach(function(a, b, d) { c[b] = clone(a); }); else if (\"object\" == typeof a) if (a.nodeType && \"function\" == typeof a.cloneNode) c = a.cloneNode(!0); else if (a.prototype) c = a; else if (a instanceof Date) c = new Date(a); else { c = {}; for (var d in a) c[d] = clone(a[d]); } else c = a; return c;}", "clone() {\n const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));\n if (this.range)\n copy.range = this.range.slice();\n return copy;\n }", "clone() { return new node(this.v, this.hi, this.lo); }", "clone() {\n return new Stack(this.stack);\n }", "clone() {\n const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));\n if (this.range)\n copy.range = this.range.slice();\n return copy;\n }", "clone() {\n const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));\n if (this.range)\n copy.range = this.range.slice();\n return copy;\n }", "function bnClone$1(){var a=nbi$1();this.copyTo(a);return a}", "clone() {\n return _.cloneDeep(this);\n }", "static cloneGame(gameInstance, gameConstructor) {\n var options = {\n board: {\n rows: gameInstance.board.rows.length,\n points: gameInstance.board.points,\n default: gameInstance.board.map.map(point => point.team)\n },\n pieces: gameInstance.teams[0].pieces.length,\n teams: gameInstance.teams.map(function(team) {\n return {\n name: team.name,\n pieces: team.pieces.map(piece => piece)\n }\n }),\n rules: false,\n lastChangeset: Object.assign({}, gameInstance.__lastChangeset)\n };\n var game = new gameConstructor(options);\n // Set the 'targetPoint' to the new instance\n var lastChangesetTargetIndex = gameInstance.board.map.indexOf(gameInstance.__lastChangeset.targetPoint);\n game.__lastChangeset.targetPoint = game.board.map[lastChangesetTargetIndex];\n\n // Get the team object from the original game instance\n var lastChangesetTeam = gameInstance.teams.objectFromKey(gameInstance.getTeam(gameInstance.__lastChangeset.piece), \"name\");\n // Get the index of the piece within this original team object\n var lastChangesetPieceIndex = lastChangesetTeam.pieces.indexOf(gameInstance.__lastChangeset.piece);\n // Set the new instance's lastChangeset.piece to a piece object from its own team but usually with the same index as the original\n game.__lastChangeset.piece = game.teams.objectFromKey(lastChangesetTeam.name, \"name\").pieces[lastChangesetPieceIndex];\n\n\n return game;\n\n }", "copy(){\n let handCopy = new Hand();\n handCopy.numUnmeldedTiles = this.numUnmeldedTiles;\n handCopy.melds = this.melds.slice();\n handCopy.inPlayTiles = [];\n for (let i = 0; i < this.inPlayTiles.length; i++){\n handCopy.inPlayTiles.push(this.inPlayTiles[i].slice());\n }\n return handCopy;\n }", "function createAnother(original) { // 1\n\t \t\t\t\tvar clone = object(original); // 2 \n\t \t\t\t\tclone.sayHi = function() {\t\t\t// 3\n\t \t\t\t\t\treturn \"hello world\";\n\t \t\t\t\t};\n\t \t\t\t\treturn clone;\t\t\t\t\t\t\t// 4\n\t \t\t\t}", "function bnClone()\n{\n var r = nbi();\n this.copyTo(r);\n return r;\n}", "function bnClone() {\n var r = nbi();this.copyTo(r);return r;\n }", "function bnClone() {\n var r = nbi();this.copyTo(r);return r;\n }", "function bnClone() {\n var r = nbi();this.copyTo(r);return r;\n }", "function clone(object){\n\t function OneShotConstructor(){}\n\t OneShotConstructor.prototype = object;\n\t return new OneShotConstructor();\n\t}", "clone() {\n\t\treturn new vector(this.x, this.y);\n\t}", "function bnClone() {\n var r = nbi();\n this.copyTo(r);\n return r;\n}", "function bnClone() {\n var r = nbi();\n this.copyTo(r);\n return r;\n}", "clone() {\n // Creates a deep copy of the grid\n let clonedGrid = new Generator().createGrid(\n this.grid.xFields,\n this.grid.yFields\n );\n for (let i = 0; i < clonedGrid.fields.length; i++) {\n clonedGrid.fields[i].isFilled = this.grid.fields[i].isFilled;\n }\n return clonedGrid;\n }", "clone() {\n const clone = new Polygon()\n const numCoords = this._coords.length\n\n for (let i = 0; i < numCoords; ++i) clone._coords[i] = this._coords[i]\n\n return clone\n }", "clone() {\n\t\treturn new WorkflowItem(\n\t\t\tthis.id,\n\t\t\tthis.title,\n\t\t\tthis.parentID,\n\t\t\tthis.order,\n\t\t\tthis.done,\n\t\t\tthis.ref,\n\t\t)\n\t}", "function clone()\n{\n\tvar mat = new Matrix(this.size.x, this.size.y);\n\tvar i, j;\n\n\tfor(i = 0; i < this.size.x; i++)\n\t{\n\t\tfor(j = 0; j < this.size.y; j++)\n\t\t{\n\t\t\tmat.matrix[i][j] = this.matrix[i][j];\n\t\t}\n\t}\n\n\treturn mat;\n}", "function cloneIt(o) {\n return ( $.extend(true, {}, o) );\n}", "function clone(object) {\r\n var empty = function(){ };\r\n empty.prototype = object;\r\n return new empty();\r\n }", "function clone(object) {\r\n var empty = function(){ };\r\n empty.prototype = object;\r\n return new empty();\r\n }", "function createAnother(original){\n var clone = Object.create(original)\n clone.sayHi = function(){\n console.log(\"hi\")\n }\n return clone\n}", "function getClone() {\n // Recursive function to clone Object + Array\n function recClone(oldObject, newObject) {\n Object.keys(oldObject).forEach(function forCurrentParam(key) {\n if (typeof oldObject[key] !== 'function') {\n if (Array.isArray(oldObject[key])) {\n newObject[key] = [];\n recClone(oldObject[key], newObject[key]);\n } else {\n newObject[key] = oldObject[key];\n }\n }\n });\n\n return newObject;\n }\n \n return recClone(state, {});\n }", "function clone(obj)\n {\n return $.extend(true, {}, obj);\n }", "function clone(obj) {\n return Object.assign({}, person);\n \n }", "clone() {\n const mt = new Matrix();\n return mt.multiply(this);\n }", "copy() {\n let copy;\n if(this.hn_2) {\n copy = new NeuralNetwork(this.in, this.hn_1, this.hn_2, this.on);\n } else {\n copy = new NeuralNetwork(this.in, this.hn_1, this.on);\n }\n\n copy.weights_i_h = this.weights_i_h.clone();\n copy.bias_h1 = this.bias_h1.clone();\n\n if(this.hn_2) {\n copy.weights_h1_h2 = this.weights_h1_h2.clone();\n copy.bias_h2 = this.bias_h2.clone();\n } \n\n copy.weights_h_o = this.weights_h_o.clone();\n copy.bias_o = this.bias_o.clone();\n\n return copy;\n }", "clone(opts={}) {\n // remove the id if it exists\n const {'id': deletedKey, ...attrs} = this.attributes\n const {copyNumber} = opts\n\n // generate name variant\n const name = this.copyName(copyNumber)\n \n // change the startDate and endDate if desired\n const {startDate,endDate} = opts.offsetDuration ? \n this.getOffsetDuration() : this.attributes\n \n return Promo.fromAttributes({\n ...attrs,\n name,\n startDate,\n endDate,\n })\n }", "cloneSlip() {\n return new saito.slip(this.add, this.amt, this.type, this.bid, this.tid, this.sid, this.bsh, this.lc);\n }", "clone() {\n return new BaseDataClass(this);\n }", "cloneRecord(){\n let oldModel = this.get('model');\n this.sendAction('onCopy', oldModel);\n }", "clone() {\n let o = new Engine(this._type, this._color);\n\n o.set(this._phase, this._board, this._player_1_pieces, this._player_2_pieces);\n return o;\n }", "function clone() {\n return new Hash(this);\n }", "function clone() {\n return new Hash(this);\n }", "clone() {\n return new Vector().copy(this);\n }", "function clone(o) {\n function F() {}\n F.prototype = o;\n return new F();\n}", "clone(depth=0){\r\n const sudoku = new QuickSudoku();\r\n sudoku.numbers = new Array(...this.numbers);\r\n\r\n sudoku.candidates = new Array(...this.candidates);\r\n sudoku.candidates_row = new Array(...this.candidates_row);\r\n sudoku.candidates_column = new Array(...this.candidates_column);\r\n sudoku.candidates_block = new Array(...this.candidates_block);\r\n\r\n if(depth==0){\r\n sudoku.shadow = this.shadow.clone(1);\r\n }\r\n \r\n this.__hasContradiction = -1;\r\n this.__isSolved = -1;\r\n this.no_unique_solution = false;\r\n this.no_solution = false;\r\n\r\n return sudoku;\r\n }", "copy() {\n return Object.assign(Object.create(this), JSON.parse(JSON.stringify(this)))\n }", "function clone(obj) {\n\t\tvar clonedObj = JSON.parse(JSON.stringify(obj));\n\t\treturn clonedObj;\n\t}", "function clone(obj) {\n return Object.assign({}, obj);\n}", "function bnClone() { var r = nbi(); this.copyTo(r); return r; }", "function bnClone() { var r = nbi(); this.copyTo(r); return r; }", "function bnClone() { var r = nbi(); this.copyTo(r); return r; }", "function bnClone() { var r = nbi(); this.copyTo(r); return r; }", "function bnClone() { var r = nbi(); this.copyTo(r); return r; }", "function bnClone() { var r = nbi(); this.copyTo(r); return r; }", "function bnClone() { var r = nbi(); this.copyTo(r); return r; }", "function bnClone() { var r = nbi(); this.copyTo(r); return r; }", "function bnClone() { var r = nbi(); this.copyTo(r); return r; }", "function bnClone() { var r = nbi(); this.copyTo(r); return r; }", "function bnClone() { var r = nbi(); this.copyTo(r); return r; }", "function bnClone() { var r = nbi(); this.copyTo(r); return r; }", "function bnClone() { var r = nbi(); this.copyTo(r); return r; }", "function bnClone() { var r = nbi(); this.copyTo(r); return r; }", "function bnClone() { var r = nbi(); this.copyTo(r); return r; }", "function bnClone() { var r = nbi(); this.copyTo(r); return r; }", "function bnClone() { var r = nbi(); this.copyTo(r); return r; }", "function bnClone() { var r = nbi(); this.copyTo(r); return r; }" ]
[ "0.8517643", "0.8517643", "0.8517643", "0.8517643", "0.8398923", "0.8337403", "0.8337403", "0.8337403", "0.81964403", "0.8071195", "0.8071195", "0.8071195", "0.8071195", "0.8048976", "0.78545654", "0.7840554", "0.7828258", "0.7826537", "0.77119964", "0.7394785", "0.7385902", "0.7384206", "0.73780894", "0.73780894", "0.73780894", "0.73780894", "0.73780894", "0.7363203", "0.73353064", "0.73337644", "0.7319593", "0.73091567", "0.73002774", "0.7206961", "0.71891147", "0.71742225", "0.71341324", "0.71341324", "0.71209097", "0.71018845", "0.7092456", "0.7081128", "0.7062005", "0.7062005", "0.7003479", "0.70033216", "0.6991927", "0.6933101", "0.6873588", "0.6870535", "0.6860935", "0.6860935", "0.6860935", "0.6848543", "0.68449986", "0.68446887", "0.68446887", "0.68391716", "0.6835369", "0.68314594", "0.6829867", "0.6828543", "0.6825804", "0.6825804", "0.68177044", "0.68173945", "0.68166685", "0.68153626", "0.68097025", "0.6805898", "0.6799444", "0.6794698", "0.6792034", "0.6778796", "0.6775447", "0.67710423", "0.67710423", "0.6757165", "0.67495036", "0.67491215", "0.67482555", "0.6743978", "0.67401177", "0.67369413", "0.67369413", "0.67369413", "0.67369413", "0.67369413", "0.67369413", "0.67369413", "0.67369413", "0.67369413", "0.67369413", "0.67369413", "0.67369413", "0.67369413", "0.67369413", "0.67369413", "0.67369413", "0.67369413", "0.67369413" ]
0.0
-1
checks if the start is equal to or before the end
function validateStartEnd(start, end) { if (!start || !start.isValid) { return Interval.invalid("missing or invalid start"); } else if (!end || !end.isValid) { return Interval.invalid("missing or invalid end"); } else if (end < start) { return Interval.invalid("end before start", "The end of an interval must be after its start, but you had start=" + start.toISO() + " and end=" + end.toISO()); } else { return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isStart(value, start, end) {\n return end !== null && start !== end && value < end && value === start;\n}", "function isStart(value, start, end) {\n return end !== null && start !== end && value < end && value === start;\n}", "function isStart(value, start, end) {\n return end !== null && start !== end && value < end && value === start;\n}", "function validateStartEnd(start, end) {\n return !!start && !!end && start.isValid && end.isValid && start <= end;\n}", "function oa(a,b){return a.end>b.start&&a.start<b.end}", "function isEnd(value, start, end) {\n return start !== null && start !== end && value >= start && value === end;\n}", "function isEnd(value, start, end) {\n return start !== null && start !== end && value >= start && value === end;\n}", "function isEnd(value, start, end) {\n return start !== null && start !== end && value >= start && value === end;\n}", "_isRangeStart(value) {\n return isStart(value, this.startValue, this.endValue);\n }", "_isRangeStart(value) {\n return isStart(value, this.startValue, this.endValue);\n }", "inRange1(num, start, end) {\n if (end === undefined) {\n end = start;\n start = 0;\n }\n\n if (start > end) {\n const tmpEnd = end;\n end = start;\n start = tmpEnd;\n }\n\n return num >= start && num < end;\n }", "inRange (number, start, end){\r\n // if end is undefined, start = 0 and end = start, then check if in range\r\n if (typeof end === 'undefined'){\r\n end = start;\r\n start = 0;\r\n } else if ( start > end ){\r\n // swap the two values around\r\n let temp = start;\r\n start = end;\r\n end = temp;\r\n }\r\n if ((number > start) && (number < end)){\r\n return true;\r\n }\r\n else\r\n return false;\r\n }", "function isBetween(start, end, val) {\n return (start < val && val < end) || (start > val && val > end);\n }", "function isInRange(pos, start, end) {\n if (typeof pos != 'number') {\n // Assume it is a cursor position. Get the line number.\n pos = pos.line;\n }\n if (start instanceof Array) {\n return inArray(pos, start);\n } else {\n if (typeof end == 'number') {\n return (pos >= start && pos <= end);\n } else {\n return pos == start;\n }\n }\n }", "function isInRange(pos, start, end) {\n if (typeof pos != 'number') {\n // Assume it is a cursor position. Get the line number.\n pos = pos.line;\n }\n if (start instanceof Array) {\n return inArray(pos, start);\n } else {\n if (end) {\n return (pos >= start && pos <= end);\n } else {\n return pos == start;\n }\n }\n }", "function inRange(start, end, value) {\n\t\t\treturn (value>= start && value <= end);\n\t\t}", "valid(index) { return (this.start<=index && index<this.end) }", "function _isInRange(start, stop) {\n\t\tvar curTime = Date.now();\n\t\tvar startTime = _getTime(start);\n\t\tvar stopTime = _getTime(stop);\n\t\tvar ret = false;\n\n\t\tif (start === stop) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif (stopTime > startTime) {\n\t\t\tif ((curTime >= startTime) && (curTime <= stopTime)) {\n\t\t\t\tret = true;\n\t\t\t}\n\t\t} else {\n\t\t\tif ((curTime >= startTime) || (curTime <= stopTime)) {\n\t\t\t\tret = true;\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}", "function compare_start(a, b) {\n return a.start - b.start;\n }", "function isStartOrEnd(x, y) {\n\tif (x == currSX && y == currSY) {\n\t\treturn true\n\t} else if (x == currEX && y == currEY) {\n\t\treturn true\n\t} else {\n\t\treturn false\n\t}\n}", "function include(value) {\n if (value < this.start) \n return false;\n if (this.exclusive)\n return value < this.end;\n return value <= this.end;\n }", "function _rangeContainsItem(start, end) {\n\t\t\treturn ((this.start >= start) && (this.end <= end));\n\t\t}", "_isComparisonStart(value) {\n return isStart(value, this.comparisonStart, this.comparisonEnd);\n }", "_isComparisonStart(value) {\n return isStart(value, this.comparisonStart, this.comparisonEnd);\n }", "inRange(num, endNum, startNum = 0) {\n [endNum, startNum] = [startNum, endNum];\n if (startNum > endNum) {\n [startNum, endNum] = [endNum, startNum];\n }\n return num >= startNum && num < endNum;\n }", "inRange (number, start, end) {\n if(end == null) {\n end = start;\n start = 0;\n }\n if(start > end) {\n const temp = start;\n start = end;\n end = temp;\n }\n const isInRange = (start <= number && number < end);\n return isInRange;\n }", "inRange2(num, start, end) {\n if (end === undefined) {\n end = start;\n start = 0;\n }\n\n if (start > end) {\n const tmpEnd = end;\n end = start;\n start = tmpEnd;\n }\n\n const isInRange = num >= start && num < end;\n return isInRange;\n }", "function inRange(start, end, date) {\n if (start && date.isBefore(start)) {\n return false\n }\n if (end && date.isAfter(end)) {\n return false\n }\n return true\n}", "function overlap(a, b) {\n if (a.start <= b.start && a.end > b.start) {\n return true;\n } else if (a.start >= b.start && a.start < b.end) {\n return true;\n } else {\n return false;\n }\n }", "static isForwardSelection(start, end) {\n if (start === end) {\n return true;\n }\n start = start.replace(/C;/g, '');\n end = end.replace(/C;/g, '');\n start = start.replace(/H;/g, '');\n end = end.replace(/H;/g, '');\n start = start.replace(/F;/g, '');\n end = end.replace(/F;/g, '');\n let selectionStart = start.split(';');\n let selectionEnd = end.split(';');\n let length = selectionStart.length;\n if (length > selectionEnd.length) {\n length = selectionEnd.length - 1;\n }\n for (let i = 0; i < length; i++) {\n let startOffset = parseFloat(selectionStart[i]);\n let endOffset = parseFloat(selectionEnd[i]);\n if (startOffset !== endOffset) {\n return startOffset < endOffset;\n }\n }\n return false;\n }", "function timeOverlaps(a_Start, a_End, b_Start, b_End) {\n\t\tif (a_Start >= b_Start && a_Start < b_End) {\n\t\t\treturn true;\n\t\t}\n\t\tif (a_End > b_Start && a_End <= b_End) {\n\t\t\treturn true;\n\t\t}\n\t\tif (b_Start >= a_Start && b_Start < a_End) {\n\t\t\treturn true;\n\t\t}\n\t\tif (b_End > a_Start && b_End <= a_End) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "function _itemOverlapsRange(start, end) {\n\t\t\treturn ((this.start < end) && (this.end > start));\n\t\t}", "function validatePositions(start, end) {\n if (!start || start === 'none' || !end || end === 'none') {\n return 'Start or end position is unassigned.';\n }\n\n if (start === end) {\n return 'Start and end positions can\\'t be the same.'\n }\n\n if (start > end) {\n return 'Start position can\\'t be after end position.';\n }\n\n return null;\n}", "contains(dat_or_drange){\n return this.starts_same_or_before(dat_or_drange) && this.ends_same_or_after(dat_or_drange) ;\n }", "function isStart(start) {\n let startTime = start.replace(/-/g, \"/\");\n let startDate = new Date(startTime);\n let now = new Date();\n if (now >= startDate) {\n return 1;\n }\n return 0;\n}", "function valueInRange (start, value, finish) {\n return (start <= value) && (value <= finish);\n}", "function valueInRange (start, value, finish) {\n return (start <= value) && (value <= finish);\n}", "function validateStartEnd(start, end) {\n if (!start || !start.isValid) {\n return Interval.invalid(\"missing or invalid start\");\n } else if (!end || !end.isValid) {\n return Interval.invalid(\"missing or invalid end\");\n } else if (end < start) {\n return Interval.invalid(\"end before start\", \"The end of an interval must be after its start, but you had start=\" + start.toISO() + \" and end=\" + end.toISO());\n } else {\n return null;\n }\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 }", "function isStartEndDate(startDate,sign,endDate){ \r\n\tvar allStartDate;\r\n\tvar allEndDate;\r\n\tif(startDate.length>0&&endDate.length>0){ \r\n\t\tvar startDateTemp = startDate.split(\" \"); \r\n\t\tvar arrStartDate = startDateTemp[0].split(\"-\"); \r\n\t\tallStartDate = new Date(arrStartDate[0],arrStartDate[1],arrStartDate[2]).getTime(); \r\n\t\tif(strDateTime(endDate)){\r\n\t\t\tallEndDate = endDate;\r\n\t\t}\r\n\t\tvar endDateTemp = endDate.split(\" \"); \r\n\t\tvar arrEndDate = endDateTemp[0].split(\"-\"); \r\n\t\tallEndDate = new Date(arrEndDate[0],arrEndDate[1],arrEndDate[2]).getTime();\t \r\n\t\tif(sign == \">\"){\r\n\t\t\tif(allStartDate > allEndDate){ \r\n\t\t\t\treturn true; \r\n\t\t\t}else\r\n\t\t\t\treturn false;\r\n\t\t}else if(sign == \">=\"){\r\n\t\t\tif(allStartDate >= allEndDate){ \r\n\t\t\t\treturn true; \r\n\t\t\t}else\r\n\t\t\t\treturn false;\r\n\t\t}else if(sign == \"==\"){\r\n\t\t\tif(allStartDate == allEndDate){ \r\n\t\t\t\treturn true; \r\n\t\t\t}else\r\n\t\t\t\treturn false;\r\n\t\t}else if(sign == \"<\"){\r\n\t\t\tif(allStartDate < allEndDate){ \r\n\t\t\t\treturn true; \r\n\t\t\t}else\r\n\t\t\t\treturn false;\r\n\t\t}else if(sign == \"<=\"){\r\n\t\t\tif(allStartDate <= allEndDate){ \r\n\t\t\t\treturn true; \r\n\t\t\t}else\r\n\t\t\t\treturn false;\r\n\t\t}else if(sign == \"!=\"){\r\n\t\t\tif(allStartDate != allEndDate){ \r\n\t\t\t\treturn true; \r\n\t\t\t}else\r\n\t\t\t\treturn false;\r\n\t\t}\r\n\t} \r\n}", "function validateStartEnd(start, end) {\n if (!start || !start.isValid) {\n return new Invalid(\"missing or invalid start\");\n } else if (!end || !end.isValid) {\n return new Invalid(\"missing or invalid end\");\n } else if (end < start) {\n return new Invalid(\"end before start\", \"The end of an interval must be after its start, but you had start=\" + start.toISO() + \" and end=\" + end.toISO());\n } else {\n return null;\n }\n}", "function fir(num, start, end) {\n let isInRange = false;\n\n if (end === undefined) {\n end = start;\n start = 0;\n }\n\n if (start > end) {\n let t = start;\n start = end;\n end = t;\n }\n\n if (num >= start && num < end) {\n isInRange = true;\n }\n\n return isInRange;\n}", "function isBefore(beforeRange, afterRange) {\n return beforeRange[1] <= afterRange[0];\n}", "function inRange(start, end, now) {\n\n if (!start.def || !end.def) {\n return false;\n }\n\n let s = (start.hours * 60) + start.minutes;\n let e = (end.hours * 60) + end.minutes;\n let n = (now.getHours() * 60) + now.getMinutes();\n\n if (s == e) {\n return false;\n }\n\n if (s < e) { // if it's between, we're done\n if (s < n && n < e) {\n return true;\n }\n } else {\n if (n > s) {\n return true; // between s and midnight\n }\n if (n < e) {\n return true; // earlier than e\n }\n }\n return false;\n}", "function end__TO__START_ques_(rangeExceptionCompareHow) /* (rangeExceptionCompareHow : rangeExceptionCompareHow) -> bool */ {\n return (rangeExceptionCompareHow === 4);\n}", "includes(range, target) {\n if (Range.isRange(target)) {\n if (Range.includes(range, target.anchor) || Range.includes(range, target.focus)) {\n return true;\n }\n\n var [rs, re] = Range.edges(range);\n var [ts, te] = Range.edges(target);\n return Point.isBefore(rs, ts) && Point.isAfter(re, te);\n }\n\n var [start, end] = Range.edges(range);\n var isAfterStart = false;\n var isBeforeEnd = false;\n\n if (Point.isPoint(target)) {\n isAfterStart = Point.compare(target, start) >= 0;\n isBeforeEnd = Point.compare(target, end) <= 0;\n } else {\n isAfterStart = Path.compare(target, start.path) >= 0;\n isBeforeEnd = Path.compare(target, end.path) <= 0;\n }\n\n return isAfterStart && isBeforeEnd;\n }", "includes(range, target) {\n if (Range.isRange(target)) {\n if (Range.includes(range, target.anchor) || Range.includes(range, target.focus)) {\n return true;\n }\n\n var [rs, re] = Range.edges(range);\n var [ts, te] = Range.edges(target);\n return Point.isBefore(rs, ts) && Point.isAfter(re, te);\n }\n\n var [start, end] = Range.edges(range);\n var isAfterStart = false;\n var isBeforeEnd = false;\n\n if (Point.isPoint(target)) {\n isAfterStart = Point.compare(target, start) >= 0;\n isBeforeEnd = Point.compare(target, end) <= 0;\n } else {\n isAfterStart = Path.compare(target, start.path) >= 0;\n isBeforeEnd = Path.compare(target, end.path) <= 0;\n }\n\n return isAfterStart && isBeforeEnd;\n }", "function dataRangeError(start,end){\n let s=start.replace(\":\",\" \");\n let e=end.replace(\":\",\" \");\n \n s=Date.parse(s);\n e=Date.parse(e);\n if(e<s) // end date is before start date\n return true;\n return false;\n}", "setStart(uid) {\n\t\tif(this.started)\n\t\t\treturn null;\n\n\t\tthis.starts.add(uid);\n\n\t\treturn this.nstarts >= this.nstartsRequired;\n\t}", "static contains(testSel, selStart, selEnd) {\n const geStart =\n selStart.measure < testSel.measure ||\n (selStart.measure === testSel.measure && selStart.tick <= testSel.tick);\n const leEnd =\n selEnd.measure > testSel.measure ||\n (selEnd.measure === testSel.measure && testSel.tick <= selEnd.tick);\n\n return geStart && leEnd;\n }", "function ifOverlap(a,b){\n if (!a.start_time || !b.start_time){\n return false;\n }\n aS = getMin(a.start_time);\n bS = getMin(b.start_time);\n aE = getMin(a.end_time);\n bE = getMin(b.end_time);\n return (aS <= bS && aE >= bS) || (aS < bE && aE > bE);\n}", "inEdit(line) {\n return line >= this.baseFrom && line <= this.baseTo;\n }", "isCoveredBy(ranges: Interval[]): boolean {\n var remaining = this.clone();\n for (var i = 0; i < ranges.length; i++) {\n var r = ranges[i];\n if (i && r.start < ranges[i - 1].start) {\n throw 'isCoveredBy must be called with sorted ranges';\n }\n if (r.start > remaining.start) {\n return false; // A position has been missed and there's no going back.\n }\n remaining.start = r.stop + 1;\n if (remaining.length() <= 0) {\n return true;\n }\n }\n return false;\n }", "function validateStartEnd(start, end) {\n if (!start || !start.isValid) {\n return Interval.invalid(\"missing or invalid start\");\n } else if (!end || !end.isValid) {\n return Interval.invalid(\"missing or invalid end\");\n } else if (end < start) {\n return Interval.invalid(\"end before start\", `The end of an interval must be after its start, but you had start=${start.toISO()} and end=${end.toISO()}`);\n } else {\n return null;\n }\n}", "function validateStartEnd(start, end) {\n if (!start || !start.isValid) {\n return Interval.invalid(\"missing or invalid start\");\n } else if (!end || !end.isValid) {\n return Interval.invalid(\"missing or invalid end\");\n } else if (end < start) {\n return Interval.invalid(\"end before start\", `The end of an interval must be after its start, but you had start=${start.toISO()} and end=${end.toISO()}`);\n } else {\n return null;\n }\n}", "function valid_range(obj_name, start,end, msg) {\n\tif (!valid_digit(obj_name)) {\n\t\tif (msg)\n\t\t\talert(msg);\n\t\treturn false;\n\t}\n\td = parseInt(obj_name, 10);\n\tif ( !(d<=end && d>=start) ) {\n\t\tif (msg)\n\t\t\talert(msg);\n\t\treturn false;\n\t}\n\treturn true;\n}", "function start__TO__END_ques_(rangeExceptionCompareHow) /* (rangeExceptionCompareHow : rangeExceptionCompareHow) -> bool */ {\n return (rangeExceptionCompareHow === 2);\n}", "function isFetchNeeded(start, end) {\n\t\treturn !rangeStart || // nothing has been fetched yet?\n\t\t\tstart < rangeStart || end > rangeEnd; // is part of the new range outside of the old range?\n\t}", "function isFetchNeeded(start, end) {\n\t\treturn !rangeStart || // nothing has been fetched yet?\n\t\t\tstart < rangeStart || end > rangeEnd; // is part of the new range outside of the old range?\n\t}", "function isFetchNeeded(start, end) {\n\t\treturn !rangeStart || // nothing has been fetched yet?\n\t\t\tstart < rangeStart || end > rangeEnd; // is part of the new range outside of the old range?\n\t}", "function isFetchNeeded(start, end) {\n\t\treturn !rangeStart || // nothing has been fetched yet?\n\t\t\tstart < rangeStart || end > rangeEnd; // is part of the new range outside of the old range?\n\t}", "function isFetchNeeded(start, end) {\n\t\treturn !rangeStart || // nothing has been fetched yet?\n\t\t\tstart < rangeStart || end > rangeEnd; // is part of the new range outside of the old range?\n\t}", "extendToWordStartEnd() {\n if ((this.start.paragraph.isInsideTable || this.end.paragraph.isInsideTable)\n && (this.start.paragraph.associatedCell !== this.end.paragraph.associatedCell\n || this.isCellSelected(this.start.paragraph.associatedCell, this.start, this.end))) {\n return true;\n }\n return false;\n }", "function isFetchNeeded(start, end) {\n\t\t\treturn !rangeStart || // nothing has been fetched yet?\n\t\t\t\tstart < rangeStart || end > rangeEnd; // is part of the new range outside of the old range?\n\t\t}", "contains_exclusive(dat_or_drange){\n return this.starts_before(dat_or_drange) && this.ends_after(dat_or_drange) ;\n }", "isStart(editor, point, at) {\n // PERF: If the offset isn't `0` we know it's not the start.\n if (point.offset !== 0) {\n return false;\n }\n\n var start = Editor.start(editor, at);\n return Point.equals(point, start);\n }", "isStart(editor, point, at) {\n // PERF: If the offset isn't `0` we know it's not the start.\n if (point.offset !== 0) {\n return false;\n }\n\n var start = Editor.start(editor, at);\n return Point.equals(point, start);\n }", "function rangesOverlap(a_start, a_end, b_start, b_end) {\n if (a_start <= b_start && b_start <= a_end) return true; // b starts in a\n if (a_start <= b_end && b_end <= a_end) return true; // b ends in a\n if (b_start < a_start && a_end < b_end) return true; // a in b\n return false;\n}", "validateStartToEndDay(startDay, endDay) {\n if (startDay > endDay)\n throw Error(\"startDay must come before endDay following normal calendar sequence.\");\n }", "function isBtwTimes(n, start, end) {\n\treturn (n >= start) && (n <= end);\n}", "function isStartEndDateOfLogic(startDate,sgin1,matchedDate1,flag,startDate2,sgin2,matchedDate2){\r\n\tvar allStartDate;\r\n\tvar allStratDate2;\r\n\tvar allMatchedDate1;\r\n\tvar allMatchedDate2;\r\n\tif(startDate.length>0 && matchedDate1.length>0 && startDate2.length>0 && matchedDate2.length>0){ \r\n\t\tvar startDateTemp = startDate.split(\" \"); \r\n\t\tvar arrStartDate = startDateTemp[0].split(\"-\"); \r\n\t\tallStartDate = new Date(arrStartDate[0],arrStartDate[1],arrStartDate[2]).getTime(); \r\n\t\t\r\n\t\tvar startDateTemp2 = startDate2.split(\" \"); \r\n\t\tvar arrStartDate2 = startDateTemp2[0].split(\"-\"); \r\n\t\tallStratDate2 = new Date(arrStartDate2[0],arrStartDate2[1],arrStartDate2[2]).getTime(); \r\n\t\t\r\n\t\tif(strDateTime(matchedDate1)){\r\n\t\t\tallMatchedDate1 = matchedDate1;\r\n\t\t}\r\n\t\tvar endDateTemp = matchedDate1.split(\" \"); \r\n\t\tvar arrEndDate = endDateTemp[0].split(\"-\"); \r\n\t\tallMatchedDate1 = new Date(arrEndDate[0],arrEndDate[1],arrEndDate[2]).getTime();\t \r\n\t\t\r\n\t\tif(strDateTime(matchedDate2)){\r\n\t\t\tallMatchedDate2 = matchedDate2;\r\n\t\t}\r\n\t\tvar endDateTemp2 = matchedDate2.split(\" \"); \r\n\t\tvar arrEndDate2 = endDateTemp2[0].split(\"-\"); \r\n\t\tallMatchedDate2 = new Date(arrEndDate2[0],arrEndDate2[1],arrEndDate2[2]).getTime();\r\n\t\t\r\n\t\tif(flag == \"&&\"){\r\n\t\t\tif(sgin1 == '>' && sgin2 == '<'){\r\n\t\t\t\tif(allStartDate>allMatchedDate1 && allStratDate2<allMatchedDate2){\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}else if(sgin1 == '>' && sgin2 == '<='){\r\n\t\t\t\tif(allStartDate>allMatchedDate1 && allStratDate2<=allMatchedDate2){\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}else if(sgin1 == '>=' && sgin2 == '<'){\r\n\t\t\t\tif(allStartDate>=allMatchedDate1 && allStratDate2<allMatchedDate2){\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}else if(sgin1 == '>=' && sgin2 == '<='){\r\n\t\t\t\tif(allStartDate>=allMatchedDate1 && allStratDate2<=allMatchedDate2){\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}else if(sgin1 == '<' && sgin2 == '>'){\r\n\t\t\t\tif(allStartDate<allMatchedDate1 && allStratDate2>allMatchedDate2){\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}else if(sgin1 == '<' && sgin2 == '>='){\r\n\t\t\t\tif(allStartDate<allMatchedDate1 && allStratDate2>=allMatchedDate2){\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}else if(sgin1 == '<=' && sgin2 == '>'){\r\n\t\t\t\tif(allStartDate<=allMatchedDate1 && allStratDate2>allMatchedDate2){\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}else if(sgin1 == '<=' && sgin2 == '>='){\r\n\t\t\t\tif(allStartDate<=allMatchedDate1 && allStratDate2>=allMatchedDate2){\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else if(flag == \"||\"){\r\n\t\t\tif((sgin1 == '>' || sgin1 == '>=' || sgin1 == '<' || sgin1 == '<=' || sqin1 == '==') || (sgin2 == '>' || sgin2 == '>=' || sgin2 == '<' || sgin2 == '<=' || sgin2 == '==')){\r\n\t\t\t\tif(allStartDate>allMatchedDate1 || allStratDate2==allMatchedDate2){\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t} \r\n}", "function format_start_stop(start, stop) {\n hit_from = start;\n hit_to = stop;\n if (start > stop) {\n hit_from = stop;\n hit_to = start;\n }\n }", "function canReach(arr, start) {\n if (start < 0 || start > arr.length - 1 || arr[start] === -1) return false;\n const val = arr[start];\n\n if (val === 0) return true;\n\n arr[start] = -1;\n return canReach(arr, start + val) || canReach(arr, start - val);\n}", "rangeHasMark(from2, to, type) {\n let found2 = false;\n if (to > from2)\n this.nodesBetween(from2, to, (node) => {\n if (type.isInSet(node.marks))\n found2 = true;\n return !found2;\n });\n return found2;\n }", "function isInRange(value, start, end, rangeEnabled) {\n return rangeEnabled && start !== null && end !== null && start !== end && value >= start && value <= end;\n}", "checkObstruction(startCoordinates, endCoordinates) {\n if (startCoordinates.x != endCoordinates.x) //moves in x\n {\n if (startCoordinates.x < endCoordinates.x)\n return this.checkObstructionForward(startCoordinates, endCoordinates, 'x')\n else if (startCoordinates.x > endCoordinates.x)\n return this.checkObstructionBackwards(startCoordinates, endCoordinates, 'x')\n } else if (startCoordinates.y != endCoordinates.y) //moves in y\n {\n if (startCoordinates.y < endCoordinates.y)\n return this.checkObstructionForward(startCoordinates, endCoordinates, 'y')\n else if (startCoordinates.y > endCoordinates.y)\n return this.checkObstructionBackwards(startCoordinates, endCoordinates, 'y')\n }\n\n }", "overlaps(dat_range){\n if (!(dat_range.start && dat_range.end)){\n console.error(\"dat_range items must all respond to a method called 'start' and 'end', this dat_range was:\", dat_range);\n }\n return this.contains_exclusive(dat_range.end) || this.contains_exclusive(dat_range.start) || this.during(dat_range);\n }", "contains(x, start, end){ return (this.find(x, start, end) != -1) }", "function between(first, last, value)\n{\n\treturn (first < last ? value >= first && value <= last : value >= last && value <= first);\n}", "isValid() {\n return ((this.start instanceof Date) && (this.end instanceof Date)\n && (this.id >= 1) && (this.location));\n }", "function testStartsEndsWith(callback)\n{\n\ttesting.assert('pepito'.startsWith('pe'), 'Failed to match using startsWith()', callback);\n\ttesting.assert(!'pepito'.startsWith('po'), 'Invalid match using startsWith()', callback);\n\ttesting.assert('pepito'.endsWith('to'), 'Failed to match using endsWith()', callback);\n\ttesting.assert(!'pepito'.startsWith('po'), 'Invalid match using endsWith()', callback);\n\ttesting.success(callback);\n}", "function rangeIncludes(a, b) {\n\t var rangeIsIncluded = compareRangeBoundaryPoints(a, \"start\", b, \"start\") <= 0 && compareRangeBoundaryPoints(a, \"end\", b, \"end\") >= 0;\n\t return rangeIsIncluded;\n\t}", "function compareUnzonedRanges(range1,range2){return range1.startMs-range2.startMs;// earlier ranges go first\n}", "function isInRange(value, start, end, rangeEnabled) {\n return rangeEnabled && start !== null && end !== null && start !== end &&\n value >= start && value <= end;\n}", "function isInRange(value, start, end, rangeEnabled) {\n return rangeEnabled && start !== null && end !== null && start !== end &&\n value >= start && value <= end;\n}", "get hasValidDates() {\n let me = this,\n start = me.startDateMS,\n end = me.endDateMS;\n\n return !start || !end || end - start >= 0;\n }", "_isRangeEnd(value) {\n return isEnd(value, this.startValue, this.endValue);\n }", "_isRangeEnd(value) {\n return isEnd(value, this.startValue, this.endValue);\n }", "function doesOverlap(e1, e2) {\n if (e1.start > e2.start) {\n [e1, e2] = [e2, e1];\n }\n if (e1.end <= e2.start) {\n return false;\n }\n return true;\n}", "function start__TO__START_ques_(rangeExceptionCompareHow) /* (rangeExceptionCompareHow : rangeExceptionCompareHow) -> bool */ {\n return (rangeExceptionCompareHow === 1);\n}", "overlaps(range) {\n for (let i = 0, j = this.set.length; i < j; i++) {\n const setRange = this.set[i];\n if (setRange.range[1] > range.range[0] &&\n setRange.range[0] < range.range[1]) {\n return true;\n }\n }\n return false;\n }", "length(){ return this.end-this.start }", "between( between, dependentVal){\n if( dependentVal > between[0] && dependentVal < between[1]){\n return true;\n }else{\n return false;\n }\n\n}", "function sortByRangeStart(a,b){return a.start-b.start;}", "hasStarted () {\r\n return Boolean(this._pastPos[this._pastPos.length-1])\r\n }", "isStartPossible(start_time, emp_id){\n let flag = true;\n let allTimecards = companydata.getAllTimecard(emp_id);\n allTimecards.forEach(timecard => {\n if (this.prepareTimecardDate(start_time) == this.prepareTimecardDate(timecard.start_time)) {\n flag = false;\n }\n });\n return flag;\n }", "function checkCoordinates (startCoordinate, direction, length) {\n let noOverlap = true\n for (let i = 0; i < length; i++) {\n let newCoordinate = [startCoordinate[0] + i * direction[0], startCoordinate[1] + i * direction[1]]\n this.reservedCoordinates.forEach(coordinate => {\n let reservedX = coordinate[0]\n let reservedY = coordinate[1]\n let newX = newCoordinate[0]\n let newY = newCoordinate[1]\n if (reservedX === newX && reservedY === newY) {\n noOverlap = false\n } \n })\n }\n return noOverlap\n}" ]
[ "0.7910362", "0.7910362", "0.79102963", "0.7202752", "0.7188376", "0.71393454", "0.71393454", "0.7124153", "0.7089423", "0.7089423", "0.7082911", "0.6991141", "0.6988255", "0.6874217", "0.6845974", "0.68382925", "0.68267137", "0.6826206", "0.67953295", "0.6751445", "0.6711845", "0.66876394", "0.6679198", "0.6679198", "0.6662556", "0.6591297", "0.6580393", "0.6578102", "0.6564762", "0.6491534", "0.64813685", "0.6465175", "0.64059985", "0.63829", "0.63619953", "0.635302", "0.635302", "0.63530034", "0.6352123", "0.6310186", "0.62874985", "0.62815255", "0.6280385", "0.62763554", "0.6256343", "0.62516934", "0.62516934", "0.6245461", "0.6237583", "0.62258667", "0.6219815", "0.6216269", "0.6201738", "0.6195349", "0.6195349", "0.61899877", "0.61824375", "0.6174739", "0.6174739", "0.6174739", "0.6174739", "0.6174739", "0.6168678", "0.61642075", "0.6155672", "0.6154803", "0.6154803", "0.61252385", "0.61018366", "0.6093349", "0.6081942", "0.6061228", "0.6041567", "0.60399467", "0.60227215", "0.6017012", "0.6014749", "0.6004917", "0.59750634", "0.5945932", "0.5942436", "0.59407955", "0.5922584", "0.59205043", "0.59205043", "0.59116876", "0.58938277", "0.58938277", "0.5890944", "0.58819854", "0.58761877", "0.5870332", "0.5862987", "0.58515084", "0.5846586", "0.58346015", "0.5833485" ]
0.61919224
57
to create a new object while only changing some of the properties
function clone$1(inst, alts) { var current = { ts: inst.ts, zone: inst.zone, c: inst.c, o: inst.o, loc: inst.loc, invalid: inst.invalid }; return new DateTime(Object.assign({}, current, alts, { old: current })); } // find the right offset a given local time. The o input is our guess, which determines which
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static getNewProperties() {\n return {};\n }", "function NewObj(){}", "function changeProp(obj) {\n return {\n ...obj,\n name: 'Jen'\n };\n // obj.name = 'Jen';\n //return obj\n}", "function makeObj() {\n return {\n propA: 10,\n propB: 20,\n };\n}", "function createAnother(original){\n var clone = object(original); //create a new object by calling a function\n clone.sayHi = function(){ //augment the object in some way\n alert(\"hi\");\n };\n return clone; //return the object\n}", "function makePerson(name, age) {\r\n\t// add code here\r\n\tlet personObj = Object.create(null);\r\n personObj.name = name;\r\n personObj.age = age;\r\n \r\n return personObj;\r\n\r\n}", "static filter(data) {\n const copy = { ...data };\n copy.a = copy.newA;\n delete copy['newA'];\n return copy;\n }", "function NewObj() {}", "function createAnother(original){\n var clone = Object.create(original)\n clone.sayHi = function(){\n console.log(\"hi\")\n }\n return clone\n}", "function extendWithNew(target, obj) {\r\n properties(obj).forEach( function(prop) {\r\n if (target[prop]===undefined) target[prop] = obj[prop];\r\n });\r\n}", "newObj() {\n const newObj = {};\n this.objects[this.count] = {};\n this.objects[this.count].JSobj = newObj; // Store JS object\n this.objects[this.count].DOMelements = {}; // Prepare to store DOM elements\n\n newObj.nodeID = null;\n newObj.id = this.count++;\n newObj.name = \"\";\n newObj.type = \"\";\n newObj.parent = \"null\";\n newObj.children = [];\n newObj.details = [];\n\n newObj.instance = this;\n\n // Remember which node to edit\n this.editNode = newObj.id;\n this.newObject = newObj;\n\n return newObj;\n }", "function createAnother(original) { // 1\n\t \t\t\t\tvar clone = object(original); // 2 \n\t \t\t\t\tclone.sayHi = function() {\t\t\t// 3\n\t \t\t\t\t\treturn \"hello world\";\n\t \t\t\t\t};\n\t \t\t\t\treturn clone;\t\t\t\t\t\t\t// 4\n\t \t\t\t}", "function fillProperties(target,source){for(var key in source){if(source.hasOwnProperty(key)&&!target.hasOwnProperty(key)){target[key]=source[key]}}}", "function makeImmutableObject(obj) {\n\t if (!globalConfig.use_static) {\n\t addPropertyTo(obj, \"merge\", merge);\n\t addPropertyTo(obj, \"replace\", objectReplace);\n\t addPropertyTo(obj, \"without\", without);\n\t addPropertyTo(obj, \"asMutable\", asMutableObject);\n\t addPropertyTo(obj, \"set\", objectSet);\n\t addPropertyTo(obj, \"setIn\", objectSetIn);\n\t addPropertyTo(obj, \"update\", update);\n\t addPropertyTo(obj, \"updateIn\", updateIn);\n\t addPropertyTo(obj, \"getIn\", getIn);\n\t }\n\t\n\t return makeImmutable(obj, mutatingObjectMethods);\n\t }", "function createObject(makeNewItem, makeNewPrice) {\n\tthis.name = makeNewItem;\n\tthis.price = makeNewPrice;\n\treturn {name, price};\n}", "function sCopy(old){\n\tvar newObj ={};\n\n\n\tvar prop;\n\tfor (prop in old){ //doont want to add prototype shit...\n\t\t///better to include another if with if(oldObj.hasOwnProperty(i))\n\t\t//console.log(prop, old[prop])\n\t\t//console.log(newObj.prop) //this is wrong ..does not work..use bracket notatiin..\n\t\tnewObj[prop] = old[prop];\n\n\n\t}\n\n\treturn newObj;\n\n}", "updateCreate (state, payload) {\n // like update, but creates the object at location if it doesn't exist\n // basically like create w/o the checker\n // USE THIS SPARINGLY, most likely a state obj doesn't exist b/c of typo or race condition\n // if(!silent)\n // debug('Store.updateCreate', 'Creating', payload, state)\n console.log('UPDATECREATE', payload)\n\n // iterator \n Object.keys(payload).map((name, i) => {\n // const value = Object.values(payload)[0]\n // preserve things like functions, not just data w/ object.create\n state[name] = payload[name]\n })\n\n // single object\n // const name = Object.keys(payload)[0]\n // const value = Object.values(payload)[0]\n // state[name] = value\n }", "function fillProperties(target,source){for(var key in source){if(source.hasOwnProperty(key)&&!target.hasOwnProperty(key)){target[key]=source[key];}}}", "function makeImmutableObject(obj) {\n\t if (!globalConfig.use_static) {\n\t addPropertyTo(obj, \"merge\", merge);\n\t addPropertyTo(obj, \"replace\", objectReplace);\n\t addPropertyTo(obj, \"without\", without);\n\t addPropertyTo(obj, \"asMutable\", asMutableObject);\n\t addPropertyTo(obj, \"set\", objectSet);\n\t addPropertyTo(obj, \"setIn\", objectSetIn);\n\t addPropertyTo(obj, \"update\", update);\n\t addPropertyTo(obj, \"updateIn\", updateIn);\n\t addPropertyTo(obj, \"getIn\", getIn);\n\t }\n\n\t return makeImmutable(obj, mutatingObjectMethods);\n\t }", "function makeImmutableObject(obj) {\n\t if (!globalConfig.use_static) {\n\t addPropertyTo(obj, \"merge\", merge);\n\t addPropertyTo(obj, \"replace\", objectReplace);\n\t addPropertyTo(obj, \"without\", without);\n\t addPropertyTo(obj, \"asMutable\", asMutableObject);\n\t addPropertyTo(obj, \"set\", objectSet);\n\t addPropertyTo(obj, \"setIn\", objectSetIn);\n\t addPropertyTo(obj, \"update\", update);\n\t addPropertyTo(obj, \"updateIn\", updateIn);\n\t addPropertyTo(obj, \"getIn\", getIn);\n\t }\n\n\t return makeImmutable(obj, mutatingObjectMethods);\n\t }", "function newObject() { return {}; }", "copyItem(inName, inOldType, inNewType,\n inOldFlags, inNewFlags) {\n\n var objNewItem = new Item(inNewType, inName, { _s: this._s }).newItem();\n var objOldItem = this._s[inOldType + \"_\" + inName];\n\n var propsOldItem = this.arrNonFlagProperties(objOldItem);\n // excluding flag items and element objects\n for (var i = 0, len = propsOldItem.length; i < len; i++)\n if (propsOldItem[i] in objNewItem)\n objNewItem[propsOldItem[i]] =\n objOldItem[propsOldItem[i]];\n\n // both flag items inFlags and objFlags\n // are already in objNewItem thanks to\n // the above constructor: this.newItem\n var objFlags = new Flags(inNewFlags);\n\n // reset random memory, not for lists!! (save space)\n if (objFlags.isList)\n objNewItem._arrRandomMemory = [];\n else\n objNewItem._arrRandomMemory = objNewItem._arrOrder;\n\n // instead of copying element objects,\n // create new elements and copy their properties\n var arrOrder = objNewItem._arrOrder;\n var prop; // strict\n\n // ideally want to prevent extra properties for lists\n // but there's the chance users will want to convert\n // buttons to lists and back, in which case, all must stay\n for (var i = 0, len = arrOrder.length; i < len; i++) {\n objNewItem[arrOrder[i]] =\n new Element(inNewType, inName, arrOrder[i],\n { _s: this._s }).newElement();\n\n for (prop in objNewItem[arrOrder[i]]) {\n if (prop in objOldItem[arrOrder[i]]) {\n objNewItem[arrOrder[i]][prop]\n = objOldItem[arrOrder[i]][prop];\n }\n }\n }\n\n delete this._s[inOldType + \"_\" + inName];\n this._s[inNewType + \"_\" + inName] = objNewItem;\n\n return this._s;\n }", "function createObj(a, b)\n{\n //var newObject = {}; // Not needed ctor function\n this.a = a; //newObject.a = a;\n this.b = b; //newObject.b = b;\n //return newObject; // Not needed for ctor function\n}", "function newObject(object) {\n switch (object) {\n case 'sketch':\n create(\"canvas\");\n break;\n case 'photo':\n create('img');\n break;\n case 'title':\n create('p');\n break;\n case 'grid':\n grid.openGridSettings();\n break;\n }\n}", "static initialize(obj, id, created, accountId, modified, name, description, version, createdBy) { \n obj['id'] = id;\n obj['created'] = created;\n obj['accountId'] = accountId;\n obj['modified'] = modified;\n obj['name'] = name;\n obj['description'] = description;\n obj['version'] = version;\n obj['createdBy'] = createdBy;\n }", "function changeObj(d){\n d.prop1 = function(){};\n d.prop2 = {};\n}", "function MyNewObj(attributes) {\n this.name = attributes.name;\n this.age = attributes.age;\n this.speak = function() {\n return \"My name is \" + this.name;\n };\n}", "newBasicProp(...args){\n let newProp = new BasicProperty(...args);\n this.addProperty(newProp);\n }", "function makeImmutableObject(obj) {\n if (!globalConfig.use_static) {\n addPropertyTo(obj, \"merge\", merge);\n addPropertyTo(obj, \"replace\", objectReplace);\n addPropertyTo(obj, \"without\", without);\n addPropertyTo(obj, \"asMutable\", asMutableObject);\n addPropertyTo(obj, \"set\", objectSet);\n addPropertyTo(obj, \"setIn\", objectSetIn);\n addPropertyTo(obj, \"update\", update);\n addPropertyTo(obj, \"updateIn\", updateIn);\n addPropertyTo(obj, \"getIn\", getIn);\n }\n\n return makeImmutable(obj, mutatingObjectMethods);\n }", "function createNewPerson(person) {\n var person = {};\n person.name = name;\n person.age = age;\n person.email = email;\n person.phone = phone;\n}", "updateCreate (state, payload) {\n // like update, but creates the object at location if it doesn't exist\n // basically like create w/o the checker\n // USE THIS SPARINGLY, most likely a state obj doesn't exist b/c of typo or race condition\n // if(!silent)\n // debug('Store.updateCreate', 'Creating', payload, state)\n // console.log('UPDATECREATE', payload)\n\n // iterator \n Object.keys(payload).map((name) => {\n // const value = Object.values(payload)[0]\n // preserve things like functions, not just data w/ object.create\n state[name] = payload[name]\n })\n\n // single object\n // const name = Object.keys(payload)[0]\n // const value = Object.values(payload)[0]\n // state[name] = value\n }", "function preventChanges(obj) {\n Object.freeze(obj);\n obj.noChanges = false;\n obj.signature = \"whatever\";\n return obj;\n }", "function dummyObjects(name, age){\n this.name = name\n this.age = age\n}", "function fillProperties(target, source) {\n for (var key in source) {\n if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n target[key] = source[key];\n }\n }\n }", "function immutableObjectTest(){\n\nlet test= {'name': 'vishal', 'age':27};\n//Object.freeze(test);\nlet test2= test;\n\ntest.age = 26;\nconsole.log(test);\nconsole.log(test2);\nconsole.log(test === test2);\n\n\n\n\n}", "function makeSafeObject(dirty, properties) {\n\tlet safe = {};\n\tproperties.forEach((prop) => {\n\t\tlet parts = prop.split('.');\n\t\tlet source = dirty;\n\t\tlet target = safe;\n\t\tfor (let i=0; i < parts.length - 1; i++) {\n\t\t\tif (!source[parts[i]]) return; // Source doesn't have property\n\t\t\tif (!target[parts[i]]) target[parts[i]] = {};\n\t\t\tsource = source[parts[i]];\n\t\t\ttarget = target[parts[i]];\n\t\t}\n\t\tif (!source[parts[parts.length-1]]) return; // Source doesn't have property\n\t\ttarget[parts[parts.length-1]] = source[parts[parts.length-1]];\n\t});\n\treturn safe;\n}", "createFromAction(from, newProperties) {\n return this.create({ ...from.payload, ...newProperties });\n }", "function newProperty(){\r\nvar student = {name: \"David Aughan\", class: \"VI\", id: \"12\"};\r\nconsole.log (\"Old diferents properties: \\n Name: \" + student.name + \"\\n Class: \"+ student.class +\"\\n Id: \" + student.id)\r\nstudent.city = \"Barcelona\";\r\nconsole.log (\"Add new property called city: \\n Name: \" + student.name + \"\\n Class: \"+ student.class +\"\\n Id: \" + student.id + \"\\n City: \" + student.city)\r\n}", "function cumpleanosClonandoObjeto(persona){\n return {\n ...persona,\n edad: persona.edad += 1\n }\n}", "function clone(obj) {\n return Object.assign({}, person);\n \n }", "function newObject(){\n var newFlavor = document.getElementById(\"flavor\").textContent;\n var newGlaze = customizeGlazeToObject();\n var newQuantity = customizeQuantityToObject();\n var newPrice = customizePriceToObject();\n //var newID = customizeIDToObject();\n var newBun = new bun (newFlavor, newGlaze, newQuantity, newPrice);\n return newBun;\n}", "copy({ type = this.type, value = this.value } = {}) {\n const { id, lbp, rules, unknown, ignored } = this;\n return new this.constructor(id, {\n lbp,\n rules,\n unknown,\n ignored,\n type,\n value,\n original: this,\n });\n }", "function makeObject(obj){\n\t// console.log(\"ovj=\",obj);\n\t// console.log();\n\ttry{\n\t\tif(obj!=undefined && obj[10]!=undefined && obj[0]!=\"Delete\"){\n\t\t\tvar newObj={};\n\t\t\tnewObj._key=calculate_key(obj);\n\t\t\tnewObj.name=obj[1];\n\t\t\tnewObj.priority=obj[2];\n\t\t\tnewObj.owner_name=obj[3];\n\t\t\tnewObj.owner_number=obj[4];\n\t\t\tnewObj.contact_person=obj[5];\n\t\t\tnewObj.contact_phone=obj[6];\n\t\t\tnewObj.address=obj[7];\n\t\t\tnewObj.location=obj[8];\n\t\t\tnewObj.description=obj[9];\n\t\t\tnewObj.facebookurl=obj[10];\n\t\t\tnewObj.fbid=calculate_key(obj);\n\t\t\tnewObj.genre=obj[11];\n\t\t\tnewObj.profile_type=\"Party Spot\";\n\t\t\tnewObj.time=obj[13];\n\t\t\tnewObj.price=obj[14];\n\t\t\tnewObj.min=obj[14];\n\t\t\tnewObj.max=obj[14];\n\t\t\tnewObj.more=obj[15];\n\t\t\tnewObj.createdat=new Date().getTime();\n\t\t\tnewObj.rsm= {\n\t\t\t\t\"email\": \"[email protected]\",\n\t\t\t\t\"name\": \"Tarun\",\n\t\t\t\t\"phone\": \"+91 97 1197 1244\"\n\t\t\t};\n\n\n\t\t\treturn newObj;\n\t\t}\n\t\treturn undefined;\n\t}\n\tcatch(err){\n\t\tconsole.log(\"eror=\",err);\n\t\treturn undefined;\n\t}\n\treturn undefined;\n}", "function fillProperties(target, source) {\n for (var key in source) {\n if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n target[key] = source[key];\n }\n }\n }", "function fillProperties(target, source) {\n for (var key in source) {\n if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n target[key] = source[key];\n }\n }\n }", "function fillProperties(target, source) {\n for (var key in source) {\n if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n target[key] = source[key];\n }\n }\n }", "function extend(oldObj, originalNewObj, preserve) {\n // fail-save if something goes wrong\n if(!oldObj || !originalNewObj) return oldObj || originalNewObj || {};\n\n // make sure we work with copies\n //oldObj = copy(oldObj);\n\n //var newObj = copy(originalNewObj);\n\n var toStringValue;\n var newObjectProperty;\n\n for(var key in originalNewObj) {\n toStringValue = Object.prototype.toString.call(originalNewObj[key]);\n //console.log('ir.extend '+toStringValue+' - key='+key);\n if(toStringValue === '[object Object]') {\n if (oldObj[key] === undefined) {\n oldObj[key] = {};\n }\n //extend(oldObj[key], newObj[key]);\n newObjectProperty = copy(originalNewObj[key]);\n extend(oldObj[key], newObjectProperty);\n } else if(toStringValue === '[object Array]') {\n if (oldObj[key] === undefined) {\n oldObj[key] = [];\n }\n //extend(oldObj[key], newObj[key]);\n newObjectProperty = copy(originalNewObj[key]);\n extend(oldObj[key], newObjectProperty);\n } else {\n if (toStringValue === '[object Function]'\n && typeof oldObj.key !== \"undefined\")\n {\n //oldObj[key] = (preserve && oldObj[key]) ? oldObj[key] : wrap(/*newObj*/originalNewObj[key], oldObj);\n if (preserve && oldObj[key]) {\n //oldObj[key] = oldObj[key];\n } else {\n oldObj[key] = wrap(originalNewObj[key], oldObj);\n }\n } else { // [object Number], [object Boolean], [object String], [object Undefined], [object Null], [object Date], [object RegExp]\n // if preserve is set to true oldObj will not be overwritten by newObj if\n // oldObj has already a method key\n if (preserve && oldObj[key]) {\n //oldObj[key] = oldObj[key];\n } else {\n //oldObj[key] = newObj[key];\n\n var descriptor = Object.getOwnPropertyDescriptor(originalNewObj/*newObj*/, key);\n var aGetter;\n var aSetter;\n if (typeof descriptor !== \"undefined\") {\n aGetter = descriptor.get;\n aSetter = descriptor.set;\n }\n if ((typeof aGetter !== \"undefined\" && aGetter != null)\n || (typeof aSetter !== \"undefined\" && aSetter != null))\n {\n Object.defineProperty(oldObj, key, {\n enumerable: true,\n get: aGetter,\n set: aSetter\n }); // value: 8675309, writable: false, enumerable: false\n } else {\n //oldObj[key] = newObj[key];\n oldObj[key] = originalNewObj[key];\n }\n }\n }\n }\n }\n\n return oldObj;\n }", "function addProperties() {\n function addProps(o1,o2) {\n o1 = typeof o1 === 'object' ? o1 : {};\n o2 = typeof o2 === 'object' ? o2 : {};\n Object.keys(o2).forEach(function(k) {\n o1[k] = o2[k];\n });\n return o1;\n }\n var args = Array.prototype.slice.call(arguments);\n var newObject = {};\n args.forEach(function(a) {\n addProps(newObject, a);\n });\n return newObject;\n }", "function setPropObj(length, type, used) {\n return {\n length: length,\n type: type,\n used: used\n };\n}", "function AO(a){return function(b,c){b.constructor.hasOwnProperty(\"properties\")||Object.defineProperty(b.constructor,\"properties\",{value:{}});b.constructor.properties[c]=Object.assign(Object.assign({},b.constructor.properties[c]),a)}}", "function MakePerson(pName, pBirthday, pSSN) {\n var newObj = {};\n newObj.name = pName;\n newObj.birthday = pBirthday;\n newObj.ssn = pSSN;\n return newObj;\n}", "assign(target, data, omitFields = [] ) {\n let changes = this._copyFields(target, data, omitFields);\n\n if (data.elements !== undefined) {\n if (target.elements !== undefined) {\n changes['elements'] = [...target.elements]\n }\n target.elements = [];\n for (let index = 0; index < data.elements.length; index++) {\n target.elements.push(typeof data.elements[index] !== 'object' ? {id: data.elements[index]} : data.elements[index])\n }\n }\n if (!target.title && Object.keys(changes).length) {\n target.title = '(no title)';\n changes.title = ''\n }\n\n if (Object.keys(changes).length) {\n if (target['creationData'] === undefined) {\n target['creationDate'] = Date.now()\n }\n target['modifiedDate'] = Date.now();\n }\n return target;\n }", "copy() {\n return Object.assign(Object.create(this), JSON.parse(JSON.stringify(this)))\n }", "function newPerson(name) {\n let obj = {}\n Object.defineProperties(obj, {\n log: {\n value: function() {\n console.log(name);\n },\n writable: false,\n },\n });\n return obj;\n}", "duplicate() {\n return new BaseDataClass(Object.assign(Object.assign({}, this), { id: null, email: null }));\n }", "function changeObj(d) {\n d.prop1 = function() {};\n d.prop2 = {};\n}", "function makeImmutableProperty (self, schema, values, propName) {\n var Model, dateCopy;\n\n if (schema[propName].__immutableCtor && is.function(schema[propName])) {\n // this is a nested immutable\n Model = schema[propName];\n self[propName] = new Model(values[propName]);\n } else if (isDate(values[propName])) {\n dateCopy = new Date(values[propName]);\n\n Object.defineProperty(self, propName, {\n get: function () {\n return new Date(dateCopy);\n },\n enumerable: true,\n configurable: false\n });\n\n Object.freeze(self[propName]);\n } else {\n objectHelper.setReadOnlyProperty(\n self,\n propName,\n // TODO: is it really necessary to clone the value if it isn't an object?\n objectHelper.copyValue(values[propName]),\n // typeof values[propName] === 'object' ? objectHelper.copyValue(values[propName]) : values[propName],\n makeSetHandler(propName)\n );\n\n if (Array.isArray(values[propName])) {\n Object.freeze(self[propName]);\n }\n }\n }", "function passMeAnObjectAndUpdate(obj, prop, val){\n\t\tconsole.log('f');\n\t\t//Here we add a property to the new object\n\t\tobj[prop] = val;\n\t\treturn obj;\n\t}", "clone(opts={}) {\n // remove the id if it exists\n const {'id': deletedKey, ...attrs} = this.attributes\n const {copyNumber} = opts\n\n // generate name variant\n const name = this.copyName(copyNumber)\n \n // change the startDate and endDate if desired\n const {startDate,endDate} = opts.offsetDuration ? \n this.getOffsetDuration() : this.attributes\n \n return Promo.fromAttributes({\n ...attrs,\n name,\n startDate,\n endDate,\n })\n }", "function cloneSimpleProps(obj, props) {\n var dup = {};\n\n props.forEach(function(prop) {\n if (obj.hasOwnProperty(prop)) {\n dup[prop] = obj[prop];\n }\n });\n return dup;\n}", "create(props){\n const obj = {type: this.name};\n\n Object.keys(this.props).forEach((prop) => {\n obj[prop] = props[prop];\n\n // If not primitive type\n // if(this.props[prop].rel !== undefined){\n // types[this.props[prop].type].create(props[prop]);\n // }\n // // Create new instance of type and add relationship\n // this.props[prop].create = (obj) => types[prop.type].create(obj);\n //\n // // Fetch existing instance of type and add relationship\n // this.props[prop].link = (obj) => types[prop.type].link(obj);\n // }\n });\n\n return obj;\n }", "function newObjSet(){ \n newObj.num1 = $('#inputNum1').val();\n newObj.num2 = $('#inputNum2').val();\n newObj.operator = operator.operator;\n}", "function changeObj(d) {\r\n d.prop1 = function () { };\r\n d.prop2 = {};\r\n}", "static initialize(obj, id, name, updatedOn) { \n obj['id'] = id;\n obj['name'] = name;\n obj['updatedOn'] = updatedOn;\n }", "function fillProperties(target, source) {\n for (var key in source) {\n if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n target[key] = source[key];\n }\n }\n}", "function transmogrifyCopy(calvin) {\n if (typeof calvin !== 'object') {\n console.log('argument is of the wrong type');\n return;\n }\n\n // generate a random number between 1 and 5\n var randomNumber = Math.floor(Math.random() * 5) + 1;\n var newForm = calvin.form; // by default, do not change\n \n switch(randomNumber) {\n case 1 :\n newForm = 'tyrannosaurus';\n break;\n case 2 :\n newForm = 'grey wolf';\n break;\n case 3 :\n newForm = 'bengal tiger';\n break;\n case 4 :\n newForm = 'grizzly bear';\n break;\n case 5 :\n newForm = 'canary';\n break;\n default :\n // do nothing - he stays human\n break;\n }\n \n // return a new object that's just like calvin,\n // but transmogrified!\n return {\n 'name' : calvin.name,\n 'bestFriend' : calvin.bestFriend,\n 'form' : newForm\n };\n}", "function getPerson(name, age){\n let newPerson = {\n name: name,\n age: age\n };\n return newPerson;\n}", "function recycleProps(oldProps, newProps, equalityFuncs) {\n var comboProps = {}; // some old, some new\n\n var anyChanges = false;\n\n for (var key in newProps) {\n if (key in oldProps && (oldProps[key] === newProps[key] || equalityFuncs[key] && equalityFuncs[key](oldProps[key], newProps[key]))) {\n // equal to old? use old prop\n comboProps[key] = oldProps[key];\n } else {\n comboProps[key] = newProps[key];\n anyChanges = true;\n }\n }\n\n for (var key in oldProps) {\n if (!(key in newProps)) {\n anyChanges = true;\n break;\n }\n }\n\n return {\n anyChanges: anyChanges,\n comboProps: comboProps\n };\n }", "function fillProperties(target, source) {\n for (const key in source) {\n if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n target[key] = source[key];\n }\n }\n}", "function fillProperties(target, source) {\n for (const key in source) {\n if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n target[key] = source[key];\n }\n }\n}", "function fillProperties(target, source) {\n for (const key in source) {\n if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n target[key] = source[key];\n }\n }\n}", "function fillProperties(target, source) {\n for (const key in source) {\n if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n target[key] = source[key];\n }\n }\n}", "function fillProperties(target, source) {\n for (const key in source) {\n if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n target[key] = source[key];\n }\n }\n}", "function fillProperties(target, source) {\n for (const key in source) {\n if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n target[key] = source[key];\n }\n }\n}", "function fillProperties(target, source) {\n for (const key in source) {\n if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n target[key] = source[key];\n }\n }\n}", "function fillProperties(target, source) {\n for (const key in source) {\n if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n target[key] = source[key];\n }\n }\n}", "function fillProperties(target, source) {\n for (const key in source) {\n if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n target[key] = source[key];\n }\n }\n}", "function recycleProps(oldProps, newProps, equalityFuncs) {\n var comboProps = {}; // some old, some new\n\n var anyChanges = false;\n\n for (var key in newProps) {\n if (key in oldProps && (oldProps[key] === newProps[key] || equalityFuncs[key] && equalityFuncs[key](oldProps[key], newProps[key]))) {\n // equal to old? use old prop\n comboProps[key] = oldProps[key];\n } else {\n comboProps[key] = newProps[key];\n anyChanges = true;\n }\n }\n\n for (var key in oldProps) {\n if (!(key in newProps)) {\n anyChanges = true;\n break;\n }\n }\n\n return {\n anyChanges: anyChanges,\n comboProps: comboProps\n };\n }", "function updateDataFromInputFields() {\n //TODO maybe clone the object, then the return of this function can be the cloned object, if we want to update the true data we just set the original data to the new cloned one, if we ever want to check if any changes have been made between a series of events we can simply check the result of this function against the current object LOL did you get all of that\n\n //TODO if the data is null, this will cause an error to occur\n let clonedObject = JSON.parse(JSON.stringify(openDay));\n\n clonedObject.amManager = amManagerInput.value;\n clonedObject.pmManager = pmManagerInput.value;\n clonedObject.sales = getInputAsFloatOrNull(salesInput);\n clonedObject.customerCount = getInputAsIntegerOrNull(customerCountInput);\n clonedObject.cashVariance = getInputAsFloatOrNull(cashVarianceInput);\n clonedObject.notes = notesTextarea.value;\n clonedObject.data = getAllRowsData();\n\n return clonedObject;\n}", "clone(obj) {\n return Object.assign({}, obj);\n }", "clone() {\n const clone = new this.constructor(this.model);\n clone.config = Object.assign(clone.config, this.config);\n clone.options = Object.assign(clone.options, this.options);\n return clone;\n }", "function fillProperties(target, source) {\n for (var key in source) {\n if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n target[key] = source[key];\n }\n }\n}", "function fillProperties(target, source) {\n for (var key in source) {\n if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n target[key] = source[key];\n }\n }\n}", "function fillProperties(target, source) {\n for (var key in source) {\n if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n target[key] = source[key];\n }\n }\n}", "function fillProperties(target, source) {\n for (var key in source) {\n if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n target[key] = source[key];\n }\n }\n}", "function makePerson(name, birthday, ssn) {\n var newPerson = {};\n newPerson.name = name;\n newPerson.birthday = birthday;\n newPerson.ssn = ssn;\n return newPerson;\n}", "static initialize(obj, created, programID, customerProfileID, type, amount, name, subLedgerID) { \n obj['created'] = created;\n obj['programID'] = programID;\n obj['customerProfileID'] = customerProfileID;\n obj['type'] = type;\n obj['amount'] = amount;\n obj['name'] = name;\n obj['subLedgerID'] = subLedgerID;\n }", "clone() {\n\t\tlet data = JSON.parse(JSON.stringify(this.Serialize()));\n\t\treturn new this.constructor(data);\n\t}", "function copyPropsAndEles(originOne,newOne){\n for(var key in originOne){\n //console.log(arguments.callee.caller);\n newOne[key]=arguments.callee.caller(originOne[key]);\n }\n }", "function overwriteAttributes(oldObj, newObj) {\n \n if (!newObj || ! oldObj)\n return;\n\n var oldObjQueue = [];\n var newObjQueue = [];\n oldObjQueue.push(oldObj);\n newObjQueue.push(newObj);\n\n while (oldObjQueue.length && newObjQueue.length) {\n\n // pop object to investigate. \n var currOldObj = oldObjQueue.pop();\n var currNewObj = newObjQueue.pop();\n\n // Objects: get strings values of keys in current object \n // Arrays: get the integer values of all indexes into array \n // (this is obviously 0...n) \n // \n // This isn't the cleanest approach, but it keeps me from creating\n // a more complex structure with typeof array or typeof object\n var keys = Object.keys(currNewObj);\n\n // iterate through all keys \n for (var idx in keys) {\n var key = keys[idx];\n\n if (typeof currNewObj[key] === \"object\" && currNewObj[key] !== null) {\n\n // if it's an object, queue it to dive into it later\n newObjQueue.push(currNewObj[key]);\n oldObjQueue.push(currOldObj[key]);\n\n } else {\n\n // if anything but object, overwrite value from new object in old object \n currOldObj[key] = currNewObj[key];\n }\n }\n }\n}", "setProperties(properties) {\n let copied = _.clone(properties)\n copied['UserPoolName'] = this.userPoolName()\n this.properties = copied\n }", "function recycleProps(oldProps, newProps, equalityFuncs) {\n var comboProps = {}; // some old, some new\n var anyChanges = false;\n for (var key in newProps) {\n if (key in oldProps && (oldProps[key] === newProps[key] ||\n (equalityFuncs[key] && equalityFuncs[key](oldProps[key], newProps[key])))) {\n // equal to old? use old prop\n comboProps[key] = oldProps[key];\n }\n else {\n comboProps[key] = newProps[key];\n anyChanges = true;\n }\n }\n for (var key in oldProps) {\n if (!(key in newProps)) {\n anyChanges = true;\n break;\n }\n }\n return { anyChanges: anyChanges, comboProps: comboProps };\n }", "function recycleProps(oldProps, newProps, equalityFuncs) {\n var comboProps = {}; // some old, some new\n var anyChanges = false;\n for (var key in newProps) {\n if (key in oldProps && (oldProps[key] === newProps[key] ||\n (equalityFuncs[key] && equalityFuncs[key](oldProps[key], newProps[key])))) {\n // equal to old? use old prop\n comboProps[key] = oldProps[key];\n }\n else {\n comboProps[key] = newProps[key];\n anyChanges = true;\n }\n }\n for (var key in oldProps) {\n if (!(key in newProps)) {\n anyChanges = true;\n break;\n }\n }\n return { anyChanges: anyChanges, comboProps: comboProps };\n }", "function recycleProps(oldProps, newProps, equalityFuncs) {\n var comboProps = {}; // some old, some new\n var anyChanges = false;\n for (var key in newProps) {\n if (key in oldProps && (oldProps[key] === newProps[key] ||\n (equalityFuncs[key] && equalityFuncs[key](oldProps[key], newProps[key])))) {\n // equal to old? use old prop\n comboProps[key] = oldProps[key];\n }\n else {\n comboProps[key] = newProps[key];\n anyChanges = true;\n }\n }\n for (var key in oldProps) {\n if (!(key in newProps)) {\n anyChanges = true;\n break;\n }\n }\n return { anyChanges: anyChanges, comboProps: comboProps };\n }", "function changeGreeting(obj) {\n obj.greeting = 'Hola'; // mutate \n}", "function recClone(oldObject, newObject) {\n Object.keys(oldObject).forEach(function forCurrentParam(key) {\n if (typeof oldObject[key] !== 'function') {\n if (Array.isArray(oldObject[key])) {\n newObject[key] = [];\n recClone(oldObject[key], newObject[key]);\n } else {\n newObject[key] = oldObject[key];\n }\n }\n });\n\n return newObject;\n }", "function create(obj) {\n return Object.create(obj || null);\n}", "function alterarPessoa(pessoa) {\n const novaPessoa = {...pessoa} // Cria uma cópia do objeto\n novaPessoa.nome = 'João'\n novaPessoa.cidade = 'Fortaleza'\n novaPessoa.end.rua = 'ABC' // mudará nos dois\n // pois a cópia foi no apenas no primeiro nível\n\n return novaPessoa\n}", "function recycleProps(oldProps, newProps, equalityFuncs) {\n var comboProps = {}; // some old, some new\n var anyChanges = false;\n for (var key in newProps) {\n if (key in oldProps && (oldProps[key] === newProps[key] ||\n (equalityFuncs[key] && equalityFuncs[key](oldProps[key], newProps[key])))) {\n // equal to old? use old prop\n comboProps[key] = oldProps[key];\n }\n else {\n comboProps[key] = newProps[key];\n anyChanges = true;\n }\n }\n for (var key in oldProps) {\n if (!(key in newProps)) {\n anyChanges = true;\n break;\n }\n }\n return { anyChanges: anyChanges, comboProps: comboProps };\n}", "toObject () {\n return Object.assign(Object.create({}), this)\n }", "clone(retainMockFns) {\n const clone = Object.create(Object.getPrototypeOf(this))\n Object.assign(clone, deepClone(this))\n if (!retainMockFns) {\n delete clone.updateRecordFn\n delete clone.removeRecordFn\n }\n return clone\n }" ]
[ "0.6274014", "0.62712884", "0.60936064", "0.60454816", "0.59555525", "0.59144175", "0.5889698", "0.58792293", "0.5870448", "0.585065", "0.5847218", "0.58256686", "0.58036286", "0.5801606", "0.5800577", "0.5786137", "0.5778846", "0.57778525", "0.5764114", "0.5764114", "0.57567936", "0.57322896", "0.5722822", "0.57144564", "0.56962943", "0.568875", "0.56763154", "0.5672055", "0.5655869", "0.56486344", "0.56386906", "0.5632369", "0.5617248", "0.56154156", "0.5601265", "0.55989885", "0.55947995", "0.55891937", "0.5589081", "0.55862445", "0.5579792", "0.5561145", "0.55528575", "0.55517155", "0.55517155", "0.55517155", "0.5547748", "0.5547056", "0.55280703", "0.5521743", "0.5506753", "0.55040747", "0.5492235", "0.54790735", "0.5470642", "0.54675484", "0.5462598", "0.545903", "0.5452958", "0.54414004", "0.5441299", "0.5436362", "0.5426335", "0.5422517", "0.53964585", "0.53888613", "0.53856814", "0.5371735", "0.5362271", "0.5362271", "0.5362271", "0.5362271", "0.5362271", "0.5362271", "0.5362271", "0.5362271", "0.5362271", "0.53572714", "0.53550255", "0.5352717", "0.53495896", "0.53481144", "0.53481144", "0.53481144", "0.53481144", "0.5344393", "0.5342601", "0.5328043", "0.53279966", "0.5327699", "0.532641", "0.53228164", "0.53228164", "0.53228164", "0.5319312", "0.5319205", "0.53175884", "0.531021", "0.5305645", "0.5303637", "0.5302814" ]
0.0
-1
offset we'll pick in ambiguous cases (e.g. there are two 3 AMs b/c Fallback DST)
function fixOffset(localTS, o, tz) { // Our UTC time is just a guess because our offset is just a guess var utcGuess = localTS - o * 60 * 1000; // Test whether the zone matches the offset for this ts var o2 = tz.offset(utcGuess); // If so, offset didn't change and we're done if (o === o2) { return [utcGuess, o]; } // If not, change the ts by the difference in the offset utcGuess -= (o2 - o) * 60 * 1000; // If that gives us the local time we want, we're done var o3 = tz.offset(utcGuess); if (o2 === o3) { return [utcGuess, o2]; } // If it's different, we're in a hole time. The offset has changed, but the we don't adjust the time return [localTS - Math.min(o2, o3) * 60 * 1000, Math.max(o2, o3)]; } // convert an epoch timestamp into a calendar object with the given offset
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "offset() {\n if (this.overlap) return this.dot ? 8 : 12;\n return this.dot ? 2 : 4;\n }", "function checkOffset(offset){\n if(offset && offset >= 0){\n return offset;\n }\n else{\n return 0;\n }\n }", "function getOffset(diff){\n\n\t\t\tvar offset = 0;\n\t\t\tvar offset_min;\n\t\t\tvar offset_max;\n\n\t\t\tif(diff === 'easy'){\n\t\t\t\toffset_min = 0; ///only possible to get the 100 most popular songs\n\t\t\t\toffset_max = 170;\n\t\t\t}\n\t\t\telse if(diff === 'medium'){\n\t\t\t\toffset_min = 2000;\n\t\t\t\toffset_max = 5000;\n\t\t\t}\n\t\t\telse{\n\t\t\t\toffset_min = 8000;\n\t\t\t\toffset_max = 12000;\n\t\t\t}\n\n\t\t\t\n\t\t\toffset = randomNumberBetween(offset_min, offset_max);\n\t\t\treturn String(offset);\n\t\t}", "calculateOffset(offset) {\n\n // Note: vec3 has the same alignment as vec4\n let alignment = this.byteSize <= 8 ? this.byteSize : 16;\n\n // arrays have vec4 alignments\n if (this.count)\n alignment = 16;\n\n // align the start offset\n offset = math.roundUp(offset, alignment);\n this.offset = offset / 4;\n }", "function getOffset() {\n\t\t\tif (!vm.current) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\t//console.log(vm.getRank(vm.current));\n\t\t\treturn (vm.getRank(vm.current) - 2) * 17;\n\t\t}", "function getOffset(offset) {\n\t\t\t// Add all insertions before this location together to calculate\n\t\t\t// the current offset\n\t\t\tfor (var i = 0, l = insertions.length; i < l; i++) {\n\t\t\t\tvar insertion = insertions[i];\n\t\t\t\tif (insertion[0] >= offset)\n\t\t\t\t\tbreak;\n\t\t\t\toffset += insertion[1];\n\t\t\t}\n\t\t\treturn offset;\n\t\t}", "function snapOffset(offset) {\n var value = offset + 1;\n\n return value - (value % maxScreenX);\n}", "function offset (info) {\r\n\treturn info.offset;\r\n}", "function point_offset(i) {\n return 4*i;\n }", "function getOffset(dataView, offset, offSize) {\r\n\t let v = 0;\r\n\t for (let i = 0; i < offSize; i += 1) {\r\n\t v <<= 8;\r\n\t v += dataView.getUint8(offset + i);\r\n\t }\r\n\r\n\t return v;\r\n\t}", "offset(that) {\n return [that.x.subtract(this.x), that.y.subtract(this.y)];\n }", "function randomOffset() {\n return ( Math.random() - 0.5 ) * 2 * 1e-6;\n }", "function adaptOffset(type, offset) {\n var defaultOffset;\n switch (type) {\n case 'inner':\n defaultOffset = '-30%';\n if (isString$2(offset) && offset.endsWith('%')) {\n return parseFloat(offset) * 0.01 > 0 ? defaultOffset : offset;\n }\n return offset < 0 ? offset : defaultOffset;\n case 'outer':\n defaultOffset = 12;\n if (isString$2(offset) && offset.endsWith('%')) {\n return parseFloat(offset) * 0.01 < 0 ? defaultOffset : offset;\n }\n return offset > 0 ? offset : defaultOffset;\n default:\n return offset;\n }\n}", "_faceOffset4(face)\n {\n switch(face) {\n case 1:\n return {dy: 0, dx: 8};\n case 2:\n return {dy: 4, dx: 0};\n case 3:\n return {dy: 4, dx: 4};\n case 4:\n return {dy: 4, dx: 8};\n case 5:\n return {dy: 8, dx: 8};\n case 6:\n return {dy: 8, dx: 12};\n }\n return undefined;\n }", "function randomOffset() {\n\t\t\treturn ( Math.random() - 0.5 ) * 2 * 1e-6;\n\t\t}", "function adaptOffset(type, offset) {\n var defaultOffset;\n\n switch (type) {\n case 'inner':\n defaultOffset = '-30%';\n\n if (util_1.isString(offset) && offset.endsWith('%')) {\n return parseFloat(offset) * 0.01 > 0 ? defaultOffset : offset;\n }\n\n return offset < 0 ? offset : defaultOffset;\n\n case 'outer':\n defaultOffset = 12;\n\n if (util_1.isString(offset) && offset.endsWith('%')) {\n return parseFloat(offset) * 0.01 < 0 ? defaultOffset : offset;\n }\n\n return offset > 0 ? offset : defaultOffset;\n\n default:\n return offset;\n }\n}", "function randomOffset() {\r\n\r\n\t\treturn ( Math.random() - 0.5 ) * 2 * 1e-6;\r\n\r\n\t}", "function fixOffset(localTS, o, tz) {\n // Our UTC time is just a guess because our offset is just a guess\n var utcGuess = localTS - o * 60 * 1000; // Test whether the zone matches the offset for this ts\n\n var o2 = tz.offset(utcGuess); // If so, offset didn't change and we're done\n\n if (o === o2) {\n return [utcGuess, o];\n } // If not, change the ts by the difference in the offset\n\n\n utcGuess -= (o2 - o) * 60 * 1000; // If that gives us the local time we want, we're done\n\n var o3 = tz.offset(utcGuess);\n\n if (o2 === o3) {\n return [utcGuess, o2];\n } // If it's different, we're in a hole time. The offset has changed, but the we don't adjust the time\n\n\n return [localTS - Math.min(o2, o3) * 60 * 1000, Math.max(o2, o3)];\n } // convert an epoch timestamp into a calendar object with the given offset", "function getOffset(dataView, offset, offSize) {\n var v = 0;\n for (var i = 0; i < offSize; i += 1) {\n v <<= 8;\n v += dataView.getUint8(offset + i);\n }\n\n return v;\n }", "offset (prm) {\n try {\n\t return this.confmng('offset', prm);\n\t} catch (e) {\n console.error(e.stack);\n throw e;\n }\n }", "function adaptOffset(type, offset) {\n var defaultOffset;\n\n switch (type) {\n case 'inner':\n defaultOffset = '-30%';\n\n if ((0, _util.isString)(offset) && offset.endsWith('%')) {\n return parseFloat(offset) * 0.01 > 0 ? defaultOffset : offset;\n }\n\n return offset < 0 ? offset : defaultOffset;\n\n case 'outer':\n defaultOffset = 12;\n\n if ((0, _util.isString)(offset) && offset.endsWith('%')) {\n return parseFloat(offset) * 0.01 < 0 ? defaultOffset : offset;\n }\n\n return offset > 0 ? offset : defaultOffset;\n\n default:\n return offset;\n }\n}", "function fixOffset(localTS, o, tz) {\n // Our UTC time is just a guess because our offset is just a guess\n let utcGuess = localTS - o * 60 * 1000; // Test whether the zone matches the offset for this ts\n\n const o2 = tz.offset(utcGuess); // If so, offset didn't change and we're done\n\n if (o === o2) {\n return [utcGuess, o];\n } // If not, change the ts by the difference in the offset\n\n\n utcGuess -= (o2 - o) * 60 * 1000; // If that gives us the local time we want, we're done\n\n const o3 = tz.offset(utcGuess);\n\n if (o2 === o3) {\n return [utcGuess, o2];\n } // If it's different, we're in a hole time. The offset has changed, but the we don't adjust the time\n\n\n return [localTS - Math.min(o2, o3) * 60 * 1000, Math.max(o2, o3)];\n} // convert an epoch timestamp into a calendar object with the given offset", "function fixOffset(localTS, o, tz) {\n // Our UTC time is just a guess because our offset is just a guess\n let utcGuess = localTS - o * 60 * 1000; // Test whether the zone matches the offset for this ts\n\n const o2 = tz.offset(utcGuess); // If so, offset didn't change and we're done\n\n if (o === o2) {\n return [utcGuess, o];\n } // If not, change the ts by the difference in the offset\n\n\n utcGuess -= (o2 - o) * 60 * 1000; // If that gives us the local time we want, we're done\n\n const o3 = tz.offset(utcGuess);\n\n if (o2 === o3) {\n return [utcGuess, o2];\n } // If it's different, we're in a hole time. The offset has changed, but the we don't adjust the time\n\n\n return [localTS - Math.min(o2, o3) * 60 * 1000, Math.max(o2, o3)];\n} // convert an epoch timestamp into a calendar object with the given offset", "static applyOffset(src, target, selector) {\n const rv = JSON.parse(JSON.stringify(selector));\n rv.staff += target.staff - src.staff;\n rv.measure += target.measure - src.measure;\n rv.voice += target.voice - src.voice;\n rv.note += target.staff - src.staff;\n return rv;\n }", "getOffset(b) {\nreturn this.offsetVector[b];\n}", "function getDifferenceFromInitialOffset(state) {\n var clientOffset = state.clientOffset, initialClientOffset = state.initialClientOffset;\n if (!clientOffset || !initialClientOffset) {\n return null;\n }\n return subtract(clientOffset, initialClientOffset);\n}", "function getDifferenceFromInitialOffset(state) {\n var clientOffset = state.clientOffset, initialClientOffset = state.initialClientOffset;\n if (!clientOffset || !initialClientOffset) {\n return null;\n }\n return subtract(clientOffset, initialClientOffset);\n}", "function getSetOffset(input,keepLocalTime){var offset=this._offset||0,localAdjust;if(!this.isValid()){return input!=null?this:NaN;}if(input!=null){if(typeof input==='string'){input=offsetFromString(matchShortOffset,input);}else if(Math.abs(input)<16){input=input*60;}if(!this._isUTC&&keepLocalTime){localAdjust=getDateOffset(this);}this._offset=input;this._isUTC=true;if(localAdjust!=null){this.add(localAdjust,'m');}if(offset!==input){if(!keepLocalTime||this._changeInProgress){add_subtract__addSubtract(this,create__createDuration(input-offset,'m'),1,false);}else if(!this._changeInProgress){this._changeInProgress=true;utils_hooks__hooks.updateOffset(this,true);this._changeInProgress=null;}}return this;}else{return this._isUTC?offset:getDateOffset(this);}}", "function getSetOffset(input,keepLocalTime){var offset=this._offset||0,localAdjust;if(!this.isValid()){return input!=null?this:NaN;}if(input!=null){if(typeof input==='string'){input=offsetFromString(matchShortOffset,input);}else if(Math.abs(input)<16){input=input*60;}if(!this._isUTC&&keepLocalTime){localAdjust=getDateOffset(this);}this._offset=input;this._isUTC=true;if(localAdjust!=null){this.add(localAdjust,'m');}if(offset!==input){if(!keepLocalTime||this._changeInProgress){add_subtract__addSubtract(this,create__createDuration(input-offset,'m'),1,false);}else if(!this._changeInProgress){this._changeInProgress=true;utils_hooks__hooks.updateOffset(this,true);this._changeInProgress=null;}}return this;}else{return this._isUTC?offset:getDateOffset(this);}}", "function get_offset(coord, freq, percent, offset) {\n if (coord < 0)\n return ((-coord / freq) % 1 < percent) ? offset : 0;\n return ((coord / freq) % 1 < percent) ? 0 : offset;\n}", "prepareOffsetQuery(offset) {\n if (Number.isInteger(offset)) {\n return offset;\n }\n return 0;\n }", "function findNextM(arr, offset){\n\n if(offset === false) return false\n\n for(var i = offset, len = arr.length;i < len;++i){\n\n if(arr[i][0] == 'M') return i\n\n }\n\n return false\n }", "function getOffset(dataView, offset, offSize) {\n let v = 0;\n for (let i = 0; i < offSize; i += 1) {\n v <<= 8;\n v += dataView.getUint8(offset + i);\n }\n\n return v;\n}", "function getOffset(date, tzid) {\n if (tzid == null) {\n return null;\n\t}\n\n var exptz = tzs.waitFetch(tzid, date.substring(0, 4));\n var offset = null;\n\n if ((exptz == null) || (exptz.status != tzs.okStatus)) {\n\t return null;\n }\n\n var obs = exptz.findObservance(date);\n \n if (obs == null) {\n return null;\n\t}\n\n return obs.to / 60;\n}", "function getSetOffset(input,keepLocalTime,keepMinutes){var offset=this._offset || 0,localAdjust;if(!this.isValid()){return input != null?this:NaN;}if(input != null){if(typeof input === 'string'){input = offsetFromString(matchShortOffset,input);if(input === null){return this;}}else if(Math.abs(input) < 16 && !keepMinutes){input = input * 60;}if(!this._isUTC && keepLocalTime){localAdjust = getDateOffset(this);}this._offset = input;this._isUTC = true;if(localAdjust != null){this.add(localAdjust,'m');}if(offset !== input){if(!keepLocalTime || this._changeInProgress){addSubtract(this,createDuration(input - offset,'m'),1,false);}else if(!this._changeInProgress){this._changeInProgress = true;hooks.updateOffset(this,true);this._changeInProgress = null;}}return this;}else {return this._isUTC?offset:getDateOffset(this);}}", "function C9(a) {\na = - a.getTimezoneOffset();\nreturn null !== a ? a : 0\n}", "function getLeapMonthOffset(a11, timeZone) {\n let k, last, arc, i;\n k = parseInt(((a11 - 2415021.076998695) / 29.530588853 + 0.5));\n last = 0;\n i = 1; // We start with the month following lunar month 11\n arc = getSunLongitude(getNewMoonDay(k + i, timeZone), timeZone);\n do {\n last = arc;\n i++;\n arc = getSunLongitude(getNewMoonDay(k + i, timeZone), timeZone);\n } while (arc != last && i < 14);\n return i - 1;\n}", "function fixOffset(localTS, o, tz) {\n // Our UTC time is just a guess because our offset is just a guess\n let utcGuess = localTS - o * 60 * 1000;\n\n // Test whether the zone matches the offset for this ts\n const o2 = tz.offset(utcGuess);\n\n // If so, offset didn't change and we're done\n if (o === o2) {\n return [utcGuess, o];\n }\n\n // If not, change the ts by the difference in the offset\n utcGuess -= (o2 - o) * 60 * 1000;\n\n // If that gives us the local time we want, we're done\n const o3 = tz.offset(utcGuess);\n if (o2 === o3) {\n return [utcGuess, o2];\n }\n\n // If it's different, we're in a hole time. The offset has changed, but the we don't adjust the time\n return [localTS - Math.min(o2, o3) * 60 * 1000, Math.max(o2, o3)];\n}", "function findNextM(arr, offset){\n\n if(offset === false) return false\n\n for(var i = offset, len = arr.length;i < len;++i){\n\n if(arr[i][0] == 'M') return i\n\n }\n\n return false\n}", "function noteBeatOffset(e) {\n var p = e.pitch,\n f = (p - 5) % 12, // semitones relative to F\n g = Math.floor(f / 3), // group of 3 semitones, F-G (0), G#-A# (1), etc\n s = g % 2; // odd groups are syncopated\n return s;\n}", "function getSetOffset(input,keepLocalTime,keepMinutes){var offset=this._offset||0,localAdjust;if(!this.isValid()){return input!=null?this:NaN;}if(input!=null){if(typeof input==='string'){input=offsetFromString(matchShortOffset,input);if(input===null){return this;}}else if(Math.abs(input)<16&&!keepMinutes){input=input*60;}if(!this._isUTC&&keepLocalTime){localAdjust=getDateOffset(this);}this._offset=input;this._isUTC=true;if(localAdjust!=null){this.add(localAdjust,'m');}if(offset!==input){if(!keepLocalTime||this._changeInProgress){addSubtract(this,createDuration(input-offset,'m'),1,false);}else if(!this._changeInProgress){this._changeInProgress=true;hooks.updateOffset(this,true);this._changeInProgress=null;}}return this;}else{return this._isUTC?offset:getDateOffset(this);}}", "function getSetOffset(input,keepLocalTime,keepMinutes){var offset=this._offset||0,localAdjust;if(!this.isValid()){return input!=null?this:NaN;}if(input!=null){if(typeof input==='string'){input=offsetFromString(matchShortOffset,input);if(input===null){return this;}}else if(Math.abs(input)<16&&!keepMinutes){input=input*60;}if(!this._isUTC&&keepLocalTime){localAdjust=getDateOffset(this);}this._offset=input;this._isUTC=true;if(localAdjust!=null){this.add(localAdjust,'m');}if(offset!==input){if(!keepLocalTime||this._changeInProgress){addSubtract(this,createDuration(input-offset,'m'),1,false);}else if(!this._changeInProgress){this._changeInProgress=true;hooks.updateOffset(this,true);this._changeInProgress=null;}}return this;}else{return this._isUTC?offset:getDateOffset(this);}}", "getOffset() {\nreturn this.offset;\n}", "set Offset(value) {\n this._offset = value;\n }", "offset() {\n return this.bb.readInt64(this.bb_pos);\n }", "getAntimeridianAdjustment() {\n const localHoursOffset = this.getLocalMeanTimeOffset() / GeoLocation.HOUR_MILLIS;\n // if the offset is 20 hours or more in the future (never expected anywhere other\n // than a location using a timezone across the anti meridian to the east such as Samoa)\n if (localHoursOffset >= 20) {\n // roll the date forward a day\n return 1;\n }\n else if (localHoursOffset <= -20) {\n // if the offset is 20 hours or more in the past (no current location is known\n // that crosses the antimeridian to the west, but better safe than sorry)\n // roll the date back a day\n return -1;\n }\n // 99.999% of the world will have no adjustment\n return 0;\n }", "function adjustOffset(offset, type, lastType) {\n const same = lastType === type\n\n let adjustment\n switch (type) {\n case Segment.o:\n adjustment = same ? 12 : 0\n break\n case Segment.re:\n adjustment = same ? 5.5 : 18\n break\n }\n\n return offset + adjustment\n}", "function offsetToPoint(offset) {\n var index = -1\n\n if (offset > -1 && offset < indices[indices.length - 1]) {\n while (++index < indices.length) {\n if (indices[index] > offset) {\n return {\n line: index + 1,\n column: offset - (indices[index - 1] || 0) + 1,\n offset: offset\n }\n }\n }\n }\n\n return {}\n }", "function offsetToPoint(offset) {\n var index = -1\n\n if (offset > -1 && offset < indices[indices.length - 1]) {\n while (++index < indices.length) {\n if (indices[index] > offset) {\n return {\n line: index + 1,\n column: offset - (indices[index - 1] || 0) + 1,\n offset: offset\n }\n }\n }\n }\n\n return {}\n }", "function offsetToPoint(offset) {\n var index = -1;\n\n if (offset > -1 && offset < indices[indices.length - 1]) {\n while (++index < indices.length) {\n if (indices[index] > offset) {\n return {\n line: index + 1,\n column: offset - (indices[index - 1] || 0) + 1,\n offset: offset\n }\n }\n }\n }\n\n return {}\n }", "getOffset() {\r\n return this.builder.offset;\r\n }", "static searchForPatchLocations(offset) {\n if (!offset) throw \"Please pass a ROM offset the game tries to read at runtime\";\n\n let upper = (offset & 0xFFFF0000) >>> 16;\n let lower = offset & 0x0000FFFF;\n\n let found = 0;\n\n let romView = PP64.romhandler.getDataView();\n let upperLimit = romView.byteLength - 10; // Since we read ahead for every i, just stop early.\n for (let i = 2; i < upperLimit; i += 2) {\n let val = romView.getUint16(i);\n if (val !== upper && (val + 1) !== upper && (val - 1) !== upper) // Desperate times call for desperate measures (and I forget which way to +-1)\n continue;\n\n let last = 0;\n if ( (i > 8 && romView.getUint16((last = i - 8)) === lower)\n || (i > 4 && romView.getUint16((last = i - 4)) === lower)\n || romView.getUint16((last = i + 2)) === lower // === offset basically\n || romView.getUint16((last = i + 3)) === lower // Odd are unlikely unless compressed\n || romView.getUint16((last = i + 4)) === lower\n || romView.getUint16((last = i + 5)) === lower\n || romView.getUint16((last = i + 6)) === lower\n || romView.getUint16((last = i + 7)) === lower\n || romView.getUint16((last = i + 8)) === lower\n || romView.getUint16((last = i + 9)) === lower\n || romView.getUint16((last = i + 10)) === lower\n || romView.getUint16((last = i + 12)) === lower\n || romView.getUint16((last = i + 16)) === lower\n || romView.getUint16((last = i + 20)) === lower)\n {\n console.log(`Found ${$$hex(i)}, ${$$hex(last)} (${last - i}) Lower inst: ${$$hex(romView.getUint16(last - 2))}`);\n found++;\n }\n }\n\n console.log(`Found ${found} possible locations`);\n }", "static offset(n) {\n return n == 0 ? StepMap.empty : new StepMap(n < 0 ? [0, -n, 0] : [0, 0, n]);\n }", "_faceOffset50(face)\n {\n switch(face) {\n case 1:\n return {dy: 0, dx: 50};\n case 2:\n return {dy: 0, dx: 100};\n case 3:\n return {dy: 50, dx: 50};\n case 4:\n return {dy: 100, dx: 0};\n case 5:\n return {dy: 100, dx: 50};\n case 6:\n return {dy: 150, dx: 0};\n }\n return undefined;\n }", "function normalizeOffset(textNode, offset) {\n if (textNode.nodeType !== 3) {\n return -1;\n }\n // Find entry in textmap array (using binary search)\n var textmap = textMap,\n iEntry = textmap.length,\n entry;\n while (iEntry-- > 0) {\n entry = textmap[iEntry];\n if (textNode === entry.n) {\n //alert(entry.i+offset);\n return entry.i + offset;\n }\n }\n return -1;\n}", "function offsetArrayElements2(array, offset) {\r\n let offsetArray1 = [];\r\n let offsetArray1Index = 0;\r\n\r\n let offsetArray2 = [];\r\n let offsetArray2Index = 0;\r\n\r\n for (let i = 0; i < array.length; i++) {\r\n if (i + offset >= array.length) {\r\n offsetArray2[offsetArray2Index] = array[i];\r\n offsetArray2Index++;\r\n } else {\r\n offsetArray1[offsetArray1Index] = array[i];\r\n offsetArray1Index++;\r\n }\r\n }\r\n\r\n return combineArrays(offsetArray2, offsetArray1);\r\n}", "function getOffset(el) {\n const rect = el.getBoundingClientRect();\n return {\n //the 3 is the border\n left: rect.left + 3,\n top: rect.top + 3\n }\n}", "function offset(elem) {\n var rect = elem.getBoundingClientRect(),\n doc = elem.ownerDocument,\n docElem = doc.documentElement,\n pageOffset = getPageOffset();\n // getBoundingClientRect contains left scroll in Chrome on Android.\n // I haven't found a feature detection that proves this. Worst case\n // scenario on mis-match: the 'tap' feature on horizontal sliders breaks.\n if (/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)) {\n pageOffset.x = 0;\n }\n return {\n top: rect.top + pageOffset.y - docElem.clientTop,\n left: rect.left + pageOffset.x - docElem.clientLeft\n };\n }", "getOffset(player) {\n\n return (function(viewport, player, map) {\n\n const basePlayerOffsetY = player.baseOffsetY;\n\n const playerOffcenterLeft = Math.min(0, player.x - viewport.width/2),\n playerOffcenterRight = Math.max( 0, (player.x + viewport.width/2) - map.width),\n playerOffcenterX = playerOffcenterLeft + playerOffcenterRight;\n\n const playerOffcenterTop = Math.min(0 + basePlayerOffsetY, player.y - viewport.height/2 + basePlayerOffsetY),\n playerOffcenterBottom = Math.max(0, (player.y + viewport.height/2 - basePlayerOffsetY) - map.height),\n playerOffcenterY = playerOffcenterTop + playerOffcenterBottom //+ basePlayerOffsetY;\n\n // console.log(\n // playerOffcenterY / 70\n // );\n // //console.log(((player.y - viewport.height/2) - playerOffcenterY) / 70)\n // throw new Error();\n\n return {\n map: {\n x: (player.x - viewport.width/2) - playerOffcenterX,\n y: (player.y - viewport.height/2) - playerOffcenterY\n },\n player: {\n x: viewport.width/2 + playerOffcenterX,\n y: viewport.height/2 + playerOffcenterY\n }\n };\n\n })(\n {width: this.viewport.width.px, height: this.viewport.height.px},\n {x: player.position.x, y: player.position.y, baseOffsetY: this.basePlayerOffsetY},\n {width: this.width.px, height: this.height.px}\n );\n\n }", "function offsetArrayElements1(array, offset) {\r\n let offsetArray = [];\r\n let offsetArrayIndex = offset;\r\n for (let i = 0; i < array.length; i++) {\r\n if (offsetArrayIndex >= array.length) {\r\n offsetArray[offsetArrayIndex - array.length] = array[i];\r\n } else {\r\n offsetArray[offsetArrayIndex] = array[i];\r\n }\r\n offsetArrayIndex++;\r\n }\r\n return offsetArray;\r\n}", "function getOffset() {\n if (innerHeight < 600 || innerWidth < 1000) {\n return 105;\n }\n else {\n return 55;\n }\n}", "function getOffset(cursor, defaultOffset) {\n if (typeof cursor === 'undefined' || cursor === null) {\n return defaultOffset;\n }\n\n let offset = cursorToOffset(cursor);\n if (isNaN(offset)) {\n return defaultOffset;\n }\n\n return offset;\n}", "function zOffset (match, numberPart) {\n\t//console.log(match);\n\t//console.log('Number part is: ' + numberPart);\n\tif (typeof numberPart == 'undefined'){\n\t\treturn match;\n\t} else {\n\t\tlet zValue = Number(numberPart);\n\t\t//console.log(zValue);\n\n\t\tif (zValue === 20 || zValue === 30) {\n\t\t\treturn match;\n\t\t}\n\t\t//Add zValue Offset - use math.format to eliminate floating point errors, then convert back to number\n\t\tzValue = zValue - partLength;\n\t\tzValue = Number(math.format(zValue, {precision: 8}));\n\t\t\n\t\t//Check for long decimal floating point errors\n\t\tif (countDecimals(zValue) > 4) {\n\t\t\terrorCount += 1;\n\t\t\tfloatErrors.push((i+1));\n\t\t}\n\n\t\t//If the number is an integer, ensure a decimal is included in the string conversion\n\t\tif (Number.isInteger(zValue)) {\n\t\t\tvar newString = 'Z' + zValue.toFixed(1); //Preceding space is added back into the string\n\t\t} else {\n\t\t\tvar newString = 'Z' + zValue.toString();\n\t\t}\n\t\t\n\t\treturn newString;\n\t}\n\t\n}", "setOffset(offset) {\n if (Array.isArray(offset)) {\n this.offset = () => offset;\n }\n else {\n this.offset = offset;\n }\n }", "setOffset(offset) {\n if (Array.isArray(offset)) {\n this.offset = () => offset;\n }\n else {\n this.offset = offset;\n }\n }", "setOffset(offset) {\n if (Array.isArray(offset)) {\n this.offset = () => offset;\n }\n else {\n this.offset = offset;\n }\n }", "setOffset(offset) {\n if (Array.isArray(offset)) {\n this.offset = () => offset;\n }\n else {\n this.offset = offset;\n }\n }", "setOffset(offset) {\n if (Array.isArray(offset)) {\n this.offset = () => offset;\n }\n else {\n this.offset = offset;\n }\n }", "function parseTimezoneOffset(offset) {\n let [, sign, hours, minutes] = offset.match(/(\\+|-)(\\d\\d)(\\d\\d)/);\n minutes = (sign === '+' ? 1 : -1) * (Number(hours) * 60 + Number(minutes));\n return negateExceptForZero$1(minutes)\n}", "getOffsetIndex() {\n return this.players.findIndex(user => user === this.currentUser.uid);\n }", "function getZ(offset) {\n return getNextZ()+offset;\n}", "function offsetNum() {\n return Math.floor(Math.random()*80);\n }", "function getSetOffset (input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (!this.isValid()) {\n\t return input != null ? this : NaN;\n\t }\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(matchShortOffset, input);\n\t if (input === null) {\n\t return this;\n\t }\n\t } else if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t}", "function getSetOffset (input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (!this.isValid()) {\n\t return input != null ? this : NaN;\n\t }\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(matchShortOffset, input);\n\t if (input === null) {\n\t return this;\n\t }\n\t } else if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t}", "function getSetOffset (input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (!this.isValid()) {\n\t return input != null ? this : NaN;\n\t }\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(matchShortOffset, input);\n\t if (input === null) {\n\t return this;\n\t }\n\t } else if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t}", "function getSetOffset (input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (!this.isValid()) {\n\t return input != null ? this : NaN;\n\t }\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(matchShortOffset, input);\n\t if (input === null) {\n\t return this;\n\t }\n\t } else if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t}", "function getSetOffset (input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (!this.isValid()) {\n\t return input != null ? this : NaN;\n\t }\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(matchShortOffset, input);\n\t if (input === null) {\n\t return this;\n\t }\n\t } else if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t}", "function getSetOffset (input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (!this.isValid()) {\n\t return input != null ? this : NaN;\n\t }\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(matchShortOffset, input);\n\t if (input === null) {\n\t return this;\n\t }\n\t } else if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t}", "function getSetOffset (input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (!this.isValid()) {\n\t return input != null ? this : NaN;\n\t }\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(matchShortOffset, input);\n\t if (input === null) {\n\t return this;\n\t }\n\t } else if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t}", "function getSetOffset (input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (!this.isValid()) {\n\t return input != null ? this : NaN;\n\t }\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(matchShortOffset, input);\n\t if (input === null) {\n\t return this;\n\t }\n\t } else if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t}", "function find_participant_offset(participant, interactionDisplayId, interactionType) {\n \n //if one of the parameters is null return 0\n if (!participant || !interactionDisplayId) { \n return 0;\n }\n\n DNAPartName = find_DNAPartName(interactionType, interactionDisplayId);\n //make sure participant is DNA part\n if (!participant.SO) {\n return;\n }\n //find the part in the sequence which has the role of the template, and set a flag \n for (var i in participant.segment.sequence) {\n if (participant.segment.sequence[i].name === DNAPartName) {\n return parseInt(i);\n \n }\n }\n //if we can't find the participant we return 0\n return 0;\n}", "function surface_offset(x, y)\n{\n\t//post('plinko offset', x, y, '\\n');\n\ts_offset = [x, y];\n}", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getLocalOffset(offset, direction){\n var y = offset['offset' + direction];\n var div;\n try {\n div = offset.offsetParent;\n } catch(ex) {\n // with dhtml actions that change DOM IE may throw unspecified error\n // when checking offsetParent property\n return y;\n }\n while (div && getCurrentStyle(div, 'position') == 'static'){\n y += div['offset' + direction];\n try {\n div = div.offsetParent;\n } catch(ex) {\n // with dhtml actions that change DOM IE may throw unspecified error\n // when checking offsetParent property\n return y;\n }\n }\n return y;\n }", "function getSetOffset (input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (!this.isValid()) {\n\t return input != null ? this : NaN;\n\t }\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(matchShortOffset, input);\n\t } else if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t utils_hooks__hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t }", "function getSetOffset (input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (!this.isValid()) {\n\t return input != null ? this : NaN;\n\t }\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(matchShortOffset, input);\n\t } else if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t utils_hooks__hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t }", "function getSetOffset (input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (!this.isValid()) {\n\t return input != null ? this : NaN;\n\t }\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(matchShortOffset, input);\n\t } else if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t utils_hooks__hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t }", "function getSetOffset (input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (!this.isValid()) {\n\t return input != null ? this : NaN;\n\t }\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(matchShortOffset, input);\n\t } else if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t utils_hooks__hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t }", "function getSetOffset (input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (!this.isValid()) {\n\t return input != null ? this : NaN;\n\t }\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(matchShortOffset, input);\n\t } else if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t utils_hooks__hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t }", "function getSetOffset (input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (!this.isValid()) {\n\t return input != null ? this : NaN;\n\t }\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(matchShortOffset, input);\n\t } else if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t utils_hooks__hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t }", "function getSetOffset (input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (!this.isValid()) {\n\t return input != null ? this : NaN;\n\t }\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(matchShortOffset, input);\n\t } else if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t utils_hooks__hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t }", "function getSetOffset (input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (!this.isValid()) {\n\t return input != null ? this : NaN;\n\t }\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(matchShortOffset, input);\n\t } else if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t utils_hooks__hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t }", "function getSetOffset (input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (!this.isValid()) {\n\t return input != null ? this : NaN;\n\t }\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(matchShortOffset, input);\n\t } else if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t utils_hooks__hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t }", "function getSetOffset (input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (!this.isValid()) {\n\t return input != null ? this : NaN;\n\t }\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(matchShortOffset, input);\n\t } else if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t utils_hooks__hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t }", "function helpGetOffset(obj, coord) {\n\tvar val = obj[\"offset\"+coord] ;\n\tif (coord == \"Top\") val += obj.offsetHeight;\n\twhile ((obj = obj.offsetParent )!=null) {\n\t\tval += obj[\"offset\"+coord]; \n\t\tif (obj.border && obj.border != 0) val++; \n\t}\n\treturn val;\n}", "get offsetZ() {}" ]
[ "0.64174575", "0.63720465", "0.62933534", "0.6174761", "0.6018188", "0.5834882", "0.5774075", "0.5758565", "0.5741714", "0.57082075", "0.5705983", "0.5676555", "0.5664049", "0.56598896", "0.56491846", "0.56379485", "0.5618729", "0.5610561", "0.55883324", "0.55858034", "0.55838394", "0.55602646", "0.55602646", "0.5559367", "0.5555483", "0.55248004", "0.55248004", "0.55046153", "0.55046153", "0.54873544", "0.547465", "0.5469232", "0.54568225", "0.54551107", "0.5447856", "0.5441764", "0.5441015", "0.54199094", "0.5412484", "0.54072857", "0.5399348", "0.5399348", "0.5381176", "0.5368383", "0.5359657", "0.53575605", "0.53507084", "0.53290164", "0.53290164", "0.53215694", "0.5319385", "0.53186965", "0.5317413", "0.5315934", "0.5307525", "0.5306953", "0.5301696", "0.5299291", "0.5299049", "0.52872384", "0.5286902", "0.52833563", "0.5281025", "0.5277272", "0.5277272", "0.5277272", "0.5277272", "0.5277272", "0.5260807", "0.52602774", "0.5253616", "0.52450156", "0.5242714", "0.5242714", "0.5242714", "0.5242714", "0.5242714", "0.5242714", "0.5242714", "0.5242714", "0.5235872", "0.5230709", "0.52227515", "0.52173877", "0.5210317", "0.5210317", "0.5210317", "0.5210317", "0.5210317", "0.5210317", "0.5210317", "0.5210317", "0.5210317", "0.5210317", "0.5209241", "0.5208096" ]
0.55477524
29
by handling the zone options
function parseDataToDateTime(parsed, parsedZone, opts, format, text) { var setZone = opts.setZone, zone = opts.zone; if (parsed && Object.keys(parsed).length !== 0) { var interpretationZone = parsedZone || zone, inst = DateTime.fromObject(Object.assign(parsed, opts, { zone: interpretationZone, // setZone is a valid option in the calling methods, but not in fromObject setZone: undefined })); return setZone ? inst : inst.setZone(zone); } else { return DateTime.invalid(new Invalid("unparsable", "the input \"" + text + "\" can't be parsed as " + format)); } } // if you want to output a technical format (e.g. RFC 2822), this helper
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadZoneDetails() {\n refreshZoneDetails()\n }", "getZone() {\n return this._zone;\n }", "function _zonePointSelectionChanged(ndx) \n{\n // 1) [Geozone.js] _zonePointSelectionChanged\n // 2) [jsmap.js] mapProviderParseZones\n // 3) [jsmap.js] jsmParseGeozones\n // 4) [provider.js] jsmap.JSDrawGeozone\n jsvZoneIndex = ndx;\n mapProviderParseZones(jsvZoneList);\n}", "getZone() {\n return this._zone;\n }", "getZone() {\n return this._zone;\n }", "getZone() {\n return this._zone;\n }", "getZone() {\n return this._zone;\n }", "getZone() {\n return this._zone;\n }", "function getOptionZone() {\n let optionHtml = '';\n let count1 = 0;\n\n for (let timeZone of timeZones) {\n count1 += 1;\n optionHtml = '<option value=\"';\n optionHtml += count1;\n optionHtml += '\">';\n optionHtml += timeZone;\n optionHtml += '</option>';\n\n $optionZone.append(optionHtml);\n }\n return;\n}", "_zoneSize() {\n return this.options.zoneSize * Math.pow(2, 10 - this._mapZoom());\n }", "function zoneMapSetIndex(ndx, parseZones)\n{\n if (ndx != jsvZoneIndex) {\n var radioObj = null;\n try {\n //radioObj = document.ZoneInfoEdit.getElementById(\"z_index\");\n radioObj = document.ZoneInfoEdit.z_index;\n } catch(e) {\n try {\n radioObj = document.CorridorInfoEdit.z_index;\n } catch (e) {\n radioObj = null;\n }\n }\n if (!radioObj) {\n // alert(\"Zone/Corridor lat/lon index not found\");\n } else\n if (setCheckedRadioValue(radioObj, ndx)) {\n jsvZoneIndex = ndx;\n if (parseZones) {\n mapProviderParseZones(jsvZoneList);\n }\n }\n }\n}", "static get service() {\n return 'zones';\n }", "getZones(next){\n request(this.zoneUrl(), (error, reponse, body) => {\n let res = this.handleResponse(JSON.parse(body))\n if(res.success){\n next(res) \n } \n })\n }", "function processZone(z) {\n\t if (!z[3]) { return; }\n\t var yea = parseInt(z[3], 10)\n\t\t, mon = 11\n\t\t, dat = 31;\n\t //If month is there\n\t if (z[4]) {\n\t\tmon = SHORT_MONTHS[z[4].substr(0, 3)];\n\t\tdat = parseInt(z[5], 10) || 1;\n\t }\n\t var t = z[6] ? parseTimeString(z[6]) : [0, 0, 0];\n\t return [yea, mon, dat, t[0], t[1], t[2]];\n\t }", "updateZonePCEs() {\r\n for (var zone = MIN_EFFECTIVE_ZONE; zone < NUM_ZONES; zone++) {\r\n for (var direction = 0; direction < 4; direction++) {\r\n var subjectZone = this.getZoneByIndex(zone);\r\n if (subjectZone.isEnabled())\r\n subjectZone.getZonePCEs().getDirectionByIndex(direction).setMovementArray([-1,-1,-1]);\r\n }\r\n }\r\n this.setZonePCEs();\r\n }", "function Zone(msg) {\r\n//check for standard case \"EMX\"\r\n\tlet zone = {\"user\":\"unset\", \"id\":\"\", \"section\":\"emx\", \"name\":\"\", \"first_name\":\"L'EMX de \", \"last_name\":\"unset\"}\r\n\tObject.entries(index[\"zone\"]).forEach( current => {\r\n\t\tcurrent[1][\"tags\"].forEach( tag => {\r\n\t\t\tif (msg.content.toLowerCase().includes(tag,1)){\r\n\t\t\t\tzone[\"last_name\"]= current[1][\"name\"]\r\n\t\t\t\tzone[\"user\"]= current[1][\"users\"][\"emx\"]\r\n\t\t\t\tzone[\"id\"]= current[1][\"id\"]\r\n\t\t\t\t//check for Sub Zones\r\n\t\t\t\tObject.entries(index[\"sub_zone\"]).forEach( sub => {\r\n\t\t\t\t\tsub[1][\"tags\"].forEach( tag => {\r\n\t\t\t\t\t\tif (msg.content.toLowerCase().includes(tag,1)){\r\n\t\t\t\t\t\t\tzone[\"first_name\"]= sub[1][\"name\"]\r\n\t\t\t\t\t\t\tif (current[1][\"users\"][sub[1][\"id\"]] === undefined){\r\n\t\t\t\t\t\t\t\tcurrent[1][\"users\"][sub[1][\"id\"]] = \"--\"\r\n\t\t\t\t\t\t\t\tzone[\"user\"]= current[1][\"users\"][sub[1][\"id\"]]\r\n\t\t\t\t\t\t\t\tzone[\"section\"]= sub[1][\"id\"]\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tzone[\"user\"]= current[1][\"users\"][sub[1][\"id\"]]\r\n\t\t\t\t\t\t\t\tzone[\"section\"]= sub[1][\"id\"]\r\n\t\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})\r\n\t\t\t}\r\n\t\t})\r\n\t})\r\n\t//check for associated_zones\r\n\r\n\tObject.entries(index[\"associated_zone\"]).forEach( associated => {\r\n\t\tassociated[1][\"tags\"].forEach( tag => {\r\n\t\t\tif (msg.content.toLowerCase().includes(tag,1)){\r\n\t\t\t\tObject.entries(associated[1][\"zones\"]).forEach( current => {\r\n\t\t\t\t\tcurrent[1][\"specific\"].forEach( specific => {\r\n\t\t\t\t\t\tif (msg.content.toLowerCase().includes(specific,1)){\r\n\t\t\t\t\t\t\tzone[\"first_name\"] = current[1][\"name\"]\r\n\t\t\t\t\t\t\tzone[\"last_name\"] = index[\"zone\"][current[1][\"zone_id\"]][\"name\"]\r\n\t\t\t\t\t\t\tzone[\"id\"] = current[1][\"zone_id\"]\r\n\t\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\t\tif (index[\"zone\"][current[1][\"zone_id\"]][\"users\"][current[0]] === undefined){\r\n\t\t\t\t\t\t\t\t\tindex[\"zone\"][current[1][\"zone_id\"]][\"users\"][current[0]] = \"--\"\r\n\t\t\t\t\t\t\t\t\tzone[\"user\"]= index[\"zone\"][current[1][\"zone_id\"]][\"users\"][current[0]]\r\n\t\t\t\t\t\t\t\t\tzone[\"section\"]= current[0]\r\n\t\t\t\t\t\t\t\t\tconsole.log(\"error\")\r\n\t\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t\tzone[\"user\"]= index[\"zone\"][current[1][\"zone_id\"]][\"users\"][current[0]]\r\n\t\t\t\t\t\t\t\t\tzone[\"section\"]= current[0]\r\n\t\t\t\t\t\t\t\t\tconsole.log(\"normal\")\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}catch{\r\n\t\t\t\t\t\t\t\tindex[\"zone\"][current[1][\"zone_id\"]][\"users\"][current[0]] = \"--\"\r\n\t\t\t\t\t\t\t\tzone[\"user\"]= index[\"zone\"][current[1][\"zone_id\"]][\"users\"][current[0]]\r\n\t\t\t\t\t\t\t\tzone[\"section\"]= current[0]\r\n\t\t\t\t\t\t\t\tconsole.log(\"error\")\r\n\t\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})\r\n\t\t\t}\r\n\t\t})\r\n\t})\r\n\r\n\tif (zone[\"last_name\"] === \"unset\"){\r\n\t\treturn 0;\r\n\t}\r\n\tzone[\"name\"] = zone[\"first_name\"]+zone[\"last_name\"]\r\n\treturn zone\r\n}", "setZonePCEs() {\r\n\t\t\t\r\n for (var record = 0; record < this._config_arr.length; record++) {\r\n var route = this._config_arr[record][0];\r\n if (this._config_arr[record][1] == 0) {\r\n var masterDirection = this._config_arr[record][2];\r\n var masterMovement = this._config_arr[record][3];\r\n var volume = PROJECT.getMasterPCETable().getDirectionByIndex(masterDirection).getMovementByIndex(masterMovement);\r\n }\r\n else if (this._config_arr[record][1] == -1) {\r\n 1 == 1;\r\n }\r\n else {\r\n var subjectZone = this._config_arr[record][1];\r\n var subjectDirection = this._config_arr[record][2];\r\n var subjectMovement = this._config_arr[record][3];\r\n this.getZoneByIndex(subjectZone - 1).addPCEtoZone(volume, subjectDirection, subjectMovement);\r\n //this.getZoneByIndex(subjectZone - 1).setEnabled(true);\r\n }\r\n }\r\n if (!this._constructing) {\r\n updateInfoSwitcherData();\r\n }\r\n }", "function _parseZoneOptions(options, callback) {\n if (callback === undefined && typeof options === 'function') {\n callback = options;\n options = undefined;\n }\n\n if (callback && typeof callback !== 'function') {\n throw new TypeError('callback is not a function');\n }\n\n if (!options) {\n options = {callback: callback};\n }\n\n return options;\n}", "handleSelectLocation(area) {\n const raw_location = area.name;\n let side, section, zone;\n\n if (raw_location.indexOf('PZ') !== -1) {\n zone = 'pz'\n } else if (raw_location.indexOf('TZ') !== -1) {\n zone = 'tz'\n } else if (raw_location.indexOf('CZ') !== -1) {\n zone = 'cz'\n } else if (raw_location.indexOf('AS') !== -1) {\n zone = 'as'\n }\n\n\n this.setState(prevState => ({\n editing: {\n ...prevState.editing,\n lesion: {\n ...prevState.editing.lesion,\n zone: zone,\n location: raw_location,\n }\n }\n }))\n }", "updateOutputZone() {\n this._editor.changeViewZones(changeAccessor => {\n changeAccessor.removeZone(this.data.outputZoneId);\n this.outputZoneCallback(changeAccessor);\n });\n }", "_getTimezone() {\n return this.get('timezone.selected.zoneId') || this.get('timezone.options').findBy('zoneId', config.timezoneDefault).zoneId;\n }", "function getPlace() { \n\tvar sel = document.getElementById(\"place\");\n\tvar city = sel.options[sel.selectedIndex].value;\n\tgetTimeZone(city); //main api oproepen\n}", "getZoneTCUs () {\r\n return this._zone_TCUs;\r\n }", "function resetTimeZone()\r\n{\r\n timeZoneSelector.selectedTimeZone = timeZoneSelector.currentTimeZone;\r\n $('#timeZoneName').html(supportedTimeZonesMap[timeZoneSelector.currentTimeZone]);\r\n}", "@wire(getRecord, {\n recordId: CURRENTUSERID,\n fields: [TIME_ZONE_KEY]\n }) wireuser({error,data}) {\n if(this.defaultTimeZone){\n if (error != undefined) {\n //this.error = error ; \n } else if (data != undefined && data.fields != undefined) {\n this.timeZoneKey = data.fields.TimeZoneSidKey.value;\n //defaut time zone cannot be deleted. hence passes last parameter as false\n this.loadArray(this.timeZoneKey,null,true);\n }\n }\n }", "function excahnge_zones(current){\n if(selected_zone)$(selected_zone).removeClass('active_zone');\n $(current).addClass('active_zone');\n selected_zone = current;\n }", "function timeZoneCheck() {\n var timeZoneLog = document.querySelector(\".timezone\");\n var timeZone = response.timezone;\n console.log(timeZone);\n\n timeZoneLog.innerHTML += timeZone;\n }", "getZoneObjectByIndex(index = 0) {\n return this.zones[index];\n }", "function selectTimeZone(timeZoneButton, timeZone)\r\n{\r\n timeZoneSelector.selectedTimeZone = timeZone;\r\n $('#timeZoneName').html(supportedTimeZonesMap[timeZone]);\r\n $('#tzarr').find('.ltz-itm-selector-check').css('visibility', 'hidden');\r\n $(timeZoneButton).find('.ltz-itm-selector-check').css('visibility', 'visible');\r\n $('#timeZones').hide();\r\n}", "function worldClock(zone, region){\r\nvar dst = 0\r\nvar time = new Date()\r\nvar gmtMS = time.getTime() + (time.getTimezoneOffset() * 60000)\r\nvar gmtTime = new Date(gmtMS)\r\n\r\nvar hr = gmtTime.getHours() + zone\r\nvar min = gmtTime.getMinutes()\r\n\r\nif (hr >= 24){\r\nhr = hr-24\r\nday -= -1\r\n}\r\nif (hr < 0){\r\nhr -= -24\r\nday -= 1\r\n}\r\nif (hr < 10){\r\nhr = \" \" + hr\r\n}\r\nif (min < 10){\r\nmin = \"0\" + min\r\n}\r\n\r\n\r\n//america\r\nif (region == \"NAmerica\"){\r\n\tvar startDST = new Date()\r\n\tvar endDST = new Date()\r\n\tstartDST.setHours(2)\r\n\tendDST.setHours(1)\r\n\tvar currentTime = new Date()\r\n\tcurrentTime.setHours(hr)\r\n\tif(currentTime >= startDST && currentTime < endDST){\r\n\t\tdst = 1\r\n\t\t}\r\n}\r\n\r\n//europe\r\nif (region == \"Europe\"){\r\n\tvar startDST = new Date()\r\n\tvar endDST = new Date()\r\n\tstartDST.setHours(1)\r\n\tendDST.setHours(0)\r\n\tvar currentTime = new Date()\r\n\tcurrentTime.setHours(hr)\r\n\tif(currentTime >= startDST && currentTime < endDST){\r\n\t\tdst = 1\r\n\t\t}\r\n}\r\n\r\nif (dst == 1){\r\n\thr -= -1\r\n\tif (hr >= 24){\r\n\thr = hr-24\r\n\tday -= -1\r\n\t}\r\n\tif (hr < 10){\r\n\thr = \" \" + hr\r\n\t}\r\nreturn hr + \":\" + min + \" DST\"\r\n}\r\nelse{\r\nreturn hr + \":\" + min\r\n}\r\n}", "function GetCountryCityZoneAddress(results) {\n var country = null;\n var CityNamesArr = [];\n var ZoneNamesArr = [];\n\n /*\n if (Intern_ModifyPhysicalAdd === undefined || Intern_ModifyPhysicalAdd === null)\n var Intern_ModifyPhysicalAdd = false; */\n if(Intern_ModifyPhysicalAdd)\n Intern_PhysicalAddElem.val(results[0].formatted_address);\n Intern_ModifyPhysicalAdd = false;\n\n if (Intern_ModifyCountryCityZone) {\n var tempZone;\n\n // This loop here is used for those cases when the google map result is not very clear.\n if (results[1] !== undefined && results[1] !== null) {\n for (var i = 0; i < results[1].address_components.length; i++) {\n for (var b = 0; b < results[1].address_components[i].types.length; b++) {\n // There are different types that might hold a city admin_area_lvl_1 usually does in come cases looking for sublocality type will be more appropriate\n if (results[1].address_components[i].types[b].indexOf(\"locality\") > -1 || results[1].address_components[i].types[b].indexOf(\"neighborhood\") > -1) {\n tempZone = results[1].address_components[i].long_name;\n ZoneNamesArr[ZoneNamesArr.length] = tempZone;\n break;\n }\n }\n if (ZoneNamesArr.length > 0) break;\n }\n }\n\n //debugger;\n\n for (var i = 0; i < results[0].address_components.length; i++) {\n for (var b = 0; b < results[0].address_components[i].types.length; b++) {\n // There are different types that might hold a city admin_area_lvl_1 usually does in come cases looking for sublocality type will be more appropriate\n if (results[0].address_components[i].types[b].indexOf(\"locality\") > -1 || results[0].address_components[i].types[b].indexOf(\"neighborhood\") > -1) {\n tempZone = results[0].address_components[i].long_name;\n if(tempZone !== ZoneNamesArr[ZoneNamesArr.length - 1])\n ZoneNamesArr[ZoneNamesArr.length] = tempZone;\n\n // In french speacking africa we need to eliminate the term \"Quartier\" from the neighborhood.\n //if (tempZone.substring(0, 9) === \"Quartier \") {\n // ZoneNamesArr[ZoneNamesArr.length] = tempZone.substring(9, tempZone.length);\n //}\n //else {\n // ZoneNamesArr[ZoneNamesArr.length] = tempZone;\n //}\n break;\n }\n else if (results[0].address_components[i].types[b].indexOf(\"administrative_area\") > -1) {\n CityNamesArr[CityNamesArr.length] = results[0].address_components[i].long_name;\n break;\n }\n else if (results[0].address_components[i].types[b] === \"country\") {\n //this is the object you are looking for\n country = results[0].address_components[i];\n break;\n }\n }\n if (country !== null) break;\n }\n\n debugger;\n\n delete CityDropDownDict[Const_NewCityId]; // This is necessary to remove the recently computer CityID\n if (Intern_CountryElem !== undefined && Intern_CountryElem !== null && Intern_CountryElem !== \"\") {\n country_ReDrawMap = false;\n\n Intern_CountryElem.val(Utilities_StringInArrayIndex(country.long_name, Intern_GoogleLocCountryNames));\n Intern_CountryElem.change();\n\n var cityId = null;\n var zoneIDUsed = ZoneNamesArr.length;\n $.each(CityDropDownDict, function (index, value) {\n /*\n if (cityId === null)\n for (var i = 1; i < ZoneNamesArr.length; i++)\n if (ZoneNamesArr[i].indexOf(value) > -1) {\n cityId = index;\n zoneIDUsed = i;\n return;\n } */\n\n if (cityId === null)\n if (ZoneNamesArr[ZoneNamesArr.length - 1].indexOf(value) > -1) {\n cityId = index;\n zoneIDUsed = ZoneNamesArr.length - 1;\n return;\n }\n if(cityId === null)\n for (var i = 0; i < CityNamesArr.length; i++)\n if (CityNamesArr[i].indexOf(value) > -1) {\n cityId = index;\n return;\n } \n });\n if (cityId !== null) {\n city_ReDrawMap = false;\n city = CityDropDownDict[cityId];\n Intern_CityElem.val(cityId);\n Intern_CityElem.change();\n\n var zoneId = null;\n $.each(ZoneDropDownDict, function (index, value) {\n if (zoneId === null)\n for (var i = 0; i < zoneIDUsed; i++)\n if (ZoneNamesArr[i].indexOf(value) > -1) {\n zoneId = index;\n break;\n }\n });\n if (zoneId !== null) {\n zone_ReDrawMap = false;\n zone = ZoneDropDownDict[zoneId];\n Intern_ZoneElem.val(zoneId);\n Intern_ZoneElem.change();\n }\n else {\n\n //debugger;\n\n ZoneDropDownDict[Const_NewZoneId] = ZoneNamesArr[0];\n Intern_ZoneElem.html(Utilities_DictionaryToSelectOpt(ZoneDropDownDict, \"00000000-0000-0000-0000-000000000000\", text_DDBox_ChooseZone));\n Intern_ZoneElem.val(Const_NewZoneId);\n Intern_LocationStore.SetDataToLocalStore(\"City_\" + Const_NewZoneId, ZoneDropDownDict);\n //Intern_ZoneElem.change();\n }\n }\n else {\n\n //debugger;\n\n var newCityName = ZoneNamesArr.length > 1 ? ZoneNamesArr[ZoneNamesArr.length - 1] : CityNamesArr[0];\n \n CityDropDownDict[Const_NewCityId] = newCityName; // CityNamesArr[0];\n Intern_CityElem.html(Utilities_DictionaryToSelectOpt(CityDropDownDict, \"00000000-0000-0000-0000-000000000000\", text_DDBox_ChooseCity));\n Intern_CityElem.val(Const_NewCityId);\n Intern_LocationStore.SetDataToLocalStore(\"Country_\" + Intern_CountryElem.val(), CityDropDownDict);\n Intern_GoogleRegionNameElem.val(CityNamesArr[CityNamesArr.length - 1]);\n //Intern_CityElem.change();\n \n ZoneDropDownDict = {};\n ZoneDropDownDict[Const_NewZoneId] = ZoneNamesArr[0];\n Intern_ZoneElem.html(Utilities_DictionaryToSelectOpt(ZoneDropDownDict, \"00000000-0000-0000-0000-000000000000\", text_DDBox_ChooseZone));\n Intern_ZoneElem.val(Const_NewZoneId);\n Intern_LocationStore.SetDataToLocalStore(\"City_\" + Const_NewZoneId, ZoneDropDownDict);\n //Intern_ZoneElem.change();\n }\n console.log(\"ZoneNamesArr : \" + JSON.stringify(ZoneNamesArr));\n console.log(\"CityNamesArr : \" + JSON.stringify(CityNamesArr));\n }\n }\n Intern_ModifyCountryCityZone = true;\n }", "function displayAlt() {\n \tvar altTime = new Date();\n \t// local time in milliseconds\n \tvar localTime = altTime.getTime();\n \t//Getting local UTC offset converted to milliseconds\n \tvar locUtcOffSet = altTime.getTimezoneOffset()*60000;\n \tvar uniTimeCode = localTime + locUtcOffSet;\n \tvar valu = document.getElementById(\"zone\");\n \t// Time zone selection\n \tvar offSet;\n \tswitch (Number(valu.options[valu.selectedIndex].value)) {\n \t\tcase 0:\n \t\t\t// New York City (Eastern US)\n \t\t\toffSet = -4;\n \t\t\tbreak;\n \t\tcase 1:\n \t\t\t// San Antonio (Central US)\n \t\t\toffSet = -5;\n \t\t\tbreak;\n \t\tcase 2: \t\n \t\t\t// Denver (Mountain US)\n \t\t\toffSet = -6;\n \t\t\tbreak;\n \t\tcase 3:\n \t\t\t// San Francisco (Pacific US)\n \t\t\toffSet = -7;\n \t\t\tbreak;\n \t\tcase 4:\n \t\t\t// UTC\n \t\t\toffSet = 0;\n \t\t\tbreak;\t\n \t}\n \t//Convert the offset hours into milliseconds and add to UTC to get desired Time Zone\n \tvar zone = uniTimeCode + (3600000*offSet);\n \tvar altZone = new Date(zone);\n \tvar zoneDiv = document.getElementById('zoneTime');\n \tzoneDiv.innerText = altZone.toLocaleString();\t\n }", "getZone(zoneIndex) {\n const { delta: { total, keeps } } = this;\n let index = parseInt(zoneIndex, 10);\n index = Math.max(0, index);\n const lastStart = total - keeps;\n const isLast = (index <= total && index >= lastStart) || (index > total);\n let start;\n if (isLast) {\n start = Math.max(0, lastStart);\n } else {\n start = index;\n }\n\n return {\n end: (start + keeps) - 1,\n start,\n isLast,\n };\n }", "function dst() {\n var dston;\n var dstoff;\n var currentDate = new Date();\n \n d = new Date(currentDate.getFullYear(), 3, 15); //2nd sunday in March\n dston = d - d.getDay();\n d = new Date(currentDate.getFullYear(), 11, 8); //1st Sunday in November\n dstoff = d - d.getDay();\n\n if (currentDate >= dston && currentDate < dstoff) {\n forecast.timeZoneList = {\n \"UTC\": [0, \"UTC: Coordinated Univeral Time\"],\n \"PDT\": [-7,\"PDT: Pacific Daylight Time\"],\n \"MDT\": [-6,\"MDT: Mountain Daylight Time\"],\n \"CDT\": [-5,\"CDT: Central Daylight Time\"],\n \"EDT\": [-4, \"EDT: Eastern Daylight Time\"],\n \"ADT\": [-3, \"ADT: Atlantic Daylight Time\"],\n \"NDT\": [-2.5, \"NDT: Newfoundland Daylight Time\"]\n }\n }\n else {\n forecast.timeZoneList = {\n \"UTC\": [0, \"UTC: Coordinated Univeral Time\"],\n \"PST\": [-8, \"PST: Pacific Standard Time\"],\n \"MST\": [-7, \"MST: Mountain Standard Time\"],\n \"CST\": [-6, \"CST: Central Standard Time\"],\n \"EST\": [-5, \"EST: Eastern Standard Time\"],\n \"AST\": [-4, \"AST: Atlantic Standard Time\"],\n \"NST\": [-3.5, \"NST: Newfoundland Standard Time\"]\n }\n }\n initializeDropDown();\n initializeTimeZone();\n chgImg(0);\n}", "decrementEffectiveZones() {\r\n this._effective_zones--;\r\n if(this._effective_zones == 0)\r\n this.setEnabled(false);\r\n }", "get supportsTimezone() { return false; }", "function setSupportedTimeZones(values)\r\n{\r\n if (values && values.length > 0)\r\n {\r\n // Add all time zones to our map and update choices in the header menu\r\n for (var timeZoneIndex = 0; timeZoneIndex < values.length; timeZoneIndex++)\r\n {\r\n supportedTimeZonesMap[values[timeZoneIndex][\"alias\"]] = values[timeZoneIndex][\"displayName\"];\r\n var timeZoneItem = '<div class=\"ltz-itm-container\"><button class=\"ltz-itm-selector\" onclick=\"selectTimeZone(this,\\''\r\n + values[timeZoneIndex][\"alias\"] + '\\')\"><span id=\"tzCheck' + values[timeZoneIndex][\"alias\"] + '\" class=\"ms-Icon ms-Icon--check ltz-itm-selector-check\"'\r\n + (values[timeZoneIndex][\"alias\"] === timeZoneSelector.currentTimeZone ? ' style=\"visibility: visible;\"' : 'style=\"visibility: hidden;\"') \r\n + '></span><div class=\"ltz-itm-content\"><div class=\"ltz-itm-wrapper\"><span>'\r\n + values[timeZoneIndex][\"displayName\"] + '&lrm;</span></div></div></button></div>';\r\n $('#tzarr').append(timeZoneItem);\r\n }\r\n \r\n timeZoneSelector.supportedTimeZonesSet = true;\r\n $('#timeZoneWrapper').show();\r\n \r\n // If user's time zone is already retrieved we need to update GUI now,\r\n // because we couldn't do that when we didn't have time zone choices\r\n if (timeZoneSelector.timeZoneInitialized)\r\n {\r\n $('#timeZoneName').html(supportedTimeZonesMap[timeZoneSelector.currentTimeZone]);\r\n $('#tzarr').find('.ltz-itm-selector-check').css('visibility', 'hidden');\r\n document.getElementById('tzCheck' + timeZoneSelector.currentTimeZone).style.visibility = \"visible\";\r\n }\r\n \r\n }\r\n}", "function timezn(tzURL) {\n $.ajax({\n url: tzURL,\n method: \"GET\",\n dataType: 'json',\n success : function (data) {\n var obj = data;\n var tz = obj.timeZoneId;\n document.getElementById('tz').innerHTML=tz;\n }\n })\n}", "function function_settimezone(fieldname){\n var timeZone = 'Europe/Amsterdam';\n result = timeZone;\n return result;\n}", "loadArray(timezoneVal,recordId,UnDeletable){\n if(this.timeZoneArray.indexOf(timezoneVal) == -1){\n //this.timeZoneArray.push(this.timeZoneKey);\n this.timeZoneArray = [...this.timeZoneArray, timezoneVal];\n let timeZoneFriendlyFormat = timezoneVal.substring(timezoneVal.indexOf('/')+1);\n //lwc bindings does not change when push is done. hence this temporary workaround\n this.timeZoneArrayObject =[...this.timeZoneArrayObject, {id:recordId,timeZoneKey:timezoneVal,cannotDelete:UnDeletable,timeZoneFriendlyFormat:timeZoneFriendlyFormat}];\n this.showData = true;\n } \n }", "parse(context, text, position) {\n for (const name of ['UTC', 'GMT']) {\n if (context.subSequenceEquals(text, position, name, 0, name.length)) {\n context.setParsedZone(ZoneId.of(name));\n return position + name.length;\n }\n }\n const { ids, sortedKeys } = this._resolveZoneIds(context.locale().localeString());\n for (const name of sortedKeys) {\n if (context.subSequenceEquals(text, position, name, 0, name.length)) {\n context.setParsedZone(ZoneId.of(ids[name]));\n return position + name.length;\n }\n }\n return ~position;\n }", "function changementZone(player, zone){\n if (player.y >= 1045 && player.x >= 180 && player.x <= 364){\n this.scene.start(\"Ville\");\n console.log(\"changement\");\n tutoVille = true;\n /*cursors.up.reset();\n cursors.down.reset();\n cursors.right.reset();\n cursors.left.reset();*/\n }\n }", "function Plugin( option ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tvar $this = $( this );\n\t\t\t\tvar data = $this.data( 'wf.timezone' );\n\n\t\t\t\tif ( !data && !option ) {\n\t\t\t\t\t$this.data( 'wf.timezone', ( data = new Timezone( this ) ) );\n\t\t\t\t} else if ( !data && Object.prototype.toString.call( option ) === '[object Array]' ) {\n\t\t\t\t\t$this.data( 'wf.timezone', ( data = new Timezone( this, option ) ) );\n\t\t\t\t}\n\t\t\t\tif ( typeof option === 'string' ) {\n\t\t\t\t\tdata[ option ].call( $this );\n\t\t\t\t}\n\t\t\t} );\n\t\t}", "function zoneMapGetIndex()\n{\n return jsvZoneIndex;\n}", "clearZone(zone) {\n return this.zone[zone].clearRecords()\n }", "function initLocalities() {\n\t\t\tcustApi.getCities(\"India\")\n\t\t\t.success(function(data, status, headers, config){\n\t\t\t\tcache.cityToIdMap = buildCitiesToIdMap(data.payload);\n\t\t\t\tvm.cityMap = cache.cityToIdMap;\n\t\t\t\tcache.cityIdToNameMap = buildCitiesIdToNameMap(data.payload);\n\t\t\t\tcache.cityIdToStateMap = buildCityIdToStateMap(data.payload);\n\t\t\t\tcustApi.getZones(cache.cityToIdMap[\"Pune\"])\n\t\t\t\t\t.success(function(data, status, headers, config){\n\t\t\t\t\t\t/*$scope.zonesList = buildZonesList(data.payload);\n\t\t\t\t\t\tcache.zoneIdToNameMap = buildZoneIdToNameMap(data.payload);*/\n\t\t\t\t\t\tvm.locationArr = [];\n\t\t\t\t\t\tvar dataArray = data.payload;\n\t\t\t\t\t\tfor(var i = 0 ; i < dataArray.length ; i++) { \n //change to show only zones which are not deleted \n if(!dataArray[i].hasOwnProperty(\"deleted\") || dataArray[i].deleted === false) {\n\t\t\t\t\t\t\tvar zoneid = dataArray[i].zoneid;\n\t\t\t\t\t\t\tvar zonename = dataArray[i].zonename;\n\t\t\t\t\t\t\tvar pincodeArray = dataArray[i].pincodes;\n\t\t\t\t\t\t\tfor(var j = 0 ; j < pincodeArray.length ; j++) {\n var isdeleted = pincodeArray[j].isdeleted;\n if (isdeleted === false){\n var pincodeVal = pincodeArray[j].pin;\n var pincodeid = pincodeArray[j].pincodeid;\n var localitiesVal = pincodeArray[j].localities;\n var locationObj = {\n \"zoneid\": zoneid,\n \"zonename\": zonename,\n \"pin\": pincodeVal,\n \"pincodeid\": pincodeid,\n \"localities\": localitiesVal,\n \"val\": pincodeVal + \" \" + localitiesVal\n };\n vm.locationArr.push(locationObj);\n vm.locationArr.sort(compare);\n }\n\t\t\t\t\t\t\t}\n }\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvm.acRefresh = false;\n\t\t\t\t\t\tcustportalGetSetService.setLocalityObj(vm.locationArr);\n\t\t\t\t\t})\n\t\t\t\t\t.error(function(data, status, headers, config){\n\t\t\t\t\t\tconsole.log(\"Error in getting Zones\");\n\t\t\t\t\t}); /*adminApi.getZones END*/\n\t\t\t})\n\t\t\t.error(function(data, status, headers, config){\n\t\t\t\tconsole.log(\"Failed to get Cities\");\n\t\t\t});\n\t\t}", "getZoneObjectById(id) {\n return this.zones.find(zone => zone.id === id);\n }", "get zoneIdInput() {\n return this._zoneId;\n }", "function populateSpecificTimeZoneDropDown(general_selection, selected_option = null) {\n $('#time_zone_specific_drop_down').empty();\n\n let specific_area_set = getSpecificTimeZoneOptions(general_selection);\n\n $('#time_zone_specific_drop_down').append('<option>Please select a specific area</option>');\n\n specific_area_set.forEach(function(elem) {\n $('#time_zone_specific_drop_down').append('<option value=\"'+elem+'\">'+elem+'</option>');\n });\n\n if(selected_option !== null) {\n $('[value=\"' + selected_option + '\"]').prop('selected', true);\n }\n}", "updateAllZones() {\r\n\t\tfor (var config = 0; config < NUM_INTERSECTION_CONFIGS; config++) {\r\n\t\t\tif (PROJECT.getIntersectionByIndex(config).isEnabled) \r\n\t\t\t\tPROJECT.getIntersectionByIndex(config).updateZonePCEs();\r\n\t\t}\r\n\t}", "function setTimeZoneInOptions(opts, timeZone) {\n return Object.keys(opts).reduce((all, k) => {\n all[k] = Object.assign({ timeZone }, opts[k]);\n return all;\n }, {});\n}", "addOrigin(name) {\n const key = name.split('.')[0]\n if (this.zone[key])\n throw 'This zone already exists on the server. Please try adding a record.'\n this.zone[key] = new Zone()\n this.zone[key].setOrigin(key + '.')\n return this\n }", "function addZone() {\n if ($('#location').hasClass(\"is-valid\") && $('#zoneName').hasClass(\"is-valid\")) {\n let name = $('#zoneName').val();\n let latitude = $('#location').attr(\"data-latitude\");\n let longitude = $('#location').attr(\"data-longitude\");\n let radius = $('#radius').val() === '' ? 25 : $('#radius').val();\n let icon = $('#iconSelect').val();\n\n $('#generatedYaml').append(\n `- name: ` + name + `\n latitude: ` + latitude + `\n longitude: ` + longitude + `\n radius: ` + radius + `\n icon: ` + icon + `\n`);\n\n clear();\n } else {\n console.error(\"Unable to create a zone because one or more of the inputs were invalid.\");\n }\n}", "static async getZone(zoneid){\n\t\ttry {\n\t\t\tconst result = await database.sequelize.query(\"select ST_AsGeoJSON(geom),zone_id from Thimphu_zones where zone_id = \"+zoneid+\";\") \n\t\t\treturn result[0]\n\t\t}catch (error){\n\t\t\tconsole.log(error)\n\t\t}\n\t}", "function getTimeZone(zoneName) {\n fetch(`http://api.timezonedb.com/v2/get-time-zone?key=XWSLLPX5RMIZ&format=json&by=zone&zone=${zoneName}`)\n .then(response => response.json())\n .then(res => {\n const filter = res.formatted.split(\" \");\n setDate(filter[0]);\n setTime(filter[1]);\n });\n }", "function addNS1Loc(option) {\r\n switch (option) {\r\n case \"initial\":\r\n if ($('#ns1btn').attr('class').split(\" \").indexOf(\"active\") > -1) {\r\n $('#ns1btn').removeClass(\"active\");\r\n map.removeLayer(ns1MapLayer);\r\n }\r\n break;\r\n default:\r\n if ($('#ns1btn').attr('class').split(\" \").indexOf(\"active\") > -1) {\r\n $('#ns1btn').removeClass(\"active\");\r\n map.removeLayer(ns1MapLayer);\r\n } else {\r\n $('#ns1btn').addClass(\"active\");\r\n if ($('#city_select').val().indexOf(\"-\") > -1) {\r\n // TimeMap.aspx\r\n showNS1Hosp($('#city_select').val().split(\"-\"));\r\n } else {\r\n // DengueCluster.aspx\r\n showNS1Hosp([$('#city_select').val()]);\r\n }\r\n \r\n }\r\n break;\r\n }\r\n}", "function gettimezone(igcFile, mapControl) {\n var flightdate = igcFile.recordTime[0];\n $.ajax({\n url: \"gettimezone.php\",\n data: {\n stamp: flightdate / 1000,\n lat: igcFile.latLong[0][0],\n lon: igcFile.latLong[0][1]\n },\n timeout: 3000,\n method: \"POST\",\n dataType: \"json\",\n success: function(data) {\n if (data.status === \"OK\") {\n timezone.zonename = data.zoneName;\n timezone.zoneabbr = data.abbreviation;\n timezone.offset = 1000 * parseFloat(data.gmtOffset);\n if (data.dst === \"1\") {\n timezone.zonename += \", daylight saving\";\n }\n }\n },\n complete: function() {\n //Local date may not be the same as UTC date\n var localdate = new Date(flightdate.getTime() + timezone.offset);\n $('#datecell').text(displaydate(localdate));\n barogramPlot = plotBarogram(igcFile);\n updateTimeline(0, mapControl);\n }\n });\n }", "function initializeTimeZone() {\n var selectedTz = checkLocalStorage();\n var sel = document.getElementById('timeZoneSelect')\n\n for(var i=0; i < sel.options.length; i++)\n {\n if(sel.options[i].value == selectedTz)\n sel.selectedIndex = i;\n }\n}", "get timeZones() {\n\t\treturn this.nativeElement ? this.nativeElement.timeZones : undefined;\n\t}", "_onPressDone(panelName, geoObjectType){\n if(panelName == \"zone\"){\n if(this.props.zonePoints.length >=3){\n const zonePoints = this.props.zonePoints;\n const zoneName = this.props.geoObjectsDetail.name;\n const newZone = {zoneName, zonePoints};\n this.props.thunkPostGeoObjects(newZone, \"zone\");\n }else{\n Alert.alert(\"Less than three points!\",\"To create a region atleast three points are needed\",[{text:\"Ok\"}]);\n }\n }\n if(panelName == \"track\"){\n if(this.props.trackPoints.length >=2){\n const trackPoints = this.props.trackPoints;\n const trackName = this.props.geoObjectsDetail.name;\n let {wasteLimit, wasteLimitUnit, description} = this.props.geoObjectsDetail;\n wasteLimit = parseInt(_.isEmpty(wasteLimit)?\"500\":wasteLimit, 10);\n const newTrack = {trackName, trackPoints, wasteLimit, wasteLimitUnit, description};\n this.props.thunkPostGeoObjects(newTrack, \"track\");\n }else{\n Alert.alert(\"Less than two points!\",\"To create a track atleast two points are needed\",[{text:\"Ok\"}]);\n }\n }\n if(panelName == \"geoObjectEdit\"){\n let updatedGeoObject = updatedGeoObjectIndex = updatedGeoObjectId = undefined;\n if(geoObjectType == \"track\"){\n const trackPoints = this.props.trackPoints;\n updatedGeoObject = {trackPoints};\n updatedGeoObjectIndex = this.props.selectedTrackIndex;\n updatedGeoObjectId = this.props.track[updatedGeoObjectIndex]._id;\n }\n this.props.thunkPutGeoObjects(updatedGeoObject, updatedGeoObjectIndex, updatedGeoObjectId, geoObjectType);\n }\n }", "function change_info_year(zone_array)\n{\n\t\n}", "function get_zone_coords( zone ) {\n\n\t// Make cyrodiil the default\n\tvar defaultZone = ( esomap.getMapTypeId() == 'tamriel' ) ? 'tamriel' : 'coldharbour';\n\tzone = ( zone === \"\" ) ? defaultZone : zone;\n\n\t// Supply the central coordinates for the requested zone [lat,lng,zoom]\n\tvar coords\t\t\t= {};\n\t\n\t// Tamriel coordinates\n\tcoords.tamriel\t\t= [0.00,0.00,2];\n\tcoords.roost \t\t= [-68.00,1.20,6];\n\tcoords.auridon \t\t= [-48.93,-76.40,5];\n\tcoords.grahtwood \t= [-55.42,-18.81,5];\n\tcoords.greenshade \t= [-48.70,-46.90,5];\n\tcoords.malabal \t\t= [-33.40,-39.50,5];\n\tcoords.reapers \t\t= [-29.88,-12.00,5];\n\n\tcoords.stros \t\t= [-12.43,-96.52,6];\n\tcoords.betnikh \t\t= [16.06,-120.61,6];\n\tcoords.glenumbra\t= [37.04,-121.27,5];\n\tcoords.stormhaven\t= [46.85,-80.66,5];\n\tcoords.rivenspire\t= [60.13,-92.49,5];\n\tcoords.bangkorai\t= [42.76,-59.81,5];\n\tcoords.alikr\t\t= [29.71,-90.13,5];\n\tcoords.lcraglorn\t= [41.75,-21.25,5];\n\tcoords.ucraglorn\t= [47.25,-31.50,5];\n\t\n\tcoords.bleakrock \t= [56.20,53.80,7];\n\tcoords.balfoyen \t= [16.10,95.10,7];\n\tcoords.stonefalls \t= [15.15,74.00,5];\n\tcoords.deshaan \t\t= [-3.95,85.33,5];\n\tcoords.shadowfen \t= [-22.25,77.75,5];\n\tcoords.therift \t\t= [35.00,38.00,5];\n\tcoords.eastmarch \t= [50.60,38.75,5];\n\n\tcoords.cyrodiil \t= [0.52,16.82,4];\n\t\n\t// Coldharbour coordinates\n\tcoords.coldharbour \t= [0.00,0.00,2];\n\t\n\t// Return the coordinates\n\treturn coords[zone];\n}", "function show_settings() {\n var list = {};\n list.start = \"<li><div class='ui-field-contain'><fieldset>\";\n\n $.each(window.controller.options,function(key,data) {\n switch (key) {\n case \"tz\":\n var timezones = [\"-12:00\",\"-11:30\",\"-11:00\",\"-10:00\",\"-09:30\",\"-09:00\",\"-08:30\",\"-08:00\",\"-07:00\",\"-06:00\",\"-05:00\",\"-04:30\",\"-04:00\",\"-03:30\",\"-03:00\",\"-02:30\",\"-02:00\",\"+00:00\",\"+01:00\",\"+02:00\",\"+03:00\",\"+03:30\",\"+04:00\",\"+04:30\",\"+05:00\",\"+05:30\",\"+05:45\",\"+06:00\",\"+06:30\",\"+07:00\",\"+08:00\",\"+08:45\",\"+09:00\",\"+09:30\",\"+10:00\",\"+10:30\",\"+11:00\",\"+11:30\",\"+12:00\",\"+12:45\",\"+13:00\",\"+13:45\",\"+14:00\"];\n var tz = data-48;\n tz = ((tz>=0)?\"+\":\"-\")+pad((Math.abs(tz)/4>>0))+\":\"+((Math.abs(tz)%4)*15/10>>0)+((Math.abs(tz)%4)*15%10);\n list.tz = \"<label for='o1' class='select'>\"+_(\"Timezone\")+\"</label><select data-mini='true' id='o1'>\";\n $.each(timezones, function(i, timezone) {\n list.tz += \"<option \"+((timezone == tz) ? \"selected\" : \"\")+\" value='\"+timezone+\"'>\"+timezone+\"</option>\";\n });\n list.tz += \"</select>\";\n return true;\n case \"ntp\":\n list.ntp = \"<input data-mini='true' id='o2' type='checkbox' \"+((data == \"1\") ? \"checked='checked'\" : \"\")+\" /><label for='o2'>\"+_(\"NTP Sync\")+\"</label>\";\n return true;\n case \"hp0\":\n var http = window.controller.options.hp1*256+data;\n list.http = \"<label for='o12'>\"+_(\"HTTP Port (restart required)\")+\"</label><input data-mini='true' type='number' pattern='[0-9]*' id='o12' value='\"+http+\"' />\";\n return true;\n case \"devid\":\n list.devid = \"<label for='o26'>\"+_(\"Device ID (restart required)\")+\"</label><input data-mini='true' type='number' pattern='[0-9]*' max='255' id='o26' value='\"+data+\"' />\";\n return true;\n case \"ar\":\n list.ar = \"<input data-mini='true' id='o14' type='checkbox' \"+((data == \"1\") ? \"checked='checked'\" : \"\")+\" /><label for='o14'>\"+_(\"Auto Reconnect\")+\"</label>\";\n return true;\n case \"ext\":\n list.ext = \"<label for='o15'>\"+_(\"Extension Boards\")+\"</label><input data-highlight='true' data-mini='true' type='number' pattern='[0-9]*' data-type='range' min='0' max='5' id='o15' value='\"+data+\"' />\";\n return true;\n case \"seq\":\n list.seq = \"<input data-mini='true' id='o16' type='checkbox' \"+((data == \"1\") ? \"checked='checked'\" : \"\")+\" /><label for='o16'>\"+_(\"Sequential\")+\"</label>\";\n return true;\n case \"sdt\":\n list.sdt = \"<label for='o17'>\"+_(\"Station Delay (seconds)\")+\"</label><input data-highlight='true' data-mini='true' type='number' pattern='[0-9]*' data-type='range' min='0' max='240' id='o17' value='\"+data+\"' />\";\n return true;\n case \"mas\":\n list.mas = \"<label for='o18' class='select'>\"+_(\"Master Station\")+\"</label><select data-mini='true' id='o18'><option value='0'>None</option>\";\n var i = 1;\n $.each(window.controller.stations.snames,function(z, station) {\n list.mas += \"<option \"+((i == data) ? \"selected\" : \"\")+\" value='\"+i+\"'>\"+station+\"</option>\";\n if (i == 8) return false;\n i++;\n });\n list.mas += \"</select>\";\n return true;\n case \"mton\":\n list.mton = \"<label for='o19'>\"+_(\"Master On Delay\")+\"</label><input data-highlight='true' data-mini='true' type='number' pattern='[0-9]*' data-type='range' min='0' max='60' id='o19' value='\"+data+\"' />\";\n return true;\n case \"mtof\":\n list.mtof = \"<label for='o20'>\"+_(\"Master Off Delay\")+\"</label><input data-highlight='true' data-mini='true' type='number' pattern='[0-9]*' data-type='range' min='-60' max='60' id='o20' value='\"+data+\"' />\";\n return true;\n case \"urs\":\n list.urs = \"<input data-mini='true' id='o21' type='checkbox' \"+((data == \"1\") ? \"checked='checked'\" : \"\")+\" /><label for='o21'>\"+_(\"Use Rain Sensor\")+\"</label>\";\n return true;\n case \"rso\":\n list.rso = \"<input data-mini='true' id='o22' type='checkbox' \"+((data == \"1\") ? \"checked='checked'\" : \"\")+\" /><label for='o22'>\"+_(\"Normally Open (Rain Sensor)\")+\"</label>\";\n return true;\n case \"wl\":\n list.wl = \"<label for='o23'>\"+_(\"% Watering\")+\"</label><input data-highlight='true' data-mini='true' type='number' pattern='[0-9]*' data-type='range' min='0' max='250' id='o23' value='\"+data+\"' />\";\n return true;\n case \"ipas\":\n list.ipas = \"<input data-mini='true' id='o25' type='checkbox' \"+((data == \"1\") ? \"checked='checked'\" : \"\")+\" /><label for='o25'>\"+_(\"Ignore Password\")+\"</label>\";\n return true;\n }\n });\n list.loc = \"<label for='loc'>Location</label><input data-mini='true' type='text' id='loc' value='\"+window.controller.settings.loc+\"' />\";\n list.end = \"</fieldset></div></li>\";\n\n var str = list.start + list.tz + list.mas + list.http + list.devid + list.loc + list.ext + list.sdt + list.mton + list.mtof + list.wl + list.ntp + list.ar + list.seq + list.urs + list.rso + list.ipas + list.end;\n var settings = $(\"#os-settings-list\");\n settings.html(str).enhanceWithin();\n if (settings.hasClass(\"ui-listview\")) settings.listview(\"refresh\");\n changePage(\"#os-settings\");\n}", "function setOptions() {\n if (tabControl.isTabShowing(tabControl.TABS.DIRECTIONS)) {\n planTripOrShowPlaces();\n }\n }", "function generateTimeZoneFormatObject(timeZone, format_object){\n if(!timeZone) return format_object;\n if(ary_ianna_time_zones.indexOf(timeZone)!==-1) return Object.assign({ timeZone }, format_object);\n if(typeof ary_ianna_time_offsets[timeZone]!==\"undefined\") return Object.assign({ timeZone: ary_ianna_time_zones[ary_ianna_time_offsets[timeZone]] }, format_object);\n return format_object;\n}", "trapPlace() {\n this.scene.add.existing(this).setScale(2);\n\n this.trapZone = this.scene.add.zone(this.x, this.y).setSize(this.displayWidth, this.displayWidth);\n this.trapZone.setCircleDropZone(100);\n this.scene.physics.world.enable(this.trapZone, 0); // (0) DYNAMIC (1) STATIC\n this.trapZone.body.setAllowGravity(false);\n this.trapZone.body.moves = false;\n\n if (!this.player.iqla) {\n this.setVisible(false);\n }\n \n //Biggest problem in converting to server side is here as overlap doesn't work if velocity is zero\n setTimeout(() => {\n console.log(\"active\");\n console.log(this.player);\n this.scene.physics.add.overlap(this.trapZone, this.scene.player, this.activateTrap, null, this)\n }, 5000); //default 5 seconds\n }", "initializeZonePCEs() {\r\n if (this._active_flag) \r\n\t\t\tthis._zone_PCEs = new PCETable(this._southbound_PCEs, this._westbound_PCEs, this._northbound_PCEs, this._eastbound_PCEs);\r\n\t}", "function timezonesValidate(timezonesForm){\n\nvar validationVerified=true;\nvar errorMessage=\"\";\n\nif (timezonesForm.name.value==\"\")\n{\nerrorMessage+=\"Bạn chưa điền múi giờ!\\n\";\nvalidationVerified=false;\n}\nif (timezonesForm.timezone.selectedIndex==0)\n{\nerrorMessage+=\"Bạn chưa chọn múi giờ!\\n\";\nvalidationVerified=false;\n}\nif(!validationVerified)\n{\nalert(errorMessage);\n}\nreturn validationVerified;\n}", "_getTimeOffset(timezone, geo, callback){\n let tz = new timezoneController(timezone);\n let first = (cb)=> {\n tz.requestTimezoneOffset(undefined, 'get', (err, tzOffset) => {\n if (err) {\n log.warn(new Error(`cDSF > Failed to run first step : ${err}`));\n return cb(null);\n }\n return cb('1. Found timezone Offset', tzOffset);\n });\n };\n let second = (cb)=>{\n tz.requestTimezoneOffsetByGeo({lat: geo[1], lon:geo[0]}, timezone, (err, tzOffset)=>{\n if(err){\n log.warn(new Error(`cDSF > Failed to run second step : ${err}`));\n return cb(null);\n }\n return cb('2. Found timezone Offset', tzOffset);\n });\n };\n let third = (cb)=>{\n let tzOffset = timezone.match(/\\d+/g).map(Number); // extract number from timezone string\n log.debug(`cDsf> TZ Offset : ${tzOffset[0]}`);\n if(tzOffset.length > 0 && tzOffset[0] >= 0 && tzOffset[0] < 24){\n return cb('3. Found timezone Offset', tzOffset[0] * 60 /* to make Minute*/);\n }\n return cb(null);\n };\n\n async.waterfall([first, second, third],\n (err, tzOffset)=>{\n if(tzOffset === undefined){\n err = new Error(`cDsf > Fail to get timezone!! tz[${timezone}], geo[${geo[0]}, ${geo[1]}`);\n log.error(err);\n return callback(err);\n }\n return callback(undefined, tzOffset);\n }\n );\n }", "handleSave(){\n let j = this.template.querySelector('[data-id=\"timeZoneSelect\"]').value;\n if (j == \"\"){\n //throw error\n this.template.querySelector('[data-id=\"timeZoneSelect\"]').classList.add('red');\n return ;\n }\n else {\n this.createPreference(j);\n }\n }", "function timeZoneGetter(width){return function(date,locale,offset){var zone=-1*offset;var minusSign=getLocaleNumberSymbol(locale,NumberSymbol.MinusSign);var hours=zone>0?Math.floor(zone/60):Math.ceil(zone/60);switch(width){case ZoneWidth.Short:return(zone>=0?'+':'')+padNumber(hours,2,minusSign)+padNumber(Math.abs(zone%60),2,minusSign);case ZoneWidth.ShortGMT:return'GMT'+(zone>=0?'+':'')+padNumber(hours,1,minusSign);case ZoneWidth.Long:return'GMT'+(zone>=0?'+':'')+padNumber(hours,2,minusSign)+':'+padNumber(Math.abs(zone%60),2,minusSign);case ZoneWidth.Extended:if(offset===0){return'Z';}else{return(zone>=0?'+':'')+padNumber(hours,2,minusSign)+':'+padNumber(Math.abs(zone%60),2,minusSign);}default:throw new Error(\"Unknown zone width \\\"\"+width+\"\\\"\");}};}", "function getZones(zoneDefinitions, geos) {\n let zones = {};\n zoneDefinitions.forEach(zone => {\n if (zone.zoneName in zones)\n throw ('Warning: ' + zone.zoneName + ' has duplicated entries. Each zoneName must be present ' +\n 'only once in zoneDefinitions');\n // Avoid zone with moreDetails\n if ( !('moreDetails' in zone) || !zone.moreDetails) {\n zones[zone.zoneName] = getDataForZone(zone, geos, true);\n }\n });\n return zones\n}", "getTimezone() {\n return Intl.DateTimeFormat().resolvedOptions().timeZone;\n }", "writing() {\n //console.log('ptz-domain options =>>>>>>>>>>>>>>>>>>>>>>>>>>>>', this.options.ptz);\n }", "getZonePCEs () {\r\n\t\treturn this._zone_PCEs;\r\n\t}", "handleClick() {\n this.props.onZoneSelect(this.props.zoneId);\n }", "get availabilityZone() {\n return this.getStringAttribute('availability_zone');\n }", "function SZP2(state) {\n var n = state.stack.pop();\n\n if (exports.DEBUG) {\n console.log(state.step, 'SZP2[]', n);\n }\n\n state.zp2 = n;\n\n switch (n) {\n case 0:\n if (!state.tZone) {\n initTZone(state);\n }\n state.z2 = state.tZone;\n break;\n case 1:\n state.z2 = state.gZone;\n break;\n default:\n throw new Error('Invalid zone pointer');\n }\n }", "function compareAreaCodes2(){\r\nvar storedAreaCodes = sessionStorage.getItem(\"areaCodesTimeZones\");\r\nvar areaCodesParsed = JSON.parse(storedAreaCodes);\r\n\r\nvar acp = areaCodesParsed;\r\nvar phone = document.getElementById(\"phone\");\r\nvar result = document.getElementById(\"result\");\r\nvar basicresult = document.getElementById(\"basicResult\");\r\nvar a = phone.value;\r\nvar b = a.slice(1, 4);\r\nvar g = phone.innerHTML;\r\n\r\n\r\nvar today = new Date();\r\n var h = today.getHours();\r\n var m = today.getMinutes();\r\n var s = today.getSeconds();\r\n\r\n\r\n\r\n\tif(phone.value.length > 0){\r\n\t\tif(typeof acp !== null){\r\n\t\tfor (var i = 0; i < acp.length; i++) {\r\n\t\t\tif(b == acp[i].areacode){\r\n\t\t\t\tacDisplay.innerHTML = \"PH : \" + a + \" / TZ: \" + acp[i].timezone;\r\n\t\t\t\tif(acp[i].timezone == \"CST\" && h < 9){\r\n\t\t\t\t\talert(\"DO NOT CALL: OUT OF TIME ZONE\");\r\n\t\t\t\t\tif(h > 7){\r\n\t\t\t\t\tacDisplay.innerHTML = \"YOU HAVE: (\" + (60 - m) + \") MINS TO CALL \" + acp[i].timezone;\r\n\t\t\t\t\tg = phone + \" DNC TZ \" + acp[i].timezone;\r\n\t\t\t\t\tresult.value = acp[i].timezone + \" TZ CONFLICT\";\r\n\t\t\t\t\tbasicresult.value = acp[i].timezone + \" TZ\";\r\n\t\t\t\t}\r\n\t\t\t\t\tif(h < 7){\r\n\t\t\t\t\tacDisplay.innerHTML = \"YOU HAVE: \" +(17 - h) + \" HR \" + (60 - m) + \" MINS TO CALL \" + acp[i].timezone;\r\n\t\t\t\t\tg = phone + \" DNC TZ \" + acp[i].timezone;\r\n\t\t\t\t\tresult.value = acp[i].timezone + \" TZ CONFLICT\";\r\n\t\t\t\t\tbasicresult.value = acp[i].timezone + \" TZ\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\tresult.value = acp[i].timezone + \" TZ CONFLICT\";\r\n\t\t\t\t\tbasicresult.value = acp[i].timezone + \" TZ\";\r\n\t\t\t\t}\r\n\t\t\t\tif(acp[i].timezone == \"MST\" && h < 10){\r\n\t\t\t\t\talert(\"DO NOT CALL: OUT OF TIME ZONE\");\r\n\t\t\t\t\tif(h > 8){\r\n\t\t\t\t\tacDisplay.innerHTML = \"YOU HAVE: (\" + (60 - m) + \") MINS TO CALL \" + acp[i].timezone;\r\n\t\t\t\t\tg = phone + \" DNC TZ \" + acp[i].timezone;\r\n\t\t\t\t\tresult.value = acp[i].timezone + \" TZ CONFLICT\";\r\n\t\t\t\t\tbasicresult.value = acp[i].timezone + \" TZ\";\r\n\t\t\t\t}\r\n\t\t\t\t\tif(h < 8){\r\n\t\t\t\t\tacDisplay.innerHTML = \"YOU HAVE: \" +(17 - h) + \" HR \" + (60 - m) + \" MINS TO CALL \" + acp[i].timezone;\r\n\t\t\t\t\tg = phone + \" DNC TZ \" + acp[i].timezone;\r\n\t\t\t\t\tresult.value = acp[i].timezone + \" TZ CONFLICT\";\r\n\t\t\t\t\tbasicresult.value = acp[i].timezone + \" TZ\";\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t\tresult.value = acp[i].timezone + \" TZ CONFLICT\";\r\n\t\t\t\t\tbasicresult.value = acp[i].timezone + \" TZ\";\r\n\t\t\t\t}\r\n\t\t\t\tif(acp[i].timezone == \"PST\" && h < 11){\r\n\t\t\t\t\talert(\"DO NOT CALL: OUT OF TIME ZONE\");\r\n\t\t\t\t\tif(h > 9){\r\n\t\t\t\t\tacDisplay.innerHTML = \"YOU HAVE: (\" + (60 - m) + \") MINS TO CALL \" + acp[i].timezone;\r\n\t\t\t\t\tg = phone + \" DNC TZ \" + acp[i].timezone;\r\n\t\t\t\t\tresult.value = acp[i].timezone + \" TZ CONFLICT\";\r\n\t\t\t\t\tbasicresult.value = acp[i].timezone + \" TZ\";\r\n\t\t\t\t}\r\n\t\t\t\t\tif(h < 9){\r\n\t\t\t\t\tacDisplay.innerHTML = \"YOU HAVE: \" +(17 - h) + \" HR \" + (60 - m) + \" MINS TO CALL \" + acp[i].timezone;\r\n\t\t\t\t\tg = phone + \" DNC TZ \" + acp[i].timezone;\r\n\t\t\t\t\tresult.value = acp[i].timezone + \" TZ CONFLICT\";\r\n\t\t\t\t\tbasicresult.value = acp[i].timezone + \" TZ\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\tresult.value = acp[i].timezone + \" TZ CONFLICT\";\r\n\t\t\t\t\tbasicresult.value = acp[i].timezone + \" TZ\";\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}\r\n\t}\r\n\t\tdocument.getElementById(\"phone\").click();\r\n\r\n}", "function changeTimeZone() {\n analyticsEvent('changed');\n setKnownBrowserOffset().done(function () {\n exports.navigate(nav.newBuilder('account').build());\n });\n }", "function new_tracker(core, transport) {\n let t = {\n zone: null,\n zone_id: \"\",\n last_state : \"\",\n }\n\n t.on_state_changed = function() {\n console.log(\"zone state now \" + t.last_state)\n if (!((t.last_state != \"playing\") && (t.last_state != \"loading\"))) {\n if (trigger_state == false) {\n clearTimeout( offPause );\n transport.control(t.zone, \"pause\", (x) => setTimeout(() => transport.control(t.zone, \"play\"), mysettings.turnOnPause*1000))\n }\n trg_by = \"ROON\"\n set_trigger(true)\n }\n if (!(t.last_state != \"stopped\")) {\n clearTimeout(offPause)\n trg_by = \"ROON\"\n offPause = setTimeout(() => {set_trigger(false); }, mysettings.turnOffPause*1000);\n }\n }\n\n t.zone_event = function(cmd, data) {\n if (cmd == \"Subscribed\") {\n data.zones.forEach( z => { \n if (z.display_name == mysettings.zone.name) {\n t.zone = z;\n t.zone_id = z.zone_id;\n t.last_state = z.state;\n }\n })\n console.log(\"zones\", t.zone.display_name, t.zone_id, t.last_state);\n t.on_state_changed();\n\n } else if (cmd == \"Changed\") {\n if (\"zones_changed\" in data) {\n data.zones_changed.forEach( z => {\n if ((z.zone_id == t.zone_id) && (z.state != t.last_state)) {\n t.last_state = z.state;\n t.on_state_changed();\n }\n })\n } else if (\"zones_seek_changed\" in data) {\n // skip\n } else {\n console.log(cmd, data);\n }\n }\n }\n return t\n}", "function SZP1(state) {\n var n = state.stack.pop();\n\n if (exports.DEBUG) {\n console.log(state.step, 'SZP1[]', n);\n }\n\n state.zp1 = n;\n\n switch (n) {\n case 0:\n if (!state.tZone) {\n initTZone(state);\n }\n state.z1 = state.tZone;\n break;\n case 1:\n state.z1 = state.gZone;\n break;\n default:\n throw new Error('Invalid zone pointer');\n }\n }", "createPreference(timeZonefield) {\n const fields = {};\n fields[TIME_ZONE_FIELD.fieldApiName] = timeZonefield;\n const recordInput = { apiName: TIME_PREFERENCES_OBJECT.objectApiName, fields };\n createRecord(recordInput)\n .then(recordOut => {\n //this.accountId = recordOut.id;\n this.loadArray(timeZonefield,recordOut.id,false);\n //enable flasg again\n this.editMode = true;\n this.newClock = false;\n })\n .catch(error => {\n this.dispatchEvent(\n new ShowToastEvent({\n title: 'Error creating Preference',\n message: reduceErrors(error).join(', '),\n variant: 'error'\n })\n );\n });\n }", "findTimeZoneId(timezoneStr){\n let timezones = this.props.time_zones;\n let timezone = timezones.filter((element)=>{\n console.log('element', element);\n return element['time_zone'].includes(timezoneStr);\n \n });\n if(timezone.length > 0){\n let id = timezone[0]['id'];\n return id;\n \n }\n }", "get timeZone() {\n\t\treturn this.nativeElement ? this.nativeElement.timeZone : undefined;\n\t}", "function initTZone(state) {\n var tZone = (state.tZone = new Array(state.gZone.length));\n\n // no idea if this is actually correct...\n for (var i = 0; i < tZone.length; i++) {\n tZone[i] = new HPoint(0, 0);\n }\n }", "runInZone(fn) {\n return (this.elementZone && Zone.current !== this.elementZone) ? this.ngZone.run(fn) : fn();\n }", "function setChosenTimeZone()\r\n{\r\n var timeZoneChanged = (timeZoneSelector.currentTimeZone !== timeZoneSelector.selectedTimeZone);\r\n timeZoneSelector.currentTimeZone = timeZoneSelector.selectedTimeZone;\r\n \r\n return timeZoneChanged;\r\n}", "function formatOzone(ozone) {\n\treturn Math.round(ozone) + ' DU';\n}", "function compareAreaCodes(event){\r\nvar storedAreaCodes = sessionStorage.getItem(\"areaCodesTimeZones\");\r\nvar areaCodesParsed = JSON.parse(storedAreaCodes);\r\n\r\nvar acp = areaCodesParsed;\r\nvar x = event.keyCode;\r\nvar phone = document.getElementById(\"phone\");\r\nvar result = document.getElementById(\"result\");\r\nvar basicresult = document.getElementById(\"basicResult\");\r\nvar a = phone.value;\r\nvar b = a.slice(1, 4);\r\nvar g = phone.innerHTML;\r\n\r\n\r\nvar today = new Date();\r\n var h = today.getHours();\r\n var m = today.getMinutes();\r\n var s = today.getSeconds();\r\n\r\n\r\n\tif(phone.value.length > 0){\r\n\t\tif(typeof acp !== null){\r\n\t\tfor (var i = 0; i < acp.length; i++) {\r\n\t\t\tif(b == acp[i].areacode){\r\n\t\t\t\tacDisplay.innerHTML = \"PH : \" + a + \" / TZ: \" + acp[i].timezone;\r\n\t\t\t\tif(acp[i].timezone == \"CST\" && h < 9){\r\n\t\t\t\t\talert(\"DO NOT CALL: OUT OF TIME ZONE\");\r\n\t\t\t\t\tif(h > 7){\r\n\t\t\t\t\tacDisplay.innerHTML = \"YOU HAVE: (\" + (60 - m) + \") MINS TO CALL \" + acp[i].timezone;\r\n\t\t\t\t\tg = phone + \" DNC TZ \" + acp[i].timezone;\r\n\t\t\t\t\tresult.value = acp[i].timezone + \" TZ CONFLICT\";\r\n\t\t\t\t\tbasicresult.value = acp[i].timezone + \" TZ\";\r\n\t\t\t\t}\r\n\t\t\t\t\tif(h < 7){\r\n\t\t\t\t\tacDisplay.innerHTML = \"YOU HAVE: \" +(17 - h) + \" HR \" + (60 - m) + \" MINS TO CALL \" + acp[i].timezone;\r\n\t\t\t\t\tg = phone + \" DNC TZ \" + acp[i].timezone;\r\n\t\t\t\t\tresult.value = acp[i].timezone + \" TZ CONFLICT\";\r\n\t\t\t\t\tbasicresult.value = acp[i].timezone + \" TZ\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\tresult.value = acp[i].timezone + \" TZ CONFLICT\";\r\n\t\t\t\t\tbasicresult.value = acp[i].timezone + \" TZ\";\r\n\t\t\t\t}\r\n\t\t\t\tif(acp[i].timezone == \"MST\" && h < 10){\r\n\t\t\t\t\talert(\"DO NOT CALL: OUT OF TIME ZONE\");\r\n\t\t\t\t\tif(h > 8){\r\n\t\t\t\t\tacDisplay.innerHTML = \"YOU HAVE: (\" + (60 - m) + \") MINS TO CALL \" + acp[i].timezone;\r\n\t\t\t\t\tg = phone + \" DNC TZ \" + acp[i].timezone;\r\n\t\t\t\t\tresult.value = acp[i].timezone + \" TZ CONFLICT\";\r\n\t\t\t\t\tbasicresult.value = acp[i].timezone + \" TZ\";\r\n\t\t\t\t}\r\n\t\t\t\t\tif(h < 8){\r\n\t\t\t\t\tacDisplay.innerHTML = \"YOU HAVE: \" +(17 - h) + \" HR \" + (60 - m) + \" MINS TO CALL \" + acp[i].timezone;\r\n\t\t\t\t\tg = phone + \" DNC TZ \" + acp[i].timezone;\r\n\t\t\t\t\tresult.value = acp[i].timezone + \" TZ CONFLICT\";\r\n\t\t\t\t\tbasicresult.value = acp[i].timezone + \" TZ\";\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t\tresult.value = acp[i].timezone + \" TZ CONFLICT\";\r\n\t\t\t\t\tbasicresult.value = acp[i].timezone + \" TZ\";\r\n\t\t\t\t}\r\n\t\t\t\tif(acp[i].timezone == \"PST\" && h < 11){\r\n\t\t\t\t\talert(\"DO NOT CALL: OUT OF TIME ZONE\");\r\n\t\t\t\t\tif(h > 9){\r\n\t\t\t\t\tacDisplay.innerHTML = \"YOU HAVE: (\" + (60 - m) + \") MINS TO CALL \" + acp[i].timezone;\r\n\t\t\t\t\tg = phone + \" DNC TZ \" + acp[i].timezone;\r\n\t\t\t\t\tresult.value = acp[i].timezone + \" TZ CONFLICT\";\r\n\t\t\t\t\tbasicresult.value = acp[i].timezone + \" TZ\";\r\n\t\t\t\t}\r\n\t\t\t\t\tif(h < 9){\r\n\t\t\t\t\tacDisplay.innerHTML = \"YOU HAVE: \" +(17 - h) + \" HR \" + (60 - m) + \" MINS TO CALL \" + acp[i].timezone;\r\n\t\t\t\t\tg = phone + \" DNC TZ \" + acp[i].timezone;\r\n\t\t\t\t\tresult.value = acp[i].timezone + \" TZ CONFLICT\";\r\n\t\t\t\t\tbasicresult.value = acp[i].timezone + \" TZ\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\tresult.value = acp[i].timezone + \" TZ CONFLICT\";\r\n\t\t\t\t\tbasicresult.value = acp[i].timezone + \" TZ\";\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tdocument.getElementById(\"phone\").click();\r\n}", "function updateDropZones(col, alpha, hover) {\n\t\t// $log.log(preDebugMsg + \"update the data drop zone locations\");\n\t\tif(dropCanvas === null) {\n\t\t\tvar myCanvasElement = $scope.theView.parent().find('#theDropCanvas');\n\t\t\tif(myCanvasElement.length > 0) {\n\t\t\t\tdropCanvas = myCanvasElement[0];\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//$log.log(preDebugMsg + \"no drop canvas to draw on!\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tif(dropCtx === null) {\n\t\t\tdropCtx = dropCanvas.getContext(\"2d\");\n\t\t}\n\n\t\tif(!dropCtx) {\n\t\t\t//$log.log(preDebugMsg + \"no canvas to draw drop zones on\");\n\t\t\treturn;\n\t\t}\n\n\t\tif(dropCtx) {\n\t\t\tvar W = dropCanvas.width;\n\t\t\tvar H = dropCanvas.height;\n\t\t\tdropCtx.clearRect(0,0, W,H);\n\t\t\tvar marg1 = 8;\n\t\t\tif(drawW < 40) {\n\t\t\t\tmarg1 = 0;\n\t\t\t}\n\t\t\tvar marg2 = 8;\n\t\t\tif(drawH < 40) {\n\t\t\t\tmarg2 = 0;\n\t\t\t}\n\n\t\t\tdropZ.left = leftMarg;\n\t\t\tdropZ.top = topMarg;\n\t\t\tdropZ.right = leftMarg + drawW;\n\t\t\tdropZ.bottom = topMarg + drawH;\n\n\t\t\tif(hover) {\n\t\t\t\tdropCtx.save();\n\t\t\t\tdropCtx.fillStyle = \"rgba(0, 0, 0, 0.75)\";\n\t\t\t\tdropCtx.fillRect(0,0, W, H);\n\t\t\t\tdropCtx.restore();\n\t\t\t\tvar fnt = \"bold \" + (fontSize + 5) + \"px Arial\";\n\t\t\t\tdropCtx.font = fnt;\n\t\t\t\tdropCtx.fillStyle = textColor;\n\t\t\t\tdropCtx.fillStyle = \"black\";\n\n\t\t\t\tfor(var d = 0; d < allDropZones.length; d++) {\n\t\t\t\t\tvar dropZone = allDropZones[d];\n\n\t\t\t\t\tdropCtx.save();\n\t\t\t\t\tvar l = Math.max(0, dropZone.left - fontSize/2);\n\t\t\t\t\tvar t = Math.max(0, dropZone.top - fontSize/2);\n\t\t\t\t\tvar w = Math.min(W - l, dropZone.right - dropZone.left + fontSize / 2 + dropZone.left - l);\n\t\t\t\t\tvar h = Math.min(H - t, dropZone.bottom - dropZone.top + fontSize / 2 + dropZone.top - t );\n\t\t\t\t\tdropCtx.clearRect(l, t, w, h);\n\t\t\t\t\tdropCtx.fillStyle = \"rgba(255, 255, 255, 0.75)\";\n\t\t\t\t\tdropCtx.fillRect(l, t, w, h);\n\t\t\t\t\tdropCtx.restore();\n\t\t\t\t}\n\t\t\t\tfor(var d = 0; d < allDropZones.length; d++) {\n\t\t\t\t\tvar dropZone = allDropZones[d];\n\n\t\t\t\t\tdropCtx.save();\n\t\t\t\t\tdropCtx.globalAlpha = alpha;\n\t\t\t\t\tdropCtx.strokeStyle = \"black\";\n\t\t\t\t\tdropCtx.strokeWidth = 1;\n\t\t\t\t\tdropCtx.lineWidth = 2;\n\t\t\t\t\tdropCtx.setLineDash([2, 3]);\n\t\t\t\t\tdropCtx.beginPath();\n\t\t\t\t\tdropCtx.moveTo(dropZone.left, dropZone.top);\n\t\t\t\t\tdropCtx.lineTo(dropZone.left, dropZone.bottom);\n\t\t\t\t\tdropCtx.lineTo(dropZone.right, dropZone.bottom);\n\t\t\t\t\tdropCtx.lineTo(dropZone.right, dropZone.top);\n\t\t\t\t\tdropCtx.lineTo(dropZone.left, dropZone.top);\n\t\t\t\t\tdropCtx.stroke();\n\t\t\t\t\tif(hover) {\n\t\t\t\t\t\tvar str = dropZone.label;\n\t\t\t\t\t\tvar tw = legacyDDSupLib.getTextWidth(axesCtx, str, fnt);\n\t\t\t\t\t\tvar labelShift = Math.floor(fontSize / 2);\n\t\t\t\t\t\tif(dropZone.rotate) {\n\t\t\t\t\t\t\tif(dropZone.left > W / 2) {\n\t\t\t\t\t\t\t\tdropCtx.translate(dropZone.left - labelShift, dropZone.top + Math.floor((dropZone.bottom - dropZone.top - tw) / 2));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tdropCtx.translate(dropZone.right - labelShift, dropZone.top + Math.floor((dropZone.bottom - dropZone.top - tw) / 2));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdropCtx.rotate(Math.PI/2);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tif(dropZone.top < H / 2) {\n\t\t\t\t\t\t\t\tdropCtx.translate(dropZone.left + Math.floor((dropZone.right - dropZone.left - tw) / 2), dropZone.bottom + labelShift);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tdropCtx.translate(dropZone.left + Math.floor((dropZone.right - dropZone.left - tw) / 2), dropZone.top + labelShift);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdropCtx.fillText(str, 0, 0);\n\t\t\t\t\t}\n\t\t\t\t\tdropCtx.restore();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function get_zone_no(tag_no) {\n\tvar request = \"http://\" + HAIP_SERVER_IP + \":\" + HAIP_SERVER_PORT + \"/locationOf?MAC=\" + tag_no;\n\tvar information = http_GET(request);\n\tvar x = information[\"x_location\"];\n\tvar y = information[\"y_location\"];\n\tvar zone;\n\tif (x < boundaries[\"x1\"]) {\n\t\tif (y < boundaries[\"y1\"]) {zone = 1;}\n\t\telse if (y < boundaries[\"y2\"]) {zone = 3;}\n\t\telse if (y < boundaries[\"y3\"]) {zone = 5;}\n\t\telse {zone = 7;}\n\t}\n\telse {\n\t\tif (y < boundaries[\"y1\"]) {zone = 2;}\n\t\telse if (y < boundaries[\"y2\"]) {zone = 4;}\n\t\telse if (y < boundaries[\"y3\"]) {zone = 6;}\n\t\telse {zone = 8;}\n\t}\n\treturn x + \" \" + y;\n}", "function setTimeZoneOffset(tz) {\n if (angular.isString(tz.offset)) {\n if (!angular.isDefined(vm.fromDate)) vm.fromDate = {};\n vm.fromDate.timezone = tz.offset;\n if (!angular.isDefined(vm.toDate)) vm.toDate = {};\n vm.toDate.timezone = tz.offset;\n }\n }", "function timezone(offset) {\n var minutes = Math.abs(offset);\n var hours = Math.floor(minutes / 60);\n\tminutes = Math.abs(offset%60);\n var prefix = offset < 0 ? \"+\" : \"-\";\n//\tdocument.getElementById('atzo').innerHTML = prefix+hours+\":\"+minutes;\t\n return prefix+hours+\":\"+minutes;\t\n}", "function SZPS(state) {\n var n = state.stack.pop();\n\n if (exports.DEBUG) {\n console.log(state.step, 'SZPS[]', n);\n }\n\n state.zp0 = state.zp1 = state.zp2 = n;\n\n switch (n) {\n case 0:\n if (!state.tZone) {\n initTZone(state);\n }\n state.z0 = state.z1 = state.z2 = state.tZone;\n break;\n case 1:\n state.z0 = state.z1 = state.z2 = state.gZone;\n break;\n default:\n throw new Error('Invalid zone pointer');\n }\n }", "createDirections() {\r\n this._southbound = new Direction(\"southbound\", this._zone_PCEs, this._intersection_ID, this._zone_ID, 0);\r\n this._westbound = new Direction(\"westbound\" , this._zone_PCEs, this._intersection_ID, this._zone_ID, 1);\r\n this._northbound = new Direction(\"northbound\", this._zone_PCEs, this._intersection_ID, this._zone_ID, 2);\r\n this._eastbound = new Direction(\"eastbound\" , this._zone_PCEs, this._intersection_ID, this._zone_ID, 3);\r\n this._direction_array = [this._southbound, this._westbound, this._northbound, this._eastbound];\r\n this._zone_TCUs = new TCUTable(this._zone_ID, this._intersection_ID, this._zone_PCEs, this._direction_array);\r\n }", "function timezonesValidate(timezonesForm){\n\nvar validationVerified=true;\nvar errorMessage=\"\";\n\nif (timezonesForm.name.value==\"\")\n{\nerrorMessage+=\"timezone not filled!\\n\";\nvalidationVerified=false;\n}\nif (timezonesForm.timezone.selectedIndex==0)\n{\nerrorMessage+=\"timezone not selected!\\n\";\nvalidationVerified=false;\n}\nif(!validationVerified)\n{\nalert(errorMessage);\n}\nreturn validationVerified;\n}", "function zoneStyle(feature) {\n return {\n \"color\": \"#90ee90\",\n \"weight\": 2\n };\n }", "function zoneStyle(feature) {\n return {\n \"color\": \"#90ee90\",\n \"weight\": 2\n };\n }", "function zoneStyle(feature) {\n return {\n \"color\": \"#90ee90\",\n \"weight\": 2\n };\n }", "testPattern_z_() {\n var df;\n for (var i = 0; i < this.__dates.length; i++) {\n var date = this.__dates[i].date;\n\n var timezoneOffset = date.getTimezoneOffset();\n var timezoneSign = timezoneOffset > 0 ? 1 : -1;\n var timezoneHours = Math.floor(Math.abs(timezoneOffset) / 60);\n var timezoneMinutes = Math.abs(timezoneOffset) % 60;\n\n var localTimeZone =\n \"GMT\" +\n (timezoneSign > 0 ? \"-\" : \"+\") +\n this.__fillNumber(Math.abs(timezoneHours), 2) +\n \":\" +\n this.__fillNumber(timezoneMinutes, 2);\n\n df = new qx.util.format.DateFormat(\"z\");\n this.assertEquals(localTimeZone, df.format(date));\n df.dispose();\n\n df = new qx.util.format.DateFormat(\"zz\");\n this.assertEquals(localTimeZone, df.format(date));\n df.dispose();\n\n df = new qx.util.format.DateFormat(\"zzz\");\n this.assertEquals(localTimeZone, df.format(date));\n df.dispose();\n }\n }" ]
[ "0.6625593", "0.6239862", "0.6121021", "0.6073431", "0.6073431", "0.6073431", "0.6073431", "0.6073431", "0.60722363", "0.6031178", "0.5992536", "0.5958643", "0.5859132", "0.58356327", "0.5808946", "0.57686645", "0.5720743", "0.57059675", "0.5690443", "0.56650555", "0.56397057", "0.5634923", "0.5624348", "0.5606147", "0.5604442", "0.5557626", "0.5548328", "0.5521339", "0.55081105", "0.5479422", "0.5437345", "0.54285055", "0.54174167", "0.54164773", "0.53902626", "0.5354813", "0.5340514", "0.53393376", "0.53292495", "0.53178906", "0.53168064", "0.53047985", "0.5288785", "0.5288703", "0.52878153", "0.5285855", "0.5274867", "0.5259032", "0.5258166", "0.52499855", "0.5249217", "0.52406317", "0.5236101", "0.5233289", "0.5223336", "0.5218468", "0.5213856", "0.5212775", "0.5199332", "0.5184706", "0.51714957", "0.5171321", "0.5144302", "0.51415", "0.5131951", "0.51313823", "0.51248074", "0.512313", "0.51156646", "0.51145077", "0.51067567", "0.5094603", "0.5089923", "0.50843924", "0.50732183", "0.5061863", "0.50598025", "0.505033", "0.50472313", "0.5046578", "0.5041321", "0.50379974", "0.5025069", "0.5017723", "0.5017537", "0.50160545", "0.50108576", "0.5004136", "0.49885368", "0.498787", "0.49819565", "0.4959342", "0.49482033", "0.49480292", "0.49468717", "0.49442112", "0.4941883", "0.49344018", "0.49344018", "0.49344018", "0.49266398" ]
0.0
-1
helps handle the details
function toTechFormat(dt, format, allowZ) { if (allowZ === void 0) { allowZ = true; } return dt.isValid ? Formatter.create(Locale.create("en-US"), { allowZ: allowZ, forceSimple: true }).formatDateTimeFromString(dt, format) : null; } // technical time formats (e.g. the time part of ISO 8601), take some options
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleInfo() {\n\t\t// setJob({\n\t\t// \tjob: 'Front-end developer',\n\t\t// \tlang: 'JS',\n\t\t// });\n\n\t\tsetPerson({\n\t\t\tname: 'Sina',\n\t\t\temail: '[email protected]',\n\t\t});\n\t}", "function Details() {\r\n}", "function getDetails() {\n\n}", "function trapItemDetails() {\n\n console.log(GM_info.script.name + ': trapItemDetails');\n\n //debugger;\n\n let parentDiv = $('div.ReactVirtualized__Grid').get();\n if (!validPointer(parentDiv) || !parentDiv.length) {return;}\n\n let owlItem = $(parentDiv).find('div.info___3-0WL').get();\n if (!owlItem.length || !validPointer(owlItem)) {return;}\n\n let clearfix = $(owlItem).find('div.info-content > div.clearfix.info-wrap')[0];\n if (!validPointer(clearfix)) {return;}\n\n //let pricingUl = $(clearfix).find('ul.info-cont')[0];\n //if (!validPointer(pricingUl)) {return;}\n\n let statsUl = $(clearfix).find('ul.info-cont.list-wrap')[0];\n if (!validPointer(statsUl)) {return;}\n\n let newItem = getNewItem();\n\n //getNameTypeItemInfo(owlItem, newItem);\n //getPricingInfo(pricingUl, newItem);\n getStatInfo(statsUl, newItem);\n\n console.log(GM_info.script.name + ': newItem: ', newItem);\n\n\n }", "function ArticlesDetails() {\n}", "function setup(theDetails) {\n\n\n\t\tvar tmpPageName = theDetails.pagename || '';\n\t\tvar tmpAppName = theDetails.appname || '';\n\t\tvar tmpResName = theDetails.resname || '';\n\t\tvar tmpResType = theDetails.restype || '';\n\n\t\ttmpResType = ThisApp.controls.detailsIndex.getUnifiedName(tmpResType);\n\n\t\tvar tmpSource = tmpOptions.source || 'ws';\n\n\n\t\tvar tmpShowName = tmpResName.replace('.html', '')\n\t\t\t.replace('.json', '')\n\t\t\t.replace('.js', '')\n\n\t\tthis.setFieldValue('title', '[' + tmpResType + '] ' + tmpShowName);\n\n\t\tthis.details = {\n\t\t\tpagename: tmpPageName,\n\t\t\tsource: tmpSource,\n\t\t\ttitle: tmpShowName,\n\t\t\tappname: tmpAppName,\n\t\t\tresname: tmpResName,\n\t\t\trestype: tmpResType\n\t\t}\n\n\t\tthis.aceSessionType = \"ace/mode/javascript\"\n\t\tif (tmpResType == 'HTML' || tmpResType == 'Template' || tmpResType == 'html' || tmpResType == 'Templates') {\n\t\t\tthis.aceSessionType = \"ace/mode/html\"\n\t\t}\n\t\tthis.setupEditor();\n\n\t\tthis.refreshTabNav();\n\t\tthis.endpointURL = 'design/ws/resource-content?run&source=' + tmpSource + '&resname=' + tmpResName + '&restype=' + tmpResType;\n\t\tif (tmpPageName) {\n\t\t\tthis.endpointURL += '&pagename=' + tmpPageName;\n\t\t}\n\t\tif (tmpAppName) {\n\t\t\tthis.endpointURL += '&appname=' + tmpAppName;\n\t\t}\n\t\tthis.refreshFromSource();\n\n\n\n\n\t}", "presentation() {\n\t\tconsole.log('Le personnage s\\'appelle : ' + this.NAME);\n\t\tconsole.log('current ID : ' + this.ID);\n\t\tconsole.log('IMG : ' + this.IMG);\n\t\tconsole.log('DESC : ' + this.DESC);\n\t\tconsole.log(\"-----------\");\n\t}", "async function loadDetails() {\r\n try {\r\n setShow(true);\r\n\r\n const response = await api.get(`/etapas/${project._id}/${step._id}`, {\r\n headers: {\r\n authorization: `Bearer ${token}`\r\n }\r\n });\r\n\r\n const { data } = response;\r\n\r\n if (data) {\r\n setDetails(data.detalhes);\r\n\r\n StepCurrentAction({\r\n step: data\r\n });\r\n } else {\r\n setDetails([]);\r\n }\r\n\r\n setShow(false);\r\n } catch (err) {\r\n console.log('err ', err);\r\n setErr(true);\r\n }\r\n }", "constructor(details) {\n\t\tthis.details = details;\n\t}", "function showDetailHandler() {\n\t\t\t//delay creation of options to pretend quicker reaction\n\t\t\tExt.create('Ext.util.DelayedTask', function () {\n detail.fireEvent('showdetaildelayed');\n }).delay(150);\n\t\t}", "function displayDetail(indice)\n{\n RMPApplication.debug(\"displayDetail : indice = \" + indice);\n v_ol = var_order_list[indice];\n c_debug(dbug.detail, \"=> displayDetail: v_ol (mini) = \", v_ol);\n\n // we want all details for the following work order before showing on the screen\n var wo_query = \"^wo_number=\" + $.trim(v_ol.wo_number);\n var input = {};\n var options = {};\n input.query = wo_query;\n // var input = {\"query\": wo_query};\n c_debug(dbug.detail, \"=> displayDetail: input = \", input);\n id_get_work_order_full_details_api.trigger(input, options, wo_details_ok, wo_details_ko);\n\n RMPApplication.debug(\"end displayDetail\");\n}", "function doWork() {\n for (var i = 0; i < AllEvents.length; i++) {\n if (AllEvents[i][\"event_link\"] == \"#/event/\" + $route.current.params.eventname) {\n eventDetail.event = AllEvents[i];\n\n }\n } //for\n\n // console.log(eventDetail.event);\n // when user enters wrong url!\n if (eventDetail.event.description == undefined || eventDetail.event.description == null) {\n noDataFound();\n }\n }", "details(context) {\r\n let {\r\n id\r\n } = context.params\r\n\r\n models.Ideas.getSingle(id)\r\n .then((res) => {\r\n let currentIdea = docModifier(res)\r\n context.idea = currentIdea\r\n console.log(context.idea)\r\n //Check for author of cause! \r\n if (currentIdea.uid !== localStorage.getItem('userId')) {\r\n context.isAuthor = false;\r\n } else {\r\n context.isAuthor = true;\r\n }\r\n\r\n extend(context).then(function () {\r\n this.partial('../templates/cause/details.hbs')\r\n })\r\n })\r\n .catch((err) => console.error(err))\r\n }", "function infoObject(givenTopic, resultHandler) {\n //\n resultHandler.empty();\n var imgSrc = getImageSource(givenTopic);\n if (imgSrc != \"undefined\") {\n imgSrc = IMAGES_URL + imgSrc;\n // var imgWidth = jQuery(\"#sideBar\").css(\"width\");\n resultHandler.append('<img src=\"'+imgSrc+'\"/><br/>');\n }\n resultHandler.append('<b>'+givenTopic.name+'</b><br/>');\n // resultHandler.append('' + street + '<p/>');\n // stripping unwanted fields of the data container\n givenTopic = stripFieldsContaining(givenTopic, \"LAT\");\n givenTopic = stripFieldsContaining(givenTopic, \"LONG\");\n givenTopic = stripFieldsContaining(givenTopic, \"Locked Geometry\");\n givenTopic = stripFieldsContaining(givenTopic, \"Forum / Aktivierung\");\n givenTopic = stripFieldsContaining(givenTopic, \"Image\");\n givenTopic = stripFieldsContaining(givenTopic, \"Icon\");\n givenTopic = stripFieldsContaining(givenTopic, \"YADE\");\n // givenTopic = stripFieldsContaining(givenTopic, \"Stadt\");\n // givenTopic = stripFieldsContaining(givenTopic, \"Address\");\n givenTopic = stripFieldsContaining(givenTopic, \"Name\");\n givenTopic = stripFieldsContaining(givenTopic, \"Description\");\n givenTopic = stripFieldsContaining(givenTopic, \"Timestamp\");\n givenTopic = stripFieldsContaining(givenTopic, \"OriginId\");\n givenTopic = stripFieldsContaining(givenTopic, \"Administrator Infos\");\n var propertyList = '<p>'; //<table width=\"100%\" cellpadding=\"2\" border=\"0\"><tbody>';\n for (var i=0; i < givenTopic.properties.length; i++) {\n // propertyList += '<tr>';\n if (givenTopic.properties[i].label.indexOf(\"Sonstiges\") != -1) {\n // skipping: propertyList += '<p class=\"additionalInfoWhite\">';\n } else if (givenTopic.properties[i].label.indexOf(\"Administrator\") != -1) {\n // skipping: propertyList += '<p class=\"additionalInfo\">';\n } else if (givenTopic.properties[i].label == \"Barrierefrei\" || givenTopic.properties[i].value == \"\") {\n // skip rendering Barrierefrei-Field cause value was not set yet\n } else {\n propertyList += '<p><span class=\"propertyLabel\">'+givenTopic.properties[i].label+':&nbsp;</span>';\n }\n if (givenTopic.properties[i].type == 0) {\n if (givenTopic.properties[i].label.indexOf(\"Barrierefrei\") == -1) {\n // ordinary rendering for DM Property Type Single Value\n propertyList += '<span class=\"propertyField\">'+givenTopic.properties[i].value+'</span></p>';\n } else {\n // special rendering for the \"BARRIERFREE_ACCESS\"-Property\n if (givenTopic.properties[i].value == \"\") {\n // skip rendering Barrierefrei-Field cause value was not set yet\n } else if (givenTopic.properties[i].value == \"Ja\") {\n propertyList += '<b>Ja Rollstuhlgerecht</b></p>';\n } else if (givenTopic.properties[i].value.indexOf(\"Eingeschr\") != -1) {\n propertyList += '<b>Eingeschr&auml;nkt Rollstuhlgerecht</b></p>';\n } else if (givenTopic.properties[i].value == \"Nein\") {\n propertyList += '<b>Nicht Rollstuhlgerecht</b></p>';\n }\n }\n } else {\n // DM Property Type Multi Value\n propertyList += '<span class=\"propertyField\">';\n for ( var k=0; k < givenTopic.properties[i].values.length; k++ ) {\n stringValue = givenTopic.properties[i].values[k].name;\n var htmlValue = \"\";\n if (stringValue.startsWith(\"http://\")) {\n htmlValue = makeWebpageLink(stringValue, stringValue);\n } else if (stringValue.indexOf(\"@\") != -1) {\n htmlValue = makeEmailLink(stringValue, stringValue);\n } else {\n htmlValue = stringValue;\n }\n propertyList += '<br/><img style=\"border-style: none; vertical-align: middle;\" '\n + ' src=\"'+ICONS_URL+''+givenTopic.properties[i].values[k].icon+'\"/>&nbsp;' + htmlValue;\n }\n propertyList += '</span></p>';\n }\n propertyList += '</p>';\n }\n resultHandler.append(propertyList);\n //\n }", "function CommitsDetails() {\n\n}", "function showDetails(demo){\nconsole.log(`Name: ${demo.bookTitle}, price: ${demo.price} `)\n}", "handlegood(event) {\n const goodId = event.detail; \n console.log(goodId); \n // Navigate to product record page\n this[NavigationMixin.Navigate]({\n type: 'standard__recordPage',\n attributes: {\n recordId: goodId,\n objectApiName: 'Product__c',\n actionName: 'view',\n },\n });\n }", "function userinfo_dispatcher_routines() {\n\n\n}", "constructor( details = {} ){\n\t\tthis.name = details.name\n\t\tthis.actionProbability = details.actionProbability\n\t\tthis.isDefeated = details.isDefeated\n\t}", "function myDetails(){\r\nconsole.log(\"Name :\" + details.name); // prints Name on Console\r\nconsole.log(\"Age :\" + details.age); // prints Age on Console\r\nconsole.log(\"Date Of Birth :\" + details.dateOfBirth); // prints date of birth on Console\r\nconsole.log(\"Place Of Birth :\" + details[\"placeOfBirth\"]); // prints place of birth on Console\r\n \r\n /* Console.log functions for printing name, \r\n age, date of birth and place of birth*/\r\n }", "function createProductInfo() {\n getMediaInfo(); // get media information\n getCategoryInfo(); // get category information\n}", "obtain(){}", "function getDetailsSuccess(infoDetails) {\n // Call setup strip passing from info details only the path\n setupStrip(infoDetails.Path);\n }", "function getDetails(e, $row, id, record) {\n $('#feature-title').text(record.title);\n $('#feature-priority').text(record.client_priority);\n $('#feature-target-date').text(record.target_date);\n $('#feature-client').text(record.client);\n $('#feature-product-area').text(record.product_area_name);\n\t$('#feature-description').text(record.description);\n }", "showDetails(element)\n\t{\n\t\tthrow new Error(\"Not implemented\");\n\t}", "function directUserFromViewInfo() {\n if (nextStep == \"Departments\") {\n viewDepartments();\n }\n if (nextStep == \"Roles\") {\n viewRoles();\n }\n if (nextStep == \"Employees\") {\n viewEmployees();\n }\n if (nextStep == \"All Information\") {\n viewAll();\n } \n }", "displayInfo() {\n\t\t\tlet info = super.displayInfo() + ', менеджер: ' + this.manager.name ;\n\t\t\tconsole.log( info );\n\t\t\treturn info\n\t\t\t}", "helpData() {\n console.log(\"2) finsemble.bootConfig timeout values\");\n console.log(\"\\tstartServiceTimeout value\", this.startServiceTimeout);\n console.log(\"\\tstartComponentTimeout value\", this.startComponentTimeout);\n console.log(\"\\tstartTaskTimeout value\", this.startTaskTimeout);\n console.log(\"\");\n console.log(\"3) Current boot stage:\", this.currentStage);\n console.log(\"\");\n console.log(`4) Lastest/current status of dependencyGraph for ${this.currentStage} stage`, this.dependencyGraphs[this.currentStage].getCurrentStatus());\n console.log(\"\");\n console.log(\"5) Dependency graphs by stage\", this.dependencyGraphs);\n console.log(\"\");\n console.log(\"6) Boot config data by stage\", this.bootConfigs);\n console.log(\"\");\n console.log(\"7) Active Checkpoint Engines\", this.checkpointEngines);\n console.log(\"\");\n console.log(\"8) Registered tasks\", this.registeredTasks);\n console.log(\"\");\n console.log(\"9) List of outstanding start timers\", this.startTimers);\n console.log(\"\");\n console.log(\"10) Dependency graphs display by stage\");\n this.outputDependencyGraphs(this.dependencyGraphs);\n console.log(\"\");\n }", "function _got_info(data){\n\t\tvar mid = data['model_id'] || null;\n\t\tvar uid = data['user_id'] || '???';\n\t\tvar ucolor = data['user_color'] || '???';\n\t\tvar signal = data['signal'] || '???';\n\t\tvar intention = data['intention'] || '???';\n\t\tvar message = data['message'] || '???';\n\t\tvar message_type = data['message_type'] || '???';\n\n\t\t// Check to make sure it interestes us.\n\t\tif( ! mid || mid != anchor.model_id ){\n\t\t ll('skip info packet--not for us');\n\t\t}else{\n\t\t ll('received info');\n\t\t\n\t\t // Trigger whatever function we were given.\n\t\t if(typeof(on_info_event) !== 'undefined' && on_info_event){\n\t\t\ton_info_event(data, uid, ucolor);\n\t\t }\n\t\t}\n\t }", "handleDetailsClick() {\n const property = this.props.property;\n const img = this.state.image;\n this.props.getProperty(property, img);\n this.props.changeView('details')\n }", "function informationHandler(event)\n\t\t{\n\t\t\tg.informe();\n\t\t\thideButtons(this);\n\t\t}", "function OptionDetailsComponent() {\n }", "function redactInfo (obj) {\n \n}// CODE HERE", "function contract_detail(request, response, next) {\n console.log('Contract detail');\n}", "function getEventDetails () { \n\tif (eventIndex == undefined) { // displayed when there is no event at current day\n\t\tdocument.getElementById(\"description\").style.visibility = \"hidden\"; // hide the HTML details\n\t\tdocument.getElementById(\"currentPhoto\").setAttribute(\"src\", \"NoEvent.jpg\"); // display \"no event\" picture\n\t} else { // finding details about event and displaying it\n\t\tdocument.getElementById(\"description\").style.visibility = \"visible\"; // show HTML details\n\t\t// set displayed details based on the information in the pseudo data base\n\t\tdocument.getElementById(\"startingTime\").innerHTML = eventsToDisplay[eventIndex].startingTime;\n\t\tdocument.getElementById(\"endingTime\").innerHTML = eventsToDisplay[eventIndex].endingTime;\n\t\tdocument.getElementById(\"title\").innerHTML = eventsToDisplay[eventIndex].title;\n\t\tdocument.getElementById(\"eventDescription\").innerHTML = eventsToDisplay[eventIndex].eventDescription;\n\t\tdocument.getElementById(\"place\").innerHTML = eventsToDisplay[eventIndex].place;\n\t\tdocument.getElementById(\"currentPhoto\").setAttribute(\"src\", eventsToDisplay[eventIndex].imgSource);\n\t}\n}", "getDetails () {\n return {\n isDummy: true,\n turns: this.turns,\n currentTurn: this.currentTurn,\n status: this.status,\n lastRoll: this.lastRoll,\n isDiceRolled: this.isDiceRolled,\n hostId: this.hostId,\n cells: this._cells,\n players: this._players,\n didEatEnemyCoin: this._didEatEnemyCoin,\n coinJustReachedEnd: this._coinJustReachedEnd,\n noSelectionPossible: this._noSelectionPossible\n }\n }", "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}", "viewListInfo(){\n console.log(`${this.listName} List. Due : ${this.listDue}. Complete : ${this.isListComplete}. Number of tasks : ${this.tasks.length}.`);\n }", "function main() {\n let addBttn = document.getElementById(\"addSpec\");\n let removeBttn = document.getElementById(\"remove\");\n let uploadBttn = document.getElementById(\"upload\");\n let resetBttn = document.getElementById(\"newSpec\");\n uploadBttn.addEventListener(\"click\", saveInformation);\n addBttn.addEventListener(\"click\", addSpec);\n removeBttn.addEventListener(\"click\", updateList);\n resetBttn.addEventListener(\"click\", killList);\n\n fetch((URL + \"?info=true\"))\n .then(checkStatus)\n .then(JSON.parse)\n .then(function(data) {\n if(data != \"No data\") {\n let container = document.getElementById(\"requirements\");\n let requirements = data.requirements;\n reqs = data.requirements;\n createSection(\"\");\n }\n })\n .catch(reportError);\n }", "function SPGetdetails()\r\n{\r\n\tdebugger;\r\n\t$(\"#detailscls\").removeClass(\"active\");\r\n\t$(\"#historycls\").addClass(\"active\");\r\n\t\r\n\t$(\"#informationid\").empty()\t;\r\n\t$(\"#emailid\").empty();\r\n\t$(\"#departmntid\").empty();\r\n\t$(\"#detialsdiv\").hide() ;\r\n\t\t\r\n\tGetALLlibraryItems(SPDocudetailsId,DocumentlistName, siteurl,GetALLlibraryItemsSuccess,GetALLlibraryItemsFailure);\r\n\t}", "Information(){\n console.log(`Make: ${this.make}, Model: ${this.model}, Year: ${this.year}, Color: ${this.color}`);\n }", "function processInfoFromDb(resultFromDb) {\n var albums = processAlbumInfo(resultFromDb)\n processArtistInfo(albums)\n if ($scope.mainContent && !$scope.loading) {\n showMainContent()\n }\n }", "function fetchInfo() {\n $scope.showProcessing = true;\n var url = apiPath + \"profile.php\";\n mediasoftHTTP.actionProcess(url, [{\n user_id: $rootScope.selectedID,\n type: 'users',\n\n }])\n .success(loadInfoSuccess)\n .error(loadError);\n }", "function viewInformation() {\n inquirer\n .prompt({\n name: \"action\",\n type: \"rawlist\",\n Message: \"WHAT INFORMATION WOULD YOU LIKE TO DISPLAY?\",\n choices: [\"VIEW department\", \"VIEW role\", \"VIEW employee\"],\n })\n //==================IF YOU WANT TO VIEW THE DEPARTMENT===========\n .then(function (answer) {\n switch (answer.action) {\n case \"VIEW department\":\n viewDepartment();\n break;\n //========IF YOU WANT TO VIEW THE ROLE=============\n case \"VIEW role\":\n viewRole();\n break;\n //========IF YOU WANT TO VIEW THE EMPLOYEE===========\n case \"VIEW employee\":\n viewEmployee();\n break;\n }\n });\n}", "initializeDetails() {\n return new Promise((resolve, reject) => {\n this.rl.question(\"Tranche id: \", (tranche) => {\n this.tranche = tranche;\n if (!this.tranche) return reject(\"Tranche id is required.\");\n this.rl.question(\"Account: \", (account) => {\n this.account = account;\n if (!this.web3.utils.isAddress(account)) {\n this.account = this.accounts[account];\n }\n if (!this.web3.utils.isAddress(this.account)) return reject(\"Invalid account address.\");\n \n resolve();\n });\n });\n }); \n }", "detailAction() {}", "async createAboutObject() {\n return this.aic.getAboutData();\n }", "static get_info() { \n\treturn {\n\t id : id , \n\t rules : [ \"shutdown\" , \"shut down\" , \"exit program\", \"goodbye\"], \n\t}\n }", "enterModelInfoDefinition(ctx) {\n\t}", "function trapItemDetails(observer) {\n if (doingBazaarMaintainance()) {\n if ($('#xedx-main-div').length > 0) {\n $(targetNode).unbind('DOMNodeInserted');\n $('#xedx-main-div').remove();\n }\n return;\n }\n buildUI(); // If needed...\n\n let parentDiv = isBazaar ? $('div.ReactVirtualized__Grid').get() : itemsGetActiveClass();\n if (!validPointer(parentDiv) || !parentDiv.length) {return;}\n\n let owlItem = isBazaar ? $(parentDiv).find('div.info___3-0WL').get() :\n $(parentDiv).find('li.show-item-info.bottom-round').get();\n if (!owlItem.length || !validPointer(owlItem)) {return;}\n\n let clearfix = $(owlItem).find('div.info-content > div.clearfix.info-wrap')[0];\n if (!validPointer(clearfix)) {return;}\n\n let pricingUl = $(clearfix).find('ul.info-cont')[0];\n if (!validPointer(pricingUl)) {return;}\n\n let statsUl = $(clearfix).find('ul.info-cont.list-wrap')[0];\n if (!validPointer(statsUl)) {return;}\n\n let newItem = getNewItem();\n\n // We give a unique ID to a root node that persists (I hope)\n // to prevent doing this more than once. We also hash the\n // resulting object to prevent array insertion more than once\n // in case this fails for whatever reason. The hash value is\n // saved in a separate array.\n if (isItemTagged(pricingUl, newItem)) {return;}\n\n getNameTypeItemInfo(owlItem, newItem);\n getPricingInfo(pricingUl, newItem);\n getStatInfo(statsUl, newItem);\n\n console.log('newItem: ', newItem);\n\n // Generate a unique hash value for this, so as not to add twice.\n // Should never get here if already added.\n // The hash can't be part of the data, for obvious reasons - at\n // least not when calculating the hash. But we can add it to be saved\n // into the spreadsheet, to prevent inserting duplicates, if you go to the\n // same place twice by mistake.\n let jsonData = JSON.stringify(newItem);\n let hash = jsonData.hashCode();\n\n console.log('Hashcode for the ' + newItem.name + ': ' + hash);\n if (!detectedItemsHashTable.includes(hash)) {\n detectedItemsHashTable.push(hash);\n\n // We add the hash value to the item immediately before pushing onto our array.\n // This allows it to be recorded by the Google Sheets script, to prevent\n // duplicates from being inserted into the sheet.\n newItem.hash = hash.toString();\n detectedItemsArray.push(newItem);\n console.log('Pushed a \"' + newItem.name + '\" onto array');\n\n // Check for really good weapons - based just on quality.\n // Shuld also use the (acc+def) /100 (?) method.\n let q = newItem.quality;\n let end = q.indexOf('%');\n let n = q.slice(0, end-1);\n if (parseInt(n) > 90) {\n alert('This ' + newItem.name + ' has a quality rating of ' + newItem.quality + ' !');\n }\n\n if (INSTANT_UPLOAD) {\n submitFunction();\n }\n }\n }", "function kp() {\n $log.debug(\"TODO\");\n }", "helpData() {\n console.log(\"1) finsemble.bootConfig onErrorMakeSystemManagerVisible:\", this.onErrorMakeSystemManagerVisible);\n console.log(\"\");\n this.bootEngine.helpData();\n return (\"helpData complete\"); // for cleaner console output\n }", "help() {\nlet helpData = getHelpData();\nlet keywords = Object.keys(helpData.keywords);\nlet ids = null;\nthis._help = this._help.toUpperCase();\nfor (let i = 0; i < keywords.length; i++) {\nif (keywords[i].toUpperCase().indexOf(this._help) !== -1) {\nids = helpData.keywords[keywords[i]];\n}\n}\nif (!ids) {\nreturn;\n}\nlet id = ids[0];\nlet item = null;\nif (id in helpData.subjectById) {\nitem = helpData.subjectById[id];\n} else if (id in helpData.sectionById) {\nitem = helpData.sectionById[id];\n}\nif (!item) {\nreturn;\n}\ndispatcher.dispatch(\n'Dialog.Help.Show',\n{\nkeyword: this._help,\nfileIndex: item.fileIndex\n}\n);\n}", "hent() {\n // Bruker b_id'en til å hente infor om bestillingen\n s_bestilling.InfoBestilling(this.b_id, valgt => {\n this.valgt = valgt;\n });\n // Bruker b_id'en til å hente info om varene i bestillingen\n s_bestilling.InfoBestillingVarer(this.b_id, varer => {\n this.varer = varer;\n });\n this.visInfoPop();\n }", "function dataHandler() { //TODO Add properties to info Card **************\n const routeData = data.route;\n for (const item in routeData) {\n if (item.includes(day)) {\n const routeItems = data.route[item];\n for (const key in routeItems) {\n const keys = routeItems[key];\n if ((keys.name).includes(title)) {\n event.push(keys.label, keys.score, keys.imageURL, keys.intro)\n return\n }\n }\n }\n }\n }", "function aboutSetup(){\n\n}", "handleDetailsChange (e) {\n\t this.props.handleDC(e.target.value);\n \t}", "function _history_convert_detail(data)\n{\n\tdetail = '';\n\tswitch(data.action_type)\n\t{\n\t\tcase 'create':\n\t\t\tdetail = '<div style=\"padding:5px;width:100%;word-break:break-all;\">신규 등록</div>';\n\t\t\tbreak;\n\t\tcase 'df_subject':\n\t\tcase 'tc_subject':\n\t\t\tdetail = '<div style=\"padding:5px;width:100%;word-break:break-all;\"> 제목을 \"<font color=blue>' + data.old_value + '</font>\" 에서 \"<font color=red>' + data.value + '</font>\" (으)로 변경.</div>';\n\t\t\tbreak;\n\t\tcase 'df_description':\n\t\tcase 'tc_description':\n\t\t\tvar div_id = 'history_' + (Math.round(Math.random() * 10000) + 1);\n\t\t\tdetail = '<div style=\"padding:5px;width:100%;word-break:break-all;\">'+\n\t\t\t\t'설명 변경 : <input type=button value=\"view\" onclick=\"javascript:document.getElementById(\\''+div_id+'\\').style.display=\\'block\\';\"><br>'+\n\t\t\t\t'<div id=\"'+div_id+'\" style=\"display:none;\"><input type=button value=\"close\" onclick=\"javascript:document.getElementById(\\''+div_id+'\\').style.display=\\'none\\';\"><br>' + data.value + '</div></div>';\n\n\t\t\tdetail = '<div style=\"padding:5px;width:100%;word-break:break-all;\">'+'설명 변경 : <br>'+ data.value + '</div>';\n\t\t\tbreak;\n\t\tcase 'df_status':\n\t\t\tif(data.old_value && data.value){\n\t\t\t\tvar old_value = defect_code_store.findRecord('pco_seq', data.old_value).get('pco_name');\n\t\t\t\tvar value = defect_code_store.findRecord('pco_seq', data.value).get('pco_name');\n\t\t\t\tdetail = '<div style=\"padding:5px;width:100%;word-break:break-all;\"> 상태를 <font color=blue>' + old_value + '</font> 에서 <font color=red>' + value + '</font> (으)로 변경.</div>';\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'df_severity':\n\t\t\tvar old_value = defect_code_store.findRecord('pco_seq', data.old_value).get('pco_name');\n\t\t\tvar value = defect_code_store.findRecord('pco_seq', data.value).get('pco_name');\n\t\t\tdetail = '<div style=\"padding:5px;width:100%;word-break:break-all;\"> 심각도를 <font color=blue>' + old_value + '</font> 에서 <font color=red>' + value + '</font> (으)로 변경.</div>';\n\t\t\tbreak;\n\t\tcase 'df_priority':\n\t\t\tvar old_value = defect_code_store.findRecord('pco_seq', data.old_value).get('pco_name');\n\t\t\tvar value = defect_code_store.findRecord('pco_seq', data.value).get('pco_name');\n\t\t\tdetail = '<div style=\"padding:5px;width:100%;word-break:break-all;\"> 우선순위를 <font color=blue>' + old_value + '</font> 에서 <font color=red>' + value + '</font> (으)로 변경.</div>';\n\t\t\tbreak;\n\t\tcase 'df_frequency':\n\t\t\tvar old_value = defect_code_store.findRecord('pco_seq', data.old_value).get('pco_name');\n\t\t\tvar value = defect_code_store.findRecord('pco_seq', data.value).get('pco_name');\n\t\t\tdetail = '<div style=\"padding:5px;width:100%;word-break:break-all;\"> 재현빈도를 <font color=blue>' + old_value + '</font> 에서 <font color=red>' + value + '</font> (으)로 변경.</div>';\n\t\t\tbreak;\n\t\tcase 'df_start_date':\n\t\t\tdata.old_value = data.old_value.substring(0, 10);\n\t\t\tif(data.old_value == '0000-00-00'){\n\t\t\t\tdetail = '<div style=\"padding:5px;width:100%;word-break:break-all;\"> 시작일을 <font color=red>' + data.value + '</font> 로 변경.</div>';\n\t\t\t}else{\n\t\t\t\tdetail = '<div style=\"padding:5px;width:100%;word-break:break-all;\"> 시작일을 <font color=blue>' + data.old_value + '</font> 에서 <font color=red>' + data.value + '</font> 로 변경.</div>';\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'df_end_date':\n\t\t\tdata.old_value = data.old_value.substring(0, 10);\n\t\t\tif(data.old_value == '0000-00-00'){\n\t\t\t\tdetail = '<div style=\"padding:5px;width:100%;word-break:break-all;\"> 종료일을 <font color=red>' + data.value + '</font> 로 변경.</div>';\n\t\t\t}else{\n\t\t\t\tdetail = '<div style=\"padding:5px;width:100%;word-break:break-all;\"> 종료일을 <font color=blue>' + data.old_value + '</font> 에서 <font color=red>' + data.value + '</font> 로 변경.</div>';\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'df_assign':\n\t\t\tdetail = '<div style=\"padding:5px;width:100%;word-break:break-all;\">담당자를 <font color=blue>'+data.mb_name+'</font> (으)로 지정.</div>';\n\t\t\tbreak;\n\t\tcase 'df_file':\n\t\tcase 'tc_file':\n\t\t\tdetail = '<div style=\"padding:5px;width:100%;word-break:break-all;\">파일 등록 : ' +data.value+ '</div>';\n\t\t\tbreak;\n\t\tcase 'df_project_copy':\n\t\tcase 'tc_project_copy':\n\t\t\tdetail = '<div style=\"padding:5px;width:100%;word-break:break-all;\"> '+data.old_value+'번 프로젝트에서 복사해 왔습니다.</div>';\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tif(!data.old_value || data.old_value == ''){\n\t\t\t\tdetail = '<div style=\"padding:5px;width:100%;word-break:break-all;\"> '+data.action_type+' 을(를) \"<font color=red>' + data.value + '</font>\" (으)로 변경.</div>';\n\t\t\t}else{\n\t\t\t\tdetail = '<div style=\"padding:5px;width:100%;word-break:break-all;\"> '+data.action_type+' 을(를) \"<font color=blue>' + data.old_value + '</font>\" 에서 \"<font color=red>' + data.value + '</font>\" (으)로 변경.</div>';\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'tracking_tc':\n\t\tcase 'tracking_df':\n\n\t\t\tdetail = '<div style=\"padding:5px;width:100%;word-break:break-all;\"> ';\n\n\t\t\tif(data.action_type == 'tracking_tc'){\n\t\t\t\tdetail += '결함 ('+data.old_value+') 을(를)';\n\t\t\t}else if(data.action_type == 'tracking_df'){\n\t\t\t\tdetail += '테스트케이스 ('+data.old_value+') 을(를)';\n\t\t\t}\n\n\t\t\tif(data.value == 'set_link'){\n\t\t\t\tdetail += ' <font color=blue> '+Otm.com_msg_connected+'</font> </div>';\n\t\t\t}else if(data.value == 'set_unlink'){\n\t\t\t\tdetail += ' <font color=red> '+Otm.com_msg_disconnected+'</font> </div>';\n\t\t\t}\n\t\t\tbreak;\n\t}\n\n\tif(data.action_type !='create' && data.value == ''){\n\t\treturn '';\n\t}\n\n\treturn detail;\n}", "getDetails(){\n return [ this.search,\n this.cost,\n this.state,\n this.children]\n }", "function showDetails({bookTitle, price}){\n console.log(`Name: ${bookTitle}, price: ${price} `)\n }", "function showDetails($vp) {\n var state = requests.getState();\n $('#processing').html(Object.keys(state.processingHosts).length);\n $('#queued').html(Object.keys(state.queuedHosts).length);\n $('#processed').html(Object.keys(state.allHops).length);\n\n if (freeze) {\n return;\n }\n\n var toshow, t, table = '<table><tr>', tdata = '', c;\n switch ($('#toView').val()) {\n case 'processing':\n toshow = processing;\n break;\n case 'completed':\n toshow = completed;\n break;\n default:\n toshow = $.extend({}, processing, completed);\n }\n\n $vp.html('');\n for (t in toshow) {\n c = (processing[t] ? 'processing' : 'completed');\n table += '<th class=\"' + c + '\">' + t + '</th>';\n var update = toshow[t];\n tdata += '<td class=\"' + c + '\">' + (\n $('#traceView').val() === 'details' ? summarizeUpdate(update)\n : '<pre>' + update.buffer + '</pre>'\n ) + '</td>';\n }\n $vp.append(table + '</tr><tr>' + tdata + '</tr></table>');\n }", "function _renderDetails(data, type) {\n return tsoc.renderDetails(\n '/soc/' + gSoc + '/job/' + gJob + '/kernel/' + data, type);\n }", "* detailsPrint (request, response) {\n const categories = yield Category.all(),\n result = yield Result.get(request.param('id')),\n user = yield request.auth.getUser(),\n type = request.input('type'),\n date = moment().format('YYYY-mm-DD hh:mm:ss')\n\n result.sortCandidates((a, b) => {\n return result.getJudgesAverage(b.id) - result.getJudgesAverage(a.id)\n })\n\n if (type == 'winner') {\n result.sliceTop(1)\n }\n\n if (type == 'top-5') {\n result.sliceTop(5)\n }\n\n yield response.sendView('dashboard/score/details_print', {\n categories, result, user, date\n })\n }", "function printDetailsModified() {\n\treturn `${this.name} (${this.type}) - ${this.age}`;\n}", "getProductInfo() {\n // some magic code\n }", "function storeBookInfo() {\n}", "async detailsStep(stepContext) {\n const incidentDetails = stepContext.options;\n\n // Capture the results of the previous step\n incidentDetails.requester = stepContext.result;\n\n if (incidentDetails.details == '' || stepContext.options.restartMsg == 'restart') {\n const messageText = 'Please describe the issue or request.';\n const msg = MessageFactory.text(messageText, messageText, InputHints.ExpectingInput);\n return await stepContext.prompt(TEXT_PROMPT, { prompt: msg });\n }\n return await stepContext.next(incidentDetails.details, incidentDetails.priority);\n }", "static main() {\n let p = new Person();\n const detail = p.getPersonDetail();\n console.log(detail);\n }", "enterModelInfoSection(ctx) {\n\t}", "function zoto_detail_meta_info(options) {\n\tthis.options = options || {};\n\tthis.options.mode = this.options.mode || 'page'; // 'page' or 'modal'\n\n\t/*\n\t * Create our page elements\n\t */\n\tvar desc_epaper_options = {'attribute': \"description\", 'multi_line': 1, 'starting_text': _(\"click here to add a photo description.\")};\n\tvar tag_cloud_options = {'can_delete': true, 'weighted': false};\n\tif(this.options.mode == 'modal') {\n\t\tdesc_epaper_options['maxchar'] = 300;\n\t\ttag_cloud_options['tag_count'] = 15;\n\t} else {\n\t\tthis.modal_licensing = new zoto_modal_licensing(this.options.mode);\n\t\tthis.a_edit_license = A({'href':\"javascript:void(0)\"}, \"edit\");\n\t\tthis.edit_license = SPAN({'style':\"font-size: 9px;\"}, \" (\", this.a_edit_license, \")\");\n\t}\n\tthis.title_epaper = new zoto_e_paper_lite({'id': \"title_epaper\", 'blur_update': true, 'attribute': \"title\", 'starting_text': _(\"click here to add a title\")});\n\tthis.description_epaper = new zoto_e_paper_image_attributes(desc_epaper_options);\n\tthis.tags_header = DIV({'style': \"margin-bottom: 3px\"}, H3({}, _('tags')));\n\tthis.look_ahead = new zoto_tag_lookahead({min_length: 3, allow_spaces: true});\n\tthis.tag_cloud = new zoto_image_tag_cloud(tag_cloud_options);\n\n\t//replaceChildNodes(this.albums_header, H3({'style': \"margin-top: 10px;\"}, _(\"albums\")));\n\t//this.albums_header = DIV({'syle': \"margin-bottom: 10px; margin-top: 10px;\"});\n\tthis.albums_header = H3({'style': \"margin-top: 10px;\"}, _(\"albums\"));\n\tthis.album_list = SPAN({}, \"\");\n\n\t//\n\t// Advanced info\n\t//\n\tthis.perms = SPAN({});\n\tthis.license_text = SPAN({}, \"\");\n\n\tthis.date_taken_link = A({'href': \"javascript: void(0);\"}, \"\");\n\tthis.date_taken = SPAN({});\n\tthis.date_taken_holder = SPAN({}, _('taken: '), this.date_taken);\n\n\tthis.date_uploaded = SPAN({});\n\tthis.date_uploaded_holder = SPAN({}, _(\"uploaded: \"), this.date_uploaded);\n\t\t\n\t/* Advanced info */\n\tvar advanced = DIV({'style': \"margin-top: 5px\"},\n\t\tH3({}, _('advanced info')),\n\t\tthis.perms,\n\t\tthis.license_text, BR({'clear':\"ALL\"}),\n\t\tthis.date_taken_holder, BR({'clear':\"ALL\"}),\n\t\tthis.date_uploaded_holder, BR()\n\t);\n\n\tif (this.options.mode == \"page\") {\n\t\n\t\tthis.filename = SPAN({});\n\t\tthis.filename_holder = SPAN({}, _(\"filename\"), ': ', this.filename, BR());\n\t\n\t\tthis.source_name = SPAN({});\n\t\tthis.source_name_holder = SPAN({}, _(\"uploaded via\"), \": \", this.source_name, BR());\n\t\n\t\tthis.camera_make = SPAN({});\n\t\tthis.camera_make_holder = SPAN({}, _(\"make\"), \": \", this.camera_make, BR());\n\t\n\t\tthis.camera_model = SPAN({});\n\t\tthis.camera_model_holder = SPAN({}, _(\"model\"), \": \", this.camera_model, BR());\n\t\n\t\tthis.iso_speed = SPAN({});\n\t\tthis.iso_speed_holder = SPAN({}, _(\"iso speed\"), \": \", this.iso_speed, BR());\n\t\n\t\tthis.focal_length = SPAN({});\n\t\tthis.focal_length_holder = SPAN({}, _(\"focal length\"), \": \", this.focal_length, BR());\n\t\n\t\tthis.fstop = SPAN({});\n\t\tthis.fstop_holder = SPAN({}, _(\"f-stop\"), \": \", this.fstop, BR());\n\t\n\t\tthis.exposure_time = SPAN({});\n\t\tthis.exposure_time_holder = SPAN({}, _(\"exposure time\"), \": \", this.exposure_time, BR());\n\t\n\t\tvar extra_advanced = DIV({id: 'extra_advanced'}, \n\t\t\tthis.filename_holder,\n\t\t\tthis.source_name_holder,\n\t\t\tthis.camera_make_holder,\n\t\t\tthis.camera_model_holder,\n\t\t\tthis.iso_speed_holder,\n\t\t\tthis.focal_length_holder,\n\t\t\tthis.fstop_holder,\n\t\t\tthis.exposure_time_holder\n\t\t);\n\t\tappendChildNodes(advanced, extra_advanced);\n\t\tthis.advanced_link = element_opener(extra_advanced, _(\"view all advanced info\"), _(\"hide advanced info\"));\n\t} else {\n\t\tthis.advanced_link = A({'href': \"javascript: void(0);\"}, _(\"more\"));\n\t}\n\tappendChildNodes(advanced, this.advanced_link);\n\n\tthis.el = DIV({id: 'meta_holder'},\n\t\tthis.title_epaper.el,\n\t\tthis.description_epaper.el,\n\t\tthis.tags_header,\n\t\tthis.look_ahead.el,\n\t\tthis.tag_cloud.el,\n\t\tthis.albums_header,\n\t\tthis.album_list,\n\t\tadvanced\n\t);\n\t\n\tconnect(this.title_epaper, 'EPAPER_EDITED', this, 'handle_edit');\n\tconnect(this.title_epaper, 'IMAGE_ATTRIBUTE_CHANGED', this, function(new_value) {\n\t\tthis.info.title = new_value;\n\t});\n\tconnect(this.tag_cloud, 'TAG_CLICKED', this, function(tag_name) {\n\t\tsignal(this, 'TAG_CLICKED', tag_name);\n\t});\n\tconnect(this.description_epaper, 'IMAGE_ATTRIBUTE_CHANGED', this, function(new_value) {\n\t\tthis.info.description = new_value;\n\t});\n\tconnect(this.look_ahead, 'NEW_TAG_ADDED', this.tag_cloud, 'refresh');\n\tconnect(this.look_ahead, 'NEW_TAG_ADDED', this, function(){\n\t\tsignal(this, 'NEW_TAG_ADDED');\n\t});\n\tconnect(authinator, 'USER_LOGGED_IN', this, 'update');\n\tconnect(this.date_taken_link, 'onclick', this, function(e) {\n\t\tsignal(this, 'DATE_CLICKED', this.info.date);\n\t});\n\n\tif (this.options.mode == \"page\") {\n\t\tconnect(this.a_edit_license, 'onclick', this, function(e){\n\t\t\tthis.modal_licensing.handle_image_detail_click(this.media_id)\n\t\t});\n\t\tconnect(this.modal_licensing, \"LICENSE_UPDATED\", this, function(result){\n\t\t\tthis.info.license = Number(result);\n\t\t\tthis.update();\n\t\t});\n\t} else {\n\t\tconnect(this.advanced_link, 'onclick', this, function(e) {\n\t\t\tcurrentDocument().modal_manager.move_zig();\n\t\t\tcurrentWindow().site_manager.update(this.info.owner_username, 'detail', this.media_id);\n\t\t});\n\t\tconnect(this.description_epaper, 'MORE_CLICKED', this, function(e) {\n\t\t\tcurrentDocument().modal_manager.move_zig();\n\t\t\tcurrentWindow().site_manager.update(this.info.owner_username, 'detail', this.media_id);\n\t\t});\n\t\tconnect(this.tag_cloud, 'MORE_CLICKED', this, function(e) {\n\t\t\tcurrentDocument().modal_manager.move_zig();\n\t\t\tcurrentWindow().site_manager.update(this.info.owner_username, 'detail', this.media_id);\n\t\t});\n\t}\n\n\tthis.a_cc_icon_attribution = this.create_license_icon(\n\t\t['attribution'], \"by\");\n\tthis.a_cc_icon_noderivs = this.create_license_icon(\n\t\t['attribution', 'noderivs'], \"by-nd\");\n\tthis.a_cc_icon_noncomm_noderivs = this.create_license_icon(\n\t\t['attribution', 'noderivs', 'noncomm'], \"by-nc-nd\");\n\tthis.a_cc_icon_noncomm = this.create_license_icon(\n\t\t['attribution', 'noncomm'], \"by-nc\");\n\tthis.a_cc_icon_noncomm_sharealike = this.create_license_icon(\n\t\t['attribution', 'noncomm', 'sharealike'], \"by-nc-sa\");\n\tthis.a_cc_icon_sharealike = this.create_license_icon(\n\t\t['attribution', 'sharealike'], 'by-sa');\n}", "function PageOrchestrator() {\n\n\t\t//create all object that manages the page behaviour\n\t\tvar alertContainer = document.getElementById(\"alertMessage\");\n\t\tthis.start = function() {\n\n\t\t\tvar personalMessage = new PersonalMessage(sessionStorage.getItem('username'),\n\t\t\t\tdocument.getElementById(\"personalMessage\"));\n\t\t\tpersonalMessage.show();\n\n\t\t\talbumList = new AlbumsList(\n\t\t\t\talertContainer,\n\t\t\t\tdocument.getElementById(\"albumsContainer\"),\n\t\t\t\tdocument.getElementById(\"albumsBody\"),\n\t\t\t\tdocument.getElementById(\"albumsExternalContainer\")\n\t\t\t\t);\n\n\t\t\ttitleLine = new AlbumTitleLine(document.getElementById(\"albumTitleLine\"),\n\t\t\t\tdocument.getElementById(\"albumTitle\"), albumList, null);\n\t\t\ttitleLine.reset(); //hide album title line\n\n\t\t\timagesList = new ImagesList(\n\t\t\t\talertContainer,\n\t\t\t\ttitleLine,\n\t\t\t\tdocument.getElementById(\"imagesContainer\"),\n\t\t\t\tdocument.getElementById(\"imagesBody\"));\n\t\t\t\n\n\t\t\ttitleLine.imageList = imagesList; //set image list to titleLine\n\n\t\t\ttitleLine.setReturnToAlbums();\t //initialize return to albums button\n\n\t\t\timagesList.setPaginationButtons(); //initialize pagination buttons\n\n\t\t\timageDetails = new ImageDetails(\n\t\t\t\t\talertContainer, \n\t\t\t\t\tdocument.getElementById(\"modalImageContainer\"),\n\t\t\t\t\tdocument.getElementById(\"modalImageBody\"));\n\t\t\t\n\t\t\tdocument.getElementById(\"logoutButton\").addEventListener('click', () => {\n\t\t sessionStorage.clear();\n\t\t })\n\t\t};\n\n\t\t//bring page to default state\n\t\tthis.refresh = function() {\n\t\t\talertContainer.textContent = \"\\u00BB\";\n\t\t\timagesList.reset();\n\t\t\talbumList.show();\n\t\t\t//imageDetails.reset();\n\t\t};\n\t}", "function userinfo_requester_routines() {\n\n}", "function loadOttorInformation() {\n console.log ('Checking if this is a property page');\n if ($('.propertyDetails').length == 0) {\n console.log('...its not so do nothing');\n } else { \n removeJunk();\n stripOutDetails(); \n loadPropertyDetails();\n } \n}", "function setJobDescrInfo(data) {\n // TODO: move this global to getChanData success\n currentRole = data.role;\n\n // insert asignment basic info to rpoper places\n $(creatorNameElement).html(data.creator_name);\n $(jobDateElement).html(data.job_date);\n $(subjectElement).text(data.subject);\n $(langFromElement).html(data.lang_from);\n $(langToElement).html(data.lang_to);\n $(qualificationElement).html(data.qualification);\n $(startDateElement).html(data.formated_date);\n $(genderElement).html(data.gender);\n $(startTimeElement).html(data.start_time);\n $(finishTimeElement).html(data.finish_time);\n\n // make appropriate job type block visible\n // remove all unappropriate job type blocks\n switch (data.job_type) {\n case 0: // video assignment\n $(jobTypeContVideo).removeClass(exampleClass);\n $(jobTypeContExample).remove();\n break\n case 1: // phone assignment\n $(jobTypeContPhone).removeClass(exampleClass);\n $(jobTypeContExample).remove();\n break\n case 2: // in person assignment\n // if job type is in person assignment we fill in location details and create map\n $(jobTypeContMeeting).removeClass(exampleClass);\n $(jobTypeContExample).remove();\n $(contactPersonElement).text(data.contact_person);\n $(phoneNumberElement).text(data.phone_number);\n $(locationElement).text(data.location);\n $(extraInfoElement).text(data.extra_info);\n showMapSnippet(data.location, data.lat, data.long);\n break\n case 3: // hub assignment\n // if job has hub type we check user role\n // if current user is interpreter we show info like on in person assignment (address, map etc)\n if (currentRole === 1) {\n $(jobTypeContHubInter).removeClass(exampleClass);\n $(jobTypeContExample).remove();\n $(contactPersonElement).text(data.contact_person);\n $(phoneNumberElement).text(data.phone_number);\n $(locationElement).text(data.location);\n $(extraInfoElement).text(data.extra_info);\n showMapSnippet(data.location, data.lat, data.long);\n } else {\n // if current user is business we show only hub tyle text (without address and map)\n $(jobTypeContHubBusiness).removeClass(exampleClass);\n $(jobTypeContExample).remove();\n }\n \n break\n };\n\n\n // check presence of call details for this assignment (appear only after reward before the call)\n if (data.call_details) {\n // if current user is interpreter and job type is hub type we don't show him call details\n if (currentRole === 1 && data.job_type === 3) {\n $(sessionDetailsCont).remove();\n } else {\n // if current user is interpreter we show phone details\n if (data.job_type === 1) {\n $(sessionPhoneNumber).text(data.call_details.phone_number);\n $(sessionPhoneBooking).text(data.call_details.phone_booking);\n $(sessionPhonePin).text(data.call_details.phone_pin);\n } else {\n // if user is business we remove block with phone details\n $(sessionPhoneBlock).remove();\n }\n // then we fill in call details blocks with appropriate info\n $(sessionDesktopLinkAddress).text(data.call_details.hostname);\n $(sessionDesktopLinkAddress).attr(\"href\", data.call_details.link_to_desktop);\n $(sessionSipAddress).text(data.call_details.sip_address);\n $(sessionSipBooking).text(data.call_details.sip_booking);\n $(sessionSipPin).text(data.call_details.sip_pin);\n $(sessionLyncAddress).text(data.call_details.lync_address);\n $(sessionLyncPin).text(data.call_details.lync_pin);\n $(sessionDetailsCont).removeClass(exampleClass);\n }\n } else {\n // if server hasn't provided us with call info we remove call info block\n $(sessionDetailsCont).remove();\n }\n\n if ((data.attenders && data.attenders.length > 0) && (data.permission && data.permission.can_manage_job)) {\n $(chosenAttenderList + \" *\").remove();\n makeChosenAttendersList(data.attenders);\n $(attendersSection).removeClass(\"is-hidden\");\n } else {\n $(attendersSection).remove();\n }\n if (data.permission && !data.permission.can_init_event) {\n $(\".js-cancel-job-popup\").remove();\n }\n $(\".js-assign-descr-cont\").removeClass(\"is-hidden\");\n }", "function displayInfo(raw){\n var info = document.getElementById('info');\n while(info.hasChildNodes()){\n info.removeChild(info.childNodes[0]);\n }\n if(typeof(raw)=='string'){\n info.innerHTML = raw;\n return;\n } \n // Triggers:\n if(raw.house){\n // ID and Label\n var d0 = document.createElement('div');\n d0.innerHTML = `\n <div class='listItem'>Name:&nbsp;${raw.label}</div>\n <div class='listItem'>ID:&nbsp;${raw.id}</div>\n `;\n \n var d1 = document.createElement('details');\n var s1 = document.createElement('summary');\n s1.innerHTML = 'Basic Info';\n d1.appendChild(s1);\n d1.open = true;\n const tags = raw.tags.join(',&nbsp')\n repeatType = raw.repeat==0 ? 'one time OR' : raw.repeat==1 ? 'one time AND' : 'repeating OR' ;\n d1.innerHTML += `\n <div class='listItem'>House: ${raw.house}</div> \n <div class='listItem'>Repeat: ${raw.repeat} (${repeatType})</div>\n <div class='listItem'>Tags: ${tags} </div>`\n if(raw.link.trim() != '<none>'){\n console.log(raw.link);\n d1.innerHTML += `\n <div class='listItem'>Link Trigger: ${raw.link}</div>`\n }\n easy = raw.easy?'green':'red';\n normal = raw.normal?'green':'red';\n hard = raw.hard?'green':'red';\n disabled = raw.disabled?'red':'green';\n d1.innerHTML += `<div class='listItem'>Difficulty:&nbsp;<span class='${easy}'>Easy</span>&nbsp;&nbsp;<span class='${normal}'>Normal</span>&nbsp;&nbsp;<span class='${hard}'>Hard</span></div>`;\n d1.innerHTML += `<div class='listItem'>Disabled:&nbsp;<span class='${disabled}'>${raw.disabled?\"True\":\"False\"}</span></div>`;\n \n // events\n var d2 = document.createElement('details');\n var s2 = document.createElement('summary');\n s2.innerHTML = `Events`;\n d2.appendChild(s2);\n d2.open = true;\n\n for(var i=0;i<raw.events.length;i++){\n var t = raw.events[i].type;\n var d = document.createElement('div');\n d.className = 'listItem';\n d.innerHTML += `Event ${i}: ${events[t].name}`;\n d.title = `${t}: ${events[t].description}`;\n // check if the events type has more than 2 variables in its parameter\n if(events[t].p[0] > 0){\n d.innerHTML += ` ${raw.events[i].p[0]} ${raw.events[i].p[1]}`;\n }else{\n d.innerHTML += ` ${raw.events[i].p[0]}`\n }\n d2.appendChild(d);\n }\n\n //actions\n var d3 = document.createElement('details');\n var s3 = document.createElement('summary');\n s3.innerHTML = `Actions`;\n d3.appendChild(s3);\n d3.open = true;\n for(var i=0;i<raw.actions.length;i++){\n var t = raw.actions[i].type;\n var d = document.createElement('div');\n d.innerHTML += `Action ${i}: ${actions[t].name}`;\n d.className = 'listItem';\n d.title = `${t}: ${actions[t].description}`;\n for(j=0;j<7;j++){\n if(actions[t].p[j]>0){\n if(j!=6) d.innerHTML += ` ${raw.actions[i].p[j]}`;\n else d.innerHTML += ` @${wp(raw.actions[i].p[j])}`;\n }\n }\n d3.appendChild(d);\n }\n info.appendChild(d0);\n info.appendChild(d1);\n info.appendChild(d2);\n info.appendChild(d3);\n /*\n var d4 = document.createElement('details');\n var s4 = document.createElement('summary');\n s4.className = 'collapsible';\n s4.innerHTML = 'Neighbouring Nodes'\n \n d4.appendChild(s4);\n for(var item of raw.neighbour){\n var d = document.createElement('div');\n d.className = 'listItem';\n d.innerHTML = `neighbour: ${item}`;\n d4.appendChild(d);\n }\n info.appendChild(d4);*/\n \n }else{\n info.innerHTML = `\n Variable <br> \n Name:&nbsp;${raw.label}<br>\n ID:&nbsp;${raw.id}<br>\n Initial Value:&nbsp;${raw.initValue}`;\n \n }\n}", "get detail () {\n\t\treturn this._detail;\n\t}", "viewDetails(id) {\n let productToView = _.find(this.products, {id:parseInt(id)});\n this.$emit(\"viewDetails_From_Product_List\", productToView); //в productDetails listening use $on and send all info which get from upper line.\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}", "mainLogic() {\n this.apexParser = new ApexParser(this.accessModifiers,this.sourceDirectory);\n const filesArray = this.getClassFilesFromPackageDirectories();\n\n //Create a new array of ClassModels\n const classModels = this.getClassModelsFromFiles(filesArray);\n const mapGroupNameToClassGroup = this.createMapGroupNameToClassGroup(classModels, this.sourceDirectory);\n\n const projectDetail = this.fm.parseHTMLFile(this.bannerFilePath);\n const homeContents = this.fm.parseHTMLFile(this.homefilepath);\n this.fm.createDoc(mapGroupNameToClassGroup, classModels, projectDetail, homeContents, this.hostedSourceUrl);\n console.log('ApexDoc has completed!');\n }", "_processHints() {\n this._validateHints();\n this._syncDescribedByIds();\n }", "function _routerAndpageInfo(to) {\n console.log('%c\\n## 当前跳转页面的相关信息展示 ##\\n', logStyle('3DTest'));\n console.log('%c========================', logStyle('tit'));\n console.log('%c1、跳转页面:', logStyle('info'));\n console.log('%c' + to.name, logStyle('text'));\n console.log('%c2、跳转路径:', logStyle('info'));\n console.log('%c' + to.path, logStyle('text'));\n console.log('%c3、funcId值:', logStyle('info'));\n console.log('%c' + $store.state.Core.funcId, logStyle('text'));\n console.log('%c============', logStyle('line'));\n console.log('%c4、所有页面相关信息列表如下:', logStyle('info'));\n console.log($store.state.PageInfo.pageinfoList);\n console.log('%c========================', logStyle('tit'));\n}", "function Details(place){\n var details = document.createElement('div');\n writtendetails.appendChild(details);\n\n let name = document.createElement('h1');\n name.textContent = place.name;\n details.appendChild(name);\n if (place.rating != null) {\n let rating = document.createElement('p');\n rating.innerHTML = `Rating: ${place.rating}`+\" \"+`<i class=\"fas fa-star\"></i>`;\n details.appendChild(rating);\n }\n if(place.vicinity){\n let address = document.createElement('p');\n address.textContent = place.vicinity;\n details.appendChild(address);}\n if(place.business_status===\"OPERATIONAL\"){\n let openinghours=document.createElement(\"p\");\n openinghours.textContent = \"We are open and ready to take your order\";\n details.appendChild(openinghours);\n }else if(\n place.business_status===\"CLOSED_TEMPORARILY\"){\n let notopen=document.createElement(\"p\");\n notopen.textContent=\"Sorry, we are closed temporarily.\";\n details.appendChild(notopen);\n }\n \n }", "handleFinish(useful) {\n recordFinish(this.state.currentGuide.id, useful);\n closeGuide();\n }", "handleRequestCharacterDetails() {\n\t\t// Almost guaranteed this is a data validation issue, missing player/character data.\n\t\tthis.viewController.pageController.handleCharacterDetailsMissing();\n\t}", "handleViewDetailsClick() {\n this[NavigationMixin.Navigate]({\n type: 'standard__recordPage',\n attributes: {\n recordId: this.location.Id,\n objectApiName: LOCATION_OBJECT.objectApiName,\n actionName: 'view'\n }\n });\n }", "function handleDetail({\n id,\n nome,\n sexo,\n cpf,\n nascimento,\n cep,\n rua,\n numero,\n bairro,\n cidade,\n }) {\n dispatch(\n detailPessoaRequest(\n id,\n nome,\n sexo,\n cpf,\n nascimento,\n cep,\n rua,\n numero,\n bairro,\n cidade\n )\n );\n }", "showDetailedInfo(event) {\n return null;\n }", "renderDetails() {\r\n console.log(`${this.name}: ${this.role}`);\r\n }", "function get_product_details() {\n ApiService.retrieve_product().save({'product_id':Evdctrl.product_id}).$promise.then(function(res){\n console.log(res)\n Evdctrl.product_details = res.product_details;\n Evdctrl.is_data_loaded = true;\n })\n }", "function getPlayerDetails() {\r\n\tgetJob();\r\n\tgetLevel();\r\n\tcreateStats(playerDetails.job, playerDetails.level);\r\n\tgetName();\r\n\tgetRace();\r\n\tgetGender();\r\n\tgetDefense();\r\n\tgetExp();\r\n}", "function showDetails(id){ \n\n let productDetails = [];\n let order = \"\";\n\n all_orders.forEach(_order =>{\n if(_order.id == id){\n order = _order;\n }\n })\n \n order.orderProducts.forEach(product =>{\n let details = {\n name: product.product.name,\n quantity: product.quantity\n }\n productDetails.push(details);\n })\n\n auxDetails(productDetails);\n\n}", "function indeginousTaskDetails (){\nkony.application.showLoadingScreen(null, \"Loading..\", \nconstants.LOADING_SCREEN_POSITION_ONLY_CENTER, true, true, { \nshouldShowLabelInBottom: \"false\", separatorHeight: 20} );\n// gblReqForTaskDetails=valBusRequestID.widgetInfo.data[0].lblRequestId;\n// alert(\"the selected\"+JSON.stringify(gblReqForTaskDetails));\n // Let's get the news type the user selected\n //var selectedKey = frmFoxNews.lstNewsType.selectedKey;\n //alert (\"########## Selected Key:\" + selectedKey);\n // Let's first check that the user picked a valid value\n //if (!kony.string.equalsIgnoreCase(selectedKey, \"none\")){\n // Populating the input params for the service call and invoking the service\n // We're passing in the selected key for the user's selection in the combobox\n // var inputParams = {serviceID:\"getFoxNews\",newsType:selectedKey};\n // Now we make the call to the service using our input parameters and specifying\n // the function processServiceResults as our callback when the service returns results\n // appmiddlewareinvokerasync(inputParams, processServiceResults);\n if (!mobileFabricConfigurationForIndigenousTaskDetails.isKonySDKObjectInitialized)\n {\n initializeMobileFabricForIndigenousTaskDetails();\n \n }\n else if (mobileFabricConfigurationForIndigenousTaskDetails.isKonySDKObjectInitialized)\n {\n setIndigenousTaskDetails();\n }\n }", "displayInfo() {\n\t\t\tlet info = super.displayInfo() + ', разработчики: ' + this.getDevelopers() ;\n\t\t\tconsole.log( info );\n\t\t\treturn info\n\t\t\t}", "function main(){\n // Display the products available for purchase\n getProducts()\n \n }", "function Mechanism() {\n\t }", "function Mechanism() {\n\t }", "function Mechanism() {\n\t }", "function Mechanism() {\n\t }", "printEmployee() {\n // get employee information\n dbFunctions.employeeInfo()\n // show results in console\n .then((results) => {\n console.table(results)\n startManagement()\n })\n }", "handleClick(itemName, type) {\n console.log(\"Click in ProjDetail\");\n console.log(itemName);\n console.log(type);\n //Already got the table, sp, func details in this.state; don't need to call API again\n switch(type) {\n case \"tables\":\n this.getCurrentDBItem(this.state.tableItems, itemName, \"TABLE\");\n break;\n case \"sp\":\n this.getCurrentDBItem(this.state.spItems, itemName, \"SP\");\n break;\n case \"func\":\n this.getCurrentDBItem(this.state.funcItems, itemName, \"FUNCTION\");\n break;\n default:\n console.log(\"Sorry No Data\");\n }\n }", "handleDetailTask(){\n this.props.handleModifyTask(this.props.message,this.state.id,this.state.item,this.state.whichListToAddNewTask)\n }" ]
[ "0.71270645", "0.6746913", "0.6561305", "0.63605773", "0.60238266", "0.5900586", "0.5862907", "0.5837985", "0.5795267", "0.57751864", "0.5749872", "0.5739743", "0.5729432", "0.5728283", "0.5707446", "0.57074034", "0.5692112", "0.5669809", "0.5665414", "0.5657836", "0.5657536", "0.56570387", "0.56081384", "0.5596708", "0.55793834", "0.55771995", "0.5552584", "0.55424774", "0.5536288", "0.55255723", "0.5511336", "0.5504658", "0.54810244", "0.54806584", "0.54722506", "0.5472225", "0.5468063", "0.545997", "0.54584676", "0.5442725", "0.54375666", "0.54372233", "0.54308367", "0.54221815", "0.54209316", "0.5412379", "0.54115576", "0.5410984", "0.541088", "0.541014", "0.5402037", "0.5395797", "0.5391913", "0.5389975", "0.53877026", "0.5387362", "0.53601575", "0.5356033", "0.53461856", "0.53446054", "0.53439283", "0.5338806", "0.53358275", "0.5327444", "0.5323219", "0.5319165", "0.5308799", "0.530803", "0.5304886", "0.53015476", "0.5301446", "0.5300998", "0.52998865", "0.5297101", "0.52921224", "0.5290008", "0.5287667", "0.5281191", "0.52806103", "0.52804404", "0.52718425", "0.52693903", "0.5268107", "0.5265562", "0.52614677", "0.5261035", "0.5260838", "0.525577", "0.5248969", "0.5244934", "0.52448773", "0.52411884", "0.5235742", "0.52346903", "0.52311754", "0.52311754", "0.52311754", "0.52311754", "0.522901", "0.5222335", "0.5221645" ]
0.0
-1
and this commonizes their handling
function toTechTimeFormat(dt, _ref) { var _ref$suppressSeconds = _ref.suppressSeconds, suppressSeconds = _ref$suppressSeconds === void 0 ? false : _ref$suppressSeconds, _ref$suppressMillisec = _ref.suppressMilliseconds, suppressMilliseconds = _ref$suppressMillisec === void 0 ? false : _ref$suppressMillisec, includeOffset = _ref.includeOffset, _ref$includePrefix = _ref.includePrefix, includePrefix = _ref$includePrefix === void 0 ? false : _ref$includePrefix, _ref$includeZone = _ref.includeZone, includeZone = _ref$includeZone === void 0 ? false : _ref$includeZone, _ref$spaceZone = _ref.spaceZone, spaceZone = _ref$spaceZone === void 0 ? false : _ref$spaceZone, _ref$format = _ref.format, format = _ref$format === void 0 ? "extended" : _ref$format; var fmt = format === "basic" ? "HHmm" : "HH:mm"; if (!suppressSeconds || dt.second !== 0 || dt.millisecond !== 0) { fmt += format === "basic" ? "ss" : ":ss"; if (!suppressMilliseconds || dt.millisecond !== 0) { fmt += ".SSS"; } } if ((includeZone || includeOffset) && spaceZone) { fmt += " "; } if (includeZone) { fmt += "z"; } else if (includeOffset) { fmt += format === "basic" ? "ZZZ" : "ZZ"; } var str = toTechFormat(dt, fmt); if (includePrefix) { str = "T" + str; } return str; } // defaults for unspecified units in the supported calendars
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function customHandling() { }", "protected internal function m252() {}", "private internal function m248() {}", "transient private protected internal function m182() {}", "function _____SHARED_functions_____(){}", "transient protected internal function m189() {}", "private public function m246() {}", "__previnit(){}", "static private protected internal function m118() {}", "obtain(){}", "transient final protected internal function m174() {}", "static private internal function m121() {}", "transient private internal function m185() {}", "initCustomFunctions() {/*To be overridden in sub class as needed*/}", "processEvent(e) {\n\t // having each type directly access methods to avoid one long switch\n\t try {\n\t \t return this[e.type](e)\n\t\t} catch (e) {\n\t\t return null;\n\t\t}\n\t}", "transient private protected public internal function m181() {}", "add(...args){ \n // value.constuctor.name; - return Class name \"Track,Artist,Album\";\n // value.name - return class.name \"Linkin park exemple\";\n // IF :for classes! if one value - this CLASS. if more value: first - Class, nexts - parameters this Class;\n //ELSE: For class parameters. If we have more then one parameters = > [new Class,...parametrs for this class ];\n let myArguments = [];\n myArguments.push(...args); \n // TRACK \n if(myArguments[0].constructor.name === \"Track\"){\n if(myArguments.length === 1){\n this.Track.push(myArguments[0]); \n }\n //FOR TRACK WE DON'T HAVE NECESSARY ADD ADDITIONAL PARAMETERS. IT'S NOT LOGICAL\n else{ return \"Pls using update for Track.\" } \n };\n\n // ALBUM\n if(myArguments[0].constructor.name === \"Album\"){\n if(myArguments.length === 1){\n this.Album.push(myArguments[0]);\n }\n else{\n this.Album.forEach(element => {\n if(element === myArguments[0]){\n for(let i = 1; i < myArguments.length; i++){\n if(Array.isArray(myArguments[i])){\n if(myArguments[i][i-1].constructor.name === \"Track\" ){ \n element.traks = element.traks.concat(myArguments[i]);\n } \n }\n if(myArguments[i].constructor.name === \"Track\"){\n element.traks.push(myArguments[i]);\n } \n }\n } \n });\n } \n };\n //ARTIST\n if(myArguments[0].constructor.name === \"Artist\"){\n if(myArguments.length === 1){\n this.Artist.push(myArguments[0]);\n }\n else{\n this.Artist.forEach(element => {\n if(element === myArguments[0]){\n for(let i = 1; i < myArguments.length; i++){\n if(Array.isArray(myArguments[i])){\n if(myArguments[i][i-1].constructor.name === \"Track\" ){ \n element.traks = element.traks.concat(myArguments[i]);\n }\n if(myArguments[i][i-1].constructor.name === \"Album\"){\n element.albums = element.albums.concat(myArguments[i]);\n } \n }\n if(myArguments[i].constructor.name === \"Track\"){\n element.traks.push(myArguments[i]);\n }\n if(myArguments[i].constructor.name === \"Album\"){\n element.albums.push(myArguments[i]);\n }\n \n }\n } \n });\n } \n }; \n }", "function o0(o1)\n{\n var o2 = -1;\n try {\nfor (var o259 = 0; o3 < o1.length; function (o502, name, o38, o781, o782, o837, o585, o838, o549) {\n try {\no839.o468();\n}catch(e){}\n // TODO we should allow people to just pass in a complete filename instead\n // of parent and name being that we just join them anyways\n var o840 = name ? o591.resolve(o591.o592(o502, name)) : o502;\n\n function o841(o842) {\n function o843(o842) {\n try {\nif (!o838) {\n try {\no474.o800(o502, name, o842, o781, o782, o549);\n}catch(e){}\n }\n}catch(e){}\n try {\nif (o837) try {\no837();\n}catch(e){}\n}catch(e){}\n try {\no334('cp ' + o840);\n}catch(e){}\n }\n var o844 = false;\n try {\nModule['preloadPlugins'].forEach(function (o845) {\n try {\nif (o844) try {\nreturn;\n}catch(e){}\n}catch(e){}\n try {\nif (o845['canHandle'](o840)) {\n try {\no845['handle'](o842, o840, o843, function () {\n try {\nif (o585) try {\no585();\n}catch(e){}\n}catch(e){}\n try {\no334('cp ' + o840);\n}catch(e){}\n });\n}catch(e){}\n try {\no844 = true;\n}catch(e){}\n }\n}catch(e){}\n });\n}catch(e){}\n try {\nif (!o844) try {\no843(o842);\n}catch(e){}\n}catch(e){}\n }\n try {\no332('cp ' + o840);\n}catch(e){}\n try {\nif (typeof o38 == 'string') {\n try {\no839.o846(o38, function (o842) {\n try {\no841(o842);\n}catch(e){}\n }, o585);\n}catch(e){}\n } else {\n try {\no841(o38);\n}catch(e){}\n }\n}catch(e){}\n })\n {\n try {\nif (o1[o3] == undefined)\n {\n try {\nif (o2 == -1)\n {\n try {\no2 = o3;\n}catch(e){}\n }\n}catch(e){}\n }\n else\n {\n try {\nif (o2 != -1)\n {\n try {\no4.o5(o2 + \"-\" + (o3-1) + \" = undefined\");\n}catch(e){}\n try {\no2 = -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 comportement (){\n\t }", "static final private internal function m106() {}", "transient final private protected internal function m167() {}", "ontext(text){\n let top = this.state.length - 1;\n switch(top) {\n case 2: {\n if('caption' in this.state[top] && 'table' in this.state[top-1]) {\n /* Locales only occur in a caption within a table*/\n if(!this.locale) {\n this.first_locale = text\n } else if(text == this.first_locale) {\n this.os_idx += 1;\n this.cat_idx = 0\n }\n this.locale = text\n } \n if('a' in this.state[top] && 'li' in this.state[top-1] && 'main' in this.state[top-2]) {\n /* The links that refer to operating systems (tabs) are inside a main -> li -> a tag */\n this.os.push(text)\n } \n }\n case 3: {\n if('td' in this.state[top] && 'tr' in this.state[top-1] && this.state[top-1].tr.class == 'sizes') {\n /* Service data is in a td within a tr. The tr always has class \"sizes\"*/\n this.serviceData(text)\n }\n if('th' in this.state[top] && 'tr' in this.state[top-1]) {\n /* Table headers within a tr indicate the service type*/\n this.instanceType = text\n }\n }\n case 4: {\n if('th' in this.state[top] && 'tr' in this.state[top-1] && 'thead' in this.state[top-2] && 'table' in this.state[top-3]) {\n /* table -> thead -> tr -> th contains the column headers of the service table.\n * We use a finite state machine to keep track of the list of categories */\n this.transition(text)\n }\n }\n }\n\n }", "process(res) {\n if (res.params.skip && res.params.skip.some(item => item === res.data.resCode)) {\n res.ok = true;\n } else if (this[res.data.resCode]) {\n res.ok = this[res.data.resCode](res);\n } else if (res.data.res === eid.err.type) {\n // Unknown error\n res.ok = false;\n logger.error(res);\n this.eUnknown();\n } else if (res.data.res === eid.warn.type) {\n // Unknown warn\n res.ok = true;\n logger.warn(res);\n } else {\n res.ok = true;\n logger.info(res.data);\n }\n }", "function OLloadP1or2(){\r\no3_text=ol_text;o3_cap=ol_cap;o3_capbelow=ol_capbelow;o3_textpadding=ol_textpadding;\r\no3_captionpadding=ol_captionpadding;o3_border=ol_border;o3_base=ol_base;o3_status=ol_status;\r\no3_autostatus=ol_autostatus;o3_nofollow=ol_nofollow;o3_width=ol_width;o3_wrap=ol_wrap;\r\no3_wrapmax=ol_wrapmax;o3_height=ol_height;o3_hpos=ol_hpos;o3_vpos=ol_vpos;o3_offsetx=ol_offsetx;\r\no3_offsety=ol_offsety;o3_snapx=ol_snapx;o3_snapy=ol_snapy;o3_relx=ol_relx;o3_rely=ol_rely;\r\no3_midx=ol_midx;o3_midy=ol_midy;o3_ref=ol_ref;o3_refc=ol_refc;o3_refp=ol_refp;o3_refx=ol_refx;\r\no3_refy=ol_refy;o3_fixx=ol_fixx;o3_fixy=ol_fixy;o3_nojustx=ol_nojustx;o3_nojusty=ol_nojusty;\r\no3_hauto=ol_hauto;o3_vauto=ol_vauto;o3_timeout=ol_timeout;o3_delay=ol_delay;\r\no3_fgcolor=ol_fgcolor;o3_bgcolor=ol_bgcolor;o3_cgcolor=ol_cgcolor;o3_textcolor=ol_textcolor;\r\no3_capcolor=ol_capcolor;o3_textfont=ol_textfont;o3_captionfont=ol_captionfont;\r\no3_textsize=ol_textsize;o3_captionsize=ol_captionsize;o3_fgbackground=ol_fgbackground;\r\no3_bgbackground=ol_bgbackground;o3_cgbackground=ol_cgbackground;o3_capicon=ol_capicon;\r\no3_background=ol_background;o3_padxl=ol_padxl;o3_padxr=ol_padxr;o3_padyt=ol_padyt;\r\no3_padyb=ol_padyb;o3_fullhtml=ol_fullhtml;o3_fgclass=ol_fgclass;o3_bgclass=ol_bgclass;\r\no3_cgclass=ol_cgclass;o3_textfontclass=ol_textfontclass;o3_captionfontclass=ol_captionfontclass;\r\n}", "processItems() {}", "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}", "static final private protected internal function m103() {}", "SameSide() {}", "function Common(){}", "apply () {}", "static transient final protected internal function m47() {}", "patched() {\n this._handleImageLoad();\n }", "merge() {\r\n }", "_createDisplayObjectsFromWebserviceResponseData({ responseData }) {\n\n const annotationTypeDataResponse = responseData.annotationTypeDataResponse;\n const existingEntriesResponse = responseData.existingEntriesResponse;\n\n const minPSMs = existingEntriesResponse.minPSMs;\n\n // Use objects for index so can increment the index property in called methods\n\n const annotationTypes_Overall_Entries_AllTypes_Index_Container= { index : 0 };\n\n const annotationTypes_Overall_Entries_PSM_Index_Container = { index : 0 };\n const annotationTypes_Overall_Entries_ReportedPeptide_Index_Container = { index : 0 };\n \n\n // Match up Annotation Type Data to Existing Entries\n \n // annotationTypeDataResponse.reportedPeptideAnnotationTypeList\n // annotationTypeDataResponse.psmAnnotationTypeList\n \n // existingEntriesResponse.reportedPeptideEntriesList;\n // existingEntriesResponse.psmEntriesList;\n \n // Create 2 Maps ( peptide_DataMap, psm_DataMap )\n // <[Search Program name],Map<[annTypeName],Set<[defaultFilterValue]>>>\n\n const peptide_DataMap_Key_SearchProgramName = \n this._create_Map_Per_SearchProgramName_ProcessPeptideOrPSM({ \n annotationTypeList : annotationTypeDataResponse.reportedPeptideAnnotationTypeList\n });\n\n const psm_DataMap_Key_SearchProgramName = \n this._create_Map_Per_SearchProgramName_ProcessPeptideOrPSM({ \n annotationTypeList : annotationTypeDataResponse.psmAnnotationTypeList\n });\n\n // Combine Maps of Ann Type data and Existing Entries to produce result Display Objects\n\n // Result Display Objects\n\n // Array<{ searchProgramName, peptide_List, psm_List }\n\n // peptide_List, psm_List contain:\n // Array<{ annTypeName, foundValues: Array< Double [Default cutoffs for searches] >, foundValuesString: String Comma delim of foundValues }>\n // properties 'foundValues' and 'foundValuesString' are optional and will not be present if none exist \n\n const dataPerSearchProgramName_Array = [];\n\n for ( const peptide_DataMap_Key_SearchProgramName_Entry of peptide_DataMap_Key_SearchProgramName.entries() ) {\n\n const searchProgramName = peptide_DataMap_Key_SearchProgramName_Entry[ 0 ];\n const peptide_AnnTypeData_Map = peptide_DataMap_Key_SearchProgramName_Entry[ 1 ];\n\n const dataPerSearchProgramName_Entry = { searchProgramName };\n\n dataPerSearchProgramName_Entry.peptide_List = this._create_Array_ProcessPeptideOrPSM({ \n annTypeData_Map : peptide_AnnTypeData_Map, \n searchProgramName,\n existingCutoffEntriesList : existingEntriesResponse.reportedPeptideEntriesList,\n psmPeptideOverallList : this._annotationTypes_Overall_Entries_ReportedPeptide,\n indexPerTypeContainer : annotationTypes_Overall_Entries_ReportedPeptide_Index_Container,\n annotationTypes_Overall_Entries_AllTypes_Index_Container\n });\n\n { // Process psm data for same searchProgramName\n const psm_AnnTypeData_Map = psm_DataMap_Key_SearchProgramName.get( searchProgramName );;\n if ( psm_AnnTypeData_Map ) {\n dataPerSearchProgramName_Entry.psm_List = this._create_Array_ProcessPeptideOrPSM({ \n annTypeData_Map : psm_AnnTypeData_Map,\n searchProgramName,\n existingCutoffEntriesList : existingEntriesResponse.psmEntriesList,\n psmPeptideOverallList : this._annotationTypes_Overall_Entries_PSM,\n indexPerTypeContainer : annotationTypes_Overall_Entries_PSM_Index_Container,\n annotationTypes_Overall_Entries_AllTypes_Index_Container\n });\n }\n }\n\n psm_DataMap_Key_SearchProgramName.delete( searchProgramName ); // Remove since processed\n\n dataPerSearchProgramName_Array.push( dataPerSearchProgramName_Entry );\n }\n\n // Process any remaining PSM Map entries\n for ( const psm_DataMap_Key_SearchProgramName_Entry of psm_DataMap_Key_SearchProgramName.entries() ) {\n\n const searchProgramName = psm_DataMap_Key_SearchProgramName_Entry[ 0 ];\n const psm_AnnTypeData_Map = psm_DataMap_Key_SearchProgramName_Entry[ 1 ];\n\n const dataPerSearchProgramName_Entry = { searchProgramName };\n\n dataPerSearchProgramName_Entry.psm_List = this._create_Array_ProcessPeptideOrPSM({ \n annTypeData_Map : psm_AnnTypeData_Map,\n searchProgramName,\n existingCutoffEntriesList : existingEntriesResponse.psmEntriesList,\n psmPeptideOverallList : this._annotationTypes_Overall_Entries_PSM,\n indexPerTypeContainer : annotationTypes_Overall_Entries_PSM_Index_Container,\n annotationTypes_Overall_Entries_AllTypes_Index_Container\n });\n\n dataPerSearchProgramName_Array.push( dataPerSearchProgramName_Entry );\n }\n\n // Sort dataPerSearchProgramName_Array on searchProgramName\n dataPerSearchProgramName_Array.sort( (a, b) => {\n return a.searchProgramName.localeCompare( b.searchProgramName, undefined, { sensitivity: 'base' } );\n });\n\n return { dataPerSearchProgramName_Array };\n }", "transient final private internal function m170() {}", "static transient final private internal function m43() {}", "function addHandlerOld(e) {\n var imgList = $(\"img\");\n var searchPattern = new RegExp(img2Search);\n\n for(var i=0; i < imgList.size(); i++) {\n// var unId = new Date().getTime();\n var imgObj = $(imgList.get(i));\n var imgName = imgObj.attr(\"src\");\n var s = searchPattern.test(imgName);\n\n if( s ) {\n //alert(imgName);\n// var tagdivid = \"div\" + unId;\n// var tagimgid = \"img\" + unId;\n// var divid = \"#div\" + unId;\n// var imgid = \"#img\" + unId;\n var [divid, imgid, tagdivid, tagimgid] = defineIds();\n// var refid;\n\n imgObj.mouseover(\n function(e) {\n refid = this;\n addMouseOver(e, divid, imgid, tagdivid, tagimgid);\n });\n\n addDLink(imgObj, tagdivid);\n\n };\n }\n $(\"body\").mouseover(\n function(e) {\n addMouseOut(e, divid, imgid, tagdivid, tagimgid);\n// refid = null;\n });\n}", "function processPatientHierarchyPrototypeField( classname, holder, action ) {\n\n var resArr = [];\n\n switch(classname) {\n\n case 'patientdob':\n\n var target = '.patient-dob-date';\n if( action == \"index\" ) {\n var nameArr = {patient:'', patientdob:'dob'};\n resArr = getMaxIndexByArrayName(holder, target, nameArr);\n }\n if( action == \"jsinit\" ) {\n //do nothing for this field\n var fieldEl = holder.find(target).last();\n initDatepicker(fieldEl.closest('.row'));\n }\n break;\n\n\n case 'patienttrackerspot':\n\n var target = '.user-location-name-field';\n if( action == \"index\" ) {\n var nameArr = {patient:'', spots:''};\n resArr = getMaxIndexByArrayName(holder, target, nameArr);\n }\n if( action == \"jsinit\" ) {\n //do nothing for this field\n //fieldEl = holder.find('.patient-dob-date').last();\n //initDatepicker(fieldEl.closest('.row'));\n //fieldEl = holder.find('.encountersex-field').last();\n regularCombobox(holder);\n var btnEl = holder.find('.form_body_toggle_btn ').last();\n //btnId='form_body_toggle_patientcontactinfo_1'\n var btnId = btnEl.attr(\"id\");\n //'#form_body_toggle_'+ uid\n //var btnIdArr = btnId.split(\"form_body_toggle_\")\n //var uid = \"patientcontactinfo_1\";\n var uid = btnId.replace(\"form_body_toggle_\", \"\");\n bindToggleBtn( uid );\n getComboboxGeneric(holder,'floor',_floors,false);\n getComboboxGeneric(holder,'building',_buildings,false,'');\n getComboboxGeneric(holder,'city',_cities,false);\n }\n break;\n\n case 'encounterpatlastname':\n var target = '.encounter-lastName';\n if( action == \"index\" ) {\n var nameArr = {patient:'', encounter:'', encounterpatlastname:'patlastname'};\n resArr = getMaxIndexByArrayName(holder, target, nameArr);\n }\n break;\n\n case 'encounterpatfirstname':\n var target = '.encounter-firstName';\n if( action == \"index\" ) {\n var nameArr = {patient:'', encounter:'', encounterpatfirstname:'patfirstname'};\n resArr = getMaxIndexByArrayName(holder, target, nameArr);\n }\n break;\n\n case 'encounterpatmiddlename':\n var target = '.encounter-middleName';\n if( action == \"index\" ) {\n var nameArr = {patient:'', encounter:'', encounterpatmiddlename:'patmiddlename'};\n resArr = getMaxIndexByArrayName(holder, target, nameArr);\n }\n break;\n\n case 'encounterpatsuffix':\n var target = '.encounter-suffix';\n if( action == \"index\" ) {\n var nameArr = {patient:'', encounter:'', encounterpatsuffix:'patsuffix'};\n resArr = getMaxIndexByArrayName(holder, target, nameArr);\n }\n break;\n\n case 'encounterpatsex':\n var target = '.encountersex-field';\n if( action == \"index\" ) {\n var nameArr = {patient:'', encounter:'', encounterpatsex:'patsex'};\n resArr = getMaxIndexByArrayName(holder, target, nameArr);\n }\n if( action == \"jsinit\" ) {\n //getComboboxProcedure(fieldEl.parent());\n var fieldEl = holder.find(target).last();\n specificRegularCombobox(fieldEl);\n }\n break;\n\n case 'encounterdate':\n var target = '.encounter-date';\n if( action == \"index\" ) {\n //id=oleg_orderformbundle_patienttype_encounter_0_date_0_field\n var nameArr = {patient:'', encounter:'', encounterdate:'date'};\n resArr = getMaxIndexByArrayName(holder, target, nameArr);\n }\n if( action == \"jsinit\" ) {\n var fieldEl = holder.find(target).last();\n initDatepicker(fieldEl.closest('.row'));\n }\n break;\n\n case 'encounterpatage':\n var target = '.encounterage-field';\n if( action == \"index\" ) {\n //app_orderformbundle_patienttype_encounter_0_patage_0_field\n var nameArr = {patient:'', encounter:'', encounterpatage:'patage'};\n resArr = getMaxIndexByArrayName(holder, target, nameArr);\n }\n break;\n\n case 'encounterpathistory':\n var target = '.encounterhistory-field';\n if( action == \"index\" ) {\n //app_orderformbundle_patienttype_encounter_0_pathistory_0_field\n var nameArr = {patient:'', encounter:'', encounterpathistory:'pathistory'};\n resArr = getMaxIndexByArrayName(holder, target, nameArr);\n }\n if( action == \"jsinit\" ) {\n var fieldEl = holder.find(target).last();\n expandTextarea(fieldEl.closest('.row'));\n }\n break;\n\n case 'procedurename':\n //var fieldEl = holder.find('.ajax-combobox-procedure').first();\n var target = '.ajax-combobox-procedure';\n if( action == \"index\" ) {\n //id=oleg_orderformbundle_patienttype_encounter_0_procedure_0_name_0_field\n var nameArr = {patient:'', encounter:'', procedure:'', procedurename:'name'};\n resArr = getMaxIndexByArrayName(holder,target,nameArr);\n }\n if( action == \"jsinit\" ) {\n //specificRegularCombobox(fieldEl);\n //regularCombobox(holder);\n //console.log(\"cycle=\"+cycle);\n //console.log(\"urlBase=\"+urlBase);\n //initComboboxJs(null, fieldEl.parent());\n var fieldEl = holder.find(target).last();\n getComboboxProcedure(fieldEl.parent());\n }\n break;\n\n case 'proceduredate':\n var target = '.procedure-date';\n if( action == \"index\" ) {\n var nameArr = {patient:'', encounter:'', procedure:'', proceduredate:'date'};\n resArr = getMaxIndexByArrayName(holder,target,nameArr);\n }\n if( action == \"jsinit\" ) {\n var fieldEl = holder.find(target).last();\n initDatepicker(fieldEl.closest('.row'));\n }\n break;\n\n case 'accessionaccessiondate':\n\n //var fieldEl = holder.find('.accessionaccessiondate').first();\n var target = '.accessionaccessiondate';\n if( action == \"index\" ) {\n //id=oleg_orderformbundle_patienttype_encounter_0_procedure_0_accession_0_accessionDate_0_field\n var nameArr = {patient:'', encounter:'', procedure:'', 'accession':'', accessionaccessiondate:'accessionDate'};\n resArr = getMaxIndexByArrayName(holder,target,nameArr);\n }\n if( action == \"jsinit\" ) {\n var fieldEl = holder.find(target).last();\n initDatepicker(fieldEl.closest('.row'));\n }\n break;\n\n default:\n return null;\n }\n\n //for all fields\n if( action == \"jsinit\" ) {\n //init select box\n var statusFieldEl = holder.find('select.other-status').last();\n //console.log(\"statusFieldEl=\"+statusFieldEl.attr(\"id\"));\n specificRegularCombobox(statusFieldEl);\n\n //set status to invalid\n statusFieldEl.select2('val','invalid');\n\n //attach event listener to this combobox to set value\n listenerComboboxStatusField(statusFieldEl); //,holder,'.other-status');\n }\n\n return resArr;\n}", "function init_handlers (curr) {\n\t\t\n\t\t/*** Handler for mouse move on content **/\n\t\t curr.on('mousemove', function (ev) {\n\t\t\t handle_mousemove_on_content(ev);\n\t\t });\n\n\t\t /** Handler for mouse click on content **/\n\t\t curr.on('click', function (ev) {\n\t\t handle_mouseclick_on_content(ev);\n\t\t });\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \n\t \n\t\t /** Handler for mouse click on content **/\n\t\t curr.on('mouseleave', function (ev) {\n\t\t handle_mouseleave_from_content(ev);\n\t\t });\n\n\t\t /** Handler for mouse enter on content **/\n\t\t curr.on('mouseenter', function (ev) {\n\t\t \t handle_mouseenter_on_content (ev);\n\t\t });\n\t}", "function Common() {}", "static transient private protected internal function m55() {}", "function oi(a){this.Of=a;this.rg=\"\"}", "function MultiFlattener() {}", "prepare() {}", "function re(a,b){this.O=[];this.za=a;this.la=b||null;this.J=this.D=!1;this.H=void 0;this.ha=this.Fa=this.S=!1;this.R=0;this.Ef=null;this.N=0}", "function addInternalSelectors(){\n //adding internal class names to void problem with common ones\n $(options.sectionSelector).each(function(){\n $(this).addClass(SECTION);\n });\n $(options.slideSelector).each(function(){\n $(this).addClass(SLIDE);\n });\n }", "function addInternalSelectors(){\n //adding internal class names to void problem with common ones\n $(options.sectionSelector).each(function(){\n $(this).addClass(SECTION);\n });\n $(options.slideSelector).each(function(){\n $(this).addClass(SLIDE);\n });\n }", "function addInternalSelectors(){\n //adding internal class names to void problem with common ones\n $(options.sectionSelector).each(function(){\n $(this).addClass(SECTION);\n });\n $(options.slideSelector).each(function(){\n $(this).addClass(SLIDE);\n });\n }", "function EventHelper (possibleEvents) {\n }", "function MozmillHandlers() {\n\n}", "function processStatic(response){\r\n processBasic(response);\r\n processAlias(response);\r\n processFeatures(response);\r\n processClassifications(response);\r\n processCertification(response);\r\n processCodeFeatures(response);\r\n processAds(response);\r\n processComponents(response);\r\n processPermissions(response);\r\n processStrs(response);\r\n \r\n}", "function PrepareDefaultEventHandlers() {\r\n $(\":text\").focus(textboxHighlight).blur(textboxRemoveHighlight);\r\n $(\":password\").focus(textboxHighlight).blur(textboxRemoveHighlight);\r\n $(\"textarea\").focus(textboxHighlight).blur(textboxRemoveHighlight);\r\n }", "function xx(a,b){return\"method\"!==b.kind||!b.ej||\"value\"in b.ej?(ia(),{kind:\"field\",key:Symbol(),oW:\"own\",ej:{},Dj:function(){\"function\"===typeof b.Dj&&(this[b.key]=b.Dj.call(this))},$l:function(c){c.Ca(b.key,a)}}):Object.assign(Object.assign({},b),{$l:function(c){c.Ca(b.key,a)}})}", "static protected internal function m125() {}", "static transient private protected public internal function m54() {}", "function wR(a,b){this.Fb=[];this.HF=a;this.YE=b||null;this.Pq=this.un=!1;this.ai=void 0;this.Gz=this.AK=this.ez=!1;this.uu=0;this.cb=null;this.az=0}", "validatePostObjects () { \n\t\tif (this.attributes.codemark) {\n\t\t\tif (this.attributes.review) {\n\t\t\t\tthrow this.errorHandler.error('noCodemarkAndReview');\n\t\t\t} else if (this.attributes.codeError) {\n\t\t\t\tthrow this.errorHandler.error('noCodemarkAndCodeError');\n\t\t\t}\n\t\t} else if (this.attributes.review) {\n\t\t\tif (this.attributes.parentPostId) {\n\t\t\t\tthrow this.errorHandler.error('noReplyWithReview');\n\t\t\t} else if (this.attributes.codeError) {\n\t\t\t\tthrow this.errorHandler.error('noReviewAndCodeError');\n\t\t\t}\n\t\t} else if (this.attributes.codeError) {\n\t\t\tif (this.attributes.parentPostId) {\n\t\t\t\tthrow this.errorHandler.error('noReplyWithCodeError');\n\t\t\t}\n\t\t}\n\t}", "function o0(o1, o2) {\n try {\nreturn o34(o32, o36, o37);\n}catch(e){}\n}", "static transient final private protected internal function m40() {}", "dispatcherByBswDataElement(element, fn) {\n if (!element.length) {\n return;\n }\n let that = this;\n let data = element[0].dataBsw;\n if (data[fn]) {\n\n if (typeof that.cnf.v[data[fn]] !== 'undefined') {\n return that.cnf.v[data[fn]](data.extra || {}, element);\n } else if (typeof that[data[fn]] !== 'undefined') {\n return that[data[fn]](data.extra || {}, element);\n }\n return console.warn(`Method ${data[fn]} is undefined.`, data);\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}", "function _construct()\n\t\t{;\n\t\t}", "static final protected internal function m110() {}", "function RequestConnector(){\n this._requestMap = []; //private\n this.getPreviousRequest = function (request) {\n //request.QueryInterface(Components.interfaces.nsIHttpChannel)\n var requestMap = this._requestMap;\n for (var i=0;i<requestMap.length;i++){\n if (request==requestMap[i][0]) {\n var result = requestMap[i][1];\n this._removeEntry(i);\n return result;\n }\n }\n //How can two objects with different toString == I don't get this at all...\n //[xpconnect wrapped (nsISupports, nsIHttpChannel, nsIRequest, nsIChannel)]\n //== [xpconnect wrapped (nsISupports, nsIRequest, nsIChannel)]\n //It is worth understanding what's going on here.\n \n //The mechanism above generally works (for dc, dbpedia, Ralph's foaf).\n //Unfortunately, not working for http://www.w3.org/2001/sw/\n //The problem is this, it seems that when loading http://www.w3.org/2001/sw/\n //3 nsIHttpRequest are generated instead of 2: (originalURI --> URI)\n \n // sw/ --> sw/ , sw/ --> sw/Overview.rdf , sw/Overview.rdf --> sw/Overview.rdf\n // 303 200 200\n // text/html application/vnd.mozilla.maybe.feed text/html\n //thie last one is redundant and is there becuase of feed sniffing, I think\n //So, this is a hack:\n if (!(requestMap.length == 0) /*&& !(request.originalURI.spec == request.URI.spec)*/){\n tabulator.log.warn(\"In side the hack in request.js with originalURI: %s URI: %s\", \n request.originalURI.spec, request.URI.spec);\n for (var i = requestMap.length-1;i>=0;i--){\n if (requestMap[i][0].URI.spec == request.URI.spec /*&& \n requestMap[i][1].URI.spec == request.URI.originalURI.spec*/){\n tabulator.log.warn(\"redirecting back, but this might be a failure, see request.js\"); \n var fakePrevious = requestMap[i][1];\n //requestMap[i][0] = request;\n this._removeEntry(i);\n return fakePrevious;\n }\n \n }\n }\n \n tabulator.log.debug(\"found nothing in request array\");\n return null;\n };\n this.getDisplayURI = function (request){\n //returns the URI of the first non-301 response in a sequence of redirection if there is one\n // || request.URI.spec. seeAlso <http://lists.w3.org/Archives/Public/public-awwsw/2008Jan/0030.html>9\n var displayURI = request.URI.spec;\n \n // Does there exist an elegant way to write this?\n for (var requestIter=this.getPreviousRequest(request);requestIter;requestIter=this.getPreviousRequest(requestIter))\n if (requestIter.responseStatus != 301) displayURI = requestIter.URI.spec;\n return displayURI;\n };\n this.setPreviousRequest = function (thisRequest,previousRequest) {\n tabulator.log.debug(\"recording redirctions: previoiusRequest is %s with status %s, thisRequest is %s\",\n previousRequest.URI.spec, previousRequest.responseStatus, thisRequest.URI.spec);\n this._requestMap.push([thisRequest,previousRequest]);\n };\n this.releaseRequest = function (request){\n //tabulator.log.debug(\"attemp to remove %s\", request.URI.spec);\n var requestPointer = request;\n var mapLength = this._requestMap.length;\n for (var i=mapLength-1;i>=0;i--){\n if (requestPointer==this._requestMap[i][0]) {\n requestPointer = this._requestMap[i][1];\n this._removeEntry(i);\n }\n }\n };\n this._removeEntry = function (i) {\n tabulator.log.debug(\"%s removed, the length of the requestMap is %s\", \n this._requestMap[i][1].URI.spec, this._requestMap.length-1);\n tabulator.rdf.Util.RDFArrayRemove(this._requestMap, this._requestMap[i]); \n };\n}", "static final private protected public internal function m102() {}", "function delegateButtonClicks(evt, that, theSenderName, locObj) {\n\n if (!locObj.theTarget.disabled) {\n // console.log(\"delegateButtonClicks> evt: \" + evt + \" that: \" + that + \" theSenderName: \" + theSenderName + \"locObj.theTarget : \" + locObj.theTarget + \"locObj.theTargetType: \" + locObj.theTargetType);\n\n //var theSource = locObj.theTargetName;\n // The Image of Button\n //var str = locObj.theTarget.firstChild;\n\n switch (theSenderName) {\n case \"previous\":\n case \"next\":\n toggleSequence(theSenderName);\n break;\n case \"notesb\":\n handleNotes(theSenderName);\n break;\n case \"goBack\" :\n UpALevel();\n break;\n case \"audiopl\":\n case \"audiorew\":\n case \"audiofor\":\n handleAudio(theSenderName);\n break;\n case \"tapescr\":\n tapescriptShow(theSenderName);\n break;\n case \"checkB\" :\n case \"showB\" :\n case \"resetB\" :\n case \"showtext\" :\n case \"showjust\" :\n case \"showgrammar\" :\n case \"showLF\" :\n case \"showUE\" :\n case \"showCU\" :\n case \"videoB\" :\n case \"showaudio\" :\n assignFooterExtraTextButtons(locObj);\n break;\n\t\t\tcase \"showgrade\" :\n\t\t\t\t$(\"#grade\").toggle();\n\t\t\t\tbreak;\n default :\n }\n }\n}", "function o0(o1) {\n try {\nif ([1, 2, 3]) {\n try {\nObject.prototype.o3(o1);\n}catch(e){}\n } else {\n try {\no4(o1);\n}catch(e){}\n }\n}catch(e){}\n}", "handle(operation, key, data, src, dst) {}", "function pf(a,b){this.rb=[];this.sd=a;this.Tc=b||null}", "static transient final protected public internal function m46() {}", "function js2DOMcore ( data ) {\n //!-self return:\n if ( data || data == '' ) {//data '' ou inner ou tag => ''ou \"...\" ou {tagName:\"...atrs..\"} si ''=>br\n if ( typeof data == \"object\" ){ \n if ( data instanceof Array ) { jsonArray ( data ); return js2DOMcore }\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 /// gestion auto-marker \\\\\\\n autoMarker:{//\n sequenceControl = sequenceControl << 1\n sequenceControl = sequenceControl & 3\n if ( content ){ sequenceControl++ }\n if ( !startSequence ) { startSequence = true; break autoMarker }\n if ( !startTagsLevel ) {\n startTagsLevel = level; markers.sequenceOfTags.push( level ) }\n //traitement noAttr \n if ( startNoAttrLevel > -1 ){\n if ( sequenceControl > 0 ){\n startNoAttrLevel = -1\n markers.sequenceOfNoAttr.pop()\n }\n break autoMarker\n }\n // !startNoAttrLevel\n if ( sequenceControl > 0 ) break autoMarker \n startNoAttrLevel = level \n markers.sequenceOfNoAttr.push( startNoAttrLevel )\n } \n \n tagtxt += '<'+tagName+' '+ ( content? ' '+content : '') + '>' \n postTag.push('</'+tagName+'>')//+postTag)\n level++\n return js2DOMcore\n }\n sequenceControl = 0\n startSequence = false\n startTagsLevel = false\n startNoAttrLevel = -1\n tagtxt += data // texte dans inner\n return js2DOMcore\n }\n /// <br /> \\\\\\ \n tagtxt += '<br />' // br dans inner\n return js2DOMcore\n }", "function gh(a,b){var c;if(b){var d=this;c=function(a){var c=hh.call(d,a);a=void 0===c?a:null===c?d.yb():c;b.call(d,a);return c}}else c=hh;gh.aa.constructor.call(this,ih,c);this.Xa(a||\"\")}", "function MatchData() {}", "function oi(){}", "static fromTR(t, r) {\nreturn this.fromTRV(t.xyz, r.xyzw);\n}", "bindCorrectContext() {\n\t\tthis.onTitleChange = this.onTitleChange.bind(this);\n\t\tthis.onShowDockingToolTip = this.onShowDockingToolTip.bind(this);\n\t\tthis.onToggleDockingIcon = this.onToggleDockingIcon.bind(this);\n\t\tthis.onDockingEnabledChanged = this.onDockingEnabledChanged.bind(this);\n\t\tthis.onAlwaysOnTopChanged = this.onAlwaysOnTopChanged.bind(this);\n\t\tthis.showLinkerButton = this.showLinkerButton.bind(this);\n\t\tthis.isTopRight = this.isTopRight.bind(this);\n\t\tthis.allowDragOnCenterRegion = this.allowDragOnCenterRegion.bind(this);\n\t\tthis.disallowDragOnCenterRegion = this.disallowDragOnCenterRegion.bind(this);\n\n\t\tthis.onShareEmitterChanged = this.onShareEmitterChanged.bind(this);\n\t\tthis.onTabsChanged = this.onTabsChanged.bind(this);\n\t\tthis.onShowTabsChanged = this.onShowTabsChanged.bind(this);\n\t\tthis.onHackScrollbarChanged = this.onHackScrollbarChanged.bind(this);\n\t\tthis.onTilingStop = this.onTilingStop.bind(this);\n\t\tthis.onTilingStart = this.onTilingStart.bind(this);\n\t\tthis.resizeDragHandle = this.resizeDragHandle.bind(this);\n\t\tthis.onDoubleClick = this.onDoubleClick.bind(this);\n\n\t}", "formRenderOrder() {\n const feelingComp = (<IntegrationAutosuggest\n value={this.state.feeling}\n onChangeFunc={this.onChange}\n placeHolder={StatementMaker.defaultFeeling(this.state.category)}\n optionName=\"feeling\"\n suggestionsProps={this.correctSuggestions(this.props.feelingSuggestions)}\n key={1}\n />)\n\n const thingComp = (<IntegrationAutosuggest\n value={this.state.thing}\n onChangeFunc={this.onChange}\n placeHolder=\"opinion subject\"\n optionName=\"thing\"\n suggestionsProps={this.props.thingSuggestions}\n key={2}\n />)\n\n if (this.state.category === 'verb'){\n return [<div className=\"description-i\" key={0}>I</div>, feelingComp, thingComp]\n } else {\n return [thingComp, feelingComp]\n }\n\n }", "function ajaxConvert(s,response,jqXHR,isSuccess){var conv2,current,conv,tmp,prev,converters={},// Work with a copy of dataTypes in case we need to modify it for conversion\ndataTypes=s.dataTypes.slice();// Create converters map with lowercased keys\nif(dataTypes[1]){for(conv in s.converters){converters[conv.toLowerCase()]=s.converters[conv];}}current=dataTypes.shift();// Convert to each sequential dataType\nwhile(current){if(s.responseFields[current]){jqXHR[s.responseFields[current]]=response;}// Apply the dataFilter if provided\nif(!prev&&isSuccess&&s.dataFilter){response=s.dataFilter(response,s.dataType);}prev=current;current=dataTypes.shift();if(current){// There's only work to do if current dataType is non-auto\nif(current===\"*\"){current=prev;// Convert response if prev dataType is non-auto and differs from current\n}else if(prev!==\"*\"&&prev!==current){// Seek a direct converter\nconv=converters[prev+\" \"+current]||converters[\"* \"+current];// If none found, seek a pair\nif(!conv){for(conv2 in converters){// If conv2 outputs current\ntmp=conv2.split(\" \");if(tmp[1]===current){// If prev can be converted to accepted input\nconv=converters[prev+\" \"+tmp[0]]||converters[\"* \"+tmp[0]];if(conv){// Condense equivalence converters\nif(conv===true){conv=converters[conv2];// Otherwise, insert the intermediate dataType\n}else if(converters[conv2]!==true){current=tmp[0];dataTypes.unshift(tmp[1]);}break;}}}}// Apply converter (if not an equivalence)\nif(conv!==true){// Unless errors are allowed to bubble, catch and return them\nif(conv&&s.throws){response=conv(response);}else{try{response=conv(response);}catch(e){return{state:\"parsererror\",error:conv?e:\"No conversion from \"+prev+\" to \"+current};}}}}}}return{state:\"success\",data:response};}", "function ajaxConvert(s,response,jqXHR,isSuccess){var conv2,current,conv,tmp,prev,converters={},// Work with a copy of dataTypes in case we need to modify it for conversion\ndataTypes=s.dataTypes.slice();// Create converters map with lowercased keys\nif(dataTypes[1]){for(conv in s.converters){converters[conv.toLowerCase()]=s.converters[conv];}}current=dataTypes.shift();// Convert to each sequential dataType\nwhile(current){if(s.responseFields[current]){jqXHR[s.responseFields[current]]=response;}// Apply the dataFilter if provided\nif(!prev&&isSuccess&&s.dataFilter){response=s.dataFilter(response,s.dataType);}prev=current;current=dataTypes.shift();if(current){// There's only work to do if current dataType is non-auto\nif(current===\"*\"){current=prev;// Convert response if prev dataType is non-auto and differs from current\n}else if(prev!==\"*\"&&prev!==current){// Seek a direct converter\nconv=converters[prev+\" \"+current]||converters[\"* \"+current];// If none found, seek a pair\nif(!conv){for(conv2 in converters){// If conv2 outputs current\ntmp=conv2.split(\" \");if(tmp[1]===current){// If prev can be converted to accepted input\nconv=converters[prev+\" \"+tmp[0]]||converters[\"* \"+tmp[0]];if(conv){// Condense equivalence converters\nif(conv===true){conv=converters[conv2];// Otherwise, insert the intermediate dataType\n}else if(converters[conv2]!==true){current=tmp[0];dataTypes.unshift(tmp[1]);}break;}}}}// Apply converter (if not an equivalence)\nif(conv!==true){// Unless errors are allowed to bubble, catch and return them\nif(conv&&s.throws){response=conv(response);}else{try{response=conv(response);}catch(e){return{state:\"parsererror\",error:conv?e:\"No conversion from \"+prev+\" to \"+current};}}}}}}return{state:\"success\",data:response};}", "function Event_MatchEventData(data1, data2, eClass, eEvent, theObject)\n{\n\t//return value, default is failed\n\tvar bRes = false;\n\t//are they both null?\n\tif ((data1 == null || data1.length == 0 || data1.length == 1 && String_IsNullOrWhiteSpace(data1[0])) && (data2 == null || data2.length == 0 || data2.length == 1 && String_IsNullOrWhiteSpace(data2[0])))\n\t{\n\t\t//match, all done\n\t\tbRes = true;\n\t}\n\t//neither is null\n\telse if (data1 != null && data2 != null)\n\t{\n\t\t//their sizes match?\n\t\tif (data1.length == data2.length)\n\t\t{\n\t\t\t//assume they match\n\t\t\tbRes = true;\n\t\t\t//loop through them\n\t\t\tfor (var i = 0, c = data1.length; i < c; i++)\n\t\t\t{\n\t\t\t\t//compare them\n\t\t\t\tif (!Event_MatchStrings(data1[i], data2[i]))\n\t\t\t\t{\n\t\t\t\t\t//failed\n\t\t\t\t\tbRes = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//still not good?\n\t\tif (!bRes)\n\t\t{\n\t\t\t//switch on the class\n\t\t\tswitch (eClass)\n\t\t\t{\n\t\t\t\tcase __NEMESIS_CLASS_COMBO_BOX:\n\t\t\t\t\t//one is 1 value and the other 2?\n\t\t\t\t\tif (data1.length == 1 && data2.length > 1 || data1.length > 1 && data2.length == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\t//data1 is the one?\n\t\t\t\t\t\tif (data1.length == 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//resplit it\n\t\t\t\t\t\t\tdata1 = data1[0].split(__COMBOBOX_LISTBOX_SEPARATOR2);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//split 2\n\t\t\t\t\t\t\tdata2 = data2[0].split(__COMBOBOX_LISTBOX_SEPARATOR2);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//both have the same length?\n\t\t\t\t\t\tif (data1.length == data2.length)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//recompare them\n\t\t\t\t\t\t\tbRes = this.MatchEventData(data1, data2, eClass, eEvent, theObject);\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_CLASS_LIST_VIEW:\n\t\t\t\t\t//they have at least 1 value\n\t\t\t\t\tif (data1.length > 0 && data2.length > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t//first value must match\n\t\t\t\t\t\tif (Event_MatchStrings(data1[0], data2[0]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//if tutorial has second value then it must match the one from the action\n\t\t\t\t\t\t\tif (data1.length == 1 || Event_MatchStrings(data1[1], data2[1]))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//we are good\n\t\t\t\t\t\t\t\tbRes = true;\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\tbreak;\n\t\t\t\tcase __NEMESIS_CLASS_TREE_GRID:\n\t\t\t\t\t//need to have 2 values on each\n\t\t\t\t\tif (data1.length > 1 && data2.length > 1)\n\t\t\t\t\t{\n\t\t\t\t\t\t//second value must match\n\t\t\t\t\t\tif (Event_MatchStrings(data1[1], data2[1]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//try to break the second value\n\t\t\t\t\t\t\tvar classData = data1[1].split(\":\");\n\t\t\t\t\t\t\t//got two items?\n\t\t\t\t\t\t\tif (classData.length == 2)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//try to get the class\n\t\t\t\t\t\t\t\tswitch (Get_Class(classData[0]))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcase __NEMESIS_CLASS_LINK:\n\t\t\t\t\t\t\t\t\tcase __NEMESIS_CLASS_PUSH_BUTTON:\n\t\t\t\t\t\t\t\t\tcase __NEMESIS_CLASS_IMAGE_BUTTON:\n\t\t\t\t\t\t\t\t\tcase __NEMESIS_CLASS_RADIO_BUTTON:\n\t\t\t\t\t\t\t\t\tcase __NEMESIS_CLASS_CHECK_BOX:\n\t\t\t\t\t\t\t\t\t\t//ok, we dont care about data here\n\t\t\t\t\t\t\t\t\t\tbRes = true;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase __NEMESIS_CLASS_EDIT:\n\t\t\t\t\t\t\t\t\t\t//check the event\n\t\t\t\t\t\t\t\t\t\tswitch (eEvent)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tcase __NEMESIS_EVENT_MATCHCODE:\n\t\t\t\t\t\t\t\t\t\t\tcase __NEMESIS_EVENT_DBLCLICK:\n\t\t\t\t\t\t\t\t\t\t\tcase __NEMESIS_EVENT_RIGHTCLICK:\n\t\t\t\t\t\t\t\t\t\t\tcase __NEMESIS_EVENT_CLICK:\n\t\t\t\t\t\t\t\t\t\t\t\t//ok, we dont care about data here\n\t\t\t\t\t\t\t\t\t\t\t\tbRes = true;\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\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}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase __NEMESIS_CLASS_ULTRAGRID:\n\t\t\t\t\t//get target1\n\t\t\t\t\tvar target1 = UltraGrid_GetTarget(theObject, data1[0]);\n\t\t\t\t\t//and target 2\n\t\t\t\t\tvar target2 = UltraGrid_GetTarget(theObject, data2[0]);\n\t\t\t\t\t//Target's match?\n\t\t\t\t\tif (target1 == target2)\n\t\t\t\t\t{\n\t\t\t\t\t\t//try to get the class\n\t\t\t\t\t\tswitch (target1.DataObject ? target1.DataObject.Class : __NEMESIS_CLASS_UNKNOWN)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcase __NEMESIS_CLASS_LINK:\n\t\t\t\t\t\t\tcase __NEMESIS_CLASS_PUSH_BUTTON:\n\t\t\t\t\t\t\tcase __NEMESIS_CLASS_IMAGE_BUTTON:\n\t\t\t\t\t\t\tcase __NEMESIS_CLASS_RADIO_BUTTON:\n\t\t\t\t\t\t\tcase __NEMESIS_CLASS_CHECK_BOX:\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t//ok, we dont care about data here\n\t\t\t\t\t\t\t\tbRes = true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase __NEMESIS_CLASS_EDIT:\n\t\t\t\t\t\t\t\t//check the event\n\t\t\t\t\t\t\t\tswitch (eEvent)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcase __NEMESIS_EVENT_MATCHCODE:\n\t\t\t\t\t\t\t\t\tcase __NEMESIS_EVENT_DBLCLICK:\n\t\t\t\t\t\t\t\t\tcase __NEMESIS_EVENT_RIGHTCLICK:\n\t\t\t\t\t\t\t\t\tcase __NEMESIS_EVENT_CLICK:\n\t\t\t\t\t\t\t\t\t\t//ok, we dont care about data here\n\t\t\t\t\t\t\t\t\t\tbRes = true;\n\t\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\t\t//recompare the data based on edit\n\t\t\t\t\t\t\t\t\t\tbRes = Event_MatchEventData(data1[1], data2[1], __NEMESIS_CLASS_EDIT, eEvent, target1);\n\t\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\tbreak;\n\t\t\t\t\t\t\tcase __NEMESIS_CLASS_COMBO_BOX:\n\t\t\t\t\t\t\t\t//recompare the data based on combobox\n\t\t\t\t\t\t\t\tbRes = Event_MatchEventData(data1[1], data2[1], __NEMESIS_CLASS_COMBO_BOX, eEvent, target1);\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}\n\t\t}\n\t}\n\t//return the result\n\treturn bRes;\n}", "function combine(item1, item2){\n if (!item1 || !item2){return false;}\n var type1 = loader.res.items[item1.type];\n var type2 = loader.res.items[item2.type];\n if (type1 && type2 && type1.on && type2.actions){\n for (var k in type1.on){\n var fun = type1.on[k];\n if (type2.actions.includes(k)){\n fun.call(item1, item2);\n }\n }\n }\n}", "handle() {}", "setHandlers() {\n this.rowLabels.forEach(\n (rowLabel) =>\n (rowLabel.onclick = () => this.rowLabelClickHandler(rowLabel))\n );\n\n this.difficultyRadios.forEach((radio) => this.radioHandler(radio));\n\n this.playNowBtn.onclick = (e) => this.playNowBtnClickHandler(e);\n\n this.leaderboards.onclick = () => this.openOverlay();\n\n this.closeBtn.onclick = () => this.closeOverlay();\n\n this.playerID.onclick = () => this.changeNameClickHandler();\n\n this.changeName.onclick = () => this.changeNameClickHandler();\n }", "transient private public function m183() {}", "function handlePreds2(pred) {\n if (pred.type == 'if statement' || pred.type == 'else if statement') {\n var callback = pred.type == 'else if statement' ? handleElse : undefined;\n handleIfStatement(pred, callback);\n } else if (pred.type == 'assignment expression') {\n handleAssignmentExp(pred);\n } else handlePreds3(pred);\n}", "function handleBindEventHandlers(){\n handleAddBookmark();\n handleFilterRating();\n handleDeleteBookmark();\n handleAddForm();\n handleDescExpand();\n handleCloseButton();\n }", "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}", "preprocessData(type) {\n if (type == \"Genomes\")\n this.preprocessGenomes();\n else if (type == \"Paired-end Reads\")\n this.preprocessPairedReads();\n else if (type == \"Single-end Reads\")\n this.preprocessSingleReads();\n else if (type == \"Interleaved Paired-end Reads\")\n this.preprocessSingleReads();\n }", "function ResponseBase() {}", "static private protected public internal function m117() {}", "handleResponse (responseData) {\n\t\t// put all our deleted objects in the response\n\t\t['posts', 'codemarks', 'reviews', 'codeErrors', 'markers'].forEach(collection => {\n\t\t\tresponseData[collection] = this.transforms[`${collection}Deleted`];\n\t\t});\n\n\t\t// if a parent post, codemark, and/or review were touched, put those in the response\n\t\tif (this.transforms.updatedPost) {\n\t\t\tresponseData.posts.push(this.transforms.updatedPost);\n\t\t}\n\t\tif (this.transforms.updatedGrandParentPost) {\n\t\t\tresponseData.posts.push(this.transforms.updatedGrandParentPost);\n\t\t}\n\t\tif (this.transforms.updatedCodemark) {\n\t\t\tresponseData.codemarks = responseData.codemarks || [];\n\t\t\tresponseData.codemarks.push(this.transforms.updatedCodemark);\n\t\t}\n\t\tif (this.transforms.updatedReview) {\n\t\t\tresponseData.reviews = responseData.reviews || [];\n\t\t\tresponseData.reviews.push(this.transforms.updatedReview);\n\t\t}\n\t\tif (this.transforms.updatedCodeError) {\n\t\t\tresponseData.codeErrors = responseData.codeErrors || [];\n\t\t\tresponseData.codeErrors.push(this.transforms.updatedCodeError);\n\t\t}\n\n\t\t// if any related codemarks were touched, add that to the response\n\t\tif (this.transforms.unrelatedCodemarks) {\n\t\t\tresponseData.codemarks.push(...this.transforms.unrelatedCodemarks);\n\t\t}\n\t}", "mapMessage(messageObj) {\n if (this.mappedEvent(messageObj,this.meetingEvents)) {\n this.meetingTemplate(messageObj);\n } else if (this.mappedEvent(messageObj,this.userEvents)) {\n this.userTemplate(messageObj);\n } else if (this.mappedEvent(messageObj,this.chatEvents)) {\n this.chatTemplate(messageObj);\n } else if (this.mappedEvent(messageObj,this.rapEvents)) {\n this.rapTemplate(messageObj);\n } else if (this.mappedEvent(messageObj,this.compMeetingEvents)) {\n this.compMeetingTemplate(messageObj);\n } else if (this.mappedEvent(messageObj,this.compUserEvents)) {\n this.compUserTemplate(messageObj);\n } else if (this.mappedEvent(messageObj,this.compRapEvents)) {\n this.compRapTemplate(messageObj);\n }\n }", "static transform() {}", "function initHandlers(el) {\n $(el).find('.move-records-btn').click(moveRecordsBtnClickHandler);\n\n $(el).find('.proceed-move').click(() => {\n proceedClickHandler(el);\n });\n\n $(el).find('.close-move-dlg').click(() => {\n $.fancybox.close();\n });\n }", "function ajaxConvert(s,response,jqXHR,isSuccess){var conv2,current,conv,tmp,prev,converters={},// Work with a copy of dataTypes in case we need to modify it for conversion\ndataTypes=s.dataTypes.slice();// Create converters map with lowercased keys\nif(dataTypes[1]){for(conv in s.converters){converters[conv.toLowerCase()]=s.converters[conv];}}current=dataTypes.shift();// Convert to each sequential dataType\nwhile(current){if(s.responseFields[current]){jqXHR[s.responseFields[current]]=response;}// Apply the dataFilter if provided\nif(!prev&&isSuccess&&s.dataFilter){response=s.dataFilter(response,s.dataType);}prev=current;current=dataTypes.shift();if(current){// There's only work to do if current dataType is non-auto\nif(current===\"*\"){current=prev;// Convert response if prev dataType is non-auto and differs from current\n}else if(prev!==\"*\"&&prev!==current){// Seek a direct converter\nconv=converters[prev+\" \"+current]||converters[\"* \"+current];// If none found, seek a pair\nif(!conv){for(conv2 in converters){// If conv2 outputs current\ntmp=conv2.split(\" \");if(tmp[1]===current){// If prev can be converted to accepted input\nconv=converters[prev+\" \"+tmp[0]]||converters[\"* \"+tmp[0]];if(conv){// Condense equivalence converters\nif(conv===true){conv=converters[conv2];// Otherwise, insert the intermediate dataType\n}else if(converters[conv2]!==true){current=tmp[0];dataTypes.unshift(tmp[1]);}break;}}}}// Apply converter (if not an equivalence)\nif(conv!==true){// Unless errors are allowed to bubble, catch and return them\nif(conv&&s[\"throws\"]){// jscs:ignore requireDotNotation\nresponse=conv(response);}else{try{response=conv(response);}catch(e){return{state:\"parsererror\",error:conv?e:\"No conversion from \"+prev+\" to \"+current};}}}}}}return{state:\"success\",data:response};}", "matches(other) {\nvar FOURCC, ROT, TRANS, TRS, eq;\n//------\nTRS = CASTRSet;\neq = this === other;\n// (JS: is 'instanceof' going to be OK here?)\nif (!eq && (other instanceof TRS)) {\nFOURCC = other.getFourCC();\nTRANS = other.getTranslation();\nROT = other.getRotation();\nif (this.fourCCName === FOURCC) {\nif (TRS.equalTrans(this.translation, TRANS)) {\nif (TRS.approxEqRots(this.rotation, ROT)) {\neq = true;\n}\n}\n}\n}\nreturn eq;\n}", "_events() {\n this._eventsForHandle(this.$handle);\n if(this.handles[1]) {\n this._eventsForHandle(this.$handle2);\n }\n }", "visit(){\n\t\tif(!this.parent || this.parent.content)\n\t\t\treturn this.convert(...arguments)\n\t}", "function redCommonAdversaries(idx, homeTeam, awayTeam){\r\n/*in the reduced format we don't need data from the curent weeks matches ecause we will not display\r\n * forms, or goals data just weeks, teams and results that we already have from form data request\t*/\r\n\tconsole.log(\"in redCommonAdversaries\");\r\n\t\r\n\t\r\n\tvar t1spoting=[];\r\n\tvar t2spoting=[];\r\n\r\n\t\r\n\t\r\n\tvar tab= $(\"#common\"+idx).find('td');\r\n\ttab[0].innerHTML=homeTeam;\r\n\t$(tab[0]).css({'font-size':18});\r\n\t$(tab[0]).css(\"font-weight\",\"Bold\");\r\n\t$(tab[0]).css('text-decoration', 'underline')\r\n\ttab[1].innerHTML=awayTeam;\r\n\t$(tab[1]).css({'font-size':18});\r\n\t$(tab[1]).css(\"font-weight\",\"Bold\");\r\n\t$(tab[1]).css('text-decoration', 'underline')\r\n\t\r\n\t\r\n\tvar currentWeek= compRedData[compRedData.length-2][0]+1;\r\n\tvar advObj1={};\r\n\tvar advObj2={};\r\n\t\r\n\t\r\n\tfor(var i=compRedData.length-2;i>=0;i--){\r\n\t\tif(compRedData[i][0] + commonBackWeeksSearch < currentWeek){break;} // iterate 10 last weeks\r\n\t\tif(homeTeam === compRedData[i][1]){\r\n\t\t\tadvObj1={datWeek:compRedData[i][0], team:homeTeam, adv:compRedData[i][2], pos:i, inOut:\"In\", tRes:compRedData[i][3],\r\n\t\t\t\t\tadvRes:compRedData[i][4]\r\n\t\t\t\t\t/*, tForm:weeklyMatches[i].t1form, advForm:weeklyMatches[i].t2form,\r\n\t\t\t\t\t tAtack:(compRedData[i][7]), advAtak:(weeklyMatches[i].t2atackIn +weeklyMatches[i].t2atackOut),\r\n\t\t\t\t\t tDef:(weeklyMatches[i].t1defIn +weeklyMatches[i].t1defOut), advDef:(weeklyMatches[i].t2defIn +weeklyMatches[i].t2defOut),\r\n\t\t\t\t\t tAvgScore:(weeklyMatches[i].t1AvgScoreIn + weeklyMatches[i].t1AvgScoreOut), \r\n\t\t\t\t\t advAvgScore:(weeklyMatches[i].t2AvgScoreIn + weeklyMatches[i].t2AvgScoreOut)*/\r\n\t\t\t\t };\r\n\t\t\t\t t1spoting.push(advObj1);\r\n\t\t}\r\n\t\telse if(homeTeam == compRedData[i][2]){\r\n\t\t\tadvObj1={datWeek:compRedData[i][0], team:homeTeam, adv:compRedData[i][1], pos:i, inOut:\"Out\", tRes:compRedData[i][4], \r\n\t\t\t\t\tadvRes:compRedData[i][3]\r\n\t\t\t\t\t/*, tForm:weeklyMatches[i].t2form, advForm:weeklyMatches[i].t1form, \r\n\t\t\t\t\t tAtack:(weeklyMatches[i].t2atackIn +weeklyMatches[i].t2atackOut), advAtak:(weeklyMatches[i].t1atackIn +weeklyMatches[i].t1atackOut),\r\n\t\t\t\t\t tDef:(weeklyMatches[i].t2defIn +weeklyMatches[i].t2defOut), advDef:(weeklyMatches[i].t1defIn +weeklyMatches[i].t1defOut),\r\n\t\t\t\t\t tAvgScore:(weeklyMatches[i].t2AvgScoreIn + weeklyMatches[i].t2AvgScoreOut), \r\n\t\t\t\t\t advAvgScore:(weeklyMatches[i].t1AvgScoreIn + weeklyMatches[i].t1AvgScoreOut)*/\r\n\t\t\t\t };\r\n\t\t\t\t t1spoting.push(advObj1);\r\n\t\t}\r\n\t\t\r\n\t\tif(awayTeam ==compRedData[i][1]){\r\n\t\t\tadvObj2={datWeek:compRedData[i][0], team:awayTeam, adv:compRedData[i][2], pos:i, inOut:\"In\", tRes:compRedData[i][3],\r\n\t\t\t\t\tadvRes:compRedData[i][4]\r\n\t\t\t\t\t/*, tForm:weeklyMatches[i].t1form, advForm:weeklyMatches[i].t2form,\r\n\t\t\t\t\t tAtack:(weeklyMatches[i].t1atackIn +weeklyMatches[i].t1atackOut), advAtak:(weeklyMatches[i].t2atackIn +weeklyMatches[i].t2atackOut),\r\n\t\t\t\t\t tDef:(weeklyMatches[i].t1defIn +weeklyMatches[i].t1defOut), advDef:(weeklyMatches[i].t2defIn +weeklyMatches[i].t2defOut),\r\n\t\t\t\t\t tAvgScore:(weeklyMatches[i].t1AvgScoreIn + weeklyMatches[i].t1AvgScoreOut), \r\n\t\t\t\t\t advAvgScore:(weeklyMatches[i].t2AvgScoreIn + weeklyMatches[i].t2AvgScoreOut)*/\r\n\t\t\t\t };\r\n\t\t\t\t t2spoting.push(advObj2);\r\n\t\t}\r\n\t\telse if(awayTeam == compRedData[i][2]){\r\n\t\t\tadvObj2={datWeek:compRedData[i][0], team:awayTeam, adv:compRedData[i][1], pos:i, inOut:\"Out\", tRes:compRedData[i][4],\r\n\t\t\t\t\tadvRes:compRedData[i][3]\r\n\t\t\t\t\t/*, tForm:weeklyMatches[i].t2form, advForm:weeklyMatches[i].t1form, \r\n\t\t\t\t\t tAtack:(weeklyMatches[i].t2atackIn +weeklyMatches[i].t2atackOut), advAtak:(weeklyMatches[i].t1atackIn +weeklyMatches[i].t1atackOut),\r\n\t\t\t\t\t tDef:(weeklyMatches[i].t2defIn +weeklyMatches[i].t2defOut), advDef:(weeklyMatches[i].t1defIn +weeklyMatches[i].t1defOut),\r\n\t\t\t\t\t tAvgScore:(weeklyMatches[i].t2AvgScoreIn + weeklyMatches[i].t2AvgScoreOut), \r\n\t\t\t\t\t advAvgScore:(weeklyMatches[i].t1AvgScoreIn + weeklyMatches[i].t1AvgScoreOut)*/\r\n\t\t\t\t };\r\n\t\t\t\t t2spoting.push(advObj2);\r\n\t\t}\r\n\t}\t\r\n\t\r\n\t//---------------search first 3 common adv from t1spotiong then 2 from t2 spoting for tot of last 5 common adversaries\r\n\t// when a common adv is found we pair them so that we know which match in spot1 corresponds to spot2\r\n\tvar count=0;\r\n\tfor(var i=0;i<t1spoting.length;i++){// i & j =1 and not 0 because 0 has the current match data\r\n\t\tif(count>=3){break;}\r\n\t\tfor(var j=0;j<t2spoting.length;j++){\r\n\t\t\tif(t2spoting[j].pair!==undefined){continue;}\r\n\t\t\tif(t1spoting[i].adv ==t2spoting[j].adv){//-> found a common Adversary\r\n\t\t\t\tt1spoting[i].pair=j;\r\n\t\t\t\tt2spoting[j].pair=i;\r\n\t\t\t\tcount++;\r\n\t\t\t\r\n\t\t\t\t/*t1spoting[i].newForn = t1spoting[i-1].tForm;\r\n\t\t\t\tt1spoting[i].newAtack = t1spoting[i-1].tAtack;\r\n\t\t\t\tt1spoting[i].newDef = t1spoting[i-1].tDef;\r\n\t\t\t\t\r\n\t\t\t\tt2spoting[j].newForn = t2spoting[j-1].tForm;\r\n t2spoting[j].newAtack = t2spoting[j-1].tAtack;\r\n t2spoting[j].newDef = t2spoting[j-1].tDef;*/\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tcount=0;\r\n\tfor(var i=0;i<t2spoting.length;i++){\r\n\t\tif(count>=2){break;}\r\n\t\tif(t2spoting[i].pair!==undefined){continue;}\r\n\t\tfor(var j=0;j<t1spoting.length;j++){\r\n\t\t\tif(t1spoting[j].pair!==undefined){continue;}\r\n\t\t\t\r\n\t\t\tif(t2spoting[i].adv ==t1spoting[j].adv){//-> found a common Adversary\r\n\t\t\t\tt2spoting[i].pair=j;\r\n\t\t\t\tt1spoting[j].pair=i;\r\n\t\t\t\tcount++;\r\n\t\t\t\r\n\t\t\t\t/*t1spoting[j].newForn = t1spoting[j-1].tForm;\r\n\t\t\t\tt1spoting[j].newAtack = t1spoting[j-1].tAtack;\r\n\t\t\t\tt1spoting[j].newDef = t1spoting[j-1].tDef;\r\n\t\t\t\t\r\n\t\t\t\tt2spoting[i].newForn = t2spoting[i-1].tForm;\r\n t2spoting[i].newAtack = t2spoting[i-1].tAtack;\r\n t2spoting[i].newDef = t2spoting[i-1].tDef;*/\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\t\r\n\t\t\r\n\tvar directadv =[];\r\n\t//show their direct previous encounters\r\n\tfor(var i=0;i<t1spoting.length;i++){\r\n//\t\tconsole.log(\"direct -- t1spoting \"+j+\" \"+t1spoting[i].adv);\r\n\t\tif( t1spoting[i].adv==awayTeam){\r\n\t\t\tdirectadv.push(t1spoting[i]);\r\n\t\t\ttobj={week:t1spoting[i].datWeek, tname:homeTeam, adv:awayTeam, io:t1spoting[i].inOut, t1Res:t1spoting[i].tRes, t2Res:t1spoting[i].advRes};\r\n\t\t\tcommonAdvTabShower(idx, tobj, null);\r\n\t\t}\r\n\t}\r\n\r\n\tvar tobj1;\r\n\tvar tobj2;\r\n\tvar pos2;\r\n\tfor(var i=1;i<t1spoting.length;i++){\r\n\t\tif(t1spoting[i].pair!==undefined){\r\n\t\t\ttobj1={week:t1spoting[i].datWeek, tname:t1spoting[i].team, adv:t1spoting[i].adv, io:t1spoting[i].inOut, t1Res:t1spoting[i].tRes, t2Res:t1spoting[i].advRes};\r\n\t\t\tpos2=t1spoting[i].pair;\r\n\t\t\ttobj2={week:t2spoting[pos2].datWeek,tname:t2spoting[pos2].team, adv:t2spoting[pos2].adv, io:t2spoting[pos2].inOut, t1Res:t2spoting[pos2].tRes, t2Res:t2spoting[pos2].advRes};\r\n\t\t\tcommonAdvTabShower(idx, tobj1, tobj2);\r\n\t\t}\r\n\t}\r\n\t\r\n}", "function DWRUtil() { }", "function miFuncion (){}" ]
[ "0.5676095", "0.5626806", "0.53722394", "0.53318346", "0.5197178", "0.51467043", "0.5120553", "0.49524674", "0.49363863", "0.49082074", "0.49078873", "0.49005833", "0.48705915", "0.48443982", "0.47343245", "0.46473324", "0.46456856", "0.45747054", "0.45685592", "0.4560121", "0.45307997", "0.45266825", "0.45191738", "0.44858304", "0.4485182", "0.44699612", "0.44695556", "0.44656858", "0.44617397", "0.44516116", "0.443478", "0.4427493", "0.4423588", "0.44057268", "0.43951887", "0.43946412", "0.4388764", "0.43636662", "0.4361887", "0.43519476", "0.43370733", "0.43196553", "0.4312371", "0.430068", "0.42996502", "0.42917567", "0.42917567", "0.42917567", "0.4273859", "0.4271746", "0.42582956", "0.4251837", "0.42445752", "0.42388037", "0.42380136", "0.42377627", "0.4224543", "0.42231166", "0.42172432", "0.42168146", "0.42149454", "0.42125526", "0.4210841", "0.4209989", "0.42066973", "0.42065516", "0.41998917", "0.4195348", "0.41950142", "0.41935664", "0.41904122", "0.4186255", "0.4185274", "0.41789225", "0.41726008", "0.41669026", "0.41656622", "0.41639948", "0.41639948", "0.4163801", "0.41627407", "0.41617233", "0.41597682", "0.41593105", "0.41538233", "0.4146379", "0.4145108", "0.41440699", "0.41405705", "0.41359514", "0.4131685", "0.4130879", "0.4128241", "0.41279072", "0.41269347", "0.4126623", "0.4121931", "0.41180837", "0.41180342", "0.41168213", "0.4116083" ]
0.0
-1
standardize case and plurality in units
function normalizeUnit(unit) { var normalized = { year: "year", years: "year", month: "month", months: "month", day: "day", days: "day", hour: "hour", hours: "hour", minute: "minute", minutes: "minute", quarter: "quarter", quarters: "quarter", second: "second", seconds: "second", millisecond: "millisecond", milliseconds: "millisecond", weekday: "weekday", weekdays: "weekday", weeknumber: "weekNumber", weeksnumber: "weekNumber", weeknumbers: "weekNumber", weekyear: "weekYear", weekyears: "weekYear", ordinal: "ordinal" }[unit.toLowerCase()]; if (!normalized) throw new InvalidUnitError(unit); return normalized; } // this is a dumbed down version of fromObject() that runs about 60% faster
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "pluralize(name) {\n const plural = this.pluralNames[name];\n if (plural) {\n return plural;\n }\n // singular and plural are the same\n if (uncountable.indexOf(name.toLowerCase()) >= 0) {\n return name;\n // vowel + y\n }\n else if (/[aeiou]y$/.test(name)) {\n return name + 's';\n // consonant + y\n }\n else if (name.endsWith('y')) {\n return name.substring(0, name.length - 1) + 'ies';\n // endings typically pluralized with 'es'\n }\n else if (/[s|ss|sh|ch|x|z]$/.test(name)) {\n return name + 'es';\n }\n else {\n return name + 's';\n }\n }", "function normalizeUnit(unit) {\n unit = toStr(unit);\n if (unitShorthandMap[unit]) return unitShorthandMap[unit];\n return unit.toLowerCase().replace(regEndS, '');\n }", "function pluralize(value, unit) {\n if (value === 1) {\n unit = unit.slice(0, -1)\n }\n return value + ' ' + unit\n}", "function pluralize(measure) {\n return plurals[measure] || measure\n}", "get unitFormatted() {\r\n\t\treturn this.count > 1 ? this.unit + 's' : this.unit;\r\n\t}", "function handleUnit(unit) {\n switch(unit) {\n case \"MT\":\n return \"Minutes\";\n case \"HT\":\n return \"Hours\";\n case \"D\":\n return \"Days\";\n case \"M\":\n return \" Months\";\n default:\n return \"\";\n }\n}", "function getPluralCase(locale,nLike){if(typeof nLike==='string'){nLike=parseInt(nLike,10);}var n=nLike;var nDecimal=n.toString().replace(/^[^.]*\\.?/,'');var i=Math.floor(Math.abs(n));var v=nDecimal.length;var f=parseInt(nDecimal,10);var t=parseInt(n.toString().replace(/^[^.]*\\.?|0+$/g,''),10)||0;var lang=locale.split('-')[0].toLowerCase();switch(lang){case'af':case'asa':case'az':case'bem':case'bez':case'bg':case'brx':case'ce':case'cgg':case'chr':case'ckb':case'ee':case'el':case'eo':case'es':case'eu':case'fo':case'fur':case'gsw':case'ha':case'haw':case'hu':case'jgo':case'jmc':case'ka':case'kk':case'kkj':case'kl':case'ks':case'ksb':case'ky':case'lb':case'lg':case'mas':case'mgo':case'ml':case'mn':case'nb':case'nd':case'ne':case'nn':case'nnh':case'nyn':case'om':case'or':case'os':case'ps':case'rm':case'rof':case'rwk':case'saq':case'seh':case'sn':case'so':case'sq':case'ta':case'te':case'teo':case'tk':case'tr':case'ug':case'uz':case'vo':case'vun':case'wae':case'xog':if(n===1)return Plural.One;return Plural.Other;case'ak':case'ln':case'mg':case'pa':case'ti':if(n===Math.floor(n)&&n>=0&&n<=1)return Plural.One;return Plural.Other;case'am':case'as':case'bn':case'fa':case'gu':case'hi':case'kn':case'mr':case'zu':if(i===0||n===1)return Plural.One;return Plural.Other;case'ar':if(n===0)return Plural.Zero;if(n===1)return Plural.One;if(n===2)return Plural.Two;if(n%100===Math.floor(n%100)&&n%100>=3&&n%100<=10)return Plural.Few;if(n%100===Math.floor(n%100)&&n%100>=11&&n%100<=99)return Plural.Many;return Plural.Other;case'ast':case'ca':case'de':case'en':case'et':case'fi':case'fy':case'gl':case'it':case'nl':case'sv':case'sw':case'ur':case'yi':if(i===1&&v===0)return Plural.One;return Plural.Other;case'be':if(n%10===1&&!(n%100===11))return Plural.One;if(n%10===Math.floor(n%10)&&n%10>=2&&n%10<=4&&!(n%100>=12&&n%100<=14))return Plural.Few;if(n%10===0||n%10===Math.floor(n%10)&&n%10>=5&&n%10<=9||n%100===Math.floor(n%100)&&n%100>=11&&n%100<=14)return Plural.Many;return Plural.Other;case'br':if(n%10===1&&!(n%100===11||n%100===71||n%100===91))return Plural.One;if(n%10===2&&!(n%100===12||n%100===72||n%100===92))return Plural.Two;if(n%10===Math.floor(n%10)&&(n%10>=3&&n%10<=4||n%10===9)&&!(n%100>=10&&n%100<=19||n%100>=70&&n%100<=79||n%100>=90&&n%100<=99))return Plural.Few;if(!(n===0)&&n%1e6===0)return Plural.Many;return Plural.Other;case'bs':case'hr':case'sr':if(v===0&&i%10===1&&!(i%100===11)||f%10===1&&!(f%100===11))return Plural.One;if(v===0&&i%10===Math.floor(i%10)&&i%10>=2&&i%10<=4&&!(i%100>=12&&i%100<=14)||f%10===Math.floor(f%10)&&f%10>=2&&f%10<=4&&!(f%100>=12&&f%100<=14))return Plural.Few;return Plural.Other;case'cs':case'sk':if(i===1&&v===0)return Plural.One;if(i===Math.floor(i)&&i>=2&&i<=4&&v===0)return Plural.Few;if(!(v===0))return Plural.Many;return Plural.Other;case'cy':if(n===0)return Plural.Zero;if(n===1)return Plural.One;if(n===2)return Plural.Two;if(n===3)return Plural.Few;if(n===6)return Plural.Many;return Plural.Other;case'da':if(n===1||!(t===0)&&(i===0||i===1))return Plural.One;return Plural.Other;case'dsb':case'hsb':if(v===0&&i%100===1||f%100===1)return Plural.One;if(v===0&&i%100===2||f%100===2)return Plural.Two;if(v===0&&i%100===Math.floor(i%100)&&i%100>=3&&i%100<=4||f%100===Math.floor(f%100)&&f%100>=3&&f%100<=4)return Plural.Few;return Plural.Other;case'ff':case'fr':case'hy':case'kab':if(i===0||i===1)return Plural.One;return Plural.Other;case'fil':if(v===0&&(i===1||i===2||i===3)||v===0&&!(i%10===4||i%10===6||i%10===9)||!(v===0)&&!(f%10===4||f%10===6||f%10===9))return Plural.One;return Plural.Other;case'ga':if(n===1)return Plural.One;if(n===2)return Plural.Two;if(n===Math.floor(n)&&n>=3&&n<=6)return Plural.Few;if(n===Math.floor(n)&&n>=7&&n<=10)return Plural.Many;return Plural.Other;case'gd':if(n===1||n===11)return Plural.One;if(n===2||n===12)return Plural.Two;if(n===Math.floor(n)&&(n>=3&&n<=10||n>=13&&n<=19))return Plural.Few;return Plural.Other;case'gv':if(v===0&&i%10===1)return Plural.One;if(v===0&&i%10===2)return Plural.Two;if(v===0&&(i%100===0||i%100===20||i%100===40||i%100===60||i%100===80))return Plural.Few;if(!(v===0))return Plural.Many;return Plural.Other;case'he':if(i===1&&v===0)return Plural.One;if(i===2&&v===0)return Plural.Two;if(v===0&&!(n>=0&&n<=10)&&n%10===0)return Plural.Many;return Plural.Other;case'is':if(t===0&&i%10===1&&!(i%100===11)||!(t===0))return Plural.One;return Plural.Other;case'ksh':if(n===0)return Plural.Zero;if(n===1)return Plural.One;return Plural.Other;case'kw':case'naq':case'se':case'smn':if(n===1)return Plural.One;if(n===2)return Plural.Two;return Plural.Other;case'lag':if(n===0)return Plural.Zero;if((i===0||i===1)&&!(n===0))return Plural.One;return Plural.Other;case'lt':if(n%10===1&&!(n%100>=11&&n%100<=19))return Plural.One;if(n%10===Math.floor(n%10)&&n%10>=2&&n%10<=9&&!(n%100>=11&&n%100<=19))return Plural.Few;if(!(f===0))return Plural.Many;return Plural.Other;case'lv':case'prg':if(n%10===0||n%100===Math.floor(n%100)&&n%100>=11&&n%100<=19||v===2&&f%100===Math.floor(f%100)&&f%100>=11&&f%100<=19)return Plural.Zero;if(n%10===1&&!(n%100===11)||v===2&&f%10===1&&!(f%100===11)||!(v===2)&&f%10===1)return Plural.One;return Plural.Other;case'mk':if(v===0&&i%10===1||f%10===1)return Plural.One;return Plural.Other;case'mt':if(n===1)return Plural.One;if(n===0||n%100===Math.floor(n%100)&&n%100>=2&&n%100<=10)return Plural.Few;if(n%100===Math.floor(n%100)&&n%100>=11&&n%100<=19)return Plural.Many;return Plural.Other;case'pl':if(i===1&&v===0)return Plural.One;if(v===0&&i%10===Math.floor(i%10)&&i%10>=2&&i%10<=4&&!(i%100>=12&&i%100<=14))return Plural.Few;if(v===0&&!(i===1)&&i%10===Math.floor(i%10)&&i%10>=0&&i%10<=1||v===0&&i%10===Math.floor(i%10)&&i%10>=5&&i%10<=9||v===0&&i%100===Math.floor(i%100)&&i%100>=12&&i%100<=14)return Plural.Many;return Plural.Other;case'pt':if(n===Math.floor(n)&&n>=0&&n<=2&&!(n===2))return Plural.One;return Plural.Other;case'ro':if(i===1&&v===0)return Plural.One;if(!(v===0)||n===0||!(n===1)&&n%100===Math.floor(n%100)&&n%100>=1&&n%100<=19)return Plural.Few;return Plural.Other;case'ru':case'uk':if(v===0&&i%10===1&&!(i%100===11))return Plural.One;if(v===0&&i%10===Math.floor(i%10)&&i%10>=2&&i%10<=4&&!(i%100>=12&&i%100<=14))return Plural.Few;if(v===0&&i%10===0||v===0&&i%10===Math.floor(i%10)&&i%10>=5&&i%10<=9||v===0&&i%100===Math.floor(i%100)&&i%100>=11&&i%100<=14)return Plural.Many;return Plural.Other;case'shi':if(i===0||n===1)return Plural.One;if(n===Math.floor(n)&&n>=2&&n<=10)return Plural.Few;return Plural.Other;case'si':if(n===0||n===1||i===0&&f===1)return Plural.One;return Plural.Other;case'sl':if(v===0&&i%100===1)return Plural.One;if(v===0&&i%100===2)return Plural.Two;if(v===0&&i%100===Math.floor(i%100)&&i%100>=3&&i%100<=4||!(v===0))return Plural.Few;return Plural.Other;case'tzm':if(n===Math.floor(n)&&n>=0&&n<=1||n===Math.floor(n)&&n>=11&&n<=99)return Plural.One;return Plural.Other;// When there is no specification, the default is always \"other\"\n// Spec: http://cldr.unicode.org/index/cldr-spec/plural-rules\n// > other (required—general plural form — also used if the language only has a single form)\ndefault:return Plural.Other;}}", "function pluralize()\r\n{\r\n var quantity = Number(document.project4.num1.value);\r\n var noun = document.project4.word1.value;\r\n\r\n if (noun == 'mouse') {\r\n if (quantity > 1) {\r\n return quantity + \" mice \";\r\n }\r\n else {\r\n return quantity + \"mouse\";\r\n }\r\n }\r\n else if (noun == 'deer')\r\n {\r\n return quantity + \"deer\";\r\n }\r\n else if (noun == 'cactus')\r\n {\r\n if (quantity > 1)\r\n return quantity + \"cacti\"\r\n }\r\n\r\n if (quantity > 1)\r\n {\r\n //tacK on an 's' tot the noun aka CONCATENATE\r\n return quantity + \" \" + noun + \"s\";\r\n }\r\n else\r\n {\r\n return quantity + \" \" + noun;\r\n }\r\n}", "function unit(i, units) {\n\t if ((typeof i === \"string\") && (!i.match(/^[\\-0-9\\.]+$/))) {\n\t return i;\n\t } else {\n\t return \"\" + i + units;\n\t }\n\t }", "function getUnit(input) {\n return String(input).match(/[\\d.\\-+]*\\s*(.*)/)[1] || '';\n} // Emulate the sass function \"unitless\"", "function getUnit(input) {\n return String(input).match(/[\\d.\\-+]*\\s*(.*)/)[1] || '';\n} // Emulate the sass function \"unitless\"", "function getUnit(input) {\n return String(input).match(/[\\d.\\-+]*\\s*(.*)/)[1] || '';\n} // Emulate the sass function \"unitless\"", "function getUnit(input) {\n return String(input).match(/[\\d.\\-+]*\\s*(.*)/)[1] || '';\n} // Emulate the sass function \"unitless\"", "function getUnit(input) {\n return String(input).match(/[\\d.\\-+]*\\s*(.*)/)[1] || '';\n} // Emulate the sass function \"unitless\"", "function getUnit(input) {\n return String(input).match(/[\\d.\\-+]*\\s*(.*)/)[1] || '';\n} // Emulate the sass function \"unitless\"", "function getUnit(input) {\n return String(input).match(/[\\d.\\-+]*\\s*(.*)/)[1] || '';\n} // Emulate the sass function \"unitless\"", "function getUnit(input) {\n return String(input).match(/[\\d.\\-+]*\\s*(.*)/)[1] || '';\n} // Emulate the sass function \"unitless\"", "function getUnit(input) {\n return String(input).match(/[\\d.\\-+]*\\s*(.*)/)[1] || '';\n} // Emulate the sass function \"unitless\"", "function getUnit(input) {\n return String(input).match(/[\\d.\\-+]*\\s*(.*)/)[1] || '';\n} // Emulate the sass function \"unitless\"", "function s(noun) {\n return noun.smap(pluralize);\n}", "function unit(i, units) {\r\n\t\tif ((typeof i === 'string') && (!i.match(/^[\\-0-9\\.]+$/))) {\r\n\t\t\treturn i;\r\n\t\t} else {\r\n\t\t\treturn '' + i + units;\r\n\t\t}\r\n\t}", "function unit(i, units) {\n if ((typeof i === \"string\") && (!i.match(/^[\\-0-9\\.]+$/))) {\n return i;\n } else {\n return \"\" + i + units;\n }\n }", "function unit(i, units) {\n if ((typeof i === \"string\") && (!i.match(/^[\\-0-9\\.]+$/))) {\n return i;\n } else {\n return \"\" + i + units;\n }\n }", "toHumanString() {\n if (this.amount === 0) {\n return fmtUnit(0, this.unit);\n }\n if (constructs_1.Token.isUnresolved(this.amount)) {\n return `<token> ${this.unit.label}`;\n }\n let millis = convert(this.amount, this.unit, TimeUnit.Milliseconds, { integral: false });\n const parts = new Array();\n for (const unit of [TimeUnit.Days, TimeUnit.Hours, TimeUnit.Hours, TimeUnit.Minutes, TimeUnit.Seconds]) {\n const wholeCount = Math.floor(convert(millis, TimeUnit.Milliseconds, unit, { integral: false }));\n if (wholeCount > 0) {\n parts.push(fmtUnit(wholeCount, unit));\n millis -= wholeCount * unit.inMillis;\n }\n }\n // Remainder in millis\n if (millis > 0) {\n parts.push(fmtUnit(millis, TimeUnit.Milliseconds));\n }\n // 2 significant parts, that's totally enough for humans\n return parts.slice(0, 2).join(' ');\n function fmtUnit(amount, unit) {\n if (amount === 1) {\n // All of the labels end in 's'\n return `${amount} ${unit.label.substring(0, unit.label.length - 1)}`;\n }\n return `${amount} ${unit.label}`;\n }\n }", "function unit(i, units) {\n if ((typeof i === \"string\") && (!i.match(/^[\\-0-9\\.]+$/))) {\n return i;\n } else {\n return \"\" + i + units;\n }\n }", "function unit(i, units) {\n if ((typeof i === \"string\") && (!i.match(/^[\\-0-9\\.]+$/))) {\n return i;\n } else {\n return \"\" + i + units;\n }\n }", "function doHumanization(ms, options) {\n\n // Make sure we have a positive number.\n // Has the nice sideffect of turning Number objects into primitives.\n ms = Math.abs(ms);\n\n if (ms === 0) {\n return \"0\";\n }\n\n var dictionary = options.languages[options.language] || languages[options.language];\n if (!dictionary) {\n throw new Error(\"No language \" + dictionary + \".\");\n }\n\n var result = [];\n\n // Start at the top and keep removing units, bit by bit.\n var unitName, unitMS, unitCount, mightBeHalfUnit;\n for (var i = 0, len = options.units.length; i < len; i ++) {\n\n unitName = options.units[i];\n if (unitName[unitName.length - 1] === \"s\") { // strip plurals\n unitName = unitName.substring(0, unitName.length - 1);\n }\n unitMS = UNITS[unitName];\n\n // If it's a half-unit interval, we're done.\n if (result.length === 0 && options.halfUnit) {\n mightBeHalfUnit = (ms / unitMS) * 2;\n if (mightBeHalfUnit === Math.floor(mightBeHalfUnit)) {\n return render(mightBeHalfUnit / 2, unitName, dictionary, options.spacer);\n }\n }\n\n // What's the number of full units we can fit?\n if ((i + 1) === len) {\n unitCount = ms / unitMS;\n if (options.round) {\n unitCount = Math.round(unitCount);\n }\n } else {\n unitCount = Math.floor(ms / unitMS);\n }\n\n // Add the string.\n if (unitCount) {\n result.push(render(unitCount, unitName, dictionary, options.spacer));\n }\n\n // Remove what we just figured out.\n ms -= unitCount * unitMS;\n\n }\n\n return result.join(options.delimiter);\n\n }", "function pluralize(count,word){return count>1?`${word}s`:word;}", "function pluralize(word) {\n return word + 's';\n // var pluralWord = word + 's';\n // return pluralWord;\n}", "function getPluralCase(locale,nLike){// TODO(vicb): lazy compute\nif(typeof nLike==='string'){nLike=parseInt(nLike,10);}var n=nLike;var nDecimal=n.toString().replace(/^[^.]*\\.?/,'');var i=Math.floor(Math.abs(n));var v=nDecimal.length;var f=parseInt(nDecimal,10);var t=parseInt(n.toString().replace(/^[^.]*\\.?|0+$/g,''),10)||0;var lang=locale.split('-')[0].toLowerCase();switch(lang){case'af':case'asa':case'az':case'bem':case'bez':case'bg':case'brx':case'ce':case'cgg':case'chr':case'ckb':case'ee':case'el':case'eo':case'es':case'eu':case'fo':case'fur':case'gsw':case'ha':case'haw':case'hu':case'jgo':case'jmc':case'ka':case'kk':case'kkj':case'kl':case'ks':case'ksb':case'ky':case'lb':case'lg':case'mas':case'mgo':case'ml':case'mn':case'nb':case'nd':case'ne':case'nn':case'nnh':case'nyn':case'om':case'or':case'os':case'ps':case'rm':case'rof':case'rwk':case'saq':case'seh':case'sn':case'so':case'sq':case'ta':case'te':case'teo':case'tk':case'tr':case'ug':case'uz':case'vo':case'vun':case'wae':case'xog':if(n===1)return Plural.One;return Plural.Other;case'ak':case'ln':case'mg':case'pa':case'ti':if(n===Math.floor(n)&&n>=0&&n<=1)return Plural.One;return Plural.Other;case'am':case'as':case'bn':case'fa':case'gu':case'hi':case'kn':case'mr':case'zu':if(i===0||n===1)return Plural.One;return Plural.Other;case'ar':if(n===0)return Plural.Zero;if(n===1)return Plural.One;if(n===2)return Plural.Two;if(n%100===Math.floor(n%100)&&n%100>=3&&n%100<=10)return Plural.Few;if(n%100===Math.floor(n%100)&&n%100>=11&&n%100<=99)return Plural.Many;return Plural.Other;case'ast':case'ca':case'de':case'en':case'et':case'fi':case'fy':case'gl':case'it':case'nl':case'sv':case'sw':case'ur':case'yi':if(i===1&&v===0)return Plural.One;return Plural.Other;case'be':if(n%10===1&&!(n%100===11))return Plural.One;if(n%10===Math.floor(n%10)&&n%10>=2&&n%10<=4&&!(n%100>=12&&n%100<=14))return Plural.Few;if(n%10===0||n%10===Math.floor(n%10)&&n%10>=5&&n%10<=9||n%100===Math.floor(n%100)&&n%100>=11&&n%100<=14)return Plural.Many;return Plural.Other;case'br':if(n%10===1&&!(n%100===11||n%100===71||n%100===91))return Plural.One;if(n%10===2&&!(n%100===12||n%100===72||n%100===92))return Plural.Two;if(n%10===Math.floor(n%10)&&(n%10>=3&&n%10<=4||n%10===9)&&!(n%100>=10&&n%100<=19||n%100>=70&&n%100<=79||n%100>=90&&n%100<=99))return Plural.Few;if(!(n===0)&&n%1e6===0)return Plural.Many;return Plural.Other;case'bs':case'hr':case'sr':if(v===0&&i%10===1&&!(i%100===11)||f%10===1&&!(f%100===11))return Plural.One;if(v===0&&i%10===Math.floor(i%10)&&i%10>=2&&i%10<=4&&!(i%100>=12&&i%100<=14)||f%10===Math.floor(f%10)&&f%10>=2&&f%10<=4&&!(f%100>=12&&f%100<=14))return Plural.Few;return Plural.Other;case'cs':case'sk':if(i===1&&v===0)return Plural.One;if(i===Math.floor(i)&&i>=2&&i<=4&&v===0)return Plural.Few;if(!(v===0))return Plural.Many;return Plural.Other;case'cy':if(n===0)return Plural.Zero;if(n===1)return Plural.One;if(n===2)return Plural.Two;if(n===3)return Plural.Few;if(n===6)return Plural.Many;return Plural.Other;case'da':if(n===1||!(t===0)&&(i===0||i===1))return Plural.One;return Plural.Other;case'dsb':case'hsb':if(v===0&&i%100===1||f%100===1)return Plural.One;if(v===0&&i%100===2||f%100===2)return Plural.Two;if(v===0&&i%100===Math.floor(i%100)&&i%100>=3&&i%100<=4||f%100===Math.floor(f%100)&&f%100>=3&&f%100<=4)return Plural.Few;return Plural.Other;case'ff':case'fr':case'hy':case'kab':if(i===0||i===1)return Plural.One;return Plural.Other;case'fil':if(v===0&&(i===1||i===2||i===3)||v===0&&!(i%10===4||i%10===6||i%10===9)||!(v===0)&&!(f%10===4||f%10===6||f%10===9))return Plural.One;return Plural.Other;case'ga':if(n===1)return Plural.One;if(n===2)return Plural.Two;if(n===Math.floor(n)&&n>=3&&n<=6)return Plural.Few;if(n===Math.floor(n)&&n>=7&&n<=10)return Plural.Many;return Plural.Other;case'gd':if(n===1||n===11)return Plural.One;if(n===2||n===12)return Plural.Two;if(n===Math.floor(n)&&(n>=3&&n<=10||n>=13&&n<=19))return Plural.Few;return Plural.Other;case'gv':if(v===0&&i%10===1)return Plural.One;if(v===0&&i%10===2)return Plural.Two;if(v===0&&(i%100===0||i%100===20||i%100===40||i%100===60||i%100===80))return Plural.Few;if(!(v===0))return Plural.Many;return Plural.Other;case'he':if(i===1&&v===0)return Plural.One;if(i===2&&v===0)return Plural.Two;if(v===0&&!(n>=0&&n<=10)&&n%10===0)return Plural.Many;return Plural.Other;case'is':if(t===0&&i%10===1&&!(i%100===11)||!(t===0))return Plural.One;return Plural.Other;case'ksh':if(n===0)return Plural.Zero;if(n===1)return Plural.One;return Plural.Other;case'kw':case'naq':case'se':case'smn':if(n===1)return Plural.One;if(n===2)return Plural.Two;return Plural.Other;case'lag':if(n===0)return Plural.Zero;if((i===0||i===1)&&!(n===0))return Plural.One;return Plural.Other;case'lt':if(n%10===1&&!(n%100>=11&&n%100<=19))return Plural.One;if(n%10===Math.floor(n%10)&&n%10>=2&&n%10<=9&&!(n%100>=11&&n%100<=19))return Plural.Few;if(!(f===0))return Plural.Many;return Plural.Other;case'lv':case'prg':if(n%10===0||n%100===Math.floor(n%100)&&n%100>=11&&n%100<=19||v===2&&f%100===Math.floor(f%100)&&f%100>=11&&f%100<=19)return Plural.Zero;if(n%10===1&&!(n%100===11)||v===2&&f%10===1&&!(f%100===11)||!(v===2)&&f%10===1)return Plural.One;return Plural.Other;case'mk':if(v===0&&i%10===1||f%10===1)return Plural.One;return Plural.Other;case'mt':if(n===1)return Plural.One;if(n===0||n%100===Math.floor(n%100)&&n%100>=2&&n%100<=10)return Plural.Few;if(n%100===Math.floor(n%100)&&n%100>=11&&n%100<=19)return Plural.Many;return Plural.Other;case'pl':if(i===1&&v===0)return Plural.One;if(v===0&&i%10===Math.floor(i%10)&&i%10>=2&&i%10<=4&&!(i%100>=12&&i%100<=14))return Plural.Few;if(v===0&&!(i===1)&&i%10===Math.floor(i%10)&&i%10>=0&&i%10<=1||v===0&&i%10===Math.floor(i%10)&&i%10>=5&&i%10<=9||v===0&&i%100===Math.floor(i%100)&&i%100>=12&&i%100<=14)return Plural.Many;return Plural.Other;case'pt':if(n===Math.floor(n)&&n>=0&&n<=2&&!(n===2))return Plural.One;return Plural.Other;case'ro':if(i===1&&v===0)return Plural.One;if(!(v===0)||n===0||!(n===1)&&n%100===Math.floor(n%100)&&n%100>=1&&n%100<=19)return Plural.Few;return Plural.Other;case'ru':case'uk':if(v===0&&i%10===1&&!(i%100===11))return Plural.One;if(v===0&&i%10===Math.floor(i%10)&&i%10>=2&&i%10<=4&&!(i%100>=12&&i%100<=14))return Plural.Few;if(v===0&&i%10===0||v===0&&i%10===Math.floor(i%10)&&i%10>=5&&i%10<=9||v===0&&i%100===Math.floor(i%100)&&i%100>=11&&i%100<=14)return Plural.Many;return Plural.Other;case'shi':if(i===0||n===1)return Plural.One;if(n===Math.floor(n)&&n>=2&&n<=10)return Plural.Few;return Plural.Other;case'si':if(n===0||n===1||i===0&&f===1)return Plural.One;return Plural.Other;case'sl':if(v===0&&i%100===1)return Plural.One;if(v===0&&i%100===2)return Plural.Two;if(v===0&&i%100===Math.floor(i%100)&&i%100>=3&&i%100<=4||!(v===0))return Plural.Few;return Plural.Other;case'tzm':if(n===Math.floor(n)&&n>=0&&n<=1||n===Math.floor(n)&&n>=11&&n<=99)return Plural.One;return Plural.Other;// When there is no specification, the default is always \"other\"\n// Spec: http://cldr.unicode.org/index/cldr-spec/plural-rules\n// > other (required—general plural form — also used if the language only has a single form)\ndefault:return Plural.Other;}}", "function formatPlural(num,str){return num+\" \"+str+(num===1?'':'s');}/**\r\n * Copyright 2017 Google Inc.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */// tslint:disable-next-line:class-as-namespace", "function pluralize(noun, number) {\n\tif (number === 1) {\n\t\treturn number + \" \" + noun;\n\t}\n return number + \" \" + noun + \"s\";\n}", "function formatPlural(num, str) {\n return num + \" \" + str + (num === 1 ? '' : 's');\n }", "function plural(word,num){var forms=word.split(\"_\");return num%10===1&&num%100!==11?forms[0]:num%10>=2&&num%10<=4&&(num%100<10||num%100>=20)?forms[1]:forms[2]}", "function plural(word,num){var forms=word.split(\"_\");return num%10===1&&num%100!==11?forms[0]:num%10>=2&&num%10<=4&&(num%100<10||num%100>=20)?forms[1]:forms[2]}", "function plural(word,num){var forms=word.split(\"_\");return num%10===1&&num%100!==11?forms[0]:num%10>=2&&num%10<=4&&(num%100<10||num%100>=20)?forms[1]:forms[2]}", "function plural(name) {\n var pluralWord = english_1.English.plural(name);\n if (pluralWord === null || pluralWord === name) {\n if (name.endsWith('s')) {\n return name + 'es';\n }\n else {\n return name + 's';\n }\n }\n else {\n return pluralWord;\n }\n}", "function formatPlural(num, str) {\r\n return num + \" \" + str + (num === 1 ? '' : 's');\r\n}", "function formatPlural(num, str) {\r\n return num + \" \" + str + (num === 1 ? '' : 's');\r\n}", "function formatPlural(num, str) {\r\n return num + \" \" + str + (num === 1 ? '' : 's');\r\n}", "function plural(word,num){var forms=word.split('_');return num % 10 === 1 && num % 100 !== 11?forms[0]:num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)?forms[1]:forms[2];}", "function checkPlural(amount, word) {\n if (amount === 1) {\n return word;\n } else {\n switch (word) {\n case 'person':\n return 'people';\n break;\n case 'coin':\n return 'coins';\n break;\n }\n }\n}", "function pluralize(n, singular, plural) {\n if (n === 1) {\n return singular;\n }\n if (plural !== undefined) {\n return plural;\n }\n return singular + \"s\";\n }", "function getPluralCase(locale, nLike) {\n if (typeof nLike === 'string') {\n nLike = parseInt(nLike, 10);\n }\n var n = nLike;\n var nDecimal = n.toString().replace(/^[^.]*\\.?/, '');\n var i = Math.floor(Math.abs(n));\n var v = nDecimal.length;\n var f = parseInt(nDecimal, 10);\n var t = parseInt(n.toString().replace(/^[^.]*\\.?|0+$/g, ''), 10) || 0;\n var lang = locale.split('-')[0].toLowerCase();\n switch (lang) {\n case 'af':\n case 'asa':\n case 'az':\n case 'bem':\n case 'bez':\n case 'bg':\n case 'brx':\n case 'ce':\n case 'cgg':\n case 'chr':\n case 'ckb':\n case 'ee':\n case 'el':\n case 'eo':\n case 'es':\n case 'eu':\n case 'fo':\n case 'fur':\n case 'gsw':\n case 'ha':\n case 'haw':\n case 'hu':\n case 'jgo':\n case 'jmc':\n case 'ka':\n case 'kk':\n case 'kkj':\n case 'kl':\n case 'ks':\n case 'ksb':\n case 'ky':\n case 'lb':\n case 'lg':\n case 'mas':\n case 'mgo':\n case 'ml':\n case 'mn':\n case 'nb':\n case 'nd':\n case 'ne':\n case 'nn':\n case 'nnh':\n case 'nyn':\n case 'om':\n case 'or':\n case 'os':\n case 'ps':\n case 'rm':\n case 'rof':\n case 'rwk':\n case 'saq':\n case 'seh':\n case 'sn':\n case 'so':\n case 'sq':\n case 'ta':\n case 'te':\n case 'teo':\n case 'tk':\n case 'tr':\n case 'ug':\n case 'uz':\n case 'vo':\n case 'vun':\n case 'wae':\n case 'xog':\n if (n === 1)\n return Plural.One;\n return Plural.Other;\n case 'ak':\n case 'ln':\n case 'mg':\n case 'pa':\n case 'ti':\n if (n === Math.floor(n) && n >= 0 && n <= 1)\n return Plural.One;\n return Plural.Other;\n case 'am':\n case 'as':\n case 'bn':\n case 'fa':\n case 'gu':\n case 'hi':\n case 'kn':\n case 'mr':\n case 'zu':\n if (i === 0 || n === 1)\n return Plural.One;\n return Plural.Other;\n case 'ar':\n if (n === 0)\n return Plural.Zero;\n if (n === 1)\n return Plural.One;\n if (n === 2)\n return Plural.Two;\n if (n % 100 === Math.floor(n % 100) && n % 100 >= 3 && n % 100 <= 10)\n return Plural.Few;\n if (n % 100 === Math.floor(n % 100) && n % 100 >= 11 && n % 100 <= 99)\n return Plural.Many;\n return Plural.Other;\n case 'ast':\n case 'ca':\n case 'de':\n case 'en':\n case 'et':\n case 'fi':\n case 'fy':\n case 'gl':\n case 'it':\n case 'nl':\n case 'sv':\n case 'sw':\n case 'ur':\n case 'yi':\n if (i === 1 && v === 0)\n return Plural.One;\n return Plural.Other;\n case 'be':\n if (n % 10 === 1 && !(n % 100 === 11))\n return Plural.One;\n if (n % 10 === Math.floor(n % 10) && n % 10 >= 2 && n % 10 <= 4 &&\n !(n % 100 >= 12 && n % 100 <= 14))\n return Plural.Few;\n if (n % 10 === 0 || n % 10 === Math.floor(n % 10) && n % 10 >= 5 && n % 10 <= 9 ||\n n % 100 === Math.floor(n % 100) && n % 100 >= 11 && n % 100 <= 14)\n return Plural.Many;\n return Plural.Other;\n case 'br':\n if (n % 10 === 1 && !(n % 100 === 11 || n % 100 === 71 || n % 100 === 91))\n return Plural.One;\n if (n % 10 === 2 && !(n % 100 === 12 || n % 100 === 72 || n % 100 === 92))\n return Plural.Two;\n if (n % 10 === Math.floor(n % 10) && (n % 10 >= 3 && n % 10 <= 4 || n % 10 === 9) &&\n !(n % 100 >= 10 && n % 100 <= 19 || n % 100 >= 70 && n % 100 <= 79 ||\n n % 100 >= 90 && n % 100 <= 99))\n return Plural.Few;\n if (!(n === 0) && n % 1e6 === 0)\n return Plural.Many;\n return Plural.Other;\n case 'bs':\n case 'hr':\n case 'sr':\n if (v === 0 && i % 10 === 1 && !(i % 100 === 11) || f % 10 === 1 && !(f % 100 === 11))\n return Plural.One;\n if (v === 0 && i % 10 === Math.floor(i % 10) && i % 10 >= 2 && i % 10 <= 4 &&\n !(i % 100 >= 12 && i % 100 <= 14) ||\n f % 10 === Math.floor(f % 10) && f % 10 >= 2 && f % 10 <= 4 &&\n !(f % 100 >= 12 && f % 100 <= 14))\n return Plural.Few;\n return Plural.Other;\n case 'cs':\n case 'sk':\n if (i === 1 && v === 0)\n return Plural.One;\n if (i === Math.floor(i) && i >= 2 && i <= 4 && v === 0)\n return Plural.Few;\n if (!(v === 0))\n return Plural.Many;\n return Plural.Other;\n case 'cy':\n if (n === 0)\n return Plural.Zero;\n if (n === 1)\n return Plural.One;\n if (n === 2)\n return Plural.Two;\n if (n === 3)\n return Plural.Few;\n if (n === 6)\n return Plural.Many;\n return Plural.Other;\n case 'da':\n if (n === 1 || !(t === 0) && (i === 0 || i === 1))\n return Plural.One;\n return Plural.Other;\n case 'dsb':\n case 'hsb':\n if (v === 0 && i % 100 === 1 || f % 100 === 1)\n return Plural.One;\n if (v === 0 && i % 100 === 2 || f % 100 === 2)\n return Plural.Two;\n if (v === 0 && i % 100 === Math.floor(i % 100) && i % 100 >= 3 && i % 100 <= 4 ||\n f % 100 === Math.floor(f % 100) && f % 100 >= 3 && f % 100 <= 4)\n return Plural.Few;\n return Plural.Other;\n case 'ff':\n case 'fr':\n case 'hy':\n case 'kab':\n if (i === 0 || i === 1)\n return Plural.One;\n return Plural.Other;\n case 'fil':\n if (v === 0 && (i === 1 || i === 2 || i === 3) ||\n v === 0 && !(i % 10 === 4 || i % 10 === 6 || i % 10 === 9) ||\n !(v === 0) && !(f % 10 === 4 || f % 10 === 6 || f % 10 === 9))\n return Plural.One;\n return Plural.Other;\n case 'ga':\n if (n === 1)\n return Plural.One;\n if (n === 2)\n return Plural.Two;\n if (n === Math.floor(n) && n >= 3 && n <= 6)\n return Plural.Few;\n if (n === Math.floor(n) && n >= 7 && n <= 10)\n return Plural.Many;\n return Plural.Other;\n case 'gd':\n if (n === 1 || n === 11)\n return Plural.One;\n if (n === 2 || n === 12)\n return Plural.Two;\n if (n === Math.floor(n) && (n >= 3 && n <= 10 || n >= 13 && n <= 19))\n return Plural.Few;\n return Plural.Other;\n case 'gv':\n if (v === 0 && i % 10 === 1)\n return Plural.One;\n if (v === 0 && i % 10 === 2)\n return Plural.Two;\n if (v === 0 &&\n (i % 100 === 0 || i % 100 === 20 || i % 100 === 40 || i % 100 === 60 || i % 100 === 80))\n return Plural.Few;\n if (!(v === 0))\n return Plural.Many;\n return Plural.Other;\n case 'he':\n if (i === 1 && v === 0)\n return Plural.One;\n if (i === 2 && v === 0)\n return Plural.Two;\n if (v === 0 && !(n >= 0 && n <= 10) && n % 10 === 0)\n return Plural.Many;\n return Plural.Other;\n case 'is':\n if (t === 0 && i % 10 === 1 && !(i % 100 === 11) || !(t === 0))\n return Plural.One;\n return Plural.Other;\n case 'ksh':\n if (n === 0)\n return Plural.Zero;\n if (n === 1)\n return Plural.One;\n return Plural.Other;\n case 'kw':\n case 'naq':\n case 'se':\n case 'smn':\n if (n === 1)\n return Plural.One;\n if (n === 2)\n return Plural.Two;\n return Plural.Other;\n case 'lag':\n if (n === 0)\n return Plural.Zero;\n if ((i === 0 || i === 1) && !(n === 0))\n return Plural.One;\n return Plural.Other;\n case 'lt':\n if (n % 10 === 1 && !(n % 100 >= 11 && n % 100 <= 19))\n return Plural.One;\n if (n % 10 === Math.floor(n % 10) && n % 10 >= 2 && n % 10 <= 9 &&\n !(n % 100 >= 11 && n % 100 <= 19))\n return Plural.Few;\n if (!(f === 0))\n return Plural.Many;\n return Plural.Other;\n case 'lv':\n case 'prg':\n if (n % 10 === 0 || n % 100 === Math.floor(n % 100) && n % 100 >= 11 && n % 100 <= 19 ||\n v === 2 && f % 100 === Math.floor(f % 100) && f % 100 >= 11 && f % 100 <= 19)\n return Plural.Zero;\n if (n % 10 === 1 && !(n % 100 === 11) || v === 2 && f % 10 === 1 && !(f % 100 === 11) ||\n !(v === 2) && f % 10 === 1)\n return Plural.One;\n return Plural.Other;\n case 'mk':\n if (v === 0 && i % 10 === 1 || f % 10 === 1)\n return Plural.One;\n return Plural.Other;\n case 'mt':\n if (n === 1)\n return Plural.One;\n if (n === 0 || n % 100 === Math.floor(n % 100) && n % 100 >= 2 && n % 100 <= 10)\n return Plural.Few;\n if (n % 100 === Math.floor(n % 100) && n % 100 >= 11 && n % 100 <= 19)\n return Plural.Many;\n return Plural.Other;\n case 'pl':\n if (i === 1 && v === 0)\n return Plural.One;\n if (v === 0 && i % 10 === Math.floor(i % 10) && i % 10 >= 2 && i % 10 <= 4 &&\n !(i % 100 >= 12 && i % 100 <= 14))\n return Plural.Few;\n if (v === 0 && !(i === 1) && i % 10 === Math.floor(i % 10) && i % 10 >= 0 && i % 10 <= 1 ||\n v === 0 && i % 10 === Math.floor(i % 10) && i % 10 >= 5 && i % 10 <= 9 ||\n v === 0 && i % 100 === Math.floor(i % 100) && i % 100 >= 12 && i % 100 <= 14)\n return Plural.Many;\n return Plural.Other;\n case 'pt':\n if (n === Math.floor(n) && n >= 0 && n <= 2 && !(n === 2))\n return Plural.One;\n return Plural.Other;\n case 'ro':\n if (i === 1 && v === 0)\n return Plural.One;\n if (!(v === 0) || n === 0 ||\n !(n === 1) && n % 100 === Math.floor(n % 100) && n % 100 >= 1 && n % 100 <= 19)\n return Plural.Few;\n return Plural.Other;\n case 'ru':\n case 'uk':\n if (v === 0 && i % 10 === 1 && !(i % 100 === 11))\n return Plural.One;\n if (v === 0 && i % 10 === Math.floor(i % 10) && i % 10 >= 2 && i % 10 <= 4 &&\n !(i % 100 >= 12 && i % 100 <= 14))\n return Plural.Few;\n if (v === 0 && i % 10 === 0 ||\n v === 0 && i % 10 === Math.floor(i % 10) && i % 10 >= 5 && i % 10 <= 9 ||\n v === 0 && i % 100 === Math.floor(i % 100) && i % 100 >= 11 && i % 100 <= 14)\n return Plural.Many;\n return Plural.Other;\n case 'shi':\n if (i === 0 || n === 1)\n return Plural.One;\n if (n === Math.floor(n) && n >= 2 && n <= 10)\n return Plural.Few;\n return Plural.Other;\n case 'si':\n if (n === 0 || n === 1 || i === 0 && f === 1)\n return Plural.One;\n return Plural.Other;\n case 'sl':\n if (v === 0 && i % 100 === 1)\n return Plural.One;\n if (v === 0 && i % 100 === 2)\n return Plural.Two;\n if (v === 0 && i % 100 === Math.floor(i % 100) && i % 100 >= 3 && i % 100 <= 4 || !(v === 0))\n return Plural.Few;\n return Plural.Other;\n case 'tzm':\n if (n === Math.floor(n) && n >= 0 && n <= 1 || n === Math.floor(n) && n >= 11 && n <= 99)\n return Plural.One;\n return Plural.Other;\n // When there is no specification, the default is always \"other\"\n // Spec: http://cldr.unicode.org/index/cldr-spec/plural-rules\n // > other (required—general plural form — also used if the language only has a single form)\n default:\n return Plural.Other;\n }\n}", "function getPluralCase(locale, nLike) {\n if (typeof nLike === 'string') {\n nLike = parseInt(nLike, 10);\n }\n var n = nLike;\n var nDecimal = n.toString().replace(/^[^.]*\\.?/, '');\n var i = Math.floor(Math.abs(n));\n var v = nDecimal.length;\n var f = parseInt(nDecimal, 10);\n var t = parseInt(n.toString().replace(/^[^.]*\\.?|0+$/g, ''), 10) || 0;\n var lang = locale.split('-')[0].toLowerCase();\n switch (lang) {\n case 'af':\n case 'asa':\n case 'az':\n case 'bem':\n case 'bez':\n case 'bg':\n case 'brx':\n case 'ce':\n case 'cgg':\n case 'chr':\n case 'ckb':\n case 'ee':\n case 'el':\n case 'eo':\n case 'es':\n case 'eu':\n case 'fo':\n case 'fur':\n case 'gsw':\n case 'ha':\n case 'haw':\n case 'hu':\n case 'jgo':\n case 'jmc':\n case 'ka':\n case 'kk':\n case 'kkj':\n case 'kl':\n case 'ks':\n case 'ksb':\n case 'ky':\n case 'lb':\n case 'lg':\n case 'mas':\n case 'mgo':\n case 'ml':\n case 'mn':\n case 'nb':\n case 'nd':\n case 'ne':\n case 'nn':\n case 'nnh':\n case 'nyn':\n case 'om':\n case 'or':\n case 'os':\n case 'ps':\n case 'rm':\n case 'rof':\n case 'rwk':\n case 'saq':\n case 'seh':\n case 'sn':\n case 'so':\n case 'sq':\n case 'ta':\n case 'te':\n case 'teo':\n case 'tk':\n case 'tr':\n case 'ug':\n case 'uz':\n case 'vo':\n case 'vun':\n case 'wae':\n case 'xog':\n if (n === 1)\n return Plural.One;\n return Plural.Other;\n case 'ak':\n case 'ln':\n case 'mg':\n case 'pa':\n case 'ti':\n if (n === Math.floor(n) && n >= 0 && n <= 1)\n return Plural.One;\n return Plural.Other;\n case 'am':\n case 'as':\n case 'bn':\n case 'fa':\n case 'gu':\n case 'hi':\n case 'kn':\n case 'mr':\n case 'zu':\n if (i === 0 || n === 1)\n return Plural.One;\n return Plural.Other;\n case 'ar':\n if (n === 0)\n return Plural.Zero;\n if (n === 1)\n return Plural.One;\n if (n === 2)\n return Plural.Two;\n if (n % 100 === Math.floor(n % 100) && n % 100 >= 3 && n % 100 <= 10)\n return Plural.Few;\n if (n % 100 === Math.floor(n % 100) && n % 100 >= 11 && n % 100 <= 99)\n return Plural.Many;\n return Plural.Other;\n case 'ast':\n case 'ca':\n case 'de':\n case 'en':\n case 'et':\n case 'fi':\n case 'fy':\n case 'gl':\n case 'it':\n case 'nl':\n case 'sv':\n case 'sw':\n case 'ur':\n case 'yi':\n if (i === 1 && v === 0)\n return Plural.One;\n return Plural.Other;\n case 'be':\n if (n % 10 === 1 && !(n % 100 === 11))\n return Plural.One;\n if (n % 10 === Math.floor(n % 10) && n % 10 >= 2 && n % 10 <= 4 &&\n !(n % 100 >= 12 && n % 100 <= 14))\n return Plural.Few;\n if (n % 10 === 0 || n % 10 === Math.floor(n % 10) && n % 10 >= 5 && n % 10 <= 9 ||\n n % 100 === Math.floor(n % 100) && n % 100 >= 11 && n % 100 <= 14)\n return Plural.Many;\n return Plural.Other;\n case 'br':\n if (n % 10 === 1 && !(n % 100 === 11 || n % 100 === 71 || n % 100 === 91))\n return Plural.One;\n if (n % 10 === 2 && !(n % 100 === 12 || n % 100 === 72 || n % 100 === 92))\n return Plural.Two;\n if (n % 10 === Math.floor(n % 10) && (n % 10 >= 3 && n % 10 <= 4 || n % 10 === 9) &&\n !(n % 100 >= 10 && n % 100 <= 19 || n % 100 >= 70 && n % 100 <= 79 ||\n n % 100 >= 90 && n % 100 <= 99))\n return Plural.Few;\n if (!(n === 0) && n % 1e6 === 0)\n return Plural.Many;\n return Plural.Other;\n case 'bs':\n case 'hr':\n case 'sr':\n if (v === 0 && i % 10 === 1 && !(i % 100 === 11) || f % 10 === 1 && !(f % 100 === 11))\n return Plural.One;\n if (v === 0 && i % 10 === Math.floor(i % 10) && i % 10 >= 2 && i % 10 <= 4 &&\n !(i % 100 >= 12 && i % 100 <= 14) ||\n f % 10 === Math.floor(f % 10) && f % 10 >= 2 && f % 10 <= 4 &&\n !(f % 100 >= 12 && f % 100 <= 14))\n return Plural.Few;\n return Plural.Other;\n case 'cs':\n case 'sk':\n if (i === 1 && v === 0)\n return Plural.One;\n if (i === Math.floor(i) && i >= 2 && i <= 4 && v === 0)\n return Plural.Few;\n if (!(v === 0))\n return Plural.Many;\n return Plural.Other;\n case 'cy':\n if (n === 0)\n return Plural.Zero;\n if (n === 1)\n return Plural.One;\n if (n === 2)\n return Plural.Two;\n if (n === 3)\n return Plural.Few;\n if (n === 6)\n return Plural.Many;\n return Plural.Other;\n case 'da':\n if (n === 1 || !(t === 0) && (i === 0 || i === 1))\n return Plural.One;\n return Plural.Other;\n case 'dsb':\n case 'hsb':\n if (v === 0 && i % 100 === 1 || f % 100 === 1)\n return Plural.One;\n if (v === 0 && i % 100 === 2 || f % 100 === 2)\n return Plural.Two;\n if (v === 0 && i % 100 === Math.floor(i % 100) && i % 100 >= 3 && i % 100 <= 4 ||\n f % 100 === Math.floor(f % 100) && f % 100 >= 3 && f % 100 <= 4)\n return Plural.Few;\n return Plural.Other;\n case 'ff':\n case 'fr':\n case 'hy':\n case 'kab':\n if (i === 0 || i === 1)\n return Plural.One;\n return Plural.Other;\n case 'fil':\n if (v === 0 && (i === 1 || i === 2 || i === 3) ||\n v === 0 && !(i % 10 === 4 || i % 10 === 6 || i % 10 === 9) ||\n !(v === 0) && !(f % 10 === 4 || f % 10 === 6 || f % 10 === 9))\n return Plural.One;\n return Plural.Other;\n case 'ga':\n if (n === 1)\n return Plural.One;\n if (n === 2)\n return Plural.Two;\n if (n === Math.floor(n) && n >= 3 && n <= 6)\n return Plural.Few;\n if (n === Math.floor(n) && n >= 7 && n <= 10)\n return Plural.Many;\n return Plural.Other;\n case 'gd':\n if (n === 1 || n === 11)\n return Plural.One;\n if (n === 2 || n === 12)\n return Plural.Two;\n if (n === Math.floor(n) && (n >= 3 && n <= 10 || n >= 13 && n <= 19))\n return Plural.Few;\n return Plural.Other;\n case 'gv':\n if (v === 0 && i % 10 === 1)\n return Plural.One;\n if (v === 0 && i % 10 === 2)\n return Plural.Two;\n if (v === 0 &&\n (i % 100 === 0 || i % 100 === 20 || i % 100 === 40 || i % 100 === 60 || i % 100 === 80))\n return Plural.Few;\n if (!(v === 0))\n return Plural.Many;\n return Plural.Other;\n case 'he':\n if (i === 1 && v === 0)\n return Plural.One;\n if (i === 2 && v === 0)\n return Plural.Two;\n if (v === 0 && !(n >= 0 && n <= 10) && n % 10 === 0)\n return Plural.Many;\n return Plural.Other;\n case 'is':\n if (t === 0 && i % 10 === 1 && !(i % 100 === 11) || !(t === 0))\n return Plural.One;\n return Plural.Other;\n case 'ksh':\n if (n === 0)\n return Plural.Zero;\n if (n === 1)\n return Plural.One;\n return Plural.Other;\n case 'kw':\n case 'naq':\n case 'se':\n case 'smn':\n if (n === 1)\n return Plural.One;\n if (n === 2)\n return Plural.Two;\n return Plural.Other;\n case 'lag':\n if (n === 0)\n return Plural.Zero;\n if ((i === 0 || i === 1) && !(n === 0))\n return Plural.One;\n return Plural.Other;\n case 'lt':\n if (n % 10 === 1 && !(n % 100 >= 11 && n % 100 <= 19))\n return Plural.One;\n if (n % 10 === Math.floor(n % 10) && n % 10 >= 2 && n % 10 <= 9 &&\n !(n % 100 >= 11 && n % 100 <= 19))\n return Plural.Few;\n if (!(f === 0))\n return Plural.Many;\n return Plural.Other;\n case 'lv':\n case 'prg':\n if (n % 10 === 0 || n % 100 === Math.floor(n % 100) && n % 100 >= 11 && n % 100 <= 19 ||\n v === 2 && f % 100 === Math.floor(f % 100) && f % 100 >= 11 && f % 100 <= 19)\n return Plural.Zero;\n if (n % 10 === 1 && !(n % 100 === 11) || v === 2 && f % 10 === 1 && !(f % 100 === 11) ||\n !(v === 2) && f % 10 === 1)\n return Plural.One;\n return Plural.Other;\n case 'mk':\n if (v === 0 && i % 10 === 1 || f % 10 === 1)\n return Plural.One;\n return Plural.Other;\n case 'mt':\n if (n === 1)\n return Plural.One;\n if (n === 0 || n % 100 === Math.floor(n % 100) && n % 100 >= 2 && n % 100 <= 10)\n return Plural.Few;\n if (n % 100 === Math.floor(n % 100) && n % 100 >= 11 && n % 100 <= 19)\n return Plural.Many;\n return Plural.Other;\n case 'pl':\n if (i === 1 && v === 0)\n return Plural.One;\n if (v === 0 && i % 10 === Math.floor(i % 10) && i % 10 >= 2 && i % 10 <= 4 &&\n !(i % 100 >= 12 && i % 100 <= 14))\n return Plural.Few;\n if (v === 0 && !(i === 1) && i % 10 === Math.floor(i % 10) && i % 10 >= 0 && i % 10 <= 1 ||\n v === 0 && i % 10 === Math.floor(i % 10) && i % 10 >= 5 && i % 10 <= 9 ||\n v === 0 && i % 100 === Math.floor(i % 100) && i % 100 >= 12 && i % 100 <= 14)\n return Plural.Many;\n return Plural.Other;\n case 'pt':\n if (n === Math.floor(n) && n >= 0 && n <= 2 && !(n === 2))\n return Plural.One;\n return Plural.Other;\n case 'ro':\n if (i === 1 && v === 0)\n return Plural.One;\n if (!(v === 0) || n === 0 ||\n !(n === 1) && n % 100 === Math.floor(n % 100) && n % 100 >= 1 && n % 100 <= 19)\n return Plural.Few;\n return Plural.Other;\n case 'ru':\n case 'uk':\n if (v === 0 && i % 10 === 1 && !(i % 100 === 11))\n return Plural.One;\n if (v === 0 && i % 10 === Math.floor(i % 10) && i % 10 >= 2 && i % 10 <= 4 &&\n !(i % 100 >= 12 && i % 100 <= 14))\n return Plural.Few;\n if (v === 0 && i % 10 === 0 ||\n v === 0 && i % 10 === Math.floor(i % 10) && i % 10 >= 5 && i % 10 <= 9 ||\n v === 0 && i % 100 === Math.floor(i % 100) && i % 100 >= 11 && i % 100 <= 14)\n return Plural.Many;\n return Plural.Other;\n case 'shi':\n if (i === 0 || n === 1)\n return Plural.One;\n if (n === Math.floor(n) && n >= 2 && n <= 10)\n return Plural.Few;\n return Plural.Other;\n case 'si':\n if (n === 0 || n === 1 || i === 0 && f === 1)\n return Plural.One;\n return Plural.Other;\n case 'sl':\n if (v === 0 && i % 100 === 1)\n return Plural.One;\n if (v === 0 && i % 100 === 2)\n return Plural.Two;\n if (v === 0 && i % 100 === Math.floor(i % 100) && i % 100 >= 3 && i % 100 <= 4 || !(v === 0))\n return Plural.Few;\n return Plural.Other;\n case 'tzm':\n if (n === Math.floor(n) && n >= 0 && n <= 1 || n === Math.floor(n) && n >= 11 && n <= 99)\n return Plural.One;\n return Plural.Other;\n // When there is no specification, the default is always \"other\"\n // Spec: http://cldr.unicode.org/index/cldr-spec/plural-rules\n // > other (required—general plural form — also used if the language only has a single form)\n default:\n return Plural.Other;\n }\n}", "function unpluralize(word) {\n if (word.match(/is\\b/g)) {\n return word;\n } else if (word.match(/ies\\b/g)) {\n return word.replace(/.{3}\\b/, 'y');\n } else if (word.match(/ses\\b|hes\\b|xes\\b|zes\\b/g)) {\n return word.replace(/.{2}\\b/, '');\n } else if (word.match(/s\\b/g)) {\n return word.replace(/.{1}\\b/, '');\n } else {\n return word;\n }\n}", "function pluralize(x, q){\n if (q == 1){\n return x;\n } else {\n return x + \"s\";\n }\n}", "function cambiaSecreta(){\n secreta=normalize(secreta);\n secreta=secreta.toUpperCase();\n secreta=secreta.replace(/ /g, \"\");\n}", "function formatPlural(num, str) {\n return num + \" \" + str + (num === 1 ? '' : 's');\n}", "function formatPlural(num, str) {\n return num + \" \" + str + (num === 1 ? '' : 's');\n}", "function formatPlural(num, str) {\n return num + \" \" + str + (num === 1 ? '' : 's');\n}", "function formatPlural(num, str) {\n return num + \" \" + str + (num === 1 ? '' : 's');\n}", "function formatPlural(num, str) {\n return num + \" \" + str + (num === 1 ? '' : 's');\n}", "function formatPlural(num, str) {\n return num + \" \" + str + (num === 1 ? '' : 's');\n}", "function getPluralCategory(value,cases,ngLocalization,locale){var key=\"=\"+value;if(cases.indexOf(key)>-1){return key;}key=ngLocalization.getPluralCategory(value,locale);if(cases.indexOf(key)>-1){return key;}if(cases.indexOf('other')>-1){return'other';}throw new Error(\"No plural message found for value \\\"\"+value+\"\\\"\");}", "function awardPlural(x) {\n x == 1 ? y = 'case' : y = 'cases';\n return y;\n }", "function formatPlural(num, str) {\n return num + \" \" + str + (num === 1 ? '' : 's');\n}", "function pluralize(noun, count) {\r\n // TODO: Implement this function.\r\n const result = undefined;\r\n\r\n return result;\r\n}", "function normalizeUnit(unit) {\n var normalized = {\n year: \"year\",\n years: \"year\",\n month: \"month\",\n months: \"month\",\n day: \"day\",\n days: \"day\",\n hour: \"hour\",\n hours: \"hour\",\n minute: \"minute\",\n minutes: \"minute\",\n quarter: \"quarter\",\n quarters: \"quarter\",\n second: \"second\",\n seconds: \"second\",\n millisecond: \"millisecond\",\n milliseconds: \"millisecond\",\n weekday: \"weekday\",\n weekdays: \"weekday\",\n weeknumber: \"weekNumber\",\n weeksnumber: \"weekNumber\",\n weeknumbers: \"weekNumber\",\n weekyear: \"weekYear\",\n weekyears: \"weekYear\",\n ordinal: \"ordinal\"\n }[unit.toLowerCase()];\n if (!normalized) throw new InvalidUnitError(unit);\n return normalized;\n } // this is a dumbed down version of fromObject() that runs about 60% faster", "function normalizeUnit(unit) {\n const normalized = {\n year: \"year\",\n years: \"year\",\n month: \"month\",\n months: \"month\",\n day: \"day\",\n days: \"day\",\n hour: \"hour\",\n hours: \"hour\",\n minute: \"minute\",\n minutes: \"minute\",\n quarter: \"quarter\",\n quarters: \"quarter\",\n second: \"second\",\n seconds: \"second\",\n millisecond: \"millisecond\",\n milliseconds: \"millisecond\",\n weekday: \"weekday\",\n weekdays: \"weekday\",\n weeknumber: \"weekNumber\",\n weeksnumber: \"weekNumber\",\n weeknumbers: \"weekNumber\",\n weekyear: \"weekYear\",\n weekyears: \"weekYear\",\n ordinal: \"ordinal\"\n }[unit.toLowerCase()];\n if (!normalized) throw new InvalidUnitError(unit);\n return normalized;\n} // this is a dumbed down version of fromObject() that runs about 60% faster", "function normalizeUnit(unit) {\n const normalized = {\n year: \"year\",\n years: \"year\",\n month: \"month\",\n months: \"month\",\n day: \"day\",\n days: \"day\",\n hour: \"hour\",\n hours: \"hour\",\n minute: \"minute\",\n minutes: \"minute\",\n quarter: \"quarter\",\n quarters: \"quarter\",\n second: \"second\",\n seconds: \"second\",\n millisecond: \"millisecond\",\n milliseconds: \"millisecond\",\n weekday: \"weekday\",\n weekdays: \"weekday\",\n weeknumber: \"weekNumber\",\n weeksnumber: \"weekNumber\",\n weeknumbers: \"weekNumber\",\n weekyear: \"weekYear\",\n weekyears: \"weekYear\",\n ordinal: \"ordinal\"\n }[unit.toLowerCase()];\n if (!normalized) throw new InvalidUnitError(unit);\n return normalized;\n} // this is a dumbed down version of fromObject() that runs about 60% faster", "function normalizeUnit(unit) {\n var normalized = {\n year: \"year\",\n years: \"year\",\n month: \"month\",\n months: \"month\",\n day: \"day\",\n days: \"day\",\n hour: \"hour\",\n hours: \"hour\",\n minute: \"minute\",\n minutes: \"minute\",\n second: \"second\",\n seconds: \"second\",\n millisecond: \"millisecond\",\n milliseconds: \"millisecond\",\n weekday: \"weekday\",\n weekdays: \"weekday\",\n weeknumber: \"weekNumber\",\n weeksnumber: \"weekNumber\",\n weeknumbers: \"weekNumber\",\n weekyear: \"weekYear\",\n weekyears: \"weekYear\",\n ordinal: \"ordinal\"\n }[unit.toLowerCase()];\n if (!normalized) throw new InvalidUnitError(unit);\n return normalized;\n} // this is a dumbed down version of fromObject() that runs about 60% faster", "function normalize(value, units) {\r\n\tswitch(units) {\r\n\t\tcase \"mi\":\r\n\t\t\treturn value * 1609;\r\n\t\tcase \"km\":\r\n\t\t\treturn value * 1000;\r\n\t\tcase \"ft\":\r\n\t\t\treturn value / 3.281;\r\n\t\tcase \"m\":\r\n\t\t\treturn value;\r\n\t}\r\n}", "function s(n, plural) {\n\treturn n === 1 ? '' : plural || 's';\n}", "function pluralFormatNicely(n, singular, plural) {\n if (n == 1)\n return numberToStringButNicely(n) + singular;\n return numberToStringButNicely(n) + plural;\n }", "function isPlural(word){\n\tif (word.endsWith('s')){\n\t\treturn \"Plural\"\n\t}else {\n\t\treturn \"Singular\"\n\t};\n}", "function inferPlural (sing) {\n if (sing.endsWith('na')) { // widna\n return sing.slice(0, -1) + 'iet' // widniet\n } else if (sing.endsWith('i')) { // baħri\n return sing + 'n' // baħrin\n } else if (sing.endsWith('a') || sing.endsWith('u')) { // rota, inkwatru\n return sing.slice(0, -1) + 'i' // roti, inkwatri\n } else if (sing.endsWith('q')) { // triq\n return sing + 'at' // triqat\n } else {\n return sing + 'i'\n }\n}", "pluralize(str, plural = null) {\n str = str || this.str;\n\n return this.applyRules(str, this.pluralRules, this.uncountableWords, plural);\n }", "function plural(word, num) {\n var forms = word.split('_');\n return num % 10 === 1 && num % 100 !== 11 ? forms[0] : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2];\n }", "function plural(word, num) {\n var forms = word.split('_');\n return num % 10 === 1 && num % 100 !== 11 ? forms[0] : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2];\n }", "function plural(word, num) {\n var forms = word.split('_');\n return num % 10 === 1 && num % 100 !== 11 ? forms[0] : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2];\n }", "function calculateUnitValue(i) {\n\tif (getUnit(i) === \"in\") return 1;\n\telse if (getUnit(i) === \"cm\") return .3937;\n\telse return 0;\n}", "function pluralize(str: string): string {\n return str.endsWith('s') ? str : `${str}s`\n}", "function formatPlural(number, singular, plural) {\n if (number == 1) {\n return '1 ' + singular;\n } else {\n return number + ' ' + plural;\n }\n}", "function doHumanization (ms, options) {\n var i, len, piece\n\n // Make sure we have a positive number.\n // Has the nice sideffect of turning Number objects into primitives.\n ms = Math.abs(ms)\n\n var dictionary = options.languages[options.language] || languages[options.language]\n if (!dictionary) {\n throw new Error('No language ' + dictionary + '.')\n }\n\n var pieces = []\n\n // Start at the top and keep removing units, bit by bit.\n var unitName, unitMS, unitCount\n for (i = 0, len = options.units.length; i < len; i++) {\n unitName = options.units[i]\n unitMS = options.unitMeasures[unitName]\n\n // What's the number of full units we can fit?\n if (i + 1 === len) {\n unitCount = ms / unitMS\n } else {\n unitCount = Math.floor(ms / unitMS)\n }\n\n // Add the string.\n pieces.push({\n unitCount: unitCount,\n unitName: unitName\n })\n\n // Remove what we just figured out.\n ms -= unitCount * unitMS\n }\n\n var firstOccupiedUnitIndex = 0\n for (i = 0; i < pieces.length; i++) {\n if (pieces[i].unitCount) {\n firstOccupiedUnitIndex = i\n break\n }\n }\n\n if (options.round) {\n var ratioToLargerUnit, previousPiece\n for (i = pieces.length - 1; i >= 0; i--) {\n piece = pieces[i]\n piece.unitCount = Math.round(piece.unitCount)\n\n if (i === 0) { break }\n\n previousPiece = pieces[i - 1]\n\n ratioToLargerUnit = options.unitMeasures[previousPiece.unitName] / options.unitMeasures[piece.unitName]\n if ((piece.unitCount % ratioToLargerUnit) === 0 || (options.largest && ((options.largest - 1) < (i - firstOccupiedUnitIndex)))) {\n previousPiece.unitCount += piece.unitCount / ratioToLargerUnit\n piece.unitCount = 0\n }\n }\n }\n\n var result = []\n for (i = 0, pieces.length; i < len; i++) {\n piece = pieces[i]\n if (piece.unitCount) {\n result.push(render(piece.unitCount, piece.unitName, dictionary, options))\n }\n\n if (result.length === options.largest) { break }\n }\n\n if (result.length) {\n if (!options.conjunction || result.length === 1) {\n return result.join(options.delimiter)\n } else if (result.length === 2) {\n return result.join(options.conjunction)\n } else if (result.length > 2) {\n return result.slice(0, -1).join(options.delimiter) + (options.serialComma ? ',' : '') + options.conjunction + result.slice(-1)\n }\n } else {\n return render(0, options.units[options.units.length - 1], dictionary, options)\n }\n }", "function getLocalePluralCase(locale){var data=findLocaleData(locale);return data[18/* PluralCase */];}", "function pluralize(word, count) {\n return count === 1 ? word : `${word}s`;\n}", "function pluralize(word, count) {\n return count === 1 ? word : `${word}s`;\n}", "function normalizeUnits(value) {\n return (value.match(/px|em|rem/)) ? value : value + 'px';\n}", "function plural(word, num) {\n\t var forms = word.split('_');\n\t return num % 10 === 1 && num % 100 !== 11\n\t ? forms[0]\n\t : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)\n\t ? forms[1]\n\t : forms[2];\n\t }", "function plural(word, num) {\n\t var forms = word.split('_');\n\t return num % 10 === 1 && num % 100 !== 11\n\t ? forms[0]\n\t : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)\n\t ? forms[1]\n\t : forms[2];\n\t }", "function plural(word, num) {\n\t var forms = word.split('_');\n\t return num % 10 === 1 && num % 100 !== 11\n\t ? forms[0]\n\t : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)\n\t ? forms[1]\n\t : forms[2];\n\t }", "function pluralSuffix( n ) {\n return 1 == n ? '' : 's';\n}", "function plural(word, num) {\n var forms = word.split('_');\n return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]);\n }", "function plural$6(word,num){var forms=word.split('_');return num % 10 === 1 && num % 100 !== 11?forms[0]:num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)?forms[1]:forms[2];}", "function doHumanization(ms, options) {\n let i; let len; let piece;\n\n // Make sure we have a positive number.\n // Has the nice sideffect of turning Number objects into primitives.\n ms = Math.abs(ms);\n\n const dictionary = options.languages[options.language] || languages[options.language];\n if (!dictionary) {\n throw new Error(`No language ${dictionary}.`);\n }\n\n const pieces = [];\n\n // Start at the top and keep removing units, bit by bit.\n let unitName; let unitMS; let \n unitCount;\n for (i = 0, len = options.units.length; i < len; i++) {\n unitName = options.units[i];\n unitMS = options.unitMeasures[unitName];\n\n // What's the number of full units we can fit?\n if (i + 1 === len) {\n unitCount = ms / unitMS;\n } else {\n unitCount = Math.floor(ms / unitMS);\n }\n\n // Add the string.\n pieces.push({\n unitCount,\n unitName,\n });\n\n // Remove what we just figured out.\n ms -= unitCount * unitMS;\n }\n\n let firstOccupiedUnitIndex = 0;\n for (i = 0; i < pieces.length; i++) {\n if (pieces[i].unitCount) {\n firstOccupiedUnitIndex = i;\n break;\n }\n }\n\n if (options.round) {\n let ratioToLargerUnit; let \n previousPiece;\n for (i = pieces.length - 1; i >= 0; i--) {\n piece = pieces[i];\n piece.unitCount = Math.round(piece.unitCount);\n\n if (i === 0) { break; }\n\n previousPiece = pieces[i - 1];\n\n ratioToLargerUnit = options.unitMeasures[previousPiece.unitName] / options.unitMeasures[piece.unitName];\n if ((piece.unitCount % ratioToLargerUnit) === 0 || (options.largest && ((options.largest - 1) < (i - firstOccupiedUnitIndex)))) {\n previousPiece.unitCount += piece.unitCount / ratioToLargerUnit;\n piece.unitCount = 0;\n }\n }\n }\n\n const result = [];\n for (i = 0, pieces.length; i < len; i++) {\n piece = pieces[i];\n if (piece.unitCount) {\n result.push(render(piece.unitCount, piece.unitName, dictionary, options));\n }\n\n if (result.length === options.largest) { break; }\n }\n\n if (result.length) {\n if (!options.conjunction || result.length === 1) {\n return result.join(options.delimiter);\n } else if (result.length === 2) {\n return result.join(options.conjunction);\n } else if (result.length > 2) {\n return result.slice(0, -1).join(options.delimiter) + (options.serialComma ? ',' : '') + options.conjunction + result.slice(-1);\n }\n } else {\n return render(0, options.units[options.units.length - 1], dictionary, options);\n }\n }", "function directiveNormalize(name){return camelCase(name.replace(PREFIX_REGEXP,''));}", "function numberToEnglish( n ) {\n\n var string = n.toString(), units, tens, scales, start, end, chunks, chunksLen, chunk, ints, i, word, words, and = 'and';\n\n /* Is number zero? */\n if( parseInt( string ) === 0 ) {\n return 'zero';\n }\n\n /* Array of units as words */\n units = [ '', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten', 'eleven', 'twelve', 'thirteen', 'fourteen', 'fifteen', 'sixteen', 'seventeen', 'eighteen', 'nineteen' ];\n\n /* Array of tens as words */\n tens = [ '', '', 'twenty', 'thirty', 'forty', 'fifty', 'sixty', 'seventy', 'eighty', 'ninety' ];\n\n /* Array of scales as words */\n scales = [ '', 'thousand', 'million', 'billion', 'trillion', 'quadrillion', 'quintillion', 'sextillion', 'septillion', 'octillion', 'nonillion', 'decillion', 'undecillion', 'duodecillion', 'tredecillion', 'quatttuor-decillion', 'quindecillion', 'sexdecillion', 'septen-decillion', 'octodecillion', 'novemdecillion', 'vigintillion', 'centillion' ];\n\n /* Split user arguemnt into 3 digit chunks from right to left */\n start = string.length;\n chunks = [];\n while( start > 0 ) {\n end = start;\n chunks.push( string.slice( ( start = Math.max( 0, start - 3 ) ), end ) );\n }\n\n /* Check if function has enough scale words to be able to stringify the user argument */\n chunksLen = chunks.length;\n if( chunksLen > scales.length ) {\n return '';\n }\n\n /* Stringify each integer in each chunk */\n words = [];\n for( i = 0; i < chunksLen; i++ ) {\n\n chunk = parseInt( chunks[i] );\n\n if( chunk ) {\n\n /* Split chunk into array of individual integers */\n ints = chunks[i].split( '' ).reverse().map( parseFloat );\n\n /* If tens integer is 1, i.e. 10, then add 10 to units integer */\n if( ints[1] === 1 ) {\n ints[0] += 10;\n }\n\n /* Add scale word if chunk is not zero and array item exists */\n if( ( word = scales[i] ) ) {\n words.push( word );\n }\n\n /* Add unit word if array item exists */\n if( ( word = units[ ints[0] ] ) ) {\n words.push( word );\n }\n\n /* Add tens word if array item exists */\n if( ( word = tens[ ints[1] ] ) ) {\n words.push( word );\n }\n\n /* Add 'and' string after units or tens integer if: */\n if( ints[0] || ints[1]) {\n\n /* Chunk has a hundreds integer or chunk is the first of multiple chunks */\n if( ints[2] || ! i && chunksLen ) {\n words.push( and );\n }\n }\n\n /* Add hundreds word if array item exists */\n if( ( word = units[ ints[2] ] ) ) {\n words.push( word + ' hundred' );\n }\n }\n }\n return words.reverse().join( ' ' ) + \" only\";\n}", "standardIngredients() {\n\n const usedUnits = ['tablespoons', 'tablespoon', 'ounces', 'ounce', 'teaspoons', 'teaspoon', 'cups', 'pounds', 'lbs', 'lb'];\n const standardUnits = ['tbsp', 'tbsp', 'oz', 'oz', 'tsp', 'tsp', 'cup', 'pound', 'lb', 'lb'];\n const units = [...standardUnits, 'kg', 'g'];\n const newIngredients = this.ingredients.map(element => {\n let ing = element.toLowerCase();\n usedUnits.forEach((unit, index) => {\n ing = ing.replace(unit, standardUnits[index]);\n });\n\n ing = ing.replace(/ *\\([^)]*\\) */g, ' '); //Removes the contents in () parenthesis\n\n const arrayIng = ing.split(' ');\n const unitIndex = arrayIng.findIndex(el => units.includes(el));\n let objectIng;\n if (unitIndex > -1) {\n const countIndex = arrayIng.slice(0, unitIndex); // Everything before Unit is considered as Count\n let count;\n if (countIndex.length === 1) {\n count = eval(arrayIng[0].replace('-', '+'));\n if (count === undefined) count = 1;\n } else {\n if(countIndex[1] === 'to') \n count = (parseInt(countIndex[0]) + parseInt(countIndex[2]))/2;\n else \n count = eval(arrayIng.slice(0, unitIndex).join('+'));\n }\n objectIng = {\n count,\n unit: arrayIng[unitIndex],\n name: arrayIng.slice(unitIndex + 1).join(' ')\n }\n\n } else if (parseInt(arrayIng[0], 10)) { //There is no unit but number is given\n objectIng = {\n count: parseInt(arrayIng[0], 10),\n unit: '',\n name: arrayIng.slice(1).join(' ')\n }\n } else if (unitIndex === -1) { //There is no unit and number given\n\n if (arrayIng[0] === 'a') { //If it starts with A , remove it. Eg : A bowl of butter ~ 1 bowl of butter\n objectIng = {\n count: 1,\n unit: '',\n name: arrayIng.slice(1).join(' ')\n }\n } else {\n objectIng = {\n count: 1,\n unit: '',\n name: ing\n }\n }\n }\n\n if(objectIng.count < 0) objectIng.count *=-1;\n return objectIng;\n });\n\n this.ingredients = newIngredients;\n }", "function getPlural(number, one, two) {///1,ведра,вёдер\n let n = Math.abs(number);\n\n if(n==11){\n return two;\n }else{\n n %= 10;\n if (n === 1) {\n return one;\n }else{\n return two;\n }\n }\n}", "function intword(number, units, kilo, decimals, decPoint, thousandsSep, suffixSep) {\n var humanized, unit;\n units = units || ['', 'K', 'M', 'B', 'T'], unit = units.length - 1, kilo = kilo || 1000, decimals = isNaN(decimals) ? 2 : Math.abs(decimals), decPoint = decPoint || '.', thousandsSep = thousandsSep || ',', suffixSep = suffixSep || '';\n\n for (var i = 0; i < units.length; i++) {\n if (number < Math.pow(kilo, i + 1)) {\n unit = i;\n break;\n }\n }\n\n humanized = number / Math.pow(kilo, unit);\n var suffix = units[unit] ? suffixSep + units[unit] : '';\n return numberFormat(humanized, decimals, decPoint, thousandsSep) + suffix;\n}", "function plural(word, num) {\n var forms = word.split('_');\n return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]);\n }", "function plural(singleStr, pluralStr, count) {\n if (count === 1) return singleStr;\n return pluralStr;\n}", "function plural(word, num) {\n var forms = word.split('_');\n return num % 10 === 1 && num % 100 !== 11 ?\n forms[0] :\n num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ?\n forms[1] :\n forms[2];\n }", "function plural(word, num) {\n var forms = word.split('_');\n return num % 10 === 1 && num % 100 !== 11 ?\n forms[0] :\n num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ?\n forms[1] :\n forms[2];\n }", "function plural(word, num) {\n var forms = word.split('_');\n return num % 10 === 1 && num % 100 !== 11 ?\n forms[0] :\n num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ?\n forms[1] :\n forms[2];\n }", "function humanizeStr(nd, s, en, o) {\n var r = Math.round,\n dir = en ? ' ago' : '前',\n pl = function(v, n) {\n return (s === undefined) ? n + (en ? ' ' : '') + v + (n > 1 && en ? 's' : '') + dir : n + v.substring(0, 1)\n },\n ts = Date.now() - new Date(nd).getTime(),\n ii;\n if( ts < 0 )\n {\n ts *= -1;\n dir = en ? ' from now' : '後';\n }\n for (var i in o) {\n if (r(ts) < o[i]) return pl(ii || 'm', r(ts / (o[ii] || 1)))\n ii = i;\n }\n return pl(i, r(ts / o[i]));\n}", "function directiveNormalize(name){return name.replace(PREFIX_REGEXP,'').replace(SPECIAL_CHARS_REGEXP,fnCamelCaseReplace);}" ]
[ "0.68932784", "0.68764114", "0.6856109", "0.6782922", "0.64469224", "0.6387845", "0.632334", "0.63024986", "0.62655085", "0.6195872", "0.6195872", "0.6195872", "0.6195872", "0.6195872", "0.6195872", "0.6195872", "0.6195872", "0.6195872", "0.6195872", "0.6178826", "0.6176442", "0.61701566", "0.61701566", "0.6114281", "0.610541", "0.610541", "0.61019313", "0.6083263", "0.60830796", "0.6068654", "0.605349", "0.60487986", "0.6037374", "0.6031112", "0.6031112", "0.6031112", "0.6015301", "0.6009468", "0.6009468", "0.6009468", "0.59872067", "0.59764504", "0.5963121", "0.5957234", "0.5957234", "0.59567547", "0.5924801", "0.591287", "0.5896638", "0.5896638", "0.5896638", "0.5896638", "0.5896638", "0.5896638", "0.5878493", "0.58764845", "0.58756036", "0.58453125", "0.58401877", "0.5833794", "0.5833794", "0.5831898", "0.5823436", "0.5816499", "0.5804504", "0.5794983", "0.5794224", "0.57924336", "0.5769248", "0.5769248", "0.5769248", "0.5761925", "0.57404697", "0.5734468", "0.5728124", "0.57207197", "0.5718229", "0.5718229", "0.5710114", "0.5707699", "0.5707699", "0.5707699", "0.57022965", "0.5699198", "0.5693792", "0.5691725", "0.5682884", "0.5677418", "0.5677411", "0.567593", "0.56714904", "0.5665795", "0.5656419", "0.5653969", "0.5653969", "0.5653969", "0.56429696", "0.5641426" ]
0.5839228
61
but doesn't do any validation, makes a bunch of assumptions about what units are present, and so on.
function quickDT(obj, zone) { // assume we have the higher-order units for (var _iterator = _createForOfIteratorHelperLoose(orderedUnits$1), _step; !(_step = _iterator()).done;) { var u = _step.value; if (isUndefined(obj[u])) { obj[u] = defaultUnitValues[u]; } } var invalid = hasInvalidGregorianData(obj) || hasInvalidTimeData(obj); if (invalid) { return DateTime.invalid(invalid); } var tsNow = Settings.now(), offsetProvis = zone.offset(tsNow), _objToTS = objToTS(obj, offsetProvis, zone), ts = _objToTS[0], o = _objToTS[1]; return new DateTime({ ts: ts, zone: zone, o: o }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "checkUnits(){\n let logger = this.namespace.container.logger;\n\n let leftSideUnit = this.unitsParsed;\n if (typeof leftSideUnit === 'undefined') {\n logger.warn(`No units set for \"${this.index}\"`);\n }\n for (const scope in this.assignments) {\n let rightSideExpr = this.assignments[scope];\n if (typeof rightSideExpr.num === 'undefined') { // skip numbers\n let rightSideUnit = rightSideExpr.calcUnit(this);\n if (typeof rightSideUnit === 'undefined') {\n logger.warn(`Cannot calculate right side units in \"${this.index}\" for scope \"${scope}\".`);\n } else if (leftSideUnit && !leftSideUnit.equal(rightSideUnit, true)) {\n let leftUnitString = leftSideUnit.toString();\n let rightUnitString = rightSideUnit.simplify().toString();\n logger.warn(`Units inconsistency in \"${this.index}\" for scope \"${scope}\". Left: \"${leftUnitString}\". Right: \"${rightUnitString}\"`);\n }\n }\n }\n }", "units() {\n return this.growRight('#Unit').match('#Unit$')\n }", "function unit(i, units) {\n\t if ((typeof i === \"string\") && (!i.match(/^[\\-0-9\\.]+$/))) {\n\t return i;\n\t } else {\n\t return \"\" + i + units;\n\t }\n\t }", "function calculateUnitValue(i) {\n\tif (getUnit(i) === \"in\") return 1;\n\telse if (getUnit(i) === \"cm\") return .3937;\n\telse return 0;\n}", "convertUnits(input, output, units) {\n var indexOfInput = 0;\n var indexOfOutput = 0;\n var UNITS = units.getUnits();\n var STEP = units.getStep();\n\n for (var i = 0; i < UNITS.length; i++) {\n if (UNITS[i] === input.unit) {\n indexOfInput = i;\n }\n if (UNITS[i] === output.unit) {\n indexOfOutput = i;\n }\n }\n\n var diff = indexOfOutput - indexOfInput;\n\n if (diff === 0) {\n return input.value;\n } else {\n var coef = 10**(diff * STEP);\n var newvalue = input.value * coef;\n return newvalue;\n }\n }", "changeUnits(ev) {\n if(ev.target.getAttribute('value') === 'metric') this.unit = 0;\n else if(ev.target.getAttribute('value') === 'imperial') this.unit = 1;\n inputsRequired.forEach((input, i) => {\n input.label.innerHTML = (input.name + placeHolderTexts[i][this.unit === 0 ? 'metric' : 'imperial'])\n });\n }", "function PropulsionUnit() {\n }", "function PropulsionUnit() {\n }", "function unit(i, units) {\r\n\t\tif ((typeof i === 'string') && (!i.match(/^[\\-0-9\\.]+$/))) {\r\n\t\t\treturn i;\r\n\t\t} else {\r\n\t\t\treturn '' + i + units;\r\n\t\t}\r\n\t}", "function unit(i, units) {\n if ((typeof i === \"string\") && (!i.match(/^[\\-0-9\\.]+$/))) {\n return i;\n } else {\n return \"\" + i + units;\n }\n }", "function unit(i, units) {\n if ((typeof i === \"string\") && (!i.match(/^[\\-0-9\\.]+$/))) {\n return i;\n } else {\n return \"\" + i + units;\n }\n }", "function getUnitValue(u) { return (u.value != undefined) ? u.value : u; }", "function PropulsionUnit() {\n\t}", "get units() {\n return this._units;\n }", "function unit(i, units) {\n if ((typeof i === \"string\") && (!i.match(/^[\\-0-9\\.]+$/))) {\n return i;\n } else {\n return \"\" + i + units;\n }\n }", "function unit(i, units) {\n if ((typeof i === \"string\") && (!i.match(/^[\\-0-9\\.]+$/))) {\n return i;\n } else {\n return \"\" + i + units;\n }\n }", "setUnits() {\n this.units = unitSystem.getUnits();\n }", "function units(num) {\n\treturn num*CELL_SIZE + UNIT_NAME;\n}", "function parseUnit(val, output) {\n output = output || {};\n if (!type_5.isDefined(val)) {\n output.unit = undefined;\n output.value = undefined;\n }\n else if (type_5.isNumber(val)) {\n output.unit = undefined;\n output.value = val;\n }\n else {\n var match = resources_2.measureExpression.exec(val);\n var startString = match[1];\n var unitTypeString = match[2];\n output.unit = unitTypeString || undefined;\n output.value = startString ? parseFloat(startString) : undefined;\n }\n return output;\n }", "function get_units() {\n switch(cookie['units'])\t{\n case \"mi\":\treturn \"Miles\"; break;\n case \"nm\":\treturn \"Naut.M\"; break;\n default:\treturn \"KM\"; break;\n }\n}", "function normalizeUnit(unit) {\n var normalized = {\n year: \"year\",\n years: \"year\",\n month: \"month\",\n months: \"month\",\n day: \"day\",\n days: \"day\",\n hour: \"hour\",\n hours: \"hour\",\n minute: \"minute\",\n minutes: \"minute\",\n quarter: \"quarter\",\n quarters: \"quarter\",\n second: \"second\",\n seconds: \"second\",\n millisecond: \"millisecond\",\n milliseconds: \"millisecond\",\n weekday: \"weekday\",\n weekdays: \"weekday\",\n weeknumber: \"weekNumber\",\n weeksnumber: \"weekNumber\",\n weeknumbers: \"weekNumber\",\n weekyear: \"weekYear\",\n weekyears: \"weekYear\",\n ordinal: \"ordinal\"\n }[unit.toLowerCase()];\n if (!normalized) throw new InvalidUnitError(unit);\n return normalized;\n} // this is a dumbed down version of fromObject() that runs about 60% faster", "function normalizeUnit(unit) {\n var normalized = {\n year: \"year\",\n years: \"year\",\n month: \"month\",\n months: \"month\",\n day: \"day\",\n days: \"day\",\n hour: \"hour\",\n hours: \"hour\",\n minute: \"minute\",\n minutes: \"minute\",\n quarter: \"quarter\",\n quarters: \"quarter\",\n second: \"second\",\n seconds: \"second\",\n millisecond: \"millisecond\",\n milliseconds: \"millisecond\",\n weekday: \"weekday\",\n weekdays: \"weekday\",\n weeknumber: \"weekNumber\",\n weeksnumber: \"weekNumber\",\n weeknumbers: \"weekNumber\",\n weekyear: \"weekYear\",\n weekyears: \"weekYear\",\n ordinal: \"ordinal\"\n }[unit.toLowerCase()];\n if (!normalized) throw new InvalidUnitError(unit);\n return normalized;\n} // this is a dumbed down version of fromObject() that runs about 60% faster", "function normalizeUnit(unit) {\n var normalized = {\n year: \"year\",\n years: \"year\",\n month: \"month\",\n months: \"month\",\n day: \"day\",\n days: \"day\",\n hour: \"hour\",\n hours: \"hour\",\n minute: \"minute\",\n minutes: \"minute\",\n quarter: \"quarter\",\n quarters: \"quarter\",\n second: \"second\",\n seconds: \"second\",\n millisecond: \"millisecond\",\n milliseconds: \"millisecond\",\n weekday: \"weekday\",\n weekdays: \"weekday\",\n weeknumber: \"weekNumber\",\n weeksnumber: \"weekNumber\",\n weeknumbers: \"weekNumber\",\n weekyear: \"weekYear\",\n weekyears: \"weekYear\",\n ordinal: \"ordinal\"\n }[unit.toLowerCase()];\n if (!normalized) throw new InvalidUnitError(unit);\n return normalized;\n} // this is a dumbed down version of fromObject() that runs about 60% faster", "function normalizeUnit(unit) {\n var normalized = {\n year: \"year\",\n years: \"year\",\n month: \"month\",\n months: \"month\",\n day: \"day\",\n days: \"day\",\n hour: \"hour\",\n hours: \"hour\",\n minute: \"minute\",\n minutes: \"minute\",\n second: \"second\",\n seconds: \"second\",\n millisecond: \"millisecond\",\n milliseconds: \"millisecond\",\n weekday: \"weekday\",\n weekdays: \"weekday\",\n weeknumber: \"weekNumber\",\n weeksnumber: \"weekNumber\",\n weeknumbers: \"weekNumber\",\n weekyear: \"weekYear\",\n weekyears: \"weekYear\",\n ordinal: \"ordinal\"\n }[unit.toLowerCase()];\n if (!normalized) throw new InvalidUnitError(unit);\n return normalized;\n} // this is a dumbed down version of fromObject() that runs about 60% faster", "function normalizeUnit(unit) {\n const normalized = {\n year: \"year\",\n years: \"year\",\n month: \"month\",\n months: \"month\",\n day: \"day\",\n days: \"day\",\n hour: \"hour\",\n hours: \"hour\",\n minute: \"minute\",\n minutes: \"minute\",\n quarter: \"quarter\",\n quarters: \"quarter\",\n second: \"second\",\n seconds: \"second\",\n millisecond: \"millisecond\",\n milliseconds: \"millisecond\",\n weekday: \"weekday\",\n weekdays: \"weekday\",\n weeknumber: \"weekNumber\",\n weeksnumber: \"weekNumber\",\n weeknumbers: \"weekNumber\",\n weekyear: \"weekYear\",\n weekyears: \"weekYear\",\n ordinal: \"ordinal\"\n }[unit.toLowerCase()];\n if (!normalized) throw new InvalidUnitError(unit);\n return normalized;\n} // this is a dumbed down version of fromObject() that runs about 60% faster", "function normalizeUnit(unit) {\n const normalized = {\n year: \"year\",\n years: \"year\",\n month: \"month\",\n months: \"month\",\n day: \"day\",\n days: \"day\",\n hour: \"hour\",\n hours: \"hour\",\n minute: \"minute\",\n minutes: \"minute\",\n quarter: \"quarter\",\n quarters: \"quarter\",\n second: \"second\",\n seconds: \"second\",\n millisecond: \"millisecond\",\n milliseconds: \"millisecond\",\n weekday: \"weekday\",\n weekdays: \"weekday\",\n weeknumber: \"weekNumber\",\n weeksnumber: \"weekNumber\",\n weeknumbers: \"weekNumber\",\n weekyear: \"weekYear\",\n weekyears: \"weekYear\",\n ordinal: \"ordinal\"\n }[unit.toLowerCase()];\n if (!normalized) throw new InvalidUnitError(unit);\n return normalized;\n} // this is a dumbed down version of fromObject() that runs about 60% faster", "function ensureUnit(val) {\n return val + (Object(min_dash__WEBPACK_IMPORTED_MODULE_3__[\"isNumber\"])(val) ? 'px' : '');\n}", "function normalizeUnit(unit) {\n var normalized = {\n year: \"year\",\n years: \"year\",\n month: \"month\",\n months: \"month\",\n day: \"day\",\n days: \"day\",\n hour: \"hour\",\n hours: \"hour\",\n minute: \"minute\",\n minutes: \"minute\",\n quarter: \"quarter\",\n quarters: \"quarter\",\n second: \"second\",\n seconds: \"second\",\n millisecond: \"millisecond\",\n milliseconds: \"millisecond\",\n weekday: \"weekday\",\n weekdays: \"weekday\",\n weeknumber: \"weekNumber\",\n weeksnumber: \"weekNumber\",\n weeknumbers: \"weekNumber\",\n weekyear: \"weekYear\",\n weekyears: \"weekYear\",\n ordinal: \"ordinal\"\n }[unit.toLowerCase()];\n if (!normalized) throw new InvalidUnitError(unit);\n return normalized;\n } // this is a dumbed down version of fromObject() that runs about 60% faster", "function ensureUnit(val) {\n return val + (Object(min_dash__WEBPACK_IMPORTED_MODULE_0__[\"isNumber\"])(val) ? 'px' : '');\n}", "function getUnit(input) {\n return String(input).match(/[\\d.\\-+]*\\s*(.*)/)[1] || '';\n} // Emulate the sass function \"unitless\"", "function getUnit(input) {\n return String(input).match(/[\\d.\\-+]*\\s*(.*)/)[1] || '';\n} // Emulate the sass function \"unitless\"", "function getUnit(input) {\n return String(input).match(/[\\d.\\-+]*\\s*(.*)/)[1] || '';\n} // Emulate the sass function \"unitless\"", "function getUnit(input) {\n return String(input).match(/[\\d.\\-+]*\\s*(.*)/)[1] || '';\n} // Emulate the sass function \"unitless\"", "function getUnit(input) {\n return String(input).match(/[\\d.\\-+]*\\s*(.*)/)[1] || '';\n} // Emulate the sass function \"unitless\"", "function getUnit(input) {\n return String(input).match(/[\\d.\\-+]*\\s*(.*)/)[1] || '';\n} // Emulate the sass function \"unitless\"", "function getUnit(input) {\n return String(input).match(/[\\d.\\-+]*\\s*(.*)/)[1] || '';\n} // Emulate the sass function \"unitless\"", "function getUnit(input) {\n return String(input).match(/[\\d.\\-+]*\\s*(.*)/)[1] || '';\n} // Emulate the sass function \"unitless\"", "function getUnit(input) {\n return String(input).match(/[\\d.\\-+]*\\s*(.*)/)[1] || '';\n} // Emulate the sass function \"unitless\"", "function getUnit(input) {\n return String(input).match(/[\\d.\\-+]*\\s*(.*)/)[1] || '';\n} // Emulate the sass function \"unitless\"", "function handleUnit(unit) {\n switch(unit) {\n case \"MT\":\n return \"Minutes\";\n case \"HT\":\n return \"Hours\";\n case \"D\":\n return \"Days\";\n case \"M\":\n return \" Months\";\n default:\n return \"\";\n }\n}", "function obtainUnitValues(values){\n var ANDQUERY = ( values.indClone != undefined ) ? \"data-clone-index=\"+values.indClone : \"type='text'\",\n _identify = values.from,\n _parent = values.padre,\n _cantidad = _parent.find('#'+_identify+'_amount['+ANDQUERY+']'),\n _componentValue = values.component[ values.periodTxt ].value,\n _valorUnitario = _parent.find('#'+_identify+'_unitario['+ANDQUERY+']'),\n _valorTotalInpu = _parent.find('#'+_identify+'_total['+ANDQUERY+']'),\n _cantidadVal = ( isNaN( _cantidad.val() ) == true ) ? _cantidad.val(1) : _cantidad.val();\n\n _valorUnitario.val( fNumber.go( _componentValue ,\"COP\"));\n _valorTotal = _cantidadVal * _componentValue;\n _valorTotalInpu.val( fNumber.go( _valorTotal ,\"COP\") ).data('cost', _valorTotal);\n\n /* console.clear();\n console.error(\"componentValue\", _componentValue );\n console.error(\"ANDQUERY\", ANDQUERY );\n console.error(\"_parent\", _parent );\n console.error(\"_identify\", _identify );\n console.error(\"_cantidad\", _cantidad.val() );*/\n }", "get unitFormatted() {\r\n\t\treturn this.count > 1 ? this.unit + 's' : this.unit;\r\n\t}", "function ConvertHandler() {\n \n const allowedUnits = ['gal','l','mi','km','lbs','kg','GAL','L','MI','KM','LBS','KG'];\n \n /**\n * Extracts the number from the given value and unit combination.\n **/\n this.getNum = function(input) {\n let result;\n \n // Test if there are no numbers involved\n let numRegex = /[\\d]/;\n if (!numRegex.test(input)) {\n return 1;\n }\n \n // Set double fraction testing regex\n let multiFrac = /\\/[^\\/]*\\/+/;\n \n // Test if there are multiple fractions\n if (multiFrac.test(input)) {\n return 'invalid number';\n }\n \n // Set fraction testing regex\n let fracRegex = /(\\d+,?)+\\.?\\d*\\/(\\d+,?)+\\.?\\d*/;\n \n // Test if there is a fraction\n if (fracRegex.test(input)) {\n \n // Extract the fraction\n let fractionString = input.match(fracRegex)[0];\n \n // Extract each number\n let fractionArray = fractionString.split('/');\n let numerator = fractionArray[0];\n let denominator = fractionArray[1];\n \n // Turn the fraction into a value\n result = numerator / denominator;\n \n } else {\n \n /* Set regex to some amount of numbers, optional decimal, then one or more numbers.\n Also just takes the first value of the array which is returned and assigns it to the result.*/\n result = input.match(/(\\d+,?)+\\.?\\d*/)[0];\n \n }\n return result;\n };\n \n this.getUnit = function(input) {\n let result;\n \n // Pull out the unit from the input\n let unitString = input.match(/[A-Za-z]+/)[0]\n \n // Check for the input unit to match one of the allowed units.\n if (allowedUnits.includes(unitString)) {\n return unitString;\n } else {\n return 'invalid unit';\n }\n \n return result;\n };\n \n //var input = ['gal','l','mi','km','lbs','kg'];\n //var expect = ['l','gal','km','mi','kg','lbs'];\n this.getReturnUnit = function(initUnit) {\n let result;\n switch (initUnit.toLowerCase()) {\n case 'gal': result = 'l'; break;\n case 'l': result = 'gal'; break;\n case 'mi': result = 'km'; break;\n case 'km': result = 'mi'; break;\n case 'lbs': result = 'kg'; break;\n case 'kg': result = 'lbs'; break;\n default: result = 'invalid input unit'\n }\n return result;\n };\n\n // let input = ['gal','l','mi','km','lbs','kg'];\n // let expect = ['gallons','liters','miles','kilometers','pounds','kilograms'];\n this.spellOutUnit = function(unit) {\n let result;\n switch (unit.toLowerCase()) {\n case 'gal': result = 'gallons'; break;\n case 'l': result = 'liters'; break;\n case 'mi': result = 'miles'; break;\n case 'km': result = 'kilometers'; break;\n case 'lbs': result = 'pounds'; break;\n case 'kg': result = 'kilograms'; break;\n }\n \n return result;\n };\n \n this.convert = function(initNum, initUnit) {\n const galToL = 3.78541;\n const lbsToKg = 0.453592;\n const miToKm = 1.60934;\n let result;\n if (initNum == 'invalid number' && initUnit == 'invalid unit') {\n return 'invalid input number and input unit';\n } else if (initNum == 'invalid number') {\n return 'invalid input number'\n } else if (initUnit == 'invalid unit') {\n return 'invalid input unit';\n }\n switch (initUnit.toLowerCase()) {\n case 'gal': result = initNum * galToL; break;\n case 'l': result = initNum / galToL; break;\n case 'lbs': result = initNum * lbsToKg; break;\n case 'kg': result = initNum / lbsToKg; break;\n case 'mi': result = initNum * miToKm; break;\n case 'km': result = initNum / miToKm; break;\n default: result = 'invalid input unit or number';\n }\n \n return result;\n };\n \n this.getString = function(initNum, initUnit, returnNum, returnUnit) {\n let result;\n if (initNum == 'invalid number' && initUnit == 'invalid unit') {\n result = 'Invalid unit and number'\n } else {\n \n // Return the number so that it has a fixed number of decimal places, up to 5.\n console.log(returnNum);\n let newReturnNum = Math.pow(10, -5) * Math.round(returnNum * Math.pow(10, 5));\n \n result = initNum + ' ' + this.spellOutUnit(initUnit) + ' converts to ' + newReturnNum + \n ' ' + this.spellOutUnit(returnUnit);\n }\n return result;\n };\n \n}", "function ensureUnit(val) {\n return val + (isNumber(val) ? 'px' : '');\n}", "function ensureUnit(val) {\n return val + (isNumber(val) ? 'px' : '');\n}", "function ensureUnit(val) {\n return val + (isNumber(val) ? 'px' : '');\n}", "function unitChange() {\n oldunits = units;\n if(document.getElementById('unit_SI').checked) {\n units = 'unit_SI';\n doseUnit = 'uSv/h';\n dosenorm = eps * 1e4 * 3600;\n lunit = cm;\n lunitname = 'cm';\n }\n else {\n units = 'unit_US';\n doseUnit = 'mrem/h';\n dosenorm = eps * 1e3 * 3600;\n lunit = inch;\n lunitname = 'inch';\n }\n\n // Update length unit\n var ltext = document.getElementsByClassName('lunit');\n for (var i = 0; i < ltext.length; i++) { \n ltext[i].innerHTML = lunitname;\n };\n\n // Update dose unit\n var dtext = document.getElementsByClassName('dunit');\n for (var i = 0; i < dtext.length; i++) {\n dtext[i].innerHTML = doseUnit;\n };\n\n autoConv = document.getElementById('autoConv').checked;\n if(autoConv) { // Covert length values according to the selected unit\n var linp = document.getElementsByClassName('inpL');\n var unitfactor;\n if(units=='unit_SI' && oldunits=='unit_US')\n unitfactor = inch/cm;\n else if(units=='unit_US' && oldunits=='unit_SI')\n unitfactor = cm/inch;\n else\n unitfactor = 1.0;\n for (var i = 0; i < linp.length; i++) {\n linp[i].value = (parseFloat(linp[i].value) * unitfactor).toFixed(2);\n };\n }\n updateAll();\n}", "function ensureUnit(val) {\n return val + (isNumber(val) ? 'px' : '');\n}", "function ensureUnit(val) {\n return val + (isNumber(val) ? 'px' : '');\n }", "configUnits(units) {\n this.units = '';\n if (units === 'm' || units === 'metric') {\n this.units = '&units=metric';\n }\n }", "function GetInternalUnit()\n{\n\treturn m_internalUnit;\n}", "function getUnitFromInput() {\n\t\tvar unit_id = $(\"#units-select\").val();\n\t\treturn units[unit_id];\n\t}", "function normalizeUnit(unit, ignoreUnknown) {\n if (ignoreUnknown === void 0) {\n ignoreUnknown = false;\n }\n\n var normalized = {\n year: \"year\",\n years: \"year\",\n month: \"month\",\n months: \"month\",\n day: \"day\",\n days: \"day\",\n hour: \"hour\",\n hours: \"hour\",\n minute: \"minute\",\n minutes: \"minute\",\n second: \"second\",\n seconds: \"second\",\n millisecond: \"millisecond\",\n milliseconds: \"millisecond\",\n weekday: \"weekday\",\n weekdays: \"weekday\",\n weeknumber: \"weekNumber\",\n weeksnumber: \"weekNumber\",\n weeknumbers: \"weekNumber\",\n weekyear: \"weekYear\",\n weekyears: \"weekYear\",\n ordinal: \"ordinal\"\n }[unit ? unit.toLowerCase() : unit];\n if (!ignoreUnknown && !normalized) throw new InvalidUnitError(unit);\n return normalized;\n} // this is a dumbed down version of fromObject() that runs about 60% faster", "function isUnitModel(model) {\n return model && model.type === 'unit';\n }", "function fixedUnit(str) {\n var unit = type.Unit.parse(str);\n unit.fixPrefix = true;\n return unit;\n } // Source: http://www.wikiwand.com/en/Physical_constant", "get unit () {\n\t\treturn this._unit;\n\t}", "static get unitsPerInch() {\n var rv = {};\n\n rv['pt']=72.0;\n rv['px']=96.0;\n rv['em']=6.0;\n return rv;\n }", "static fromNumerical(numerical: numerical): AbstractNumericalUnit {\n const string_of_number = Number(numerical).toString();\n if (string_of_number === \"0\") {\n return new AbstractNumericalUnit(0, 0, null);\n }\n const index_of_decimal = [...string_of_number].findIndex((element) => element === \".\");\n const number_character_array = [...string_of_number.replace(\".\", \"\")];\n const length = number_character_array.length;\n const decimal_offset = (index_of_decimal === -1) ? length : index_of_decimal;\n\n let last_unit = null;\n for (let i = length - 1; i >= 0; i--) {\n const power = decimal_offset - i - 1;\n const value = Number(number_character_array[i]);\n if (value === 0) {\n continue;\n }\n last_unit = new AbstractNumericalUnit(power, value, last_unit);\n }\n // $FlowFixMe\n return last_unit;\n }", "function measureUpdate(unitSet) {\n let unitsTo = {\n \"length\": \"\",\n \"speed\": \"\",\n \"temperature\": \"\",\n \"volume_flow_rate\": \"\"\n }\n if(unitSet == 'imperial') {\n // Imperial\n // Speed: mile/hour\n // Length: feet\n // Volume Flow Rate: cubic feet/second\n // Temperature: Fahrenheit\n unitsTo.length = 'ft';\n unitsTo.speed = 'm/h';\n unitsTo.temperature = 'F';\n unitsTo.volume_flow_rate = 'ft3/s';\n } else {\n // Metric\n // Speed: metre/second\n // Length: meter\n // Volume Flow Rate: cubic meter/second\n // Temperature: Celsius\n unitsTo.length = 'm';\n unitsTo.speed = 'm/s';\n unitsTo.temperature = 'C';\n unitsTo.volume_flow_rate = 'm3/s';\n }\n let unitBase = 'FT';\n if(unitSet == 'metric') {\n unitBase = 'M';\n }\n\n // Select values of all the items that need to have their units update\n // Height range\n let heightUnit = document.querySelector('.height-wrapper').getAttribute('data-unit');\n let highHeightMeasure = parseInt(document.querySelector('#high-height').textContent);\n let lowHeightMeasure = parseInt(document.querySelector('#low-height').textContent);\n // Convert\n highHeightMeasure = Math.round(convert(highHeightMeasure).from(heightUnit).to(unitsTo.length)*10)/10;\n lowHeightMeasure = Math.round(convert(lowHeightMeasure).from(heightUnit).to(unitsTo.length)*10)/10;\n // Set\n document.querySelector('.height-wrapper').setAttribute('data-unit', unitsTo.length);\n document.querySelector('#high-height').innerHTML = highHeightMeasure;\n document.querySelector('#low-height').innerHTML = lowHeightMeasure;\n // Measurement\n document.querySelector('#height-unit').innerHTML = '';\n document.querySelector('#height-unit').insertAdjacentText('afterbegin', unitBase);\n\n // Flow range\n let rangeFlowUnit = document.querySelector('.range-wrapper').getAttribute('data-unit');\n let highRangeFlowMeasure = parseInt(document.querySelector('#high-range').textContent);\n let lowRangeFlowMeasure = parseInt(document.querySelector('#low-range').textContent);\n // Convert\n highRangeFlowMeasure = Math.round(convert(highRangeFlowMeasure).from(rangeFlowUnit).to(unitsTo.volume_flow_rate));\n lowRangeFlowMeasure = Math.round(convert(lowRangeFlowMeasure).from(rangeFlowUnit).to(unitsTo.volume_flow_rate));\n // Set\n document.querySelector('.range-wrapper').setAttribute('data-unit', unitsTo.volume_flow_rate);\n document.querySelector('#high-range').innerHTML = highRangeFlowMeasure;\n document.querySelector('#low-range').innerHTML = lowRangeFlowMeasure;\n // Measurement\n document.querySelector('#range-unit').innerHTML = '';\n document.querySelector('#range-unit').insertAdjacentText('afterbegin', unitBase);\n document.querySelector('#range-unit').insertAdjacentHTML('beforeend', '<span class=\"superscript\">3</span>');\n document.querySelector('#range-unit').insertAdjacentText('beforeend', '/S');\n\n // Current temp\n let currentTempUnit = document.querySelector('.weather-subtitle').getAttribute('data-unit');\n let currentWaterTempMeasure = document.querySelector('#water-temp').textContent.split('o')[0].split(' ')[1];\n let currentAirTempMeasure = parseInt(document.querySelector('#air-temp').textContent.split('o')[0].split(' ')[1]);\n // Convert\n if(currentWaterTempMeasure !== '-') {\n // Water temp is not a null value\n currentWaterTempMeasure = Math.round(convert(parseInt(currentWaterTempMeasure)).from(currentTempUnit).to(unitsTo.temperature));\n }\n currentAirTempMeasure = Math.round(convert(currentAirTempMeasure).from(currentTempUnit).to(unitsTo.temperature));\n // Set\n document.querySelector('.weather-subtitle').setAttribute('data-unit', unitsTo.temperature);\n // Water\n document.querySelector('#water-temp').innerHTML = '';\n document.querySelector('#water-temp').insertAdjacentText('afterbegin', 'Water: ' + currentWaterTempMeasure);\n document.querySelector('#water-temp').insertAdjacentHTML('beforeend', '<span class=\"degree\">o</span>');\n document.querySelector('#water-temp').insertAdjacentText('beforeend', unitsTo.temperature);\n // Air\n document.querySelector('#air-temp').innerHTML = '';\n document.querySelector('#air-temp').insertAdjacentText('afterbegin', 'Air: ' + currentAirTempMeasure);\n document.querySelector('#air-temp').insertAdjacentHTML('beforeend', '<span class=\"degree\">o</span>');\n document.querySelector('#air-temp').insertAdjacentText('beforeend', unitsTo.temperature);\n\n // Current flow\n let currentFlowUnit = document.querySelector('#current-flow').getAttribute('data-unit');\n let currentFlowMeasure = parseInt(document.querySelector('#current-flow > .container').textContent);\n // Convert\n currentFlowMeasure = Math.round(convert(currentFlowMeasure).from(currentFlowUnit).to(unitsTo.volume_flow_rate));\n // Set\n document.querySelector('#current-flow').setAttribute('data-unit', unitsTo.volume_flow_rate);\n document.querySelector('#current-flow > .container').textContent = currentFlowMeasure;\n}", "createStartingUnits(units, startingObjectsList){\n var keys, unitInfo, unitCoords, amount;\n if (loadingSavedGame === true) {\n if(this.isPlayer() === true) {\n keys = currentData.units;\n //console.log(\"Player units\", keys);\n\n for(var i = 0; i < keys.length; i++){\n\n unitInfo = this.getUnitInfo(keys[i].type);\n //console.log (unitInfo);\n amount = 1;\n\n //creates the correct amount of buildings for the current type\n for(var j = 0; j < amount; j++){\n this.unitAmount++;\n\n unitCoords = {\n x: keys[i].x,\n y: keys[i].y\n }\n var unitHealth = keys[i].health;\n var unit = new Unit(unitInfo, unitCoords.x, unitCoords.y, this.game, this.isPlayer(), this, unitHealth);\n this.units.push(unit);\n }\n }\n } // creating player units using saved data\n else {\n keys = currentData.ai_units;\n //console.log(\"Enemy units\", keys);\n\n for(var i = 0; i < keys.length; i++){\n\n unitInfo = this.getUnitInfo(keys[i].type);\n //console.log (unitInfo);\n amount = 1;\n\n //creates the correct amount of buildings for the current type\n for(var j = 0; j < amount; j++){\n this.unitAmount++;\n\n unitCoords = {\n x: keys[i].x,\n y: keys[i].y\n }\n var aiUnitHealth = keys[i].health;\n var unit = new Unit(unitInfo, unitCoords.x, unitCoords.y, this.game, this.isPlayer(), this, aiUnitHealth);\n this.units.push(unit);\n }\n }\n }\n } // creating ai units using saved data\n else {\n //gets all the types of the starting units\n var keys = Object.keys(units);\n\n //goes through the different types of units the kingdom starts with and creates the given kingdom's base starting units\n for(var i = 0; i < keys.length; i++){\n var unitInfo = this.getUnitInfo(keys[i]);\n var amount = units[keys[i]];\n\n\n\n //goes through and creates the starting units\n for(var j = 0; j < amount; j++){\n\n this.unitAmount++;\n var unitCoords = this.findStartingPosition(unitInfo, this.unitAmount, startingObjectsList);\n var unit = new Unit(unitInfo, unitCoords.x, unitCoords.y, this.game, this.isPlayer(), this, 0);\n\n\n this.units.push(unit);\n }\n }\n } // creating player and ai units on a new game\n }", "standardIngredients() {\n\n const usedUnits = ['tablespoons', 'tablespoon', 'ounces', 'ounce', 'teaspoons', 'teaspoon', 'cups', 'pounds', 'lbs', 'lb'];\n const standardUnits = ['tbsp', 'tbsp', 'oz', 'oz', 'tsp', 'tsp', 'cup', 'pound', 'lb', 'lb'];\n const units = [...standardUnits, 'kg', 'g'];\n const newIngredients = this.ingredients.map(element => {\n let ing = element.toLowerCase();\n usedUnits.forEach((unit, index) => {\n ing = ing.replace(unit, standardUnits[index]);\n });\n\n ing = ing.replace(/ *\\([^)]*\\) */g, ' '); //Removes the contents in () parenthesis\n\n const arrayIng = ing.split(' ');\n const unitIndex = arrayIng.findIndex(el => units.includes(el));\n let objectIng;\n if (unitIndex > -1) {\n const countIndex = arrayIng.slice(0, unitIndex); // Everything before Unit is considered as Count\n let count;\n if (countIndex.length === 1) {\n count = eval(arrayIng[0].replace('-', '+'));\n if (count === undefined) count = 1;\n } else {\n if(countIndex[1] === 'to') \n count = (parseInt(countIndex[0]) + parseInt(countIndex[2]))/2;\n else \n count = eval(arrayIng.slice(0, unitIndex).join('+'));\n }\n objectIng = {\n count,\n unit: arrayIng[unitIndex],\n name: arrayIng.slice(unitIndex + 1).join(' ')\n }\n\n } else if (parseInt(arrayIng[0], 10)) { //There is no unit but number is given\n objectIng = {\n count: parseInt(arrayIng[0], 10),\n unit: '',\n name: arrayIng.slice(1).join(' ')\n }\n } else if (unitIndex === -1) { //There is no unit and number given\n\n if (arrayIng[0] === 'a') { //If it starts with A , remove it. Eg : A bowl of butter ~ 1 bowl of butter\n objectIng = {\n count: 1,\n unit: '',\n name: arrayIng.slice(1).join(' ')\n }\n } else {\n objectIng = {\n count: 1,\n unit: '',\n name: ing\n }\n }\n }\n\n if(objectIng.count < 0) objectIng.count *=-1;\n return objectIng;\n });\n\n this.ingredients = newIngredients;\n }", "function bottomDischargeCalculations(){\r\n\t//1. Assign 0 if input left blank\r\n\tvar assign_zero = [$bottomSpoutDiameter, $bottomSpoutLength];\r\n\t$.each(assign_zero, (index, $item) => {\r\n\t\tassignDefaultIfNull($item, 0);\r\n\t});\r\n\t\r\n\t//2. Unit MF\r\n\tmultiplyAccordingToUnit[$bottomSpoutDiameter, $bottomSpoutLength];\r\n}", "function convertUnits(value, currUnits, newUnits) {\n return UnitValue(value, currUnits).as(newUnits);\n}", "function normalize(value, units) {\r\n\tswitch(units) {\r\n\t\tcase \"mi\":\r\n\t\t\treturn value * 1609;\r\n\t\tcase \"km\":\r\n\t\t\treturn value * 1000;\r\n\t\tcase \"ft\":\r\n\t\t\treturn value / 3.281;\r\n\t\tcase \"m\":\r\n\t\t\treturn value;\r\n\t}\r\n}", "function parseUnit(n) {\n var unit = (0, _cssGetUnit2.default)(n);\n var value = parseFloat(n);\n return { unit: unit, value: value };\n }", "function unitFactory(name, valueStr, unitStr) {\n var dependencies = ['config', 'Unit', 'BigNumber'];\n return factory(name, dependencies, function (_ref) {\n var config = _ref.config,\n Unit = _ref.Unit,\n BigNumber = _ref.BigNumber;\n // Note that we can parse into number or BigNumber.\n // We do not parse into Fractions as that doesn't make sense: we would lose precision of the values\n // Therefore we dont use Unit.parse()\n var value = config.number === 'BigNumber' ? new BigNumber(valueStr) : parseFloat(valueStr);\n var unit = new Unit(value, unitStr);\n unit.fixPrefix = true;\n return unit;\n });\n} // helper function to create a factory function which creates a numeric constant,", "function getI(name,un_name) \n{\n\tvar x=getVar(name);\n\tvar unit=getVtext(un_name);\n\tif(\"mA\"==unit) return x/=1e3;\n\tif(\"A\"==unit) return x;\n\tif(\"uA\"==unit) return x/=1e6;\n\tif(\"pA\"==unit) return x/=1e9;\n\treturn x;\n}", "unitsInitCustom()\n\t{\n\t\t//\n\t\t// No custom operations.\n\t\t//\n\t\t\n\t}", "function getUnitToShift(){\n // valuto la label della unit corrente\n switch($scope.units[$scope.indexDefaultUnit].key){\n case 'hour':\n // appende il giorno corrente della settimana e il numero\n return 'day';\n break;\n case 'day':\n // appende la settimana del mese il numero del mese\n return 'week';\n break;\n case 'date':\n return 'month';\n break;\n case 'month':\n return 'month';\n break;\n default:\n return 'year';\n }\n return null;\n }", "function createUnitStore(options) {\n /* Units are defined by these objects:\n * defs.prefixes\n * defs.units\n */\n // TODO: Should we deep freeze the built-ins to prevent modification of the built-in units?\n const { skipBuiltIns } = options.definitions;\n // Merge the built-in units with the user's definitions\n let systems$1;\n if (skipBuiltIns) {\n systems$1 = { ...options.definitions.systems };\n }\n else {\n systems$1 = { ...systems };\n // Prepend the user's units onto the built-in ones, so that the user's will be chosen first\n for (let system of Object.keys(options.definitions.systems)) {\n if (systems$1.hasOwnProperty(system)) {\n systems$1[system] = [...options.definitions.systems[system], ...systems$1[system]];\n }\n else {\n systems$1[system] = [...options.definitions.systems[system]];\n }\n }\n }\n const originalDefinitions = {\n systems: systems$1,\n prefixGroups: {\n ...(skipBuiltIns ? {} : prefixes),\n ...options.definitions.prefixGroups\n },\n units: {\n ...(skipBuiltIns ? {} : units),\n ...options.definitions.units\n }\n };\n // These will contain copies we can mutate without affecting the originals\n const defs = {\n units: {},\n prefixGroups: { ...originalDefinitions.prefixGroups },\n systems: {}\n };\n // for (let system of Object.keys(originalDefinitions.systems)) {\n // defs.systems[system] = originalDefinitions.systems[system].slice()\n // }\n /* All of the prefixes, units, and systems have now been defined.\n *\n * We will perform the following processing steps to prepare the UnitStore for use:\n *\n * - For each QUANTITY, parse its value and replace it with a dimension array, where each index of the array\n * corresponds to the base quantity's index in defs.baseQuantities, and the value of each element is the power\n * (exponent) of that base in the dimension.\n *\n * - Initialize the parser with an empty set of units.\n *\n * - Loop through the units. If the unit has a `quantity` property, initialize that unit with the quantity's\n * dimension, and the given value property. If the unit does not, then parse the unit's value property (which is\n * either a string or an two-element array) using the parser, and create the dimension and value from the resulting\n * Unit. Create the unit with the name, dimension, value, offset, prefixes, and commonPrefixes properties. Convert\n * the prefixes from a string to the associated object from the defs.prefixes object.\n *\n * - Some units will fail to be parsed if the defs.units object keys are not enumerated in the optimal order. Repeat\n * the loop until all units have been converted.\n *\n * - Verify that each unit's commonPrefixes are contained in prefixes.\n *\n * - Loop through the defs.systems and convert the strings into valueless units.\n *\n * - Add the unit system names to each unit (as an array) for reverse lookup.\n *\n * - Clone units that have aliases. Shallow copies are acceptable since the resulting defs.units object will be\n * deep-immutable.\n *\n */\n // Create a parser configured for these options, and also supply it with the findUnit function\n const parser = createParser(options, findUnit);\n // Loop through the units. If the unit has a `quantity` property, initialize that unit with the quantity's dimension,\n // and the given value property. If the unit does not, then parse the unit's value property (which is either a string\n // or a two-element array) using the parser, and create the dimension and value from the resulting Unit. Create the\n // unit with the name, dimension, value, offset, prefixes, and commonPrefixes properties. Convert the prefixes from a\n // string to the associated object from the defs.prefixes object.\n while (true) {\n let unitsAdded = 0;\n let unitsSkipped = [];\n let reasonsSkipped = [];\n for (const unitDefKey of Object.keys(originalDefinitions.units)) {\n if (defs.units.hasOwnProperty(unitDefKey))\n continue;\n const unitDef = originalDefinitions.units[unitDefKey];\n if (!unitDef)\n continue;\n // const unitDef = unitDef\n // uses unknown set of prefixes?\n if (typeof unitDef !== 'string' && unitDef.prefixGroup && !defs.prefixGroups.hasOwnProperty(unitDef.prefixGroup)) {\n throw new Error(`Unknown prefixes '${unitDef.prefixGroup}' for unit '${unitDefKey}'`);\n }\n let unitValue;\n let unitDimension;\n let unitQuantity;\n let skipThisUnit = false;\n if (isUnitPropsWithQuantity(unitDef)) {\n // Defining the unit based on a quantity.\n unitValue = options.type.conv(unitDef.value);\n unitDimension = { [unitDef.quantity]: 1 };\n unitQuantity = unitDef.quantity;\n }\n else {\n // Defining the unit based on other units.\n let parsed;\n try {\n if (unitDef.hasOwnProperty('value')) {\n if (unitDef && typeof unitDef.value === 'string') {\n parsed = parser(unitDef.value);\n }\n else if (Array.isArray(unitDef.value) && unitDef.value.length === 2) {\n parsed = parser(unitDef.value[1]);\n parsed.value = options.type.conv(unitDef.value[0]);\n }\n else {\n throw new TypeError(`Unit definition for '${unitDefKey}' must be an object with a value property where the value is a string or a two-element array.`);\n }\n }\n else {\n throw new TypeError(`Unit definition for '${unitDefKey}' must be an object with a value property where the value is a string or a two-element array.`);\n }\n if (parsed.value == null) {\n throw new Error(`Parsing value for '${unitDefKey}' resulted in invalid value: ${parsed.value}`);\n }\n unitValue = normalize(parsed.unitList, parsed.value, options.type);\n unitDimension = Object.freeze(parsed.dimension);\n }\n catch (ex) {\n if (ex instanceof Error && /Unit.*not found/.test(ex.toString())) {\n unitsSkipped.push(unitDefKey);\n reasonsSkipped.push(ex.toString());\n skipThisUnit = true;\n }\n else {\n throw ex;\n }\n }\n }\n if (!skipThisUnit) {\n // Add this units and its aliases (they are all the same except for the name)\n let unitAndAliases = [unitDefKey];\n if (unitDef.aliases) {\n unitAndAliases.push(...unitDef.aliases);\n }\n unitAndAliases.forEach(newUnitName => {\n if (defs.units.hasOwnProperty(newUnitName)) {\n throw new Error(`Alias '${newUnitName}' would override an existing unit`);\n }\n if (!/^[a-zA-Z][a-zA-Z0-9]*$/.test(newUnitName) && newUnitName !== '') {\n throw new SyntaxError(`Unit name contains non-alphanumeric characters or begins with a number: '${newUnitName}'`);\n }\n const newUnit = {\n name: newUnitName,\n value: unitValue,\n offset: options.type.conv(unitDef.offset ? unitDef.offset : 0),\n dimension: unitDimension,\n prefixGroup: (unitDef.prefixGroup && defs.prefixGroups[unitDef.prefixGroup]) || { '': 1 },\n formatPrefixes: unitDef.formatPrefixes,\n basePrefix: unitDef.basePrefix\n // systems: []\n };\n if (unitQuantity)\n newUnit.quantity = unitQuantity;\n Object.freeze(newUnit);\n defs.units[newUnitName] = newUnit;\n unitsAdded++;\n });\n }\n }\n // console.log(`Added ${unitsAdded} units and skipped: ${unitsSkipped.join(', ')}`)\n if (unitsSkipped.length === 0)\n break;\n else if (unitsAdded === 0) {\n throw new Error(`Could not create the following units: ${unitsSkipped.join(', ')}. Reasons follow: ${reasonsSkipped.join(' ')}`);\n }\n }\n // Check to make sure config options has selected a unit system that exists.\n if (options.system !== 'auto') {\n if (!originalDefinitions.systems.hasOwnProperty(options.system)) {\n throw new Error(`Unknown unit system ${options.system}. Available systems are: auto, ${Object.keys(originalDefinitions.systems).join(', ')} `);\n }\n }\n // Replace unit system strings with valueless units\n for (let system of Object.keys(originalDefinitions.systems)) {\n let sys = originalDefinitions.systems[system];\n defs.systems[system] = [];\n for (let i = 0; i < sys.length; i++) {\n // Important! The unit below is not a real unit, but for now it is-close enough\n let unit = parser(sys[i]);\n unit.type = 'Unit';\n Object.freeze(unit);\n defs.systems[system][i] = unit;\n }\n }\n // Final setup for units\n for (let key of Object.keys(defs.units)) {\n const unit = defs.units[key];\n // Check that each commonPrefix is in prefixes\n if (unit.formatPrefixes) {\n for (let i = 0; i < unit.formatPrefixes.length; i++) {\n let s = unit.formatPrefixes[i];\n if (!unit.prefixGroup.hasOwnProperty(s)) {\n throw new Error(`In unit ${unit.name}, common prefix ${s} was not found among the allowable prefixes`);\n }\n }\n }\n }\n /**\n * Tests whether the given string exists as a known unit. The unit may have a prefix.\n * @param {string} singleUnitString The name of the unit, with optional prefix.\n */\n function exists(singleUnitString) {\n return findUnit(singleUnitString) !== null;\n }\n /**\n * Find a unit from a string\n * @param {string} unitString A string like 'cm' or 'inch'\n * @returns {Object | null} result When found, an object with fields unit and\n * prefix is returned. Else, null is returned.\n * @private\n */\n function findUnit(unitString) {\n if (typeof unitString !== 'string') {\n throw new TypeError(`parameter must be a string (${unitString} given)`);\n }\n // First, match units names exactly. For example, a user could define 'mm' as 10^-4 m, which is silly, but then we would want 'mm' to match the user-defined unit.\n if (defs.units.hasOwnProperty(unitString)) {\n const unit = defs.units[unitString];\n return {\n unit,\n prefix: ''\n };\n }\n for (const name of Object.keys(defs.units)) {\n if (unitString.substring(unitString.length - name.length, unitString.length) === name) {\n const unit = defs.units[name];\n const prefixLen = (unitString.length - name.length);\n const prefix = unitString.substring(0, prefixLen);\n if (unit.prefixGroup.hasOwnProperty(prefix)) {\n // store unit, prefix, and value\n // console.log(`findUnit(${unitString}): { unit.name: ${unit.name}, prefix: ${prefix} }`)\n return {\n unit,\n prefix\n };\n }\n }\n }\n return null;\n }\n Object.freeze(defs.prefixGroups);\n Object.freeze(defs.systems);\n Object.freeze(defs.units);\n return { originalDefinitions, defs, exists, findUnit, parser };\n}", "function format(value, units, includeValue) {\n var obj;\n\n if (typeof value === 'string') {\n includeValue = units;\n units = value;\n value = 1;\n }\n\n if (typeof value === 'object') {\n // treat it like a UCUM parse output\n obj = value;\n includeValue = units; // you would never provide units in this case, but you might provide includeValue\n } else {\n // parse it first\n obj = parse(value, units);\n }\n\n var units = Object.keys(obj.units);\n var metadata = obj.metadata;\n var numUnits = units.length;\n var numeratorUnits = [];\n var denominatorUnits = [];\n var printableUnits = \"\";\n\n units.forEach(function (unit, index) {\n var exponent = obj.units[unit];\n var absExponent = Math.abs(exponent);\n var printable = metadata[unit].printSymbols ? metadata[unit].printSymbols[0] : metadata[unit].names[0];\n var prefix = metadata[unit].prefix ? metadata[unit].prefix.printSymbols[0] : \"\";\n pUnit = prefix + printable;\n if (absExponent !== 1) {\n pUnit += \"<sup>\";\n pUnit += Math.abs(exponent);\n pUnit += \"</sup>\";\n }\n\n if (exponent > 0) {\n numeratorUnits.push(pUnit);\n } else {\n denominatorUnits.push(pUnit);\n }\n });\n\n if (numeratorUnits.length == 0) {\n printableUnits = \"1\";\n } else if (numeratorUnits.length > 0) {\n printableUnits = numeratorUnits.join(\"*\");\n }\n\n if (denominatorUnits.length > 0) {\n printableUnits += \"/\";\n }\n\n printableUnits += denominatorUnits.join(\"/\");\n\n if (includeValue) {\n printableUnits = obj.value + \" \" + printableUnits;\n }\n\n return printableUnits;\n}", "function multiplyAccordingToUnit(eleArray){\r\n\tif($productUnitTypeLength.find(':selected').data('abbr') == 'INCHES'){\r\n\t\t$.each(eleArray, (index, $item) => {\r\n\t\t\tmultiplyByFactor($item, 2.54);\r\n\t\t});\r\n\t}else if($productUnitTypeLength.find(':selected').data('abbr') == 'MILLIMETER'){\r\n\t\t$.each(eleArray, (index, $item) => {\r\n\t\t\tmultiplyByFactor($item, 0.1);\r\n\t\t});\r\n\t}\r\n}", "get useFileUnits() {}", "function updateUnit() {\n\t\tif (segments.length == 0) {\n\t\t\tthrow \"No segments supplied!\";\n\t\t}\n\t\tif (segments.length === 1) {\n\t\t\tweights = segments[0][1];\n\t\t} else {\n\t\t\tweights = EduMon.Math.sumOver(0, segments.length, function(i) {\n\t\t\t\treturn segments[i][1]\n\t\t\t});\n\t\t}\n\t\tunit = TAU / weights;\n\t}", "function YLightSensor_get_unit()\n { var json_val = this._getFixedAttr('unit');\n return (json_val == null ? Y_UNIT_INVALID : json_val);\n }", "function isUnitModel(model) {\n return model && model.type === 'unit';\n}", "function formatSizeDisplay(x1, x2) {\n //x = units (metric 1 or not 0), x1 = higher group (m or feet), x2 = lower group (cm or in)\n  let x = Number(localStorage.aas_myGardenVs_units);\n let ind1 = \"\", ind2 = \"\", denom = 1;\n //if metric, \n // the incoming size that's in inches needs to be converted to cm\n // the denominator used for formatting is 100, otherwise 12\n // the displayed format will show m & cm, otherwise ' and \"\n if (x){\n x1 *= 2.54;\n denom = 100;\n ind1=\"m\";\n ind2 = \"cm\";\n } \n else {\n denom = 12;\n ind1=\"'\";\n ind2 = '\"';\n }\n \n //if a second argument is supplied, convert to small units and return one number\n if (x2){\n return parseInt(x1*denom+x2,10);\n }\n //if there are bigger units and a remainder, display bigger and smaller units\n else if ((parseInt(x1/denom,10)) && (parseInt(x1%denom,10))) {\n return parseInt(x1/denom,10)+ind1 + parseInt(x1%denom,10)+ind2;\n }\n //if a bigger unit is 0 and smaller is available (i.e. there is a remainder)\n else if (!(parseInt(x1/denom,10)) && (parseInt(x1%denom,10))) {\n return parseInt(x1%denom,10)+ind2;\n }\n //if there are bigger units and no smaller units\n else if ((parseInt(x1/denom,10)) && !(parseInt(x1%denom,10))) {\n return parseInt(x1/denom,10)+ind1;\n }\n //otherwise display 0 and smaller unit indicator\n else {\n return 0+ind2;\n }\n// let result = null;\n// x1%12?result=parseInt(x1/denom,10)+ind1+parseInt(x1%denom,10)+ind2:result=parseInt(x1/denom,10)+ind1;\n// return result;\n}", "function normalize(unitList, value, type) {\n let unitValue, unitOffset, unitPower, unitPrefixValue;\n if (value === null || value === undefined || unitList.length === 0) {\n return value;\n }\n else if (isCompound(unitList)) {\n // units is a compound unit, so do not apply offsets.\n // For example, with J kg^-1 degC^-1 you would NOT want to apply the offset.\n let result = value;\n for (let i = 0; i < unitList.length; i++) {\n unitValue = type.conv(unitList[i].unit.value);\n unitPrefixValue = type.conv(unitList[i].unit.prefixGroup[unitList[i].prefix]);\n unitPower = type.conv(unitList[i].power);\n result = type.mul(result, type.pow(type.mul(unitValue, unitPrefixValue), unitPower));\n }\n return result;\n }\n else {\n // units is a single unit of power 1, like kg or degC\n unitValue = type.conv(unitList[0].unit.value);\n unitOffset = type.conv(unitList[0].unit.offset);\n unitPrefixValue = type.conv(unitList[0].unit.prefixGroup[unitList[0].prefix]);\n return type.mul(type.add(type.mul(value, unitPrefixValue), unitOffset), unitValue);\n // (value*unitPrefixValue+unitOffset)*unitValue\n }\n}", "function getQuantityValueAndUnit(ob) {\n if (\n typeof ob != \"undefined\" &&\n typeof ob.valueQuantity != \"undefined\" &&\n typeof ob.valueQuantity.value != \"undefined\" &&\n typeof ob.valueQuantity.unit != \"undefined\"\n ) {\n return (\n Number(parseFloat(ob.valueQuantity.value).toFixed(2)) +\n \" \" +\n ob.valueQuantity.unit\n );\n } else {\n return undefined;\n }\n}", "function getQuantityValueAndUnit(ob) {\n if (typeof ob != 'undefined' &&\n typeof ob.valueQuantity != 'undefined' &&\n typeof ob.valueQuantity.value != 'undefined' &&\n typeof ob.valueQuantity.unit != 'undefined') {\n return Number(parseFloat((ob.valueQuantity.value)).toFixed(2)) + ' ' + ob.valueQuantity.unit;\n } else {\n return undefined;\n }\n}", "function getQuantityValueAndUnit(ob) {\n if (typeof ob != 'undefined' &&\n typeof ob.valueQuantity != 'undefined' &&\n typeof ob.valueQuantity.value != 'undefined' &&\n typeof ob.valueQuantity.unit != 'undefined') {\n return Number(parseFloat((ob.valueQuantity.value)).toFixed(2)) + ' ' + ob.valueQuantity.unit;\n } else {\n return undefined;\n }\n}", "get unit() {\n\t\treturn this.__unit;\n\t}", "function Unit(size, x, y) {\n\tthis.size = size;\n\tthis.x = x;\n\tthis.y = y;\n}", "function isUnitModel(model) {\n return (model === null || model === void 0 ? void 0 : model.type) === 'unit';\n }", "function fixedUnit(str) {\n var unit = type.Unit.parse(str);\n unit.fixPrefix = true;\n return unit;\n }", "function fixedUnit(str) {\n var unit = type.Unit.parse(str);\n unit.fixPrefix = true;\n return unit;\n }", "function normalizeUnit(unit) {\n unit = toStr(unit);\n if (unitShorthandMap[unit]) return unitShorthandMap[unit];\n return unit.toLowerCase().replace(regEndS, '');\n }", "function setCountryUnits() {\n // body... \n if (countryName === \"US\" || countryName === \"LY\") { // in year 2016 only USA and Libya not metric.\n\n countryUnits = \"imperial\";\n\n }\n }", "function evCost(mile, units) {\n mile = parseFloat(mile);\nlet evcost;\nswitch (units) {\n case 'Car/ Light Van':\n evcost = (mile * 0.05) * 52;\n break;\n case 'Medium Van':\n evcost = (mile * 0.09) * 52;\n break;\n case 'Large Van':\n evcost = (mile * 0.12) * 52;\n break;\n default:\n evcost = (mile * 0.05) * 52;\n}\nreturn evcost.toFixed(2);\n}", "function calculateUnitRatios () {\n\n /************************\n Same Ratio Checks\n ************************/\n\n /* The properties below are used to determine whether the element differs sufficiently from this call's\n previously iterated element to also differ in its unit conversion ratios. If the properties match up with those\n of the prior element, the prior element's conversion ratios are used. Like most optimizations in Velocity,\n this is done to minimize DOM querying. */\n var sameRatioIndicators = {\n myParent: element.parentNode || document.body, /* GET */\n position: CSS.getPropertyValue(element, \"position\"), /* GET */\n fontSize: CSS.getPropertyValue(element, \"fontSize\") /* GET */\n },\n /* Determine if the same % ratio can be used. % is based on the element's position value and its parent's width and height dimensions. */\n samePercentRatio = ((sameRatioIndicators.position === callUnitConversionData.lastPosition) && (sameRatioIndicators.myParent === callUnitConversionData.lastParent)),\n /* Determine if the same em ratio can be used. em is relative to the element's fontSize. */\n sameEmRatio = (sameRatioIndicators.fontSize === callUnitConversionData.lastFontSize);\n\n /* Store these ratio indicators call-wide for the next element to compare against. */\n callUnitConversionData.lastParent = sameRatioIndicators.myParent;\n callUnitConversionData.lastPosition = sameRatioIndicators.position;\n callUnitConversionData.lastFontSize = sameRatioIndicators.fontSize;\n\n /***************************\n Element-Specific Units\n ***************************/\n\n /* Note: IE8 rounds to the nearest pixel when returning CSS values, thus we perform conversions using a measurement\n of 100 (instead of 1) to give our ratios a precision of at least 2 decimal values. */\n var measurement = 100,\n unitRatios = {};\n\n if (!sameEmRatio || !samePercentRatio) {\n var dummy = Data(element).isSVG ? document.createElementNS(\"http://www.w3.org/2000/svg\", \"rect\") : document.createElement(\"div\");\n\n Velocity.init(dummy);\n sameRatioIndicators.myParent.appendChild(dummy);\n\n /* To accurately and consistently calculate conversion ratios, the element's cascaded overflow and box-sizing are stripped.\n Similarly, since width/height can be artificially constrained by their min-/max- equivalents, these are controlled for as well. */\n /* Note: Overflow must be also be controlled for per-axis since the overflow property overwrites its per-axis values. */\n $.each([ \"overflow\", \"overflowX\", \"overflowY\" ], function(i, property) {\n Velocity.CSS.setPropertyValue(dummy, property, \"hidden\");\n });\n Velocity.CSS.setPropertyValue(dummy, \"position\", sameRatioIndicators.position);\n Velocity.CSS.setPropertyValue(dummy, \"fontSize\", sameRatioIndicators.fontSize);\n Velocity.CSS.setPropertyValue(dummy, \"boxSizing\", \"content-box\");\n\n /* width and height act as our proxy properties for measuring the horizontal and vertical % ratios. */\n $.each([ \"minWidth\", \"maxWidth\", \"width\", \"minHeight\", \"maxHeight\", \"height\" ], function(i, property) {\n Velocity.CSS.setPropertyValue(dummy, property, measurement + \"%\");\n });\n /* paddingLeft arbitrarily acts as our proxy property for the em ratio. */\n Velocity.CSS.setPropertyValue(dummy, \"paddingLeft\", measurement + \"em\");\n\n /* Divide the returned value by the measurement to get the ratio between 1% and 1px. Default to 1 since working with 0 can produce Infinite. */\n unitRatios.percentToPxWidth = callUnitConversionData.lastPercentToPxWidth = (parseFloat(CSS.getPropertyValue(dummy, \"width\", null, true)) || 1) / measurement; /* GET */\n unitRatios.percentToPxHeight = callUnitConversionData.lastPercentToPxHeight = (parseFloat(CSS.getPropertyValue(dummy, \"height\", null, true)) || 1) / measurement; /* GET */\n unitRatios.emToPx = callUnitConversionData.lastEmToPx = (parseFloat(CSS.getPropertyValue(dummy, \"paddingLeft\")) || 1) / measurement; /* GET */\n\n sameRatioIndicators.myParent.removeChild(dummy);\n } else {\n unitRatios.emToPx = callUnitConversionData.lastEmToPx;\n unitRatios.percentToPxWidth = callUnitConversionData.lastPercentToPxWidth;\n unitRatios.percentToPxHeight = callUnitConversionData.lastPercentToPxHeight;\n }\n\n /***************************\n Element-Agnostic Units\n ***************************/\n\n /* Whereas % and em ratios are determined on a per-element basis, the rem unit only needs to be checked\n once per call since it's exclusively dependant upon document.body's fontSize. If this is the first time\n that calculateUnitRatios() is being run during this call, remToPx will still be set to its default value of null,\n so we calculate it now. */\n if (callUnitConversionData.remToPx === null) {\n /* Default to browsers' default fontSize of 16px in the case of 0. */\n callUnitConversionData.remToPx = parseFloat(CSS.getPropertyValue(document.body, \"fontSize\")) || 16; /* GET */\n }\n\n /* Similarly, viewport units are %-relative to the window's inner dimensions. */\n if (callUnitConversionData.vwToPx === null) {\n callUnitConversionData.vwToPx = parseFloat(window.innerWidth) / 100; /* GET */\n callUnitConversionData.vhToPx = parseFloat(window.innerHeight) / 100; /* GET */\n }\n\n unitRatios.remToPx = callUnitConversionData.remToPx;\n unitRatios.vwToPx = callUnitConversionData.vwToPx;\n unitRatios.vhToPx = callUnitConversionData.vhToPx;\n\n if (Velocity.debug >= 1) console.log(\"Unit ratios: \" + JSON.stringify(unitRatios), element);\n\n return unitRatios;\n }", "static setUnitMetric(unit) {\n if (unit === 'm' || unit === 'metres') {\n return `&units=metric`;\n }\n return ``;\n }", "function calculateUnitRatios () {\n\t\t\n\t\t /************************\n\t\t Same Ratio Checks\n\t\t ************************/\n\t\t\n\t\t /* The properties below are used to determine whether the element differs sufficiently from this call's\n\t\t previously iterated element to also differ in its unit conversion ratios. If the properties match up with those\n\t\t of the prior element, the prior element's conversion ratios are used. Like most optimizations in Velocity,\n\t\t this is done to minimize DOM querying. */\n\t\t var sameRatioIndicators = {\n\t\t myParent: element.parentNode || document.body, /* GET */\n\t\t position: CSS.getPropertyValue(element, \"position\"), /* GET */\n\t\t fontSize: CSS.getPropertyValue(element, \"fontSize\") /* GET */\n\t\t },\n\t\t /* Determine if the same % ratio can be used. % is based on the element's position value and its parent's width and height dimensions. */\n\t\t samePercentRatio = ((sameRatioIndicators.position === callUnitConversionData.lastPosition) && (sameRatioIndicators.myParent === callUnitConversionData.lastParent)),\n\t\t /* Determine if the same em ratio can be used. em is relative to the element's fontSize. */\n\t\t sameEmRatio = (sameRatioIndicators.fontSize === callUnitConversionData.lastFontSize);\n\t\t\n\t\t /* Store these ratio indicators call-wide for the next element to compare against. */\n\t\t callUnitConversionData.lastParent = sameRatioIndicators.myParent;\n\t\t callUnitConversionData.lastPosition = sameRatioIndicators.position;\n\t\t callUnitConversionData.lastFontSize = sameRatioIndicators.fontSize;\n\t\t\n\t\t /***************************\n\t\t Element-Specific Units\n\t\t ***************************/\n\t\t\n\t\t /* Note: IE8 rounds to the nearest pixel when returning CSS values, thus we perform conversions using a measurement\n\t\t of 100 (instead of 1) to give our ratios a precision of at least 2 decimal values. */\n\t\t var measurement = 100,\n\t\t unitRatios = {};\n\t\t\n\t\t if (!sameEmRatio || !samePercentRatio) {\n\t\t var dummy = Data(element).isSVG ? document.createElementNS(\"http://www.w3.org/2000/svg\", \"rect\") : document.createElement(\"div\");\n\t\t\n\t\t Velocity.init(dummy);\n\t\t sameRatioIndicators.myParent.appendChild(dummy);\n\t\t\n\t\t /* To accurately and consistently calculate conversion ratios, the element's cascaded overflow and box-sizing are stripped.\n\t\t Similarly, since width/height can be artificially constrained by their min-/max- equivalents, these are controlled for as well. */\n\t\t /* Note: Overflow must be also be controlled for per-axis since the overflow property overwrites its per-axis values. */\n\t\t $.each([ \"overflow\", \"overflowX\", \"overflowY\" ], function(i, property) {\n\t\t Velocity.CSS.setPropertyValue(dummy, property, \"hidden\");\n\t\t });\n\t\t Velocity.CSS.setPropertyValue(dummy, \"position\", sameRatioIndicators.position);\n\t\t Velocity.CSS.setPropertyValue(dummy, \"fontSize\", sameRatioIndicators.fontSize);\n\t\t Velocity.CSS.setPropertyValue(dummy, \"boxSizing\", \"content-box\");\n\t\t\n\t\t /* width and height act as our proxy properties for measuring the horizontal and vertical % ratios. */\n\t\t $.each([ \"minWidth\", \"maxWidth\", \"width\", \"minHeight\", \"maxHeight\", \"height\" ], function(i, property) {\n\t\t Velocity.CSS.setPropertyValue(dummy, property, measurement + \"%\");\n\t\t });\n\t\t /* paddingLeft arbitrarily acts as our proxy property for the em ratio. */\n\t\t Velocity.CSS.setPropertyValue(dummy, \"paddingLeft\", measurement + \"em\");\n\t\t\n\t\t /* Divide the returned value by the measurement to get the ratio between 1% and 1px. Default to 1 since working with 0 can produce Infinite. */\n\t\t unitRatios.percentToPxWidth = callUnitConversionData.lastPercentToPxWidth = (parseFloat(CSS.getPropertyValue(dummy, \"width\", null, true)) || 1) / measurement; /* GET */\n\t\t unitRatios.percentToPxHeight = callUnitConversionData.lastPercentToPxHeight = (parseFloat(CSS.getPropertyValue(dummy, \"height\", null, true)) || 1) / measurement; /* GET */\n\t\t unitRatios.emToPx = callUnitConversionData.lastEmToPx = (parseFloat(CSS.getPropertyValue(dummy, \"paddingLeft\")) || 1) / measurement; /* GET */\n\t\t\n\t\t sameRatioIndicators.myParent.removeChild(dummy);\n\t\t } else {\n\t\t unitRatios.emToPx = callUnitConversionData.lastEmToPx;\n\t\t unitRatios.percentToPxWidth = callUnitConversionData.lastPercentToPxWidth;\n\t\t unitRatios.percentToPxHeight = callUnitConversionData.lastPercentToPxHeight;\n\t\t }\n\t\t\n\t\t /***************************\n\t\t Element-Agnostic Units\n\t\t ***************************/\n\t\t\n\t\t /* Whereas % and em ratios are determined on a per-element basis, the rem unit only needs to be checked\n\t\t once per call since it's exclusively dependant upon document.body's fontSize. If this is the first time\n\t\t that calculateUnitRatios() is being run during this call, remToPx will still be set to its default value of null,\n\t\t so we calculate it now. */\n\t\t if (callUnitConversionData.remToPx === null) {\n\t\t /* Default to browsers' default fontSize of 16px in the case of 0. */\n\t\t callUnitConversionData.remToPx = parseFloat(CSS.getPropertyValue(document.body, \"fontSize\")) || 16; /* GET */\n\t\t }\n\t\t\n\t\t /* Similarly, viewport units are %-relative to the window's inner dimensions. */\n\t\t if (callUnitConversionData.vwToPx === null) {\n\t\t callUnitConversionData.vwToPx = parseFloat(window.innerWidth) / 100; /* GET */\n\t\t callUnitConversionData.vhToPx = parseFloat(window.innerHeight) / 100; /* GET */\n\t\t }\n\t\t\n\t\t unitRatios.remToPx = callUnitConversionData.remToPx;\n\t\t unitRatios.vwToPx = callUnitConversionData.vwToPx;\n\t\t unitRatios.vhToPx = callUnitConversionData.vhToPx;\n\t\t\n\t\t if (Velocity.debug >= 1) console.log(\"Unit ratios: \" + JSON.stringify(unitRatios), element);\n\t\t\n\t\t return unitRatios;\n\t\t }", "function setUnits(){\n var units=JSON.parse(localStorage['units']);\n for (var i = 0; i < MAX_NUMBER_OF_UNITS; i++) {\n var trans = 0.3; // the rgba transparency\n var div = $('#unit'+i); // Select the unit div\n var img = $('#unit'+i+'> img'); // Select the unit img tag\n div.css('border','1px dotted green');\n \n if ( units[i] === undefined){ // Unit is unused\n div.css('display','none');\n break;\n }\n if(i == selected){ // The chosen Unit\n trans = 0.9;\n div.css('border','2px solid black'); \n } \n var rgba = \"rgba(\"+units[i].split(';')[2]+\",\"+trans+\")\";\n div.css('background',rgba);\n var type = units[i].split(';')[1];\n img.attr(\"src\",\"markers/\"+type+\"-icon.png\");\n img.attr('class',type);\n } \n }", "getUnits() {\n const seconds = this.props.timeElapsed / 1000;\n var hr = Math.floor(seconds / 3600).toString();\n var min = Math.floor(seconds / 60).toString();\n var sec = Math.floor(seconds % 60).toString();\n var msec = (seconds % 1).toFixed(2).substring(2);\n \n return this.formatTime(hr) + \":\" + this.formatTime(min) + \":\" + this.formatTime(sec) + \".\" + msec;\n }", "function m(t, n, r) {\n return t.units[n][r];\n }", "function calculateTickSize(start, end, unit) {\n //Comprobar si existe this.units[unit]\n var current_unit = global.UNITS[unit];\n var num_units = 1;\n var excedido = false;\n do {\n //Milisegundos entre las dos fechas \n var period_size = (current_unit.milliseconds * num_units);\n var num_periods = calculateNumPeriods(start, end, period_size);\n if (num_units > current_unit.max_value) {\n if (current_unit.end) {\n excedido = true;\n } else {\n current_unit = global.UNITS[current_unit.next_unit];\n num_units = 1;\n }\n }\n //unidades: 1, 2, 4, 6 ,12\n if (num_units == 4) num_units +=2;\n else num_units *= 2; \n } while (!excedido && (num_periods > global.MAX_PERIODS))\n\n if (excedido) return null;\n return [num_units * current_unit.shift, current_unit.unit];\n}", "function getL(name,un_name) //get capcitor value in F, (name, name-unit)\n{\n\tvar x=getVar(name);\n\tvar unit=getVtext(un_name);\n\tif(\"nH\"==unit) return x/=1e9;\n\tif(\"uH\"==unit) return x/=1e6;\n\tif(\"mH\"==unit) return x/=1e3;\n\treturn x;\n}", "function formatUnit(unit) {\r\n\t\r\n\tvar isInt = parseInt(unit);\r\n\r\n\treturn isInt ? isInt : 0;\r\n}", "function doHumanization (ms, options) {\n var i, len, piece\n\n // Make sure we have a positive number.\n // Has the nice sideffect of turning Number objects into primitives.\n ms = Math.abs(ms)\n\n var dictionary = options.languages[options.language] || languages[options.language]\n if (!dictionary) {\n throw new Error('No language ' + dictionary + '.')\n }\n\n var pieces = []\n\n // Start at the top and keep removing units, bit by bit.\n var unitName, unitMS, unitCount\n for (i = 0, len = options.units.length; i < len; i++) {\n unitName = options.units[i]\n unitMS = options.unitMeasures[unitName]\n\n // What's the number of full units we can fit?\n if (i + 1 === len) {\n unitCount = ms / unitMS\n } else {\n unitCount = Math.floor(ms / unitMS)\n }\n\n // Add the string.\n pieces.push({\n unitCount: unitCount,\n unitName: unitName\n })\n\n // Remove what we just figured out.\n ms -= unitCount * unitMS\n }\n\n var firstOccupiedUnitIndex = 0\n for (i = 0; i < pieces.length; i++) {\n if (pieces[i].unitCount) {\n firstOccupiedUnitIndex = i\n break\n }\n }\n\n if (options.round) {\n var ratioToLargerUnit, previousPiece\n for (i = pieces.length - 1; i >= 0; i--) {\n piece = pieces[i]\n piece.unitCount = Math.round(piece.unitCount)\n\n if (i === 0) { break }\n\n previousPiece = pieces[i - 1]\n\n ratioToLargerUnit = options.unitMeasures[previousPiece.unitName] / options.unitMeasures[piece.unitName]\n if ((piece.unitCount % ratioToLargerUnit) === 0 || (options.largest && ((options.largest - 1) < (i - firstOccupiedUnitIndex)))) {\n previousPiece.unitCount += piece.unitCount / ratioToLargerUnit\n piece.unitCount = 0\n }\n }\n }\n\n var result = []\n for (i = 0, pieces.length; i < len; i++) {\n piece = pieces[i]\n if (piece.unitCount) {\n result.push(render(piece.unitCount, piece.unitName, dictionary, options))\n }\n\n if (result.length === options.largest) { break }\n }\n\n if (result.length) {\n if (!options.conjunction || result.length === 1) {\n return result.join(options.delimiter)\n } else if (result.length === 2) {\n return result.join(options.conjunction)\n } else if (result.length > 2) {\n return result.slice(0, -1).join(options.delimiter) + (options.serialComma ? ',' : '') + options.conjunction + result.slice(-1)\n }\n } else {\n return render(0, options.units[options.units.length - 1], dictionary, options)\n }\n }", "function calculateUnitRatios () {\n\t\n\t /************************\n\t Same Ratio Checks\n\t ************************/\n\t\n\t /* The properties below are used to determine whether the element differs sufficiently from this call's\n\t previously iterated element to also differ in its unit conversion ratios. If the properties match up with those\n\t of the prior element, the prior element's conversion ratios are used. Like most optimizations in Velocity,\n\t this is done to minimize DOM querying. */\n\t var sameRatioIndicators = {\n\t myParent: element.parentNode || document.body, /* GET */\n\t position: CSS.getPropertyValue(element, \"position\"), /* GET */\n\t fontSize: CSS.getPropertyValue(element, \"fontSize\") /* GET */\n\t },\n\t /* Determine if the same % ratio can be used. % is based on the element's position value and its parent's width and height dimensions. */\n\t samePercentRatio = ((sameRatioIndicators.position === callUnitConversionData.lastPosition) && (sameRatioIndicators.myParent === callUnitConversionData.lastParent)),\n\t /* Determine if the same em ratio can be used. em is relative to the element's fontSize. */\n\t sameEmRatio = (sameRatioIndicators.fontSize === callUnitConversionData.lastFontSize);\n\t\n\t /* Store these ratio indicators call-wide for the next element to compare against. */\n\t callUnitConversionData.lastParent = sameRatioIndicators.myParent;\n\t callUnitConversionData.lastPosition = sameRatioIndicators.position;\n\t callUnitConversionData.lastFontSize = sameRatioIndicators.fontSize;\n\t\n\t /***************************\n\t Element-Specific Units\n\t ***************************/\n\t\n\t /* Note: IE8 rounds to the nearest pixel when returning CSS values, thus we perform conversions using a measurement\n\t of 100 (instead of 1) to give our ratios a precision of at least 2 decimal values. */\n\t var measurement = 100,\n\t unitRatios = {};\n\t\n\t if (!sameEmRatio || !samePercentRatio) {\n\t var dummy = Data(element).isSVG ? document.createElementNS(\"http://www.w3.org/2000/svg\", \"rect\") : document.createElement(\"div\");\n\t\n\t Velocity.init(dummy);\n\t sameRatioIndicators.myParent.appendChild(dummy);\n\t\n\t /* To accurately and consistently calculate conversion ratios, the element's cascaded overflow and box-sizing are stripped.\n\t Similarly, since width/height can be artificially constrained by their min-/max- equivalents, these are controlled for as well. */\n\t /* Note: Overflow must be also be controlled for per-axis since the overflow property overwrites its per-axis values. */\n\t $.each([ \"overflow\", \"overflowX\", \"overflowY\" ], function(i, property) {\n\t Velocity.CSS.setPropertyValue(dummy, property, \"hidden\");\n\t });\n\t Velocity.CSS.setPropertyValue(dummy, \"position\", sameRatioIndicators.position);\n\t Velocity.CSS.setPropertyValue(dummy, \"fontSize\", sameRatioIndicators.fontSize);\n\t Velocity.CSS.setPropertyValue(dummy, \"boxSizing\", \"content-box\");\n\t\n\t /* width and height act as our proxy properties for measuring the horizontal and vertical % ratios. */\n\t $.each([ \"minWidth\", \"maxWidth\", \"width\", \"minHeight\", \"maxHeight\", \"height\" ], function(i, property) {\n\t Velocity.CSS.setPropertyValue(dummy, property, measurement + \"%\");\n\t });\n\t /* paddingLeft arbitrarily acts as our proxy property for the em ratio. */\n\t Velocity.CSS.setPropertyValue(dummy, \"paddingLeft\", measurement + \"em\");\n\t\n\t /* Divide the returned value by the measurement to get the ratio between 1% and 1px. Default to 1 since working with 0 can produce Infinite. */\n\t unitRatios.percentToPxWidth = callUnitConversionData.lastPercentToPxWidth = (parseFloat(CSS.getPropertyValue(dummy, \"width\", null, true)) || 1) / measurement; /* GET */\n\t unitRatios.percentToPxHeight = callUnitConversionData.lastPercentToPxHeight = (parseFloat(CSS.getPropertyValue(dummy, \"height\", null, true)) || 1) / measurement; /* GET */\n\t unitRatios.emToPx = callUnitConversionData.lastEmToPx = (parseFloat(CSS.getPropertyValue(dummy, \"paddingLeft\")) || 1) / measurement; /* GET */\n\t\n\t sameRatioIndicators.myParent.removeChild(dummy);\n\t } else {\n\t unitRatios.emToPx = callUnitConversionData.lastEmToPx;\n\t unitRatios.percentToPxWidth = callUnitConversionData.lastPercentToPxWidth;\n\t unitRatios.percentToPxHeight = callUnitConversionData.lastPercentToPxHeight;\n\t }\n\t\n\t /***************************\n\t Element-Agnostic Units\n\t ***************************/\n\t\n\t /* Whereas % and em ratios are determined on a per-element basis, the rem unit only needs to be checked\n\t once per call since it's exclusively dependant upon document.body's fontSize. If this is the first time\n\t that calculateUnitRatios() is being run during this call, remToPx will still be set to its default value of null,\n\t so we calculate it now. */\n\t if (callUnitConversionData.remToPx === null) {\n\t /* Default to browsers' default fontSize of 16px in the case of 0. */\n\t callUnitConversionData.remToPx = parseFloat(CSS.getPropertyValue(document.body, \"fontSize\")) || 16; /* GET */\n\t }\n\t\n\t /* Similarly, viewport units are %-relative to the window's inner dimensions. */\n\t if (callUnitConversionData.vwToPx === null) {\n\t callUnitConversionData.vwToPx = parseFloat(window.innerWidth) / 100; /* GET */\n\t callUnitConversionData.vhToPx = parseFloat(window.innerHeight) / 100; /* GET */\n\t }\n\t\n\t unitRatios.remToPx = callUnitConversionData.remToPx;\n\t unitRatios.vwToPx = callUnitConversionData.vwToPx;\n\t unitRatios.vhToPx = callUnitConversionData.vhToPx;\n\t\n\t if (Velocity.debug >= 1) console.log(\"Unit ratios: \" + JSON.stringify(unitRatios), element);\n\t\n\t return unitRatios;\n\t }", "function calculateUnitRatios () {\n\t\n\t /************************\n\t Same Ratio Checks\n\t ************************/\n\t\n\t /* The properties below are used to determine whether the element differs sufficiently from this call's\n\t previously iterated element to also differ in its unit conversion ratios. If the properties match up with those\n\t of the prior element, the prior element's conversion ratios are used. Like most optimizations in Velocity,\n\t this is done to minimize DOM querying. */\n\t var sameRatioIndicators = {\n\t myParent: element.parentNode || document.body, /* GET */\n\t position: CSS.getPropertyValue(element, \"position\"), /* GET */\n\t fontSize: CSS.getPropertyValue(element, \"fontSize\") /* GET */\n\t },\n\t /* Determine if the same % ratio can be used. % is based on the element's position value and its parent's width and height dimensions. */\n\t samePercentRatio = ((sameRatioIndicators.position === callUnitConversionData.lastPosition) && (sameRatioIndicators.myParent === callUnitConversionData.lastParent)),\n\t /* Determine if the same em ratio can be used. em is relative to the element's fontSize. */\n\t sameEmRatio = (sameRatioIndicators.fontSize === callUnitConversionData.lastFontSize);\n\t\n\t /* Store these ratio indicators call-wide for the next element to compare against. */\n\t callUnitConversionData.lastParent = sameRatioIndicators.myParent;\n\t callUnitConversionData.lastPosition = sameRatioIndicators.position;\n\t callUnitConversionData.lastFontSize = sameRatioIndicators.fontSize;\n\t\n\t /***************************\n\t Element-Specific Units\n\t ***************************/\n\t\n\t /* Note: IE8 rounds to the nearest pixel when returning CSS values, thus we perform conversions using a measurement\n\t of 100 (instead of 1) to give our ratios a precision of at least 2 decimal values. */\n\t var measurement = 100,\n\t unitRatios = {};\n\t\n\t if (!sameEmRatio || !samePercentRatio) {\n\t var dummy = Data(element).isSVG ? document.createElementNS(\"http://www.w3.org/2000/svg\", \"rect\") : document.createElement(\"div\");\n\t\n\t Velocity.init(dummy);\n\t sameRatioIndicators.myParent.appendChild(dummy);\n\t\n\t /* To accurately and consistently calculate conversion ratios, the element's cascaded overflow and box-sizing are stripped.\n\t Similarly, since width/height can be artificially constrained by their min-/max- equivalents, these are controlled for as well. */\n\t /* Note: Overflow must be also be controlled for per-axis since the overflow property overwrites its per-axis values. */\n\t $.each([ \"overflow\", \"overflowX\", \"overflowY\" ], function(i, property) {\n\t Velocity.CSS.setPropertyValue(dummy, property, \"hidden\");\n\t });\n\t Velocity.CSS.setPropertyValue(dummy, \"position\", sameRatioIndicators.position);\n\t Velocity.CSS.setPropertyValue(dummy, \"fontSize\", sameRatioIndicators.fontSize);\n\t Velocity.CSS.setPropertyValue(dummy, \"boxSizing\", \"content-box\");\n\t\n\t /* width and height act as our proxy properties for measuring the horizontal and vertical % ratios. */\n\t $.each([ \"minWidth\", \"maxWidth\", \"width\", \"minHeight\", \"maxHeight\", \"height\" ], function(i, property) {\n\t Velocity.CSS.setPropertyValue(dummy, property, measurement + \"%\");\n\t });\n\t /* paddingLeft arbitrarily acts as our proxy property for the em ratio. */\n\t Velocity.CSS.setPropertyValue(dummy, \"paddingLeft\", measurement + \"em\");\n\t\n\t /* Divide the returned value by the measurement to get the ratio between 1% and 1px. Default to 1 since working with 0 can produce Infinite. */\n\t unitRatios.percentToPxWidth = callUnitConversionData.lastPercentToPxWidth = (parseFloat(CSS.getPropertyValue(dummy, \"width\", null, true)) || 1) / measurement; /* GET */\n\t unitRatios.percentToPxHeight = callUnitConversionData.lastPercentToPxHeight = (parseFloat(CSS.getPropertyValue(dummy, \"height\", null, true)) || 1) / measurement; /* GET */\n\t unitRatios.emToPx = callUnitConversionData.lastEmToPx = (parseFloat(CSS.getPropertyValue(dummy, \"paddingLeft\")) || 1) / measurement; /* GET */\n\t\n\t sameRatioIndicators.myParent.removeChild(dummy);\n\t } else {\n\t unitRatios.emToPx = callUnitConversionData.lastEmToPx;\n\t unitRatios.percentToPxWidth = callUnitConversionData.lastPercentToPxWidth;\n\t unitRatios.percentToPxHeight = callUnitConversionData.lastPercentToPxHeight;\n\t }\n\t\n\t /***************************\n\t Element-Agnostic Units\n\t ***************************/\n\t\n\t /* Whereas % and em ratios are determined on a per-element basis, the rem unit only needs to be checked\n\t once per call since it's exclusively dependant upon document.body's fontSize. If this is the first time\n\t that calculateUnitRatios() is being run during this call, remToPx will still be set to its default value of null,\n\t so we calculate it now. */\n\t if (callUnitConversionData.remToPx === null) {\n\t /* Default to browsers' default fontSize of 16px in the case of 0. */\n\t callUnitConversionData.remToPx = parseFloat(CSS.getPropertyValue(document.body, \"fontSize\")) || 16; /* GET */\n\t }\n\t\n\t /* Similarly, viewport units are %-relative to the window's inner dimensions. */\n\t if (callUnitConversionData.vwToPx === null) {\n\t callUnitConversionData.vwToPx = parseFloat(window.innerWidth) / 100; /* GET */\n\t callUnitConversionData.vhToPx = parseFloat(window.innerHeight) / 100; /* GET */\n\t }\n\t\n\t unitRatios.remToPx = callUnitConversionData.remToPx;\n\t unitRatios.vwToPx = callUnitConversionData.vwToPx;\n\t unitRatios.vhToPx = callUnitConversionData.vhToPx;\n\t\n\t if (Velocity.debug >= 1) console.log(\"Unit ratios: \" + JSON.stringify(unitRatios), element);\n\t\n\t return unitRatios;\n\t }" ]
[ "0.68548477", "0.6810661", "0.6603468", "0.6580972", "0.65439767", "0.6519883", "0.64602107", "0.64602107", "0.6458794", "0.63897", "0.63897", "0.63836765", "0.63763237", "0.63479966", "0.63232195", "0.63232195", "0.63090533", "0.62811875", "0.6256365", "0.6234015", "0.62133884", "0.62133884", "0.62133884", "0.6212137", "0.6187167", "0.6187167", "0.61841726", "0.6171042", "0.6159902", "0.61386055", "0.61386055", "0.61386055", "0.61386055", "0.61386055", "0.61386055", "0.61386055", "0.61386055", "0.61386055", "0.61386055", "0.61367726", "0.6121061", "0.60564303", "0.6045985", "0.60363734", "0.60363734", "0.60363734", "0.60296285", "0.6023519", "0.60022944", "0.5977407", "0.59510314", "0.5949842", "0.59430027", "0.5932641", "0.5930344", "0.5921719", "0.5919096", "0.59177405", "0.5909441", "0.5873896", "0.5858207", "0.58510524", "0.5845605", "0.58413625", "0.58388764", "0.5835641", "0.5835532", "0.5825092", "0.5809569", "0.58038926", "0.5797119", "0.5796133", "0.5791113", "0.5772348", "0.576977", "0.57463104", "0.57238114", "0.57152534", "0.5709771", "0.5709697", "0.570425", "0.5704019", "0.56994677", "0.5695743", "0.5689853", "0.5689853", "0.568436", "0.5684334", "0.5679424", "0.56735766", "0.5665248", "0.5664396", "0.56486064", "0.56480545", "0.56437105", "0.56182694", "0.56121105", "0.56084156", "0.5604097", "0.5597166", "0.5597166" ]
0.0
-1
Creates a infoPanel Object
constructor() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createInfoPanel() {\n return new Ext.Panel({\n border: true,\n id: 'infoPanel',\n baseCls: 'md-info',\n autoWidth: true,\n contentEl: 'infoContent',\n autoLoad: {\n url: '../../apps/search/home_' + catalogue.LANG + '.html',\n callback: loadCallback,\n scope: this,\n loadScripts: false\n }\n });\n }", "function buildInfoPanel(info) {\n var html = \"<div class='panel panel-default minimal'>\";\n html += \"<a data-toggle='collapse' data-parent='#accordion' href='#colps\" + info.id + \"'>\";\n html += \"<div class='tab-panel-heading' style='padding-top: 10px;'><span class='panel-title'>\";\n html += \"<small class='col-sm-3' style='color: #000;'>\" + info.PostedDate + \"</small> &emsp;\";\n html += \"<span class='col-sm-push-1'><strong>\" + info.Title + \"</strong></span>\";\n html += \"</span><i class='icon-down-open' style='float: right;'></i></div></a>\";\n html += \"<div id='colps\" + info.id + \"' class='panel-collapse collapse'>\" + info.Content + \"</div></div>\";\n $(\"#otherinfopanel\").append(html);\n}", "createInfoPanel() {\n var panel = d3.select(\"#panel\");\n\n // Close panel button\n panel.append(\"button\")\n .text(\"X\")\n .on(\"click\", function () {\n panel.style(\"display\", \"none\");\n LibrariesMap.libCirclesGroup.selectAll(\"circle\").classed(\"circle-selected\", false);\n });\n\n // Create the pie charts svg\n this.pieSvg = panel.append(\"svg\")\n .attr(\"id\", \"pie-svg\")\n .attr(\"width\", \"100%\")\n .attr(\"height\", \"50%\")\n\n // Language Pie chart\n this.pieSvg.append(\"g\")\n .attr(\"id\", \"pieLg-group\")\n .attr(\"transform\", \"translate(\" + pieChartDim.left + \",\" + pieChartDim.top + \")\");\n // Public Pie chart\n this.pieSvg.append(\"g\")\n .attr(\"id\", \"piePub-group\")\n .attr(\"transform\", \"translate(\" + pieChartDim.left1 + \",\" + pieChartDim.top + \")\");\n // Format Pie chart\n this.pieSvg.append(\"g\")\n .attr(\"id\", \"pieForm-group\")\n .attr(\"transform\", \"translate(\" + pieChartDim.left2 + \",\" + pieChartDim.top + \")\");\n \n // Legend\n this.createLegend(8, LibrariesMap.pieLgColorScale, pieLgInfo.legendTexts);\n this.createLegend(pieChartDim.left1*0.75, LibrariesMap.piePubColorScale, piePubInfo.legendTexts);\n this.createLegend(pieChartDim.left2*0.8, LibrariesMap.pieFormColorScale, pieFormInfo.legendTexts);\n\n return panel;\n }", "function createDataInformationPanel(dataInfoSelector) {\n infoManager = $(dataInfoSelector).empty();\n }", "function createInformationTile() {\n var newWidget = JSONfn.parse(JSONfn.stringify(widgetGenericTemplate));\n newWidget.uid = Date.now();\n newWidget.typeId = 'infoTile';\n newWidget.type = 'Information Tile';\n return newWidget;\n }", "function createDetailsPanel() {\n\tvar div = $('<div>').attr('id', 'details_panel').addClass('notification_panel');\n\taddStyle(\"#details_panel {\\\n\t\tbackground-color: #fff;\\\n\t\tposition: absolute;\\\n\t\ttop: 0px;\\\n\t\tmargin-left: 1px;\\\n\t\tleft: 270px;\\\n\t\twidth: 500px;\\\n\t\tborder: 1px solid #e3e3e3;\\\n\t\tborder-radius: 0 0 3px 0;\\\n\t\tborder-width: 0 1px 1px 0;\\\n\t\ttransition: left 0.5s ease;\\\n\t\tdisplay: none }\\\n\t#details_panel h4 { display: none }\\\n\t#details_panel.left { left: 30px }\");\n\t\n\t$(div).mouseleave(function() { $(this).hide() });\n\t\t\n\t$(\"body\").append(div);\n}", "static displayInfoPanel(panel, data) {\n // Updatte and display panel\n LibrariesMap.updatePanel(panel, data);\n panel.style(\"display\", \"block\");\n // Update pie charts\n LibrariesMap.updatePieCharts(panel, data);\n }", "function InfoBarWindow(){}", "function showDetails() {\n _('infoDiv').innerHTML = infoText;\n _('infoPanel').style.display = 'block';\n}", "function createInformationBoard() {\n var newWidget = JSONfn.parse(JSONfn.stringify(widgetGenericTemplate));\n newWidget.uid = Date.now();\n newWidget.typeId = 'infoBoard';\n newWidget.type = 'Information Board';\n newWidget.sizeX = 2;\n newWidget.sizeY = 3;\n this.SetSetting(newWidget, 'bodyTextSize', 16);\n this.SetSetting(newWidget, 'bodyIconSize', 16);\n this.SetSetting(newWidget, 'bodyValueSize', 16);\n return newWidget;\n }", "function InfoWidget (id, controller) {\n\t// Call superconstructor first (AutomationModule)\n\tInfoWidget.super_.call(this, id, controller);\n}", "function CreateInfoBox() {\n //A title and description for the infobox.\n var title = 'Title';\n var description = 'Description.';\n\n //Create an infobox at the center of the map but don't show it.\n infobox = new Microsoft.Maps.Infobox(map.getCenter(), {\n htmlContent: infobox_template.replace('{title}', title).replace('{description}', description),\n visible: false\n });\n\n //Assign the infobox to a map instance.\n infobox.setMap(map); \n}", "function createInfoBox() {\n\n\tlet info = L.control();\n\n\tinfo.onAdd = function() {\n\t\tthis._div = L.DomUtil.create('div', 'info'); // create a div with a class \"info\"\n\t\tthis.update();\n\t\treturn this._div;\n\t};\n\n\t// method that we will use to update the control operating over the feature properties received\n\tinfo.update = function(props) {\n\t\tlet info;\n\t\tif(props !== undefined) {\n\t\t\t// TODO: Use classes for styling this\n\t\t\tinfo = `<div><span style=\"float: left;\">Balancing Area:</span> <strong style=\"float: right;\">${props.b_a.name}</strong></div>`;\n\t\t\tinfo += `<div><span style=\"float: left;\">Installed Capacity:</span> <strong style=\"float: right;\">&nbsp;&nbsp;${props.b_a.total} [MW]</strong></div>`;\n\t\t\tinfo += `<div><span style=\"float: left;\">Load Zone:</span> <strong style=\"float: right;\">${props.l_z.name}</strong></div>`;\n\t\t\tinfo += `<div><span style=\"float: left;\">Installed Capacity:</span> <strong style=\"float: right;\">${props.l_z.total} [MW]</strong></div>`;\n\t\t}\n\t\telse {\n\t\t\tinfo = 'Hover over a Load Zone';\n\t\t}\n\t\tthis._div.innerHTML = info;\n\t};\n\n\treturn info;\n}", "function build_protein_info_panel(data, div) {\n div.empty();\n var protein = data.controller.get_current_protein();\n div.append(protein['description']);\n div.append(\"<br>----<br>\");\n div.append(dict_html(protein['attr']));\n}", "function DetailPanel() {\n Panel.call(this, $('<section class=\"container\"><div><img></img><p></p></div></section>'));\n\n var $container = this.$element;\n\n var $div = $container.children('div');\n this.__$div__ = $div;\n\n var errorPanel = new ErrorPanel;\n $container.append(errorPanel.$element);\n this.__errorPanel__ = errorPanel;\n}", "function infoWindowCreate() {\n var infoWindows = new google.maps.InfoWindow();\n return infoWindows;\n}", "function createInfoWindow(item, index) {\n let content = `<a href=\"${item.website()}\" target=\"_blank\"><h3>` +\n `${item.name()}</h3></a><p>${item.info()}<br> `+\n `<div><span>Current Weather:</span><canvas id=\"weather-info-${index}\"` +\n ` width=\"32\" height=\"32\"></canvas></div>` +\n `Rating:${item.rating()}/5</p>`;\n return new google.maps.InfoWindow({\n content: content\n })\n}", "function createNewInfoWindow(coord, content){\n // information window is displayed at click position\n\tmapCollector.infowindow = new google.maps.InfoWindow({\n\t \tcontent: content,\n\t \tposition: coord\n\t});\n }", "function makeInfoBox(controlDiv, map) {\n // Set CSS for the control border.\n var controlUI = document.createElement('div');\n controlUI.style.boxShadow = 'rgba(0, 0, 0, 0.298039) 0px 1px 4px -1px';\n controlUI.style.backgroundColor = '#fff';\n controlUI.style.border = '2px solid #fff';\n controlUI.style.borderRadius = '2px';\n controlUI.style.marginBottom = '22px';\n controlUI.style.marginTop = '10px';\n controlUI.style.textAlign = 'center';\n controlDiv.appendChild(controlUI);\n // Set CSS for the control interior.\n var controlText = document.createElement('div');\n controlText.style.color = 'rgb(25,25,25)';\n controlText.style.fontFamily = 'Roboto,Arial,sans-serif';\n controlText.style.fontSize = '100%';\n controlText.style.padding = '6px';\n controlText.textContent = 'The map shows all clicks made in the last week.';\n controlUI.appendChild(controlText);\n }", "function makeDataPanel() {\n var dataPanel,\n panelProperties = new Ext.Panel({\n region: 'north',\n height: 30,\n cls: 'properties-panel',\n html: '<div class=\"properties\">'\n + '<div class=\"left\"><p class=\"label\"><label for=\"speed\">Facteur de vitesse(kme/h) : </label></p><p><input id=\"speed\" class=\"speed\" type=\"number\" name=\"speed\" value=\"4\" /></p></div>'\n + '<div class=\"right\" style=\"display:none;\"><p class=\"label\"><label for=\"maps\">Cartes topographiques : </label></p><p><input id=\"maps\" type=\"text\" name=\"maps\" /></p></div>'\n + '</div>'\n });\n\n this.tabPanel = this.makeGridsTabPanel();\n\n dataPanel = new Ext.Panel({\n title: 'Informations',\n layout: 'border',\n region: 'south',\n height: 300,\n split: true,\n cls: 'data-panel',\n items: [\n panelProperties,\n this.tabPanel,\n this.makeFooter()\n ]\n });\n\n return dataPanel;\n}", "function information() {\n\t//alert(\"Created by Monica Michaud\\nIn the Institute for New Media Studies\\nAdviser: Gordon Carlson, PhD\\nDev Version: 0.2 (Apr 25)\");\n\n\tvar mapInfoBoxString;\n\t\n\tmapInfoBoxString = '<div id=\"content\"><h1 id=\"infoWindowHeading\" class=\"infoWindowHeading\">Information : </h1>' +\n\t\t'<div id=\"infoWindowBodyContent\"><p>Created by Monica Michaud <br /> In the Institute for New Media Studies <br /> Adviser: Gordon Carlson, PhD <br /> Dev Version: 0.2 (Apr 25)</p></div></div>';\n\t\n\tmap.setCenter(MAP_CENTER_COORDINATES); \n\tinfoWindow.setContent(mapInfoBoxString);\n\tinfoWindow.setPosition(MAP_CENTER_COORDINATES);\n\tinfoWindow.open(map);\n}", "function makeInfoBox(config) {\n var html = '' +\n '<div class=\"mappopup\">' +\n '<h4>' + config.title + '</h4>' +\n '<p>' + config.content + '</p>' +\n '<a href=\"' + config.url + '\" ' + (config.external ? 'target=\"_blank\"' : '') + '>' +\n config.linktext +\n '</a>' +\n '</div>';\n\n return new google.maps.InfoWindow({\n content: html\n });\n}", "function DetailPanel(title, popularity, preview, spotifyUrl) {\n Panel.call(this, title, 'section');\n\n var p = document.createElement('p');\n p.innerText = popularity;\n this.element.appendChild(p);\n\n var iframe = document.createElement('iframe');\n iframe.src = preview;\n this.element.appendChild(iframe);\n\n var a1 = document.createElement('a');\n a1.href = spotifyUrl;\n a1.setAttribute('target', '_blank');\n a1.innerHTML = 'Complete song on Spotify';\n this.element.appendChild(a1);\n}", "function disp_info(d) {\n //console.log(d);\n materialInfo.html(getMaterialInfo(d))\n .attr(\"class\", \"panel_on\");\n }", "renderInfoPanel() {\n\t\tconst {username} = this.props.pic;\n\t\tconst {rating} = this.props.pic;\n\t\tlet {import_datetime} = this.props.pic;\n\t\tconst {width} = this.props.pic.images[this.props.format];\n\t\tconst {height} = this.props.pic.images[this.props.format];\n\t\timport_datetime = (import_datetime ? import_datetime.slice(5,7) + \"/\" + import_datetime.slice(8,10) + \"/\" + import_datetime.slice(0,4) : 'N/A');\n\t\tlet source = 'URL'; \n\t\tif (this.props.pic.images[this.props.format].url === undefined) {\n\t\t\tsource = 'MP4';\n\t\t}\n\t\tconst style = {\n\t\t\topacity: this.props.info_is_off ? 1 : 0,\n\t\t}\n\t\treturn (<div className=\"info-box panel\" style={style}>\n\t\t\t\t\t<div>{'Owner: ' + (username ? username : 'N/A')}</div>\n\t\t\t\t\t<div>{'Rating: ' + rating.toUpperCase()}</div>\n\t\t\t\t\t<div>{'Dimension: ' + width +' x ' + height + ' px'}</div>\n\t\t\t\t\t<div>{'Uploaded: ' + import_datetime}</div>\n\t\t\t\t\t<div>{'Type: ' + source}</div>\t\t\t\t\t\t\t\n\t\t\t\t</div>);\n\t}", "function makeInfoDialog(id){\n\n\t$(\"#info_\"+id).dialog({\n\t\tautoOpen:false\n\t});\n\n\t$(\"#infoButton_\"+id).click(function(){\n\t\t$(\"#info_\"+id).dialog(\"open\");\n\t});\n}", "function setup_showInfo() {\n\tdocument.getElementById(\"basic\").style.display = \"none\";\n\tdocument.getElementById(\"create\").style.display = \"none\";\n\tdocument.getElementById(\"source\").style.display = \"none\";\n\tdocument.getElementById(\"info\").style.display = \"block\";\n}", "function InfoPane (canvas)\n\t{\n\t//\tInitialize our basic members\n\t\n\tthis.canvas = canvas;\n\tthis.ctx = canvas[0].getContext(\"2d\");\n\tthis.cxWidth = canvas.width();\n\tthis.cyHeight = canvas.height();\n\n\t//\tAdd listeners for mouse events\n\n\tthis.canvas.on(\"mousedown\", { canvasCtrl: this },\n\t\t(function (e)\n\t\t\t{\n\t\t\t//\tConvert coordinate to canvas-relative\n\t\t\t\n\t\t\tvar canvasOffset = e.data.canvasCtrl.canvas.offset();\n\t\t\tvar x = e.pageX - canvasOffset.left;\n\t\t\tvar y = e.pageY - canvasOffset.top;\n\t\t\t\n\t\t\t//\tHandle it\n\t\t\t\n\t\t\te.preventDefault();\n\t\t\te.data.canvasCtrl.onMouseDown(x, y);\n\t\t\t})\n\t\t);\n\t\t\n\tthis.canvas.on(\"mousemove\", { canvasCtrl: this },\n\t\t(function (e)\n\t\t\t{\n\t\t\t//\tConvert coordinate to canvas-relative\n\t\t\t\n\t\t\tvar canvasOffset = e.data.canvasCtrl.canvas.offset();\n\t\t\tvar x = e.pageX - canvasOffset.left;\n\t\t\tvar y = e.pageY - canvasOffset.top;\n\n\t\t\t//\tHandle it\n\t\t\t\n\t\t\te.data.canvasCtrl.onMouseMove(x, y, e.wheelDelta);\n\t\t\t})\n\t\t);\n\n\tvar data = { canvasCtrl: this };\n\n\tthis.canvas[0].onwheel = $UI.onwheel({ canvasCtrl: this},\n\t\t(function (e)\n\t\t\t{\n\t\t\t//\tConvert coordinate to canvas-relative\n\t\t\t\n\t\t\tvar canvasOffset = e.data.canvasCtrl.canvas.offset();\n\t\t\tvar x = e.pageX - canvasOffset.left;\n\t\t\tvar y = e.pageY - canvasOffset.top;\n\t\t\t\n\t\t\te.data.canvasCtrl.onMouseWheel(x, y, e.delta);\n\n\t\t\te.preventDefault();\n\t\t\t})\n\t\t);\n\t\n\t//\tHook up tabs\n\n\tthis.initTabs();\n\n\t//\tEdit control\n\n\tthis.inputCtrl = $(\"#uiInfoPaneEdit\");\n\t}", "function CreateControlPanel() {\n // Create the Album info Content Item\n albumInfoObject = new ContentItem();\n albumInfoObject.heading = strInstructions;\n albumInfoObject.layout = gddContentItemLayoutNews;\n albumInfoObject.flags = gddContentItemFlagStatic; // dont take clicks\n pluginHelper.AddContentItem(albumInfoObject, gddItemDisplayInSidebar);\n \n // Create Controls\n ctrlFileOpen = new ContentItem();\n ctrlPlayPause = new ContentItem();\n ctrlStop = new ContentItem();\n ctrlPrev = new ContentItem();\n ctrlNext = new ContentItem();\n \n // Set the images\n ctrlFileOpen.image = utils.LoadImage(\"open.gif\");\n ctrlStop.image = utils.LoadImage(\"stop.gif\");\n ctrlPrev.image = utils.LoadImage(\"prev.gif\");\n ctrlNext.image = utils.LoadImage(\"next.gif\");\n ctrlPlayPause.image = imgPlay;\n \n // Tooltips\n ctrlFileOpen.tooltip = strTooltipOpen;\n ctrlStop.tooltip = strTooltipStop;\n ctrlPrev.tooltip = strTooltipPrev;\n ctrlNext.tooltip = strTooltipNext;\n ctrlPlayPause.tooltip = strTooltipPlay;\n\n // OnDetailsview is called on single clicks, so use that to do various tasks\n ctrlFileOpen.onDetailsView = OpenFileButtonClicked;\n ctrlPlayPause.onDetailsView = PlayPauseButtonClicked;\n ctrlStop.onDetailsView = StopButtonClicked;\n ctrlPrev.onDetailsView = PrevButtonClicked;\n ctrlNext.onDetailsView = NextButtonClicked;\n\n // Now add the items\n pluginHelper.SetFlags(gddPluginFlagNone, gddContentFlagManualLayout + gddContentFlagHaveDetails);\n pluginHelper.AddContentItem(ctrlFileOpen, gddItemDisplayInSidebar);\n pluginHelper.AddContentItem(ctrlPlayPause, gddItemDisplayInSidebar);\n pluginHelper.AddContentItem(ctrlStop, gddItemDisplayInSidebar);\n pluginHelper.AddContentItem(ctrlPrev, gddItemDisplayInSidebar);\n pluginHelper.AddContentItem(ctrlNext, gddItemDisplayInSidebar);\n}", "function createInfoAlert() {\n viewFactory.createErrorAlert('Information', infoMessage);\n}", "function buildDetailsPanel() {\n const detailXPos = chartParams.width - chartParams.detailWidth - 2 * chartParams.detailPadding;\n const details = d3.select(\"#details\")\n .style(\"width\", chartParams.detailWidth + \"px\")\n .style(\"padding\", \"0 \" + chartParams.detailPadding + \"px\")\n .style(\"left\", \"calc(\" + detailXPos + \"px)\")\n .style(\"top\", \"0px\");\n\n details.append(\"p\")\n .html(\"Popn: <span id='popn'></span>\");\n\n details.append(\"p\")\n .attr(\"id\", \"literacy\");\n}", "makeModalInfo() {\n const modalInfo = $('<div>').addClass('modal-info-container');\n const modalImage = $('<img>').addClass('modal-img')\n .attr('src', this.picture)\n .attr('alt', 'profile picture');\n const modalH3 = $('<h3>').addClass('modal-name cap')\n .attr('id', 'name')\n .text(this.name);\n modalInfo.append(modalImage, modalH3,\n this.makeModalPTag('modal-text', this.email),\n this.makeModalPTag('modal-text cap', this.location),\n this.makeModalPTag('modal-text', this.phoneNumber),\n this.makeModalPTag('modal-text', this.address),\n this.makeModalPTag('modal-text', \"Birthday: \" + this.birthday));\n return modalInfo;\n }", "function InfoBox (config) {\n\t\tthis.content = config.content;\n\t\tthis.prevBtn = config.prevBtn;\n\t\tthis.nextBtn = config.nextBtn;\n\t\tthis.prevArrow = config.prevArrow;\n\t\tthis.nextArrow = config.nextArrow;\n\t\tthis.duration = config.duration;\n\t}", "function setChartInfoSubPanel(graphId) {\n\tvar html = '<div class=\"chartGeneralInfo subPanel\" >';\n\t// chart title and id\n\thtml += '<div class=\"subPanelTitle row\">General Information</div>'\n\t\t\t+ '<div class=\"row title\">Graph Name: '\n\t\t\t+ MAIN_GRAPHS[graphId].graphTitle + '</div>';\n\t// num of nodes\n\thtml += '<div class=\"row \"> <div class=\"cell\"># of Nodes: '\n\t\t\t+ MAIN_GRAPHS[graphId].getGraphSize()\n\t\t\t+ '</div> <div class=\"cell\"># of Edges: '\n\t\t\t+ MAIN_GRAPHS[graphId].allEdges.length + '</div></div>';\n\thtml += '</div><div class=\"left-panel-header\">Result</div><div id=\"panel-result\"></div>';\n\tvar infoPanel = $('#secondPageInfoPanel');\n\tinfoPanel.append($(html));\n\n}", "function createInfoDiv() {\n info_div = document.createElement('div')\n info_div.id = 'infoDiv'\n\n // if mobile device, make it a bit smaller\n if ($(window).width() < 431) {\n info_div.style.width = '350px'\n } else {\n info_div.style.width = '400px'\n }\n\n var close_button = document.createElement('button')\n close_button.id = 'closeButton'\n close_button.innerHTML = '<b>X</b>'\n close_button.onclick = function () {\n this.parentNode.parentNode\n .removeChild(this.parentNode);\n return false;\n };\n\n info_div.appendChild(close_button)\n document.body.appendChild(info_div);\n}", "function _fnFeatureHtmlInfo ( oSettings )\n\t\t{\n\t\t\tvar nInfo = document.createElement( 'div' );\n\t\t\tnInfo.className = oSettings.oClasses.sInfo;\n\t\t\t\n\t\t\t/* Actions that are to be taken once only for this feature */\n\t\t\tif ( typeof oSettings.aanFeatures.i == \"undefined\" )\n\t\t\t{\n\t\t\t\t/* Add draw callback */\n\t\t\t\toSettings.aoDrawCallback.push( {\n\t\t\t\t\t\"fn\": _fnUpdateInfo,\n\t\t\t\t\t\"sName\": \"information\"\n\t\t\t\t} );\n\t\t\t\t\n\t\t\t\t/* Add id */\n\t\t\t\tif ( oSettings.sTableId !== '' )\n\t\t\t\t{\n\t\t\t\t\tnInfo.setAttribute( 'id', oSettings.sTableId+'_info' );\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn nInfo;\n\t\t}", "function _fnFeatureHtmlInfo(oSettings) {\n\t\t\tvar nInfo = document.createElement('div');\n\t\t\tnInfo.className = oSettings.oClasses.sInfo;\n\n\t\t\t/* Actions that are to be taken once only for this feature */\n\t\t\tif (typeof oSettings.aanFeatures.i == \"undefined\") {\n\t\t\t\t/* Add draw callback */\n\t\t\t\toSettings.aoDrawCallback.push({\n\t\t\t\t\t\"fn\" : _fnUpdateInfo,\n\t\t\t\t\t\"sName\" : \"information\"\n\t\t\t\t});\n\n\t\t\t\t/* Add id */\n\t\t\t\tif (oSettings.sTableId !== '') {\n\t\t\t\t\tnInfo.setAttribute('id', oSettings.sTableId + '_info');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn nInfo;\n\t\t}", "function setupPlayerInfo(element, info) {\n var img = document.createElement(\"img\");\n img.className = \"player\";\n img.src = info.picture;\n element.appendChild(img);\n\n var nameArea = document.createElement(\"div\");\n nameArea.className = \"nameArea\";\n element.appendChild(nameArea);\n\n var nameBox = document.createElement(\"div\");\n nameBox.className = \"name\";\n nameBox.innerHTML = info.name;\n nameArea.appendChild(nameBox);\n\n var elo = document.createElement(\"div\");\n elo.className = \"elo\";\n elo.innerHTML = info.elo;\n if (info.name == \"Stockfish\") {\n elo.id = \"stockfishLevel\";\n elo.innerHTML = \"\";\n\n stockFishLevelMenu = document.createElement(\"select\");\n for (var i = 0; i < 11; ++i) {\n var opt = document.createElement(\"option\");\n opt.value = i;\n if (i == 0) opt.value = \"thermal\";\n opt.innerHTML = opt.value;\n stockFishLevelMenu.appendChild(opt);\n }\n\n elo.innerHTML += \"Level: \";\n elo.appendChild(stockFishLevelMenu);\n }\n nameArea.appendChild(elo);\n\n var clock = document.createElement(\"div\");\n clock.className = \"clock\";\n clock.innerHTML = \"05:00\";\n element.appendChild(clock);\n }", "createPanel(page, xStart, yStart, xGridWidth, yGridHeight) {\n let newPanel = new Panel(page, xStart, yStart, xGridWidth, yGridHeight);\n menuElements[page].push(newPanel);\n return newPanel;\n }", "function create_panel({id, classes, h_text, options, f_text}) {\n\n const panel = document.createElement(\"div\");\n panel.id = id;\n panel.className = \"panel\";\n\n // Add the panel-specific class names.\n classes.forEach(function (class_name) {\n panel.classList.add(class_name);\n });\n\n // the top button (\"Presets\", \"Home\").\n const header = create_special_row(h_text);\n panel.appendChild(header);\n\n // The container for the main options - the ones that correspond to\n // different parts of the webpage.\n const optCont = document.createElement(\"div\");\n optCont.className = \"opt-cont\";\n panel.appendChild(optCont);\n\n // Create the main options.\n for (let i = 0; i < options.length; ++i) {\n optCont.appendChild(create_option({\n text: options[i].text,\n input_id: options[i].input_id,\n }));\n }\n\n // The bottom (\"Done\") button.\n const footer = create_special_row(f_text);\n panel.appendChild(footer);\n\n return panel;\n\n}", "function showPanel(placeResult) {\r\n // If infoPane is already open, close it\r\n if (infoPane.classList.contains(\"open\")) {\r\n infoPane.classList.remove(\"open\");\r\n }\r\n // Clear the previous details\r\n while (infoPane.lastChild) {\r\n infoPane.removeChild(infoPane.lastChild);\r\n }\r\n /* TODO: Step 4E: Display a Place Photo with the Place Details */\r\n // Add the primary photo, if there is one\r\n if (placeResult.photos) {\r\n let firstPhoto = placeResult.photos[0];\r\n let photo = document.createElement('img');\r\n photo.classList.add('hero');\r\n photo.src = firstPhoto.getUrl();\r\n infoPane.appendChild(photo);\r\n }\r\n // Add place details with text formatting\r\n let name = document.createElement('h1');\r\n name.classList.add('place');\r\n name.textContent = placeResult.name;\r\n infoPane.appendChild(name);\r\n if (placeResult.rating) {\r\n let rating = document.createElement('p');\r\n rating.classList.add('details');\r\n rating.textContent = `Rating: ${placeResult.rating} \\u272e`;\r\n infoPane.appendChild(rating);\r\n }\r\n let address = document.createElement('p');\r\n address.classList.add('details');\r\n address.textContent = placeResult.formatted_address;\r\n infoPane.appendChild(address);\r\n if (placeResult.website) {\r\n let websitePara = document.createElement('p');\r\n let websiteLink = document.createElement('a');\r\n let websiteUrl = document.createTextNode(placeResult.website);\r\n websiteLink.appendChild(websiteUrl);\r\n websiteLink.title = placeResult.website;\r\n websiteLink.href = placeResult.website;\r\n websitePara.appendChild(websiteLink);\r\n infoPane.appendChild(websitePara);\r\n }\r\n // Open the infoPane\r\n infoPane.classList.add(\"open\");\r\n }", "createInfoWindow(marker, infoWindow, map) {\n\t\tif (this.onReadyInfoWindow) window.google.maps.event.removeListener(this.onReadyInfoWindow);\n\t\tif (this.onCloseInfoWindow) window.google.maps.event.removeListener(this.onCloseInfoWindow);\n\t\tinfoWindow.marker = marker;\n\t\tinfoWindow.setContent('<div id=\"infoWindow\" />');\n\t\tthis.onReadyInfoWindow = infoWindow.addListener('domready', e => {\n\t\t\trender(<InfoWindow marker={marker} />, document.getElementById('infoWindow'));\n\t\t});\n\t\tthis.onCloseInfoWindow = infoWindow.addListener('closeclick', function() {\n\t\t\tinfoWindow.marker = null;\n\t\t});\n\t\tinfoWindow.open(map, marker);\n\t}", "constructor(info) {\n this.id = null;\n this.caption = \"\";\n this.className = null;\n this.main = null;\n this.target = null;\n this.listInput = null;\n this.wins = [];\n this.forms = [];\n this.tab = null;\n this.data = [];\n for (var x in info) {\n if (this.hasOwnProperty(x)) {\n this[x] = info[x];\n }\n }\n let main = this.id ? $(this.id) : false;\n if (main) {\n if (main.ds(\"gtType\") === \"alarm\") {\n return;\n }\n }\n else {\n main = $.create(\"div\").attr(\"id\", this.id);\n }\n this.create(main);\n }", "constructor(...componentInfo) {\n\t\tsuper('$div.panel-body', ...componentInfo);\n\t}", "function showInfoBox(e, i, j) {\n\n\n //TODO: Cambiar por angular?\n\n if (i == null) $(\"#infobox\").hide();\n else {\n //TODO: Can we move this to angular?\n var politician = data[i];\n var membership = politician.memberships[j];\n\n\n\n var info = \"<span class='title'>\" + politician.name + \"</span>\";\n info += \"<br />\";\n info += \"<img src='\" + politician.image + \"'>\" ;\n info += \"<br />\" + membership.role ;\n info += \"<br />\" + membership.organization.name ;\n info += \"<br />\" + formatYear(membership.start) + \" - \" + formatYear(membership.end);\n\n\n //Initial pos;\n var infoPos;\n if (i <= data.length/2) infoPos = { left: e.pageX, top: e.pageY };\n else infoPos = { left: e.pageX-200, top: e.pageY-80 };\n\n var classes = \"bar \" + membership.post.cargotipo.toLowerCase() + \" \" + membership.organization.level.toLowerCase() + \" \" + membership.role.toLowerCase();\n //clear all clases\n document.getElementById('infobox').className = '';\n\n $(\"#infobox\")\n .addClass(classes)\n .html(info)\n .css(infoPos)\n .show();\n }\n\n}", "function ShowInfo(id){\n var desc=dataModel.locations[id].view.getDescription(id);\n // open new info window\n if(desc){\n // close infoo window if already open\n CloseInfo();\n infoWindow=new google.maps.InfoWindow({\n content: desc\n });\n infoWindow.open(mapElement, GetMarker(id));\n }\n}", "function populateInformationModal() {\n\t// add text to the label\n\tvar category = allViews[activeView];\n\t// trim the heading \"TissueSpecific\" if necessary\n\tif (category.substr(0,14) == \"TissueSpecific\") {\n\t\tcategory = category.substr(14);\n\t}\n\t$('#informationLabel').text(category+\" Information\"); \n\t\n\t// now put info text in body\n\t$('#informationBody').html(allInfoFiles[activeView]);\n\t\n}", "displayInfo() {\n this.getTime();\n $('#modalTitle').html(`${this.name}`);\n $('#modalInfo').html(\n `<li>Current Time: &nbsp; ${this.time}</li><li>Latitude: &nbsp; ${this.latitude}</li><li>Longitude: &nbsp; ${this.longitude}</li><li>Distance from your location: &nbsp; ${this.distance}km</li>`\n );\n $('#wikiInfo').removeClass('show');\n $('#forecastInfo').removeClass('show');\n $('#weatherInfo').removeClass('show');\n $('#generalInfo').addClass('show');\n $('#infoModal').modal();\n }", "function createInfo (typeOfContent, title, header, content){\n var id = ((app.info.length) + 1) *4;\n var item ={};\n item.id = id;\n item.title = title;\n item.header = header;\n item.content = content;\n item.typeOfContent = typeOfContent;\n console.log(item, \"new itmeeeee\");\n app.info.push(item);\n return item;\n}", "function InfoBox() {\n}", "function renderInfo() {\n /** Get state */\n if (!wave.getState()) {\n return;\n }\n var state = wave.getState();\n \n /** Retrieve topics */\n var topics = toObject(state.get('topics','[]'));\n var votes = toObject(state.get('votes','[]'));\n \n /** Add topics to the canvas */\n var html = \"\";\n for (var i = 0; i < topics.length; i++){\n var id = \"topic\"+i;\n html += '<div class=\"topic\"><h4> ' + topics[i] + '</h4></div>';\n }\n document.getElementById('body').innerHTML = html;\n \n /** Create \"Add topic\" button to the footer */\n html += '<input type=\"text\" id=\"textBox\" value=\"\"/><button id=\"addInput\" onclick=\"addInput()\">Add Topic</button>';\n document.getElementById('footer').innerHTML = html;\n \n /** Adjust window size dynamically */\n gadgets.window.adjustHeight();\n}", "function showConfiguration(panel,type,extraData){\n $(\"#settings\").remove();\n $(\"#widgets\").slideUp(\"slow\");\n $(\"#companies\").slideUp(\"slow\");\n if($(\"#companiesList\").length!=0){\n $(\"#companiesList\").html(\"\")\n \n }\n\n var aux=$(\"#currentCreation\").length\n if(aux!=0){\n deleteCreation(numWidget)\n numWidget--\n }\n aux=$(\"#currentSettings\").length\n if(aux!=0){\n $(\"#currentSettings\").remove()\n }\n var color=($(\"#panel\"+panel).css('background-color'));\n var objectPanel=GetPanel(panel);\n numWidget++;\n\n if(type==\"HighInfo\"){\n var widget= new HighInfo(numWidget,panel,color,extraData,actualReadingData[extraData]);\n \n }else if(type==\"HighDemo\"){\n var widget= new HighDemo(numWidget,panel,color,extraData);\n \n }else if(type==\"HighTime\"){\n\n var widget= new HighTime(numWidget,panel,color,extraData,actualReadingData[extraData]);\n \n }else if(type==\"VideoWidget\"){\n var widget= new VideoWidget(numWidget,panel,color)\n\n }else if(type==\"HtmlInfoWidget\"){\n var widget= new HtmlInfoWidget(numWidget,panel,color,extraData,actualReadingData[extraData])\n\n }\n\n objectPanel.pushElement(widget)\n $(\"#making\").slideDown(\"slow\")\n widget.makeMenu()\n}", "function makeInfoWindow(position, msg) {\n // close old window if it exists\n if (infoWindow) infoWindow.close();\n\n // make a new InfoWindow\n infoWindow = new google.maps.InfoWindow({\n map: map,\n position: position,\n\n content: \"<b>\" + msg + \"</b>\"\n });\n}", "function infoBox(){\n\t//\tCreate a new instance of Google Maps infowindows\n\tvar infobox = new google.maps.InfoWindow();\n\t// Adding a click event to the Marker\n\tgoogle.maps.event.addListener(marker, \"click\", function(){\n\t\t//\tsetContent is just like innerHTML. You can write HTML into this document\n\t\tinfobox.setContent(\"<div><strong>\"+marker.title+\"</strong></div><hr>\"+\n\t\t\t\t\t\t\t\"<div>\"+marker.description+\"</div>\"\n\t\t\t);\n\t\t//\tOpening the infoBox\n\t\tinfobox.open(map, marker);\n\t});\n\n}", "addExtraInfoElement(info, node, withContainer = false) {\n // Don't create if there's nothing to show\n if (info.length == 0) return;\n\n let container;\n if (withContainer) {\n container = document.createElement('div');\n container.classList.add('TWPT-extrainfo-container');\n } else {\n container = node;\n }\n\n let tooltips = [];\n\n for (const i of info) {\n let chip = document.createElement('material-chip');\n chip.classList.add('TWPT-extrainfo-chip');\n\n let chipCont = document.createElement('div');\n chipCont.classList.add('TWPT-chip-content-container');\n\n let content = document.createElement('div');\n content.classList.add('TWPT-content');\n\n const [badge, badgeTooltip] = createExtBadge();\n\n let span = document.createElement('span');\n span.append(i);\n\n content.append(badge, span);\n chipCont.append(content);\n chip.append(chipCont);\n container.append(chip);\n\n tooltips.push(badgeTooltip);\n }\n\n if (withContainer) node.append(container);\n\n for (const tooltip of tooltips) new MDCTooltip(tooltip);\n }", "function createPanel(id, name, img, reserve, tracker, verified, hours) {\n $(\"#no-matching\").remove();\n\n $(\".container\").append($(\".restaurant-info\").clone().removeClass(\"restaurant-info\").addClass(\"restaurant-panel-\" + id).addClass(\"restaurant-panel\").attr('id',id));\n let x = \".restaurant-panel-\" + id;\n $(x + \" .restaurant-image > img\").attr(\"src\", img).addClass(\"imgScale\").attr(\"alt\", \"the-keg\");\n $(x + \" .restaurant-name\").append(name);\n if (reserve == true) {\n $(x + \" .restaurant-details .restaurant-icons\").append(\"<img class=\\\"icon\\\" src=\\\"images/calendar.png\\\" alt='something went wrong.' data-toggle='popover' data-trigger='hover' title='Reservation'/>\");\n }\n if (tracker == true) {\n $(x + \" .restaurant-details .restaurant-icons\").append(\"<img class=\\\"icon\\\" src=\\\"images/tableTracker.png\\\" alt='something went wrong.' data-toggle='popover' data-trigger='hover' title='Table Tracker'/>\")\n }\n if (verified == true) {\n $(x + \" .restaurant-details .restaurant-icons\").append(\"<img class=\\\"icon\\\" src=\\\"images/verifiedHours.png\\\" alt='something went wrong.' data-toggle='popover' data-trigger='hover' title='Verified Hours'/>\")\n }\n $(x + \" .restaurant-details .hours\").append(hours);\n}", "displayInfo() {\n clear(dogInfo())\n\n let image = document.createElement('img')\n image.src = this.image\n\n let h2 = document.createElement('h2')\n h2.innerText = this.name\n\n let button = document.createElement('button')\n button.innerText = this.buttonText()\n button.id = `toggle${this.id}`\n \n dogInfo().appendChild(image)\n dogInfo().appendChild(h2)\n dogInfo().appendChild(button)\n }", "function createInfoWindow(marker, centerMarker) {\n var onclick;\n var centerMarkerId\n var rating = (marker.rating == \"None\") ? \"\" : \"Rating: \" + Math.round(marker.rating) + \"/100\";\n var errorMessage = ($(\"#err\").length) ? $(\"#err\").html() : \"\";\n\n // There is no centerMarker if the marker is on our path\n if (centerMarker == null) {\n onclick = ' id=\"removeBtn\" onclick=\"removePoint(' + marker.id + ');\">' +\n '<span class=\"glyphicon glyphicon-trash\"></span>';\n } else {\n centerMarkerId = centerMarker.id;\n onclick = ' id=\"addBtn\" onclick=\"addPoint(' + marker.id + ', ' +\n centerMarker.id + ');\">Add';\n }\n\n var content = '<p>' + marker.name + '</p><p>' +\n rating + '</p><p id=\"err\">' + errorMessage +\n '</p><div class=\"btn btn-primary btn-sm\"' + onclick +\n '</div><div class=\"btn btn-link btn-sm\"' +\n 'onclick=\"setInfoWindowContent('+ marker.id + ', ' + centerMarkerId +\n ');\">More Info...</div>';\n\n namespace.popWindow.marker = marker;\n namespace.popWindow.setContent(content);\n namespace.popWindow.open(namespace.map, marker);\n}", "function _fnFeatureHtmlInfo ( oSettings )\n\t\t{\n\t\t\tvar nInfo = document.createElement( 'div' );\n\t\t\tif ( oSettings.sTableId !== '' )\n\t\t\t{\n\t\t\t\tnInfo.setAttribute( 'id', oSettings.sTableId+'_info' );\n\t\t\t}\n\t\t\tnInfo.className = \"dataTables_info\";\n\t\t\treturn nInfo;\n\t\t}", "function showInfo(info, targetElementId) {\r\n var el;\r\n if (targetElementId == null) {\r\n el = document.createElement('div');\r\n el.innerHTML = info;\r\n document.body.insertBefore(el, document.body.firstChild);\r\n } else {\r\n el = document.getElementById(targetElementId);\r\n el.innerHTML = info;\r\n }\r\n el.style.border = \"2px dotted red\";\r\n el.style.padding = \"4px\";\r\n}", "static displayInfoProfile(photographer)\n {\n const infoProfile = InfoProfileFactory.create(photographer)\n document.querySelector(\".main\").appendChild(infoProfile)\n }", "function buildInfoBox(text, imgClass){\r\n \t\tvar infoBox= $('<div></div>').attr('id', 'info');\r\n \t\t$('<img>').attr('id','lbImg').addClass(imgClass).appendTo(infoBox);\r\n \t\t$('<h2></h2>').attr('id','lbMsg').text(text).appendTo(infoBox);\r\n \t\t return infoBox;\r\n \t}", "function createInfoWindow(marker, content) {\n // open info window with created content\n infoWindow = new google.maps.InfoWindow({\n content: content\n });\n\n infoWindow.open(map, marker);\n \n // turn popover windows on\n $('[data-toggle=\"popover\"]').popover();\n\n // to close mobile popovers\n $('[data-toggle=\"popover\"]').click(function(evt) {\n $(this).popover(\"hide\");\n });\n\n\n }", "function createInfoWindow(map) {\n console.log(\"creating info window\");\n infowindow = new google.maps.InfoWindow();\n google.maps.event.addListener(map, 'mouseover', function() {\n infowindow.close();\n });\n return infowindow;\n}", "function PopUp_Info(i) {\n console.log(i);\n $('<div id=\"window-popup\"><div id=\"window-content\"></div></div>').appendTo('body');\n $('<div id = \"close\"><img src=\"IMG/close-button.gif\"></div>').appendTo('#window-content');\n\n $('<div class = \"text\"><img id = \"pic\" src=' + data[i].image + '></div>').appendTo('#window-content');\n $('<div class = \"text\"><b>' + data[i].name + '</b></div>').appendTo('#window-content');\n $('<hr>').appendTo('#window-content');\n $('<div id = \"description\">' + data[i].desc + '</div>').appendTo('#window-content');\n $('#close').click(function() {\n $('#window-popup').remove();\n });\n }", "function infoPopUpWindow(sInfo)\n{\n\tvar sPopUpId = '#popup_info .popup_info_sms';\n\t$(sPopUpId).append(\"<div id='sPopup-container'>\"+\n\t\t\t\t\t\t\"<div id='sPopup-popup'>\"+\n\t\t\t\t\t\t\t\"<div title='close' id='sPopup-close'></div>\"+\n\t\t\t\t\t\t\t\t\"<div style='clear:both;'></div>\"+\n\t\t\t\t\t\t\t\t\tsInfo+\n\t\t\t\t\t\t\t\"</div>\"+\n\t\t\t\t\t\t\"</div>\"+\n\t\t\t\t\t\"</div>\");\n\t$('body').css({ overflow : 'hidden' });\n\t$(sPopUpId).fadeIn(400, function(){\n\t\t$(this).css({ display: 'block' });\n\t});\n\t$('#sPopup-close').click(function(){\n\t\t$('body').css({ overflow : 'auto' });\n\t\t$('#sPopup-container').fadeOut(400, function(){\n\t\t\t$(this).remove();\n\t\t});\n\t});\t\n}", "function showSpotDetails() {\n //get element\n var spotPanel = document.getElementById(\"spot-view\");\n //set global panel var\n spotDetailPanel = spotPanel;\n //add class to selected element\n spotDetailPanel.classList.add(\"visible\");\n //set panel spotname\n document.getElementById(\"spot-name-display\").innerHTML = pubSpotInfo.spotName;\n //set panel spotname\n document.getElementById(\"spot-img-display\").src = pubSpotInfo.imgUrl;\n}", "function addNamePanel() {\n _namePanel = document.createElement( \"div\" );\n _namePanel.className = \"NamePanel\"\n _namePanel.style.width = container.style.width;\n _namePanel.innerHTML = userName;\n \n container.appendChild( _namePanel );\n }", "function setInfowindowMarkup(info) {\n return '<h4>'+ info['name'] +'</h4>' +\n '<p>'+ info['street'] + ' ' + info['city'] + ' ' + info['state'] + '</p>';\n}", "function show_info(txt)\r\n{\r\n\t//alert(txt);\r\n $('info_div').show();// = 'shown';\r\n //var info_style = \r\n $('info_div').setStyle({left:mouseX+\"px\",top:mouseY+\"px\"});\r\n //info_style.left = mouseX+\"px\";\r\n //info_style.top = mouseY+\"px\";\r\n $('info_div').update(txt);\r\n}", "function generateInfoBox()\n{\n\tvar out = '<a href=\"' + url + '\" class=\"gmap-title\">' + title + '</a><div class=\"gmap-description\">' + description + '</div>';\n\n\tif ('undefined' != typeof address)\n\t{\n\t\tout += '<div class=\"gmap-address\">' + address + ', ' + city + ', ' + state + ', ' + zip + '</div>';\n\t}\n\n\treturn out;\n}", "function createInfo(){\n\tvar nickName = $(\"#header_nickName\").html()||'';\n\tvar strDom = '<div id=\"userInfoDialog2\" class=\"popContent popRegister\" style=\"display:none;\">'+\n\t\t\t'<div class=\"content\"><fieldset><form id=\"editThirdUserForm\" method=\"post\" action=\"\" onsubmit=\"return false;\">'+\n\t\t\t'<div><em class=\"title\">昵称</em><em><input id=\"nickName\" name=\"nickName\" value=\"'+\n\t\t\tnickName+'\" class=\"input g170\" type=\"text\" /></em></div><div><em class=\"title\">邮箱</em>'+\n\t\t\t'<em><input id=\"email\" name=\"email\" class=\"input g170\" type=\"text\" />*</em></div><div>'+\n\t\t\t'<em class=\"title\"></em><em ><a id=\"thirdLoginSubmit\" href=\"#\" class=\"btnOS\" >确定</a></em>'+\n\t\t\t'<em ><a id=\"thirdLoginCancel\" href=\"#\" class=\"btnBS\" >取消</a></em></div></form></fieldset></div></div>';\n\treturn strDom;\n}", "displayInfo() {\n let imageContainer = document.querySelector(\"#image-container\");\n let thumbnailEl = document.createElement(\"img\");\n thumbnailEl.setAttribute(\"src\", this.thumbnailImg)\n imageContainer.append(thumbnailEl);\n let artistNameDiv = document.querySelector(\"#artist-name\");\n artistNameDiv.textContent = this.name;\n let artistInfoDiv = document.querySelector(\"#profile-info\");\n artistInfoDiv.textContent = this.profileInfo;\n\n }", "function showInfo() {\n info.style.display = 'block';\n \n // clean up after ourselves\n d.controlSettings.removeEventListener('click', showInfo);\n d.closer.addEventListener('click', hideInfo);\n}", "showInfo() {\n let venusInfo;\n if (!this.visible) {\n if(scorebox.score >= this.totalStars) {\n push();\n // Venus infos\n venusInfo = createGraphics(280, 250);\n venusInfo.fill(green.r, green.g, green.b);\n venusInfo.background(20, 220);\n venusInfo.textSize(10);\n venusInfo.textFont(globalFont);\n venusInfo.textAlign(LEFT);\n venusInfo.text(this.info, 10, 20, 260, 250);\n texture(venusInfo);\n\n // Calling the superclass Planet.js' showInfo method\n super.showInfo();\n pop();\n }\n }\n }", "function MakeInfo(org) {\n var items = org.items_neededs;\n\n var contentString = '';\n contentString += '<div class=\"\">';\n contentString += '<h4><b>' + org.org_name + '</b></h4>';\n contentString += '<p>' + org.description + '</p>';\n\n contentString += '<b>Want:</b>';\n contentString += '<ul>'\n items.forEach((item) => {\n contentString += '<li>' + item.item + ' x' + item.quantity_needed + '</li>';\n });\n contentString += '</ul>'\n\n contentString += '</div>'\n\n var infowindow = new google.maps.InfoWindow({\n content: contentString,\n maxWidth: 200\n });\n return infowindow;\n }", "function show_additional_panel(tool){\n var new_panel = '';\n switch(tool){\n case 'polyline':\n case 'line':\n case 'path':\n case 'multipath':\n new_panel = 'open_shape_style';\n break;\n case 'polygon':\n case 'rect':\n case 'circle':\n new_panel = 'closed_shape_style';\n break;\n case 'image':\n new_panel = 'image_style';\n break;\n }\n if(g['additional_panel'] != new_panel){\n if(g['additional_panel'] != '')\n // Hide old panel\n getById(g['additional_panel']).className = 'hidden';\n if(new_panel != ''){\n var panel = getById(new_panel);\n // Show the new panel\n panel.className = 'new_panel';\n }\n // Save changes\n g['additional_panel'] = new_panel;\n }\n}", "function InfoSection() {\n\treturn (\n\t\t<InfoSectionContainer>\n\t\t\t<InfoSectionH1>What we provide</InfoSectionH1>\n\t\t\t<InfoSectionContent>\n\t\t\t\t{InfoData.map((data, index) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<InfoItem key={index}>\n\t\t\t\t\t\t\t<Illustration key={index} src={data.img} size=\"150\"></Illustration>\n\t\t\t\t\t\t\t<InfoP>{data.text}</InfoP>\n\t\t\t\t\t\t</InfoItem>\n\t\t\t\t\t)\n\t\t\t\t})}\n\t\t\t</InfoSectionContent>\n\t\t</InfoSectionContainer>\n\t)\n}", "function createInfoWindowContent(place) {\n console.log(place);\n var content = '<div id=info>' +\n '<h4>' + place.name + '</h4>';\n\n if (place.shouldShowRating) {\n content = content.concat('<p>FourSquare Rating: ' + place.rating + '</p>');\n }\n\n if (place.status) {\n var cssClass = place.isOpen ? \"status-open\" : \"status-closed\";\n content = content.concat('<div class=' + cssClass + '>');\n content = content.concat('<p>' + place.status + '</p>');\n content = content.concat('</div>');\n }\n\n if (place.url) {\n content = content.concat('<a href=' + place.url + '>' + place.url +'</a>');\n }\n\n content = content.concat('<p>Powered by FourSquare</p>');\n\n return content;\n\n}", "function NavBar_CreateIconPanel()\n{\n\t//create the panel\n\tvar panel = document.createElement(\"div\");\n\t//set its styles\n\tpanel.style.cssText = \"position:absolute;width:100%;left:0px;background-image:url('\" + __HOST_LESSON_RESOURCES + \"ais_theme_classic_navbar.png');background-repeat:repeat-x;background-position:0px -32px;\";\n\t//set height\n\tpanel.style.height = __NAVBAR_ROW_HEIGHT + \"px\";\n\t//return panel\n\treturn panel;\n}", "function build_newShotPanel (shotObj, compItem, stat)\r\n {\r\n // define UI panel specifities\r\n // title for shot panel\r\n var title = undefined;\r\n if (showShotStatus_inPanelName == true) var title = shotObj.name + \" [\" + stat +\"]\";\r\n else title = shotObj.name;\r\n var compPanel = TabbedPanel.add(\"tab\");\r\n compPanel.text = title ;\r\n compPanel.comp = compItem; // extra argument passed through panel object \r\n compPanel.appFolder = shotObj.appFolder; // extra argument passed through panel object \r\n compPanel.orientation = \"column\";\r\n compPanel.margins = [10,5,10,5];\r\n compPanel.grp = compPanel.add(\"group\");\r\n compPanel.grp.alignment = ['fill','fill'];\r\n /* Export Option Master Group */\r\n compPanel.ExportOptionsGrp = compPanel.grp.add(\"group\", undefined, undefined, {name: 'ExportOptionsGrp'});\r\n compPanel.ExportOptionsGrp.orientation = \"row\";\r\n compPanel.ExportOptionsGrp.alignment = ['fill','middle'];\r\n compPanel.ExportOptionsGrp.alignChildren = ['center','middle'];\r\n compPanel.AECheck = compPanel.ExportOptionsGrp.add(\"checkbox\", undefined, \"AE\", {name: 'AECheck'}); // 0\r\n compPanel.AECheck.value = shotObj.exportAE;\r\n compPanel.AECheck.helpTip = \"Export After Effect project for this shot if checked\";\r\n compPanel.QTCheck = compPanel.ExportOptionsGrp.add(\"checkbox\", undefined, \"QT\", {name: 'QTCheck'}); // 1\r\n compPanel.QTCheck.value = shotObj.exportQT;\r\n compPanel.QTCheck.helpTip = \"Export Quicktime file for this shot if checked\";\r\n compPanel.FramingCheck = compPanel.ExportOptionsGrp.add(\"checkbox\", undefined, \"Framing\", {name: 'FramingCheck'}); // 2\r\n compPanel.FramingCheck.value = shotObj.exportFraming;\r\n compPanel.FramingCheck.helpTip = \"Export framing of this shot for animators if checked\";\r\n compPanel.MultiFramingCheck = compPanel.ExportOptionsGrp.add(\"checkbox\", undefined, \"Multi-Framing\", {name: 'MultiFramingCheck'}); // 2\r\n compPanel.MultiFramingCheck.value = (shotObj.exportMultiFraming == true);\r\n compPanel.MultiFramingCheck.helpTip = \"Export start frame, end frame and wide\";\r\n compPanel.MACheck = compPanel.ExportOptionsGrp.add(\"checkbox\", undefined, \"3D Anim\", {name: 'MACheck'}); // 3\r\n compPanel.MACheck.value = false;\r\n compPanel.MACheck.helpTip = \"Export maya file for 3D anim if checked\";\r\n compPanel.export_status = compPanel.grp.add(\"group\", undefined, undefined, {name: 'export_status'}); // 4\r\n compPanel.export_status.alignment = ['right','middle'];\r\n compPanel.AddBGAssetBttn = compPanel.export_status.add(\"button\", undefined, \"Add BG asset\", {name: 'AddBGAssetBttn'});\r\n compPanel.appFolder_bttn_obj = compPanel.export_status.add(\"image {name: \\\"appFolder_bttn_obj\\\", helpTip:\\\"Open approved folder\\\", image: \\\"\"+(icons_folder+\"folder_icon_3.png\")+\"\\\"}\");\r\n \r\n /* This grp will contains assets and files to export */\r\n compPanel.assets_grp = compPanel.add(\"group\", undefined, \"assets_group\", {name: 'assets_grp'});\r\n compPanel.assets_grp.orientation = \"column\";\r\n compPanel.assets_grp.margins = [0,10,0,10];\r\n compPanel.assets_grp.id = 1;\r\n compPanel.assets_grp.alignment = ['fill','top'];\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t// J Hearn - this panel contains notes\r\n\t\t\t\t\t\tcompPanel.notes_panel = compPanel.add(\"panel\", undefined, \"Notes\");\r\n compPanel.notes_panel.orientation = \"column\";\r\n compPanel.notes_panel.margins = [0,5,0,5];\r\n compPanel.notes_panel.id = 2;\r\n\t\t\t\t\t\t\tcompPanel.notes_panel.alignment = ['fill','top'];\r\n\t\t\t\t\t\t\tcompPanel.notes_panel.alignChildren = ['fill','fill'];\r\n\t\t\t\t\t\tcompPanel.notes_to_grp = compPanel.notes_panel.add(\"group\");\r\n\t\t\t\t\t\t\tcompPanel.notes_to_grp.orientation = \"row\";\r\n\t\t\t\t\t\t\tcompPanel.notes_to_grp.alignment = ['fill','top'];\r\n\t\t\t\t\t\tcompPanel.notes_to_grp.add(\"statictext\", undefined, \"To:\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tcompPanel.notes_to = new TagEditor(compPanel.notes_to_grp, usersAndDepts.users.sort(), shotObj.notesTo);\r\n\t\t\t\t\t\tcompPanel.notes_depts_grp = compPanel.notes_panel.add(\"group\");\r\n\t\t\t\t\t\t\tcompPanel.notes_depts_grp.orientation = \"row\";\r\n\t\t\t\t\t\t\tcompPanel.notes_depts_grp.alignment = ['fill','top'];\r\n\t\t\t\t\t\tcompPanel.notes_depts_grp.add(\"statictext\", undefined, \"Departments:\");\r\n\t\t\t\t\t\tcompPanel.notes_depts = new TagEditor(compPanel.notes_depts_grp, usersAndDepts.departments.sort(), shotObj.notesDepts);\r\n\t\t\t\t\t\tcompPanel.notes_edit = compPanel.notes_panel.add(\"edittext\", undefined, shotObj.notes, {multiline: true});\r\n \r\n // ACTIONS\r\n compPanel.AddBGAssetBttn.onClick = function ()\r\n { \r\n // create BGcreationPanel\r\n newAsset = bgassettool (this, shotObj, episodeFolder, compItem, undefined);\r\n if (newAsset instanceof Object)\r\n { \r\n // build ui panel for this new asset\r\n new_panel = build_bg_asset_panel (this.parent.parent.parent.children[1], newAsset, shotObj);\r\n // update assets Lists!\r\n if (newAsset.status.match(/re-use|locked/gi))\r\n {\r\n assets_list = readFile (episodeFolder, 'asset');\r\n if (newAsset.name in assets_list)\r\n {\r\n bg_reuse = assets_list[newAsset.name];\r\n // it is a bg re-use of an asset of the episode.\r\n newAsset.sg_id = bg_reuse['sg_id'];\r\n // add the actual shot to list of parent shots of the asset\r\n bg_reuse['parentShot'].push(shotObj.name);\r\n addAssetToFile (episodeFolder, bg_reuse);\r\n }\r\n // add the bg-asset to the .shots List\r\n updateAssetInShotFile (appFolder, newAsset, 'add', newAsset['sg_id']);\r\n }\r\n else\r\n {\r\n // get export status checkbox's value\r\n queueStatus = new_panel.children[2].children[2].value;\r\n // add the bg-asset to the .asset List\r\n addAssetToFile (episodeFolder, newAsset);\r\n // add the bg-asset to the .shots List\r\n updateAssetInShotFile (appFolder, newAsset, 'add', queueStatus);\r\n }\r\n // update the ui\r\n new_panel.parent.parent.layout.layout(true);\r\n // make sure there is a maya file for 3D BGs\r\n if (newAsset.id.match(/3D|camera/gi))\r\n {\r\n //we need 3D for this BG\r\n if (compPanel.MACheck.value == false) compPanel.MACheck.notify();\r\n }\r\n }\r\n };\r\n compPanel.appFolder_bttn_obj.onClick = function ()\r\n { \r\n appDir = new Folder(shotObj.appFolder);\r\n appDir.execute();\r\n getExportedFiles (this, shotObj);\r\n };\r\n \r\n compPanel.MACheck.onClick = function () {\r\n maya_file = shotObj.maFile;\r\n if (maya_file) { build_maya_file_panel (compPanel.assets_grp, this, maya_file, appFolder); }\r\n else { build_maya_file_panel (compPanel.assets_grp, this, undefined, appFolder); };\r\n \r\n };\r\n compPanel.AECheck.onClick = function () { updateEntryInShotFile (appFolder, this.value, \"AE\"); };\r\n compPanel.QTCheck.onClick = function () { updateEntryInShotFile (appFolder, this.value, \"QT\"); };\r\n compPanel.FramingCheck.onClick = function ()\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tcompPanel.MultiFramingCheck.enabled = this.value;\r\n\t\t\t\t\t\t\tif (!this.value && compPanel.MultiFramingCheck.value)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tcompPanel.MultiFramingCheck.value = false;\r\n\t\t\t\t\t\t\t\tupdateEntryInShotFile (appFolder, compPanel.MultiFramingCheck.value, \"MultiFraming\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tupdateEntryInShotFile (appFolder, this.value, \"Framing\");\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t\tcompPanel.MultiFramingCheck.onClick = function () { updateEntryInShotFile (appFolder, this.value, \"MultiFraming\"); };\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tcompPanel.notes_to.onChange = function () { updateEntryInShotFile(appFolder, compPanel.notes_to.tags, \"NotesTo\");};\r\n\t\t\t\t\t\tcompPanel.notes_depts.onChange = function () { updateEntryInShotFile(appFolder, compPanel.notes_depts.tags, \"NotesDepts\");};\r\n\t\t\t\t\t\tcompPanel.notes_edit.onChange = function () { updateEntryInShotFile(appFolder, compPanel.notes_edit.text, \"Notes\");};\r\n\t\t\t\t\t\t\r\n // \r\n // re build the panel\r\n TabbedPanel.layout.layout(true);\r\n return compPanel;\r\n }", "showInfo() {\n let saturnInfo;\n if (!this.visible) {\n if(scorebox.score >= this.totalStars) {\n push();\n // Saturn infos\n saturnInfo = createGraphics(280, 250);\n saturnInfo.fill(green.r, green.g, green.b);\n saturnInfo.background(20, 220);\n saturnInfo.textSize(10);\n saturnInfo.textFont(globalFont);\n saturnInfo.textAlign(LEFT);\n saturnInfo.text(this.info, 10, 20, 260, 250);\n texture(saturnInfo);\n\n // Calling the superclass Planet.js' showInfo method\n super.showInfo();\n pop();\n }\n }\n }", "function createInspektorElem()\n{\n divPanel = document.createElement('div');\n divPanel.classList.add(\"inspektor\");\n \n createList(divPanel);\n setEventInspektor(divPanel);\n \n document.body.appendChild(divPanel);\n \n}", "function InfoBox(opt_opts){opt_opts=opt_opts||{};google.maps.OverlayView.apply(this,arguments);this.content_=opt_opts.content||\"\";this.disableAutoPan_=opt_opts.disableAutoPan||false;this.maxWidth_=opt_opts.maxWidth||0;this.pixelOffset_=opt_opts.pixelOffset||new google.maps.Size(0,0);this.position_=opt_opts.position||new google.maps.LatLng(0,0);this.zIndex_=opt_opts.zIndex||null;this.boxClass_=opt_opts.boxClass||\"infoBox\";this.boxStyle_=opt_opts.boxStyle||{};this.closeBoxMargin_=opt_opts.closeBoxMargin||\"2px\";this.closeBoxURL_=opt_opts.closeBoxURL||\"http://www.google.com/intl/en_us/mapfiles/close.gif\";if(opt_opts.closeBoxURL===\"\"){this.closeBoxURL_=\"\";}\nthis.infoBoxClearance_=opt_opts.infoBoxClearance||new google.maps.Size(1,1);this.isHidden_=opt_opts.isHidden||false;this.alignBottom_=opt_opts.alignBottom||false;this.pane_=opt_opts.pane||\"floatPane\";this.enableEventPropagation_=opt_opts.enableEventPropagation||false;this.div_=null;this.closeListener_=null;this.eventListener1_=null;this.eventListener2_=null;this.eventListener3_=null;this.moveListener_=null;this.contextListener_=null;this.fixedWidthSet_=null;}", "function buildUI (thisObj ) {\r var win = (thisObj instanceof Panel) ? thisObj : new Window('palette', 'FSS Fake Parallax',[0,0,150,260],{resizeable: true});\r\r if (win !== null) {\rvar red = win.graphics.newPen (win.graphics.PenType.SOLID_COLOR, [1, 0.1, 0.1],1);\rvar green = win.graphics.newPen (win.graphics.PenType.SOLID_COLOR, [0.1, 1, 0.1],1);\r\r var H = 25; // the height\r var W = 30; // the width\r var G = 5; // the gutter\r var x = G;\r var y = G;\r\r // win.check_box = win.add('checkbox',[x,y,x+W*2,y + H],'check');\r // win.check_box.value = metaObject.setting1;\r\r win.select_json_button = win.add('button',[x ,y,x+W*5,y + H], 'read json');\r x+=(W*5)+G;\r win.read_label = win.add('statictext',[x ,y,x+W*5,y + H],'NO JSON');\r win.read_label.graphics.foregroundColor = red;\r x=G;\r y+=H+G;\r win.do_it_button = win.add('button', [x ,y,x+W*5,y + H], 'simple import');\r x=G;\r y+=H+G;\r win.regen_it_button = win.add('button', [x ,y,x+W*5,y + H], 'regenerate');\r x=G;\r y+=H+G;\r win.prepare_logo_button = win.add('button', [x ,y,x+W*5,y + H], 'prepare logo');\r\r // win.up_button = win.add('button', [x + W*5+ G,y,x + W*6,y + H], 'Up'); \r\r // win.check_box.onClick = function (){\r // alert(\"check\");\r // };\r //\r //\r win.select_json_button.addEventListener (\"click\", function (k) {\r /**\r * if you hold alt you can clear the the json and all that stuff\r * \r */\r if (k.altKey) {\r mpo2ae.images_folder_flat = null;\r mpo2ae.json = null;\r mpo2ae.allfolders.length = 0;\r mpo2ae.pre_articles.length = 0;\r mpo2ae.articles.length = 0;\r win.read_label.text = 'NO JSON';\r win.read_label.graphics.foregroundColor = red;\r }else{\r\r\r\r// win.select_json_button.onClick = function () {\r /**\r * Why is this in here?\r * Because we can make changed to the GUI from the function\r * makeing some overview for the JSON and stuff like that\r *\r */\r mpo2ae.project = app.project;\r var presets = mpo2ae.settings.comp.layerpresets;\r var jsonFile = File.openDialog(\"Select a JSON file to import.\", \"*.*\",false);\r // var path = ((new File($.fileName)).path);\r if (jsonFile !== null) {\r mpo2ae.images_folder_flat = jsonFile.parent;\r\r var textLines = [];\r jsonFile.open(\"r\", \"TEXT\", \"????\");\r while (!jsonFile.eof){\r textLines[textLines.length] = jsonFile.readln();\r }\r jsonFile.close();\r var str = textLines.join(\"\");\r var reg = new RegExp(\"\\n|\\r\",\"g\");\r str.replace (reg, \" \");\r // var reghack = new RegExp('\"@a','g');\r // str.replace(reghack, '\"a');\r mpo2ae.json = eval(\"(\" + str + \")\"); // evaluate the JSON code\r if(mpo2ae.json !==null){\r // alert('JSON file import worked fine');\r // alert(mpo2ae.json);\r win.read_label.text = 'YES JSON';\r win.read_label.graphics.foregroundColor = green;\r mpo2ae.pre_articles = mpo2ae.json.seite.artikel;\r//~ $.write(mpo2ae.pre_articles.toSource());\r /**\r * This is only cheking if ther are some folders already there\r * \r */\r // var allfolders = [];\r if(mpo2ae.pre_articles.length > 0){\r var projItems = mpo2ae.project.items;\r for(var f = 1; f <= projItems.length;f++){\r if (projItems[f] instanceof FolderItem){\r // alert(projItems[f]);\r mpo2ae.allfolders.push(projItems[f]);\r }\r } // end folder loop\r\r for(var i = 0; i < mpo2ae.pre_articles.length;i++){\r var article = mpo2ae.pre_articles[i];\r var artfolder = null;\r var artimages = [];\r var artnr = null;\r var artprice = null;\r var arttxt = null;\r var artname = null;\r var artdiscr = null;\r var artbrand = null;\r var artfootage = [];\r var artgroup = null;\r if(article.hasOwnProperty('artikelInformation')){\r ainfo = article.artikelInformation;\r if(ainfo.hasOwnProperty('iArtikelNr')){\r // artnr = ainfo.iArtikelNr;\r // ------------ loop all folders per article ------------\r if(mpo2ae.allfolders !== null){\r for(var ff = 0; ff < mpo2ae.allfolders.length;ff++){\r if(mpo2ae.allfolders[ff].name == ainfo.iArtikelNr){\r artfolder = mpo2ae.allfolders[ff];\r break;\r }\r } // close ff loop\r } // close folder null check\r // ------------ end loop all folders per article ------------\r\r // if(artfolder === null){\r // artfolder = mpo2ae.project.items.addFolder(ainfo.iArtikelNr.toString());\r // } // close artfolder null\r }// close iArtikelNr check\r\r if(ainfo.hasOwnProperty('iHersteller')){\r artbrand = ainfo.iHersteller;\r }\r if(ainfo.hasOwnProperty('iGruppenFarbe')){\r artgroup = ainfo.iGruppenFarbe;\r }\r } // close artikelInformation check\r\r if(article.hasOwnProperty('preis')){\r artprice = article.preis;\r }\r if(article.hasOwnProperty('textPlatzieren')){\r if(article.textPlatzieren.hasOwnProperty('artikelBezeichnung')){\r artname = article.textPlatzieren.artikelBezeichnung;\r }\r if(article.textPlatzieren.hasOwnProperty('artikelBeschreibung')){\r artdiscr = article.textPlatzieren.artikelBeschreibung;\r }\r if(article.textPlatzieren.hasOwnProperty('artikelText')){\r arttxt = article.textPlatzieren.artikelText;\r }\r\r if(article.textPlatzieren.hasOwnProperty('artikelNr')){\r artnr = article.textPlatzieren.artikelNr;\r }\r }\r\r// ------------ this is start folder creation and image import ------------\r if(artfolder !== null){\r var imgpath = null;\r if(article.hasOwnProperty('bild')){\r if( Object.prototype.toString.call( article.bild ) === '[object Array]' ) {\r // article.bild is an array\r // lets loop it\r // \r for(var j =0;j < article.bild.length;j++){\r\r if(article.bild[j].hasOwnProperty('attributes')){\r imgpath = article.bild[j].attributes.href.substring(8);\r artimages.push(imgpath);\r alert(imgpath);\r return;\r }// article bild is an Array attributes close\r } // close J Loop\r }else{\r // now this is an error in the JSON\r // the property 'bild' comes as Array OR Object\r // we need to fix that\r if(article.bild.hasOwnProperty('attributes')){\r artimages.push(article.bild.attributes.href.substring(8));\r alert(imgpath);\r return;\r } // article bild is an object attributes close\r\r }// close Object.prototype.toString.call( article.bild )\r\r // alert( mpo2ae.images_folder_flat.fullName + \"\\n\" + artimages);\r // for(var ig = 0; ig < artimages.length;ig++){\r\r // var a_img = File( mpo2ae.images_folder_flat.fsName + \"/\" + artimages[ig]);\r // if(a_img.exists){\r // var footageitem = mpo2ae.project.importFile(new ImportOptions(File(a_img)));\r // footageitem.parentFolder = artfolder;\r // artfootage.push(footageitem);\r // }else{\r // artfootage.push(null);\r // } // close else image does not exist on HD\r // } // end of ig loop artimages\r }else{\r // artile has no property 'bild'\r $.writeln('There are no images on article ' + ainfo.iArtikelNr);\r // alert('There are no images on article ' + ainfo.iArtikelNr);\r }\r }else{\r // it was not possible to create folders\r // neither from the names nor did they exist\r // alert('Error creating folder for import');\r }\r// ------------ end of folder creation an image import ------------\r // var curComp = mpo2ae.project.items.addComp(\r // mpo2ae.settings.projectname + \" \" + ainfo.iArtikelNr,\r // mpo2ae.settings.comp.width,\r // mpo2ae.settings.comp.height,\r // mpo2ae.settings.comp.pixelAspect,\r // mpo2ae.settings.comp.duration,\r // mpo2ae.settings.comp.frameRate);\r // curComp.parentFolder = artfolder;\r\r // now we got all info togther and everything is checked\r // we create an cleaned object with the props we need\r // for later usage\r var art = new Article();\r art.nr = artnr;\r art.folder = artfolder;\r // art.images = artimages;\r // var regdash = new RegExp(\"--\",\"g\");\r art.price = regdashes(artprice);// artprice.replace(regdash,\"\\u2013\");\r art.txt = arttxt;\r art.name = artname;\r art.discr = artdiscr;\r art.brand = artbrand;\r art.footage = artfootage;\r art.group = artgroup;\r mpo2ae.articles.push(art);\r } // end article loop\r\r\r }else{\r alert('No articles in JSON');\r }\r }else{\r alert('JSON is null');\r }\r}else{\r\r alert('File is null');\r}\r } // end else not alt\r // };\r }); // end of eventListener\r\r win.do_it_button.onClick = function () {\r simple_import();\r alert('done');\r };\r\r win.regen_it_button.onClick = function () {\r // simple_import();\r if((app.project.selection < 1) && (!(app.project.selection[0] instanceof CompItem ))){\r alert('Please select your template composition');\r return;\r }\r regenerate_from_template(app.project.selection[0]);\r\r\r };\r\r win.prepare_logo_button.onClick = function () {\r prepare_selected_logo();\r };\r }\r return win;\r}", "function buildInfoWindow(id) {\r\n\t// Information shown in window\r\n\tvar name;\r\n\tvar publish;\r\n\tvar pubmed;\r\n\tvar integ;\r\n\tvar zfin;\r\n\tvar anatomy;\r\n\tvar scanned;\r\n\tvar smed;\r\n\r\n\t// Finding line's information based on id and type\r\n\tif(includes(TRANSGENIC, id)) {\r\n\t\tvar index = TRANSGENIC.indexOf(id);\r\n\t\tname = TRANSGENIC_NAMES[index];\r\n\t\tpublish = TRANSGENIC_PUBLISHED[index];\r\n\t\tpubmed = TRANSGENIC_PUBMED[index];\r\n\t\tinteg = TRANSGENIC_INTEGRATION_SITE[index];\r\n\t\tzfin = TRANSGENIC_ZFIN_FEATURE[index];\r\n\t\tanatomy = TRANSGENIC_ANATOMY[index];\r\n\t\tscanned = TRANSGENIC_SCANNED[index];\r\n\t\tsmed = TRANSGENIC_SPUBMED[index];\r\n\t} else if(includes(GAL4, id)) {\r\n\t\tvar index = GAL4.indexOf(id);\r\n\t\tname = GAL4_NAMES[index];\r\n\t\tpublish = GAL4_PUBLISHED[index];\r\n\t\tpubmed = GAL4_PUBMED[index];\r\n\t\tinteg = GAL4_INTEGRATION_SITE[index];\r\n\t\tzfin = GAL4_ZFIN_FEATURE[index];\r\n\t\tanatomy = GAL4_ANATOMY[index];\r\n\t\tscanned = GAL4_SCANNED[index];\r\n\t\tsmed = GAL4_SPUBMED[index];\r\n\t} else if(includes(CRE, id)) {\r\n\t\tvar index = CRE.indexOf(id);\r\n\t\tname = CRE_NAMES[index];\r\n\t\tpublish = CRE_PUBLISHED[index];\r\n\t\tpubmed = CRE_PUBMED[index];\r\n\t\tinteg = CRE_INTEGRATION_SITE[index];\r\n\t\tzfin = CRE_ZFIN_FEATURE[index];\r\n\t\tanatomy = CRE_ANATOMY[index];\r\n\t\tscanned = CRE_SCANNED[index];\r\n\t\tsmed = CRE_SPUBMED[index];\r\n\t} else if(includes(MISC, id)) {\r\n\t\tvar index = MISC.indexOf(id);\r\n\t\tname = MISC_NAMES[index];\r\n\t\tpublish = MISC_PUBLISHED[index];\r\n\t\tpubmed = MISC_PUBMED[index];\r\n\t\tinteg = MISC_INTEGRATION_SITE[index];\r\n\t\tzfin = MISC_ZFIN_FEATURE[index];\r\n\t\tanatomy = MISC_ANATOMY[index];\r\n\t\tscanned = MISC_SCANNED[index];\r\n\t\tsmed = MISC_SPUBMED[index];\r\n\t} else {\r\n\t\tname = HUC_CER_NAME[0];\r\n\t\tpublish = HUC_CER_PUBLISHED[0];\r\n\t\tpubmed = HUC_CER_PUBMED[0];\r\n\t\tinteg = HUC_CER_INTEGRATION_SITE[0];\r\n\t\tzfin = HUC_CER_ZFIN_FEATURE[0];\r\n\t\tanatomy = HUC_CER_ANATOMY[0];\r\n\t\tscanned = HUC_CER_SCANNED[0];\r\n\t\tsmed = HUC_CER_SPUBMED[0];\r\n\t}\r\n\r\n\t// Constructing HTML for info window\r\n\t// Styles are also provided in style tags because this window doesn't link to any stylesheets\r\n\tvar infoText = \t'<title>' +\r\n\t\t\t\t\t\t(name == '' ? id : name) + ' Info' +\r\n\t\t\t\t\t'</title>' +\r\n\t\t\t\t\t'<style>' +\r\n\t\t\t\t\t'body {' +\r\n\t\t\t\t\t\t'margin: 0;' +\r\n\t\t\t\t\t\t'overflow-y: hidden;' +\r\n\t\t\t\t\t'}' +\r\n\t\t\t\t\t'.ind-info {' +\r\n\t\t\t\t\t\t'font-family: verdana;' +\r\n\t\t\t\t\t\t'position: absolute;' +\r\n\t\t\t\t\t\t'top: 8px;' +\r\n\t\t\t\t\t\t'bottom: 8px;' +\r\n\t\t\t\t\t\t'left: 8px;' +\r\n\t\t\t\t\t\t'right: 8px;' +\r\n\t\t\t\t\t\t'color: white;' +\r\n\t\t\t\t\t\t'padding: 19px;' +\r\n\t\t\t\t\t\t'border-radius: 20px;' +\r\n\t\t\t\t\t\t'box-shadow: 0 0 20px black;' +\r\n\t\t\t\t\t\t'background: #555555;' +\r\n\t\t\t\t\t'}' +\r\n\t\t\t\t\t'.header-p {' +\r\n\t\t\t\t\t\t'margin-bottom: 0;' +\r\n\t\t\t\t\t\t'font-weight: bold;' +\r\n\t\t\t\t\t'}' +\r\n\t\t\t\t\t'.text-p {' +\r\n\t\t\t\t\t\t'margin-top: 0;' +\r\n\t\t\t\t\t'}' +\r\n\t\t\t\t\t'.zfin-link {' +\r\n\t\t\t\t\t\t'color: white;' +\r\n\t\t\t\t\t'}' +\r\n\t\t\t\t\t'</style>' +\r\n\t\t\t\t\t'<div id=\"' + id + '-info\" class=\"ind-info\">' +\r\n\t\t\t\t\t\t'<p class=\"header-p\">Line:</p>' +\r\n\t\t\t\t\t\t'<p class=\"text-p\">' + (name == '' ? id : name) + '</p>' +\r\n\t\t\t\t\t\t'<p class=\"header-p\">Published:</p>' +\r\n\t\t\t\t\t\t'<p class=\"text-p\">' + (pubmed == '' ? '' : '<a class=\"zfin-link\" href=\"https://www.ncbi.nlm.nih.gov/pubmed/' + pubmed + '\" target=\"_blank\">') + publish + (pubmed == '' ? '' : '</a>') + '</p>' +\r\n\t\t\t\t\t\t'<p class=\"header-p\">Integration Site:</p>' +\r\n\t\t\t\t\t\t'<p class=\"text-p\">'+ integ + '</p>' +\r\n\t\t\t\t\t\t'<p class=\"header-p\">ZFIN Feature:</p>' +\r\n\t\t\t\t\t\t'<p class=\"text-p\"><a class=\"zfin-link\" href=\"' + zfin + '\" target=\"_blank\">' + zfin + '</a></p>' +\r\n\t\t\t\t\t\t'<p class=\"header-p\">Anatomy:</p>' +\r\n\t\t\t\t\t\t'<p class=\"text-p\">' + anatomy + '</p>' +\r\n\t\t\t\t\t\t'<p class=\"header-p\">Scanned By:</p>' +\r\n\t\t\t\t\t\t'<p class=\"text-p\">' + (smed == '' ? '' : '<a class=\"zfin-link\" href=\"https://www.ncbi.nlm.nih.gov/pubmed/' + smed + '\" target=\"_blank\">') + scanned + (smed == '' ? '' : '</a>') + '</p>' +\r\n\t\t\t\t\t'</div>';\r\n\r\n\t// Opening info window\r\n\tvar infoWindow = window.open('', id + '-window-' + windowCounter++, 'width=500px,height=500px'); // windowCounter is used and incremented to make sure every window opened is unique\r\n\tinfoWindow.document.write(infoText); // Writing constructed HTML to window\r\n}", "function InfoBox(a){a=a||{};google.maps.OverlayView.apply(this,arguments);this.content_=a.content||\"\";this.disableAutoPan_=a.disableAutoPan||false;this.maxWidth_=a.maxWidth||0;this.pixelOffset_=a.pixelOffset||new google.maps.Size(0,0);this.position_=a.position||new google.maps.LatLng(0,0);this.zIndex_=a.zIndex||null;this.boxClass_=a.boxClass||\"infoBox\";this.boxStyle_=a.boxStyle||{};this.closeBoxMargin_=a.closeBoxMargin||\"2px\";this.closeBoxURL_=a.closeBoxURL||\"http://www.google.com/intl/en_us/mapfiles/close.gif\";if(a.closeBoxURL===\"\"){this.closeBoxURL_=\"\"}this.infoBoxClearance_=a.infoBoxClearance||new google.maps.Size(1,1);if(typeof a.visible===\"undefined\"){if(typeof a.isHidden===\"undefined\"){a.visible=true}else{a.visible=!a.isHidden}}this.isHidden_=!a.visible;this.alignBottom_=a.alignBottom||false;this.pane_=a.pane||\"floatPane\";this.enableEventPropagation_=a.enableEventPropagation||false;this.div_=null;this.closeListener_=null;this.moveListener_=null;this.contextListener_=null;this.eventListeners_=null;this.fixedWidthSet_=null}", "createPersonInfo() {\n const cardInfoContainer = $('<div>').addClass();\n const cardInfoName = $('<h3>').addClass('card-name cap')\n .attr('id', 'name')\n .text(this.name);\n const cardInfoText = $('<p>').addClass('card-text')\n .text(this.email);\n const cardInfoTextCap = $('<p>').addClass('card-text cap')\n .text(this.location);\n cardInfoContainer.append(cardInfoName, cardInfoText, cardInfoTextCap);\n return cardInfoContainer;\n }", "function buildPanel(id) {\n d3.json(\"samples.json\").then((buildData) => {\n\n // Filter by id to match user selection with our JSON data\n var infoArray = buildData.metadata.filter(x => x.id == id);\n console.log(infoArray);\n\n // Grabbing zeroth element of the filtered metadata\n var infoObject = infoArray[0];\n console.log(infoObject);\n\n // Looping through metadata to display in panel\n var metaPanel = d3.select(\"#sample-metadata\");\n metaPanel.html(\"\");\n Object.entries(infoObject).forEach(([key, value]) => {\n metaPanel.append(\"h5\").text(`${key}: ${value}`);\n });\n\n });\n\n}", "function InfoBox(opt_opts){opt_opts=opt_opts||{};google.maps.OverlayView.apply(this,arguments);this.content_=opt_opts.content||\"\";this.disableAutoPan_=opt_opts.disableAutoPan||false;this.maxWidth_=opt_opts.maxWidth||0;this.pixelOffset_=opt_opts.pixelOffset||new google.maps.Size(0,0);this.position_=opt_opts.position||new google.maps.LatLng(0,0);this.zIndex_=opt_opts.zIndex||null;this.boxClass_=opt_opts.boxClass||\"infoBox\";this.boxStyle_=opt_opts.boxStyle||{};this.closeBoxMargin_=opt_opts.closeBoxMargin||\"2px\";this.closeBoxURL_=opt_opts.closeBoxURL||\"//www.google.com/intl/en_us/mapfiles/close.gif\";if(opt_opts.closeBoxURL===\"\"){this.closeBoxURL_=\"\";}\nthis.infoBoxClearance_=opt_opts.infoBoxClearance||new google.maps.Size(1,1);if(typeof opt_opts.visible===\"undefined\"){if(typeof opt_opts.isHidden===\"undefined\"){opt_opts.visible=true;}else{opt_opts.visible=!opt_opts.isHidden;}}\nthis.isHidden_=!opt_opts.visible;this.alignBottom_=opt_opts.alignBottom||false;this.pane_=opt_opts.pane||\"floatPane\";this.enableEventPropagation_=opt_opts.enableEventPropagation||false;this.div_=null;this.closeListener_=null;this.moveListener_=null;this.contextListener_=null;this.eventListeners_=null;this.fixedWidthSet_=null;}", "function createInfoWindow(job) {\n const contentString =\n '<div id=\"content\">' +\n '<div id=\"infowindow\">' +\n '<h1 id=\"title\" class=\"content_header\">' + job.title + '</h1>' +\n '<h2 id=\"company\" class=\"content_header\">' + job.company.display_name + '</h2>' +\n '<h3 id=\"category\" class=\"content_header\">' + job.category.label + '</h3>' +\n '<h4 id=\"location\" class=\"content_header\">' + job.location.display_name + '</h3>' +\n '<div id=\"description\" class=\"content_header\">' +\n '<p>' + job.description + '</p>' +\n '<p><a href=\"' + job.redirect_url + '\">Apply Here</a></p>' +\n '</div>' +\n \"</div>\" +\n \"</div>\";\n const infowindow = new google.maps.InfoWindow({\n content: contentString,\n });\n return infowindow;\n}", "function prepareInfoContent(title, tip, imgUrl) {\n var content = \"\";\n content = \"<div class='infoWindow'>\" +\n \"<h3>\" + title + \"</h3>\" +\n \"<img id='infoImg' alt='location img' src='\" + imgUrl + \"'>\" +\n \"<h3>Tip:</h3>\" +\n \"<p class='tip'>\" + tip + \"</p></div>\";\n return content;\n}", "function add_infoWindow(map_id, mapObject, infoWindow, objectAttribute, attributeValue) {\n\n //'use strict';\n\n mapObject.set(objectAttribute, attributeValue);\n\n if (mapObject.chart_type === undefined) {\n\n google.maps.event.addListener(mapObject, 'click', function(event){\n\n // the listener is being bound to the mapObject. So, when the infowindow\n // contents are updated, the 'click' listener will need to see the new information\n // ref: http://stackoverflow.com/a/13504662/5977215\n mapObject.setOptions({\"info_window\": mapObject.get(objectAttribute)});\n\n infoWindow.setContent(mapObject.get(objectAttribute));\n infoWindow.setPosition(event.latLng);\n infoWindow.open(window[map_id + 'map']);\n });\n\n } else {\n\n mapObject.setOptions({\"info_window\": attributeValue});\n\n google.maps.event.addListener(mapObject, 'click', function(event) {\n\n var c = chartObject(this);\n infoWindow.setContent(c);\n infoWindow.setPosition(event.latLng);\n infoWindow.open(window[map_id + 'map']);\n });\n }\n}", "function toggleInfoPanel() {\n $('#info').slideToggle();\n}", "function popupInfoSite(path, x_html, x_registerProject) {\n var oWindow = null;\n var iWidth = 500;\n var iHeight = 500;\n oWindow = window.open(path + \"/help/info.\" + x_html + \".jsp?registerProject=\" + x_registerProject, \"POPUP_INFO\", \"dependent=yes,locationbar=no,menubar=no,scrollbars=yes,resizable=yes,status=no,screenX=0,screenY=0,height=\" + iHeight + \",width=\" + iWidth);\n if (top.window.opener) {\n oWindow.opener = top.window.opener;\n }\n centerWindow(oWindow, iWidth, iHeight);\n}", "function createPanel(sx,sy,sz,x,y,z) {\n\treturn createPanelWithTexture(null,sx,sy,sz,x,y,z);\n}", "function Info(HTInfo, useTF, focusFieldName, hatsportletid){\r\n\tthis.HTInfo = HTInfo;\r\n\tthis.useTF = useTF;\r\n\tthis.focusFieldName = focusFieldName;\r\n\tthis.hatsportletid = hatsportletid;\r\n}", "function createLightPanel(title, div, size)\n{\n var width = size || \"400px\";\n var panel = new YAHOO.widget.Panel(title,{width: width, \n constraintoviewport: true,\n fixedcenter: true,\n close: true,\n // draggable: true,\n zindex:4,\n modal: true,\n visible: true});\n panel.setHeader(title);\n if (!!div)\n {\n panel.setBody(div);\n div.style.display = \"block\";\n }\n panel.render(document.body);\n return panel;\n}", "function showInfoWindow() { \n currentmarker = this;\n infoWindow.open(map, currentmarker);\n buildIWContent();\n\n}", "function buildDialogPanel() {\n try {\n tintObscureNd = document.createElement(\"div\")\n tintObscureNd.className = \"dialogPanelTint\"\n dialogPanelNd = document.createElement(\"div\")\n tintObscureNd.className = \"dialogPanel\"\n titleBarNd = document.createElement(\"div\")\n titleBarNd.className = \"dialogPanelTitleBar\"\n dialogPanelNd.appendChild(titleBarNd)\n dialogPanelContentNd = document.createElement(\"div\")\n dialogPanelContentNd.className = \"dialogPanelContent\"\n\n document.body.appendChild(tintObscureNd)\n document.body.appendChild(dialogPanelNd)\n } catch(err) {\n console.dir(err)\n debugger \n } // end of try/catch\n }", "pushIntoInfo(data) {\n if (data.response.venue) {\n const object = data.response.venue;\n\n let rating = \"there is no information\";\n if (object.rating !== undefined) rating = object.rating;\n const html = `\n <img src=\"${object.bestPhoto.prefix}300x200${\n object.bestPhoto.suffix\n }\" alt=\"${object.name}\" tabindex=\"0\">\n <div style=\"color: #${\n object.ratingColor\n };\" tabindex=\"0\"><b>Rating:</b> ${rating}</div>\n <div class=\"#selectedLocation\" tabindex=\"0\"><b>Address:</b> ${\n object.location.formattedAddress[0]\n }</div>\n <div tabindex=\"0\"><b>Likes:</b> ${object.likes.count}</div>\n <a href=\"${\n object.canonicalUrl\n }\" target=\"_blank\">Look at this on FourSquare</a>`;\n document.getElementById(`info${object.id}`).innerHTML = html;\n document.getElementById(`infos`).classList.add(\"unvisible\");\n } else {\n const html = `<div> Unable to load information from FourSquare (${\n data.meta.errorDetail\n })</div>`;\n document.getElementById(`infos`).innerHTML = html;\n document.getElementById(`infos`).classList.remove(\"unvisible\");\n }\n }" ]
[ "0.84340686", "0.7034731", "0.7026478", "0.68441755", "0.6605936", "0.65441495", "0.6499732", "0.64882267", "0.6450804", "0.64504594", "0.6449084", "0.6363273", "0.6264746", "0.62492585", "0.62476665", "0.62244296", "0.6217169", "0.6211066", "0.620403", "0.61944", "0.6164216", "0.61347514", "0.61115694", "0.6092379", "0.6083627", "0.60756665", "0.60714614", "0.60388774", "0.603171", "0.6000408", "0.5994314", "0.59720224", "0.59685504", "0.5954235", "0.5947591", "0.59358996", "0.5927512", "0.5884095", "0.58752114", "0.5867959", "0.58676416", "0.58629185", "0.5861961", "0.58580804", "0.58547086", "0.58282197", "0.58232623", "0.5820359", "0.58197504", "0.58067316", "0.57953894", "0.5788636", "0.57686365", "0.57576233", "0.5750451", "0.5748734", "0.5746221", "0.57458454", "0.574469", "0.57436806", "0.5737915", "0.5712093", "0.57091147", "0.570725", "0.57052124", "0.5692172", "0.5682259", "0.5678587", "0.5676581", "0.56737894", "0.56620514", "0.5659528", "0.56582016", "0.56540513", "0.5652454", "0.56403995", "0.563743", "0.5637048", "0.56264937", "0.5610359", "0.5599373", "0.5592058", "0.55920345", "0.55733573", "0.557194", "0.5565056", "0.55636233", "0.5559021", "0.5556333", "0.5555011", "0.55537874", "0.55481845", "0.5546315", "0.55429876", "0.5542027", "0.5540546", "0.5535385", "0.55330694", "0.55322605", "0.5529032", "0.5527674" ]
0.0
-1
Update the info panel to show info about the currently selected world cup
updateInfo(oneWorldCup) { d3.select("#edition").html(oneWorldCup['EDITION']); d3.select("#host").html(oneWorldCup['host']); d3.select("#winner").html(oneWorldCup['winner']); d3.select("#silver").html(oneWorldCup['runner_up']); let teamsString = "<ul>"; for (let i = 0; i < oneWorldCup['teams_names'].length; i++) { teamsString += "<li>" + oneWorldCup['teams_names'][i] + "</li>"; } teamsString += "</ul>"; d3.select("#teams").html(teamsString); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateInfo(oneWorldCup) {\n\n // ******* TODO: PART II *******\n\n // Update the text elements in the infoBox to reflect:\n // World Cup Title, host, winner, runner_up, and all participating teams that year\n\n // Hint: For the list of teams, you can create an list element for each team.\n // Hint: Select the appropriate ids to update the text content.\n\n d3.select(\"#edition\").text(oneWorldCup.EDITION);\n d3.select(\"#host\").text(oneWorldCup.host);\n d3.select(\"#winner\").text(oneWorldCup.winner);\n d3.select(\"#silver\").text(oneWorldCup.runner_up);\n var teams = d3.select(\"#teams\");\n teams.selectAll(\"li\").remove();\n oneWorldCup.teams_names.forEach(function(team_name){\n teams.append(\"li\").text(team_name);\n });\n\n updateMap(oneWorldCup);\n\n\n}", "updateInfo(oneWorldCup) {\n var data = oneWorldCup;\n var bbb = d3.select('#details')\n bbb.select('#edition')\n .text(data.EDITION);\n bbb.select('#host') \n .text(data.host)\n bbb.select('#winner')\n .text(data.winner)\n bbb.select('#silver')\n .text(data.runner_up)\n var team = bbb.select('#teams')\n team.select('ul').remove();\n team.append('ul').selectAll('li')\n .data(data.teams_names)\n .enter()\n .append('li')\n .html(String);\n }", "function updateInfo(oneWorldCup) {\n\n // ******* TODO: PART III *******\n\n // Update the text elements in the infoBox to reflect:\n // World Cup Title, host, winner, runner_up, and all participating teams that year\n\n // Hint: For the list of teams, you can create an list element for each team.\n // Hint: Select the appropriate ids to update the text content.\n\n //console.log(oneWorldCup);\n\n // Delete old info\n var list = document.getElementById(\"teamlist\");\n if (list != null) {\n while (list.firstChild) {\n list.removeChild(list.firstChild);\n }\n }\n\n // Retrieve index of the selected bar\n var index = 0;\n for (var i = 0; i < allWorldCupData.length; i++) {\n if (oneWorldCup == allWorldCupData[i].year) {\n index = i;\n break;\n }\n }\n\n // Info\n document.getElementById(\"edition\").innerHTML = allWorldCupData[index].EDITION;\n document.getElementById(\"host\").innerHTML = allWorldCupData[index].host;\n document.getElementById(\"winner\").innerHTML = allWorldCupData[index].winner;\n document.getElementById(\"silver\").innerHTML = allWorldCupData[index].runner_up;\n\n\n // List of Teams\n for (var i = 0; i < allWorldCupData[index].teams_names.length; i++) {\n var point = document.createElement(\"li\");\n var team = document.createTextNode(allWorldCupData[index].teams_names[i]);\n point.appendChild(team);\n document.getElementById(\"teamlist\").appendChild(point);\n }\n\n}", "function showCountyMap(map) {\r\n\r\n $('.overview-container').addClass('hide');\r\n $('.county-container').removeClass('hide');\r\n\r\n updateLegend(map);\r\n initAvenzaViewer(map);\r\n \r\n // artificial 1s busy panel to replace bad flickering with an okay-ish one\r\n window.setTimeout(() => {\r\n $('#mapContainer, #legend').removeClass('hide');\r\n $('#mapBusyPanel').addClass('hide');\r\n }, 1000);\r\n\r\n}", "function updateClimateMap(){\n $('.climate-variables-map, .timescale-selector-map').change(function(){\n $('.climate-variables-button').click();\n });\n }", "function getLocationInfo() {\n\n var north = document.getElementById(\"countryNorth\").value;\n var south = document.getElementById(\"countrySouth\").value;\n var east = document.getElementById(\"countryEast\").value;\n var west = document.getElementById(\"countryWest\").value;\n\n var curCit = \"north: '\" + String(north) + \"', south:'\" + String(south) + \"', east:'\" + String(east) + \"', west:'\" + String(west) + \"'\";\n twlGeo.getGeoNames('cities', { north: north, south: south, east: east, west: west }, locationInfo)\n twlGeo.getGeoNames('wikipediaBoundingBox', { north: north, south: south, east: east, west: west }, getCountrySummary)\n\n var locBut = document.getElementById(\"locBut\")\n var locButVis = document.getElementById(\"locBut\").style.display\n var citInfo = document.getElementById(\"citiesPanel\")\n\n var e = document.getElementById(\"country\");\n var strCountry = e.options[e.selectedIndex].value;\n\n var strLocation = document.getElementById(\"locations\").value;\n\n if (locButVis == \"block\" || strCountry == \"\") {\n locBut.style.display = \"none\"\n } else {\n locBut.style.display = \"block\"\n\n }\n}", "displayInfo() {\n this.getTime();\n $('#modalTitle').html(`${this.name}`);\n $('#modalInfo').html(\n `<li>Current Time: &nbsp; ${this.time}</li><li>Latitude: &nbsp; ${this.latitude}</li><li>Longitude: &nbsp; ${this.longitude}</li><li>Distance from your location: &nbsp; ${this.distance}km</li>`\n );\n $('#wikiInfo').removeClass('show');\n $('#forecastInfo').removeClass('show');\n $('#weatherInfo').removeClass('show');\n $('#generalInfo').addClass('show');\n $('#infoModal').modal();\n }", "updateInfo(oneWorldCup) {\n\n // ******* TODO: PART III *******\n\n d3.select(\"#host\").text(oneWorldCup.host);\n d3.select(\"#winner\").text(oneWorldCup.winner);\n d3.select(\"#silver\").text(oneWorldCup.runner_up);\n let teams = d3.select(\"#teams\");\n console.log(teams);\n teams.selectAll(\"p\").remove();\n console.log(oneWorldCup.teams_names.length);\n for (var i=0; i < oneWorldCup.teams_names.length; i++){\n teams.append(\"p\").text(oneWorldCup.teams_names[i])\n }\n // Update the text elements in the infoBox to reflect:\n // World Cup Title, host, winner, runner_up, and all participating teams that year\n\n // Hint: For the list of teams, you can create an list element for each team.\n // Hint: Select the appropriate ids to update the text content.\n\n //Set Labels\n\n }", "function showCurrentLocation(response) {\n let city = `${response.data.name}`;\n let country = `${response.data.sys.country}`;\n let currentLocation = `${city}, ${country}`;\n document.querySelector(\"#city-display\").innerHTML = `${currentLocation}`;\n}", "function cityInfoOnButtonPush() {\n var city = $(this).attr(\"data-city\");\n var cityData = cities.find(function (cityData) {\n return cityData.city.name === city;\n });\n renderWeatherInfo(cityData);\n }", "static updateUI() {\n\t\tUI.updateTemp();\n UI.updatePrecip();\n UI.updateIcons();\n Initialize.setDate();\n /* Weather.getWeather(); */\n document.querySelector(\".location\").innerText = city;\n }", "function showGeoInfo(){\n $('#location').html(geo.city);\n $('#day').html(geo.day);\n $('#weather').html(geo.weather);\n $('#weather-icon').attr('src',geo.weather_icon);\n $('#precip').html(geo.precip + '&#37;');\n $('#humidity').html(geo.humidity + '&#37;');\n \n isFahren(true);\n \n //timestamp//\n $('#update').html(geo.update);\n }", "function updateCurrent() {\n // console.dir(document.querySelector('#temp'));\n $('#current-city').html(\"\" + activeCity + \": \" + \"<span>\" + date.format('MMM. Do') + \"<span><img src='\"+ weathData.icon + \"'>\" );\n // console.log(weathData.uv);\n $('#temp').text(weathData.temp + \" °F\");\n $('#hum').text(weathData.hum + \"%\");\n $('#wind').text(weathData.wind + \" MPH\");\n $('#uv').removeClass('yellow red green')\n if (weathData.uv < 3) {\n $('#uv').text(weathData.uv).addClass('green');\n } else if (weathData.uv >= 3 && weathData.uv < 8) {\n $('#uv').text(weathData.uv).addClass('yellow');\n } else if (weathData.uv > 8) {\n $('#uv').text(weathData.uv).addClass('red');\n }\n \n }", "function renderCurrWx() {\n //TARGET #activeCityCard ELEMENTS AND UPDATE EACH ELEMENT WITH KEY VALUES\n $('#cityName').text(activeLocation.name + \", \" + activeLocation.country + today)\n $('#wxCond').attr('src', \"http://openweathermap.org/img/wn/\" + activeLocation.wxIcon + \"@2x.png\").prop('alt', activeLocation.wxCond)\n $('#cityTemp').text(\"Temperature: \" + activeLocation.temp.toFixed(0) + \" \\xB0F\")\n $('#cityHum').text(\"Humidity: \" + activeLocation.humidity + \"%\")\n $('#cityWs').text(\"Wind Speed: \" + activeLocation.wind + \" MPH\")\n }", "function fillInfo() {\n nameLabel.innerHTML = cocktail[0];\n cocktailInfoLabel.innerHTML = cocktailInfo;\n}", "function refresh()\n\t{\n\t\tdrawMinimap();\n\t\tdrawMinimapOverlay();\n\t\tdrawFoodBar();\n\t\tdrawProductionShields();\n\t\tdrawFoodStorage();\n\t\tdrawShieldBar();\n\t\tdrawTradeBar();\n\t\tdrawOutput();\n\n\t\t$(\"#city-screen .title\").text(city.name + \", \"+ civ.game.getYearString());\n\n\t\t// position city icon\n\t\tvar pos = getUnitIconPosition(3,city.type);\n\t\t$(\"#city-screen .city\").css(\"background-position\", pos.x+\"px \"+ pos.y+\"px\" );\n\n\t\t// stop propagation\n\t\t$(\"#city-screen\").click(function(e) {e.stopPropagation(); });\n\t}", "function showPosition() {\n fetch(\"https://ipwhois.app/json/?objects=city,latitude,longitude\")\n .then((response) => response.json())\n .then((data) => {\n let currentLat = parseFloat(data.latitude).toFixed(2);\n let currentLong = parseFloat(data.longitude).toFixed(2);\n let currentCity = data.city;\n // Adding position marker - the main map\n let markerHome = L.marker([currentLat, currentLong]).addTo(map);\n markerHome\n .bindPopup(`<em>You are here: </em><br><b>${currentLat}°, ${currentLong}°<br>in: <u>${currentCity}</u></b>`)\n .openPopup();\n // Adding position to the 3D Map\n showPosition3D(currentLat, currentLong, currentCity);\n // Showing Local Solar Time\n localSolarTime(currentLat, currentLong);\n })\n .catch(console.error);\n}", "function updateCurrentInfoInApp(json){\n // Update min and max temp\n let currentMin = json.main.temp_min;\n let currentMax = json.main.temp_max;\n currentMinElement.innerHTML = Math.round(currentMin);\n currentMaxElement.innerHTML = Math.round(currentMax);\n\n // Update humidity info\n let currentHumidity = `Humidity: ${json.main.humidity}%`;\n currentHumidityElement.innerHTML = currentHumidity;\n\n // Update wind info\n let currentWind = `Wind: ${json.wind.speed}m/s`;\n currentWindElement.innerHTML = currentWind;\n\n // Update description of state of weather\n let currentDescription = json.weather[0].description;\n currentStateElement.innerHTML = capitaliseThis(currentDescription);\n\n // Update of weather emoji\n let currentState = json.weather[0].icon;\n currentState = setEmoji(currentState);\n currentEmojiElement.innerHTML = currentState;\n\n // Update the city name\n let currentCity = json.name;\n currentCityElement.innerHTML = currentCity;\n\n // Get the lat and long\n newCityLat = json.coord.lat;\n newCityLong = json.coord.lon;\n}", "function updateGeo(){\n hideAll();\n activeIndex = 2;\n document.getElementById(lessonArray[activeIndex].divID).style.display = \"block\";\n document.title = lessonArray[activeIndex].title;\n document.getElementById(\"instructions\").innerHTML = lessonArray[activeIndex].blurb;\n if (mapGeo === 0){\n refreshGeo();\n }\n}", "function updateCityCard(city) {\n $('#city-name').text(city.title);\n $('#latlon').text(`Lat Lon: ${city.latt_long}`);\n showCityResult();\n getDistances(city.latt_long);\n sortSunnyDistance(5);\n updateClosest();\n}", "updateMap(worldcupData) {\n\n //Clear any previous selections;\n this.clearMap();\n\n var arr = worldcupData.teams_iso;\n\n for (var i = 0; i < arr.length; i++) {\n this.map.select(\"#cntr_\" + arr[i]).classed('team', true);\n }\n\n this.map.select(\"#cntr_\" + worldcupData['host_country_code']).classed('host', true);\n\n this.mapPoints\n .data([worldcupData.win_pos])\n .append('circle')\n .attr(\"cx\", d => this.projection(d)[0])\n .attr(\"cy\", d => this.projection(d)[1])\n .attr(\"r\", \"8px\")\n .classed(\"gold\", true);\n\n this.mapPoints\n .data([worldcupData.ru_pos])\n .append('circle')\n .attr(\"cx\", d => this.projection(d)[0])\n .attr(\"cy\", d => this.projection(d)[1])\n .attr(\"r\", \"8px\")\n .classed(\"silver\", true);\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 displayHomeworld(homeworld){\n\n // removes previously selected world content\n if (document.contains(document.getElementById(\"homeworld-content\"))) {\n document.getElementById(\"homeworld-content\").remove();\n }\n\n var worldContent = document.createElement(\"div\");\n var worldString = '<div class=\"homeworld-details\">World Details</div>'+\n '<div class=\"homeworld-name\">Homeworld: ' + homeworld.name + '</div>'+\n '<div class=\"homeworld-climate\">Climate: ' + homeworld.climate + '</div>'+\n '<div class=\"homeworld-diameter\">Diameter: ' + homeworld.diameter + '</div>'+\n '<div class=\"homeworld-gravity\">Gravity: ' + homeworld.gravity + '</div>'+\n '<div class=\"homeworld-orbital-period\">Orbital Period: ' + homeworld.orbital_period + '</div>'+\n '<div class=\"homeworld-orbital-population\">Population: ' + homeworld.population + '</div>'+\n '<div class=\"homeworld-orbital-surface-water\">Surface Water: ' + homeworld.surface_water + '</div>'+\n '<div class=\"homeworld-terrain\">Terrain: ' + homeworld.terrain + '</div>';\n\n worldContent.innerHTML = worldString;\n worldContent.id = 'homeworld-content';\n worldContent.className = 'homeworld-name';\n document.getElementById(\"sw-world\").appendChild(worldContent);\n\n var closeButton = document.createElement(\"div\");\n closeButton.onclick = closeHomeworld;\n closeButton.className = 'close-homeworld';\n closeButton.append('X');\n document.getElementById(\"homeworld-content\").appendChild(closeButton);\n\n // displays world;\n document.getElementById('sw-app').classList.add('world-displayed');\n\n document.getElementById('sw-world').classList.add('active');\n}", "function disp_info(d) {\n //console.log(d);\n materialInfo.html(getMaterialInfo(d))\n .attr(\"class\", \"panel_on\");\n }", "function updateInformation(obj){\r\n $('#summary-information .inner')\r\n .empty()\r\n .append($('<p>').html('Current zoom: ' + obj.zoomLevel + ', style type: ' + obj.styleType))\r\n }", "function setLocation(){\n $(\"#currentLocation\").text(city + \", \" + state + \" - \" + zipcode);\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 }", "function displayCurrentInfo(cityName){\n var api = \"96428242b049309d31d51b7cb823fae0\";\n var queryURL = \"https://api.openweathermap.org/data/2.5/weather?q=\"+ cityName +\"&appid=\" + api;\n \n $.ajax({\n url: queryURL,\n method: \"GET\"\n }).then(function(response) {\n var iconCode = response.weather[0].icon;\n var iconurl = \"http://openweathermap.org/img/w/\" + iconCode + \".png\";\n var addIcon = $(\"<img>\").attr(\"src\", iconurl);\n var tempF = ((response.main.temp - 273.15) * 1.80 + 32).toFixed(1);\n \n $(\".city\").text(response.name +\" (\"+date +\")\")\n $(\".city\").append(addIcon); \n $(\".temperature\").text(\"Temperature: \" + tempF + \" °F\"); \n $(\".humidity\").text(\"Humidity: \"+ response.main.humidity + \"%\");\n $(\".wind-speed\").text(\"Wind speed: \"+ response.wind.speed + \"MPH\"); \n\n //get city coordinate\n var lat = response.coord.lat;\n var lon = response.coord.lon;\n\n //function to findout the UV index of city based on its coordinate using closure\n var uvIndex = function(lat, lon){\n var UVqueryURL = \"http://api.openweathermap.org/data/2.5/uvi?appid=\"+ api +\"&lat=\"+ lat +\"&lon=\"+ lon;\n $.ajax({\n url: UVqueryURL,\n method: \"GET\"\n }).then(function(response) {\n console.log(response)\n var uvValue = response.value;\n var uvSafety = $(\"<span>\").attr(\"id\", \"uvSafety\").addClass(\"badge\");\n uvSafety.text(uvValue);\n if (uvValue <= 2){\n uvSafety.addClass(\"favorable\");\n }else if (uvValue >=3 && uvValue <=7){\n uvSafety.addClass(\"moderate\");\n }else{\n uvSafety.addClass(\"severe\");\n }\n $(\".uv-index\").text(\"UV Index: \" );\n $(\".uv-index\").append(uvSafety);\n })\n }\n //call uvIndex function using closure\n uvIndex(lat,lon);\n \n })\n }", "function updateMap(worldcupData) {\n\n //Clear any previous selections;\n clearMap();\n\n // ******* TODO: PART V *******\n\n // Add a marker for the winner and runner up to the map.\n\n //Hint: remember we have a conveniently labeled class called .winner\n // as well as a .silver. These have styling attributes for the two\n //markers.\n\n var index = 0;\n for (var i = 0; i < allWorldCupData.length; i++) {\n\n if (worldcupData == allWorldCupData[i].year) {\n index = i;\n break;\n }\n }\n\n //Select the host country and change it's color accordingly.\n\n // Winner ??? perché non stampa i cerchi?\n var coordinates = projection([allWorldCupData[index].win_pos[0], allWorldCupData[index].win_pos[1]]);\n d3.select(\"#points\")\n .append(\"circle\")\n .attr(\"cx\", coordinates[0])\n .attr(\"cy\", coordinates[1])\n .attr(\"r\", 8)\n .attr(\"class\", 'gold');\n\n // Silver\n var coordinates = projection([allWorldCupData[index].ru_pos[0], allWorldCupData[index].ru_pos[1]]);\n d3.select(\"#points\")\n .append(\"circle\")\n .attr(\"cx\", coordinates[0])\n .attr(\"cy\", coordinates[1])\n .attr(\"r\", 8)\n .attr(\"class\", 'silver');\n\n\n document.getElementById(allWorldCupData[index].host_country_code).setAttribute(\"class\", 'host');\n\n //Iterate through all participating teams and change their color as well.\n\n for (var i = 0; i < allWorldCupData[index].teams_iso.length; i++)\n document.getElementById(allWorldCupData[index].teams_iso[i]).setAttribute(\"class\", 'team');\n\n\n //We strongly suggest using classes to style the selected countries.\n\n\n\n}", "function viewDataNew() {\n cleanScreenOfChampions();\n showChampions(dataChampions);\n}", "updateTextDescription(activeCountry, activeYear) {\n // ******* TODO: PART 4 *******\n // Update the text elements in the infoBox to reflect:\n // Selected country, region, population and stats associated with the country.\n /*\n * You will need to get an array of the values for each category in your data object\n * hint: you can do this by using Object.values(this.data)\n * you will then need to filter just the activeCountry data from each array\n * you will then pass the data as paramters to make an InfoBoxData object for each category\n *\n */\n\n //TODO - your code goes here -\n }", "function updateLocation() {\n \"use strict\";\n\n var location = g.player.location;\n $(\"title\").text(location.name);\n $(\"#location-header\").text(location.name);\n $(\"#location-description1\").text(location.descA);\n $(\"#location-description2\").text(location.descB);\n}", "function renderCityInfo(lat, lon) {\n var weatherURL3 =\n \"https://api.openweathermap.org/data/2.5/onecall?lat=\" +\n lat +\n \"&lon=\" +\n lon +\n \"&units=imperial&appid=\" +\n apiKey;\n\n $.ajax({\n url: weatherURL3,\n method: \"GET\",\n }).then(function (response) {\n // render city name, date, weather icon, the temperature, the humidity, the wind speed, and ..\n $(\"#temperature\").text(`Temperature: ${response.current.temp} \\xB0F`);\n $(\"#humidity\").text(`Humidity: ${response.current.humidity}%`);\n $(\"#wind-speed\").text(`Wind Speed: ${response.current.wind_speed} MPH`);\n $(\"#uv-index\").text(`UV Index: `);\n\n // UV index with a color that indicates whether the conditions\n var uviSpan = $(\"<span>\");\n uviSpan.text(`${response.current.uvi}`);\n \n var uvi = response.current.uvi;\n if (uvi <= 2) {\n uviSpan.addClass(\"badge badge-success\");\n } else if (uvi <= 5) {\n uviSpan.addClass(\"badge badge-warning\");\n } else if (uvi <= 7) {\n uviSpan.addClass(\"badge\");\n uviSpan.css(\"background-color\", \"orange\");\n } else if (uvi <= 9) {\n uviSpan.addClass(\"badge badge-danger\");\n } else {\n uviSpan.addClass(\"badge\");\n uviSpan.css(\"background-color\", \"rebeccapurple\");\n uviSpan.css(\"color\", \"white\");\n }\n $(\"#uv-index\").append(uviSpan);\n\n \n cityForecast(response);\n });\n}", "function displayRefresh(argument) {\n\n $(\"#city\").html(cityName);\n if (updatedWeather) {\n $(\"#country\").html(countryName);\n } else {\n $(\"#country\").html(regionName + \" , \" + countryName);\n }\n\n $(\"#temperature\").html(temperature);\n $(\"#degreeSymbol\").html(\"&deg;\" + tempSymbol);\n $(\"#conditions\").html(currentWeather);\n $(\"#winds\").html(\"Winds \" + windDirection + \" \" + windSpeed + \" \" + windSymbol);\n $(\"#pressure\").html(\"Barometric Pressure: \" + pressure + \" \" + pressureSymbol);\n $(\"#humidity\").html(\"Humidity: \" + humidity + \"%\");\n $(\"#sunrise\").html(\"Sunrise at \" + sunrise);\n $(\"#sunset\").html(\"Sunset at \" + sunset);\n\n }", "showInfo() {\n let venusInfo;\n if (!this.visible) {\n if(scorebox.score >= this.totalStars) {\n push();\n // Venus infos\n venusInfo = createGraphics(280, 250);\n venusInfo.fill(green.r, green.g, green.b);\n venusInfo.background(20, 220);\n venusInfo.textSize(10);\n venusInfo.textFont(globalFont);\n venusInfo.textAlign(LEFT);\n venusInfo.text(this.info, 10, 20, 260, 250);\n texture(venusInfo);\n\n // Calling the superclass Planet.js' showInfo method\n super.showInfo();\n pop();\n }\n }\n }", "function updateInfoSecMenu(obj){\n clickMenuInfo1(obj.objInfoView.base);\n clickMenuInfo2(obj.objInfoView.category);\n mainData.infoSections[currentPanel][objInfoView.base][objInfoView.category] = obj.objBaseInfo;\n }", "function displayCurrent() {\n\n\t\t\tlet temp = '<p>' + 'It is ' + '<strong>' + data.cities[city].current[0].temp + '&deg;' + '</strong>' + ' outside now' + '</p>';\n\t\t\tlet condition = '<p>' + 'The condition is: ' + '<strong>' + data.cities[city].current[0].condition + '</strong>' + '</p>';\n\n\t\t\tif (data.cities[city].current[0].condition == 'Sunny') {\n\t\t\t\tcurrentDiv.innerHTML = temp + condition;\n\t\t\t\tcurrentDiv.classList.add('sunny');\n\t\t\t} else if (data.cities[city].current[0].condition == 'Cloudy') {\n\t\t\t\tcurrentDiv.innerHTML = temp + condition;\n\t\t\t\tcurrentDiv.classList.add('cloudy-h');\n\t\t\t} else if (data.cities[city].current[0].condition == 'Rainy') {\n\t\t\t\tcurrentDiv.innerHTML = temp + condition;\n\t\t\t\tcurrentDiv.classList.add('rainy');\n\t\t\t} else if (data.cities[city].current[0].condition == 'Partly Sunny') {\n\t\t\t\tcurrentDiv.innerHTML = temp + condition;\n\t\t\t\tcurrentDiv.classList.add('partly-sunny');\n\t\t\t} else if (data.cities[city].current[0].condition == 'Partly Cloudy') {\n\t\t\t\tcurrentDiv.innerHTML = temp + condition;\n\t\t\t\tcurrentDiv.classList.add('partly-cloudy');\n\t\t\t} else {\n\t\t\t\tcurrentDiv.innerHTML = temp + condition;\n\t\t\t}\n\n\t\t\t//darkmode\n\t\t\tlet nyTime = new Date().toLocaleString(\"en-US\", {timeZone: \"America/New_York\"});\n\t\t\tnyTime = new Date(nyTime);\n\t\t\tlet hours = nyTime.getHours();\n\t\t\tif (hours >= 20 || hours <= 7 && data.cities[city].current[0].condition !== 'Cloudy') {\n\t\t\t\tbody.classList.add('darkmode');\n\t\t\t\tcondition = '<p>The condition is: <strong>Nighttime / Clear</strong></p>';\n\t\t\t\tcurrentDiv.innerHTML = temp + condition;\n\t\t\t\tcurrentDiv.classList.add('nighttime');\n\t\t\t} else if (hours <= 20 && hours >= 7 && data.cities[city].current[0].condition == 'Cloudy') {\n\t\t\t\tbody.classList.add('cloudy');\n\t\t\t} else if (hours <= 20 && hours >= 7 && data.cities[city].current[0].condition !== 'Cloudy') {\n\t\t\t\tbody.classList.add('day');\n\t\t\t}\n\t\t}", "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 }", "function hideInfo() {\n $('#click-info').html(\"Click on the map to select an area.\");\n }", "function showCurrentWeatherCondiditons(currentWeatherResponse, currentWeatherUVResponse) {\n var cityName = \"\"; // The name of the city\n var dateString = \"\"; // The current date, in M/D/YYYY format\n var currentWeatherIconURL = \"\"; // The URL for the icon that corresponds to the current weather\n\n // Clear any current weather conditions\n $(\"#current-temperature-result\").empty();\n\n // Get the city name, date, and weather icon for the top of the page\n cityName = currentWeatherResponse.name;\n\n // Make current date string\n dateString = moment().format(\"M/D/YYYY\");\n\n // Get the URL for the icon that corresponds to the current weather\n if ((currentWeatherResponse.weather) && (currentWeatherResponse.weather.length > 0)) {\n currentWeatherIconURL = \"http://openweathermap.org/img/wn/\" + currentWeatherResponse.weather[0].icon + \".png\";\n }\n\n // Create a div for the city name, date, and condition icon\n // var cityNameDiv = $(\"<div>\");\n var cityNameDateWeatherSpan = $(\"<span>\");\n cityNameDateWeatherSpan.text(cityName + \" (\" + dateString + \") \");\n\n if (currentWeatherIconURL) {\n var currentWeatherIconImg = $(\"<img>\");\n currentWeatherIconImg.attr(\"src\", currentWeatherIconURL);\n cityNameDateWeatherSpan.append(currentWeatherIconImg);\n }\n\n $(\"#current-temperature-result\").append(cityNameDateWeatherSpan);\n\n // Add temp\n $(\"#current-temperature-result\").append(\"<p>Temperature: \" + currentWeatherResponse.main.temp.toFixed(1) + \" °F</p>\");\n\n // Add humidity\n $(\"#current-temperature-result\").append(\"<p>Humidity: \" + currentWeatherResponse.main.humidity + \"%</p>\");\n\n // Add wind speed\n $(\"#current-temperature-result\").append(\"<p>Wind Speed: \" + currentWeatherResponse.wind.speed.toFixed(1) + \" MPH</p>\");\n\n // Add UV index\n $(\"#current-temperature-result\").append(\"<p>UV Index: \" + currentWeatherUVResponse.value + \"</p\");\n }", "function displayCurrentCity(cityName, response) {\n\n resultCityEl.text(cityName.toUpperCase());\n var currentDate = moment().format(\" (M/D/YYYY) \");\n\n var currentFah = ((response.main.temp - 273.15) * 9 / 5 + 32).toFixed(1);\n var currentCel = (response.main.temp - 273.15).toFixed(1);\n\n var currentHumidity = response.main.humidity;\n var currentWind = ((response.wind.speed) * 2.237).toFixed(1);\n var currentDesc = response.weather[0].description;\n $('#date').text(currentDate);\n resultTempEl.text(\"Temperature: \");\n\n// calling the function to toggle with fahreneit and celcius\n fahOrCelcius(currentFah,currentCel);\n\n fahreneitEl.text(\" ℉\");\n $('#slash').text(\" / \");\n celciusEl.text(\"°C\");\n resultHumEl.text(\"Humidity: \" + currentHumidity + \"%\");\n resultWindEl.text(\"Wind Speed: \" + currentWind + \" MPH\");\n resultDescEl.text(\"Description: \" + capFirstLetter(currentDesc));\n weatherImageTitleEl.attr(\"src\", \"https://openweathermap.org/img/w/\" + response.weather[0].icon + \".png\");\n\n}", "function updateScreenOnFooter(oCase) {\r\n\t$(\"#screen\").html(\"<b>Screen:</b><i>\"+oCase.stage.name+\"</i>\");\r\n}", "function enterLayer(){\n this.setStyle({ weight: 2, opacity: 1 });\n\n let country = this.feature.properties.name;\n // method that we will use to update the tooltip feature\n info.update = function () {\n this._div.innerHTML = country + ' <br/> ' + \"2000 Sufficiency\" + ': ' + fmtn(mapLookup.get(country)) + \"%\";\n };\n info.addTo(map0);\n }", "function updateTopPanel() {\n let isPlayer = g_ViewedPlayer > 0;\n\n let civIcon = Engine.GetGUIObjectByName(\"civIcon\");\n civIcon.hidden = !isPlayer;\n if (isPlayer) {\n civIcon.sprite =\n \"stretched:\" + g_CivData[g_Players[g_ViewedPlayer].civ].Emblem;\n Engine.GetGUIObjectByName(\"civIconOverlay\").tooltip = sprintf(\n translate(\n \"%(civ)s\\n%(hotkey_civinfo)s / %(hotkey_structree)s: View History / Structure Tree\\nLast opened will be reopened on click.\"\n ),\n {\n civ: setStringTags(g_CivData[g_Players[g_ViewedPlayer].civ].Name, {\n font: \"sans-bold-stroke-14\"\n }),\n hotkey_civinfo: colorizeHotkey(\"%(hotkey)s\", \"civinfo\"),\n hotkey_structree: colorizeHotkey(\"%(hotkey)s\", \"structree\")\n }\n );\n }\n\n // Following gaia can be interesting on scripted maps\n Engine.GetGUIObjectByName(\"optionFollowPlayer\").hidden =\n !g_IsObserver || g_ViewedPlayer == -1;\n\n let viewPlayer = Engine.GetGUIObjectByName(\"viewPlayer\");\n viewPlayer.hidden = !g_IsObserver && !g_DevSettings.changePerspective;\n\n let followPlayerLabel = Engine.GetGUIObjectByName(\"followPlayerLabel\");\n followPlayerLabel.hidden =\n Engine.GetTextWidth(\n followPlayerLabel.font,\n followPlayerLabel.caption + \" \"\n ) +\n followPlayerLabel.getComputedSize().left >\n viewPlayer.getComputedSize().left;\n\n let resCodes = g_ResourceData.GetCodes();\n let resNames = g_ResourceData.GetNames();\n Engine.GetGUIObjectByName(\"resourceFood\").hidden = true;\n let r = 0;\n for (let res of resCodes) {\n if (!Engine.GetGUIObjectByName(\"resource[\" + r + \"]\")) {\n warn(\n \"Current GUI limits prevent displaying more than \" +\n r +\n \" resources in the top panel!\"\n );\n break;\n }\n Engine.GetGUIObjectByName(\"resource[\" + r + \"]_icon\").sprite =\n \"stretched:session/icons/resources/\" + res + \".png\";\n Engine.GetGUIObjectByName(\"resource[\" + r + \"]\").hidden = !isPlayer;\n if (res == \"food\") {\n Engine.GetGUIObjectByName(\"resource[\" + r + \"]\").onPress = function() {\n // we toogle the subresources panel\n let subResourcePanelVisibility = Engine.GetGUIObjectByName(\n \"resourceFood\"\n ).hidden;\n subResourcePanelVisibility = !subResourcePanelVisibility;\n Engine.GetGUIObjectByName(\n \"resourceFood\"\n ).hidden = subResourcePanelVisibility;\n };\n }\n ++r;\n }\n let arySub = [];\n let arySub2 = [];\n for (let res2 in resNames) {\n arySub.push(res2);\n }\n arySub.forEach(name => {\n if (\n name !== \"stone\" &&\n name !== \"wood\" &&\n name !== \"metal\" &&\n name !== \"rock\" &&\n name !== \"ruins\" &&\n name !== \"tree\" &&\n name !== \"food\" &&\n name !== \"ore\" &&\n name !== \"money\" &&\n name !== \"well\"\n ) {\n arySub2.push(name);\n }\n });\n let r2 = 0;\n for (let res of arySub2) {\n //error(res);\n Engine.GetGUIObjectByName(\"resourceFood[\" + r2 + \"]_icon\").sprite =\n \"stretched:session/icons/resources/\" + res + \".png\";\n Engine.GetGUIObjectByName(\"resourceFood[\" + r2 + \"]\").hidden = false;\n ++r2;\n }\n function horizontallySpaceObjectsCustom(parentName, margin = 0) {\n let objects = Engine.GetGUIObjectByName(parentName).children;\n let numb = 0;\n\n for (let i = 0; i < objects.length; ++i) {\n if (i == 0 || i == 1) continue;\n numb += 75;\n let size = objects[i].size;\n let width = size.right - size.left;\n\n size.left = numb;\n size.right = 1000;\n objects[i].size = size;\n }\n }\n\n horizontallySpaceObjects(\"resourceCounts\", 5);\n\n horizontallySpaceObjectsCustom(\"resourceFood\");\n\n hideRemaining(\"resourceCounts\", r);\n\n let resPop = Engine.GetGUIObjectByName(\"population\");\n let resPopSize = resPop.size;\n resPopSize.left = Engine.GetGUIObjectByName(\n \"resource[\" + (r - 1) + \"]\"\n ).size.right;\n resPop.size = resPopSize;\n\n Engine.GetGUIObjectByName(\"population\").hidden = !isPlayer;\n Engine.GetGUIObjectByName(\"diplomacyButton\").hidden = !isPlayer;\n Engine.GetGUIObjectByName(\"economyButton\").hidden = !isPlayer;\n //Engine.GetGUIObjectByName(\"economyButton\").hidden = !isPlayer;\n Engine.GetGUIObjectByName(\"observerText\").hidden = isPlayer;\n\n let alphaLabel = Engine.GetGUIObjectByName(\"alphaLabel\");\n alphaLabel.hidden = isPlayer && !viewPlayer.hidden;\n alphaLabel.size = isPlayer ? \"50%+44 0 100%-283 100%\" : \"155 0 85%-279 100%\";\n\n Engine.GetGUIObjectByName(\"pauseButton\").enabled =\n !g_IsObserver || !g_IsNetworked || g_IsController;\n Engine.GetGUIObjectByName(\"menuResignButton\").enabled = !g_IsObserver;\n Engine.GetGUIObjectByName(\"lobbyButton\").enabled = Engine.HasXmppClient();\n}", "additionalContent() {\n let info = this.state.data.info;\n return (\n <div key=\"inside_components\" id=\"inside-contents\"> \n <City key={guidGenerator()} name={info.current_observation.display_location.full} />\n <InfoBox key=\"infoBoxDiv\" data_obv={info.current_observation} metricState={this.state.metric} />\n </div>\n )\n }", "function showPanel(placeResult) {\n // If infoPane is already open, close it\n clearExsiting();\n // Clear the previous details\n infoPane.style.backgroundColor = \"#f29900\";\n if (placeResult.photos) {\n let firstPhoto = placeResult.photos[0];\n let photo = document.createElement('img');\n photo.classList.add('hero');\n photo.style.width = \"100%\";\n photo.style.height = \"250px\";\n photo.style.borderRadius = \"25px\";\n photo.style.alignSelf = \"center\";\n photo.src = firstPhoto.getUrl();\n infoPane.appendChild(photo);\n }\n\n //calculate current day of week \n var d = new Date();\n var n = d.getDay();\n console.log(\"current day : \" + n);\n //getDay counts Sunday as 0 and Saturday as 6, whereas Google Map Places Details counts Monday as 0 and Sunday as 6\n // subtracting 1 is necessary to grab current day's operating hours from the API\n n = n - 1;\n if (n < 0){\n n = 6;\n }\n // Add place details with text formatting\n let name = document.createElement('p');\n let isOpen = document.createElement('p');\n let hours = document.createElement('p');\n name.classList.add('place');\n name.textContent = placeResult.name;\n \n if (placeResult.rating) {\n name.textContent += ` \\u272e${placeResult.rating}`;\n }\n if (placeResult.opening_hours.open_now){\n isOpen.textContent = \"Open\";\n isOpen.style.color = \"#2FC80D\";\n }\n else {\n isOpen.textContent = \"Closed at this moment\";\n isOpen.style.color = \"red\";\n }\n isOpen.style.fontWeight = \"bold\";\n isOpen.classList.add('details');\n hours.classList.add('details');\n hours.textContent = placeResult.opening_hours.weekday_text[n];\n\n infoPane.appendChild(name);\n infoPane.appendChild(isOpen);\n infoPane.appendChild(hours);\n if (placeResult.website) {\n let websitePara = document.createElement('p');\n let websiteLink = document.createElement('a');\n let websiteUrl = document.createTextNode(placeResult.website);\n websiteLink.appendChild(websiteUrl);\n websiteLink.title = placeResult.website;\n websiteLink.href = placeResult.website;\n websitePara.appendChild(websiteLink);\n infoPane.appendChild(websitePara);\n }\n// create a list of 5 reviews in the 'reviewbox' html element\n document.getElementById('reviewbox').style.backgroundColor = \"#2FC80D\";\n placeResult.reviews.forEach(review => {\n let rdetail = document.createElement('div');\n let author = document.createElement('p');\n let rateNtime = document.createElement('p');\n let user_text = document.createElement('p');\n let user_rating = \"\";\n let time = review.relative_time_description;\n\n for(var i = 0; i < review.rating ; i++){\n user_rating += \"\\u272e\";\n }\n author.textContent = review.author_name;\n author.style.marginTop = \"8px\";\n author.style.fontWeight = \"bold\";\n author.style.fontSize = \"15px\";\n rateNtime.textContent = user_rating + \" || \" + time;\n rateNtime.style.marginBottom = \"0px\";\n user_text.textContent = review.text;\n user_text.style.marginTop = \"0px\";\n rdetail.appendChild(author);\n rdetail.appendChild(rateNtime);\n rdetail.appendChild(user_text);\n\n reviewList.appendChild(rdetail);\n\n });\n }", "function showAll(){\n if(map.hasLayer(recreationLocations)){\n map.removeLayer(recreationLocations);\n };\n // Get CARTO selection as GeoJSON and Add to Map\n $.getJSON(\"https://\"+cartoDBUserName+\".carto.com/api/v2/sql?format=GeoJSON&q=\"+sqlQuery, function(data) {\n recreationLocations = L.geoJson(data,{\n onEachFeature: function (feature, layer) {\n layer.bindPopup('<p><b>' + feature.properties.recareanam + '</b><br /><em>' + feature.properties.parentacti + '</em></p>');\n layer.cartodb_id=feature.properties.cartodb_id;\n }\n }).addTo(map);\n });\n}", "function initiatedDisplay(){\n $('header').addClass('position-top');\n $('.form-section').html('');\n $('.options').delay(1000).fadeIn(1000);\n $('header p, .description-prompt, footer').fadeOut();\n $('header h1').html(`<span style=\"font-size:.7em;\">${state.ajax.near}</span><br /><span class=\"js-search\">Search New Location</span>`);\n $('header h1').addClass('point');\n }", "function showCoords() {\n // TODO: Set the map center to the latitude / longitude position of your own home\n\n\n // TODO: Zoom the map close enough\n\n}", "function showInformation() {\n information.style.display='block';\n events.style.display='none';\n sights.style.display='none';\n informationButton.className = 'categoryButton selected material-icons';\n eventsButton.className = 'categoryButton material-icons';\n sightsButton.className = 'categoryButton material-icons';\n}", "function currentweatherPopulate() {\n\n let city = currentDay.name;\n let temp = tempConvertor(currentDay.main.temp);\n let humid = currentDay.main.humidity;\n let wind = currentDay.wind.speed;\n let icon = currentDay.weather[0].icon;\n let date = moment.unix(currentDay.dt).format('MMMM Do YYYY');\n\n $(`.city`).text(city);\n $(`.current-date`).text(date);\n $(`.current-temp`).html(`${temp}&#176;`);\n $(`.current-humidity`).html(`${humid}&#37;`);\n $(`.current-wind`).html(`${wind} MPH`);\n $(`.current-icon`).attr(`src`, `${iconURL}${icon}@2x.png`);\n }", "update(info) {\n this.setLandingInfoDisplayed(info.closestPlanetDistance < GameConfig.SHOW_LANDING_INFO);\n\n this.topLeftUI.update(info);\n if (info.uiMessage) {\n this.message.setMessage(info.uiMessage);\n this.message.setVisible(true);\n }\n\n _.each(this.indicators, (indicator) => {\n indicator.update(getIndicatorPos(indicator, 700, 500, info.rocket), distancePoints(indicator.point, info.rocket));\n });\n }", "function showOverviewMap() {\r\n $('.county-container').addClass('hide');\r\n $('#mapBusyPanel').addClass('hide');\r\n $('.overview-container').removeClass('hide');\r\n removePreviousAvenzaViewer();\r\n}", "function optionChanged(selectedCounty) {\n // Clear out the previous scounty's metadata from the body of the card \n var oldMetadata = d3.selectAll(\".metadata-fields\");\n oldMetadata.remove();\n\n // Build the Charts\n BuildCharts(selectedCounty);\n}", "function dispInfoModal(vid){\n document.getElementById('infoModal').style.display='block';\n mapspecific.resize();\n mapspecific.flyTo({\n center: trucks[0].pos\n });\n getTruckColSpec();\n showTruckDetailsSpec(vid, \"mapspecific\");\n showRoute(trucks[vid], \"mapspecific\");\n}", "function showWeather() {\r\n // remove loader\r\n clearLoader();\r\n\r\n // update state\r\n state.lastUpdate = Date.now();\r\n\r\n // render elements\r\n renderElements();\r\n\r\n // time\r\n state.intervalID = setInterval(updateTime, 1000);\r\n}", "function clearInfo(){\n\t\t$spanInfo.html(\"\");\n\t\t$dropDownPeople.html(\"\");\n\t\t$dropDownPlanets.html(\"\");\n\t\t$dropDownStarships.html(\"\");\n\t\t$dropDownSpecies.html(\"\");\n\t\t$dropDownVehicles.html(\"\");\n\t\t$dropDownFilms.html(\"\");\n\t\t$errorLoadingAPI.html(\"\");\n\t}", "function showLocationCard() {\n dispatch(showLocation());\n dispatch(setMouseCoordinates(mousePosition));\n dispatch(setLocationData(data));\n }", "function populateInformationModal() {\n\t// add text to the label\n\tvar category = allViews[activeView];\n\t// trim the heading \"TissueSpecific\" if necessary\n\tif (category.substr(0,14) == \"TissueSpecific\") {\n\t\tcategory = category.substr(14);\n\t}\n\t$('#informationLabel').text(category+\" Information\"); \n\t\n\t// now put info text in body\n\t$('#informationBody').html(allInfoFiles[activeView]);\n\t\n}", "onClickInfo() {\n if(!User.current.isAdmin) { return; }\n \n let infoEditor = new InfoEditor({ projectId: this.model.id });\n\n infoEditor.on('change', (newInfo) => {\n this.model.settings.info = newInfo;\n\n this.fetch();\n });\n }", "function CurrentData(cityName, lat, lon) {\n var url2 = \"https://api.openweathermap.org/data/2.5/onecall?lat=\" + lat + \"&lon=\" + lon + \"&appid=\" + apiKey + \"&units=imperial\";\n fetch(url2)\n .then(function (response) {\n if (response.ok) {\n response.json().then(function (data) {\n var curCity = cityName;\n var curDate = (new Date(data.current.dt * 1000)).toShortDate();\n var curIcon = \"https://openweathermap.org/img/wn/\" + data.current.weather[0].icon + \".png\";\n var curTemp = data.current.temp;\n var curWind = data.current.wind_speed;\n var curHumidity = data.current.humidity;\n var curUvi = data.current.uvi;\n\n currentCityEl.text(curCity);\n currentDateEl.text(curDate);\n currentIconEl.attr(\"src\", curIcon);\n currentTempEl.html(\"Temp: \" + curTemp + \" &deg;F\");\n currentWindEl.text(\"Wind: \" + curWind + \" MPH\");\n currentHumidityEl.text(\"Humidity: \" + curHumidity + \" %\");\n currentUviEl.html('UV Index: <span style=\"background-color:' + uviColor(curUvi) + '\">' + curUvi + '</span>');\n })\n }\n })\n}", "function updateInfo(e) {\n var marker = e.target;\n info.update(marker.valueOf().options);\n }", "static displayInfoPanel(panel, data) {\n // Updatte and display panel\n LibrariesMap.updatePanel(panel, data);\n panel.style(\"display\", \"block\");\n // Update pie charts\n LibrariesMap.updatePieCharts(panel, data);\n }", "showInfo() {\n let saturnInfo;\n if (!this.visible) {\n if(scorebox.score >= this.totalStars) {\n push();\n // Saturn infos\n saturnInfo = createGraphics(280, 250);\n saturnInfo.fill(green.r, green.g, green.b);\n saturnInfo.background(20, 220);\n saturnInfo.textSize(10);\n saturnInfo.textFont(globalFont);\n saturnInfo.textAlign(LEFT);\n saturnInfo.text(this.info, 10, 20, 260, 250);\n texture(saturnInfo);\n\n // Calling the superclass Planet.js' showInfo method\n super.showInfo();\n pop();\n }\n }\n }", "function showPosition3D(currentLat, currentLong, currentCity) {\n // console.log(\"currentLat, currentLong, currentCity:\", currentLat, currentLong, currentCity);\n let entity3 = viewer.entities.add({\n label: {\n show: true,\n showBackground: true,\n font: \"15px Open Sans sans-serif\",\n horizontalOrigin: Cesium.HorizontalOrigin.LEFT,\n verticalOrigin: Cesium.VerticalOrigin.CENTER,\n pixelOffset: new Cesium.Cartesian2(15, 0),\n backgroundColor: Cesium.Color.WHITESMOKE,\n fillColor: Cesium.Color.PURPLE,\n style: Cesium.LabelStyle.FILL,\n },\n position: Cesium.Cartesian3.fromDegrees(currentLong, currentLat),\n point: {pixelSize: 8, color: Cesium.Color.RED},\n });\n entity3.label.show = true;\n entity3.label.text = `You are here in: ${currentCity}`;\n}", "function showClue(clickedId){\n var clueIndex = clickedId.replace('show-clue-', '');\n $.ajax({\n url: Url + '/clues/' + clueIDArray[clueIndex], //grab clue of the index number\n type: 'GET',\n success: function(response){\n var returnedData = JSON.parse(response);\n currClueIndex = clueIndex;\n currClueDescription = returnedData['description'];\n currClueCoords = JSON.parse(returnedData['gps coordinates']);\n //push curr coords and description\n clueDescriptionArray.push(currClueDescription);\n clueCoordsArray.push(currClueCoords);\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(\n (position) => {\n const pos = {\n lat: position.coords.latitude,\n lng: position.coords.longitude,\n };\n var popUpClue = new google.maps.InfoWindow({\n content: currClueDescription,\n position: pos,\n });\n popUpClue.open(map);\n });\n }\n $('#' + clickedId).hide();\n $('#clue-distance-button').show();\n },\n error: function(){\n alert('There was an error with show clue button get request')\n //window.location.href = '/'\n }\n })\n}", "function updateUI() {\n updatePlayerComponents(['points', 'teenagers', 'kettles', 'theaters', 'cps'])\n updatePriceComponents(['teenagers', 'kettles', 'theaters'])\n updateDoublePowerButton()\n}", "function changeMapDisplay(){\n $('.map-display-buttons').click(function() {\n // disable the selected button color\n // $('.map-display-buttons a').addClass('disabled');\n $('.map-display-buttons').addClass('disabled');\n // get the name of the selected feature\n var sel = $(this).text().toUpperCase().trim();\n // turn on the selected button color\n // $('a', this).toggleClass('disabled');\n $(this).toggleClass('disabled');\n console.log(\"the map option selected: \", sel);\n // change the map based on the button selected\n if (sel == \"CLIMATE\") {\n el.data_layer.setCartoCSS(el.bec_cartocss[el.selected_unit]);\n } else if (sel == \"BEC UNIT\") {\n el.data_layer.setCartoCSS(el.bec_cartocss.unit);\n } else if (sel == \"BEC ZONE\") {\n el.data_layer.setCartoCSS(el.bec_cartocss.zone);\n };\n });\n }", "function updateMap() {\n\t\n\tvar sel_option = $(\"input[name=dataDisplayOption]:checked\").val();\n\t\n\t// ignore func call if the setting was not changed\n\tif (sel_option == c_display_option) { return; }\n\t\n\t// clear the map of the old overlays\n\tclearMap();\n\t\n\t// save the new display option\n\tc_display_option = sel_option;\n\t\n\t// plot the data all over again\n\tplotAllData();\n\t\n}", "function updateAttribution(e) {\n $.each(map._layers, function(index, layer) {\n if (layer.getAttribution) {\n $(\"#attribution\").html((layer.getAttribution()));\n }\n });\n}", "function show(data) {\n document.getElementByClassName(\"location-timezone\").innerHTML = data.name;\n document.getElementByClassName(\"temperature-degree\").innerHTML = data.main.temp;\n document.getElementByClassName(\"temperature-description\").innerHTML = data.weather.description;\n}", "function setInfobox(props){\r\n \r\n var infoValue, i = infoValue = 0;\r\n do {\r\n var infoValue = parseFloat(props[expressed]).toFixed(i);\r\n i++;\r\n }\r\n while (infoValue <= 0);\r\n \r\n if (isNaN(infoValue)) {\r\n var infoValue, infoAcres = infoValue = 0;\r\n } else {\r\n var infoValue = comma(parseFloat(props[expressed]).toFixed(i));\r\n var infoAcres = comma(props[displayed]);\r\n }\r\n\r\n var infoDesc2 = \"Acreage \" + drop2Choice;\r\n var infoDesc1 = \"Total Acreage of \" + drop1Choice;\r\n \r\n //label content\r\n var infoAttribute1 = '<h2><span id=\"inf\">' + infoDesc1 + ': </span> ' + infoAcres + '</h2>';\r\n var infoAttribute2 = '<h2><span id=\"inf\">' + infoDesc2 + ': </span> ' + infoValue + '</h2>';\r\n var stateName = '<h2>' + props.geo_name + '</h2>';\r\n \r\n //create info label div\r\n var infolabel = d3.select(\"body\")\r\n .append(\"div\")\r\n .attr(\"class\", \"infolabel\")\r\n .attr(\"id\", props.geo_id + \"_label\")\r\n .html(stateName);\r\n\r\n var stateName = infolabel.append(\"div\")\r\n .attr(\"class\", \"infogoo\")\r\n .html(infoAttribute1);\r\n var stateName = infolabel.append(\"div\")\r\n .attr(\"class\", \"infogoo\")\r\n .html(infoAttribute2);\r\n }", "function countryInfo(data) {\n\n document.getElementById(\"citiesPanel\").style.display = \"none\";\n\n var a = JSON.stringify(data)\n var b = JSON.parse(a)\n\n //Co-ords\n document.getElementById('countryNorth').value = b.geonames[0].north\n document.getElementById('countrySouth').value = b.geonames[0].south\n document.getElementById('countryEast').value = b.geonames[0].east\n document.getElementById('countryWest').value = b.geonames[0].west\n\n //Country Info \n document.getElementById('infoContinent').innerHTML = \"Continent: \" + b.geonames[0].continentName\n document.getElementById('infoSize').innerHTML = \"Area Size: \" + b.geonames[0].areaInSqKm\n document.getElementById('infoPopulation').innerHTML = \"Population: \" + b.geonames[0].population\n document.getElementById('infoCurrency').innerHTML = \"Currency: \" + b.geonames[0].currencyCode\n\n //References\n document.getElementById('RefgeonameId').value = b.geonames[0].geonameId\n document.getElementById('RefgeonameId').value = b.geonames[0].geonameId\n\n getLocationInfo();\n\n}", "function initializeCities ()\n{\n\tdocument.getElementById(\"cities\").innerHTML = \"\";\n\tfor ( var city in listOfCities )\n\t{\n\t\tvar checkmarkImg = \"checkmark.png\";\n\t\tif ( retina3 )\n\t\t\tcheckmarkImg = \"[email protected]\";\n\t\telse if ( retina )\n\t\t\tcheckmarkImg = \"[email protected]\";\n\t\tdocument.getElementById(\"cities\").innerHTML += \"<p onclick=\\\"javascript:setCurrentLocation('\" + city + \"');\\\">\" + listOfCities[city][\"displayName\"] + \" <span><img id=\\\"checkmark\" + city + \"\\\" src=\\\"./\" + checkmarkImg + \"\\\" style=\\\"width:12px;height:13px;display:none;\\\" /></span></p>\";\n\t}\n\n\tgbGetPreference ( \"location\" );\n\t//gbDidSuccessGetPreference('location', 'SF');\n}", "function showCityResult() {\n $('#city-boxes').removeClass('hide-city').addClass('show-city');\n}", "function update_map_canvas_full()\n{\n if (tiles != null && civclient_state >= C_S_RUNNING) {\n //var start = new Date().getTime();\n if (!sprites_init) init_cache_sprites();\n \n // If city dialog is open, don't redraw default mapview.\n if (active_city != null) return;\n \n if (!mapview_slide['active']) { \n update_map_canvas(0, 0, mapview['store_width'], mapview['store_height']);\n update_goto_path_lines(); \n check_request_goto_path();\n } else {\n update_map_slide();\n }\n\n last_redraw_time = new Date().getTime();\n \n }\n}", "function displayInfo(){\n \n\n fill(255);\n var lifeExpValue = lifeExp[int(inp.value())];\n var countryNameValue = countryNames[int(inp.value())];\n \n push();\n \n textSize(76);\n textAlign(CENTER);\n fill(255);\n stroke(0);\n strokeWeight(3);\n \n text(`${lifeExpValue}`, width/4 + 75, height/2 + 150);\n text(`${countryNameValue}`, width/4 + 75, height/2 + 250);\n \n pop();\n \n}", "function setCityAsContender(cityName, $target) {\n var city = getCityData(cityName); // get the JSON for the city selected\n $target.empty();\n $target.append(\n '<h2>' + city.name + '</h2>' +\n '<img src=\"' + city.gifUrl + '\" class=\"city-image\">' +\n getInfoTable([\n ['Average salary', '$' + numberWithCommas(city.averageSalary)],\n ['Number of jobs', numberWithCommas(city.numJobs)],\n ['Cost of living', getCleveIndexString(city.costOfLiving)]\n ]));\n addIndeedData(cityName, $target);\n // reconfigureScreen();\n}", "function showInfoWindow() { \n currentmarker = this;\n infoWindow.open(map, currentmarker);\n buildIWContent();\n\n}", "function displayWeatherInfo(obj) {\n\n var temp = obj.main.temp;\n $('.current-temp .temp').text(temp);\n\n var weatherIconId = obj.weather[0].icon;\n var weatherURL = \"http://openweathermap.org/img/w/\" +\n weatherIconId + \".png\";\n\n var weatherImg = \"<img src='\" + weatherURL + \"' class='icon-img'>\";\n $('.current-icon div').html(weatherImg);\n\n var city = obj.name\n $('.current-details header h2').text(city);\n\n var current = obj.weather[0].description;\n $('.toggle-info .current').text(current);\n\n var wind = obj.wind.speed;\n $('.current-details span[data-wind]').text(wind);\n\n var humidity = obj.main.humidity;\n $('.current-details span[data-humidity]').text(humidity);\n\n }", "function Info() {\n\t//Loads team editor scene\n\tApplication.LoadLevel(\"Info\");\n}", "function showDetails() {\n _('infoDiv').innerHTML = infoText;\n _('infoPanel').style.display = 'block';\n}", "function updateVals() {\n // Log the click on the info button.\n infoLogging();\n\n // Get info values.\n const currCoords = coords ? coords() : {lat: null, lng: null};\n const currPanoId = panoId ? panoId() : null;\n const currStreetEdgeId = streetEdgeId ? streetEdgeId() : null;\n const currRegionId = regionId ? regionId() : null;\n const currPov = pov ? pov() : {heading: 0, pitch: 0};\n const currLabelId = labelId ? labelId() : null;\n\n function changeVals(key, val) {\n if (!val) {\n val = 'No Info';\n } else if (key === \"latitude\" || key === 'longitude') {\n val = val.toFixed(8) + '°';\n }\n let valSpan = document.getElementById(`${key}-value`);\n valSpan.textContent = val;\n }\n changeVals('latitude', currCoords.lat);\n changeVals('longitude', currCoords.lng);\n changeVals('panorama-id', currPanoId);\n changeVals('street-id', currStreetEdgeId);\n changeVals('region-id', currRegionId);\n if (currLabelId) changeVals('label-id', currLabelId);\n\n // Create GSV link and log the click.\n let gsvLink = $('#gsv-link');\n gsvLink.attr('href', `https://www.google.com/maps/@?api=1&map_action=pano&viewpoint=${currCoords.lat}%2C${currCoords.lng}&heading=${currPov.heading}&pitch=${currPov.pitch}`);\n gsvLink.attr('target', '_blank');\n gsvLink.on('click', viewGSVLogging);\n\n // Position popover.\n let infoPopover = $('.popover');\n let infoRect = self.infoButton.getBoundingClientRect();\n let xpos = infoRect.x + (infoRect.width / 2) - (infoPopover.width() / 2);\n infoPopover.css('left', `${xpos}px`);\n\n // Copy to clipboard.\n $('#clipboard').on('click', function(e) {\n // Log the click on the copy to keyboard button.\n clipboardLogging();\n\n let clipboardText = `${i18next.t(`common:gsv-info.latitude`)}: ${currCoords.lat}°\\n` +\n `${i18next.t(`common:gsv-info.longitude`)}: ${currCoords.lng}°\\n` +\n `${i18next.t(`common:gsv-info.panorama-id`)}: ${currPanoId}\\n` +\n `${i18next.t(`common:gsv-info.street-id`)}: ${currStreetEdgeId}\\n` +\n `${i18next.t(`common:gsv-info.region-id`)}: ${currRegionId}\\n`;\n if (currLabelId) clipboardText += `${i18next.t(`common:gsv-info.label-id`)}: ${currLabelId}`;\n navigator.clipboard.writeText(clipboardText);\n\n // The clipboard popover will only show one time until you close and reopen the info button popover. I have\n // no idea why that's happening, but for some reason it works if you put it in a setTimeout. So I have a one\n // ms delay before showing the popover. Then it disappears after 1.5 seconds.\n setTimeout(function() {\n $(e.target).popover('show');\n setTimeout(function() {\n $(e.target).popover('hide');\n }, 1500);\n }, 1);\n });\n }", "function displayCurrentWeather(cityCoords, cityName) {\r\n const tempFigure = document.querySelector(\".current-temp\");\r\n const humidFigure = document.querySelector(\".current-humid\");\r\n const windSpeedFigure = document.querySelector(\".current-wind-speed\");\r\n const uvIndexFigure = document.querySelector(\".current-uv-index\");\r\n\r\n const cityLong = cityCoords[0].lon;\r\n const cityLat = cityCoords[0].lat;\r\n fetch(\r\n `https://api.openweathermap.org/data/2.5/onecall?lat=${cityLat}&lon=${cityLong}&appid=${apiKey}&units=metric`\r\n )\r\n .then((response) => {\r\n if (response.ok) return response.json();\r\n throw new Error(\"Try a Different city\");\r\n })\r\n .then((data) => {\r\n const errorParagraph = document.querySelector(\".error-paragraph\");\r\n if (errorParagraph) {\r\n errorParagraph.remove();\r\n }\r\n for (const child of currentCityForcast.children) {\r\n child.style.display = \"block\";\r\n }\r\n // console.log(data);\r\n checkLocal();\r\n const icon = document.querySelector(\".current-icon\");\r\n cityNameHeader.textContent = cityName.split(\",\")[0];\r\n windSpeedFigure.textContent = windSpeedFigure.textContent = `Wind Speed:${data.current.wind_speed}`;\r\n tempFigure.textContent = `Temperature:${data.current.temp}`;\r\n humidFigure.textContent = `Humidity:${data.current.humidity}%`;\r\n uvIndexFigure.textContent = `UV-Index:`;\r\n console.log;\r\n\r\n icon.src = `https://openweathermap.org/img/wn/${data.current.weather[0].icon}@2x.png`;\r\n // icon.alt;\r\n const uvIndexNumber = document.createElement(\"span\");\r\n uvIndexNumber.textContent = `${data.current.uvi}`;\r\n uvIndexColour(data.current.uvi, uvIndexNumber);\r\n uvIndexFigure.appendChild(uvIndexNumber);\r\n console.log(\"cards\");\r\n fiveDayForecastCards(data);\r\n addSearchToLocal(searchVal.value);\r\n searchVal.value = \"\";\r\n })\r\n .catch((err) => {\r\n cityName.textContent = \"Error with weather api\";\r\n });\r\n}", "function information() {\n\t//alert(\"Created by Monica Michaud\\nIn the Institute for New Media Studies\\nAdviser: Gordon Carlson, PhD\\nDev Version: 0.2 (Apr 25)\");\n\n\tvar mapInfoBoxString;\n\t\n\tmapInfoBoxString = '<div id=\"content\"><h1 id=\"infoWindowHeading\" class=\"infoWindowHeading\">Information : </h1>' +\n\t\t'<div id=\"infoWindowBodyContent\"><p>Created by Monica Michaud <br /> In the Institute for New Media Studies <br /> Adviser: Gordon Carlson, PhD <br /> Dev Version: 0.2 (Apr 25)</p></div></div>';\n\t\n\tmap.setCenter(MAP_CENTER_COORDINATES); \n\tinfoWindow.setContent(mapInfoBoxString);\n\tinfoWindow.setPosition(MAP_CENTER_COORDINATES);\n\tinfoWindow.open(map);\n}", "function displayInfo(code) {\n const dataName = nationsData.find(country => country.alpha3Code === code);\n document.querySelector(\"#flag img\").src = dataName.flag;\n document.querySelector(\"#flag img\").alt = `Flag of ${dataName.name}`;\n document.getElementById(\"capital\").innerHTML = dataName.capital;\n document.getElementById(\"population\").innerHTML = dataName.population.toLocaleString(\"en-US\");\n document.getElementById(\"languages\").innerHTML = dataName.languages.filter(c => c.name).map(c => `${c.name}`).join(\", \");\n document.getElementById(\"currencies\").innerHTML = dataName.currencies.filter(c => c.name).map(c => `${c.name} (${c.code})`).join(\", \");\n\n}", "function displayWeatherData() {\r\n if(weatherData.name && weatherData.sys.country) {\r\n currentLocation.innerHTML = weatherData.name + ', ' + weatherData.sys.country;\r\n };\r\n humidity.innerHTML = 'Humidity: ' + weatherData.main.humidity + ' %';\r\n pressure.innerHTML = 'Pressure: ' + transformFromHpaToMmHg() + ' mm Hg';\r\n temperature.innerHTML = transformFromKelvinToCelsius() + '°';\r\n\r\n var imgUrl = 'http://openweathermap.org/img/wn/' + weatherData.weather[0].icon + '@4x.png';\r\n weatherIcon.innerHTML = '<img src=' + imgUrl + '>';\r\n windDeg = weatherData.wind.deg;\r\n windInfo.innerHTML = 'Wind: ' + transformWindDeg() + ', ' + transformFromKnotsToMeters() + ' m/s';\r\n weatherSummary.innerHTML = weatherData.weather[0].main;\r\n words.value = \"\";\r\n}", "function updateDetails(){\n\tvar title = d3.select(\"#name\")\n\t\t.text(regionSelected.name);\n}", "function onClick(loc) {\n myCity.bindPopup(myText + ' : '+ loc.latlng)\n // console.log(\"my city location is \" + loc.latlng);\n }", "function populateWeatherDetail(response){\n $(\".cityName\").text(JSON.stringify(response.name)+\" , \"+JSON.stringify(response.sys.country));\n $(\".cityTemp\").text(JSON.stringify(response.main.temp)+\"\\xB0C\");\n $(\".cityFeelTemp\").text(JSON.stringify(response.main.feels_like)+\"\\xB0C\");\n $(\".cityHumid\").text(JSON.stringify(response.main.humidity)+\"%\");\n $(\".cityWind\").text(JSON.stringify(response.wind.speed)+\" m/sec , \" +JSON.stringify(response.wind.deg)+\" \\xB0\");\n $(\".cityWeather\").text(JSON.stringify(response.weather[0].description));\n let iconCode = JSON.stringify(response.weather[0].icon);\n let iconURL = createWeatherIcon(iconCode);\n $(\".cityIcon\").attr(\"src\", iconURL);\n\n let lat = response.coord.lat;\n let lon = response.coord.lon;\n\n var uvURL = openweatherURL+\"uvi?appid=\"+APIkey+\"&lat=\"+lat+\"&lon=\"+lon;\n $.ajax({\n url: uvURL,\n method: \"GET\"\n }).then(function(response){\n let uvi = JSON.stringify(response.value);\n $(\".cityUV\").text(uvi);\n createUvLevel(uvi);\n });\n }", "function setChanInfo(chaninfo, pos) {\n\n $('#chaninfo-cover img').attr('src', chaninfo.cover.replace('http:', 'https:'));\n $('#chaninfo-cover').attr('data-left', pos);\n\n /*$.getJSON(chaninfo.program.replace(\"http:\",\"https:\")).done(function(data){\n var found = false;\n for(var i = 0; i < data.program.length; i++) {\n if (data.program[i].start_timestamp < data.now_timestamp && data.program[i].end_timestamp > data.now_timestamp) {\n found = true;\n $('#chaninfo-time')\n .text(data.program[i].start_time + \"-\" + data.program[i].end_time)\n .attr(\"title\", data.program[i].start_time + \"-\" + data.program[i].end_time);\n $('#chaninfo-title')\n .text(data.program[i].title)\n .attr(\"title\", data.program[i].title);\n $('#chaninfo-desc')\n .text(data.program[i].excerpt)\n .attr(\"title\", data.program[i].excerpt);\n break;\n }\n }\n if (!found) {\n $('#chaninfo-time')\n .text(\"\")\n .attr(\"title\", \"\");\n $('#chaninfo-title')\n .text(\"\")\n .attr(\"title\", \"\");\n $('#chaninfo-desc')\n .text(\"\")\n .attr(\"title\", \"\");\n }\n });*/\n\n }", "function showCritCatList() {\n // reSets all Markers, removes all Popups and renders criteria list\n updateCategoryList(crtCritIndex);\n }", "function showInfo() {\n $('#user-name').text(curUser.first_name + ' ' + curUser.last_name);\n $('#first-name').text(curUser.first_name);\n $('#last-name').text(curUser.last_name);\n $('#email').text(curUser.email);\n $('#phone').text(curUser.phone_number);\n }", "drawPopup(climateD){\n if(!this._drawPopupNow){\n return;\n }\n if(this._popupExists){\n this._map.closePopup();\n }\n\n // this._climateData = this._main.modules.climateDataController.getClimateData();\n this._climateData = climateD;\n\n var container = L.DomUtil.create('div');\n // get current mode \n \n var mode = this._main.modules.weatherStationsOnMap.getMode();\n\n // draw popup with information\n this._fillPopup(container, mode);\n \n\n var infoPopup = L.popup({classname: 'info-popup', keepInView: false, autopan: true})\n .setLatLng(this._lastCoords)\n .setContent(container)\n .openOn(this._map);\n\n this._main.modules.weatherStationsOnMap.setMode(false);\n this._drawPopupNow= false;\n this._popupExists = true;\n }", "function renderCurrentWeather() {\n $(\"#curr-city-date\").text(currentWeather.city + \" \" + currentWeather.date);\n $(\"#curr-icon\").attr(\"src\", \"http://openweathermap.org/img/wn/\" + currentWeather.weatherIcon + \"@2x.png\");\n $(\"#curr-temp\").text(currentWeather.temperature);\n $(\"#curr-humidity\").text(currentWeather.humidity);\n $(\"#wind-speed\").text(currentWeather.windSpeed);\n}", "function displayWeather(){\n \n temperature.innerHTML = `${weather.temperature}°C`;\n loc.innerHTML = `${weather.city}`;\n}", "function getgeoinfoFoss (event){\n\t\t //console.log(\"getgeoinfoUSGS\");\n\t\t// console.log(event.graphic.attributes);\n\t\t var attr = event.graphic.attributes;\n\t\t var lon=event.mapPoint.x;\n\t\t var lat=event.mapPoint.y;\t\t\n\t\t map.infoWindow.setTitle(\"Fossil Information \");\n\t\t map.infoWindow.setContent( \"<b>Formation:</b>\"+attr.Formation+\"<br/><b>Collection Name:</b>\"+attr.nam+\"<br/><b>Early interval:</b>\"+attr.oei);\n\n\t\t map.infoWindow.show(event.mapPoint, map.getInfoWindowAnchor(event.screenPoint));\n }", "function toggle_up()\n{\n hide('action_panel_main_id');\n hide('toggle_up_id');\n show('toggle_down_id');\n\t if(earthnc_getUrlVariable('em'))\n\t {\n\t map_c=document.getElementById('map');\n\t map_c.style.height='676px';\n\n\t }\n\t else\n\t {\n\n\t document.getElementById('map').className='full_screen_new';\n\t }\n\n}", "function showInfo() {\n infobox.classList.add(\"active\");\n hidePOI()\n}", "function updateMultiBattleMetas() {\n\t\t\t\tvar cp = parseInt($(\".league-select option:selected\").val());\n\t\t\t\tvar cupSelect = $(\".cup-select\");\n\t\t\t\t// only show groups with same cp as selected. update whenever league changes\n\t\t\t\tcupSelect.find(\"option\").each(function(index, element) {\n\t\t\t\t\telement = $(element);\n\t\t\t\t\t// always show open league and custom\n\t\t\t\t\tif (element.attr(\"value\") === \"all\" || element.attr(\"value\") === \"custom\") {\n\t\t\t\t\t\telement.show();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tvar optionCP = parseInt(element.attr(\"cp\"))\n\t\t\t\t\tif (optionCP === cp) {\n\t\t\t\t\t\telement.show();\n\t\t\t\t\t} else {\n\t\t\t\t\t\telement.hide();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t// Load default meta group when switching to Multi Battle\n\t\t\t\tif((self.battleMode == \"multi\") && (! settingGetParams)){\n\t\t\t\t\tcupSelect.trigger(\"change\");\n\t\t\t\t}\n\t\t\t}" ]
[ "0.7387405", "0.6920616", "0.66400254", "0.6191368", "0.616562", "0.6162544", "0.6073907", "0.604219", "0.6023963", "0.60224044", "0.6016215", "0.5994222", "0.59736544", "0.5911498", "0.58990014", "0.5830945", "0.581699", "0.58131087", "0.5804958", "0.5801024", "0.5739823", "0.566973", "0.56685406", "0.56448907", "0.5627766", "0.5627719", "0.562757", "0.5603288", "0.56031394", "0.5580049", "0.55741864", "0.5573993", "0.555374", "0.5546989", "0.55455446", "0.5539127", "0.5532344", "0.55107224", "0.5508524", "0.5486175", "0.5483768", "0.5477973", "0.54753494", "0.54752904", "0.5470023", "0.54574287", "0.54495424", "0.5440491", "0.5440183", "0.54372126", "0.54368", "0.5436081", "0.5432531", "0.5411432", "0.5410493", "0.5407199", "0.54069173", "0.53998333", "0.5398614", "0.53939503", "0.5392306", "0.5391282", "0.5381803", "0.53808135", "0.537998", "0.53775793", "0.5377089", "0.53682655", "0.5368236", "0.53654134", "0.53629607", "0.5362313", "0.5353915", "0.5353716", "0.53481585", "0.53439194", "0.53406763", "0.5339539", "0.5338914", "0.53343654", "0.5333264", "0.5331804", "0.5323503", "0.53227156", "0.5320977", "0.53182036", "0.5315942", "0.5315542", "0.53045076", "0.52986115", "0.52985173", "0.5292553", "0.52898216", "0.5286691", "0.52838326", "0.52808595", "0.52807397", "0.5270716", "0.5269661", "0.52646655" ]
0.7060216
1
getting all the movies
function GetFilms() { $.ajax({ url: "/api/films", type: "GET", contentType: "application/json", success: function (films) { let rows = ""; $.each(films, function (index, film) { rows += row(film); }); $("table tbody").append(rows); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getAllMovies() {\n Movie.find()\n .then(allMovies => console.log('here are all the movies', allMovies))\n .catch(err => console.log('could not get all movies', err))\n}", "async function getMovies() {\n // TODO: fetch movies from wp headless and call appendMovies\n // https://movie-api.cederdorff.com/wp-json/wp/v2/posts?_embed\n}", "async function getMovies(ctx) {\n const currentDate = getCurrentDate();\n const movies = ctx.movies.find({ LastOnAir: currentDate });\n return movies.toArray();\n}", "function getMovieList(callback){\n\tconst query = {\n\t\tapi_key: TMDB_API_AUTH.KEY,\n\t\tsort_by: \"release_date.desc\",\n\t\tpage: pageCounter\n\t};\n\t$.getJSON(TMDB_SEARCH_URL_MOVIES_LIST, query, callback);\n}", "function getAllDirectors(movies) {\n return movies.map(i=> i.director)\n}", "async findAllFilms(){\n return Movie.find();\n }", "function gotAllMovies(err) {\n console.log(\"gotAllMovies()\");\n\n // report an error, you'd want to do something better than this in production\n if (err) {\n console.log(\"error loading movies\");\n console.error(err);\n return;\n }\n\n showMovies();\n}", "function onlyTheTitles(){\r\n let result = []\r\n for (let i = 0; i < movies.length; i++){\r\n let movie = movies[i]\r\n result.push(movie.Title)\r\n }\r\n return result\r\n}", "function getListMovies(movie) {\n return groupByYear(sortByRating(converstionTime(movie)))\n}", "function getListMovies(movie) {\n return groupByYear(sortByRating(converstionTime(movie)))\n}", "function getNowPlayingMovies() {\n\n const path = '/movie/now_playing';\n\n const url = generateUrl(path);\n\n const render = renderMovies.bind({title: 'Now Playing Movies'});\n\n sectionMovies(url, render, handleError);\n\n\n}", "moviesList(){\n for (let i = 0; i < this.homeMovies.length; i++) {\n axios.get(`https://api.themoviedb.org/3/movie/${this.homeMovies[i].url}`, {\n params: {\n 'api_key': API_KEY,\n language: this.language,\n page: this.homeIndex,\n\n }\n }).then(now => {\n this.homeMovies[i].movies = now.data.results;\n });\n }\n }", "function getAllDirectors(movies) {\n let directors = movies.map((elem) => {\n return elem.director\n })\n return directors\n}", "function getMovies(movies) {\r\n return movies\r\n .filter((m) => m.year >= 2018 && m.rating > 4)\r\n .sort((a, b) => a.rating - b.rating)\r\n .reverse()\r\n .map((m) => m.title);\r\n}", "function getMovieGenres () {\n var params = {\n url: 'https://api.themoviedb.org/3/genre/movie/list?&api_key=7af46ede7373e3339ef7980f35025ed3&language=en-US',\n cache: true\n };\n return servicesForProject.promiseGet(params);\n }", "function listMovies() {\n fetch(url)\n .then((response) => response.json())\n .then((data) => {\n for (let movie of data) {\n console.log(movie, \"movie\");\n createMovieBox(movie);\n }\n });\n}", "function loadMovies() {\n\t// Loop through first half array\n\tfor (var i=0;i<items.length/2;i++) {\n\t\tvar object = get_one_recommended_movie(i);\n\n\t\titems[i].children[0].children[1].children[0].innerHTML = object.name;\n\n\t\t// Set link to go to the indiviual title page\n\t\t$(items[i]).attr(\"href\", \"title/title.php?id=\" + object.id + \"&type=movie\");\n\n\t\t// Apply imdb poster image\n\t\tapplyImdbThumbnail(items[i].children[0].children[0].children[0], false, object.id);\n\t}\n}", "function getAllDirectors(movies) {\n const directorsArr = movies.map(function(eachMovie){\n return eachMovie.director\n })\n return directorsArr;\n}", "function printMovies(movies, genre) {\n\tvar handlebars = handlebarsInit('#movie');\n\t// search every movies\n\tfor (var i = 0; i < movies.length; i++) {\n\t\tvar movie = movies[i];\n\t\t// convert raking in stars\n\t\tvar vote = oneToX(movie.vote_average, 5, 10);\n\t\tvar star = printStar(vote, 5);\n\t\t// convert original_language in flag\n\t\tvar flag = convertFlag(movie.original_language);\n\t\t// add poster from api database if present\n\t\tvar posterPath = addPoster(movie);\n\t\t// create object context for handlebars\n\t\tvar context = {\n\t\t\ttitle: movie.title,\n\t\t\toriginal_language: flag,\n\t\t\tstar: star,\n\t\t\toverview: movie.overview,\n\t\t\tposter_path: posterPath,\n\t\t\tgenre_ids: movie.genre_ids\n\t\t};\n\t\t// check if the title is the same as the original title\n\t\tcheckTitle(movie, context);\n\t\t// handlebars append\n\t\tvar html = handlebars(context);\n\t\t$('.results').append(html);\n\t\t// filter by genre the .result\n\t\tfilterByGenre(genre);\n\t}\n}", "function printMovieItems() {\n seanBeanMovies.forEach(function(movie) {\n console.log(movie);\n });\n}", "getRelatedMovie(movies) {\n // It Display Related Movie When User Search For Movie\n this.displayRelatedMovie(movies)\n }", "function getAllDirectors(movies) {\n const directorNames = movies.map(elm => elm.director)\n return directorNames\n}", "function directorMovies(){\nconst director = movies.filter(function(movies){\n return movies.director == \"Steven Spielberg\"\n})\n\nspielBergMovies = []\n\nfor (let i = 0; i<director.length; i+=1){\n spielBergMovies.push(director[i].title)\n}\nconsole.log(\"Steven Spielberg movies has \"+ spielBergMovies.length+ \" movies: \"+ spielBergMovies )\n}", "function getMovieList(movieList = [], pagenum=1) {\n\t\tconst url = \"https://api.themoviedb.org/3/discover/movie?&api_key=933bee1465a61090ebe0704cd6d4c3e1\" +\n \"&with_genres=\" + genreIDs + \n \"&without_genres=\" + genreExclusions +\n\t\t\t\t\t\t\"&vote_average.gte=\" + filters.voteAverage +\n\t\t\t \"&vote_count.gte=\" + 50 +\n\t\t\t\t\t\t\"&certification_country=US\" + \n \"&certification=\" + filters.rating +\n\t\t\t\t\t\t\"&page=\" + pagenum + \n\t\t\t\t\t\t\"&primary_release_date.gte=\" + filters.releaseDecade[0] + '-01-01' +\n\t\t\t\t\t\t\"&primary_release_date.lte=\" + filters.releaseDecade[1] + '-12-31';\n \n\t\t$.ajax({\n url: url,\n datatype: 'json',\n success:function(data){\n\n if (data['total_results'] > 20*pagenum && movieList.length <= 25 ) {\n for (let movie of data['results']) {\n screenMovie(movieList, movie);\n }\n \n pagenum++\n getMovieList(movieList, pagenum);\n } else {\n scrubbedResults = scrubDuplicates(movieList);\n showResponse();\n }\n },\n failure:function(error){\n showError(error.text);\n }\n });\n\t}", "function getGenres(){\n var url = \"http://api.themoviedb.org/3/genre/movie/list?api_key=\" + api_key + \"&language=fr\";\n return get(url);\n}", "function modelGetAllMovies() {\n return movieList;\n}", "function getTheatreMovies() {\n let queryURL =\n \"https://api.themoviedb.org/3/movie/now_playing?api_key=\" +\n API_KEY +\n \"&language=en-US&region=US\";\n $.ajax({\n url: queryURL,\n method: \"GET\",\n }).then(function(response) {\n console.log(response);\n let theatreMovies = [];\n for (let i = 0; i < response.results.length; i++) {\n theatreMovies.push(response.results[i].title);\n }\n console.log(theatreMovies);\n });\n}", "function getMovie() {\n\n var omdbApi = require('omdb-client');\n\n var params = {\n apiKey: 'XXXXXXX',\n title: 'Terminator',\n year: 2012\n }\n omdbApi.get(params, function (err, data) {\n // process response...\n });\n}", "function movies() {\n //console.log('The Toy');\n \t\n \t\n \tfor (var i = 3; i < nodeArgs.length; i++) {\n\n \t\tvar movieTitle = \"\"; \n \t\tconsole.log()\n\n \t\tif (i >= 3 && i < nodeArgs.length) {\n \t\t\tmovieTitle = movieTitle + \"+\" + nodeArgs[i];\n \t\t}\n \n \t\telse {\n \t\t\tmovieTitle = movieTitle + nodeArgs[i];\n \t\t}\n \t}\n \tvar queryURL = 'http://www.omdbapi.com/?t=' + movieTitle +'&tomatoes=true&y=&plot=short&r=json';\n \t\n \t//these are so we can visualize our URL & user Input for debugging\n \tconsole.log(queryURL);\n \tconsole.log(movieTitle);\n \n \trequest(queryURL, function(error, response, body) {\n \n \t\tif (!error && response.statusCode == 200) {\n \t\t\tconsole.log(\"Title: \" + JSON.parse(body)[\"Title\"]);\t// Movie title\n \t\t\tconsole.log(\"Released: \" + JSON.parse(body)[\"Year\"]);\t// Movie Release Year\n \t\t\tconsole.log(\"IMDB Rating: \" + JSON.parse(body)[\"imdbRating\"]);\t// IMDB rating\n \t\t\tconsole.log(\"Country of Production: \" + JSON.parse(body)[\"Country\"]); //Production Country\n \t\t\tconsole.log(\"Movie Language: \" + JSON.parse(body)[\"Language\"]);\t//Movie Language\n \t\t\tconsole.log(\"Plot: \" + JSON.parse(body)[\"Plot\"]); //Movie Plot\n \t\t\tconsole.log(\"Cast: \" + JSON.parse(body)[\"Actors\"]);\t//Movie Cast\n \t\t\tconsole.log(\"Rotten Tomatoes Rating: \" + JSON.parse(body)[\"tomatoRating\"]); //Rotten Tomatoes Rating\n \t\t\tconsole.log(\"Rotten tomatoes URL: \" + JSON.parse(body)[\"tomatoURL\"]); //Rotten tomatoes URL\n \t\t}\n \t\telse {\n \n \t\t}\n \t});\n }", "function allMovies(db) {\n const sql = 'SELECT DISTINCT * FROM MOVIES'\n db.all(sql, function (err, rows) {\n rows.forEach(function (row) {\n console.log(row);\n })\n });\t\n}", "function list(name, year, genres, page) {\n return $.getJSON(\"/api/movies/?q=\" + encodeURIParam(name) + \"&year=\" + encodeURIParam(year) + \"&genres=\" + encodeURIParam(genres) + \"&page=\" + encodeURIComponent(page != null ? page.toString() : \"\"));\n }", "function getMovies(searchText) {\n $.get(\n baseURL + searchName + searchText + \"&type=movie\",\n (respuesta, estado) => {\n if (estado === \"success\") {\n let movies = respuesta.Search;\n let output = \"\";\n $.each(movies, (i, movie) => {\n output += `\n <div class=\"col-md-3\">\n <div class=\"well text-center\">\n <img class=\"imgSearch\" src=\"${movie.Poster}\">\n <h5>${movie.Title}</h5>\n <a onclick=\"selectedMovie('${movie.imdbID}')\" class=\"btn btn-info\" href=\"#\">Mas info</a>\n </div>\n </div>\n \n `;\n });\n\n result.html(output);\n }\n }\n );\n}", "getSearchedMovies () {\n\t\t\t\treturn searchedMovies;\n\t\t\t}", "function getFilm(search) {\n\n\tomdb.getMovie(search)\n\n}", "function movieThis(_movie) {\n query =\n \"http://www.omdbapi.com/?t=\" + _movie + \"&y=&plot=short&apikey=trilogy\";\n\n axios\n .get(query)\n .then(function(response) {\n var movieData = [];\n\n var title = response.data.Title;\n var year = \"Year produced: \" + response.data.Year;\n var imdb = \"IMDB rating: \" + response.data.imdbRating;\n var rt =\n response.data.Ratings.length > 1\n ? \"Rotten Tomatoes: \" + response.data.Ratings[1].Value\n : \"Rotten Tomatoes: N/A\";\n var country = response.data.Country;\n var plot = \"Plot: \" + response.data.Plot;\n var cast = \"Cast: \" + response.data.Actors;\n movieData.push(title, year, imdb, rt, country, plot, cast);\n\n printData(movieData);\n })\n .catch(function(error) {\n noResults();\n });\n}", "async getMovieGenres(language = \"en-US\") {\n return this.get(\"movie/list\", {\n language,\n });\n }", "function renderMovies(data) {\n // array dei film \n const movies = data.results;\n const movieBlock = createMovieContainer(movies, this.title);\n popularMovies.appendChild(movieBlock);\n}", "function getPopularMovies(){\n var url = \"https://api.themoviedb.org/3/movie/popular?api_key=\" + api_key + \"&language=fr\";\n return get(url);\n}", "function moviesObjArr () {\n return fetch(moviesURL)\n .then(res => res.json())\n .catch(console.error)\n }", "function movies(input) {\n\n var movieTitle;\n if (input === undefined) {\n movieTitle = \"Cool Runnings\";\n } else {\n movieTitle = input;\n };\n\n var queryURL = \"http://www.omdbapi.com/?t=\" + movieTitle + \"&y=&plot=short&apikey=b41b7cf6\";\n\n request(queryURL, function (err, res, body) {\n var bodyOf = JSON.parse(body);\n if (!err && res.statusCode === 200) {\n logged(\"\\n---------\\n\");\n logged(\"Title: \" + bodyOf.Title);\n logged(\"Release Year: \" + bodyOf.Year);\n logged(\"Actors: \" + bodyOf.Actors);\n logged(\"IMDB Rating: \" + bodyOf.imdbRating);\n logged(\"Rotten Tomatoes Rating: \" + bodyOf.Ratings[1].Value);\n logged(\"Plot: \" + bodyOf.Plot);\n logged(\"\\n---------\\n\");\n }\n });\n}", "function getMovies() {\n MovieService.movies().then(res => {\nconsole.log(res.data.rows)\n let movies = res.data.rows;\n movies = movies.map((obj) => obj.doc);\n displayMovies(movies)\n })\n .catch((err) => {\n console.error(err);\n });\n\n}", "function cargarPeliculas(){\n movies.movies.forEach(movie => { \n cargarElementosAlHtml(movie);\n });\n}", "async function getMovies(genres, year) {\n let response = await axios\n .get(\n ` https://api.themoviedb.org/3/discover/movie?api_key=${APIKEY}&with_genres=${genres}&primary_release_year=${year}&sort_by=popularity.desc&page=${page}`\n )\n .catch(res => {\n console.log(\"error\");\n });\n\n // displays movies in DOM\n\n movieDomCreator(response.data.results);\n\n console.log(response.data.results);\n return response.data.results;\n}", "function getMovies (req, resp) {\n console.log(\"\\tgetMovies called\");\n var filter = sharedVars.parseFilter(req.swagger.params);\n getFilteredMovies(filter, function(getError, data) {\n if (getError) {// If an error occured, just say it failed\n sharedVars.sendError(resp, 500, 'Failed to get a list of movies.', data);\n } else {// If successful, send json back\n // Update analytics for all the movies\n console.log(\"\\tSending analytics for movie list...\");\n for(var movieIndex in data.entities) {\n sharedVars.sendAnalytic(data.entities[movieIndex].name);\n }\n if (!sharedVars.shouldGetReviews(req.swagger.params)) {\n // If no reviews needed, just return the data\n resp.json(data);\n\n } else {\n // Add reviews to each movie in the list\n console.log(\"\\t\\tAppending reviews to list...\");\n async.each(data.entities, function(movie, callback) { // Is called for each request\n // Manually ask for connections...\n getReviews(movie, function(revError, revData) {\n movie.reviews = revData;\n if (revError) // If couldn't append reviews to movie, report error\n callback(revData);\n else // If reviews appended successfully, return\n callback();\n });\n }, function(error) { // Is called after all requests are done\n if (error) { // If an error occurred, set error message\n resp.statusCode = 500;\n data.message = error;\n }\n resp.json(data);\n });\n }\n }\n });\n}", "getMovies (state) {\n return state.loadeMovies\n }", "Movies() {\n\t\tconsole.log(this.props.data);\n\t\tconst { classes } = this.props;\n\t\treturn this.props.data.newMovies.map(movie => {\n\t\t\treturn (\n\t\t\t\t// <MovieContainer>\n\t\t\t\t// \t<Card className={classes.card} key={movie.id}>\n\t\t\t\t// \t\t<CardActionArea>\n\t\t\t\t// \t\t\t<Link to={`/info/${movie.id}`}>\n\t\t\t\t// \t\t\t\t<CardMedia\n\t\t\t\t// \t\t\t\t\tclassName={classes.media}\n\t\t\t\t// \t\t\t\t\timage={movie.poster_path}\n\t\t\t\t// \t\t\t\t/>\n\t\t\t\t// \t\t\t</Link>\n\t\t\t\t// \t\t</CardActionArea>\n\t\t\t\t// \t</Card>\n\t\t\t\t// </MovieContainer>\n\t\t\t\t// <Wrapper key={movie.id}>\n\t\t\t\t// {/* <article key={movie.id} className=\"movie_list\"> */}\n\t\t\t\t<Row>\n\t\t\t\t\t<Link to={'/info/' + movie.id}>\n\t\t\t\t\t\t<img className=\"poster_img\" src={movie.poster_path} alt=\"poster\" />\n\t\t\t\t\t</Link>\n\t\t\t\t</Row>\n\t\t\t\t// {/* </article> */}\n\t\t\t\t// </Wrapper>\n\t\t\t);\n\t\t});\n\t}", "getMovies() {\n let movies = []\n return fetch(`https://swapi.co/api/films`)\n .then(res => res.json())\n .then(body => body.results.forEach(movie => movies.push(movie)))\n .then(() => {\n return movies\n })\n .catch(error =>\n this.setState({\n error: \"Couldn't load movies :(\",\n isLoadingMovies: false\n })\n )\n }", "function getMovies(varfn) {\r\n\r\n\r\n\r\n let apiData = {\r\n url: 'http://www.omdbapi.com/',\r\n apiKey: '?apikey=623dcc99&s=',\r\n filmnaam: varfn\r\n }\r\n\r\n const {\r\n url,\r\n apiKey,\r\n filmnaam\r\n } = apiData\r\n const apiUrl = `${url}${apiKey}${filmnaam}`\r\n\r\n let res;\r\n\r\n fetch(apiUrl)\r\n .then((response) => response.json())\r\n .then(data => res = data)\r\n .then((res) => {\r\n\r\n let movies = res.Search;\r\n let output = '';\r\n\r\n console.log(movies);\r\n $.each(movies, (index, movie) => {\r\n output += `\r\n <div class =\"col-md-3\" id=\"ruimte\">\r\n <div class=\"well text-center\">\r\n <h5>${movie.Title}</h5>\r\n <h6>Year: ${movie.Year}</h6>\r\n <img src=${movie.Poster} onclick=\"movieSelected('${movie.imdbID}')\" datatoggle=\"modal\" href=\"#\">\r\n </div>\r\n </div>\r\n `;\r\n });\r\n\r\n $('#movies').html(output); //inner html kan mss ook?\r\n });\r\n}", "function getMovies(){\r\n searchText = sessionStorage.getItem('searchText');\r\n axios.get('https://api.themoviedb.org/3/search/movie?api_key=7719d9fc54bec69adbe2d6cee6d93a0d&query='+searchText)\r\n .then((response) => {\r\n console.log(response);\r\n let movies = response.data.results;\r\n let output = '';\r\n if(movies.length != 0){\r\n output = '<h2 class=\"heading\">Your Movies!!</h2>';\r\n $('#head').html(output);\r\n output = '';\r\n $.each(movies, (index, movie) => {\r\n if(movie.poster_path != null){\r\n output += `\r\n <div class=\"col-lg-3 col-md-6 mb-4\">\r\n <div class=\"card h-100\">\r\n <img class=\"card-img-top img-height\" src=\"https://image.tmdb.org/t/p/original${movie.poster_path}\" alt=\"\" onClick=\"getMovieId(${movie.id})\">\r\n <div class=\"card-footer\">`+\r\n (isReleased(movie.release_date) ? `<a href=\"#\" onClick=\"addMovie(${movie.id}, ${1})\" class=\"btn btn-primary btn-sm\" style=\"float:left\">+ Watched</a> \r\n <a href=\"#\" onClick=\"addMovie(${movie.id}, ${0})\" class=\"btn btn-primary btn-sm\" style=\"float:right\">+ Wished</a>` : \r\n `<a href=\"#\" onClick=\"addMovie(${movie.id}, ${0})\" class=\"btn btn-primary btn-sm\">+ Wished</a>`)\r\n +`\r\n </div>\r\n </div>\r\n </div>\r\n `\r\n }\r\n });\r\n }\r\n else\r\n output += '<h2 class=\"heading\">No movies Found :(</h2>';\r\n $('#searchedMovies').html(output);\r\n })\r\n .catch((err) => {\r\n console.log(err.message);\r\n });\r\n}", "getFilteredMovies () {\n let filteredMovies = moviesFilterService.getFilteredMoviesByRating(this.data.movies);\n filteredMovies = moviesFilterService.getFilteredMoviesByGenres(filteredMovies);\n\n return filteredMovies;\n }", "function searchMovie(searchWord, page) {\n fetch(\n `http://www.omdbapi.com/?s=${searchWord}&apikey=dd68f9f&page=${page}&plot=short`\n )\n .then(function(response) {\n return response.json();\n })\n .then(function(data) {\n let searchResults = data.Search;\n results.innerHTML = \"\";\n return searchResults.map(function(movie) {\n let movieDiv = createNode(\"div\");\n let movieTitle = createNode(\"h1\");\n let moviePoster = createNode(\"img\");\n let more = createNode(\"div\");\n let movieDetails = createNode(\"p\");\n let movieID = movie.imdbID;\n let movieActors = createNode(\"p\");\n let movieDirector = createNode(\"p\");\n let movieRating = createNode(\"p\");\n\n movieDiv.className = \"movie-div\";\n\n movieTitle.textContent = `${movie.Title} (${movie.Year})`;\n movieTitle.className = \"movie-title\";\n\n moviePoster.src = movie.Poster;\n moviePoster.className = \"movie-images\";\n\n more.textContent = \"More...\";\n more.className = \"more\";\n\n movieDetails.className = \"movie-details--off\";\n\n append(results, movieDiv);\n append(movieDiv, movieTitle);\n append(movieDiv, moviePoster);\n append(movieDiv, more);\n append(more, movieActors);\n append(more, movieDirector);\n append(more, movieRating);\n append(more, movieDetails);\n\n more.addEventListener(\"click\", function(event) {\n event.preventDefault();\n if (movieDetails.className == \"movie-details--off\") {\n fetch(\n `http://www.omdbapi.com/?i=${movieID}&apikey=dd68f9f&plot=full`\n )\n .then(function(response) {\n return response.json();\n })\n .then(function(data) {\n console.log(data);\n movieActors.textContent = `Cast: ${data.Actors}`;\n if (movie.Director !== \"N/A\") {\n movieDirector.textContent = `Directed by: ${data.Director}`;\n }\n movieRating.textContent = `${data.Ratings[0].Source}: ${\n data.Ratings[0].Value\n }\n ${data.Ratings[1].Source}: ${data.Ratings[1].Value}\n ${data.Ratings[2].Source}: ${data.Ratings[2].Value}`;\n\n movieDetails.className = \"movie-plot\";\n movieDetails.textContent = `Plot: ${data.Plot}`;\n });\n\n movieDetails.classList.toggle(\"movie-details--on\");\n } else if (movieDetails.className == \"movie-details--on\") {\n movieDetails.classList.toggle(\"movie-details--off\");\n }\n });\n });\n });\n}", "function getTopRatedMovies() {\n\n const path = '/movie/top_rated';\n\n const url = generateUrl(path);\n\n const render = renderMovies.bind({title: 'Top Rated Movies'});\n\n sectionMovies(url, render, handleError);\n\n}", "function selectMovies() {\n\n var type = Session.get('type');\n var search = Session.get('search');\n var sort = Session.get('sort');\n var filter = Session.get('filter') || {};\n\n\n\n // Update scroll position when the query changes -----------------------------\n var instantaneaousRepositionning = false;\n var query = [type, search, sort, filter.genre].join('|');\n if (query !== queryCache) {\n scroll = 0;\n scrollTo(0, 600);\n queryCache = query;\n instantaneaousRepositionning = true;\n }\n\n\n // TODO Loading icons, what happens if you search <2 letters\n\n\n // Load Data -----------------------------------------------------------------\n\n if (search.length > 1 && type === 'suggested') {\n // Global Search\n searchMovies(search, filter, sort);\n } else {\n lookupMovies(type, search, sort, filter, instantaneaousRepositionning);\n }\n}", "function processPlayingMovies(response){\n let results = response.results;\n let pm_data = {\"data\": []};\n\n var i = 0;\n while(pm_data.data.length < 5){\n if(results[i].backdrop_path !== null && results[i].backdrop_path !== undefined){\n let m_item = {\"media_type\": \"movie\", \"id\" : results[i].id};\n m_item.backdrop_path = back_prefix + results[i].backdrop_path;\n if(results[i].title !== null && results[i].title !== undefined){\n m_item.title = results[i].title;\n }\n pm_data.data.push(m_item);\n }\n i ++;\n }\n return pm_data;\n}", "function showTheatreMovie(req,res,next){\n // var tID = req.params.id;\n db.many(`SELECT m.movie_id, m.title, array_to_string(array_agg(tms.showtime), ',') showtimes\n FROM movies m INNER JOIN theatre_movie_showtime tms\n ON m.movie_id = tms.movie_id WHERE tms.theatre_id = ($1)\n GROUP BY m.movie_id;`, [req.params.id])\n .then((data)=>{\n console.log(data); // should get multiple movies in a theatre\n res.rows = data;\n next();\n })\n .catch(()=>{\n console.log('ERROR in showing ALL MOVIES IN A THEATRE!');\n })\n}", "function movie() {\n //****************** OMDB movies API ********************\n var API2 = \"https://www.omdbapi.com/?t=\" + search + \"&y=&plot=short&apikey=trilogy\"\n\n axios.get(API2).then(\n function (response) {\n console.log(\"================================================\");\n console.log(\"Title of the Movie: \" + response.data.Title);\n console.log(\"Year Released: \" + response.data.Year);\n console.log(\"IMDB Rating: \" + response.data.imdbRating);\n console.log(\"Rotten Tomatoes Rating: \" + response.data.Ratings[1].Value);\n console.log(\"Country Produced in: \" + response.data.Country);\n console.log(\"Language of the Movie: \" + response.data.Language);\n console.log(\"Plot: \" + response.data.Plot);\n console.log(\"Cast: \" + response.data.Actors);\n }\n )\n}", "function getMovies() {\n return (dispatch) => {\n dispatch(request());\n dispatch(success(feedData));\n\n /**\n * If API is available, we could use below code for API call.\n */\n\n // movieService.getMoives()\n // .then((res) => {\n // dispatch(success(res));\n // })\n // .catch((err) => {\n // dispatch(failure(err));\n // });\n };\n\n function request(data) {\n return {type: movieConstants.MOVIE_REQUEST, data};\n }\n function success(data) {\n return {type: movieConstants.MOVIE_SUCCESS, data};\n }\n // function failure(err) {\n // return {type: movieConstants.MOVIE_FAILURE, err};\n // }\n}", "function getMovieRes(title) {\n var promise = movieFactory.getMovieSearch(title);\n promise.then(\n function(data) {\n vm.movieList = data;\n console.log(vm.movieList);\n },\n function(err) {\n console.log(err);\n }\n );\n }", "function getMoviesWithReleaseYear(movies){\n var moviesWithReleaseYear = [];\n for (var i=0; i<movies.length; i++){\n var movie = movies[i];\n var releaseYear;\n if(movie.releaseDate != '')\n releaseYear = moment(movie.releaseDate).year();\n else\n releaseYear = '';\n if(movie.rating >= 4 && movie.rating <= 5){\n moviesWithReleaseYear.push({\n 'title' : movie.title, \n 'releaseYear' : releaseYear, \n 'image' : movie.image, \n 'price' : movie.price, \n 'rating' : movie.rating,\n 'releaseDate' : movie.releaseDate,\n 'genres' : movie.genres\n });\n }\n \n }\n return moviesWithReleaseYear;\n}", "function movieList(query, sortBy, order) {\n\n getMovies(query, sortBy, order).then((movies) => {\n //console.log('Here are all the movies:');\n movies.forEach(({title, rating, id, tvdb, imdb_id, fav}) => {\n// console.log(`id#${id} - ${title} - rating: ${rating}`);\n\n let moviePoster = \"images/placeholder.png\";\n let movieBackdrop = \"\";\n let star = 'star_border';\n let favStar = '';\n\n if (tvdb) {\n console.log('data exists for tvdb');\n if(tvdb.poster_path !== null) moviePoster = 'https://image.tmdb.org/t/p/w500/' + tvdb.poster_path;\n if(tvdb.backdrop_path !== null) movieBackdrop = 'https://image.tmdb.org/t/p/original/' + tvdb.backdrop_path;\n\n }\n\n star = (fav === true) ? 'star' : 'star_border';\n favStar = (fav === true) ? 'favorite-true' : '';\n\n $(`<div class=\"movie p-2 m-2\" id=\"movie-${id}\">`).append(\n $('<div class=\"movie-img\">').append(\n $(`<img src=\"${moviePoster}\" id=\"img-${id}\" class=\"img-fluid main\">`)),\n $('<div class=\"movie-title text-truncate\">').text(title),\n $('<div class=\"movie-database\">').append(\n $(`<img src=\"images/loader.svg\" class=\"loading-data hide\" id=\"loading-movie-${id}\">`).text(''),\n $(`<input type=\"hidden\" id=\"movie-imdb-${id}\" value=\"${imdb_id}\">`).text(''),\n $(`<button id=\"update-movie-${id}\" class=\"update\" value=\"${id}\">`).html(\"<i class=\\\"material-icons\\\">autorenew</i>\"),\n $(`<button id=\"edit-movie-${id}\" class=\"edit\" value=\"${id}\">`).html('<i class=\"material-icons\">create</i>'),\n $(`<button id=\"delete-movie-${id}\" class=\"delete\" value=\"${id}\">`).html('<i class=\"material-icons\">delete_forever</i>'),\n $(`<button id=\"fav-movie-${id}\" class=\"favorite ${favStar}\" value=\"${id}\">`).html(`<i class=\"material-icons\">${star}</i>`),\n )).appendTo('#moviesList');\n\n\n $(`#img-${id}, #update-movie-${id}, #edit-movie-${id}, #delete-movie-${id}, #fav-movie-${id}`).hover(function () {\n $('.bg-container').css('background-image', `url('${movieBackdrop}')`);\n $(`#img-${id}`).addClass('standard-hover');\n $(`#update-movie-${id}, #edit-movie-${id}, #delete-movie-${id}, #fav-movie-${id}`).css('opacity',0.6);\n $('.favorite-true').css('opacity',1);\n\n }, function () {\n $(`#update-movie-${id}, #edit-movie-${id}, #delete-movie-${id}, #fav-movie-${id}`).css('opacity',0.0);\n $(`#img-${id}`).removeClass('standard-hover');\n $('.favorite-true').css('opacity',1);\n\n });\n\n\n $(`#img-${id}`).click(function() {\n displayMovie(id);\n });\n\n $(`#edit-movie-${id}`).click(function () {\n displayEditMovie(id);\n });\n\n $(`#fav-movie-${id}`).click(function() {\n\n let star = $(this).children('i').text();\n console.log(star);\n (star !== 'star') ? $(this).children('i').text('star') : $(this).children('i').text('star_border');\n (star !== 'star') ? addFav(id, true) : addFav(id,false);\n (star !== 'star') ? $(this).addClass('favorite-true') : $(this).removeClass('favorite-true');\n\n });\n\n $(`#delete-movie-${id}`).click(function () {\n\n // TODO: reaplce this with a in-page function\n const confirmed = window.confirm(\"Are you sure\");\n\n if (confirmed === true) {\n $(`#movie-${id}`).addClass('hide');\n deleteMovie(id);\n console.log(`deleted: ` + id);\n\n\n } else {\n console.log(`cancelled the delete: ` + id);\n }\n\n });\n\n $(`#update-movie-${id}`).click(function (e) {\n e.preventDefault();\n $(`#loading-movie-${id}`).removeClass('hide');\n $(`#img-${id}`).addClass('loading-hover');\n\n const movieId = $(`#movie-imdb-${id}`).val();\n\n $(this).off('click');\n\n setTimeout(function () {\n getMovieDBData(movieId).then((movies) => {\n console.log('Here are all the movies:');\n console.log(movies.movie_results[0]);\n\n const movie = movies.movie_results[0];\n\n\n getFullMovieData(movie.id).then(movie => {\n\n\n addMovieData(id,\n {\n title: movie.title,\n rating: movie.vote_average,\n tvdb: movie\n });\n\n\n\n $(`#img-${id}`).attr('src', `https://image.tmdb.org/t/p/w500/${movie.poster_path}`);\n $('.bg-container').css('background-image', `url('https://image.tmdb.org/t/p/original/${movie.backdrop_path}')`);\n\n $(`#img-${id}`).hover(function () {\n $('.bg-container').css('background-image', `url('https://image.tmdb.org/t/p/original/${movie.backdrop_path}')`);\n });\n\n $(`#loading-movie-${id}`).addClass('hide');\n $(`#img-${id}`).removeClass('loading-hover');\n\n });\n\n\n\n\n\n }).catch((error) => {\n alert('Oh no! Something went wrong.\\nCheck the console for details.');\n console.log(error);\n });\n\n $(this).on('click');\n\n $('.loading-container').hide();\n }, 3000);\n\n });\n\n $('.loading-container').hide();\n\n });\n\n }).catch((error) => {\n alert('Oh no! Something went wrong.\\nCheck the console for details.');\n console.log(error);\n });\n}", "function yearMovie(year){\n return movies.filter(function(movie){\n return movie.year===year;\n });\n}", "function fetchMovie() {\n axi.get(\"/api/v1\").then(r => setMovie(r.data.movie));\n }", "function allMovieTitleLinks() {\n return $('.movie .name a')\n}", "async function getMovieResults({ movieId, title }) {\n await logger(`finding: ${title}`);\n\n const parameters = querystring.stringify({\n movieId,\n apiKey: config.radarr.apiKey,\n });\n\n const searchUrl = `${_getRadarrApiPath()}/release?${parameters}`;\n return await getData({ uri: searchUrl });\n}", "movieGenres(data,genres){\n //filter the dataset and create an array of genres => one object for each genre in the db\n genres.forEach((genre, index)=>myApp.vm.genres.push({name :genre, movies: data.filter(movie=>movie.genre_name===genre)}));\n\n }", "function ex20() {\n\tvar movieLists = [\n\t\t{\n\t\t\tname: \"New Releases\",\n\t\t\tvideos: [\n\t\t\t\t{\n\t\t\t\t\t\"id\": 70111470,\n\t\t\t\t\t\"title\": \"Die Hard\",\n\t\t\t\t\t\"boxarts\": [\n\t\t\t\t\t\t{ width: 150, height:200, url:\"http://cdn-0.nflximg.com/images/2891/DieHard150.jpg\" },\n\t\t\t\t\t\t{ width: 200, height:200, url:\"http://cdn-0.nflximg.com/images/2891/DieHard200.jpg\" }\n\t\t\t\t\t],\n\t\t\t\t\t\"url\": \"http://api.netflix.com/catalog/titles/movies/70111470\",\n\t\t\t\t\t\"rating\": 4.0,\n\t\t\t\t\t\"bookmark\": []\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"id\": 654356453,\n\t\t\t\t\t\"title\": \"Bad Boys\",\n\t\t\t\t\t\"boxarts\": [\n\t\t\t\t\t\t{ width: 200, height:200, url:\"http://cdn-0.nflximg.com/images/2891/BadBoys200.jpg\" },\n\t\t\t\t\t\t{ width: 140, height:200, url:\"http://cdn-0.nflximg.com/images/2891/BadBoys140.jpg\" }\n\n\t\t\t\t\t],\n\t\t\t\t\t\"url\": \"http://api.netflix.com/catalog/titles/movies/70111470\",\n\t\t\t\t\t\"rating\": 5.0,\n\t\t\t\t\t\"bookmark\": [{ id:432534, time:65876586 }]\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\t\t{\n\t\t\tname: \"Thrillers\",\n\t\t\tvideos: [\n\t\t\t\t{\n\t\t\t\t\t\"id\": 65432445,\n\t\t\t\t\t\"title\": \"The Chamber\",\n\t\t\t\t\t\"boxarts\": [\n\t\t\t\t\t\t{ width: 130, height:200, url:\"http://cdn-0.nflximg.com/images/2891/TheChamber130.jpg\" },\n\t\t\t\t\t\t{ width: 200, height:200, url:\"http://cdn-0.nflximg.com/images/2891/TheChamber200.jpg\" }\n\t\t\t\t\t],\n\t\t\t\t\t\"url\": \"http://api.netflix.com/catalog/titles/movies/70111470\",\n\t\t\t\t\t\"rating\": 4.0,\n\t\t\t\t\t\"bookmark\": []\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"id\": 675465,\n\t\t\t\t\t\"title\": \"Fracture\",\n\t\t\t\t\t\"boxarts\": [\n\t\t\t\t\t\t{ width: 200, height:200, url:\"http://cdn-0.nflximg.com/images/2891/Fracture200.jpg\" },\n\t\t\t\t\t\t{ width: 120, height:200, url:\"http://cdn-0.nflximg.com/images/2891/Fracture120.jpg\" },\n\t\t\t\t\t\t{ width: 300, height:200, url:\"http://cdn-0.nflximg.com/images/2891/Fracture300.jpg\" }\n\t\t\t\t\t],\n\t\t\t\t\t\"url\": \"http://api.netflix.com/catalog/titles/movies/70111470\",\n\t\t\t\t\t\"rating\": 5.0,\n\t\t\t\t\t\"bookmark\": [{ id:432534, time:65876586 }]\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t];\n\n\n\t// Use one or more concatMap, map, and reduce calls to create an array with the following items (order doesn't matter)\n\t// [\n\t//\t {\"id\": 675465,\"title\": \"Fracture\",\"boxart\":\"http://cdn-0.nflximg.com/images/2891/Fracture120.jpg\" },\n\t//\t {\"id\": 65432445,\"title\": \"The Chamber\",\"boxart\":\"http://cdn-0.nflximg.com/images/2891/TheChamber130.jpg\" },\n\t//\t {\"id\": 654356453,\"title\": \"Bad Boys\",\"boxart\":\"http://cdn-0.nflximg.com/images/2891/BadBoys140.jpg\" },\n\t//\t {\"id\": 70111470,\"title\": \"Die Hard\",\"boxart\":\"http://cdn-0.nflximg.com/images/2891/DieHard150.jpg\" }\n\t// ];\n\n\treturn movieLists.\n\t\tconcatMap(movieList => movieList.videos.concatMap(v=> v.boxarts\n .reduce((acc, curr) => acc.width * acc.height < curr.width * curr.height ? acc : curr)\n .map(b => ({id: v.id, title: v.title, boxart: b.url}))\n )\n )\n\n}", "function showAll() {\n $('.movie-list').empty();\n \n $.get('/allmovies', function(data) {\n if (data.length > 0) {\n for (let i in data) {\n buildMovieList(data[i]);\n }\n $('.not-found').css(\"display\", \"none\");\n $('.movie-list').css(\"display\", \"block\");\n }\n else {\n $('.movie-list').css(\"display\", \"none\");\n $('.not-found').css(\"display\", \"block\");\n }\n });\n}", "function getMovieGenres() {\n let queryURL =\n \"https://api.themoviedb.org/3/genre/movie/list?api_key=\" +\n API_KEY +\n \"&language=en-US\";\n\n $.ajax({\n url: queryURL,\n method: \"GET\",\n }).then(function(response) {\n let movieGenres = [];\n for (let i = 0; i < response.genres.length; i++) {\n movieGenres.push(response.genres[i].name);\n }\n console.log(movieGenres);\n });\n}", "function howManyMovies(movies) {\n const filterd = movies.filter(function(movie) {\n return movie.director === 'Steven Spielberg' &&\n movie.genre.includes('Drama')\n })\n}", "function getMovieDetails(movie_id){\n var settings = {\n \"async\": true,\n \"crossDomain\": true,\n \"url\": \"https://api.themoviedb.org/3/movie/\" + movie_id + \"?language=en-US&api_key=7b9a9e7e542ce68170047140f18db864\",\n \"method\": \"GET\",\n \"headers\": {},\n \"data\": \"{}\"\n }\n $.ajax(settings).done(function (response) {\n $('#movieTitle').text(\"Showing results for \" + response.title)\n for(var i = 0; i < response.genres.length; i++){\n getMoviesForGenre(response.genres[i].name, response.genres[i].id, response.vote_average)\n }\n });\n }", "function getMovies() {\n var movieSearch = process.argv.slice(3).join(\" \");\n var queryURL = \"http://www.omdbapi.com/?apikey=trilogy&t=\" + movieSearch;\n axios\n .get(queryURL)\n .then(function(response) {\n //Function for Response of movies.\n //console.log(response);\n var searchRes = response.data;\n console.log(\"Movie Title: \" + searchRes.Title + \n \"\\nReleased In: \" + searchRes.Year + \n \"\\nIMDB Rating: \" + searchRes.imdbRating + \n \"\\nRotten Tomatoes Rating: \" + searchRes.Ratings[1].Value + \n \"\\nCountry where movie was produced: \" + searchRes.Country + \n \"\\nLanguage: \" + searchRes.Language + \n \"\\nPlot: \" + searchRes.Plot + \n \"\\nActors: \" + searchRes.Actors);\n console.log(\"------------------------------------------\");\n })\n //Function for ERRORS\n .catch(function(error) {\n if (error.response) {\n console.log(error.response.data);\n console.log(\"------------------------------------------\");\n }\n })\n}", "function movie() {\n\n\tvar movieName = '';\n\n\tif(process.argv.length >= 4){\n\t\tfor (var i = 3; i < dataArr.length; i++){\n\t\t\tif (i > 3 && i < dataArr.length) {\n\t\t\t\tmovieName = movieName + \"+\" + dataArr[i];\n\t\t\t} else {\n\t\t\t\tmovieName += dataArr[i];\n\t\t\t}\n\t\t} // closes for loop for dataArr\n\t} else {\n\t\tmovieName = 'Mr Nobody';\n\t}\n\n\tvar queryUrl = \"http://www.omdbapi.com/?t=\" + movieName + \"&y=&plot=short&tomatoes=true&r=json\";\n\n\tconsole.log(queryUrl);\n\n\trequest(queryUrl, function(error, response, body){\n\n\t\tif (!error && response.statusCode === 200) {\n\n\t \tconsole.log(\"\");\n\t\t\tconsole.log(\"Title: \" + JSON.parse(body).Title);\n\t \tconsole.log(\"\");\n\t \tconsole.log(\"Release Year: \" + JSON.parse(body).Released);\n\t \tconsole.log(\"\");\n\t \tconsole.log(\"Rating: \" + JSON.parse(body).imdbRating);\n\t \tconsole.log(\"\");\n\t \tconsole.log(\"Produced In: \" + JSON.parse(body).Country);\n\t \tconsole.log(\"\");\n\t \tconsole.log(\"Language: \" + JSON.parse(body).Language);\n\t \tconsole.log(\"\");\n\t \tconsole.log(\"Plot: \" + JSON.parse(body).Plot);\n\t \tconsole.log(\"\");\n\t \tconsole.log(\"Actors: \" + JSON.parse(body).Actors);\n\t\t\tconsole.log(\"\");\n\t \tconsole.log(\"Rotten Tomatoes Rating: \" + JSON.parse(body).Ratings[1].Value);\n\t \tconsole.log(\"\");\n\t \tconsole.log(\"Rotten Tomatoes URL: \" + JSON.parse(body).tomatoURL);\n\n\t\t}\n\t});\t\t\t\n\n}", "searchMovie(name) {\n let movieByName = `https://api.themoviedb.org/3/search/movie?api_key=${this.API_KEY}&language=en-US&query=${name}&page=1&include_adult=false`\n\n fetch(movieByName)\n .then(response => {\n return response.json()\n }).then(movie => {\n let fiveMovieName = ''\n\n // Take only five movie within all movie\n if (movie) {\n try {\n fiveMovieName = movie.results.filter((movie, index) => {\n return index < 5\n })\n } catch(err) {\n \n }\n }\n this.getRelatedMovie(fiveMovieName)\n // It pass first movie id to searchMovieById\n this.searchMovieById(movie.results[0].id)\n })\n }", "function addMovies() {\n fetch('https://ghibliapi.herokuapp.com/films')\n .then(response => response.json())\n .then(movies => movies.forEach(movie => addCard(movie)))\n .catch(err => console.err);\n}", "cutMovies(movies) {\n let newMovies = []\n for (let movie of movies) {\n newMovies.push({\n id: movie.id,\n img: `https://image.tmdb.org/t/p/w300${movie.poster_path}`,\n name: movie.title,\n year: movie.release_date,\n description: movie.overview\n })\n }\n return newMovies\n }", "displayRelatedMovie(movies) {\n // It create all html element with movie data\n this.createRelatedMovie(movies)\n }", "function getMovie() {\n\n let movieId = sessionStorage.getItem('movieId');\n api_key = '98325a9d3ed3ec225e41ccc4d360c817';\n\n $.ajax({\n\n url: `https://api.themoviedb.org/3/movie/${movieId}`,\n dataType: 'json',\n type: 'GET',\n data: {\n api_key: api_key,\n },\n\n //get acess to movie information;\n success: function(data) {\n\n\n\n var movie = data;\n let output = `\n <div class=\"row\">\n <div class=\"col-md-4\">\n <img src=\"https://image.tmdb.org/t/p/w500${movie.poster_path}\" class=\"thumbnail\">\n <div id=\"visitS\">\n <a id=\"visitSite\" target=\"_blank\" href=\"${movie.homepage}\"> Visit Movie Site</a>\n </div>\n </div>\n <div class=\"col-md-8\">\n <h2>${movie.title}</h2>\n <ul class=\"list-group\" id=\"list-group\">\n\n <li class=\"list-group-item\"><strong>Released:</strong> ${movie.release_date}</li>\n <li class=\"list-group-item\"><strong>Rated:</strong> ${movie.vote_average}</li>\n <li class=\"list-group-item\"><strong>Runtime:</strong> ${movie.runtime} min.</li>\n <li class=\"list-group-item\"><strong>Production Companies:</strong> ${movie.production_companies[0].name} min.</li>\n </ul>\n <div>\n <div id=\"overview\">\n <h3>Overview</h3> ${movie.overview}\n </div>\n <div id=\"imdbb\">\n <a id=\"imdb\" href=\"http://imdb.com/title/${movie.imdb_id}\" target=\"_blank\" <i class=\"fab fa-imdb fa-3x\"></i></a>\n </div>\n <div>\n <a class=\"navbar-brand\" id=\"go2\" href=\"index.html\">Go Back</a>\n \n </div>\n \n </div> \n \n `;\n //print movie selected information\n $('#movie').html(output);\n\n\n }\n\n })\n\n}", "static async getMoviesByYear(year) {\n const resp = await db.query(`SELECT * FROM bechdel_movies WHERE yr = $1`, [year])\n return resp.rows;\n }", "static getMoviesById(id) {\n return axios(withBaseUrl(`movie/${id}`));\n /* chamando essa rota https://developers.themoviedb.org/3/movies/get-movie-details */\n }", "function getSimilarMovies(movie) {\n let sim = [];\n const readFolder = 'jsonData/movies/';\n\n fs.readdirSync(readFolder).forEach(file => {\n let data = fs.readFileSync(readFolder + file);\n let movData = JSON.parse(data);\n if (movie.Genre.includes(movData.Genre) && movie.Rated === (movData.Rated) && movData.Title !== movie.Title) {\n sim.push(movData);\n }\n });\n //console.log(sim);\n\n return sim;\n}", "function showMovie(response) {\n let movie = response;\n\n //neki filmovi/serije imaju vise rezisera, glumaca i zanrova i da bi ljepse mogli da ih prikazemo na stranici od stringa koji dobijemo napravimo niz elemenata\n var str = movie.Actors;\n var str2 = movie.Director;\n var str3 = movie.Genre;\n\n var stars = str.split(\", \");\n var directors = str2.split(\", \");\n var genres = str3.split(\", \");\n\n //ukoliko nemamo podatke o slici prikazemo default sliku iz foldera\n if (movie.Poster == \"N/A\") {\n movie.Poster = \"./Images/default.jpg\";\n }\n\n //prikazujemo redom podatke\n $(\"#movie-title-name\").append(movie.Title + ' <span id=\"movie-year\"></span>');\n $(\"#movie-year\").append(movie.Year);\n\n //ukoliko IMDb ocjene nisu dostupne, prikazemo odgovarajucu poruku\n if (movie.imdbRating === 'N/A') {\n $(\"#movie-rating\").append('<span>Ratings are not available<span>');\n } else {\n $(\"#movie-rating\").append(movie.imdbRating + '/10 <span>' + movie.imdbVotes + ' votes </span>');\n }\n\n $(\"#img\").append('<img src=' + movie.Poster + ' alt=\"\">');\n\n if (movie.Plot === 'N/A') {\n $('#movie-description').append('Plot is not available at this moment. :)');\n } else {\n $('#movie-description').append(movie.Plot);\n }\n\n directors.forEach(director => {\n $('#movie-director').append('<p>' + director + '</p>');\n });\n\n stars.forEach(star => {\n $('#movie-stars').append('<p>' + star + '</p>');\n });\n\n genres.forEach(genre => {\n $('#movie-genre').append('<p>' + genre + '</p>');\n });\n\n $('#movie-released').append(movie.Released);\n $('#movie-runtime').append(movie.Runtime);\n\n //ukoliko je Type -> serija onda prikazemo ukupan broj sezona \n //prikazemo i select sa svim sezonama te serije gdje na klik mozemo prikazati sve epizode odredjene sezone\n //po defaultu je selectovana poslednja sezona serije, kako bi odmah pri ulasku u seriju imali izlistane epizode \n if (movie.Type == 'series') {\n $('#movie-seasons').append('<h3>Seasons:</h3><p>' + movie.totalSeasons + '</p>');\n\n $('#series-season').append(\n '<p class=\"heading-des\">Episodes> ' +\n '<select onchange=\"getSeason(\\'' + movie.Title + '\\')\" id=\"select-episodes\">' +\n '</select>' +\n '</p>' +\n '<hr class=\"about\">' +\n '<div class=\"description\">' +\n '<div id=\"episodes\">' +\n '</div>' +\n '</div>'\n )\n }\n\n $('#movie-cast').append(\n '<p>Director: ' + movie.Director + '</p>' +\n '<p>Writer: ' + movie.Writer + '</p>' +\n '<p>Stars: ' + movie.Actors + '</p>'\n )\n\n if (movie.Ratings.length == 0) {\n $('#movie-reviews').append('<p>Ratings are not available at this moment. :)</p>')\n } else {\n movie.Ratings.forEach(rating => {\n $('#movie-reviews').append('<p>' + rating.Source + ' --> ' + rating.Value + '</p>')\n });\n }\n\n if (movie.Awards === 'N/A') {\n $('#movie-awards').append('Awards are not available at this moment. :)');\n } else {\n $('#movie-awards').append(movie.Awards);\n }\n\n $('#movie-imdb-btn').append(\n '<button onClick=\"openImdbPage(\\'' + movie.imdbID + '\\')\" class=\"btn-imdb\">' +\n '<i class=\"fab fa-imdb\"></i> IMDb' +\n '</button>'\n )\n\n //za ukupan broj sezona serije ispunimo select sa tolikim brojem opcija\n for (i = 1; i <= movie.totalSeasons; i++) {\n $('#select-episodes').append(\n '<option selected=\"selected\" value=\"\\'' + i + '\\'\">Season ' + i + '</option>'\n )\n }\n\n if (movie.Type === \"series\") {\n\n //prikazemo sve epizode selektovane sezone\n getSeason(movie.Title);\n\n }\n\n //ukoliko smo otvorili epizodu prikazemo na stranici na kojoj smo epizodi i sezoni \n //i prikazemo dugme za povratak na seriju\n if (movie.Type === \"episode\") {\n $(\"#episode-details\").append(\n '<span class=\"episode-span\">Season ' + movie.Season + ' </span>' +\n '<span class=\"season-span\">Episode ' + movie.Episode + '</span>'\n )\n $(\"#button-tvshow\").append(\n '<button onClick=\"openMovie(\\'' + movie.seriesID + '\\')\" class=\"btn-search\">' +\n '<i class=\"fas fa-chevron-left\"></i>' +\n ' Back to TV Show' +\n '</button>'\n )\n }\n}", "function howManyMovies(movies){\n if (movies == 0){}\n else {\n var dramaFilms = [];\n for (var i = 0; i < movies.length; i++){\n for (var j = 0; j < movies[i].genre.length; j++){\n if (movies[i].genre[j] === 'Drama'){\n dramaFilms.push(movies[i])\n }\n }\n}\n var stevenFilms = dramaFilms.filter(function(elm){\n return elm.director == 'Steven Spielberg';\n });\n return 'Steven Spielberg directed ' + stevenFilms.length + ' drama movies!'\n}\n}", "function DisplayMovies({ movies }) {\n return (\n <div className=\"main\">\n {movies.map((movie) => (\n <Movie key={movie.id} movie={movie} />\n ))}\n </div>\n );\n}", "function movieThis(movie) {\n\n if (movie.length === 0) {\n var queryURL = \"http://www.omdbapi.com/?t=\" + \"Mr.Nobody\" + \"&y=&plot=short&apikey=trilogy\";\n } else {\n var queryURL = \"http://www.omdbapi.com/?t=\" + searchQuery + \"&y=&plot=short&apikey=trilogy\";\n }\n\n // axios method to recieve and print data\n axios.get(queryURL).then(function (response) {\n console.log(\"Movie Title: \" + response.data.Title);\n console.log(\"Year: \" + response.data.Year);\n console.log(\"IMBD Rating: \" + response.data.Ratings[0].Value);\n console.log(\"Rotten Tomatoes Rating: \" + response.data.Ratings[1].Value);\n console.log(\"Country: \" + response.data.Country);\n console.log(\"Language: \" + response.data.Language);\n console.log(\"Plot: \" + response.data.Plot);\n console.log(\"Actors: \" + response.data.Actors);\n }\n\n );\n}", "function getAllDirectors(moviesArray) {\n let directors = moviesArray.map(function (movie){\n return movie.director;\n }); return directors;\n}", "function getAllDirectors(moviesArray) {\n\n allDirectors = moviesArray.map(dir => dir.director)\n\n return allDirectors\n\n\n}", "function searchMovies(movies){\n console.log(\"searching for:\", movies);\n axios.get(generateApiUrl('search/movie'))\n .then( (response) => {\n console.log(response);\n })\n .catch((err) => {\n console.error(err);\n });\n}", "function movieThis(movie) {\n\n var queryUrl = \"http://www.omdbapi.com/?t=\" + searchInput + \"&y=&plot=short&apikey=trilogy\";\n\n request(queryUrl, function (error, response, body) {\n\n if (!error && response.statusCode === 200) {\n var body = JSON.parse(body);\n\n console.log(\"\");\n console.log(\"Title: \" + body.Title);\n console.log(\"\");\n console.log(\"Release Year: \" + body.Year);\n console.log(\"\");\n console.log(\"IMDB Rating: \" + body.imdbRating);\n console.log(\"\");\n console.log(\"Rotten Tomatoes Rating: \" + body.Ratings[1].Value);\n console.log(\"\");\n console.log(\"Country: \" + body.Country);\n console.log(\"\");\n console.log(\"Language: \" + body.Language);\n console.log(\"\");\n console.log(\"Plot: \" + body.Plot);\n console.log(\"\");\n console.log(\"Actors: \" + body.Actors);\n console.log(\"\");\n }\n });\n}", "function getPopularMovies() {\n\tif(G.hasInternet()) {\n\t\tvar url = CFG[\"URLS\"][\"MOVIES\"][\"POPULAR\"] + G.URL_PARAMETERS.API_KEY;\n\t\tvar xhr = Ti.Network.createHTTPClient({\n\t\t\ttimeout: 10000,\n\t\t\tonerror: function onerror(e) {\n\t\t\t\tG.info(e);\n\t\t\t},\n\t\t\tonload: function onload(e) {\n\t\t\t\ttry {\n\t\t\t\t\tparseResponse(this.responseText);\n\t\t\t\t\t$.movies.trigger('change');\n\t\t\t\t\t$.ptr.hide();\n\t\t\t\t} catch(e) {\n\t\t\t\t\tG.info(e);\t\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\txhr.open(\"GET\", url);\n\t\txhr.send();\n\t} else {\n\t\tinfo(\"No internet connection\");\n\t}\n}", "async function getMovies(req, res) {\n try {\n const movies = await movieService.query(req.query)\n res.send(movies)\n } catch (err) {\n logger.error(err);\n logger.error('Cannot get movies: ' + err.message);\n res.status(500).send({ error: 'cannot get movies' })\n }\n}", "function getMovies(query) {\n $.getJSON(\n `${movieApi.base}?s=${query}&apikey=${movieApi.key}`\n ) /* .getJSON method retrieves data from an external api */\n .then(function (response) {\n if (response.Response === \"True\") {\n let movies =\n response.Search; /* the api is stored in arrays, here a new var is created to select the particular array needed */\n let output = \"\";\n /* for each of the responses in JSON output html to the webpage */\n $.each(movies, function (index, movie) {\n output += `\n <div class=\"col-sm-6 col-md-4 col-lg-3\">\n <div class=\"search-card text-center\">\n <img src=\"${movie.Poster}\"/> \n <h4 class=\"white\" >${movie.Title}</h4>\n <a onclick=\"selectedMovie('${movie.imdbID}')\" class=\"details-button hvr-shutter-out-horizontal red\" href=\"#\" data-toggle=\"modal\" data-target=\"#modal\">Movie Details</a>\n </div>\n </div>\n `;\n });\n\n /* outputs the html to the div with #movies-to-collapse */\n $(\"#movies-to-collapse\").html(output);\n\n $(\".collapse-button-m\").show();\n } else {\n alert(\"Movie not found! Please enter a valid movie title or word.\")\n }\n\n })\n}", "function appendMovies(movies) {\n // TODO: append movies to #movies-container\n}", "function getMovies(req,res){\n token = req.headers['authorization'];\n jwt.verify(token, req.app.get('private-key'), function (err,decoded) {\n if(err){\n res.send(err,401).json({error:\"Invalid token\"});\n }else {\n movie.getMovies(req,function (err, movies) {\n if(err === 400){\n res.send(err,400);\n }\n else if (err !== 400 && err !== null) {\n res.send(err,404);\n }\n else {\n res.json(movies);\n }\n });\n }\n });\n\n}", "function displayMovies(movies) {\n console.log(movies);\n for (let i=0; i < movies.length; i++) {\n const movieId = cleanTitle(movies[i]);\n fetch(`https://imdb8.p.rapidapi.com/title/get-plots?tconst=${movieId}`, {\n\t \"method\": \"GET\",\n\t \"headers\": {\n\t\t\"x-rapidapi-host\": \"imdb8.p.rapidapi.com\",\n\t\t\"x-rapidapi-key\": rapidApiKey\n\t }\n })\n .then(resp => resp.json())\n .then(addMoviesHMTL)\n // when the last movie is added to the html shows the \"get movie recommendations\" button\n .then(() => {\n if (i+1 === movies.length) {\n recomButtton.style.display = 'block';\n }\n })\n }\n // function to clean the title info to fetch the api\n function cleanTitle(stringT) {\n let begins = stringT.indexOf('/', 1) + 1;\n let title = stringT.slice(begins, stringT.length - 1);\n return title;\n }\n}", "function getMovieTitles() { \n var findPattern = \"//a[contains(@class, 'filmname')]\";\n var resultLinks = document.evaluate( findPattern, document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null );\n\n var result = new Array();\n var i=0;\n while ( (res = resultLinks.snapshotItem(i) ) !=null ) {\n result[i] = res;\n i++;\n }\n return result;\n\n }", "function ex14() {\n\tvar movieLists = [\n\t\t\t{\n\t\t\t\tname: \"Instant Queue\",\n\t\t\t\tvideos : [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"id\": 70111470,\n\t\t\t\t\t\t\"title\": \"Die Hard\",\n\t\t\t\t\t\t\"boxarts\": [\n\t\t\t\t\t\t\t{ width: 150, height: 200, url: \"http://cdn-0.nflximg.com/images/2891/DieHard150.jpg\" },\n\t\t\t\t\t\t\t{ width: 200, height: 200, url: \"http://cdn-0.nflximg.com/images/2891/DieHard200.jpg\" }\n\t\t\t\t\t\t],\n\t\t\t\t\t\t\"url\": \"http://api.netflix.com/catalog/titles/movies/70111470\",\n\t\t\t\t\t\t\"rating\": 4.0,\n\t\t\t\t\t\t\"bookmark\": []\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"id\": 654356453,\n\t\t\t\t\t\t\"title\": \"Bad Boys\",\n\t\t\t\t\t\t\"boxarts\": [\n\t\t\t\t\t\t\t{ width: 200, height: 200, url: \"http://cdn-0.nflximg.com/images/2891/BadBoys200.jpg\" },\n\t\t\t\t\t\t\t{ width: 150, height: 200, url: \"http://cdn-0.nflximg.com/images/2891/BadBoys150.jpg\" }\n\n\t\t\t\t\t\t],\n\t\t\t\t\t\t\"url\": \"http://api.netflix.com/catalog/titles/movies/70111470\",\n\t\t\t\t\t\t\"rating\": 5.0,\n\t\t\t\t\t\t\"bookmark\": [{ id: 432534, time: 65876586 }]\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: \"New Releases\",\n\t\t\t\tvideos: [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"id\": 65432445,\n\t\t\t\t\t\t\"title\": \"The Chamber\",\n\t\t\t\t\t\t\"boxarts\": [\n\t\t\t\t\t\t\t{ width: 150, height: 200, url: \"http://cdn-0.nflximg.com/images/2891/TheChamber150.jpg\" },\n\t\t\t\t\t\t\t{ width: 200, height: 200, url: \"http://cdn-0.nflximg.com/images/2891/TheChamber200.jpg\" }\n\t\t\t\t\t\t],\n\t\t\t\t\t\t\"url\": \"http://api.netflix.com/catalog/titles/movies/70111470\",\n\t\t\t\t\t\t\"rating\": 4.0,\n\t\t\t\t\t\t\"bookmark\": []\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"id\": 675465,\n\t\t\t\t\t\t\"title\": \"Fracture\",\n\t\t\t\t\t\t\"boxarts\": [\n\t\t\t\t\t\t\t{ width: 200, height: 200, url: \"http://cdn-0.nflximg.com/images/2891/Fracture200.jpg\" },\n\t\t\t\t\t\t\t{ width: 150, height: 200, url: \"http://cdn-0.nflximg.com/images/2891/Fracture150.jpg\" },\n\t\t\t\t\t\t\t{ width: 300, height: 200, url: \"http://cdn-0.nflximg.com/images/2891/Fracture300.jpg\" }\n\t\t\t\t\t\t],\n\t\t\t\t\t\t\"url\": \"http://api.netflix.com/catalog/titles/movies/70111470\",\n\t\t\t\t\t\t\"rating\": 5.0,\n\t\t\t\t\t\t\"bookmark\": [{ id: 432534, time: 65876586 }]\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t];\n\n\n\t// Use one or more concatMap, map, and filter calls to create an array with the following items\n\t// [\n\t//\t {\"id\": 675465, \"title\": \"Fracture\", \"boxart\": \"http://cdn-0.nflximg.com/images/2891/Fracture150.jpg\" },\n\t//\t {\"id\": 65432445, \"title\": \"The Chamber\", \"boxart\": \"http://cdn-0.nflximg.com/images/2891/TheChamber150.jpg\" },\n\t//\t {\"id\": 654356453, \"title\": \"Bad Boys\", \"boxart\": \"http://cdn-0.nflximg.com/images/2891/BadBoys150.jpg\" },\n\t//\t {\"id\": 70111470, \"title\": \"Die Hard\", \"boxart\": \"http://cdn-0.nflximg.com/images/2891/DieHard150.jpg\" }\n\t// ];\n\n\treturn movieLists.concatMap(m=> m.videos\n .concatMap(v=>v.boxarts\n .filter(b=> b.width==150 && b.height==200)\n \t\t\t\t\t\t\t\t\t\t.map(b=> ({id: v.id, title: v.title, boxart: b.url}))\n ))\n // Complete this expression!\n\n}", "function getAvailableMovies(req, res, next) {\n movieRepository.findAvailables().then((result) => {\n res.status(200).send(result);\n }).catch(next);\n}", "function findAllTheatersForMovie(id) \n {\n var deferred = $q.defer();\n // GET the forms from the user that match the id\n $http.get(\"/api/project/theater/\", id)\n .success(function(response) \n {\n deferred.resolve(response);\n });\n\n return deferred.promise;\n }", "function howManyMovies (movies) {\n \n}", "async function getMovies(url) {\n var resp = await fetch(url);\n var respData = await resp.json();\n showMovies(respData.results);\n}", "async findAllFilms(filmCollection){\n return movie.find(filmCollection);\n }" ]
[ "0.7896138", "0.750089", "0.7351434", "0.7349381", "0.72145504", "0.7166099", "0.71202743", "0.71134067", "0.7093998", "0.7093998", "0.70887476", "0.70783573", "0.70686984", "0.7050777", "0.70307463", "0.69881386", "0.6978392", "0.697382", "0.6973663", "0.6956961", "0.69480634", "0.69101906", "0.6909439", "0.6904147", "0.6855818", "0.684331", "0.6800799", "0.67804533", "0.67781824", "0.6764531", "0.67641705", "0.67479026", "0.6745397", "0.67319524", "0.6696086", "0.66938287", "0.668983", "0.6678482", "0.66643065", "0.6663009", "0.6641294", "0.66409147", "0.6640558", "0.6633784", "0.66311723", "0.6629296", "0.6628888", "0.662102", "0.66207874", "0.6605845", "0.66006136", "0.6588518", "0.65803397", "0.65802723", "0.6580245", "0.65768814", "0.6566898", "0.65485543", "0.65465754", "0.6542931", "0.6538125", "0.65355945", "0.653232", "0.6526002", "0.65207744", "0.6515181", "0.6508823", "0.6492409", "0.64796966", "0.64721483", "0.64682925", "0.6468101", "0.6463036", "0.6461799", "0.6455352", "0.6454377", "0.64525056", "0.6451967", "0.6449455", "0.64434683", "0.64315647", "0.64278156", "0.64150286", "0.64048976", "0.64033824", "0.639932", "0.6397756", "0.63894117", "0.63846797", "0.63841075", "0.6383706", "0.6383701", "0.6382521", "0.6374582", "0.63691914", "0.6368547", "0.63634247", "0.63614315", "0.6361181", "0.6355263", "0.6353361" ]
0.0
-1
add movies in database
function CreateFilm(data) { $.ajax({ url: "/api/film", contentType: "application/json", method: "POST", data: JSON.stringify({ nameUa: data.nameUa, nameEn: data.nameEn, sourseImg: data.sourseImg, sourseVideo: data.sourseVideo, qualityVideo: data.qualityVideo, translation: data.translation, motto: data.motto, year: data.year, country: data.country, genre: data.genre, category: data.category, producer: data.producer, duration: data.duration, age: data.age, firstRun: data.firstRun }), success: function (film) { reset(); $("table tbody").append(row(film)); } }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function insertMovies(db) {\n movies.forEach(movie => {\n const sql = 'INSERT INTO movies(link, id, metascore, rating, synopsis, title, votes, year) ' +\n 'VALUES(\"' + movie.link + '\", \"' + movie.id + '\", ' + movie.metascore + ', ' + movie.rating +\n ', \"' + movie.synopsis + '\", \"' + movie.title + '\", ' + movie.votes + ', ' + movie.year + ')';\n db.run(sql);\n })\n console.log(\"Data from the movies.json file were inserted in the database.\");\n}", "async addFilm(film){\n return Movie.create(film)\n }", "async addFilm(film){\n return movie.create(film)\n }", "save(movie) {\n movie.id = crypto.randomBytes(20).toString('hex'); // fast enough for our purpose\n this.movieList.push(movie);\n return 1;\n }", "function saveMovieToList() {\n let addMovSect = document.querySelector(\"#addMovieSec\");\n // Get input fields values\n let fName = document.querySelector(\"#movName\").value;\n let fMovUrl = document.querySelector(\"#movUrl\").value;\n let fPostUrl = document.querySelector(\"#postUrl\").value;\n let fType = document.querySelector(\"#movType\").value;\n // create new movie\n let newMovie = new Movie(fName, fMovUrl, fPostUrl, fType);\n // add new movie to the collection\n movies.addMovie(newMovie);\n addMovSect.style.display = \"none\";\n reloadPosters();\n addImageEvents();\n //reset input fields\n fName.value = \"\";\n fMovUrl.value = \"\";\n fPostUrl.value = \"\";\n fType.value = \"\";\n}", "async function addToMovieTable(movie, user) {\n const result = await db.Movie.findOne({\n where: {\n apiReferenceId: movie.apiReferenceId\n }\n });\n if (!result) {\n db.Movie.create(movie).then((response) => {\n db.User.update(\n {\n movieOnDeckId: response.id\n },\n {\n where: {\n id: user\n }\n }\n ).then(() => {\n console.log(\"Movie was added to movie table\");\n });\n });\n } else {\n db.User.update(\n {\n movieOnDeckId: result.id\n },\n {\n where: {\n id: user\n }\n }\n ).then((result) => {\n console.log(\"Updated \"+ result + \" rows\");\n });\n }\n}", "function insertAwesome(db) {\n awesome.forEach(movie => {\n const sql = 'INSERT INTO awesome(link, id, metascore, rating, synopsis, title, votes, year) ' +\n 'VALUES(\"' + movie.link + '\", \"' + movie.id + '\", ' + movie.metascore + ', ' + movie.rating +\n ', \"' + movie.synopsis + '\", \"' + movie.title + '\", ' + movie.votes + ', ' + movie.year + ')';\n db.run(sql);\n })\n console.log(\"Data from the awesome.json file were inserted in the database.\");\n}", "function addMovie(data) {\n var val = data.val();\n viewModel.movies.push(new Movie(val));\n}", "async function addMovieHandler(movie) {\n console.log(movie);\n const response = await fetch('https://react-http-test-d8033-default-rtdb.asia-southeast1.firebasedatabase.app/movies.json', {\n // We define the 'fetch' method to POST to send data to the database\n method: 'POST',\n // We need to send a JSON object, not a JavaScript object\n body: JSON.stringify(movie),\n // Headers for REST APIs\n headers: {\n 'Content-Type': 'application/json',\n }\n });\n const data = await response.json();\n console.log(data);\n }", "function addMovie(title){\n $.ajax({\n url: './db/movies',\n type: 'PUT',\n data: {title: title, rating: 0},\n success: function(result) {\n console.log(\"successfully added movie to collection\")\n }\n });\n event.preventDefault();\n}", "function addMovie(movieText) {\n console.log(movieText);\n fetch(url, {\n method: \"POST\",\n headers: { \"Content-type\": \"application/json\" },\n body: JSON.stringify({\n title: movieText,\n watched: false,\n created_at: moment().format(),\n }),\n })\n .then((response) => response.json())\n .then((movie) => createMovieBox(movie));\n}", "function insertMovieIntoWatched(user, movie) {\n\n findOne(user, function (err, account) {\n if (err) throw err;\n console.log('this user is', user)\n account.watched.unshift(movie);\n account.save();\n // console.log(account.watched);\n // console.log('adding movie: ', movie)\n // console.log('to Watched for account: ', account);\n // console.log('for user: ', username);\n });\n}", "function addMovie(addedMovie) {\n AJAXRequest(serverURL, 'POST', addedMovie).then(getAllMovies)\n }", "function addMovie( e ){\n var dict = {\n \tMovieId: this[\"movieid\"].value,\n \tTitle : this[\"title\"].value,\n \tGenre: this[\"genre\"].value,\n \tDirector: this[\"director\"].value\n };\n var url = \"\";\n var httpType = \"\";\n //var movieId = getMovieById();\n if (dict.MovieId) {\n \turl = \"https://localhost:44352/api/movie/\" + dict.MovieId;\n \thttpType = \"put\";\n }\n else{\n \turl = \"https://localhost:44352/api/movie/\";\n \thttpType = \"post\";\n }\n $.ajax({\n url: url,\n dataType: 'json',\n type: httpType,\n contentType: 'application/json',\n data: JSON.stringify(dict),\n success: function( data, textStatus, jQxhr ){\n $('#response pre').html( data );\n alert(\"Success\");\n },\n error: function( jqXhr, textStatus, errorThrown ){\n console.log( errorThrown );\n }\n });\n\n e.preventDefault();\n }", "onSaveMovie() {\n let obj = { title: this.title, year: this.year };\n this.dbService.createMovie(obj).subscribe(result => {\n this.onGetMovies();\n });\n }", "async addFilm(newMovie) {\n return Film.create(newMovie);\n }", "async function loadMovies() {\n try {\n await movieModel.deleteMany();\n await movieModel.collection.insertMany(movies);\n console.info(`${movies.length} movies were successfully stored.`);\n } catch (err) {\n console.error(`failed to Load movie Data: ${err}`);\n }\n}", "add(movie) {\n\t\tthis.push(movie);\n\t}", "function createMovie(e) {\n e.preventDefault();\n const title = $(\"#title\").val();\n if (title.length < 2) {\n return;\n }\n const rating = $(\"#rating\").val();\n const movieData = { title, rating, id: currentMovieID };\n movieMap.push(movieData);\n\n $(\"#movie-table\").append(createMovieHTML(movieData));\n $(\"#movie-form\").trigger(\"reset\");\n currentMovieID++;\n}", "function insertIMDbLinks() {\n\t\tvar movieNodes = getMovieTitles();\n \n\t\tvar i=0;\n while ( movieNodes[i] !=null ) { \n insertRating(movieNodes[i]);\n i++;\n }\n\t}", "function addMovie(req,res,next){\n // var tID = req.params.id;\n db.any(`INSERT INTO movies(title, img_url, year, rating, director, plot, actors) VALUES($1,$2,$3,$4,$5,$6,$7) RETURNING movie_id;`,\n [req.body.title, req.body.img_url, req.body.year, req.body.rating, req.body.director, req.body.plot, req.body.actors])\n .then((data)=>{\n console.log(data); // need to get movie_id\n var showTimes = req.body.showTimes; // string or array?\n // iterate & add each showTime to theatre_movie_showtime table\n for(var i in showTimes){\n addShowtime(data.movie_id_holder, req.params.id, showTimes[i]);\n }\n next();\n })\n .catch(()=>{\n console.log('ERROR in ADDING MOVIE!');\n }) \n}", "function AddViewMovie(id) {\n var params = {\n TableName: \"Movies\",\n Key: {\n id: id\n },\n UpdateExpression:\n \"set movieview=movieview+:cnt\",\n \n ExpressionAttributeValues: {\n \":cnt\": 1\n },\n ReturnValues: \"UPDATED_NEW\"\n };\n docClient.update(params, function (err, data) {\n if (err) {\n console.error(\n \"Unable to update item. Error JSON:\",\n JSON.stringify(err, null, 2)\n );\n } else {\n console.log(JSON.stringify(data));\n return true;\n }\n });\n}", "function addMovie(movieId, w){\r\n sessionStorage.setItem('movieId', movieId);\r\n if(w == 1)\r\n addToWatched();\r\n else\r\n addToWished();\r\n}", "async function createMovie() {\n const data = await knex(\"movies\").insert({\n title: \"test movie\",\n year: \"2021\",\n rating: 94,\n genre_id: 5,\n });\n console.log(data);\n}", "function clickToAdd(e) {\n var thisMovieImdbId = e.target.id; // grabs movie in search results from id on add button\n // var thisMovieImdbId = allResults[thisMovieId].imdbID; // grabs proper movie information given correct id\n $.ajax({ // Makes the next api request to get full listing on movie, not just search results (which were abbreviated)\n url: \"http://www.omdbapi.com/?i=\" + thisMovieImdbId + \"&r=json\"\n }).done(function(fullMovieListing) {\n\n // Need If Then Poster\n if (fullMovieListing.Poster !== \"N/A\") {\n fullMovieListing.Poster = \"http://img.omdbapi.com/?i=\" + thisMovieImdbId + \"&apikey=8513e0a1\";\n }\n \n // Sends full movie listing, with user login ID, to store on website database\n grabmovies.findMovie(fullMovieListing, authInfo);\n\n });\n }", "function pushData(e){\n e.preventDefault();\n //Values\n const link = document.querySelector('.movie-link').value;\n if(link != '' && id != ''){\n db.collection(\"movie\").add({\n link: link,\n id: id,\n timestamp:today\n })\n .then(function(docRef) {\n console.log(\"Document written with ID: \", docRef.id);\n })\n .catch(function(error) {\n console.error(\"Error adding document: \", error);\n });\n }\n else console.log('Missing')\n \n \n \n\n}", "async addToCollection(ctx, payload) {\n if(payload.id != false) {\n let movieArr = [];\n await axios.get('http://www.omdbapi.com/?i=' + payload.id + '&apikey='+key.key).then((response) => { movieArr = response.data });\n if(movieArr.Ratings == '') {\n movieArr.Ratings.push({none: 'none'})\n }\n let movie = {\n Title: movieArr.Title,\n Director: movieArr.Director,\n Writer: movieArr.Writer,\n Actors: movieArr.Actors,\n Plot: movieArr.Plot,\n shelf: payload.shelf,\n soundtrack: payload.soundtrack,\n rating: payload.rating,\n format: payload.format,\n edition: payload.edition,\n Genre: movieArr.Genre,\n Ratings: movieArr.Ratings,\n Year: movieArr.Year,\n Runtime: movieArr.Runtime,\n imdbID: movieArr.imdbID,\n Poster: movieArr.Poster\n }\n await db.collection(auth.currentUser.uid).add({\n movie: movie\n })\n } else {\n let movie = {\n Title: payload.title,\n Director: payload.director,\n Writer: payload.writer,\n Actors: payload.actors,\n Plot: payload.plot,\n shelf: payload.shelf,\n soundtrack: payload.soundtrack,\n rating: payload.rating,\n format: payload.format,\n edition: payload.edition,\n Genre: payload.genre,\n Ratings: payload.ratings,\n Year: payload.year,\n Runtime: payload.runtime,\n imdbID: payload.imdbID,\n Poster: payload.poster\n }\n await db.collection(auth.currentUser.uid).add({\n movie: movie\n })\n\n }\n await ctx.dispatch('fetchUserCollection', auth.currentUser.uid)\n }", "function listenForAddToFirebase() {\r\n const createForm = document.querySelector('#add-movie-form');\r\n createForm.addEventListener('submit', e => {\r\n e.preventDefault();\r\n db.collection('movies').add({\r\n name: Client.capitalize(createForm['movie-name'].value),\r\n year: parseInt(createForm['movie-year'].value)\r\n }).then(() => {\r\n createForm.reset()\r\n }).catch(err => {\r\n console.log(err.message)\r\n });\r\n });\r\n\r\n // const fetchForm = document.querySelector('#fetch-movies-form');\r\n // fetchForm.addEventListener('submit', async (e) => {\r\n // e.preventDefault();\r\n // let data = {\r\n // eventStart: fetchForm['fetch-movies-event-start'].value,\r\n // eventEnd: fetchForm['fetch-movies-event-end'].value,\r\n // yearStart: fetchForm['fetch-movies-year-start'].value,\r\n // yearEnd: fetchForm['fetch-movies-year-end'].value\r\n // };\r\n // let movies = await Client.getMovies(`${Client.localUrl}/getMovies`, data);\r\n // Client.displayMovies(movies)\r\n // });\r\n}", "function addNewMovie() {\n\tconsole.log(\"\\n\");\n\tconsole.log(SPACER);\n\tlet title = PROMPT.question(\"Movie title: \");\n\tmovies.push({\n\t\ttitle: title,\n\t\tratings: []\n\t});\n}", "function addMovies() {\n fetch('https://ghibliapi.herokuapp.com/films')\n .then(response => response.json())\n .then(movies => movies.forEach(movie => addCard(movie)))\n .catch(err => console.err);\n}", "async function collect(req, res) {\n try {\n const id = req.params.id;\n const movies = await imdb(id);\n\n await movies_model.insertMany(movies);\n\n res.status(200).json({\n Total: movies.length\n });\n } catch (err) {\n res.status(404).json({\n status: 'fail',\n message: err\n });\n }\n}", "function insertFilm(){\n\tvar addTitle = $('#addTitle').val();\n\tvar addYear = $('#addYear').val();\n\tvar addDirector = $('#addDirector').val();\n\tvar addStars = $('#addStars').val();\n\tvar addReview = $('#addReview').val();\n\t\n\tconsole.log(\"https://eloquent-yew-227217.appspot.com/InsertFilm?Title=\"+addTitle+\"&Year=\"+addYear+\"&Director=\"+addStars+\"&Stars=\"+addStars+\"&Review=\"+addReview);\n\taddMovieAjax(\"https://eloquent-yew-227217.appspot.com/InsertFilm?Title=\"+addTitle+\"&Year=\"+addYear+\"&Director=\"+addStars+\"&Stars=\"+addStars+\"&Review=\"+addReview,\"#results\");\n}", "function addMovieLocalStorage(movie) {\n\tlet moviesList = getMoviesFromStorage();\n\n\t// Add the movie into array\n\tmoviesList.push(movie);\n\n\t// Convert movie array into String\n\tlocalStorage.setItem('movies', JSON.stringify(moviesList));\n}", "function addMovie(movieFormObj) {\n console.log(\"addMovie\", movieFormObj);\n return new Promise((resolve, reject) => {\n $.ajax({\n url: `${firebase.getFBsettings().databaseURL}/movies.json`,\n type: 'POST',\n data: JSON.stringify(movieFormObj),\n dataType: 'json'\n }).done((movieID) => {\n resolve(movieID);\n });\n });\n}", "add(event){\n const title = event.target.parentNode.parentNode.querySelector('.title').textContent;\n const year = event.target.parentNode.parentNode.querySelector('.year').textContent;\n const poster = event.target.parentNode.parentNode.querySelector('.poster').getAttribute(\"src\");\n\n this.db.put({\n _id: title,\n year,\n poster\n }).then(rsp => {\n console.log('rsp', rsp);\n }).catch(function (err) {\n console.log(err);\n });\n }", "createRelatedMovie(movies) {\n this.relatedMovie.innerHTML = ''\n let ul = `<ul>`\n if (movies) {\n movies.forEach(movieName => {\n ul += `<li id=\"${movieName.id}\"><a href=\"#\" id=\"${movieName.id}\">${movieName.original_title}</a></li>`\n })\n }\n ul += `</ul>`\n this.relatedMovie.insertAdjacentHTML('afterbegin', ul)\n }", "function insertMovie(movie) {\n // console.log(movie);\n return Movies.create({\n tmdbId: movie.tmdbId,\n title: movie.title,\n budget: movie.budget,\n revenue: movie.revenue,\n estimatedProfit: movie.estimatedProfit,\n releaseDate: movie.releaseDate,\n trailerKey: movie.trailerKey, \n overview: movie.overview\n\n }).then((newMovie) => {\n let promises = [];\n // newMovie.dataValues.id;\n for (let i = 0; i < movie.genres.length; i++) {\n promises.push(Genres.findOrCreate({\n where: {\n genreName: movie.genres[i],\n },\n }).then((genre) => {\n return GenresMovies.create({\n movieId: newMovie.dataValues.id,\n genreId: genre[0].dataValues.id,\n });\n }));\n }\n for (let j = 0; j < movie.productionCompanies.length; j++) {\n promises.push(ProductionCompanies.findOrCreate({\n where: {\n companyName: movie.productionCompanies[j]\n },\n }).then((company) => {\n return ProductionCompaniesMovies.create({\n movieId: newMovie.dataValues.id,\n productionCompanyId: company[0].dataValues.id\n });\n }));\n }\n\n for (var k = 0; k < movie.images.length; k++) {\n promises.push(Images.create({\n url: movie.images[k],\n movieId: newMovie.dataValues.id\n }));\n }\n\n for (var l = 0; l < movie.trendData.length; l++) {\n promises.push(TrendData.create({\n formattedAxisTime: movie.trendData[l].formattedAxisTime,\n dataValue: movie.trendData[l].value,\n movieId: newMovie.dataValues.id\n }));\n }\n return Promise.all(promises);\n });\n // for (var i = 0; i < movie.genres; i++) {\n // Genres.create({\n // genreName: movie.genres[i]\n // });\n // Images.create({\n // url: movie.images[i],\n // movieId:\n // });\n // }\n}", "function createMovie() {\n var title = document.querySelector(\"#movie-title\").value.trim();\n var length = document.querySelector(\"#movie-length\").value;\n var formSelect = document.querySelector(\"#movie-genre\");\n var genre = formSelect.options[formSelect.selectedIndex].value;\n\n var movie = new Movie(title, length, genre);\n\n // Check if movie already exists\n if (listOfMovies.hasElem(movie)) {\n alert(\"movie already exist\");\n return;\n }\n\n var movieItem = document.createElement(\"li\");\n var movieText = document.createTextNode(movie.getData());\n\n movieItem.appendChild(movieText);\n movieUlList.appendChild(movieItem);\n\n // Push created movie to global list of movies and get it's index\n var movieIndex = listOfMovies.push(movie) - 1;\n\n // Put created movie to the drop-down menu\n var option = document.createElement(\"option\");\n option.value = movieIndex;\n var text = document.createTextNode(movie.title);\n option.appendChild(text);\n movieSelector.appendChild(option);\n\n // Reset form\n document.querySelector(\"#movie-form\").reset();\n}", "function addMovieSucceded(result) {\n //notificationService.displaySuccess($scope.genre.Name + ' has been submitted to Home Cinema');\n console.log(\"add triggered 3>\" + result.data.Result);\n $scope.account = result.data.Result.Items;\n //$scope.items = result.data.Result.Items; \n\n $scope.items = result.data;\n\n $scope.page = result.data.Result.Page;\n $scope.pagesCount = result.data.Result.TotalPages;\n $scope.totalCount = result.data.Result.TotalCount;\n //$scope.movie = response.data;\n //if (movieImage) {\n // fileUploadService.uploadImage(movieImage, $scope.movie.ID, redirectToEdit);\n //}\n //else\n // redirectToEdit();\n }", "function update_movie(id) {\r\n db.collection('movies').doc(id).update({\r\n name: 'TODO'\r\n })\r\n}", "addMovie(movie){\n if(WatchListStore.movies.some(item => item.id === movie.id)){\n alert(\"This Movie is already on your watch list\");\n }\n else{\n WatchListStore.movies.push(movie);\n localStorage.setItem(\"watch_list\", JSON.stringify(WatchListStore.movies));\n }\n }", "function updateMovies(movie){\n if(movie.destinationId){\n var form = FormApp.openById(movie.formId);\n form.setDescription(' \\n Format: ' + movie.format + \n ' \\n DCP Drive Type: ' + movie.dcpDriveType + \n ' \\n DCP File Size: ' + movie.dcpFileSize +\n ' \\n DCP Encription: ' + movie.dcpEncryption + \n ' \\n DCP Notes: ' + movie.dcpNotes +\n ' \\n Aspect Ratio: ' + movie.aspectRatio + \n ' \\n Sound Format: ' + movie.soundFormat +\n ' \\n Runtime: ' + movie.runtime + \n ' \\n Backup: ' + movie.backupFormat\n );\n }\n \n}", "function update_MovieCast(movieName, newCast){\r\n\r\n movieClass.collection.findOneAndUpdate(\r\n {movieName: movieName}, \r\n { \r\n $push: {\r\n cast: `${newCast}`},\r\n }\r\n );\r\n console.log('DB Updated');\r\n}", "function addFilm(id) {\n let usersRef = db.collection('users');\n let url = \"\".concat(baseURLFilms, 'movie/', id,'?api_key=', APIkey);\n let query = usersRef.where(\"email\", \"==\", firebase.auth().currentUser.email);\n fetch(url)\n .then(result => result.json())\n .then(data => {\n query.get().then(QuerySnapshot => {\n QuerySnapshot.forEach(doc => {\n shows = doc.data().shows;\n shows.forEach(show => {\n if (show.id == data.id) {\n stop = true;\n }\n })\n if (!stop) {\n shows.push({id: data.id, type: 'film'});\n userRef = db.collection(\"users\").doc(doc.id);\n userRef.update({\n shows: shows\n })\n }\n })\n })\n })\n}", "function postMovies() {\n var movieIds = movies.map(function(movie) {\n return movie._id;\n });\n return $.ajax({\n type: 'POST',\n url: '/api/update/movies',\n data: {\n userid: userid,\n movies: JSON.stringify(movieIds)\n },\n dataType: 'json',\n error: function(err) {\n console.log(err.responseText);\n }\n });\n}", "function saveMovie(movie) {\n if (!movie) return 'No movie to save';\n chrome.storage.sync.set({'movie': movie})\n}", "function submitMovie() {\n event.preventDefault();\n // console.log('Adding new Movie:', movieTitle, imageUrl, movieDescription, movieGenre);\n dispatch({type: 'ADD_NEW_MOVIE', payload: \n {\n title: movieTitle ,\n poster: imageUrl, \n description: movieDescription, \n genre_id: movieGenre\n }\n })\n history.push('/');\n\n }", "function buildMovieData(movies) {\n // let result = movies.find(movie => (removeSpecial(movie.title)).toLowerCase() == movieAndDinnerObject.movieName);\n let result = movies.find(movie => movie.title == movieAndDinnerObject.movieName);\n\n movieData.movieName = result.title;\n $(\"#jumbotronText\").html(movieData.movieName);\n let showTimes = result.showtimes;\n // console.log(showTimes);\n var theaters = [];\n\n showTimes.forEach(function (showTime) {\n if (!theaters[showTime.theatre.name]) {\n if (!itExists(theaters, showTime.theatre.name, showTime)) {\n newTheater = { theaterName: showTime.theatre.name, showTimes: [] }\n theaters.push(newTheater) //= { showTimes: [] }\n } else {\n console.log(\"exists: \" + showTime.theatre.name);\n }\n }\n })\n movieData.theaters = theaters;\n // console.log(movieData);\n database.ref().push(movieData.movieName);\n database.ref().push(result.showtimes);\n }", "function appendMovies(movies) {\n // TODO: append movies to #movies-container\n}", "static addFilmToStorage(films)\n {\n let newFilm = this.getFilmsFromStorage();\n newFilm.push(films);\n localStorage.setItem('films',JSON.stringify(newFilm));\n }", "displayRelatedMovie(movies) {\n // It create all html element with movie data\n this.createRelatedMovie(movies)\n }", "function movieUpdate() {\n $('#insertMovies').html(\"\");\n getMovies().then((movies) => {\n console.log('Here are all the movies:');\n movies.forEach(({title, rating, id}) => { //loops through each movie in the array\n $('#insertMovies').append(`<tr id=\"${id}-movie\">\n <td class=\"title\">${title}</td>\n <td class=\"rating\">${rating}</td>\n </tr>`);\n console.log(`id#${id} - ${title} - rating: ${rating}`);//logs movie\n });\n//catch in case something goes wrong\n }).catch((error) => {\n alert('Oh no! Something went wrong.\\nCheck the console for details.');\n // console.log(error);\n });\n }", "function createMovie(movie) {\n let elMovie = movieTemplate.cloneNode(true);\n\n elMovie.querySelector(\".movie-img\").src = movie.poster;\n elMovie.querySelector(\".movie-img\").width = \"300\";\n elMovie.querySelector(\".movie-title\").textContent = movie.title;\n\n movie.genres.forEach((genre) => {\n let newGenreLi = makeElement(\"li\");\n\n newGenreLi.textContent = genre;\n elMovie.querySelector(\".genre-list\").appendChild(newGenreLi);\n\n getMovieGenre(genre);\n });\n\n elMovie.querySelector(\".movie-year\").textContent = date(movie.release_date);\n elMovie.querySelector(\".item-btn\").dataset.id = movie.id;\n elMovie.querySelector(\".bookmark-btn\").dataset.id = movie.id;\n\n movieList.appendChild(elMovie);\n}", "function editMovie(req,res,next){\n // var mID = req.params.id;\n db.none(`UPDATE movies SET title=($1), year=($2), rating=($3), director=($4), plot=($5), actors=($6) WHERE movie_id=($7);`,\n [req.body.title, req.body.year, req.body.rating, req.body.director, req.body.plot, req.body.actors, req.params.id])\n .then(()=>{\n console.log('UPDATE COMPLETED!'); // testing status for UPDATE\n next();\n })\n .catch(()=>{\n console.log('ERROR in EDITING MOVIE DETAILS!');\n })\n}", "function searchAndAddMovie($, obj) {\n logger.trace(\"Entering searchAndAddMovie function\");\n var data2 = $(this).parent();\n data2 = findData(data2);\n do {\n var title = data2.find(\"a\").attr(\"title\");\n var href = data2.find(\"a\").attr('href');\n addUrl(href, obj);\n if (title !== null && title !== \"\" && title !== undefined) {\n if (!contains(obj.movies, title)) {\n obj.movies.push(title);\n }\n }\n data2 = data2.next();\n } while (data2.next().length !== 0);\n}", "async addMovieNightList(ctx, payload) {\n var docRef = await db.collection(auth.currentUser.uid);\n var data = [];\n var name = payload.name\n payload.list.map(movie => movie.seen = false);\n payload.list.forEach(movie => {\n data.push(movie)\n });\n await docRef.add({\n movieNightList: data,\n name: name,\n });\n await ctx.dispatch('fetchMovieNightLists');\n }", "async editMovieInCollection(ctx, movie) {\n let collection = await db.collection(auth.currentUser.uid).get();\n let number = 0;\n let film = ctx.getters.getSelectedMovie;\n await collection.forEach(doc => {\n Object.keys(doc.data()).forEach(function(key) { \n if(doc.data()[key].Actors == film.Actors && doc.data()[key].Director == film.Director && \n doc.data()[key].Genre == film.Genre && doc.data()[key].Plot == film.Plot && \n doc.data()[key].Title == film.Title && doc.data()[key].edition == film.edition && \n doc.data()[key].format == film.format && doc.data()[key].shelf == film.shelf && \n doc.data()[key].rating == film.rating) {\n if(number == 0) {\n db.collection(auth.currentUser.uid).doc(doc.id).set({\n movie\n });\n number = 1;\n }\n } \n });\n });\n number = 0;\n await ctx.dispatch('fetchUserCollection', auth.currentUser.uid);\n ctx.commit('setEditMovie', false);\n }", "saveBook(movie) {\n movie.id = crypto.randomBytes(20).toString('hex'); // fast enough for our purpose\n this.bookList.push(movie);\n\n for (var i = 0; i < this.bookList.length; i++) {\n console.log(this.bookList[i].author);\n }\n return 1;\n }", "function addMovieToLibrary(movie_id) {\n\t// Reset timer in case it's ticking\n\ttimerInf = \"\";\n\tshowInfo('Adding...', false);\n\t$.post('/library/add_movie/' + movie_id + '/', function(msg) {\n\t\tif(msg == 'err_login') {\n\t\t\tshowInfo('You need to <a href=\"/login\">log in</a> or <a href=\"/register\">register</a> to add a movie to your library.', false);\n\t\t} else if(msg == 'alr') {\n\t\t\tshowInfo('You have already added this movie to your library.', true);\n\t\t} else if(msg == 'no_movie') {\n\t\t\tshowInfo('You have not selected a movie.', true);\n\t\t} else {\n\t\t\tshowInfo(msg, false);\n\t\t\t$('#add_movie_form').submit(function() {\n\t\t\t\tvar tags = $('#add_movie_tags').val();\n\t\t\t\tif(tags != '') {\n\t\t\t\t\tshowInfo('Adding...', false);\n\t\t\t\t\t$.post('/library/add_movie/' + movie_id + '/', { tags: tags }, function(msg) {\n\t\t\t\t\t\tif(msg == 'alr') {\n\t\t\t\t\t\t\tshowInfo('You have already added this movie to your library.', true);\n\t\t\t\t\t\t} else if(msg == 'err_login') {\n\t\t\t\t\t\t\tshowInfo('You need to <a href=\"/login\">log in</a> or <a href=\"/register\">register</a> to add a movie to your library.', false);\n\t\t\t\t\t\t} else if(msg == 'ok') {\n\t\t\t\t\t\t\tshowInfo('The movie has been added to your library.', true);\n\t\t\t\t\t\t\t$('#boxxed_movie_' + movie_id).css('background-color', '#ddffdd');\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\talert('Please describe where you have stored the movie.');\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t});\n\t\t\t// Auto focus\n\t\t\t$('#add_movie_tags').focus();\n\t\t\t// Autocomplete de concepto\n\t\t\t$(\"#add_movie_tags\").autocomplete('/ac_tags', {\n\t\t\t\tmultiple: true,\n\t\t\t\tautoFill: true\n\t\t\t});\n\t\t}\n\t});\n}", "function addMovieToProgram(movie, program) {\n\n movie_err.textContent = \"\";\n \n if(movie.value !== \"\" && program.value !== \"\") {\n\n var movieValue = movie.value;\n var programValue = program.value;\n\n var movie = festival.movieList[movieValue]\n var program = festival.programList[programValue];\n program.addMovie(movie);\n\n\n var liUpdate = document.querySelector(\"#movie-item-\" + programValue);\n var optionUpdate = document.querySelector(\"#program-item-\" + programValue);\n liUpdate.textContent = program.getData();\n optionUpdate.textContent = program.getData();\n\n program_select.value = \"\";\n movie_select.value = \"\";\n \n } else {\n movie_err.textContent = \"All fields are required!\";\n }\n}", "handleMovieAdd() {\n var newMovie = document.getElementById('new-movie-input').value.trim();\n if (newMovie) {\n var newMovies = this.state.movies.concat([{title: newMovie, watched: false}]);\n var newDisplayedMovies = this.resetDisplayedMovies(newMovies);\n this.setState({\n movies: newMovies,\n displayedMovies: newDisplayedMovies // re-render shows all movies including new one\n });\n }\n }", "function createDatabase(req, res) {\n // Set up AWS and DynamoDB\n var AWS = require(\"aws-sdk\");\n AWS.config.update({region: \"us-east-1\"});\n var dynamodb = new AWS.DynamoDB();\n\n // Specify movie parameters for the table\n var params = {\n TableName : \"Movies\",\n KeySchema: [ \n { AttributeName: \"year\", KeyType: \"HASH\"}, // Partition key\n { AttributeName: \"title\", KeyType: \"RANGE\" } // Sort key\n ],\n AttributeDefinitions: [ \n { AttributeName: \"year\", AttributeType: \"N\" },\n { AttributeName: \"title\", AttributeType: \"S\" }\n ],\n ProvisionedThroughput: { \n ReadCapacityUnits: 5, \n WriteCapacityUnits: 5\n }\n };\n\n // Create the table\n dynamodb.createTable(params, function(err, data) {\n if (err) {\n console.error(\"Error in creating table. Error JSON:\", JSON.stringify(err, null, 2));\n } else {\n console.log(\"Table creation successful. Table description JSON:\", JSON.stringify(data, null, 2));\n }\n });\n\n // Fetch movie data from the S3 object\n // Have a 5 second delay\n let p = new Promise((res) => {\n setTimeout(() => {\n // Fetch S3 data\n const s3 = new AWS.S3();\n let objectData = null;\n var getParams = {\n // provided in the assignment description\n Bucket: 'csu44000assign2useast20',\n Key: 'moviedata.json'\n }\n\n s3.getObject(getParams, function(err, data) {\n if (err) {\n return err;\n }\n\n objectData = data.Body.toString('utf-8');\n var jsonData = JSON.parse(objectData);\n var docClient = new AWS.DynamoDB.DocumentClient();\n \n // Now add data to database\n console.log(\"Please wait.....Ipmporting movies to DynamoDB\");\n jsonData.forEach(function(movie) {\n var params = {\n TableName: \"Movies\",\n Item: {\n \"year\": movie.year,\n \"title\": movie.title,\n \"info\": movie.info\n }\n };\n\n docClient.put(params, function(err, data) {\n if (err) {\n console.error(\"Unable to add movie\", movie.title, \". Error JSON:\", JSON.stringify(err, null, 2));\n } else {\n console.log(\"Item added successfully: \", movie.title);\n }\n });\n });\n });\n }, 5000);\n });\n\n console.log(\"All records sucessfully received !!!\");\n}", "async updateFilm(id,film){\n return Movie.findByIdAndUpdate(id,film,{new: true})\n }", "function addEventListeners() {\n $(`.deleteButton`).click(function (e) {// delete function\n e.preventDefault();\n const movieIdToDelete = $(this).attr(`data-id`);\n console.log(movieIdToDelete);\n deleteMovie(movieIdToDelete);\n })\n $('#submit-movie').click(function (e) {// add movie function\n e.preventDefault();\n let movieTitle = $('#title-input').val();//grabs what is typed in html and puts it into new card poster\n let moviePlot = $(\"#plot-input\").val();\n let movieRating = $(\"#rating-select\").val();\n let addedMovie = {title: movieTitle, plot: moviePlot, rating: movieRating};\n addMovie(addedMovie);\n console.log(addMovie);\n })\n $('.editMovie').click(function (e) {// edit movie info/ rating function\n e.preventDefault();\n // .modal(`show`)\n // .modal(`hide`)\n\n const movieToBeEdited = $(this).attr(`data-id`);\n // const originalMovie = localMovies.filter(movie => movieID == movie.id)[0]\n // $('#titles-input').val(originalMovie.year)\n console.log(movieToBeEdited);\n updateMovie(movieToBeEdited)\n\n // let movieRating = $(\"#rating-select\").val();\n updateMovie(movieToBeEdited); //old version updateMovie(addedMovie)\n console.log(updateMovie);\n // .modal(`hide`)\n })\n $('.loading').hide();\n }", "function Movie(name,year,genre,cast,description){\n this.name = name\n this.year = year\n this.genre = genre\n this.cast = cast\n this.description = description\n}", "async updateFilm(id, title){\n const idFound = movie.findOne({id: id})\n return idFound.update(title)\n }", "function createMovie() {\n //create new movie\n var movieObject = new Movie (titleNode.value, lengthNode.value, genreNode.value);\n \n \n if(!titleNode.value){\n alert(\"Title is empty\");\n } else if(!lengthNode.value){\n alert(\"Length is empty\");\n } else if(genreNode.value === \"-\"){\n alert(\"You must chose genre\");\n }\n \n var index = festival.addMovie(movieObject);\n //create li element to put list of movie\n var createLiElementNode = document.createElement(\"li\");\n\n //add text to li\n createLiElementNode.textContent = movieObject.getData();\n\n //add li in list\n ulListForAddMovieNode.appendChild(createLiElementNode);\n\n //add movie to movie list in program\n var createOptionNode = document.createElement(\"option\");\n createOptionNode.textContent = movieObject.getData();\n createOptionNode.setAttribute(\"value\", index);\n addMovieToListInProgramNode.appendChild(createOptionNode);\n\n //clear value\n titleNode.value = \"\";\n lengthNode.value = \"\";\n genreNode.value = \"-\";\n}", "function newMovieSuccess(json) {\n\t$('#newMovieForm input').val('');\n\tallMovies.push(json);\n\trender();\n}", "function addToFavorites() {\n // Loads the movie\n FirebaseManager.loadMovie(this.queryInt).then(function(success) {\n // Adds the movie to the favorites list\n FirebaseManager.addFavoriteMovie(success, sessionStorage.getItem('uid'))\n // Changes the button text\n document.getElementById('add').innerHTML = \"Remove from Favorite Movie List\"\n });\n \n}", "function saveMyMovies(){\n let now = moment();\n console.log(now);\n\n // getting user and API input\n let myPoster = $(\"#confirm-poster\").html();\n let myTitle = $(\"#my-title\").text();\n let myYear = $(\"#year-released\").text();\n let myGenre = $(\"#my-genre\").text();\n let myDir = $(\"#director-name\").text();\n let myCast = $(\"#top-billed\").text();\n let myPlot = $(\"#movie-plot\").text();\n let myRating = $(\"#my-rating\").val();\n let myReview = $(\"#my-review\").val();\n\n\n // getting array of objects from local storage or creating a new one if there is none\n let stringMyMovies = localStorage.getItem(\"MyMovies\") || \"[]\";\n let parsedMyMovies= JSON.parse(stringMyMovies);\n\n // building myMovie object with user and API inputs\n let myMovie = {};\n myMovie.poster = myPoster;\n myMovie.title = myTitle;\n myMovie.year = myYear;\n myMovie.genre = myGenre;\n myMovie.director = myDir;\n myMovie.cast = myCast;\n myMovie.plot = myPlot;\n myMovie.rating = myRating;\n myMovie.review = myReview;\n myMovie.time = now._d; \n\n // fetching local api from server\n\n fetch('/api/movies', {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(myMovie),\n })\n .then((response) => response.json())\n .then((data) => {\n console.log('add.html', data);\n alert(`Adding movie: ${data.title}`);\n })\n .catch((error) => {\n console.error('Error:', error);\n });\n\n parsedMyMovies.push(myMovie);\n let stringifiedMyMovies = JSON.stringify(parsedMyMovies);\n\n localStorage.setItem(\"MyMovies\", stringifiedMyMovies);\n}", "function pressEnterAddMovie(e) {\n if (e.keyCode == 13) {\n createNewItem();\n \n }\n}", "async function genreCreate(index, name) {\n const genre = new Genre({ name: name });\n await genre.save();\n genres[index] = genre;\n console.log(`Added genre: ${name}`);\n}", "function addToWatched(){\r\n movieId = sessionStorage.getItem('movieId');\r\n axios.get('https://api.themoviedb.org/3/movie/'+movieId+'?api_key=7719d9fc54bec69adbe2d6cee6d93a0d&language=en-US')\r\n .then((response) => {\r\n movie = response.data;\r\n arr = [movie.id, movie.imdb_id, movie.runtime, movie.poster_path];\r\n xmlhttp = new XMLHttpRequest();\r\n xmlhttp.onreadystatechange = function() {\r\n if(this.readyState == 4 && this.status == 200) {\r\n alert(this.responseText);\r\n if(this.responseText == 'Please login first :('){\r\n window.location.href = 'login.php';\r\n }\r\n }\r\n };\r\n xmlhttp.open(\"POST\",\"add_watched.php\", false);\r\n xmlhttp.setRequestHeader( \"Content-Type\", \"application/x-www-form-urlencoded\" );\r\n xmlhttp.send('data='+arr+'&title='+movie.title+'&overview='+movie.overview);\r\n })\r\n .catch((err) => {\r\n console.log(err.message);\r\n });\r\n}", "function storeMovie(id) {\n let favoriteMovieList = JSON.parse(localStorage.getItem(\"favorite movie\")) || [];\n let favoriteMovie = moviesList.find(movie => movie.id === id);\n if (favoriteMovieList.some(movie => movie.id === id)) {\n return alert(\"already added\");\n }\n favoriteMovieList.push(favoriteMovie);\n localStorage.setItem(\"favorite movie\", JSON.stringify(favoriteMovieList));\n}", "AddMovie(e) {\n let mid = e.detail;\n this.props.onShowScreenSpinner();\n axios.post(SERVER_URL + '/movie', {\n user_id: this.props.userId,\n pid: this.props.partyId,\n mid: mid\n }).then((response) => {\n if (response) {\n if (response.data.isOK || !response.data.isOK) {\n this.setState({\n searchResult: [],\n search: ''\n }, () => {\n if (this.props.onFilmAdded && typeof this.props.onFilmAdded === 'function') {\n this.props.onFilmAdded();\n }\n });\n }\n }\n }).catch(err => {\n if (err && err.response) {\n let evt;\n switch (err.response.status) {\n case 403:\n evt = new CustomEvent('showErrorAlert', {\n detail: 'Вы уже добавили доступное количество фильмов.'\n });\n window.dispatchEvent(evt);\n break;\n case 409:\n evt = new CustomEvent('showErrorAlert', {\n detail: 'Этот фильм уже есть в списке.'\n });\n window.dispatchEvent(evt);\n break;\n default:\n evt = new CustomEvent('showErrorAlert', {\n detail: 'Не удалось добавить фильм.'\n });\n window.dispatchEvent(evt);\n }\n }\n });\n }", "function addFilm() {\n\tvar resultRegion = \"add-film-result\";\n\tvar info = $(\"#add-film-form\").serialize();\n\n\t$.ajax({\n\t\turl : \"./AddServlet\",\n\t\tdata : \"format=text&\" + info,\n\t\tdatatype : \"text\",\n\t\tsuccess : function(rawData) {\n\t\t\thtmlInsert(resultRegion, rawData)\n\t\t},\n\t\terror : function() {\n\t\t\talert(\"Error\")\n\t\t}\n\t});\n}", "function saveMovies() {\n localStorage.setItem(\"movies\", JSON.stringify(moviesHistory));\n}", "function Movie(title,newRelease,times) {\n this.title = title;\n this.newRelease = newRelease;\n this.times = times; \n}", "function updOrCreateMovie(movie, method, id, resolveMovie, rejectMovie) {\n let stars = movie[3][1].split(', ');\n\n let actions = stars.map(postActor);\n Promise.all(actions)\n .then(data => data.map(el => el.Id))\n .then(idArr => {\n if (method === 'POST') {\n createMovie(movie[0][1], movie[1][1], movie[2][1], idArr, function (result) {\n });\n }\n else { // PUT\n updateMovie(movie[0][1], movie[1][1], movie[2][1], id, idArr, function (result) {\n console.log(\"Updated movie: \" + result);\n });\n }\n })\n .then(() => resolveMovie())\n .catch(error => {\n console.log(error.message);\n rejectMovie();\n });\n}", "saveItem(event, data) {\n data = convertToLowerCase(data);\n itemsDB.insert(data, (err, newDoc) => {\n yearsDB.find({}, (err, docs) => {\n docs.forEach(doc => {\n let setupData = {\n item: newDoc._id,\n year: doc._id,\n rent: 1,\n avakHammali: 1,\n javakHammali: 1\n };\n setupsDB.insert(setupData, (err, newDoc) => {\n let response = {};\n response.error = err;\n this.mainWindow.webContents.send('saveItemResponse', response);\n });\n });\n });\n });\n }", "function createMovie(title, length, genre) {\n\n genre_err.textContent = \"\";\n\n var title = title.value;\n var length = parseInt(length.value);\n var genre = genre.value; \n \n if(title !== \"\" && length !== \"\" && genre !== \"\") {\n\n if(isFinite(length)) {\n\n var movie = new Movie(title, length, genre);\n\n var li = document.createElement(\"li\");\n li.setAttribute(\"id\", index);\n li.textContent = movie.getData();\n genre_list.appendChild(li);\n\n festival.movieList.push(movie);\n var index = festival.movieList.length - 1;\n\n var option = document.createElement(\"option\");\n option.setAttribute(\"value\", index);\n option.textContent = festival.movieList[index].getData()\n movie_select.appendChild(option);\n\n movieTitle.value = \"\";\n movieGenre.value = \"\";\n movieLength.value = \"\";\n\n } else {\n genre_err.textContent = \"Movie length must be a number!!\";\n }\n\n } else {\n genre_err.textContent = \"All fields are required\";\n }\n}", "function Movie(Name, Year, Director, Genre) {\r\n this.Movie_Name = Name;\r\n this.Movie_Year = Year;\r\n this.Movie_Director = Director;\r\n this.Movie_Genre = Genre;\r\n}", "function addRatings() {\n OMDBProvider.getMovie(vm.film.imdb_id).then(movie => {\n vm.film.ratings = movie.Ratings;\n getTrailers();\n })\n }", "function addStudentInDatabase() {\n const roll = document.getElementById(\"add_roll\").value;\n const name = document.getElementById(\"add_name\").value;\n const department = document.getElementById(\"add_department\").value;\n const year = document.getElementById(\"add_year\").value;\n const semester = document.getElementById(\"add_semester\").value;\n\n const addStudentInfo = {\n Roll: roll,\n Name: name,\n Department: department,\n Year: year,\n Semester: semester\n };\n\n const tx = db.transaction(\"StudentTable\", \"readwrite\");\n const studentInfo = tx.objectStore(\"StudentTable\");\n studentInfo.add(addStudentInfo);\n}", "update(id, movie) {\n var movieIndex = this.movieList.findIndex(element => {\n return element.id === id;\n });\n if(movieIndex !== -1) {\n this.movieList[movieIndex].title = movie.title;\n this.movieList[movieIndex].year = movie.year;\n return 1;\n }else {\n return 0;\n }\n }", "function Movie (name, year, genre, cast, description) {\n this.name = name;\n this.year = year;\n this.genre = genre;\n this.cast = cast;\n this.description = description;\n}", "function Movie(name, year, genre, cast, description){\n this.name = name;\n this.year = year;\n this.genre = genre;\n this.cast = cast;\n this.description = description;\n}", "function insertVideos(option, callback) {\n var ch_id = option.channelId;\n var vds = option.videos;\n // Connect to the db\n callback = callback || function () {};\n if (vds.length > 0) {\n MongoClient.connect('mongodb://localhost:27017', function (err, db) {\n if (err) throw err;\n var database = db.db('mydb');\n const collection = database.collection('videos');\n var videos = vds.map(video => {\n var re = {\n channelId: video.snippet.channelId,\n channelName: video.snippet.channelTitle,\n videoId: video.id.videoId,\n title: video.snippet.title,\n publishedAt: video.snippet.publishedAt,\n description: video.snippet.description,\n itemjson: JSON.stringify(video)\n };\n return re;\n });\n // console.log('videos=>', videos);\n\n // 寫入資料\n collection.insertMany(videos, function (err, result) {\n assert.equal(err, null);\n assert.equal(videos.length, result.result.n);\n assert.equal(videos.length, result.ops.length);\n console.log(\n 'Inserted ' + videos.length + ' videos into the collection'\n );\n callback(videos);\n });\n db.close(); //關閉連線\n });\n }\n}", "async function insertMovies(url, collection) {\n try {\n let movieNumber = 1\n const dataFirst = await (await fetch(url)).json()\n const totalPages = dataFirst.total_pages\n const total_results = dataFirst.total_results\n for (let page = 1; page <= totalPages; page++) {\n const rdyUrl = `${url}&page=${page}`\n const data = await (await fetch(rdyUrl)).json()\n const moviesArray = data.results;\n await moviesArray.forEach(movie => {\n const myMoviesRdy = rdyMovieObject(movie)\n myMoviesRdy.then(movieObj => {\n movieModel[collection].insertMany(movieObj.movie, (e) => {\n movieNumber += 1\n if (e) {\n console.log('some error')\n } else {\n console.log(`${Number.parseInt((movieNumber / total_results)*100)}%/100% ------- injected ${movieObj.movie.title}`)\n }\n })\n })\n })\n }\n console.log(`successfully injected! ${movieNumber}/${total_results}`)\n\n } catch (e) {\n console.log(e)\n }\n}", "function createMovie(movieObject) {\n let options = {\n method: \"POST\",\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(movieObject)\n }\n return fetch(movieAPIURL, options)\n .then((response) => response.json())\n\n}", "function Movie(name, genre, rating) {\n this.name = name;\n this.genre = genre;\n this.rating = rating;\n}", "function addFoods(){\n foodS++;\n database.ref('/').update({\n Food:foodS\n });\n dog.addImage(dogImg);\n}", "function AddVocabularyToDB(lessonId, newLernItem){\n\tvar question = newLernItem['question'];\n\tvar answer = newLernItem['answer'];\n\tvar date = newLernItem['date'];\n\tvar isLongterm = newLernItem['isLongterm'];\n \n db.transaction(function(tx) {\n \tdoQuery(tx, 'SELECT * FROM LearnItem WHERE Question = \"'+ question +'\" AND LessonId =' + lessonId,[],function(tx,result){\n if (result != null && result.rows != null) {\n if (result.rows.length != 0){\n alert('Diese Vokabel ist bereits in dieser Lektion enthalten.');\n }\n else {\n db.transaction(function(tx) {\n doQuery(tx, 'INSERT INTO LearnItem(Question,Answer,LessonId,OwnerId,Timestamp,IsLongterm)'+\n ' VALUES (\"'+question+'\",\"'+answer+'\",' + lessonId + ',' + ownerID+',\"'+date+'\",'+isLongterm+')',[],querySuccessInsert);\n });\n //Check if Lesson is UserLesson - then add vocabulary to Result table \n doQuery(tx, 'SELECT * FROM UserLessons WHERE lesson_id = '+ lessonId + ';',[],function(tx,result){\n\t\t\t if (result != null && result.rows != null) {\n\t\t\t //If UserLesson with lessonId exists add LearnItem to Result table\n\t\t\t if (result.rows.length != 0){\n\t\t\t \tdb.transaction(function(tx) {\n\t\t\t doQuery(tx, 'SELECT * FROM LearnItem INNER JOIN UserLessons ON LearnItem.LessonId = UserLessons.lesson_id WHERE Question = \"'+ question +'\" AND LessonId =' + lessonId,[],function(tx,result){\n\t\t\t \tif (result != null && result.rows != null) {\n\t\t\t\t\t\t\t if (result.rows.length != 0){\n\t\t\t\t\t\t\t \tfor (var i = 0; i < result.rows.length; i++) {\n\t\t\t\t\t\t\t \t\tvar row = result.rows.item(i);\n\t\t\t\t\t\t\t \t\t\n\t\t\t\t\t\t\t \t\tif(row.IsLongterm == 1){\n\t\t\t\t\t\t\t\t\t \tvar resultItem = {};\n\t\t\t\t\t\t\t\t\t \tresultItem['learnItemId'] = row.LearnItemId;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tresultItem['userId'] = row.user_id;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar date = new Date();\n\t\t\t\t\t\t\t\t\t \tvar yesterday = parseInt(date.setDate(date.getDate() - 1),10);\n\t\t\t\t\t\t\t\t\t \t\n\t\t\t\t\t\t\t\t\t \tyesterday = new Date(yesterday).setHours(0,0,0,0)/1000;\n\t\t\t\t\t\t\t\t\t \t\n\t\t\t\t\t\t\t\t\t \t\tif (DEBUG_MODE) console.log(yesterday);\n\t\t\t\t\t\t\t\t\t \t\t\n\t\t\t\t\t\t\t\t\t resultItem['lastShown'] = yesterday;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tresultItem['longtermLevel'] = 6;\n\t\t\t\t\t\t\t\t\t AddResultToDB(resultItem);\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 }\n\t\t\t });\n\t\t\t });\n\t\t\t } \n\t\t\t }\n\t\t\t });\n } \n }\n });\n });\n\t\n \treturn;\n}", "function Movie(name, year, genre, cast, description) {\n this.name = name;\n this.year = year;\n this.genre = genre;\n this.cast = cast;\n this.description = description;\n}", "function Movie(name, year, genre, cast, description) {\n this.name = name;\n this.year = year;\n this.genre = genre;\n this.cast = cast;\n this.description = description;\n}", "function addTodo(text) {\n var todo = {\n _id: new Date().toISOString(),\n title: text,\n completed: false\n };\n db.put(todo, function callback(err, result) {\n if (!err) {\n console.log('Successfully posted a todo!');\n }\n });\n }", "function addFilmsToCollection(req, res) {\n var films = req.body.films;\n films.forEach(function (film, index, arr) {\n if (!film._id) {\n Collection.update({ _id: req.body._id }, { $push: { films: { film: film.film, sort: film.sort } } }, addFilmsToCollectionCallback);\n }\n function addFilmsToCollectionCallback(err, response) {\n if (err) {\n return res.status(400).send({\n message: errorHandler.getErrorMessage(err)\n });\n } else {\n Film.update({ _id: film._id }, { $push: { collections: req.body._id } }, function (err, response) {\n });\n if (index === films.length - 1) {\n res.json(response);\n }\n }\n }\n });\n \n}", "function saveMovie() {\n var chosenMovie = movies.results[randommovie];\n var savedMovie = localStorage.getItem(\"film\");\n if (!savedMovie || savedMovie === null || savedMovie === \"null\") {\n savedMovie = [];\n } else {\n savedMovie = JSON.parse(savedMovie);\n }\n var selected = savedMovie.filter(\n (film) => film.id === movies.results[randommovie].id\n );\n\n if (selected.length > 0) {\n return;\n }\n // Save new favourite movie into local storage and create button\n savedMovie.push(chosenMovie);\n localStorage.setItem(\"film\", JSON.stringify(savedMovie));\n var newMovie = document.createElement(\"button\");\n newMovie.classList.add(\"favouritesBtn\");\n newMovie.textContent = chosenMovie.original_title;\n newMovie.setAttribute(\"data-id\", chosenMovie.id);\n favMovies.appendChild(newMovie);\n}", "function makeMovieMap(){\n\tfor(var raw_movie in rawdata_movies){\n\t\tif (!movie_to_movie.has(rawdata_movies[raw_movie].id)){\n\t\t\tmovie_to_movie.set(rawdata_movies[raw_movie].id,rawdata_movies[raw_movie].title);\n\t\t}\n\t}\n}", "function editMovies(movieId) {\n return new Promise((resolve, reject) => {\n $.ajax({\n url: `${firebase.getFBsettings().databaseURL}/movies/${movieId}.json`,\n type: 'PUT',\n //obj after watched or rating edited where obj is below\n // data: JSON.stringify(obj)\n //when done pass new object back\n }).done((data) => {\n resolve(data);\n });\n });\n}" ]
[ "0.74622643", "0.72914994", "0.7277064", "0.7015771", "0.69821036", "0.6808858", "0.68001604", "0.6787975", "0.6787099", "0.67457294", "0.66903883", "0.66018206", "0.6544292", "0.6490752", "0.6459", "0.64228904", "0.6392001", "0.6366013", "0.6353019", "0.6334467", "0.63167465", "0.6272605", "0.625459", "0.6241609", "0.6189712", "0.61882496", "0.6136378", "0.61326844", "0.61131394", "0.6080398", "0.60503596", "0.6049701", "0.6024362", "0.60201555", "0.6016025", "0.6014417", "0.5993642", "0.5974147", "0.5926825", "0.5921811", "0.59167093", "0.5891306", "0.5888454", "0.5868197", "0.5857862", "0.5856844", "0.58490753", "0.58428204", "0.5829716", "0.5812514", "0.5794243", "0.5783828", "0.5761007", "0.57554746", "0.57455707", "0.5743233", "0.57198876", "0.57187307", "0.5699436", "0.5692299", "0.5683701", "0.5680758", "0.5652423", "0.5647413", "0.56460994", "0.56435096", "0.5626277", "0.5623045", "0.560298", "0.5602319", "0.5601564", "0.5598415", "0.55974674", "0.5581357", "0.5579283", "0.5573128", "0.5566872", "0.5546748", "0.55199236", "0.551882", "0.5518367", "0.5513797", "0.5513362", "0.55083466", "0.55010295", "0.5496345", "0.5496262", "0.5492151", "0.5491417", "0.54868835", "0.54785985", "0.5467143", "0.5465911", "0.54626876", "0.54626876", "0.54581803", "0.54573125", "0.5453426", "0.5448037", "0.54464644" ]
0.5448181
98
clean input at form
function reset() { let form = document.forms["filmForm"]; form.reset(); form.elements["id"].value = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cleanAdvancedQueryForm() {\n $('[name=p1]').val('')\n }", "function cleanFormulaire() {\n input_matricule.value = '';\n input_prenom.value = '';\n input_nom.value = '';\n select_sexe.value = '';\n input_datenaissance.value = '';\n input_lieunaissance.value = '';\n input_email.value = '';\n input_telephone.value = '';\n input_adresse.value = '';\n\n select_filiere.value = '';\n select_classe.value = '';\n input_montantinscription.value = '';\n input_mensualite.value = '';\n input_total.value = '';\n input_dateinscription.value = '';\n input_anneeacademique.value = '';\n }", "function cleanFiltersForm(){\n\tconst blackList = ['cod_reporte_tabla'];\n\tlet filtersTable = $('#tabla_filtros');\n\tfiltersTable.find('input, select, textarea').each(\n\t\tfunction(index){\n\t\t\tlet input = $(this);\n\t\t\tlet name = input.attr('name');\n\t\t\tif(!blackList.includes(name)){\n\t\t\t\t$(input).val('');\n\t\t\t}\n\t\t}\n\t);\n}", "function cleanInput() {\r\n $('#fetch-one-character').val('');\r\n $('#new-name').val('');\r\n $('#new-occupation').val('');\r\n $('#new-weapon').val('');\r\n $('#new-debt').val('');\r\n $('#edit-id').val('');\r\n $('#edit-name').val('');\r\n $('#edit-occupation').val('');\r\n $('#edit-weapon').val('');\r\n $('#edit-debt').val('');\r\n $('#delete-one-character').val('');\r\n }", "function clean() {\r\n document.form.textview.value = \"\";\r\n}", "function cleanData() {\r\n messenge.value = ''\r\n}", "function cleanInps() {\n bookTitleInp.value = \"\";\n authorInp.value = \"\";\n isbnInp.value = \"\";\n}", "function cleanUpInputFields() {\n // Replace values\n firstNameInput.value = \"\";\n lastNameInput.value = \"\";\n titleInput.value = \"\";\n ratingInput.value = \"\";\n}", "function cleanForm() {\n $(\"#inp_number\").val(\"\");\n $(\"#inp_name\").val(\"\");\n $(\"#inp_first_name\").val(\"\");\n $(\"#inp_destiny\").val(\"\");\n $(\"#inp_origin\").val(\"\");\n $(\"#inp_cost\").val(\"\");\n}", "function cleanInputs() {\n document.getElementById(\"nameInput\").value = \"\";\n document.getElementById(\"latitudeInput\").value = \"\";\n document.getElementById(\"longitudeInput\").value = \"\";\n }", "function cleanSimpleQueryForm() {\n $(':focus').blur()\n $('#simple-search input').val('')\n }", "function cleanInput() {\n document.getElementById(\"name\").value = \"\";\n document.getElementById(\"age\").value = \"\";\n document.getElementById(\"gender\").value = \"\";\n document.getElementById(\"position\").value = \"\";\n}", "function cleanForm(){\n formFirst.value = \"\";\n formLast.value = \"\";\n formEmail.value = \"\";\n formMessage.value = \"\";\n}", "function clean_Prod(){\r\n $ident = $('#cod_invima').val(''); \r\n $desc = $('#descripcion').val(''); \r\n $cant = $('#cantidad').val(''); \r\n}", "function cleanData(){\n document.getElementById(\"num\").value=\"\";// limpiar input de la pagina\n}//end function", "function clean_string(input_object) {\n var input_string = input_object.value;\n \n // remove all non alpha numeric\n var first_pass = input_string.replace(/[^a-zA-Z0-9_\\ ]/g, \"\");\n var second_pass = first_pass.replace(/\\s+/g, \" \");\n var third_pass = second_pass.replace(/\\s+$/, \"\");\n input_object.value = third_pass;\n }", "function removeHazardousStrings($formContainers) {\n $formContainers.find(\"input.textbox, textarea.textarea\").each(function () {\n $(this).val(sanitizeValue($(this).val()));\n });\n } //removeHazardousStrings", "_clearForm() {\n // Clears input fields\n itemNameInput.value =\n itemDueDateInput.value =\n itemTimeDueInput.value =\n itemDescriptionInput.value =\n \"\";\n // Makes sure default pri always \"no priority\"\n itemPriorityInput.value = \"no_pri\";\n }", "function clean() {\n input.innerHTML = \"\";\n}", "function CleanInputs(inputs)\n{\n for (let i = 0; i< inputs.length; i++)\n {\n inputs[i].value=\"\"\n }\n\n}", "function clean_string_no_special(input_object) {\n var input_string = input_object.value;\n\n // remove all non alpha numeric\n var first_pass = input_string.replace(/[^a-zA-Z0-9_\\ \\.\\\\\\#\\-_\\/]/g, \"\");\n var second_pass = first_pass.replace(/\\./g, \"-\");\n input_object.value = second_pass;\n }", "function clean_string_no_space(input_object) {\n var input_string = input_object.value;\n\n // remove all non alpha numeric\n var first_pass = input_string.replace(/[^a-zA-Z0-9\\-\\ ]/g, \"\");\n var second_pass = first_pass.replace(/\\s+/g, \"-\");\n var third_pass = second_pass.replace(/\\s+$/, \"\");\n input_object.value = third_pass;\n }", "function cleanInputs() {\n newItemNameInput.value = '';\n newItemDescriptionInput.value = '';\n newItemCategoryInput.value = '';\n newItemQuantityInput.value = '';\n newItemValueInput.value = '';\n newItemImageInput.value = '';\n preview.children[0].src = '../../img/items/placeholder.png';\n}", "function CleanFields() {\n $scope.Message = \"\";\n $scope.TipoIngreso = \"\";\n $scope.TiposIngreso = \"\";\n $scope.ClassActive = \"\";\n $scope.SelectedNombre = \"\";\n $scope.SelectedDependeDeSalario = \"\";\n $scope.SelectedEstado = \"\";\n \n }", "function cleanInput (input) {\n return input;\n // return $('<div/>').text(input).text();\n console.log(\"cleanInput\");\n }", "function CleanFields() {\n $scope.Empleados = null;\n $scope.Message = \"\";\n $scope.Empleado = \"\";\n $scope.Empleados = \"\";\n $scope.ClassActive = \"\";\n $scope.SelectedNroDocumento = \"\";\n $scope.SelectedNombre = \"\";\n $scope.SelectedSalarioMensual = \"\";\n $scope.TransaccionesEmpleado = \"\";\n }", "function clean_string_no_special(input_object) {\n var input_string = input_object.value;\n\n // remove all non alpha numeric\n var first_pass = input_string.replace(/[^a-zA-Z0-9_\\ \\.\\\\\\#\\-_\\/]/g, \"\");\n\n input_object.value = first_pass;\n}", "function proverka(input) { \n var value = input.value; \n var rep = /[-\\.;\":'/a-zA-Zа-яА-Я ]/; \n if (rep.test(value)) { \n value = value.replace(rep, ''); \n input.value = value; \n }\n }", "function cleanData (){\n \t//document.getElementById (\"resultado\").innerHTML = \"\";\n \tdocument.getElementById (\"num\").value = \"\" ; \n }", "function cleanForm() {\r\n $(\"#inputName\").val(\"\");\r\n $(\"#inputSurname\").val(\"\");\r\n $(\"#inputEmail\").val(\"\");\r\n $(\"#inputAddress\").val(\"\");\r\n $(\"#inputCity\").val(\"\");\r\n $(\"#inputState\").val(\"\");\r\n $(\"#inputPostalCode\").val(\"\");\r\n}", "function cleanInput(data) {\n\treturn data.toString().replace(/(\\r\\n|\\n|\\r)/gm, \"\");\n}", "function CleanInput()\n\t{\n\t\t// Check common fields\n\t\tif (document.getElementById(\"BillName\").value.length == 0)\n\t\t{\n\t\t\talert(\"Please enter a value for the Bill Name field\");\n\t\t\tdocument.getElementById(\"BillName\").focus();\n\t\t\treturn false;\n\t\t}\n\t\tif (document.getElementById(\"BillAddress1\").value.length == 0)\n\t\t{\n\t\t\talert(\"Please enter a value for the Bill Address Line 1 field\");\n\t\t\tdocument.getElementById(\"BillAddress1\").focus();\n\t\t\treturn false;\n\t\t}\n\t\tif (document.getElementById(\"BillLocality\").value.length == 0)\n\t\t{\n\t\t\talert(\"Please enter a value for the Bill Locality field\");\n\t\t\tdocument.getElementById(\"BillLocality\").focus();\n\t\t\treturn false;\n\t\t}\n\t\tif (document.getElementById(\"BillPostcode\").value.length != 4)\n\t\t{\n\t\t\talert(\"Please enter a 4-digit value for the Bill Postcode field\");\n\t\t\tdocument.getElementById(\"BillPostcode\").focus();\n\t\t\treturn false;\n\t\t}\n\t\tif (document.getElementById(\"ServiceLocality\").value.length == 0)\n\t\t{\n\t\t\talert(\"Please enter a value for the Service Locality field\");\n\t\t\tdocument.getElementById(\"ServiceLocality\").focus();\n\t\t\treturn false;\n\t\t}\n\t\tif (document.getElementById(\"ServiceState\").options[document.getElementById(\"ServiceState\").selectedIndex].value.length == 0)\n\t\t{\n\t\t\talert(\"Please enter a value for the Service State field\");\n\t\t\tdocument.getElementById(\"ServiceState\").focus();\n\t\t\treturn false;\n\t\t}\n\t\tif (document.getElementById(\"ServicePostcode\").value.length != 4)\n\t\t{\n\t\t\talert(\"Please enter a 4-digit value for the Service Postcode field\");\n\t\t\tdocument.getElementById(\"ServicePostcode\").focus();\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// clean residential/business fields\n\t\tif (document.getElementById(\"Residential:FALSE\").checked == true)\n\t\t{\n\t\t\t// Business\n\t\t\t\n\t\t\t// check mandatory\n\t\t\tif (document.getElementById(\"ABN\").value.length == 0)\n\t\t\t{\n\t\t\t\talert(\"Please enter a value for the ABN field\");\n\t\t\t\tdocument.getElementById(\"ABN\").focus();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (document.getElementById(\"EndUserCompanyName\").value.length == 0)\n\t\t\t{\n\t\t\t\talert(\"Please enter a value for the Company Name field\");\n\t\t\t\tdocument.getElementById(\"EndUserCompanyName\").focus();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Residential\n\t\t\t\n\t\t\t// check mandatory\n\t\t\tif (document.getElementById(\"EndUserTitle\").value.length == 0)\n\t\t\t{\n\t\t\t\talert(\"Please enter a value for the Title field\");\n\t\t\t\tdocument.getElementById(\"EndUserTitle\").focus();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (document.getElementById(\"EndUserGivenName\").value.length == 0)\n\t\t\t{\n\t\t\t\talert(\"Please enter a value for the Given Name field\");\n\t\t\t\tdocument.getElementById(\"EndUserGivenName\").focus();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (document.getElementById(\"EndUserFamilyName\").value.length == 0)\n\t\t\t{\n\t\t\t\talert(\"Please enter a value for the Family Name field\");\n\t\t\t\tdocument.getElementById(\"EndUserFamilyName\").focus();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t/*\n\t\t\tif (document.getElementByName(\"DateOfBirth[day]\").selectedIndex < 1 || \n\t\t\t\tdocument.getElementByName(\"DateOfBirth[month]\").selectedIndex < 1 || \n\t\t\t\tdocument.getElementByName(\"DateOfBirth[year]\").selectedIndex < 1)\n\t\t\t{\n\t\t\t\talert(\"Please enter a value for the Date Of Birth field\");\n\t\t\t\tdocument.getElementByName(\"DateOfBirth[day]\").focus();\n\t\t\t\treturn false;\n\t\t\t}*/\n\t\t}\n\t\t\n\t\t\n\t\t// clean service address fields\n\t\telmServiceAddressType = document.getElementById(\"ServiceAddressType\");\n\t\tstrServiceAddressType = elmServiceAddressType.options[elmServiceAddressType.selectedIndex].value;\n\t\tswitch (strServiceAddressType)\n\t\t{\n\t\t\t// LOT Addresses\n\t\t\tcase \"LOT\":\n\t\t\t\t// Check Mandatory Fields\n\t\t\t\tif (document.getElementById(\"ServiceAddressTypeNumber\").value.length == 0)\n\t\t\t\t{\n\t\t\t\t\talert(\"Please enter a value for the Address Type Number field\");\n\t\t\t\t\tdocument.getElementById(\"ServiceAddressTypeNumber\").focus();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tif (document.getElementById(\"ServiceAddressType\").options[document.getElementById(\"ServiceAddressType\").selectedIndex].value.length == 0)\n\t\t\t\t{\n\t\t\t\t\talert(\"Please enter a value for the Address Type field\");\n\t\t\t\t\tdocument.getElementById(\"ServiceAddressType\").focus();\n\t\t\t\t\treturn false;\n\t\t\t\t}\t\t\t\t\n\t\t\t\t\n\t\t\t\t// Clean Fields\n\t\t\t\tdocument.getElementById(\"ServiceStreetNumberStart\").value\t= \"\";\n\t\t\t\tdocument.getElementById(\"ServiceStreetNumberEnd\").value\t= \"\";\n\t\t\t\tdocument.getElementById(\"ServiceStreetNumberSuffix\").value = \"\";\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// Check dependencies\n\t\t\t\tif (document.getElementById(\"ServiceStreetName\").value.length > 0)\n\t\t\t\t{\n\t\t\t\t\tif (document.getElementById(\"ServiceStreetType\").selectedIndex < 1)\n\t\t\t\t\t{\n\t\t\t\t\t\talert(\"Please select a value for the Street Type field\");\n\t\t\t\t\t\tdocument.getElementById(\"ServiceStreetType\").focus();\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tdocument.getElementById(\"ServiceStreetType\").value\t\t= \"\";\n\t\t\t\t\tdocument.getElementById(\"ServiceStreetTypeSuffix\").value\t= \"\";\n\t\t\t\t\tif (document.getElementById(\"ServicePropertyName\").value.length == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\talert(\"Please enter a value for either the Property Name or Street Name field\");\n\t\t\t\t\t\tdocument.getElementById(\"ServiceStreetName\").focus();\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t// Postal Addresses\n\t\t\tcase \"POB\":\n\t\t\tcase \"PO\":\n\t\t\tcase \"BAG\":\n\t\t\tcase \"CMA\":\n\t\t\tcase \"CMB\":\n\t\t\tcase \"PB\":\n\t\t\tcase \"GPO\":\n\t\t\tcase \"MS\":\n\t\t\tcase \"RMD\":\n\t\t\tcase \"RMB\":\n\t\t\tcase \"LB\":\n\t\t\tcase \"RMS\":\n\t\t\tcase \"RSD\":\t\t\t\t\n\t\t\t\t// Clean fields\n\t\t\t\tdocument.getElementById(\"ServiceStreetNumberStart\").value\t\t= \"\";\n\t\t\t\tdocument.getElementById(\"ServiceStreetNumberEnd\").value\t\t= \"\";\n\t\t\t\tdocument.getElementById(\"ServiceStreetNumberSuffix\").value\t= \"\";\n\t\t\t\tdocument.getElementById(\"ServiceStreetName\").value\t\t\t= \"\";\n\t\t\t\tdocument.getElementById(\"ServiceStreetType\").value\t\t\t= \"\";\n\t\t\t\tdocument.getElementById(\"ServiceStreetTypeSuffix\").value\t\t= \"\";\n\t\t\t\tdocument.getElementById(\"ServicePropertyName\").value\t\t\t= \"\";\n\t\t\t\t\n\t\t\t\t// Check Mandatory Fields\n\t\t\t\tif (document.getElementById(\"ServiceAddressTypeNumber\").value < 1)\n\t\t\t\t{\n\t\t\t\t\talert(\"Please enter a value for the ServiceAddressTypeNumber field\");\n\t\t\t\t\tdocument.getElementById(\"ServiceAddressTypeNumber\").focus();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tif (document.getElementById(\"ServiceAddressType\").options[document.getElementById(\"ServiceAddressType\").selectedIndex].value.length == 0)\n\t\t\t\t{\n\t\t\t\t\talert(\"Please enter a value for the Address Type field\");\n\t\t\t\t\tdocument.getElementById(\"ServiceAddressType\").focus();\n\t\t\t\t\treturn false;\n\t\t\t\t}\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Standard Addresses\n\t\t\tdefault:\t\t\t\t\n\t\t\t\t// Check dependencies\n\t\t\t\tif (document.getElementById(\"ServiceStreetName\").value.length > 0)\n\t\t\t\t{\n\t\t\t\t\tif (document.getElementById(\"ServiceStreetType\").value.length == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\talert(\"Please enter a value for the ServiceStreetType field\");\n\t\t\t\t\t\tdocument.getElementById(\"ServiceStreetType\").focus();\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tdocument.getElementById(\"ServiceStreetType\").value\t\t= \"\";\n\t\t\t\t\tdocument.getElementById(\"ServiceStreetTypeSuffix\").value\t= \"\";\n\t\t\t\t\tif (document.getElementById(\"ServicePropertyName\").value.length == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\talert(\"Please enter a value for either the Property Name or Street Name field\");\n\t\t\t\t\t\tdocument.getElementById(\"ServiceStreetName\").focus();\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (document.getElementById(\"ServiceStreetNumberStart\").value.length == 0)\n\t\t\t\t{\n\t\t\t\t\tdocument.getElementById(\"ServiceStreetNumberEnd\").value\t\t= \"\";\n\t\t\t\t\tdocument.getElementById(\"ServiceStreetNumberSuffix\").value\t= \"\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (document.getElementById(\"ServicePropertyName\").value.length == 0)\n\t\t\t\t{\n\t\t\t\t\tif (document.getElementById(\"ServiceStreetNumberStart\").value.length == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\talert(\"Please enter a value for the Street Number Start field\");\n\t\t\t\t\t\tdocument.getElementById(\"ServiceStreetNumberStart\").focus();\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (strServiceAddressType == \"\")\n\t\t\t\t{\n\t\t\t\t\tdocument.getElementById(\"ServiceAddressTypeNumber\").value = \"\";\n\t\t\t\t\tdocument.getElementById(\"ServiceAddressTypeSuffix\").value = \"\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (document.getElementById(\"ServiceAddressTypeNumber\").value.length == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\talert(\"Please enter a value for the Address Type Number field\");\n\t\t\t\t\t\tdocument.getElementById(\"ServiceAddressTypeNumber\").focus();\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\n\t}", "function cleanInput (input) {\n return $('<div/>').text(input).text();\n }", "function clear_form_data() {\n $(\"#promotion_title\").val(\"\");\n $(\"#promotion_promotion_type\").val(\"\");\n $(\"#promotion_start_date\").val(\"\");\n $(\"#promotion_end_date\").val(\"\");\n $(\"#promotion_active\").val(\"\");\n }", "clearInputFieldValue() {\r\n /** HTMLInputElement : To make the element as HTMLInputElement and provides special properties and methods for manipulating the layout and presentation of input elements */\r\n const inputElement = this.getInputElement();\r\n if (inputElement) {\r\n inputElement.value = '';\r\n this.searchValue = '';\r\n this.showSearchBoxList = !this.showSearchBoxList;\r\n }\r\n }", "function cleanBrandForm() {\n $('#id_marca_modal').val('');\n\n // Quita mensaje de error en campo del formulario si es que lo tiene\n $('#help-marca-name').text('').parent().removeClass('has-error');\n}", "function wipeInput(nameList){\r\n\tvar myArray = nameList.split(\"|\");\r\n\tvar elements=hatsForm.elements;\r\n\tfor (var i=0,iL=myArray.length; i<iL; ++i){\r\n\t\tif (myArray[i] != \"\"){\r\n\t\t\tfor (var j=0,jL=elements.length,elementNext; j<jL; ++j){\r\n\t\t\t\telementNext = elements[j];\r\n\t\t\t\tif (elementNext.name == myArray[i])\r\n\t\t\t\t\telementNext.value=\"\";\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn;\r\n}", "function clean_imput(){\n\tfor (var i=1; i < 4; i++) {\n\t\tdocument.getElementById(\"base\"+i).value=\"\";\n\t\tdocument.getElementById(\"altura\"+i).value=\"\";\n\t \tdocument.getElementById(\"area\"+i).value=\"\";\n\t}\n\t \n}", "function CleanSearch() {\n cityName.value = \"\";\n}", "function formClear() {\n $(\"#input-name\").val(\"\");\n $(\"#input-address\").val(\"\");\n $(\"#input-city\").val(\"\");\n $(\"#input-state\").val(\"\");\n $(\"#input-zip\").val(\"\");\n\n $(\"#errorWarning\").text(\"\");\n\n $('#form-row :input').map(function () {\n $(this).removeClass(\"error\");\n });\n}", "function clean_up_input() {\n\t(function ($) {\n\t\t$(\".podlove-check-input\").on('change', function () {\n\t\t\tvar textfield = $(this);\n\t\t\tvar textfieldid = textfield.attr(\"id\");\n\t\t\tvar $status = $(\".podlove-input-status[data-podlove-input-status-for=\" + textfieldid + \"]\");\n\n\t\t\ttextfield.removeClass(\"podlove-invalid-input\");\n\t\t\t$status.removeClass(\"podlove-input-isinvalid\");\n\n\t\t\tfunction ShowInputError(message) {\n\t\t\t\t$status.text(message);\n\n\t\t\t\ttextfield.addClass(\"podlove-invalid-input\");\n\t\t\t\t$status.addClass(\"podlove-input-isinvalid\");\n\t\t\t}\n\n\t\t\t// trim whitespace\n\t\t\ttextfield.val(textfield.val().trim());\n\n\t\t\t// remove blacklisted characters\n\t\t\tif (inputType = $(this).data(\"podlove-input-remove\")) {\n\t\t\t\tcharacters = $(this).data(\"podlove-input-remove\").split(' ');\n\t\t\t\t$.each(characters, function (index, character) {\n\t\t\t\t\ttextfield.val(textfield.val().replace(character, ''));\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// handle special input types\n\t\t\tif (inputType = $(this).data(\"podlove-input-type\")) {\n\t\t\t\t$status.text('');\n\n\t\t\t\tif ($(this).val() == '')\n\t\t\t\t\treturn;\n\n\t\t\t\tswitch (inputType) {\n\t\t\t\t\tcase \"url\":\n\t\t\t\t\t\tvalid_url_regexp = /^(?:(?:https?|ftp):\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:\\/[^\\s]*)?$/i;\n\n\t\t\t\t\t\tif (!textfield.val().match(valid_url_regexp)) {\n\t\t\t\t\t\t\t// Encode URL only if it is not already encoded\n\t\t\t\t\t\t\tif (!encodeURI(textfield.val()).match(valid_url_regexp)) {\n\t\t\t\t\t\t\t\tShowInputError('Please enter a valid URL');\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ttextfield.val(encodeURI(textfield.val()));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"avatar\":\n\t\t\t\t\t\tif (!textfield.val().match(/^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$/i)) {\n\t\t\t\t\t\t\t// textfield.val( encodeURI( textfield.val() ) );\n\n\t\t\t\t\t\t\tif (!textfield.val().match(/^(?:(?:https?|ftp):\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:\\/[^\\s]*)?$/i)) {\n\t\t\t\t\t\t\t\tShowInputError('Please enter a valid email adress or a valid URL');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"email\":\n\t\t\t\t\t\tif (!textfield.val().match(/^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$/i))\n\t\t\t\t\t\t\tShowInputError('Please enter a valid email adress.');\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}(jQuery));\n}", "filterInput(e) {\n e.target.value = e.target.value.replace(/[^0-9]+/g, '');\n }", "function clean_string_no_space(input_object) {\n var input_string = input_object.value;\n\n // remove all non alpha numeric\n var first_pass = input_string.replace(/[^a-zA-Z0-9_\\ ]/g, \"\");\n var second_pass = first_pass.replace(/\\s+/g, \"_\");\n var third_pass = second_pass.replace(/\\s+$/, \"\");\n input_object.value = third_pass;\n}", "function clean(num){\r\n\t//var x = document.getElementById('textview');\r\n\tdocument.getElementById('textview').value = \"\"\r\n}", "function cleanFilters()\n\t{\n\t\t_prevSearch = \"\";\n\t\t_manualSearch = \"\";\n\t}", "function cleaner() {\n document.getElementById('searchText').value = \"\";\n document.getElementById('inputImgTitle').value = \"\";\n document.getElementById('inputImgUrl').value = \"\";\n document.getElementById('inputImgDesc').value = \"\";\n\n}", "function itg_syndication_clear_form(class_name) {\n jQuery(\".\" + class_name).find(':input').each(function () {\n switch (this.type) {\n case 'text':\n case 'textarea':\n $(this).val('');\n break;\n case 'select-one':\n $(this).val('_none');\n break;\n }\n });\n }", "function clearForm() {\r\n\t\t\t$('#areaForm input[type=\"text\"]').val(\"\");\r\n\t\t}", "function deblankForm(theForm){\r\n\tfor (var i = 0; i < theForm.elements.length; i++){\r\n\t\tif (theForm.elements[i].type == \"text\") {\r\n\t\t\ttheForm.elements[i].value=trim(theForm.elements[i].value);\r\n\t\t}\r\n\t}\r\n}", "function cleanInput(input) {\n return $('<div/>').text(input).text();\n }", "function limpiar(){\n\tnombre.value=\"\";\n\tdireccion.value=\"\";\n\ttelefono.value=\"\";\n}", "function limpiarForm() {\n var inputs = document.getElementsByTagName('input');\n for (var i = 0; i < inputs.length; i++) {\n inputs[i].value = '';\n }\n}", "function vider_formulaire(form) {$(':input',form).not(':button, :submit, :reset, :hidden').val('').removeAttr('checked').removeAttr('selected');}", "function delInputCommon() {\r\n blocknumber.value = \"\";\r\n namespace.value = \"\";\r\n memo.value = \"\";\r\n amount.value = \"\";\r\n recipient.value = \"\";\r\n }", "function clean_user(){\r\n $tipo = $('#tipo_doc').val(''); \r\n $ident = $('#identificacion').val(''); \r\n $nomb = $('#nombres').val(''); \r\n $ape1 = $('#apellido1').val(''); \r\n $ape2 = $('#apellido2').val('');\r\n $email = $('#email').val(''); \r\n $nac = $('#fecha_na').val(''); \r\n $direccion = $('#direccion').val(''); \r\n $genero = $('input:radio[name=Genero]:checked').prop('checked', false); \r\n $ocupacion = $('#Ocupacion').val(''); \r\n $estado = $('#estado_cvl').val(''); \r\n $tel = $('#telefono').val(''); \r\n $nomb_acu = $('#nomb_acu').val(''); \r\n $tel_acu = $('#tel_acu').val(''); \r\n $nom_pad = $('#nomb_pad').val(''); \r\n $ocp_pad = $('#ocp_pad').val(''); \r\n $tel_pad = $('#tel_pad').val(''); \r\n $nom_mad = $('#nomb_mad').val(''); \r\n $ocp_mad = $('#ocp_mad').val(''); \r\n $tel_mad = $('#tel_mad').val(''); \r\n}", "function cleanArticleFields(){\n $('.title span').text( '' ); \n $('.author span').text( '' );\n $('.date span').text( '' );\n \n $('.text').text( '' );\n $('.title').text( '' );\n $('.author').text( '' );\n $('.date').text( '' );\n }", "function clean(){\r\n $(\"input\").val(\"\");\r\n $(\"#btn-save-employee\").html(\"Додај корисника\"); \r\n $(\"#empStatus\").val(\"0\");\r\n $(\"#btn-save-item\").html(\"Додај артикал\");\r\n $(\"#itemStatus\").val(\"0\"); \r\n}", "function cleanInput (input) { return $('<div/>').text(input).text(); }", "function clean_imput(){\n\tfor (var i=1; i < 5; i++) {\n\t\tdocument.getElementById(\"base\"+i).value=\"\";\n\t\tdocument.getElementById(\"altura\"+i).value=\"\";\n\t \tdocument.getElementById(\"area\"+i).value=\"\";\n\t}\n\t \n}", "function cleanProductForm() {\n type_form = 'post';\n\n // limpiamos contenido del formulario\n $('#code39').prop('checked', false);\n $('#vunidad').prop('checked', true);\n $('#inventario').prop('checked', true);\n $('#codigo').val('');\n $('#descripcion').val('');\n $('#punitario').val('');\n $('#pmayoreo').val('');\n $('#cantidad').val('');\n $('#minimo').val('');\n $('#marca').val('');\n\n // actualiza estado de campos (enable / disable)\n updateStateCode();\n updateInventario();\n\n // Quita mensaje de error en campo del formulario si es que lo tiene\n $('#help-codigo').text('').parent().removeClass('has-error');\n $('#help-descripcion').text('').parent().removeClass('has-error');\n $('#help-marca').text('').parent().removeClass('has-error');\n $('#help-punitario').text('').parent().removeClass('has-error');\n $('#help-pmayoreo').text('').parent().removeClass('has-error');\n $('#help-cantidad').text('').parent().removeClass('has-error');\n $('#help-minimo').text('').parent().removeClass('has-error');\n}", "function cleanInput (input) {\n\t\treturn $('<div/>').text(input).text();\n\t}", "function cleanform () {\n const modal = document.getElementById('modal-form')\n modal.innerHTML = ''\n}", "function clear_form_data() {\n $(\"#promo_name\").val(\"\");\n $(\"#promo_type\").val(\"\");\n $(\"#promo_value\").val(\"\");\n $(\"#promo_start_date\").val(\"\");\n $(\"#promo_end_date\").val(\"\");\n $(\"#promo_detail\").val(\"\");\n $(\"#promo_available_date\").val(\"\");\n }", "clearInsideInput() {\n const title = document.getElementById(\"title\");\n const author = document.getElementById(\"author\");\n const isbn = document.getElementById(\"isbn\");\n\n title.value = \"\";\n author.value = \"\";\n isbn.value = \"\";\n }", "function cleanInput (input) {\n return $('<div/>').text(input).text();\n }", "function cleanInput (input) {\n return $('<div/>').text(input).text();\n }", "function cleanInput(input){\n let output = input;\n if (flags.trimInput) {\n output = output.trim()\n }\n if (!flags.caseSensitive) {\n output = output.toLowerCase()\n }\n return output;\n}", "function clearForm() {\n\t\tconst blankState = Object.fromEntries(\n\t\t\tObject.entries(inputs).map(([key, value]) => [key, \"\"])\n\t\t);\n\t\tsetInputs(blankState);\n\t}", "function cleanBillInfo() {\n\t\tbillTextDiv.select(\".billText\").remove();\n\t\tbillInfoDiv.selectAll(\".BillInfo\").remove();\n\t\t\n\t\tassignment.style(\"display\", \"none\");\n\t\tassignment.select(\"#submit\")\n\t\t\t.on(\"click\", null);\n\t}", "function clearForm(event) {\n event.target.elements['title'].value = null;\n event.target.elements['author'].value = null;\n event.target.elements['pages'].value = null;\n event.target.elements['read'].value = false ;\n}", "resetFields(){\n urlInput.value = \"\"\n titleInput.value = \"\"\n validation().render(\"\")\n }", "clearFields() {\n document.getElementById('title').value='';\n document.getElementById('author').value='';\n document.getElementById('isbn').value='';\n }", "clearForm() {\n // clear any previous highlighted row\n this.clearPrevHighlight();\n // clear the inputs\n $(\"#item_id\").val(0);\n $(\"#item_title\").val(\"\");\n $(\"#item_author_first_name\").val(\"\");\n $(\"#item_author_surname\").val(\"\");\n $(\"#item_year\").val(\"\");\n // disable buttons dependent on a table row having been clicked\n $(\"#btn_search\").prop(\"disabled\", true);\n $(\"#btn_add_item\").prop(\"disabled\", true);\n $(\"#btn_update_item\").prop(\"disabled\", true);\n $(\"#btn_delete_item\").prop(\"disabled\", true);\n // disable link to author page\n $(\"#link_current_author\").removeClass(\"text-primary\");\n $(\"#link_current_author\").addClass(\"text-muted\");\n // hide editions page\n $(\"#page_editions\").hide(\"slow\");\n }", "function limpiarFormNuevoTipoCita(){\n\t\n\t$(\"#nombreTipoCita\").val(\"\");\n\t\n\t$(\"#nombreTipoCita\").removeClass(\"valid\");\n $(\"#nombreTipoCita\").removeClass(\"invalid\");\n \n $(\"#label_nombreTipoCita\").removeClass(\"active\");\n\t\n}", "static clearFields(){\n document.getElementById('title').value = '';\n document.getElementById('author').value = '';\n document.getElementById('isbn').value = '';\n }", "function filterInputName(input) {\n const forbiddenChars = \"\";\n let val = input.val().replace(/[,;|&?]/g,'');\n input.val(val);\n}", "function cleanInput (input) {\n return $('<div/>').text(input).html();\n }", "function cleanInput (input) {\n return $('<div/>').text(input).html();\n }", "function cleanInput (input) {\n return $('<div/>').text(input).html();\n }", "static clearField(){\n document.querySelector('#title').value = '';\n document.querySelector('#author').value = '';\n document.querySelector('#isbn').value = '';\n }", "clearFields() {\r\n document.getElementById('title').value = '',\r\n document.getElementById('author').value = '',\r\n document.getElementById('isbn').value = '';\r\n }", "clearFields(){\n this.description.value = \"\"\n this.amount.value = \"\"\n this.date.value = \"\"\n }", "function limpiarCampos(){\n $(\"#titulo\").val(\"\");\n $(\"#mensaje\").val(\"\");\n}", "function limpiar(){\ndocument.getElementById('descripcion').value=\"\";\ndocument.getElementById('monto').value=\"\"; \n}", "function cleanForm(formName) {\n for (var i = 0; i < formName.elements.length; i++) {\n if (formName.elements[i].name !== 'filename') {\n formName.elements[i].value = \"\";\n }\n }\n }", "function cleanInput (input) {\n return $('<div/>').text(input).text();\n }", "function cleanInput (input) {\n return $('<div/>').text(input).text();\n }", "function cleanInput (input) {\n return $('<div/>').text(input).text();\n }", "function cleanInput (input) {\n return $('<div/>').text(input).text();\n }", "static clearFields() {\n document.querySelector('#title').value = '';\n document.querySelector('#author').value = '';\n document.querySelector('#isbn').value = '';\n }", "function yaEsValido(input)\n{\n\t$(input).removeAttr(\"placeholder\");\n\t$(input).removeClass(\"border_rojo\");\n}", "clearFields(){\n document.querySelector(\"#contName\").value = '';\n document.querySelector(\"#contAge\").value = '';\n document.querySelector(\"#contLocation\").value = '';\n document.querySelector(\"#song\").value = '';\n document.querySelector(\"#link\").value = '';\n \n\n }", "static clearFields() {\n document.querySelector('#title').value = '';\n document.querySelector('#author').value = '';\n document.querySelector('#rating').value = '';\n document.querySelector('#price').value = '';\n document.querySelector('#isbn').value = '';\n }", "function makingInputEmpty(input){\n input.value = \"\";\n}", "clearFields(){\n document.querySelector('#title').value = '';\n document.querySelector('#author').value = '';\n document.querySelector('#reference').value = '';\n document.querySelector('#price').value = '';\n }", "function cleanInput(data) {\n\tvar newdata = data.toString().replace(/(\\r\\n|\\n|\\r)/gm,\"\");\n\tnewdata = newdata.replace(/\\|/gm, \" \");\n\tnewdata = newdata.replace(/\\s+/g, \" \");\n\tnewdata = newdata.split(\" \");\n\treturn newdata;\n}", "function limpiarFormulario() {\r\n $('#Codigo').val('');\r\n $('#Titulo').val('');\r\n $('#Descripcion').val('');\r\n $('#FechaInicio').val('');\r\n $('#FechaFin').val('');\r\n $('#HoraInicio').val('');\r\n $('#HoraFin').val('');\r\n $('#ColorFondo').val('#3788D8');\r\n $('#ColorTexto').val('#ffffff');\r\n }", "static clearFields(){\n document.querySelector('#title').value ='';\n document.querySelector('#author').value ='';\n document.querySelector('#isbn').value ='';\n }", "function clean_imput(){\n\tfor (var i=1; i < 6; i++) {\n\t document.getElementById(i).value=\"\";\n\t}\n\t \n}", "function clear_form_data() {\n $(\"#inventory_name\").val(\"\");\n $(\"#inventory_category\").val(\"\");\n $(\"#inventory_available\").val(\"\");\n $(\"#inventory_condition\").val(\"\");\n $(\"#inventory_count\").val(\"\");\n }", "function clearFields() {\n movie_name.value = '';\n release_date.value = '';\n movie_banner.value = '';\n description.value = '';\n}" ]
[ "0.7225071", "0.7145315", "0.70979565", "0.7060485", "0.7043496", "0.70128393", "0.6939596", "0.6908066", "0.6856607", "0.6823294", "0.6803133", "0.6793964", "0.674776", "0.67107254", "0.6665976", "0.6645781", "0.6635197", "0.6616442", "0.6565005", "0.65594757", "0.6533194", "0.64980966", "0.64920956", "0.6487915", "0.6468574", "0.64393187", "0.64389515", "0.6416517", "0.6402219", "0.6380108", "0.63541776", "0.6333928", "0.6324653", "0.6315062", "0.6303253", "0.6295668", "0.6294582", "0.62920696", "0.6284107", "0.6279262", "0.6272926", "0.62691957", "0.62577003", "0.62570405", "0.6256406", "0.624349", "0.62424475", "0.6240426", "0.6239747", "0.6225835", "0.62236863", "0.62204295", "0.6219905", "0.62121934", "0.6210758", "0.62056476", "0.62020516", "0.61997235", "0.61959654", "0.61914694", "0.619088", "0.61908174", "0.61879873", "0.6179479", "0.61758316", "0.61758316", "0.6172133", "0.6171644", "0.6168661", "0.616356", "0.6160235", "0.6159753", "0.6155754", "0.61554193", "0.61434853", "0.6137353", "0.61327046", "0.61327046", "0.61327046", "0.6130814", "0.6124952", "0.61218137", "0.6118548", "0.61165464", "0.611641", "0.6114251", "0.6114251", "0.6114251", "0.6114251", "0.6112705", "0.6107084", "0.609639", "0.60938954", "0.60884917", "0.60866475", "0.60850275", "0.6084265", "0.60764563", "0.6064809", "0.6063348", "0.605149" ]
0.0
-1
This function grabs posts from the database and updates the view
function getPosts(author) { authorId = author || ""; if (authorId) { authorId = "/?author_id=" + authorId; } $.get("/api/posts" + authorId, function(data) { console.log("Posts", data); posts = data; if (!posts || !posts.length) { displayEmpty(author); } else { initializeRows(); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPosts() {\n $.get('/api/posts/', function (data) {\n var postsToAdd = [];\n for (var i = 0; i < data.length; i++) {\n\n newPost = data[i];\n\n postsToAdd.push(createPostDiv(newPost));\n renderPost(postsToAdd);\n }\n });\n }", "function viewPostForUpdate(pst){\n\tvar singlePost = pst;\n\tvar main = $(\".note-container\");\n\tmain.html(\"\");\n\tvar userInformation = singlePost[0].user_info[0];\n\tvar postText = singlePost[0].post_text;\n\tvar postId = singlePost[0].post_id;\n\tvar postTitle = singlePost[0].post_title;\n\tvar postCategoryId = singlePost[0].category_id;\n\tvar firstName = userInformation.first_name;\n\tvar lastName = userInformation.last_name;\n\tvar imageId = userInformation.image;\n\tvar gender = userInformation.gender;\n\tvar userId = userInformation.user_id;\n\tvar postType = singlePost[0].post_type;\n\tvar imageLocation;\n\tvar likeClass = \"\";\n\tvar unlikeClass = \"\";\n\n\t$(\".user-name\").html(firstName+\" \"+lastName);\n\t$('[data-topicid~='+postCategoryId+']').addClass(\"selected\");\n\t$(\"#postTitle\").val(postTitle);\n\t$(\"#postId\").val(postId);\n\t$(\"#topicId\").val(postCategoryId);\n\t$(\"#userId\").val(userId);\n\t$(\".nicEdit-main\").html(postText);\n}", "function populatePosts() {\n $.ajax({\n // sends a request to get the posts from the db\n url: \"/get/posts\",\n method: \"GET\",\n success: function(result) {\n // updates text with result from request\n results = JSON.parse(result);\n let displayedResult = '';\n // iterates through each post and adds it to the result\n for (i in results) {\n displayedResult += generatePosts(results[i], i);\n }\n // sets the inner html to the posts html generated in generatePosts()\n postsContent.innerHTML = displayedResult;\n }\n });\n}", "function loadItemPostData(){\n return post_model.get([ctrl.editedItem.post_id]).then(function(){\n var p = post_model.list[ctrl.editedItem.post_id].datum;\n\n ctrl.editedPost = {\n id: p.id,\n content: p.content,\n link: p.link,\n link_title: p.link_title,\n link_desc: p.link_desc,\n picture: p.picture,\n attachments: p.docs ? p.docs.concat(p.images||[], p.audios||[], p.videos||[]):[]\n };\n });\n }", "async function showPosts() {\n const posts = await getPosts();\n\n posts.forEach((post) => {\n const postEl = document.createElement(\"div\");\n postEl.classList.add(\"post\");\n postEl.innerHTML = `\n <div class=\"post-number\">${post.id}</div>\n <div class=\"post-info\">\n <h2 class=\"post-title\">${post.title}</h2>\n <div class=\"post-body\">${post.body}</div>\n </div>\n `;\n postsContainer.appendChild(postEl);\n // The Node.appendChild() method adds a node to the end of the list of children of a specified parent node.\n // The fetch() method takes one mandatory argument, the path to the resource you want to fetch.\n // It returns a Promise that resolves to the Response to that request, whether it is successful or not\n });\n}", "async index({ view }) {\n // const posts = [\n // {title:'Post One', body:'This is post one'},\n // {title:'Post Two', body:'This is post two'},\n // {title:'Post Three', body:'This is post three'},\n // ]\n\n // The posts object is an instance of Vanilla serializer\n const posts = await Post.all();\n // render index page under posts & pass the data title over to the frontend\n return view.render('posts.index', {\n title: 'Latest Posts',\n posts: posts.toJSON(),\n })\n }", "list(req, res, next) {\n PostModel.find((err, posts) => {\n res.render('posts', { posts });\n }); //end of PostModel.find\n }", "function viewMyPosts(pst){\n\n\tvar main = $(\"#postContainer\");\n\tmain.html(\"\");\n\tvar posts = pst;\n\tvar postsLength = posts.length;\n\tvar showMore = \"\";\n\n\tvar numFix = 0;\n\tfor(var i=0; i<postsLength;i++){\n\t\tvar userInformation = posts[i].user_info[0];\n\t\tvar userId = posts[i].user_id;\n\t\tvar commentMode = posts[i].comment_mode;\n\t\tvar like = posts[i].like;\n\t\tvar numLikes = posts[i].num_likes;\n\t\tvar numUnlikes = posts[i].num_unlikes;\n\t\tvar numComments = posts[i].num_comments;\n\t\tvar postDate = formatDate(posts[i].post_date);\n\t\tvar postId = posts[i].post_id;\n\t\tvar postText = posts[i].post_text;\n\t\tvar postTitle = posts[i].post_title;\n\t\tvar postCategory = posts[i].category_name;\n\t\tvar publicityMode = posts[i].publicity_mode;\n\t\tvar unlike = posts[i].unlike;\n\t\tvar firstName = userInformation.first_name;\n\t\tvar lastName = userInformation.last_name;\n\t\tvar imageId = userInformation.image;\n\t\tvar gender = userInformation.gender;\n\t\tvar postType = posts[i].post_type;\n\t\tvar imageLocation;\n\t\tvar likeClass = \"\";\n\t\tvar unlikeClass = \"\";\n\t\n\t\t/*Changes the image*/\n\t\tif(imageId==\"\" || imageId==1 || imageId==0){\n \t if(gender==\"Male\"){\n \t imageLocation = \"./images/male_profile.jpg\";\n \t }else if(gender==\"Female\"){\n \t imageLocation = \"./images/female_profile.jpg\";\n \t }\n \t}else{\n \t imageLocation = \"./images/\"+imageId; \n \t}\n\n\t\tif(postText.length>400){\n\t\t\tpostText = postText.slice(0,303)+\" ... \";\n\t\t\tpostText += '<a class=\"read-more\" href=\"viewpost.php?pid='+postId+'\">Read More</a>';\n\t\t}\n\n\t\tif(postTitle.length > 100){\n\t\t\tpostTitle = postTitle.slice(0,80);\n\t\t\tpostTitle += \" ... \";\n\t\t}\n\n\t\tif(like){\n\t\t\tlikeClass = \"liked\";\n\t\t}\n\t\tif(unlike){\n\t\t\tunlikeClass = \"unLiked\";\n\t\t}\n\t\tvar post = '<div class=\"posts-container\"><div class=\"row\"><div class=\"col-md-2 col-xs-3\"><img src=\"'+imageLocation+'\" class=\"profile-image\" alt=\"\"></div><div class=\"col-md-10 col-xs-9\"><p class=\"user-name\"><a href=\"profile.php?uid='+userId+'\">'+firstName+' '+lastName+'</a></p><p>'+postDate+'</p><p class=\"postTag\">#'+postCategory+'</p></div></div><div class=\"row\"><p class=\"title\"><a href=\"#\" class=\"post-title\">'+postTitle+' </a></p><p class=\"post\">'+postText+' </p></div><div class=\"row\"><div class=\"col-lg-12 col-md-12 col-sm-12 col-xs-12\"><div class=\"row\"><div class=\"col-xs-3 tab like '+likeClass+'\" id=\"like\" data-postId=\"'+postId+'\"><i class=\"fas fa-thumbs-up\"></i><span class=\"numLike\">'+numLikes+'</span></div><div class=\"col-xs-3 tab dislike '+unlikeClass+'\" id=\"dislike\" data-postId=\"'+postId+'\"><i class=\"fas fa-thumbs-down\"></i><span class=\"numDislike\">'+numUnlikes+'</span></div><div class=\"col-xs-3 tab comment\" id=\"comment\" data-postId=\"'+postId+'\"><i class=\"fas fa-comment\"></i><span class=\"numComment\">'+numComments+'</span></div><div class=\"buttons postEdit col-xs-3 tab\" id=\"postEdit\" data-postId=\"'+postId+'\"><i class=\"fas fa-edit\"></i> Edit</div></div></div></div></div>';\n\t\tmain.append(post);\n\t}\n\tmain.append(showMore);\n}", "function load_posts() {\n document.querySelector('#form-view').style.display = 'block';\n document.querySelector('#post-list').style.display = 'block';\n document.querySelector('#post-list').innerHTML = '';\n document.querySelector('#profile-view').style.display = 'none'; \n document.querySelector('#profile-view').innerHTML = ''; \n\n fetch('/show')\n .then(response => response.json())\n .then(posts => {\n paginate_posts(posts);\n });\n}", "async function showPosts() {\n\tconst posts = await getPosts();\n\n\t// Get post one by one\n\tposts.forEach((post) => {\n\t\t// ! Create post container from api\n\t\tconst postEl = document.createElement('div');\n\t\tpostEl.classList.add('post');\n\t\tpostEl.innerHTML = `\n <div class=\"number\">${post.id}</div>\n <div class=\"post-info\">\n <h2 class=\"post-title\">${post.title}</h2>\n <p class=\"post-body\">${post.body}</p>\n </div>`;\n\n\t\t// ! Add the post data in to the post container\n\t\tpostContainer.appendChild(postEl);\n\t});\n}", "updatePosts (state, posts) { state.posts = posts }", "function renderPosts() {\n // assign posts object to a variable\n var posts = memory.posts;\n // loop through posts object\n for (var i = 0; i < posts.length; i++) {\n // call render method\n memory.posts[i].render();\n };\n }", "getPost() {\n\t\t// fetch all posts from the server\n\t\tfetch(postURL)\n\t\t\t.then(response => response.json())\n\t\t\t// put them into this.posts and store them there\n\t\t\t.then(data => {\n\t\t\t\tthis.posts = data;\n\t\t\t\treturn data;\n\t\t\t})\n\t\t\t// Use .showPost() to display posts\n\t\t\t.then(data => this.showPost(data));\n\t}", "function getPostDetail() {\n var postId = Utils.getParameterByName(\"id\");\n\n Stamplay.Object(\"post\").get({ _id : postId})\n .then(function(res) {\n var post = res.data[0];\n var viewData = {\n id : post._id,\n url : post.url,\n shortUrl : Utils.getHostname(post.url),\n title : post.title,\n dt_create : Utils.formatDate(post.dt_create),\n votesLength : post.actions.votes.users_upvote.length\n }\n Utils.renderTemplate('post-detail', viewData, '#postcontent');\n\n post.actions.comments.forEach(function (comment) {\n var viewData = {\n displayName: comment.displayName,\n dt_create: Utils.formatDate(comment.dt_create),\n text: comment.text\n }\n Utils.renderTemplate('post-comment', viewData, '#postcomments');\n })\n\n }).catch(function (err) {\n console.log('error', err);\n })\n}", "function allPostsView(targetname){\n\n let posts = Model.getPosts();\n let count = 0;\n\n for (let i =0; i<posts.length;i++){\n\n count++\n\n }\n\n let target = document.getElementById(targetname);\n let template = Handlebars.compile(\n document.getElementById(\"display-list-template\").textContent\n ) \n target.innerHTML = template({'display': Model.getRecentPosts(count)})\n\n}", "allPosts() {\n console.log('New posts have arrived.');\n // console.log('allPosts was modified, updating feed!');\n if (!this.allPosts) {\n return;\n }\n this.redrawFeed();\n }", "function loadPosts() {\n\n\n}", "function renderPosts(event) {\n event.preventDefault();\n let postList = localStorage.getItem(\"postList\");\n postList = JSON.parse(postList);\n\n if (postList != null) {\n for (post in postList) {\n makePost(postList[post]);\n }\n }\n}", "static async viewPost(req, res) {\n try {\n const { postId } = req.params;\n const posts = await checkPost(postId);\n if (!posts || (posts.length <= 0)) {\n return res.status(404).json({\n error: true,\n message: 'Sorry, this post does not exist or may have been deleted by the author.'\n });\n } else {\n const getPost = posts[0].posts;\n let postDetails = [];\n for (let i = 0; i < getPost.length; i++) {\n if (getPost[i]._id == postId) {\n const post = {\n _id: posts[0]._id,\n email: posts[0].email,\n postId: getPost[i]._id,\n post: getPost[i].post,\n date: getPost[i].createdAt\n };\n postDetails.push(post);\n }\n }\n return res.status(200).json({\n success: true,\n message: 'post retrieved successfully',\n postDetails\n });\n }\n } catch (error) {\n return res.status(500).json({\n error: true,\n message: 'server error.',\n });\n }\n }", "function handlePosts() {\n var posts = [\n { id: 23, title: 'Daily JS News' },\n { id: 52, title: 'Code Refactor City' },\n { id: 105, title: 'The Brightest Ruby' }\n ];\n \n for (var i = 0; i < posts.length; i++) {\n savePost(posts[i]);\n }\n}", "function loadPosts() {\n const postsCollection = firebase.firestore().collection(\"postagens\");\n container.querySelector(\"#lista-feed\").innerHTML = \"Carregando...\";\n postsCollection.get().then((querySnapshot) => {\n container.querySelector(\"#lista-feed\").innerHTML = \"\";\n querySnapshot.forEach((doc) => {\n const post = { id: doc.id, data: doc.data() };\n const componente = postTemplate(post);\n console.log(componente)\n container.querySelector(\"#lista-feed\").appendChild(componente);\n });\n });\n }", "function refetchPost(){\n props.fetchPost(props.post.id)\n }", "function displayPosts(forum)\n{\n\tif(forum != \"home\")\n\t{\n\t\tvar route = \"posts\"; \n\t\tswitch(forum)\n\t\t{\n\t\t\tcase \"leaving\":\n\t\t\t\troute += \"?offer=ride\"; \n\t\t\t\tbreak; \n\t\t\tcase \"arriving\": \n\t\t\t\troute += \"?offer=shelter\"; \n\t\t\t\tbreak; \n\t\t\tcase \"waiting\":\n\t\t\t\troute += \"?offer=donation\"; \n\t\t\t\tbreak; \n\t\t}\n \t$.get(route, function(data, status){ //make ajax call to the forum, gets all posts\n \t data.posts.forEach((post) => { //display results\n \t var $post = $(\"<div class='list-group-item' id='\"+ post.UserId + \"'>\" \n\t\t\t\t\t+ \"<p>Address: \" + post.street + \"</p>\" \n\t\t\t\t\t+ \"<p>State: \" + post.state + \"</p>\"\n\t\t\t\t\t+ \"<p>City: \" + post.city + \"</p>\" \n\t\t\t\t\t+ \"<p>Space: \" + post.space + \"</p>\" \n\t\t\t\t\t+ \"<p>Pets: \" + post.pets + \"</p>\" \n\t\t\t\t\t+ \"<p>Message: \" + post.message + \"</p>\" \n + \"<form method='get'>\"\n + \"<input type='hidden' name='PostId' value='\" + post.Id + \"'>\"\n + \"<button type='submit' formaction='/viewPost'>View Post</button>\"\n + \"<button type='submit' formaction='/editPost'>Edit</button>\"\n + \"<button type='submit' formaction='/deletePost'>Delete</button>\"\n + \"<button type='submit' formaction='/reportForm'>Report</button>\"\n + \"</form>\"\n\t\t\t\t\t+ \"</div>\"); \n \t $(\"#postsDiv\").append($post); \n \t })\n \t}); \n\t}\n}", "function allPost(req,res){\n //get all posts from database\n Post.find({},(err,posts)=>{\n if(err){\n res.status(404);\n res.send('Post Not Found !');\n }\n\n //return a view with post data\n res.render('./partials/postlst',{\n posts:posts,\n layout:'./layouts/layout'\n });\n });\n}", "function getPosts (cb) {\n var gardenId = $stateParams.id;\n console.log(gardenId)\n $http\n // '/api/posts/:gardenId'\n .get('/api/posts/' + gardenId)\n .then(function(response){\n var allPosts = response.data\n console.log(\"RESPNSE of posts:\", allPosts)\n vm.all = response.data\n // iterate through all posts to match id\n //Filter for matching post to garden on back end\n\n isUsersPost();\n })\n }", "function displayPosts() {\n var posts = JSON.parse(this.response);\n var postsContainer = $(\"#posts\");\n for (var i=0; i<posts.length; i++) {\n postsContainer.append(\"<li>\" + posts[i].body + \"</li>\")\n }\n }", "function index(req, res) {\n Post.find({})\n .then((Posts) => {\n res.render(\"posts/index\", {\n user: req.user,\n title: \"Message Board\",\n posts: Posts.reverse()\n })\n })\n }", "function loadFullPost(index) {\n console.log('loadFullPost INITIATED');\n if (index in localBlogCache) printFullPost(localBlogCache[index]);\n else {\n httpGetAsync('fetchBlog/' + index, function(data) {\n printFullPost(data);\n });\n }\n function printFullPost(data) {\n insertAndExecute('post-list', data)\n }\n}", "function getAllPosts() {\n return db.execute('SELECT * FROM post ORDER BY timeposted DESC;');\n}", "function loadPost() {\n return API.get(\"posts\", `/posts/${id}`);\n }", "loadPosts() {\n // 5) call getPosts with the user's id */\n // 6) use the response.data object to set \"posts\" field on the state\n }", "function getPost(sub) {\n dataBase.ref(\"Posts/\" + sub).once('value', function (data) {\n //if there are no posts in the database under the category then say there are no posts\n if(data.numChildren() === 0)\n insertNoPost(sub)\n else{\n //keep track of how many of the elements in this category are hidden\n var hiddenCount = 0\n //for each post in this category grab all the data out out it\n data.forEach(function (childSnapshot) {\n var childData = childSnapshot.val();\n var postID = childSnapshot.key;\n var question = childData.question;\n var description = childData.description;\n var bounty = childData.bounty;\n var category = childData.category;\n var visibility = childData.visibility;\n var displayName = childData.displayName;\n var myUid = childData.uid;\n\n //If the post is listed as visible in the database then display it to the page\n if(visibility == 'visible'){\n //create the html to be injected\n var html = [\n '<div class=\"post_topbar\">',\n '<div class=\"usy-dt\">',\n '<div class=\"usy-name\">',\n '<h3>',displayName,'</h3>',\n '<span>$',bounty,'</span>',\n '</div>',\n '</div>',\n '<div class=\"ed-opts\">',\n '<a href=\"#\" title=\"\" class=\"ed-opts-open\"><i class=\"la la-ellipsis-v\"></i></a>',\n '<input id=\"button',postID,'\" type=\"button\" value=\"Claim Bounty\" onclick=\"openChatPage(\\'',postID,'\\');\" style=\"float:right; background-color: green; color: white; height: 25px; width: 100px; border: none;\"></input>',\n '<ul class=\"ed-options\">',\n '<li><a href=\"#\" title=\"\">Edit Post</a></li>',\n '<li><a href=\"#\" title=\"\">Unsaved</a></li>',\n '<li><a href=\"#\" title=\"\">Unbid</a></li>',\n '<li><a href=\"#\" title=\"\">Close</a></li>',\n '<li><a href=\"#\" title=\"\">Hide</a></li>',\n '</ul>',\n '</div>',\n '</div>',\n '<div class=\"job_descp\">',\n '<h3>',question,'</h3>',\n '<p>',description,'</p>',\n '</div>'\n ].join('');\n var div = document.createElement('div');\n div.setAttribute('class', 'post-bar');\n div.setAttribute('id', postID);\n div.innerHTML = html;\n //add the div with the html elements inside to the posts section of the page\n document.getElementById('posts-section').appendChild(div);\n }\n //Increment count of hidden items\n else{hiddenCount++}\n\n //If all posts within the category are hidden, then display that there are\n //currently no posts for that category\n if(data.numChildren() === hiddenCount)\n insertNoPost(sub)\n });\n }\n });\n}", "function display_posts() {\n\t\tconsole.log(\"display_posts\");\n\t\t$.ajax({\n\t\t\turl: '/api/index.php',\n\t\t\ttype: \"GET\",\n\t\t\tdata: \"controller=post&action=createPost&title=website&message=adhabdkhajbdhjkasd\",\n\t\t\tcache: false,\n\t\t\tsuccess: function(responseText){\n\t\t\t\t//alert('new post added !!');\n\t\t\t\t$('#container').fadeIn().load(\"viewPosts.php\");\n\t\t\t}\n\t\t});\n\t}", "function getProfPosts() {\n var posts_length,\n myPostMold;\n $.ajax({\n url: site_host + \"posts/myposts\",\n type: \"post\",\n data: {\n ajax: true\n },\n dataType: \"json\",\n success: function (response) {\n posts_length = response.data.length;\n if (posts_length === 0) {\n // ther is no posts\n $('#main-posts > .loader').hide();\n alert(\"There is no Posts\");\n return;\n }\n for (count_posts; count_posts < posts_length; count_posts += 1) {\n $('#main-posts > .loader').before(createPostMold());\n myPostMold = $(\".publication_mold\");\n myPostMold.last().find(\".module_teacher h3\").html(response.data[count_posts].title);\n myPostMold.last()\n .find(\".module_teacher .time_pub\").html(response.data[count_posts].date_parsed);\n myPostMold.last()\n .find(\".module_teacher .module_name\").html(response.data[count_posts].type_parsed);\n myPostMold.last()\n .find(\".publication_body p\").html(response.data[count_posts].text_post);\n myPostMold.last().attr(\"data-target\", response.data[count_posts]._id_post);\n\n // change Save to Delete \n myPostMold.last().find(\".publication_body .react-bar li .save-post\")\n .removeClass('save-post').addClass('delet-post').attr('title', 'Supprimer');\n myPostMold.last().find(\".publication_body .react-bar li .delet-post\")\n .children(\"i.fa\").attr(\"class\", \"fa fa-trash fa-2x\");\n }\n $('#main-posts > .loader').hide();\n },\n complete: function () {\n autosize();\n }\n });\n }", "async userIndex({view, auth}) {\n const posts = await auth.user.posts().fetch();\n\n return view.render('posts', { posts: posts.toJSON() });\n }", "async function getPost(req, res, next) {\n try {\n if (!dbService) { throw new Error('dbService does not exist'); }\n\n const postId = req.params.postId;\n let isAdmin = false;\n\n const post = await dbService.readPost(postId, {isAdmin});\n if (post) {\n // Return the result first, update the view count later\n post.viewCount += 1; // That why we have to add 1 to the view count\n res.status(200).json(post);\n await dbService.updatePostViewCount(postId);\n } else {\n return res.status(404).json({message: 'No any result.'});\n }\n } catch(ex) {\n log.error({postId: req.params.postId, ex: ex.stack}, 'Error in service GET /posts/:postId');\n return res.sendStatus(500);\n }\n}", "function handlePosts() {\n\tvar posts = [\n\t\t{ id: 23, title: 'Daily JS News' },\n\t\t{ id: 52, title: 'Code Refactor City' },\n\t\t{ id: 105, title: 'The Brightest Ruby' },\n\t];\n\n\tposts.forEach(function (post) {\n\t\tsavePost(post);\n\t});\n}", "allposts( state, data ){\n return state.post = data\n }", "function loadPublishedPosts() {\n $.ajax({\n url: \"published\"\n }).success(function (posts) {\n // function to fill the published posts div here\n createHomePostDivs(posts, status);\n fillHomePostsDiv(posts);\n });\n}", "function posts(arr) {\n let postApi = arr.filter((el) => el.userId == id);\n postApi.forEach(element => {\n fragmentPost.appendChild(renderPosts(element));\n });\n elPostListWrapper.appendChild(fragmentPost)\n }", "function getPosts() {\n Post\n // remote method that returns `posts` array with username\n .findAll()\n .$promise\n .then(function(results) {\n vm.posts = results.posts;\n });\n }", "function displayPosts(posts) {\r\n\t// use helper function displayPost\r\n\r\n}", "function getAllPosts() {\n fetch(\"https://bloguefp.herokuapp.com/\")\n .then((r) => r.json())\n .then(appendPosts)\n .catch(console.warn);\n}", "function getPosts(userID, name) {\n $.get(\"/api/posts\", function(data) {\n posts = data.reverse();\n console.log(posts)\n if (!posts || !posts.length) {\n displayEmpty(userID, name);\n }\n else {\n initializeRows(userID);\n }\n });\n }", "function loadPosts() {\n API.userPosts(pathParams.user_id)\n .then(res =>\n setPosts(res.data)\n )\n .catch(err => console.log(err));\n }", "async function listPosts() {\n\t\tconst p = await API.graphql(graphqlOperation(ListPosts));\n\t\tupdatePosts(p.data.listPosts.items);\n\t}", "function renderPosts(data) {\r\n postLists.innerHTML = null;\r\n const nameBox = document.createElement(\"h3\");\r\n nameBox.textContent = \"POSTS\";\r\n postLists.appendChild(nameBox);\r\n\r\n data.forEach((element) => {\r\n const newUserPost = userPostTemp.cloneNode(true);\r\n const postTitle = newUserPost.querySelector(\".post-title\");\r\n postTitle.textContent = element.title;\r\n postTitle.dataset.post_id = element.id;\r\n newUserPost.querySelector(\".body\").textContent = element.body;\r\n postLists.appendChild(newUserPost);\r\n });\r\n}", "async init() {\n this.postId = this.router.params.id;\n\n this.postSharedKey = 'posts.' + this.postId;\n\n this.postsService.increaseViews(this.postId);\n\n if (this.shareable.isSharing(this.postSharedKey)) {\n this.setPost(this.shareable.getShared(this.postSharedKey))\n } else {\n this.isLoading = true;\n }\n\n this.db.get(`post.${this.postId}`, e => {\n return this.postsService.get(this.postId);\n }, this.db.recache).then(response => {\n let { record } = response;\n\n this.setPost(record);\n });\n }", "async function showPostView() {\n // hide everything except clicked post\n let thisPost = this.parentElement.parentElement;\n id(\"post-comments\").innerHTML = \"\";\n id(\"search-term\").value = \"\";\n let posts = qsa(\".card\");\n for (let post of posts) {\n if (post.id !== thisPost.id) {\n post.parentElement.parentElement.querySelector(\".content\").classList.add(\"hidden\");\n post.classList.add(\"hidden\");\n }\n }\n thisPost.querySelector(\".content\").classList.remove(\"hidden\");\n\n // increment views\n let viewCounter = this.parentElement.parentElement.querySelector(\".views\");\n incrementStats(viewCounter, \"views\");\n\n // display comments\n let comments = formatResults(await getComments(thisPost.id));\n for (let comment of comments) {\n let newComment = generateComment(comment);\n id(\"post-comments\").appendChild(newComment);\n }\n id(\"comments\").classList.remove(\"hidden\");\n }", "function loadPosts() {\n return API.get(\"posts\", \"/publicposts\");\n }", "function displayPost(post) {\r\n\r\n}", "getPosts() {\n let communicationController = new CommunicationController()\n let response = function (result) {\n // Rimozione dei post precedenti sia dal model che dall'html\n Model.getInstance().clearPosts()\n\n this._imagePosts = new Array()\n let posts = result.posts.reverse()\n for (let i = 0; i < posts.length; i++) {\n\n Model.getInstance().addPost(posts[i]);\n if (Model.getInstance().actualUser.uid == posts[i].uid) {\n this.myPostHTML(posts[i]);\n } else {\n this.othersPostHTML(posts[i]);\n }\n }\n this.fullScreenImage()\n this.openProfilePicturesDataBase()\n this.openImagesDataBase()\n\n // Apertura mappa per i post di tipo posizione\n $(\".locationButton\").click(function () {\n console.log(\"click\");\n let postIndex = $(\".post\").index($(this).parent());\n let map = new Map();\n map.setPostLocation(result.posts[postIndex].lat, result.posts[postIndex].lon);\n });\n }\n communicationController.getChannel(ctitle, response.bind(this));\n }", "async function newPost() {\n let newPost = formatResults(await submitPost())[0];\n id(\"home\").prepend(generateCard(newPost));\n setTimeout(showHomeView, DELAY);\n }", "function LoadBlogPost(){\n\tvar curUserID = sessionStorage.getItem('user_id');\n\n\tvar contentSection = document.getElementById('sub-content-content');\n\tvar contentHeading = document.getElementById('sub-content-title');\n\n\tvar getLikeTracksxhrq = new XMLHttpRequest();\n\tvar getLikeTracksURL = 'http://127.0.0.1:3000/getBlog?userID=' + curUserID;\n\n\tvar postHTML = '<p class=\"ripple-post-date\">{%PostDate%}</p>' + \n\t\t\t\t '<p class=\"ripple-post-content\">{%PostContent%}</p>' + \n\t\t\t\t '<p class=\"ripple-post-likes\">{%PostLikes%} Likes</p>';\n\n\tvar enterPost = '<textarea class=\"ripple-put-blog\" id=\"ripple-put-blog\"></textarea>' + \n\t\t\t\t\t'<button class=\"common-btn ripple-post-btn\" id=\"ripple-post-btn\">Post</button>';\n\n\tgetLikeTracksxhrq.open('get', getLikeTracksURL, true);\n\n\tgetLikeTracksxhrq.onreadystatechange = function(){\n\t\tif(getLikeTracksxhrq.readyState === XMLHttpRequest.DONE){\n\t\t\tvar postsRes = JSON.parse(getLikeTracksxhrq.responseText);\n\t\t\tcontentHeading.innerHTML = 'My Blog Posts';\n\t\t\t// clear the previous content \n\t\t\tcontentSection.innerHTML = '';\n\t\t\tfor(var key in postsRes){\n\t\t\t\tvar curPost = postsRes[key];\n\t\t\t\tconsole.log(curPost);\n\t\t\t\tvar newHTML = postHTML;\n\t\t\t\tnewHTML = newHTML.replace('{%PostDate%}', curPost['blog_date']);\n\t\t\t\tnewHTML = newHTML.replace('{%PostContent%}', curPost['content']);\n\t\t\t\tnewHTML = newHTML.replace('{%PostLikes%}', curPost['likes']);\n\n\t\t\t\tvar newLi = document.createElement('li');\n\t\t\t\tnewLi.setAttribute('class', 'ripple-post-li');\n\t\t\t\tnewLi.innerHTML = newHTML;\n\n\t\t\t\tcontentSection.appendChild(newLi);\n\t\t\t}\n\n\t\t\tvar enterDiv = document.createElement('div');\n\t\t\tenterDiv.setAttribute('id', 'ripple-post-area');\n\t\t\tenterDiv.innerHTML = enterPost;\n\n\t\t\tcontentSection.appendChild(enterDiv);\n\n\t\t\t// add listener to post blog button \n\t\t\tvar postBtn = document.getElementById('ripple-post-btn');\n\t\t\tpostBtn.addEventListener('click', postBlog);\n\t\t}\n\t};\n\n\tgetLikeTracksxhrq.send(null);\n}", "function getAllPostsByMe(){\n\tvar info = {\n\t\t\t\"type\":\"postByMe\",\n\t\t};\n\t$.get(BASE_URL+\"php/view.php\",info,function(data){\n\t\t\tconsole.log(data);\n\t\t\tviewMyPosts(data);\n\t\t}).fail(function(jqXHR){\n\t\tconsole.log(jqXHR.statusText);\n\t});\n}", "async function list(ctx, next) {\n ctx.body = await render('list', { posts: posts})\n}", "function ContentHandler (db) {\n\t\"use strict\";\n\n\tvar posts = new PostsDAO(db);\n\tvar users = new UsersDAO(db);\n\tvar global = new GlobalDAO(db);\n\n\n\tvar newScore; //updated global score \n\tvar ownedPosts ='hi';//updated global owned projects \n\n\n\n\n\tthis.displayMainPage = function(req, res, next) {\n\t\t\"use strict\";\n\n\t\tposts.getAll(200, req.username, req.route.path, function(err, results) {\n\t\t\t\"use strict\";\n\t\t\tif (err) return next(err);\n\n\t\t\tposts.makePercentages(req.username, results, function(err, post) {\n\t\t\t\t\"use strict\";\n\n\t\t\t\tif (err) return next(err);\n\n\t\t\t\t//if (!post) return res.redirect(\"/profile\"); \n\t\t\t});\n\t\n\n\t\t\treturn res.render('blog_template', {\n\t\t\t\ttitle: 'blog homepage',\n\t\t\t\tusername: req.username,\n\t\t\t\tmyposts: results,\n\t\t\t\tusers: users,//\n\t\t\t\tscore: newScore\n\t\t\t});\n\t\t});\n\t}\n\t\n\tthis.displayMainPageBySearchWords = function(req, res, next){\n\t\t\"use strict\"\n\n\t\tconsole.log('displayMainPageBySearchWords');\n\t\n\t\tvar search = req.url; \n\n\t\tvar search = search.split('=')[1];\n\t\tvar search = search.split('+');\n\n\t\tconsole.log(search);\n\t\t\n\t\tposts.getPostBySearchWords(search, 20, function(err, results) {\n\t\t\t\"use strict\";\n\n\t\t\tif (err) return next(err);\n\t\t\n\t\t\treturn res.render('blog_template', {\n\t\t\t\ttitle: 'blog homepage',\n\t\t\t\tusername: req.username,\n\t\t\t\tmyposts: results\n\t\t\t});\n\t\t});\n \t}\t\t\n\n\tthis.displayProfilePage = function(req, res, next) {\n\t\t\"use strict\";\n\n\t\tposts.getPosts(20, req.username, req.route.path, function(err, results) {\n\t\t\"use strict\";\n\n\t\t\tposts.makePercentages(req.username, results, function(err, post) {\n \t\"use strict\";\n\n\t\t\t\t//console.log('make% called');\n\t\t\t\tif (err) return next(err);\n\n \t});\n\n\t\t\tif (err) return next(err);\n\t\t\treturn res.render('profile', {\n\t\t\t\ttitle: 'profile',\n\t\t\t\tusername: req.username,\n\t\t\t\tmyposts: results,\n\t\t\t});\n\t\t});\n\t}\n\n\n \n\tthis.displayStudentsPage = function(req, res, next){\n\t\t\"use strict\"\n\t\tconsole.log(req);\n\t\tvar title = req.params.title;\n\t\tconsole.log(req.params);\n\t\tconsole.log(title);\n\t\tconsole.log(req.route.path)\n\t\t\n\t\tposts.getStudents(20, title, req.route.path, function(err, results) {\n\t\t\t\"use strict\";\n\t\t\tif (err) return next(err);\n\t\t\treturn res.render('students', {\n\t\t\t\ttitle: title,\n\t\t\t\tusername: req.username,\n\t\t\t\tmyposts: results\n\t\t\t});\n\t\t});\n\t}\n\n\n\tthis.displayEditPage = function(req, res, next){\n\t\t\"use strict\"\n\t\tvar title = req.params.title;\n\n\t\tconsole.log('title '+title);\n\n\t\tusers.getTitles(req.username, function (err, titles){\n\t\t\t\t\"use strict\";\n\t\t\t\tif(err) return next(err);\n\t\t\t\townedPosts = titles;\n\t\t\t\tconsole.log(\"content.js newScore \"+ titles);\t\t\n\n\n\t\t\tposts.getSubject(20, req.username, title, req.route.path, function(err, results) {\n\t\t\t\t\"use strict\";\n\t\t\t\tif (err) return next(err);\n\n\t\t\t\treturn res.render('edit', {\n\t\t\t\t\ttitle: title,\n\t\t\t\t\tusername: req.username,\n\t\t\t\t\tmyposts: results,\n\t\t\t\t\towner: JSON.stringify(titles)\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t}\n\n\n\tthis.updateWords = function(req, res, next) {\n\t\t\"use strict\" \n\n\t\tconsole.log('updateWords');\n\t\tconsole.log(req.body);\n\t\tconsole.log(req.params.permalink);\n\t\tconsole.log(req.params); \n\n\t\tvar permalink = req.params.permalink;\n\t\tvar class_number = parseInt(req.params.class_number); \n\t\tvar obj = req.body;\n\t\t//var score = req.body.score;\n\t\t//var content = req.body.content;\n\t\t//var title = req.body.title;\n\n\t\tposts.wordsStrength(permalink, class_number, obj, function(err, post) {\n\t\t\t\"use strict\" \n\t\t\tif (err) return next(err);\n\t\t\tif (!post) return res.redirect(\"/post_has_not_been_found\");\n\t\t});\n\n\t\t/*users.updateScore(req.username, obj, function(err, post) {\n\t\t\t\"use strict\"\n\t\t\tif (err) return next(err);\n\t\t\tif (!post) return res.redirect(\"/post_has_not_been_found\");\n\t\t});*/\n\t\tglobal.updateAnsRem(obj, function(err, post) {\n\t\t\t\"use strict\"\n\t\t\tif (err) return next(err);\n\t\t\tif (!post) return res.redirect(\"/post_has_not_been_found\");\n\t\t});\n\t\t\n\t}\t\n\n\n\n\tthis.updateImage = function(req, res, next){\n\t\t\"use strict\"\n\n\t\tconsole.log('updateImage');\n\t\tconsole.log(req.body);\n\n\t\tvar permalink = req.params.permalink; \n\t\tvar class_number = parseInt(req.params.class_number); \n\t\tvar obj = req.body;\n\t\t//var score = req.body.score;\n\n\t\tposts.imageStrength(permalink, class_number, obj, function(err, post) { ///Set image strength, ans, rem, and Date.now().\")\n\t\t \"use strict\" \n \t if (err) return next(err);\n\t if (!post) return res.redirect(\"/post_has_not_been_found\");\n\t\t});\n\n\t\t/*users.updateScore(req.username, obj, function(err, post) { ///Updates user's stats.\")\n\t\t\t\"use strict\"\n\t\t\tif (err) return next(err);\n\t\t\tif (!post) return res.redirect(\"/post_has_not_been_found\");\n\t\t});*/\n\n\t\tglobal.updateAnsRem(obj, function(err, post) { ///Updates the global total answers and reminders.\") \n\t\t\t\"use strict\"\n\t\t\tif (err) return next(err);\n\t\t\tif (!post) return res.redirect(\"/post_has_not_been_found\");\n\t\t});\n\n\n\t}\n\n\n\n\n/*\n\tthis.findNextPost = function(req, res, next){\n\t\t\"use strict\" \n\n\t\tvar permalink = req.params.permalink;\n\n \tposts.findThisPermalink(permalink, function(err, post) {\n \t\"use strict\";\n\n \tif (err) return next(err);\n\t if (!post) return res.redirect(\"/post_not_found\");\n\n\t\t\tif(post.student == req.username){\n\t\t\t\tvar query = {'_id': {'$gt': post._id}, 'student':req.username}; \n\t\t\t} else {\n\t\t\t\tvar query = {'_id': {'$gt': post._id}, 'student': {'$ne' : req.username } }; \n\n\t\t\t}\n\n\t\t\tposts.findNextPermalink(query, function(err, post) {\n \t\"use strict\";\n\n\t\t\t\tif (err) return next(err);\n\t\t\t\tif (!post) return res.redirect(\"/post/\"+permalink); //if no more posts stay on last post\n\t\t\t\treturn res.redirect(\"/post/\"+post.permalink); \n\n \t});\n });\n\n\n\t}\n\n\n\n\n\tthis.findPreviousPost = function(req, res, next){\n\t\t\"use strict\" \n\t\tvar permalink = req.params.permalink;\n\n\n \tposts.findThisPermalink(permalink, function(err, post) {\n \t\"use strict\";\n\n \tif (err) return next(err);\n\t if (!post) return res.redirect(\"/post_not_found\");\n\n\t\t\tif(post.student == req.username){\n\t\t\t\tvar query = {'_id': {'$lt': post._id}, 'student':req.username}; \n\t\t\t} else {\n\t\t\t\tvar query = {'_id': {'$lt': post._id}, 'student': {'$ne' : req.username } }; \n\t\t\t}\n\n\t\t\tposts.findPreviousPermalink(query, function(err, post) {\n \t\"use strict\";\n\n\t\t\t\tif (err) return next(err);\n\t\t\t\tif (!post) return res.redirect(\"/post/\"+permalink); //if no more posts stay on first post \n\t\t\t\treturn res.redirect(\"/post/\"+post.permalink); \n \t});\n });\n\n\n\t}\n\n*/\n\n\n\n\t\n\n this.displayPostByPermalink = function(req, res, next) {\n \"use strict\";\n\tconsole.log('');\n\tconsole.log('displayPostByPermalink');\n\n //var permalink = req.params.permalink;\n\tconsole.log(req.params)\n\tconsole.log(req.url)\n\t\n\t\tvar w = req.cookies.width * .8;// - 90;\n\t\tvar h = req.cookies.height * .8;// - 90;\n\n\n posts.getPostByPermalink(req, function(err, post, p) {\n \"use strict\";\n\n\n\t\tconsole.log('getPostByPermalink');\n\t\tconsole.log(post);\n\t\tconsole.log('');\n\n\n\t\t\n\t\tif(post){\t\n\n\t\t\tif('image_path' in post){ ///It is an image.)\"\n\t\t\t\tvar url_parts = post.image_path.replace(/\\/\\s*$/,'').split('/');\n\n\t\t\t\tvar temp_pic = url_parts[2];\n\n\t\t\t\tvar fs = require('fs');\n\t\t\t\tvar gm = require('gm').subClass({ imageMagick: true });\n\t\t\t\t\t\n\t\t\t\tconsole.log(\" Resize images to the dimensions the browser window;\")\n\t\t\t\tconsole.log(req.cookies.width + \" \" + req.cookies.height);\n\t\t\t\tconsole.log(w + \" \" + h);\n\n\t\t\t\tgm('public/images/'+temp_pic)\n\t\t\t\t.scale(w, h) //.resize\n\t\t\t\t.stream(function (err, stdout, stderr) {\n\t\t\t\t var writeStream = fs.createWriteStream('public/temp_pics/'+temp_pic); ///Sends image to public/temp_pics;.\")\n\t\t\t\t stdout.pipe(writeStream);\n\t\t\t\t\t if (err) console.log(err);\n\t\t\t\t});\n\t\t\t};\n\t\t}\n\n \t\tif (err) return next(err);\n\t if (!post) return res.redirect(\"/post_has_not_been_found\");\n\n \t// init comment form fields for additional comment\n \t var comment = {'name': req.username, 'body': \"\", 'email': \"\"}\n\t\n\n\n\t\t\tvar oneOfTheStudents;\t\n\n\t\t\tif(p === null){ \n\t\t\t\toneOfTheStudents = 'no'\n\t\t\t}else{ oneOfTheStudents = 'yes'}\n\n\t\n\t\t\treturn res.render('entry_template', {\n\t\t\t\ttitle: 'nikos post',\n\t\t\t\tusername: req.username,\n\t\t\t\tpost: post,\n\t\t\t\tcomment: comment,\n\t\t\t\terrors: \"\",\n\t\t\t\tfollower: post.student,\n\t\t\t\tisStudent: oneOfTheStudents\n\t\t\t});\n\n });\n\n }\n\n\n this.displayPostNotFound = function(req, res, next) {\n \"use strict\";\n return res.send('Sorry, post not found', 404);\n }\n\n\n this.displayNewPostPage = function(req, res, next) {\n \"use strict\";\n\n if (!req.username) return res.redirect(\"/login\");\n\t\n\tusers.getTitles(req.username, function (err, titles){\n\t\t\t\"use strict\";\n\t\t\tif(err) return next(err);\n\t\t\townedPosts = titles;\n\t\t\tconsole.log(\"content.js newScore \"+ titles);\t\t\n\t\t\n\n\t\treturn res.render('newpost_template', {\n\t\t subject: \"\",\n\t\t body: \"\",\n\t\t errors: \"\",\n\t\t tags: \"\",\n\t\t username: req.username,\n\t\t score: newScore,\n\t\t owner: JSON.stringify(titles)\n\t\t});\n\t});\n\n }\n\n function extract_tags(tags) {\n \"use strict\";\n\n var cleaned = [];\n var tags_array = tags.split(',');\n\n for (var i = 0; i < tags_array.length; i++) {\n if ((cleaned.indexOf(tags_array[i]) == -1) && tags_array[i] != \"\") {\n cleaned.push(tags_array[i].replace(/\\s/g,''));\n }\n }\n return cleaned\n }\n\n\n\n\tthis.displayTagsPage = function(req, res, next){\n\t\t\"use strict\"\n\n\t\tconsole.log('displayTagsPage');\n\t\tposts.getTags(req, function(err, tagNames){\n\t\t\t\"use strict\"\n\t\t\tif(err) return next(err);\n\n\t\t\tconsole.log('tagNames');\t\t\t\n\t\t\tconsole.log(tagNames);\n\n\t\t\treturn res.render('tags_template', {\n\t\t\t subject: \"\",\n\t\t\t body: \"\",\n\t\t\t errors: \"\",\n\t\t\t allTags: JSON.stringify(tagNames),\n\t\t\t username: req.username,\n\t\t\t score: newScore\n\t\t\t});\n\t\t});\n\t}\n\n\n\n\n this.handleNewPost = function(req, res, next) {\n \"use strict\";\n\n if (!req.username) return res.redirect(\"/signup\");\n\n var title = req.body.subject.trim();\n\n if (!title) {\n var errors = \"Post must contain a title\";\n return res.render(\"newpost_template\", {subject:title, username:req.username, body:req.body, tags:req.tags, errors:errors});\n }\n\n\t\t///Validiate user's subject name availability.\")\n\t\t\n\t\tusers.findAllSubjectNames(title, req.username, function(err, doc){\n\t\t\t\"use strict\"\n\t\t\tif(err) return next(err);\n\n\t\t\t//return res.redirect(\"/newpost\") //res.render(\"newpost_template\", {subject:title, username:req.username, body:req.body, tags:req.tags, errors:errors});\n\t\t\tif(doc === null){\n\t\t\t\tvar errors = \"Subject name already taken! Choose another!\";\n\n\t\t\t\treturn res.render(\"newpost_template\", {subject:title, username:req.username, body:req.body.body, tags:req.tags, errors:errors});\n\t\t\t} else {\n\t\t\t\tclassNumber(title, req, res, next);\n\t\t\t\treturn res.redirect(\"/profile\");\t\n\t\t\t}\n\t\t}); \n\t\n\t}\n\n\n\tfunction classNumber(title, req, res, next) {\t\t\n\t\tusers.findClassNumber(title, req.username, function(err, dok){\n\t\t\t\"use strict\";\n\t\t\tif(err) return next(err)\n\t\t\tif(dok === null){ ///Very first post with this title.\")\n\t\t\t\tvar first = 'yes';\n\t\t\t\tvar students = [req.username];\n\t\t\t\tvar number_of_classes = 0;\n\t\t\t\tvar class_number = 0; \n\t\t\t\t//var permalink = title.replace( /\\s/g, '_' );\n\n\t\t\t\tusers.createSubject(req.username, title, function(err, own){ ///Adds title to user.\")\n\t\t\t\t\t\"use strict\";\n\t\t\t\t\tif (err) return next(err);\n\t\t\t\t});\n\n\n\t\t\t} else { ///Not first post with this title. Find students.\")\n\t\t\t\tfor(var t=0; t<dok.teacher.length; t++){\n\t\t\t\t\tif(dok.teacher[t].subject == title){\n\n\t\t\t\t\t\tvar students = dok.teacher[t].students;\n\t\t\t\t\t\tvar number_of_classes = dok.teacher[t].number_of_classes;\n\t\t\t\t\t\tvar class_number = dok.teacher[t].number_of_classes;\n\t\t\t\t\t\t//var permalink = title.replace( /\\s/g, '_' );\n\t\t\t\t\t\t//permalink = permalink.replace( /\\W/g, '' )+'_'+dok.teacher[t].student;///Adds username to permalink.\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tconsole.log('in classNumber');\n\t\t\t\t\t\tconsole.log(dok.teacher[t]);\n\t\t\t\t\t\tconsole.log(class_number);\t\n\t\t\t\t\t\t//console.log(permalink);\n\t\t\t\t\t\tconsole.log('');\n\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tnewPost(req, res, next, title, first, students, number_of_classes, class_number);\n\t\t});\n\n \t}\n\n\n\n\tfunction newPost(req, res, next, title, first, students, number_of_classes, class_number) { \t\n\n\t\tconsole.log('newPost ');\n\t\tconsole.log(class_number);\n\t\tconsole.log('');\n\t\tconsole.log('');\n\t\tconsole.log('');\n\t\tconsole.log('');\n\t\tconsole.log('');\n\n\n\n\t\tconsole.log(req.body);\n\n \t\tconsole.log('');\n\t\tconsole.log('');\n\t\tconsole.log('');\n\t\tconsole.log('');\n\t\tconsole.log('');\n\t\tconsole.log('');\n\t\tconsole.log('');\n\t\tconsole.log('');\n\t\tconsole.log('');\n\n\t\t//var c = 0;\n\t\tvar tags = req.body.tags\n\t\tvar tags_array = extract_tags(tags)\n\n\t\tvar permalink = title.replace( /\\s/g, '_' );\n\t\t//permalink = permalink.replace( /\\W/g, '' )+'_'+Math.floor(Math.random() * 100)*Date.now();\n\n\n\n\n\n\n\n\t\t///IMAGES//////////////////////\")\n\t\tvar fs = require('fs');///We need the fs module for moving the uploaded files.\")\n\n\t\tfor(var i=0; i<req.files.image.length; i++){ ///Uploads multiple images.\")\n\n\t\t\tif(req.files.image[i].size != 0){\n\t\t\t\t\n\t\t\t\tvar tmp_path = req.files.image[i].path;// get the temporary location of the file\n\t\t\t\tvar target_path = './public/images/'+req.files.image[i].name;// set where the file should actually exists - in this case it is in the \"images\" directory\n\t\t\t\tvar image_path = '../images/'+req.files.image[i].name;\n\t\t\t\t\n\t\t\t\tfor(var f=0; f<students.length; f++){ \n\t\t\t\t\t\t\n\t\t\t\t\tposts.insertImage(title, image_path, tags_array, req.username, students[f], class_number, 'yes', permalink, function(err, permalink) {\n\t\t\t\t\t\t\"use strict\";\n\t\t\t\t\t\tif (err) return next(err);\n\t\t\t\t\t});\n\t\t\t\t\t//class_number++;\t\t\t\n\t\t\t\t}\n\t\t\t\tclass_number++;\t\t\t\n\n\t\t\t\tfs.rename(tmp_path, target_path, function(err) {// move the file from the temporary location to the intended location\n\t\t\t\t\tif (err) throw err;\n\n\t\t\t\t\tfs.unlink(tmp_path, function() {// delete the temporary file, so that the explicitly set temporary upload dir does not get filled with unwanted files\n\t\t\t\t\t if (err) throw err;\n\t\t\t\t\t // res.send('File uploaded to: ' + target_path + ' - ' + req.files.image[i].size + ' bytes');\n\t\t\t\t\t});\n\t\t\t\t});\n\n\n\n\n\t\t\t\tvar gm = require('gm').subClass({ imageMagick: true });\t\n\t\t\t\tgm(target_path).size(function (err, size) {//shrinks and replaces large images\n\t\t\t\t if (size.width > 700 || size.height > 700) { \n\t\t\t\t\tgm(target_path).scale(700, 700).autoOrient().write(target_path, function (err) {\n\t\t\t\t\t if (!err) console.log('shrunk! ');\n\t\t\t\t\t});\n\t\t\t\t }\n\t\t\t\t});\n\n\t\t\t} else {\n\t\t\t\tvar tmp_path = req.files.image[i].path;\n\t\t\t\tfs.unlink(tmp_path, function (err) {\n\t\t\t\t\tif (err) throw err;\n\t\t\t\t\tconsole.log('successfully deleted /tmp/hello');\n\t\t\t\t});\n\t\t\t}\n\n\t\t}\n\t\t\t\n\n\t\t///TEXT/////////////////\")\n\t\tvar post = req.body.body;\n\n\t\tif(post){///Run if post isn't empty.) \n\n\n\n\t\t\tvar sentences_Arr = post.match(/[^\\s.!?]+[^.!?\\r\\n]+[.!?]*/g);///Turns body into sentences array.\")\n\t\t\n\t\t\t\t\n\t\t\tvar total_Arr = []; \n\n\t\t\tfor( var s=0; s<sentences_Arr.length; s++){ ///Splits up big sentences into smaller ones.\") \n\t\t\t\tvar short_Arr = sentences_Arr[s].match(/.{1,200}/g);\n\t\t\t\tfor(var r=0; r<short_Arr.length; r++){\n\t\t\t\t\ttotal_Arr.push(short_Arr[r]); \n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tvar numberOfSentences = req.body.numberOfSentences; ///How many sentences are displayed.)\"\n\n\t\t\twhile(total_Arr.length > 0){\n\t\t\t\tvar posting = total_Arr.splice(0, numberOfSentences).join(' ');\t\t\t\t\n\n\t\t\t\tfor( var b=0; b<students.length; b++){\n\t\t\t\t\tposts.insertEntry(title, posting, tags_array, req.username, students[b], class_number, 'yes', permalink, function(err, permalink) {\n\t\t\t\t\t\t\"use strict\";\n\t\t\t\t\t\tif (err) return next(err);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\tclass_number++;\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\n/*\n\t\t\tfor( var t=0; t<total_Arr.length; t++){ ///Upload sentence posts.\")\n\t\t\t\tfor( var b=0; b<students.length; b++){\n\t\t\t\t\tposts.insertEntry(title, total_Arr[t], tags_array, req.username, students[b], class_number, 'yes', permalink, function(err, permalink) {\n\t\t\t\t\t\t\"use strict\";\n\t\t\t\t\t\tif (err) return next(err);\n\t\t\t\t\t});\n\t\t\t\t//class_number++;\t\t\t\n\t\t\t\t}\n\t\t\tclass_number++;\t\t\t\n\t\t\t}\n*/\n\t\t\t\n\t\t}\n\t\n\t\tusers.incrementClassNumber(title, req.username, class_number, \n\t\t\tfunction(err) {\n\t\t\t\t\"use strict\";\n\t\t\t\tif (err) return next(err);\n\t\t}); \n\n\t\tconsole.log('end of newPost ');\n\t\tconsole.log(class_number);\n\t\tconsole.log('');\n\n\t\t//return res.redirect(\"/\"); \n\t}\n\n\n\n\n\n\tthis.forgetSubject = function(req, res, next){ ///Forget All Button.\")\n\t\t\"use strict\"\n\t\tconsole.log('in here');\n\t\tvar title = req.params.title; \n\t\tvar username = req.username; \n\t\tposts.deleteSubject(title, username, function(err, post) {\n\t \t\t\"use strict\" \n\t\t\tif (err) return next(err);\n\t\t});\n\t\tusers.removeSubject(title, username, function(err, post) {\n\t \t\t\"use strict\" \n\t\t\tif (err) return next(err);\n \t\t \treturn res.redirect('/profile');\n\t\t});\n\n\t}\n\n\n\n\n\tthis.forgetPost = function(req, res, next) { ///Forget Button.\")\n\t\t\"use strict\";\n\t\tvar permalink = req.params.permalink; \n\t\tvar class_number = req.params.class_number;\n\t\tclass_number = parseInt(class_number);\n\t\tvar title = req.params.title;\n\t\tvar username = req.username; \n\n\t\tposts.deletePost(title, class_number, function(err, post) {\n \t\t\t\"use strict\" \n\t\t\tif (err) return next(err);\n\t\t\tforgetOwnMemry(title, username, post, class_number);\n \t\t return res.redirect('/profile');\n\t\t});\n\n\t\n\t}\n\n\t\t\n\tfunction forgetOwnMemry(title, username, doc, class_number) {\n\n\t\tusers.decrementNumberOfClasses(title, username, function(err, doc){\n\t\t\t\"use strict\"\n\t\t\tif (err) return next(err);\t\t\t\t\t\n\t\t}); \n\n\t\tposts.decrementClassNumber(title, username, class_number, function(err, dox){ ///Descreases classnumber by 1.\");\n\t\t\t\"use strict\"\n\t\t\tif (err) return next(err);\n\t\t}); \n\n\n\t}\n\n\n\n\tthis.rememberText = function(req, res, next){\n\t\tvar permalink = decodeURIComponent(req.params.permalink);\n\n\t\tposts.copyEntry(permalink, req.username, function(err, new_permalink) {\n\t\t\t\"use strict\";\n\t\t\tif (err) return next(err); \n\t\t});\n\t\treturn res.redirect(\"/profile\");\t\n\t}\n\n\n\tthis.rememberImg = function(req, res, next){\n\t\tvar permalink = decodeURIComponent(req.params.permalink);\n\n\t\tposts.copyImage(permalink, req.username, function(err, new_permalink) {\n\t\t\t\"use strict\";\t\n\t\t\tif (err) return next(err); \n\t\t});\n\t\treturn res.redirect(\"/profile\");\n\t}\n\n\n\n\n\n\n\tthis.followSubject = function(req, res, next){\t///Enroll button.\");\n\n\t\tconsole.log('in follow');\n\n\t\tconsole.log(req.params);\n\n\t//\tif(req.params has the word \"join\" then do some shit \n\n\n\t\tvar title = decodeURIComponent(req.params.title);\n\t\tvar permalink = title.replace( /\\s/g, '_' );\n\t\t//permalink = permalink.replace( /\\W/g, '' )+'_'+req.username;///Adds username to permalink.\");\n\n\t\tusers.addStudent(title, req.username, function(err, doc) { ///Adds username to students array.\");\n\t\t\t\"use strict\"\n\t\t\tif(err) return next(err);\n\t\t\tconsole.log(doc);\n\t\t\tvar author = doc._id;\t\n\n\n\t\t\tposts.newStudent(title, req.username, author, function(err, old) { ///Find old memries that belong to the original author.\");\n\t\t\t\t\"use strict\"\n\t\t\t\tconsole.log('in followSubject');\n\t\t\t\tconsole.log(old);\n\t\t\t\tconsole.log('');\n\n\t\t\t\t//grab parameter and decide if i'm going to make copies or insert new. student or audit? \n\t\t\t\tif(err) return next(err);\t\t\t\t\n\t\t\t\tfor(var m=0; m<old.length; m++){ ///Adds memries to new students profile.\") \n\t\t\t\t\tif(old[m].image_path){\n\t\t\t\t\t\tposts.insertImage(old[m].title, old[m].image_path, old[m].tags, old[m].author, req.username, old[m].class_number, 'no', permalink,\n\t\t\t\t\t\t\tfunction(err, whyDoI) {\n\t\t\t\t\t\t\t\t\"use strict\";\n\t\t\t\t\t\t\t\tif (err) return next(err);\n\t\t\t\t\t\t});\n\t\t\t\t\t} else if (old[m].body){\n\t\t\t\t\t\tposts.insertEntry(old[m].title, old[m].body, old[m].tags, old[m].author, req.username, old[m].class_number, 'no', permalink,\n\t\t\t\t\t\t\tfunction(err, needThis) {\n\t\t\t\t\t\t\t\t\"use strict\";\n\t\t\t\t\t\t\t\tif (err) return next(err);\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {console.log(\"SOMETHIN IS FUKKED!\")}\n\t\t\t\t}\n\t\t\t});\n\n\n\t\t});\n\t\treturn res.redirect(\"/profile\");\n\t}\n\n\n\n\t\n\tthis.saveEdits = function(req, res, next){\n\t\t\"use strict\" \n\n\t\tconsole.log('saved editing');\n\t\tconsole.log(req.body);\n\t\tconsole.log(req.username);\n\t\tconsole.log(req.params.title);\n\n\t\tvar title = req.params.title;\n\n\t\tposts.getStudentNames(req.username, title, function (err, allNames){\n\t\t\t\"use strict\"\n\t\t\tvar arr = req.body.order.split(',');\n\t\t\tconsole.log(arr);\n\t\t\tconsole.log('allNames');\n\t\t\tconsole.log(allNames);\n\t\t\tconsole.log(allNames.length);\n\t\t\tvar names = []; \n\t\t\tfor(var a=0; a<allNames.length; a++){\n\t\t\t\tif(allNames[a].students.length > names.length){\n\t\t\t\t\tnames = allNames[a].students;\n\t\t\t\t\tconsole.log(names);\n\t\t\t\t} \n\t\t\t}\n\t\t\t\n\t\t\tfor(var n=0; n<names.length; n++){\n\t\t\t\tvar student = names[n];\n\t\t\t\tvar b = 0;\t\n\t\t\t\tfor(var a=0; a<arr.length; a++){\n\t\t\t\t\tif(arr[a] != ''){\n\t\t\t\t\t\tposts.updateEdits(title, arr[a], b, student, function(err, whateva){\n\t\t\t\t\t\t\t\"use strict\"\n\t\t\t\t\t\t\tif(err) return('scream!');\t\n\t\t\t\t\t\t});\t\t\t\t\n\t\t\t\t\t\tb++;\n\t\t\t\t\t}\t\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t});\n\t};\n\t\n\n\n\n\n\n\n this.handleNewComment = function(req, res, next) {\t//CLEAN THIS SHIT UP\n \"use strict\";\n var name = req.body.commentName;\n var email = req.body.commentEmail;\n var body = req.body.commentBody;\n var permalink = req.body.permalink;\n\n // Override the comment with our actual user name if found\n if (req.username) {\n name = req.username;\n }\n\n if (!name || !body) {\n // user did not fill in enough information\n\n posts.getPostByPermalink(permalink, function(err, post) {\n \"use strict\";\n\n if (err) return next(err);\n\n if (!post) return res.redirect(\"/post_not_found\");\n\n // init comment form fields for additional comment\n var comment = {'name': name, 'body': \"\", 'email': \"\"}\n\n var errors = \"Post must contain your name and an actual comment.\"\n\n\n return res.render('entry_template', {\n title: 'blog post',\n username: req.username,\n post: post,\n comment: comment,\n errors: errors\n });\n });\n\n return;\n }\n\n /* // even if there is no logged in user, we can still post a comment\n posts.addComment(permalink, name, email, body, function(err, updated) {\n \"use strict\";\n if (err) return next(err);\n if (updated == 0) return res.redirect(\"/post_not_found\");\n return res.redirect(\"/post/\" + permalink);\n });*/\n }\n\n\n\tthis.displayMainPageByTag = function(req, res, next) {\n\t\t\"use strict\";\n\n\t\tvar tag = req.params.tag;\n\n\t\tposts.getPostsByTag(tag, 20, function(err, results) {\n\t\t\t\"use strict\";\n\t\t\tif (err) return next(err);\n\n\t\t\treturn res.render('blog_template', {\n\t\t\t\ttitle: 'blog homepage',\n\t\t\t\tusername: req.username,\n\t\t\t\tmyposts: results\n\t\t\t});\n\t\t});\n\t}\n\n\n\n}", "function displayPostsDOM(posts) {\n posts.forEach((post) => {\n appendPostDOM(post);\n });\n}", "function renderBlogposts() {\n\n let $sideBlogList = $(`\n <div class=\"side-blog-list\">\n <ul>\n </ul>\n </div>\n `);\n\n function addBlogToList(model) {\n let $liContainer = $(`\n <li>\n <h2>${model.get('username')}</h4>\n <h3>${model.get('title')}</h3>\n <p>${model.get('body')}</p>\n </li>\n `);\n $sideBlogList.find('ul').append($liContainer);\n }\n\n\n blogCollection.forEach(addBlogToList);\n blogCollection.on('add', addBlogToList);\n blogCollection.fetch();\n\n let $sideBlog = $(`\n <ul id=\"single-blog\">\n <li>\n\n <li>\n </ul>\n `);\n\n\n\n\n return $sideBlogList;\n}", "function displayPosts(posts) {\n console.log(posts)\n $.each( posts, function( key, value ) {\n post = value;\n if (key <= 6) {\n document.getElementById('posts-container').innerHTML += '<a class=\"post\" target=\"_blank\" href=\"' + post.full_url + '\">'+\n '<div style=\"background-image:url(' + post.image + ')\"><h2>Member: </h2><h3>' + post.poster_name + \"</h3>\" +\n '</div></a>';\n }\n });\n }", "function loadPosts() {\n\t\tvm.posts = []\n\t\tapiService.getPosts().$promise.then(function(result) {\n\t\t\tresult.posts.forEach(function(post) {\n\t\t\t\tvm.posts.push(post)\n\t\t\t})\n\t\t})\n\t\tUserService.posts = vm.posts\n\t}", "function _draw() {\n let posts = store.State.posts;\n let templates = ''\n posts.forEach(post=>{\n templates += post.Template\n });\n document.getElementById('posts').innerHTML = templates;\n}", "function loadBlogPosts() {\n console.log(`loading...`);\n fetchPosts().then((data) => {\n removeLoadingState();\n appendPosts(data.items);\n });\n}", "function getPosts() {\n\tvar snippet = {\n\t\tquery : {},\n\t\tfields: \"title,category,thumbnail\"\n\t}\n\t// for unpublished\n\t// snippet.query = {published: false, nextKey: '-K_W8zLX65ktmaKwf1Yx'}\n\n\trimer.post.find(snippet, function(error, value) {\n\t\tif(error) {\n\t\t\tconsole.log(error)\n\t\t}\n\t\telse {\n\t\t\tconsole.log(value)\n\t\t}\n\t})\n}", "async function showPosts() {\n const posts = await getPosts();\n\n //console.log(posts);\n\n postContainer.innerHTML += posts\n .map(\n (post) => `\n <div class=\"post\">\n <div class=\"number\">${post[\"id\"]}</div>\n <div class=\"post-info\">\n <h2 class=\"post-title\">${post[\"title\"]}</h2>\n <p class=\"post-body\">\n ${post[\"body\"]}\n </p>\n </div>\n </div>`\n )\n .join(\"\");\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 singlePost() {\n // get post id from data-id attr\n var dataId = $(this).attr('data-id');\n // assign posts object to a variable\n var posts = memory.posts;\n // loop through posts object\n for (var i = 0; i < posts.length; i++) {\n // get post id:s from posts object\n var postId = memory.posts[i].id;\n // check if we have the same post id that came form data-id attr\n if (dataId == postId) {\n // call displaySinglePost method\n memory.posts[i].dispalySinglePost();\n }\n }\n }", "function fetchPosts() {\n getPosts().then((res) => setResult(res.reverse()))\n }", "function allPosts(req, res) {\n request(\n 'https://jsonplaceholder.typicode.com/posts',\n function(err, response, posts) {\n res.render('posts', {posts: JSON.parse(posts)})\n }\n )\n}", "function addComments()\n{\n var posts = $('.thumbnail').get();\n \n posts.forEach(function(post) {\n var post_id = $(post).attr('id');\n $.get(\"/posts/\"+post_id, function(data) \n {\n $('#comments-'+post_id).html(data);\n });\n \n });\n}", "function getPost() {\n Post\n // call remote method to protect user's email\n .findSingle({id: $stateParams.id})\n .$promise\n .then(function(result) {\n vm.newPost = result.post;\n });\n }", "function showPosts(postJSON) {\n posts = JSON.parse(postJSON).posts;\n for (let i = 0; i < posts.length; i++) {\n document.getElementById(\"postType_\" + i).innerHTML = convertPostKind(posts[i].kind);\n document.getElementById(\"postTitle_\" + i).innerHTML = posts[i].title;\n document.getElementById(\"postAuthor_\" + i).innerHTML = posts[i].author;\n document.getElementById(\"postDescrip_\" + i).innerHTML = posts[i].descrip;\n console.log(\"done with: \" + i);\n }\n}", "function loadPosts () {\n\n var key = \"api_key=iSCTzggSVfQGj4CkKfEmBSShk0T7J0qtj6dBMwb4b1ixavvS1h\";\n var api = \"https://api.tumblr.com/v2/blog/sergeymisharin.tumblr.com/\";\n\n $.getJSON(api + \"posts/text?callback=?&filter=text&limit=3&offset=0&\" + key,function(data) {\n $.each(data.response.posts, function(i, item) {\n var content = item.body;\n var divWithContent = '<div class=\"col-sm-6\">' + content + '</div>';\n $(\".space_weather\").append(divWithContent);\n });\n\n });\n }", "function addPosts(html) {\n verb(\"Initiating addPosts...\")\n\n try {\n\n var par = new DOMParser()\n , doc = par.parseFromString(html, \"text/html\")\n // Old and new posts\n , oids = document.querySelectorAll(\"tr[id^='post-']\")\n , nids = addIgnoredIds(doc.querySelectorAll(\"tr[id^='post-'], .ignored\"))\n // Old and new userlists\n , ous = document.querySelector(\".c_view\")\n , nus = doc.querySelector(\".c_view\")\n // t_viewer body\n , tvib = document.querySelector(\"#topic_viewer > tbody\")\n // oids without previous pages; newly old IDs\n , noids = oids.slice(Math.floor(oids.length / 25) * 25)\n\n debu( \"oids: \" + oids.length + \", nids: \" + nids.length + \", noids: \"\n + noids.length\n )\n\n debu(noids)\n\n // Replace userlist\n ous.parentNode.replaceChild(nus, ous)\n\n // TODO generalize code\n // New posts, removed posts and equal posts\n var newps = nids.mapDiff(function(e) { return e.id }, oids)\n , remps = noids.mapDiff(function(e) { return e.id }, nids)\n , oldps = nids.mapInter(function(e) { return e.id }, oids)\n\n // Remove deleted posts\n debu(\"Removed posts: \" + remps.length)\n remps.map(function(e) {\n var es\n if (! e.querySelector(\".ignored\"))\n es = fiveSiblings(e)\n else es = [e]\n\n for (var i = 0; i < es.length; i++) {\n tvib.removeChild(es[i])\n }\n\n })\n\n // Add new posts\n debu(\"New posts: \" + newps.length)\n newps.map(function(e) {\n var es\n if (! e.querySelector(\".ignored\"))\n es = fiveSiblings(e)\n else es = [e]\n\n for (var i = 0; i < es.length; i++) {\n tvib.insertBefore(es[i], tvib.querySelector(\".c_view\").parentNode)\n\n // Add spoiler event\n if (i == 1) addSpoilerEvent(es[i])\n\n // Add quick quote event\n if (i === 3) addQuoteEvent(es[i])\n }\n })\n\n if (newps.length > 0 && readify(\"beta-beep\", false))\n document.querySelector(\"#beta-beep\").play()\n\n // Update time before update detecting\n if (newps.length > 0 || remps.length > 0) time = 10000\n else time = Math.min(160000, Math.floor(time * 1.5))\n\n // Update old posts\n debu(\"Old posts: \" + oldps.length)\n oldps.map(function(e) {\n if (! e.querySelector(\".ignored\")) {\n var eq = document.querySelector('#' + e.id)\n , ne = e.nextElementSibling.children[1]\n , oe = eq.nextElementSibling.children[1]\n\n // Replace timestamp\n eq.parentNode.replaceChild(e, eq)\n\n verb(e.textContent.replace(/\\s+/g, ' '))\n\n updatePost(ne, oe)\n }\n })\n\n octave()\n\n var roidslen = removeOld()\n\n // TODO test against deleted posts, might get stuck on page from < 25 posts\n // Switch to new page\n cid = iid + Math.floor(roidslen / 25)\n\n debu(cid)\n\n } catch(e) { throw e }\n}", "function reloadPosts() {\n var postList = document.getElementById(\"posts\");\n while (postList.lastChild.tagName != \"TEMPLATE\") {\n postList.removeChild(postList.lastChild);\n }\n referenceToLastKey = '';\n referenceToLastValue = '';\n referenceToOldestPost = '';\n nbOfPostsDisplayed = 0;\n loadPosts();\n}", "function viewPosts(pst,category,limit){\n\n\tvar main = $(\"#postContainer\");\n\tmain.html(\"\");\n\tvar posts = pst;\n\tvar postsLength = posts.length;\n\tvar showMore = \"\";\n\tif(limit > postsLength){\n\t\tshowMore = \"\";\n\t}else{\n\t\tif(category){\n\t\t\tshowMore = '<button class=\"show-more btn btn-default\" id=\"showMoreCategory\">Show More</button>';\n\t\t}else{\n\t\t\tshowMore = '<button class=\"show-more btn btn-default\" id=\"showMore\">Show More</button>';\n\t\t}\n\t}\n\tvar numFix = 0;\n\tfor(var i=0; i<postsLength;i++){\n\t\tvar userInformation = posts[i].user_info[0];\n\t\tvar userId = posts[i].user_id;\n\t\tvar commentMode = posts[i].comment_mode;\n\t\tvar like = posts[i].like;\n\t\tvar numLikes = posts[i].num_likes;\n\t\tvar numUnlikes = posts[i].num_unlikes;\n\t\tvar numComments = posts[i].num_comments;\n\t\tvar postDate = formatDate(posts[i].post_date);\n\t\tvar postId = posts[i].post_id;\n\t\tvar postText = posts[i].post_text;\n\t\tvar postTitle = posts[i].post_title;\n\t\tvar postCategory = posts[i].category_name;\n\t\tvar publicityMode = posts[i].publicity_mode;\n\t\tvar unlike = posts[i].unlike;\n\t\tvar firstName = userInformation.first_name;\n\t\tvar lastName = userInformation.last_name;\n\t\tvar imageId = userInformation.image;\n\t\tvar gender = userInformation.gender;\n\t\tvar postType = posts[i].post_type;\n\t\tvar imageLocation;\n\t\tvar likeClass = \"\";\n\t\tvar unlikeClass = \"\";\n\t\n\t\t/*Changes the image*/\n\t\tif(imageId==\"\" || imageId==1 || imageId==0){\n \t if(gender==\"Male\"){\n \t imageLocation = \"./images/male_profile.jpg\";\n \t }else if(gender==\"Female\"){\n \t imageLocation = \"./images/female_profile.jpg\";\n \t }\n \t}else{\n \t imageLocation = \"./images/\"+imageId; \n \t}\n\n\t\tif(postText.length>400){\n\t\t\tpostText = postText.slice(0,303)+\" ... \";\n\t\t\tpostText += '<a class=\"read-more\" href=\"viewpost.php?pid='+postId+'\">Read More</a>';\n\t\t}\n\n\t\tif(postTitle.length > 100){\n\t\t\tpostTitle = postTitle.slice(0,80);\n\t\t\tpostTitle += \" ... \";\n\t\t}\n\n\t\tif(like){\n\t\t\tlikeClass = \"liked\";\n\t\t}\n\t\tif(unlike){\n\t\t\tunlikeClass = \"unLiked\";\n\t\t}\n\t\tvar post = '<div class=\"posts-container\"><div class=\"row\"><div class=\"col-md-2 col-xs-3\"><img src=\"'+imageLocation+'\" class=\"profile-image\" alt=\"\"></div><div class=\"col-md-10 col-xs-9\"><p class=\"user-name\"><a href=\"profile.php?uid='+userId+'\">'+firstName+' '+lastName+'</a></p><p>'+postDate+'</p><p class=\"postTag\">#'+postCategory+'</p></div></div><div class=\"row\"><p class=\"title\"><a href=\"#\" class=\"post-title\">'+postTitle+' </a></p><p class=\"post\">'+postText+' </p></div><div class=\"row\"><div class=\"col-lg-12 col-md-12 col-sm-12 col-xs-12\"><div class=\"row\"><div class=\"col-xs-4 tab like '+likeClass+'\" id=\"like\" data-postId=\"'+postId+'\"><i class=\"fas fa-thumbs-up\"></i><span class=\"numLike\">'+numLikes+'</span></div><div class=\"col-xs-4 tab dislike '+unlikeClass+'\" id=\"dislike\" data-postId=\"'+postId+'\"><i class=\"fas fa-thumbs-down\"></i><span class=\"numDislike\">'+numUnlikes+'</span></div><div class=\"col-xs-4 tab comment\" id=\"comment\" data-postId=\"'+postId+'\"><i class=\"fas fa-comment\"></i><span class=\"numComment\">'+numComments+'</span></div></div></div></div></div>';\n\t\tmain.append(post);\n\t}\n\tmain.append(showMore);\n}", "function getAllPostIts() {\n\t\tpostItService.getAll().then(function(result) {\n\t\t\t$scope.postIts = result;\n\t\t}, function (error) {\n\t\t\talert(error);\n\t\t});\n\t}", "function displayPostData(data) {\n var results = data.map((post, index) => {\n return renderResult(post, index);\n });\n\n if (results.length > 0) {\n $(\".posts\").html(results);\n } else {\n $(\".posts\").html(\n `<h2 class=\"first-post\">Welcome to Day! Submit your first post to start building your journal.</h2>`\n );\n $(\".first-post\").css(\"height\", \"540px\");\n $(\".first-post\").css(\"padding\", \"50px 15px 0px 15px\");\n }\n}", "function loadMainPostList(position) {\n\n // Check to ensure the main posts should be displayed\n if ($('#mainpostlist').length > 0) {\n\n // Check to see if the position is the start or the end\n if (position == 0) {\n position = 0;\n } else {\n position = $('#mainpostlist').children().size();\n }\n\n // Build the request object\n var listData = new Object();\n listData.start = position;\n listData.size = numberOfPostsToLoad;\n\n // Convert the object to json\n var query = JSON.stringify(listData);\n\n // Request the list of posts\n $.ajax({\n type: \"POST\",\n url: \"listposts.php\",\n dataType: \"json\",\n data: { json: query },\n success: function (data) {\n\n // Get the response data\n var response = data;\n\n // Check to see the response status\n if (response.status == 0 || response.status == -1) {\n\n // No additional posts\n displayMessage(\"No more posts are currently available\", 3);\n } else {\n\n // Get the posts\n var posts = response.posts;\n\n // Loop through the posts\n for (var i = 0; i < posts.length; i++) {\n\n // Setup the initial post details\n var element = 'post' + posts[i].id;\n var posthold = $('<div id=\"' + element + '\" class=\"post\"><div>');\n\n // Check to ensure that the post does not already exist\n if ($('#' + element).length == 0) {\n\n var post = '';\n\n // Check to see if the post type a text post\n if (posts[i].type == 4) {\n post += '<h2><a href=\"./view.php?post=' + posts[i].id + '\">' + posts[i].title + '</a></h2><p>' + posts[i].details.replace(/[\\r\\n]/g, \"<br />\") + '</p>';\n post += '<span class=\"footer\">Written by ' + posts[i].author + '&nbsp;</span>&nbsp;<span class=\"formatteddate\">0 seconds</span><span>&nbsp;ago</span>';\n post += '<span class=\"footer\">&nbsp;and filed under ' + posts[i].categoryname + '</span>';\n post += '<span class=\"comments\">' + posts[i].comments + '</span>';\n } else if (posts[i].type == 8) {\n post += '<h2><a href=\"./view.php?post=' + posts[i].id + '\">' + posts[i].title + '</a></h2><img src=\"./previewimage.php?f=' + posts[i].filename + '\" class=\"image\" /><p>' + posts[i].details.replace(/[\\r\\n]/g, \"<br />\") + '</p>';\n post += '<span class=\"footer\">Written by ' + posts[i].author + '&nbsp;</span>&nbsp;<span class=\"formatteddate\">0 seconds</span><span>&nbsp;ago</span>';\n post += '<span class=\"footer\">&nbsp;and filed under ' + posts[i].categoryname + '</span>';\n post += '<span class=\"comments\">' + posts[i].comments + '</span>';\n }\n post += '<div class=\"postid\">' + posts[i].id + '</div>';\n post += '<div class=\"posttype\">' + posts[i].type + '</div>';\n post += '<div class=\"postdate\">' + posts[i].dateposted + '</div>';\n post += '<div class=\"clear\"></div>';\n\n // Format the date\n formatDate(posts[i].dateposted);\n\n // Add the post to the screen\n post = $(post);\n\n // Determine the position to add the element\n var insertPosition = determinePostInsertPosition(posts[i].dateposted);\n\n // Check to see if the element is null and the new element should be added to the bottom\n if (insertPosition == null) {\n\n // Add the post to the screen\n $(posthold).hide().appendTo('#mainpostlist').fadeIn(2000);\n $(posthold).append(post);\n } else {\n\n // Add the post to the screen in the correct position\n $(insertPosition).before($(posthold));\n $(posthold).append(post);\n }\n } else {\n\n }\n }\n\n // Update the date and time on the posts\n updateDateTime();\n\n // Set the timer to update the date time in the post footer if not set\n if (timeOut == null) {\n timeOut = setInterval(function () { updateDateTime() }, 1000);\n }\n }\n }\n });\n }\n}", "function getPostData(id) {\n $.get(\"/event\" + id, function(data) {\n if (data) {\n // If this post exists, prefill our cms forms with its data\n title.val(data.title);\n state.val(data.body);\n about.val(data.category);\n // If we have a post with this id, set a flag for us to know to update the post\n // when we hit submit\n updating = true;\n }\n });\n }", "function getPosts() {\n const data = { channel_id: currentChannelId, last_id: lastId };\n\n fetch('api/getPostsByChannel.php',\n {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(data),\n }\n )\n .then(response => response.json())\n .then(data => {\n console.log(data);\n\n for (i = 0 ; i < data.length ; i++) {\n body = data[i]['body'];\n author = data[i]['author'];\n lastId = data[i]['id'];\n\n document.getElementById('posts').insertAdjacentHTML('beforeend', '<div><span class=\"name\">'+ author +'</span> : '+ body +'</div>');\n }\n });\n}", "async function addRecentPosts() {\n const posts = await fetchPosts();\n const recentPosts = posts.slice(-3);\n\n recentPosts.forEach((post) => {\n const postCard = createPostCard(post);\n postSection.appendChild(postCard);\n });\n}", "function getStdPosts() {\n var posts_length,\n myPostMold;\n $.ajax({\n url: site_host + \"posts/all\",\n type: \"post\",\n data: {\n _id_student: user_id,\n ajax: true\n },\n dataType: \"json\",\n success: function (response) {\n posts_length = response.data.length;\n if (posts_length === 0) {\n // ther is no posts\n $('#main-posts > .loader').hide();\n alert(\"There is no Posts\");\n return;\n }\n for (count_posts; count_posts < posts_length; count_posts += 1) {\n $('#main-posts > .loader').before(createPostMold());\n myPostMold = $(\".publication_mold\");\n myPostMold.last().find(\".module_teacher h3\").html(response.data[count_posts].fullName);\n myPostMold.last()\n .find(\".module_teacher .time_pub\").html(response.data[count_posts].date_parsed);\n myPostMold.last()\n .find(\".module_teacher .module_name\").html(response.data[count_posts].title);\n myPostMold.last()\n .find(\".publication_body p\").html(response.data[count_posts].text_post);\n myPostMold.last().attr(\"data-target\", response.data[count_posts]._id_post);\n if (response.data[count_posts].saved == 1) {\n myPostMold.last().find(\".react-bar .save-post\").attr(\"title\", \"Sauvegardé\")\n\n myPostMold.last().find(\".react-bar .save-post\")\n .children(\"i\").removeClass(\"fa-bookmark\");\n\n myPostMold.last().find(\".react-bar .save-post\")\n .children(\"i\").addClass(\"fa-check\");\n myPostMold.last().find(\".react-bar .save-post\")\n .removeClass(\"save-post\");\n }\n }\n $('#main-posts > .loader').hide();\n },\n complete: function () {\n autosize();\n }\n });\n }", "function loadPosts() {// 02\n $.get({ // send get to take all posts\n url: apiBaseUrl + 'posts',\n headers: authorizationHeader\n })\n .then(fillDropDownMenu)\n .catch(renderError);\n }", "function redirectToPosts(e) {\r\n if (e.target.getAttribute(\"data-content\") === \"name\") {\r\n const readyPosts = [];\r\n const id = e.target.previousElementSibling.textContent;\r\n toggleSpinner();\r\n fetch(`${postsURL}?userId=${id}`)\r\n .then(response => {\r\n if (!response.ok) throw new Error(data.error);\r\n return response.json();\r\n })\r\n .then(posts => {\r\n posts.forEach(post => {\r\n readyPosts.push(post);\r\n })\r\n })\r\n .then(() => {\r\n switchPage(id);\r\n readyPosts.forEach( readyPost => {\r\n const commentsBox = paintPost(readyPost);\r\n handleComments(readyPost, commentsBox);\r\n })\r\n toggleSpinner();\r\n })\r\n .catch(err => { \r\n alert(`Sorry, error: ${err.message}`);\r\n toggleSpinner();\r\n });\r\n }\r\n}", "function renderFeedEntries(index) {\n //reset the collection \n App.FeedContent.reset();\n var entrySet = App.FeedEntries.at(index).get(\"content\");\n for (var i = 0; i < App.NumEntriesPerPage; i++) {\n var feedEntryJson = entrySet[i];\n var feedEntryModel = new FeedEntry(feedEntryJson);\n var mediaContents = feedEntryJson.mediaGroups[0].contents[0];\n feedEntryModel.set({\n \"thumbnailUrl\": mediaContents.thumbnails[0].url\n });\n feedEntryModel.set({\n \"videoUrl\": mediaContents.url\n });\n feedEntryModel.set({\n \"category\": feedEntryJson.categories[0]\n });\n feedEntryModel.set({\n \"index\": i\n });\n App.FeedContent.add(feedEntryModel);\n }\n togglePagination();\n}", "function loadPosts(){\n $.ajax({\n type: \"GET\",\n url: \"/election/getVotablePosts\",\n cache: false,\n success: function(response){\n allPosts = response;\n response.forEach(loadThisPost);\n }\n });\n}", "async getPosts(){\n const postData = await this.getPostData()\n\n return postData\n }", "function loadPosts() {\n // Note: \"posts\" is the [API] -> [endpoint] -> [name] in src -> index.js\n return API.get(\"posts\", `/searching/all/${name}`);\n }", "function getData() {\n blogService.getIndexData().then(\n function(data) {\n $scope.index = data;\n // Now we have the list of files\n // We can retrieve each file and add it to $scope.data\n for(var i = 0; i < $scope.index.posts.length; i++){ //for each item in the index\n blogService.getData($scope.index.posts[i]).then( //call the getData service\n function(data){\n $scope.posts.push({\n \"title\" : data.title,\n \"dateCreated\" : data.date,\n \"name\" : data.name,\n \"author\" : data.author,\n \"content\" : data.content,\n \"tags\" : data.tags,\n \"blurb\" : data.blurb,\n \"order\" : data.order,\n \"image\" : data.image\n });\n },\n function(err){\n console.log(\"error: \" + err);\n }\n )\n }\n $rootScope.finishedLoading = true; //we have finished loading\n },\n function() {\n console.log(\"error getting index file\");\n $rootScope.finishedLoading = true; //we have finished loading\n });\n }", "function uiGetPosts () {\r\n getAllPosts().then((data)=>{\r\n console.log(data)\r\n const display = document.querySelector('div.response')\r\n display.innerHTML = JSON.stringify(data, null, 2)\r\n })\r\n}", "function showAllPosts(text) {\n // Grab the pinboard div from the page\n pinboardElement = document.getElementById('pinboard');\n // Decode the post data\n postData = JSON.parse(text);\n // Clear the pinboard\n pinboardElement.innerHTML = '';\n // Loop through the postData\n postData.forEach(function (post) {\n console.log('here');\n // Show the item\n pinboardElement.innerHTML += '<div class=\"post\"><a class=\"title\" href=\"' + post.url + '\">' + post.title + '</a><span class=\"meta\">Posted ' + post.date + ' by ' + post.user + '</span></div>';\n });\n \n // TODO: Make the back button work\n}", "function show_post_window(posts_category, posts_id, posts_username, posts_description, posts_body, posts_replycount, profile_photo, posts_create_datetime) {\n\n\t\n//**********************************************************************\n\tvar post_view_list = new Ext.data.JsonStore({\n\t\tautoDistroy: true,\n\t\tId: 'postViewList',\t\n\t\tautoDistroy: true,\n\t\t//~ autoSync: true,\n\t\t//~ autoLoad: true,\n\t\tproxy: {\n\t\t\ttype: 'ajax', \n\t\t\tmethod: 'POST', \n\t\t\turl: 'php/get_post_views.php', // url that will load data with respect to start and limit params\n\t\t},\n\t\treader: {\n\t\t\t\ttype: 'json',\n\t\t\t\troot: 'items',\n\t\t\t\ttotalProperty: 'total'\n\t\t},\n\t\tfields: [\n\t\t\t{name: 'view_date_time', type: 'string'},\n\t\t\t{name: 'user_nickname', type: 'string'},\n\t\t\t{name: 'user_id', type: 'string'},\n\t\t\t{name: 'user_firstname', type: 'string'},\n\t\t\t{name: 'user_lastname', type: 'string'},\n\t\t\t//~ {name: 'replier_profile_photo', type: 'string'}\n\t\t]\n\t});\n \n\n\tvar post_details = new Ext.data.JsonStore({\n\t\tautoDistroy: true,\n\t\tId: 'PostDetails',\t\n\t\tautoDistroy: true,\n\t\t//~ autoSync: true,\n\t\t//~ autoLoad: true,\n\t\tproxy: {\n\t\t\ttype: 'ajax', \n\t\t\tmethod: 'POST', \n\t\t\turl: 'php/getPostDetails.php', // url that will load data with respect to start and limit params\n\t\t},\n\t\treader: {\n\t\t\t\ttype: 'json',\n\t\t\t\troot: 'items',\n\t\t\t\ttotalProperty: 'total'\n\t\t},\n\t\tfields: [\n\t\t\t{name: 'reply_title', type: 'string'},\n\t\t\t{name: 'reply_body', type: 'string'},\n\t\t\t{name: 'reply_date_time', type: 'string'},\n\t\t\t{name: 'user_nickname', type: 'string'},\n\t\t\t{name: 'user_firstname', type: 'string'},\n\t\t\t{name: 'user_lastname', type: 'string'},\n\t\t\t{name: 'replier_profile_photo', type: 'string'}\n\t\t]\n\t});\n \n post_details.load({\n\t\tparams:{\n\t\t\tpostId:posts_id\n\t\t}\n\t});\n\n\tset_post_view(posts_id);\n\tif (profile_photo == '0' || profile_photo == '') profile_photo = NoProfileImage;\n\t\t\n\tExt.create('Ext.Window', {\n\t\ttitle: 'Post details',\n\t\theight: 500,\n\t\twidth: 830,\n\t\t//~ autosize: true,\n\t\tdraggable: true,\n\t\tautoscroll:true,\n\t\tid: 'window_register',\n\t\tmodal: true,\n\t\theaderPosition: 'top',\t\t\n\t\tlayout:'border',\t\t\n\t\tdefaults: {\n\t\t\tcollapsible: true,\n\t\t\tsplit: true,\n\t\t\tbodyStyle: 'padding:1px'\n\t\t},\n\t\titems: [{\n\t\t\txtype: 'panel',\n\t\t\tregion: 'west',\n\t\t\ttitle: 'Main post',\t\t\n\t\t\twidth: 320,\n\t\t\tcollapsible: true,\t\n\t\t\tresizeable: true,\n\t\t\tid: 'main_post',\n\t\t\thtml: \t\"<table>\"+\n\t\t\t\t\t\t\"<tr>\" +\n\t\t\t\t\t\t\t\"<td> <img class='main_post_image' src='images/usersProfile/profile_images/\"+profile_photo+\"'></td>\" +\n\t\t\t\t\t\t\t\"<td class='main_post_header'>\" +\n\t\t\t\t\t\t\t\t\"<span class='main_post_title'> Author: </span> \" + posts_username + \"<br />\" +\n\t\t\t\t\t\t\t\t\"<span class='main_post_title'> Post Date: </span> \" + posts_create_datetime + \"<br />\" +\n\t\t\t\t\t\t\t\t\"<span class='main_post_title'> Post Title: </span> \" + posts_description + \"<br />\" +\n\t\t\t\t\t\t\t\t\"<span class='main_post_title'> Total Replies: </span> \" + posts_replycount + \"<br />\" +\n\t\t\t\t\t\t\t\t\"<span class='main_post_title'> Total Views: </span> \" + posts_replycount + \n\t\t\t\t\t\t\t\" </td>\" +\n\t\t\t\t\t\t\"</tr>\" +\n\t\t\t\t\t\t\"<tr> <td> <hr class='main_post_line' /></td> <td> <hr class='main_post_line' /></td> </tr>\" +\n\t\t\t\t\t\t\"<tr>\" +\n\t\t\t\t\t\t\t\"<td class='main_post_body_header'> <br /> <span class='main_post_title'> Post Body: </span> </td>\" + \n\t\t\t\t\t\t\"</tr>\" +\n\t\t\t\t\t\t\"<tr>\" +\n\t\t\t\t\t\t\t\"<td class='main_post_body'> <br />\" + posts_body.replace(\"<br/>\",\"\\n\") + \" </td>\" +\n\t\t\t\t\t\t\"</tr>\" +\n\t\t\t\t\t\"</table><br /><br />\"\n\t\t\t\n\t\t},{\n\t\t\tregion: 'center', \n\t\t\ttitle: 'List of replies by all users',\t\t\t\n\t\t\tlayout: 'fit',\n\t\t\tcollapsible: false,\t\t\t\n\t\t\tdockedItems: [{\n\t\t\t\txtype: 'toolbar',\n\t\t\t\tdock: 'top',\n\t\t\t\t//~ ui: 'footer',\n\t\t\t\tdefaults: {minWidth: 20},\n\t\t\t\titems: [{ \n\t\t\t\t\txtype: 'button', \n\t\t\t\t\tautoSize:true,\n\t\t\t\t\ttext: 'Post Reply',\n\t\t\t\t\ticon: 'images/icons/accept.png',\n\t\t\t\t\thandler: function(){\n\t\t\t\t\t\tif (active_userid == '0') \n\t\t\t\t\t\t\tshowResult('Action Not Allowed', 'You must register as a user \\n to be able to reply to posts');\n\t\t\t\t\t\telse handle_post_reply(active_userid, posts_id);\t\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t}\n\t\t\t\t},{ \n\t\t\t\t\txtype: 'button',\n\t\t\t\t\tautoSize:true,\n\t\t\t\t\ttext: 'Refresh',\n\t\t\t\t\ticon: 'images/icons/table_refresh.png',\n\t\t\t\t\thandler: function(){\n\t\t\t\t\t\tpost_details.load({\n\t\t\t\t\t\t\tparams:{\n\t\t\t\t\t\t\t\tpostId:posts_id\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}]\n\t\t\t}],\n\t\t\titems: {\n\t\t\t\txtype: 'grid',\n\t\t\t\tid: 'grd_post_details',\n\t\t\t\tstore: post_details,\t\t\t\t\t\t\t\t\t\n\t\t\t\t// grid columns\n\t\t\t\tcolumns:[{text: 'User ID', dataIndex: 'user_nickname', width: 70},\n\t\t\t\t\t\t {text: 'First Name', dataIndex: 'user_firstname', width: 100},\n\t\t\t\t\t\t {text: 'Last Name', dataIndex: 'user_lastname', width: 120},\n\t\t\t\t\t\t {text: 'Reply Date/Time', dataIndex: 'reply_date_time', width: 130}\n\t\t\t\t ],\t\t\t\t\n\t\t\t\t plugins: [{\n\t\t\t\t\tptype: 'rowexpander',\n\t\t\t\t\trowBodyTpl : [\n\t\t\t\t\t\t\"<img class='main_post_image' src='images/usersProfile/profile_images/{replier_profile_photo}'>\",\n\t\t\t\t\t\t'<p><b>Reply Title:</b> {reply_title}</p><br>',\n\t\t\t\t\t\t'<p><b>Reply Body:</b> {reply_body}</p>'\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\tregion: 'east', \n\t\t\tcollapsible: true,\n\t\t\tcollapsed: true,\n\t\t\ttitle: 'List of all views on this post',\n\t\t\tlayout: 'fit',\n\t\t\tflex: 1,\n\t\t\tlisteners: {\n\t\t\t\texpand: function(){\n\t\t\t\t\tpost_view_list.load({\n\t\t\t\t\t\tparams:{\n\t\t\t\t\t\t\tpostId:posts_id\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t}\n\t\t\t},\n\t\t\titems: {\n\t\t\t\txtype: 'grid',\n\t\t\t\tid: 'grd_view_list',\n\t\t\t\tstore: post_view_list,\t\t\t\t\t\t\t\t\t\n\t\t\t\t// grid columns\n\t\t\t\tcolumns:[{text: 'User ID', dataIndex: 'user_nickname', width: 70},\n\t\t\t\t\t\t //~ {text: 'First Name', dataIndex: 'user_firstname', width: 100},\n\t\t\t\t\t\t //~ {text: 'Last Name', dataIndex: 'user_lastname', width: 120},\n\t\t\t\t\t\t {text: 'Last View', dataIndex: 'view_date_time', width: 130}\n\t\t\t\t ],\t\t\t\t\t\t\t\t \n\t\t\t}\n\t\t}],\t\t\t\t\t\t\n\t}).show();\n}", "function renderPost(posts) {\n\n if (posts.length) {\n $(\".post-area\").prepend(posts);\n }\n\n }", "static displayEntries() {\n let posts = Store.getEntries();\n\n posts.forEach((entry) => UI.addEntryToList(entry));\n\n }", "function displayPosts(stringPosts) {\n var jsonPosts = JSON.parse(stringPosts);\n var posts = [];\n jsonPosts.forEach(function (jsonPost) {\n var post = new BlogPost();\n post.fillFromJSON(jsonPost);\n posts.push(post);\n });\n posts.forEach(function (post) {\n var htmlPost = \"<div class=\\\"col-md-4\\\">\" +\n post.getHtml() +\n \"</div>\";\n $(\"#posts\")\n .append(htmlPost);\n });\n}", "function fetch(id) {\n var query = {};\n \n if (id)\n query.postId = id;\n\n Store[id ? 'post' : 'hot'].get(query, success, fail);\n\n function success(data) {\n if (id) {\n data.postId = id;\n return setup([data]);\n }\n\n if (!data.collections)\n return fail();\n\n // Setup a few slides\n setup(data.collections);\n\n // Save all data to cache\n Store.save('collections', data);\n }\n\n function fail(err) {\n $ionicLoading.show({\n template: '<i class=\"icon ion-ios-close-outline\"></i> 网络连接失败...请稍后再试'\n });\n return false;\n }\n }", "async function fetchPostItem() {\n const response = await axios.get(\n `http://localhost:2030/api/posts/${router.query.id}`\n );\n setItem(response.data);\n }", "function loadBlogPage(index) {\n console.log('loadBlogPage INITIATED')\n $postList.innerHTML = '';\n index = Number(index || 0);\n httpGetAsync('blogIndex/' + index, function(data) {\n var data = JSON.parse(data);\n for (i in data) {\n localBlogCache[i] = localBlogCache[i] || data[i]; // store locally if not cached\n // cut it short for preview and add the button under it to load that specific blog post fully with comments\n $postList.innerHTML += data[i].slice(0, data[i].indexOf('<CUT>')) + '</div></div>' + makeShowPostButton(i);\n }\n });\n}", "function loadPosts() {\n fetch('http://jsonplaceholder.typicode.com/posts')\n .then(function(response) {\n return response.json();\n })\n .then(function(posts) {\n console.log(posts);\n let htmlTemplate = \"\";\n for (let post of posts) {\n htmlTemplate += `\n <article>\n <h4>${post.title}</h4>\n <p>${post.body}</p>\n </article>\n `;\n }\n document.querySelector(\"#posts\").innerHTML = htmlTemplate;\n });\n}" ]
[ "0.6727598", "0.6654995", "0.6590465", "0.6505052", "0.646554", "0.6461123", "0.64192784", "0.6374767", "0.63645476", "0.6364195", "0.6347832", "0.63456726", "0.6330478", "0.63288283", "0.6318959", "0.6315574", "0.63108397", "0.62578136", "0.6257761", "0.62432706", "0.6204357", "0.6196689", "0.6184786", "0.61835146", "0.6176208", "0.6136957", "0.61368096", "0.61212593", "0.6106497", "0.61056024", "0.6080107", "0.60752887", "0.60731417", "0.60730153", "0.60599065", "0.6037047", "0.6022475", "0.60132426", "0.6011865", "0.60024124", "0.598981", "0.59836096", "0.5982692", "0.5981161", "0.5962409", "0.59511656", "0.5947261", "0.5940198", "0.59393895", "0.59337014", "0.59336865", "0.5932884", "0.592148", "0.5913242", "0.5911323", "0.59018266", "0.5901715", "0.5885831", "0.5884222", "0.5884176", "0.5883229", "0.5877765", "0.58757776", "0.5872518", "0.5872227", "0.586435", "0.5855151", "0.58541226", "0.5847466", "0.5837276", "0.5830242", "0.58298624", "0.58258075", "0.5821678", "0.5820846", "0.58073896", "0.5787818", "0.57856196", "0.5782677", "0.57818425", "0.5775814", "0.5753275", "0.575319", "0.57498187", "0.57487935", "0.57460654", "0.573839", "0.5736506", "0.57289344", "0.5728793", "0.57273924", "0.57232225", "0.57217956", "0.5720556", "0.5720005", "0.5718546", "0.5715695", "0.57135755", "0.57097554", "0.570752" ]
0.5928775
52
This function does an API call to delete posts InitializeRows handles appending all of our constructed post HTML inside blogContainer
function initializeRows() { blogContainer.empty(); var postsToAdd = []; for (var i = 0; i < posts.length; i++) { postsToAdd.push(createNewRow(posts[i])); } blogContainer.append(postsToAdd); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initializeRows() {\n blogContainer.empty();\n var postsToAdd = [];\n var reversePoststoAdd\n for (var i = 0; i < post.length; i++) {\n postsToAdd.push(createNewRow(post[i]));\n }\n reversePoststoAdd = postsToAdd.reverse()\n blogContainer.append(reversePoststoAdd);\n }", "function renderPosts(posts) {\n //delete\n \n let divchild = document.createElement(\"div\");\n let article = document.createElement(\"p\");\n let title = document.createElement(\"h2\");\n \n divchild.setAttribute(\"class\", \"post\");\n\n title.appendChild(document.createTextNode(posts[0].title));\n \n article.appendChild(document.createTextNode(posts[0].body))\n \n divchild.appendChild(title)\n divchild.appendChild(article)\n \n divContenedorPost.appendChild(divchild);\n\n \n}", "function renderPosts(doc){\n\tlet div=document.createElement('div');\n\tlet title= document.createElement('a');\n\tlet content= document.createElement('span');\n\tlet image= document.createElement('img');\n\tlet hr= document.createElement('hr');\n\tdiv.setAttribute('data-id' , doc.id );\n\tconsole.log( doc.id )\n\ttitle.textContent = doc.data().title;\n\tcontent.textContent = doc.data().content;\n\timage.src = doc.data().image;\n\t//addIDs\n\ttitle.setAttribute(\"id\", 'postHeader');\n\ttitle.setAttribute(\"href\", doc.data().link);\n\tcontent.setAttribute(\"id\",'postContent' );\n\timage.setAttribute(\"class\", 'pImg');\n\t\n\t//appendChild\n\tdiv.appendChild(content);\n\tdiv.appendChild(image);\n\tdiv.appendChild(title) ;\n\tdiv.appendChild(hr) ;\n\tpostsList.appendChild(div); \n\t//deleting data\n\t/*cross.addEventListener('click',(e) => {\n\t\te.stopPropagation();\n\t\tlet id = e.target.parentElement.getAttribute('data-id')\n\t\tdb.collection('posts').doc(id).delete();\n\t}) */\n}", "function clearPosts() {\n\t\t$(articleContainer).html('');\n\t}", "function clearPosts() {\n\t\t$(articleContainer).html('');\n\t}", "function createPost(postData) {\n const div = document.createElement('div');\n const h2 = document.createElement('h2');\n const p = document.createElement('p');\n const btn = document.createElement('button');\n\n btn.textContent = 'Delete Post';\n // On click, it should delete the item from the database\n // Then remove the item from the DOM on success\n btn.addEventListener('click', () => {\n // Pessimistic rendering, don't delete unless the post\n // was actually deleted from the DB\n fetch(`${url}/${postData.id}`, { method: 'DELETE' })\n .then(res => res.json())\n .then(() => {\n // We can access the div because it's available one level up\n // in the scope chain\n div.remove();\n })\n });\n\n h2.textContent = postData.title;\n p.textContent = postData.text;\n div.append(h2, p, btn);\n\n const postsSection = document.querySelector('.posts');\n\n postsSection.append(div);\n}", "function CreatePostsList()\r\n {\r\n let postsParent = document.getElementsByClassName(\"nPosts\")[0];\r\n let postsUl = document.getElementsByClassName(\"nPostsData\")[0];\r\n if(postsUl) postsUl.remove();\r\n let posts = GetSavedPosts();\r\n if(posts.length ==0)\r\n {\r\n let info0 = document.createElement(\"div\");\r\n info0.classList.add(\"nPostsData\");\r\n let infoParagraph0 = document.createElement(\"p\");\r\n infoParagraph0.innerHTML = \"Brak zapisanych wpisów ( ͡° ʖ̯ ͡°)\";\r\n info0.appendChild(infoParagraph0);\r\n postsParent.appendChild(info0);\r\n }\r\n else\r\n {\r\n let info1 = document.createElement(\"div\");\r\n info1.classList.add(\"nPostsData\");\r\n let infoUl = document.createElement(\"ul\");\r\n posts.forEach(element => {\r\n let infoLi = document.createElement(\"ul\");\r\n let infoA = document.createElement(\"p\");\r\n let deleteButton = '<a class=\"remove-item\" id=\"'+element.id+'\" ><i class=\"fa fa-times\" style=\"margin-left:24px\"></i><a>';\r\n infoA.innerHTML = '<a href =\"https://www.wykop.pl/wpis/'+element.id+'/\"><i style=\"padding-top:10px\" class=\"fa fa-external-link\"></i>Link</a> || ' + moment(element.date).format('DD/MM/YYYY, H:mm:ss') + \"\" + deleteButton;\r\n infoLi.appendChild(infoA);\r\n\r\n infoUl.appendChild(infoLi);\r\n })\r\n info1.appendChild(infoUl);\r\n postsParent.appendChild(info1);\r\n let btnList = document.getElementsByClassName(\"remove-item\");\r\n btnList = [].slice.call(btnList);\r\n\r\n if(btnList.length >0)\r\n {\r\n btnList.forEach(element => {\r\n element.addEventListener(\"click\", function(){\r\n RemovePost(element.id);\r\n }, false);\r\n })\r\n }\r\n }\r\n }", "function reloadPosts() {\n var postList = document.getElementById(\"posts\");\n while (postList.lastChild.tagName != \"TEMPLATE\") {\n postList.removeChild(postList.lastChild);\n }\n referenceToLastKey = '';\n referenceToLastValue = '';\n referenceToOldestPost = '';\n nbOfPostsDisplayed = 0;\n loadPosts();\n}", "function renderPost() {\n let result_post = document.querySelector(\"#post-result\");\n let template = document.querySelector(\"#post-template\");\n result_post.innerHTML = \"\";\n for (i in posts) {\n let el = template.cloneNode(true);\n el.querySelector(\".card-header > h6\").innerText = `${posts[i].date}`;\n el.querySelector(\".card-header > .pointer\").setAttribute(\n \"onclick\",\n `removePost(${i})`\n );\n el.querySelector(\n \".card-body > .card-text\"\n ).innerText = `${posts[i].message}`;\n el.style.display = \"block\";\n result_post.appendChild(el);\n }\n}", "function makeSectionPosts(posts) {\n const sectionPosts = document.getElementById('posts');\n const postsOfArray = [...posts];\n if (sectionPosts) {\n const sectionPostsPosts = sectionPosts.getElementsByClassName('posts')[0];\n sectionPostsPosts.innerHTML = '';\n\n postsOfArray.forEach((postJson) => {\n const post = returnNeededTypePost(postJson);\n post.renderBlogPost(sectionPostsPosts);\n });\n } else {\n const fragmentPosts = document.createDocumentFragment();\n const sectionPosts = document.createElement('section');\n fragmentPosts.append(sectionPosts);\n sectionPosts.id = 'posts';\n\n const containerPosts = makeElement('div', 'container');\n sectionPosts.append(containerPosts);\n\n const rowPosts = makeElement('div', 'row');\n containerPosts.insertAdjacentElement('afterbegin', rowPosts);\n\n const sectionPostsPosts = makeElement('div', 'posts');\n rowPosts.append(sectionPostsPosts);\n if (posts.length) { // check if there is any post\n postsOfArray.forEach((postJson) => {\n const post = returnNeededTypePost(postJson);\n post.renderBlogPost(sectionPostsPosts);\n });\n // listen to delete post\n sectionPosts.addEventListener('noPostLeft', () => makeNoPostBlock(sectionPostsPosts));\n } else {\n makeNoPostBlock(sectionPostsPosts);\n }\n\n const wrapper = document.getElementsByClassName('wrapper')[0];\n fragmentPosts.append(sectionPosts);\n wrapper.append(fragmentPosts);\n }\n}", "function initializeRows() {\n postsContainer.empty();\n var postsToAdd = [];\n for (var i = 0; i < posts.length; i++) {\n var postAuthor = posts[i].User.first_name + \" \" + posts[i].User.last_name;\n postsToAdd.push(createNewRow(posts[i], postAuthor));\n }\n console.log(postsToAdd);\n postsContainer.append(postsToAdd);\n }", "function initializeRows() {\n blogContainer.empty();\n var productsToAdd = [];\n for (var i = 0; i < products.length; i++) {\n productsToAdd.push(createNewRow(products[i]));\n }\n blogContainer.append(productsToAdd);\n }", "function updatePostsContainer() {\r\n\r\n var postsContainer = document.getElementById('postsContainer');\r\n postsContainer.innerHTML = '';\r\n\r\n postsContainer.appendChild(moreMorePostsMsj);\r\n\r\n for (var i = 0; i < posts.length; i++) {\r\n var postUI = new PostUI(posts[i], deletePost, openUpdateView);\r\n postUI.sendReplyBtn.onclick = sendReply;\r\n postsContainer.appendChild(postUI.container);\r\n }\r\n\r\n postsContainer.appendChild(addNewPostsMsj);\r\n\r\n if (moveToBottom) {\r\n postsContainer.scrollTop = postsContainer.scrollHeight;\r\n moveToBottom = false;\r\n }\r\n\r\n titleTxt.value = '';\r\n bodyTxt.value = '';\r\n selectedPostUI = null;\r\n }", "function deletePosts(postId) {\n let $postDiv = $(`#${'delete' + postId}`);\n $.ajax({\n async: true,\n type: 'DELETE',\n url: `${$HEROKU_URL}/api/v1/posts/${postId}`,\n dataType: 'json',\n success: function () {\n },\n error: function () {\n }\n });\n $postDiv.empty();\n}", "function showAllBlogs() {\n datebase.collection(\"blog\").get().then((query) => {\n var post = '';\n var i = 0;\n query.forEach((item) => {\n var data = item.data();\n post += '<article class=\"eachBlogItem\">';\n post += '<h2> Title: ' + data.title + '</h2>';\n post += '<section class=\"aBlock\"><p class=\"p1\">Summary:<br><br>' + data.summary + '</p>';\n post += '<p class=\"p2\">Created by ' + data.author + ' (' +data.email+ ')</p>';\n post += '<p class=\"p2\">' + data.date.toDate().toString() + '</p></section>';\n\n // check if displaying blog is created by current logged in user\n var nameList = username.split(\"+\");\n if (nameList[2] == data.uid) {\n post += '<button class=\"customButton\" onclick=\"editBlog('+i+')\"><img class=\"secretButton\" src=\"../img/edit.png\" alt=\"EDIT\"></button>';\n post += '<button class=\"customButton\" onclick=\"deleteBlog('+i+')\"><img class=\"secretButton\" src=\"../img/delete.png\" alt=\"EDIT\"></button>';\n }\n post += '</article>';\n i++;\n });\n document.getElementById('blogItem').innerHTML = post;\n });\n}", "function initRecentPosts() {\n // get some dummy data\n const endpoint = 'https://my.api.mockaroo.com/blog-posts.json?key=23239c30';\n const container = document.querySelector('.posts-container');\n const loadingStatus = document.querySelector('.content-loading');\n\n function dismissLoadingStatus() {\n loadingStatus.style.display = 'none';\n }\n\n function getPostHtml(post) {\n // LEARNING MOMENT - how to get human-friendly strings from a Date object\n const date = new Date(post.date);\n const year = date.getFullYear();\n const month = date.toLocaleString('en-us', { month: 'long' });\n // date object date is zero-based but our data is not\n const day = date.getDate() + 1;\n const weekday = date.toLocaleString('en-us', { weekday: 'long' });\n return `\n <div class=\"post content\">\n <div class=\"post-title title is-size-4\">${post.title}</div>\n <div class=\"post-byline subtitle is-size-6 is-italic\">by ${post.author} on ${weekday}, ${month} ${day}, ${year}</div>\n <div class=\"post-preview\">${post.preview}</div>\n <a href=\"#\" class=\"button\">Continue Reading</a>\n </div>\n `;\n }\n\n function createDomNodeFromString(string) {\n return document.createRange().createContextualFragment(string);\n }\n\n function addNodesToDOM(nodesArray) {\n nodesArray.forEach(n => container.append(n));\n }\n\n function parseResponse(posts) {\n // LEARNING MOMENT - how to sort objects by a date string\n const postsSortedByDate = posts.sort((p1, p2) => new Date(p2.date) - new Date(p1.date));\n postNodes = postsSortedByDate.map(p => getPostHtml(p)).map(p => createDomNodeFromString(p));\n dismissLoadingStatus();\n addNodesToDOM(postNodes);\n }\n\n function handleError(error) {\n console.error(error);\n const errorMessage = `\n <div class=\"notification error\">There was an error loading recent posts.</div>\n `;\n container.append(createDomNodeFromString(errorMessage));\n }\n\n // LEARNING MOMENT - how to make a request with the new fetch API\n fetch(endpoint).then(r => r.json()).then(parseResponse).catch(handleError);\n}", "function refreshPosts(data, mode) {\n var removePostId = \"removePost\" + data.ID;\n if (mode == 'created') {\n if (data.errorMessage != '') {\n var dateCreated = dateFormat(new Date(data.DateCreated), \"h:MM TT mmmm dd, yyyy\");\n $('div .recentpost').removeClass('recentpost').addClass('post');\n var removePostId = \"removePost\" + data.ID;\n var recentpost = '<div class=\"recentpost\">' +\n '<div class=\"blogContent\">' + data.Content +\n '</div> <div class=\"datePosted\">' + dateCreated +\n '</div>' +\n '<div class=\"removeContent\">' +\n '<span id=' + '\"' + removePostId + '\"' + 'class=\"removePost\">Remove</span>' +\n '</div> <div class=\"clear\"></div>' +\n '<hr />' +\n '</div>'\n\n var firstPost = $('div .post').length;\n if (firstPost == 0) { $('#header').after(recentpost); }\n else { $('div .post').first().before(recentpost); }\n $('#blogContent').val('');\n clearErrorMessage();\n setformfieldsize($('#blogContent'), 200, 'remainingCharacters');\n }\n else {\n displayErrorMessage(data.errorMessage);\n }\n }\n else if (mode == 'removed') {\n if (data.errorMessage != '') {\n removePostId = \"#\" + removePostId;\n var parentDiv = $(removePostId).parent().parent();\n if (parentDiv.attr('class') == \"recentpost\") {\n $('div .post').first().removeClass('post').addClass('recentpost');\n }\n $(removePostId).parent('div').parent('div').remove();\n parentDiv.remove();\n clearErrorMessage();\n }\n else { displayErrorMessage(data.errorMessage); }\n }\n}", "function createHTML(postsData) {\n var postlistHTML = '';\n var api_value = document.getElementById(\"restapi\").value;\n for (i = 0; i < postsData.length; i++) {\n\n postlistHTML += '<div class=\"slider--item\"' + '>'\n if (postsData[i].episode_featured_image) {\n postlistHTML += '<a target=\"_blank\" href=' + postsData[i].link + '><img src=' + postsData[i].episode_featured_image + '></a>';\n }\n postlistHTML += '<div class=\"slider--content\">'\n postlistHTML += '<h4 class=\"slider--title\"> <a target=\"_blank\" href=' + postsData[i].link + '>' + postsData[i].title.rendered + '</a></h4 >';\n postlistHTML += '<div class=\"slider--date\">' + new Date(postsData[i].date.substring(0, 10)).toDateString() + '</div>';\n postlistHTML += '<div class=\"slider--excerpt\">' + postsData[i].excerpt.rendered + '</div>';\n postlistHTML += '</div>';\n postlistHTML += '</div>';\n\n\n }\n PostsContainer.innerHTML = postlistHTML;\n }", "function createAllPosts(div, responseAsJsonOld, apiUrl, authToken){\n\tconst array = createPopup(\"allposts\", \"All Posts\");\n\tconst allDiv = array[0];\n\tconsole.log(\"inside\");\n\tlet content = array[1];\n\tconst close = array[2];\n\tclose.onclick = function(){ openEdit(allDiv, div)};\n\tfor (let id of responseAsJsonOld.posts){ //fetch posts\n\t let param = {\n\t\t method: 'GET',\n\t\t headers:{\n\t\t\t\t 'Authorization': `Token ${authToken}`,\n\t\t\t\t 'Content-Type': 'application/json',\n\t\t }\n\t }\n\t allPostsSendBackend(apiUrl, id, param, allDiv, authToken, content,\n responseAsJsonOld); //get all posts from id\n\t}\n\tif (responseAsJsonOld.posts.length == 0){\n\t\tconst msg = document.createElement(\"p\");\n\t\tmsg.textContent = \"This user has not posted anything yet\";\n\t\tcontent.appendChild(msg);\n\t}\n\treturn allDiv;\n}", "function createNewRow(post, author) {\n console.log(post);\n var formattedDate = new Date(post.createdAt);\n formattedDate = moment(formattedDate).format(\"MMMM Do YYYY, h:mm a\");\n\n //Create variables\n var newPostCard = $(\"<div>\");\n var card = $(\"<div>\");\n var cardHeader = $(\"<div>\");\n var row1 = $(\"<div>\");\n var col12 = $(\"<div>\");\n var colCounter = $(\"<div>\");\n var commentCounter = $(\"<h6>\");\n var span = $(\"<span>\");\n var hr = $(\"<hr>\");\n var row2 = $(\"<div>\");\n var col9 = $(\"<div>\");\n var link = $(\"<a>\");\n var postTitle = $(\"<h3>\");\n var col1 = $(\"<div>\");\n var editButton = $(\"<button>\");\n var deleteButton = $(\"<button>\");\n var col2 = $(\"<div>\");\n var postAuthor = $(\"<h5>\");\n var postDate = $(\"<p>\");\n var cardBody = $(\"<div>\");\n var row3 = $(\"<div>\");\n var col12Body = $(\"<div>\");\n var postBody = $(\"<h5>\");\n\n // Add classes + ids\n card.addClass(\"card mb-4\");\n cardHeader.addClass(\"card-header\");\n row1.addClass(\"row\");\n col12.addClass(\"col-lg-10 col-md-9 col-8\");\n colCounter.addClass(\"col-lg-2 col-md-3 col-4\");\n commentCounter.addClass(\"pt-3 comments\");\n span.addClass(\"badge badge-secondary\");\n span.attr(\"id\", \"post_Category\");\n hr.addClass(\"separator-md\");\n row2.addClass(\"row\");\n row2.attr(\"id\", \"singlePost\");\n col9.addClass(\"col-lg-7 col-md-5 col-sm-8 col-7 mb-3\");\n postTitle.attr(\"id\", \"post_Title\");\n col1.addClass(\"col-lg-2 col-sm-4 col-5 col-md-3 buttons-section\");\n editButton.addClass(\"btn btn-default mr-1\");\n deleteButton.addClass(\"btn btn-default\");\n editButton.attr(\"id\", \"edit-submit\");\n deleteButton.attr(\"id\", \"edit-submit\");\n col2.addClass(\n \"col-lg-3 col-md-4 d-none d-sm-none d-md-block author-details\"\n );\n col2.attr(\"id\", \"user\");\n postAuthor.addClass(\"mt-3\");\n postAuthor.attr(\"id\", \"post_Author\");\n postDate.attr(\"id\", \"post_UpdatedAt\");\n editButton.attr(\"value\", post.id);\n cardBody.addClass(\"card-body\");\n row3.addClass(\"row\");\n col12Body.addClass(\"col-lg-12\");\n postBody.attr(\"id\", \"post_Body\");\n deleteButton.addClass(\"delete\");\n\n //Create badge colors based on category\n if (\"Server-Side\" === post.category) {\n $(span).addClass(\"server-side\");\n } else if (\"Client-Side\" === post.category) {\n $(span).addClass(\"client-side\");\n } else if (\"Career Advice\" === post.category) {\n $(span).addClass(\"career-advice\");\n } else if (\"Web Developer's FAQ\" === post.category) {\n $(span).addClass(\"faq\");\n } else {\n $(span).addClass(\"website-management\");\n }\n\n //Insert info from posts\n $(span).addClass(\"badge\");\n span.text(post.category);\n commentCounter.text(\"Comments: \" + post.Comments.length);\n postTitle.text(post.title);\n postAuthor.text(author);\n postDate.text(formattedDate);\n postBody.text(post.body);\n postTitle.attr(post.title);\n deleteButton.text(\"X\");\n editButton.text(\"Edit\");\n deleteButton.attr(\"id\", post.id);\n\n //Link title of post to unique post page\n var postLink = url + \"/posts=\" + post.id;\n console.log(postLink);\n $(link).attr(\"href\", postLink);\n\n $(editButton).attr(\"onclick\", `location.href='/editpost=${post.id}'`);\n $(editButton).attr(\"type\", \"submit\");\n $(deleteButton).attr(\"type\", \"submit\");\n \n //Append to page\n col12.append(span);\n row1.append(col12);\n colCounter.append(commentCounter);\n row1.append(colCounter);\n cardHeader.append(row1);\n card.append(cardHeader);\n newPostCard.append(card);\n\n link.append(postTitle);\n col9.append(link);\n row2.append(col9);\n\n col2.append(postAuthor);\n col2.append(postDate);\n row2.append(col2);\n\n col1.append(editButton);\n col1.append(deleteButton);\n row2.append(col1);\n\n card.append(hr);\n card.append(row2);\n\n card.append(hr);\n\n col12Body.append(postBody);\n row3.append(col12Body);\n cardBody.append(row3);\n card.append(cardBody);\n\n console.log(newPostCard);\n\n return newPostCard;\n }", "function addArticlePosts() {\r\n const JSON_SRC = 'MasterPage/json/article_list.json';\r\n const GROUP_SIZE = 6;\r\n let xmlhttp = new XMLHttpRequest();\r\n let current = currentPage();\r\n xmlhttp.onreadystatechange = function() {\r\n if (this.readyState == 4 && this.status == 200) {\r\n let articleList = JSON.parse(this.responseText);\r\n articleList.reverse();\r\n let len = articleList.length;\r\n let next = current + 1;\r\n let htmlContents = '';\r\n for (let i = 0; i < len; i++) {\r\n if (i == GROUP_SIZE * next) {\r\n break;\r\n }\r\n\telse {\r\n if (parseInt(i/GROUP_SIZE) == current) {\r\n let title = articleList[i].articles;\r\n let url = articleList[i].url;\r\n let date = articleList[i].date;\r\n let typeGroup = articleList[i].type_group;\r\n let abstracts = articleList[i].abstracts;\r\n let img = articleList[i].img;\r\n htmlContents += addBlogPost(title, url, date, typeGroup\r\n\t\t\t , abstracts, img);\r\n } \r\n\t}\r\n }\r\n htmlContents += addPage('index.html?page=',current-1,next,len,GROUP_SIZE);\r\n\t\t\t\r\n if (document.getElementById) {\r\n let articlePost = document.getElementById ('article_post');\r\n if (articlePost) {\r\n placeInOuterHtml (articlePost, htmlContents);\r\n\t}\r\n }\r\n }\r\n };\r\n xmlhttp.open(\"GET\", JSON_SRC, true);\r\n xmlhttp.send();\r\n}", "function renderPosts() {\n display.empty();\n // loops posts Arr and append the OBJs\n // debugger\n for (let i = 0; i < posts.length; i++) {\n display.append(`<form action=\"\">\n <p class='post' data-id=` + posts[i].ids + `> ` + posts[i].texts +\n ` <button type='button' class='remove' data-id=` + i +\n `>REMOVE</button>` + `</p>\n <input type=\"text\" name=\"\" class=\"commentName\" placeholder=\"name\">\n <input type=\"text\" name=\"\" class=\"commentComment\" placeholder=\"comment\">\n <ul class = \"postComment\">\n </ul>\n <button class = \"goComment\"type=\"button\">go</button>\n </form>`)\n\n // renderComments(getIndexByID(posts[i].ids), posts[i].ids);\n }\n}", "function clearPosts() {\n while (document.getElementById(\"postbody\").firstChild) {\n document.getElementById(\"postbody\").removeChild(document.getElementById(\"postbody\").firstChild);\n }\n}", "function LoadBlogPost(){\n\tvar curUserID = sessionStorage.getItem('user_id');\n\n\tvar contentSection = document.getElementById('sub-content-content');\n\tvar contentHeading = document.getElementById('sub-content-title');\n\n\tvar getLikeTracksxhrq = new XMLHttpRequest();\n\tvar getLikeTracksURL = 'http://127.0.0.1:3000/getBlog?userID=' + curUserID;\n\n\tvar postHTML = '<p class=\"ripple-post-date\">{%PostDate%}</p>' + \n\t\t\t\t '<p class=\"ripple-post-content\">{%PostContent%}</p>' + \n\t\t\t\t '<p class=\"ripple-post-likes\">{%PostLikes%} Likes</p>';\n\n\tvar enterPost = '<textarea class=\"ripple-put-blog\" id=\"ripple-put-blog\"></textarea>' + \n\t\t\t\t\t'<button class=\"common-btn ripple-post-btn\" id=\"ripple-post-btn\">Post</button>';\n\n\tgetLikeTracksxhrq.open('get', getLikeTracksURL, true);\n\n\tgetLikeTracksxhrq.onreadystatechange = function(){\n\t\tif(getLikeTracksxhrq.readyState === XMLHttpRequest.DONE){\n\t\t\tvar postsRes = JSON.parse(getLikeTracksxhrq.responseText);\n\t\t\tcontentHeading.innerHTML = 'My Blog Posts';\n\t\t\t// clear the previous content \n\t\t\tcontentSection.innerHTML = '';\n\t\t\tfor(var key in postsRes){\n\t\t\t\tvar curPost = postsRes[key];\n\t\t\t\tconsole.log(curPost);\n\t\t\t\tvar newHTML = postHTML;\n\t\t\t\tnewHTML = newHTML.replace('{%PostDate%}', curPost['blog_date']);\n\t\t\t\tnewHTML = newHTML.replace('{%PostContent%}', curPost['content']);\n\t\t\t\tnewHTML = newHTML.replace('{%PostLikes%}', curPost['likes']);\n\n\t\t\t\tvar newLi = document.createElement('li');\n\t\t\t\tnewLi.setAttribute('class', 'ripple-post-li');\n\t\t\t\tnewLi.innerHTML = newHTML;\n\n\t\t\t\tcontentSection.appendChild(newLi);\n\t\t\t}\n\n\t\t\tvar enterDiv = document.createElement('div');\n\t\t\tenterDiv.setAttribute('id', 'ripple-post-area');\n\t\t\tenterDiv.innerHTML = enterPost;\n\n\t\t\tcontentSection.appendChild(enterDiv);\n\n\t\t\t// add listener to post blog button \n\t\t\tvar postBtn = document.getElementById('ripple-post-btn');\n\t\t\tpostBtn.addEventListener('click', postBlog);\n\t\t}\n\t};\n\n\tgetLikeTracksxhrq.send(null);\n}", "function createNewRow(post) {\n var formattedDate = new Date(post.createdAt);\n formattedDate = moment(formattedDate).format(\"MMMM Do YYYY\");\n var newPostPanel = $(\"<div>\");\n newPostPanel.addClass(\"blog-container\");\n var newPostPanelHeading = $(\"<div>\");\n newPostPanelHeading.addClass(\"panel-heading\");\n var newPostTitle = $(\"<h2>\");\n var newPostDate = $(\"<small>\");\n var newPostAuthor = $(\"<h5>\");\n newPostAuthor.text(\"Written by: \" + post.Author.name);\n newPostAuthor.css({\n float: \"right\",\n color: \"pink\",\n \"margin-top\":\n \"-10px\"\n });\n var newPostPanelBody = $(\"<div>\");\n newPostPanelBody.addClass(\"blog-container\");\n var newPostBody = $(\"<p>\");\n newPostTitle.text(post.title + \" \");\n newPostBody.text(post.body);\n newPostDate.text(formattedDate);\n newPostTitle.append(newPostDate);\n newPostPanelHeading.append(newPostTitle);\n newPostPanelHeading.append(newPostAuthor);\n newPostPanelBody.append(newPostBody);\n newPostPanel.append(newPostPanelHeading);\n newPostPanel.append(newPostPanelBody);\n newPostPanel.data(\"post\", post);\n return newPostPanel;\n }", "function renderPosts(data) {\r\n postLists.innerHTML = null;\r\n const nameBox = document.createElement(\"h3\");\r\n nameBox.textContent = \"POSTS\";\r\n postLists.appendChild(nameBox);\r\n\r\n data.forEach((element) => {\r\n const newUserPost = userPostTemp.cloneNode(true);\r\n const postTitle = newUserPost.querySelector(\".post-title\");\r\n postTitle.textContent = element.title;\r\n postTitle.dataset.post_id = element.id;\r\n newUserPost.querySelector(\".body\").textContent = element.body;\r\n postLists.appendChild(newUserPost);\r\n });\r\n}", "function loadPagePosts(postsSection, currentPage) {\n $.post(\"../api/forum/get_page_posts.php\", {\n forum_page: currentPage\n }, function (data) {\n let posts = JSON.parse(data);\n for (let post of posts) {\n let photo = post.submitter_photo;\n let postID = post.id;\n let title = post.title;\n let creationDate = post.creation_date;\n let username = post.username;\n\n let postElement = $(\n '<button class=\"list-group-item forum-post\">' +\n '<span class=\"post-id\" hidden=\"hidden\">' + postID + '</span>' +\n '<h4 class=\"list-group-item-heading post-title\">' + title + '</h4>' +\n '<div class=\"list-group-item-text post-submitter-info\">' +\n '<img class=\"submitter-photo\" src=\"' + photo + '\">' +\n '<small>' +\n '<span class=\"submitter-uname\">' + username + '</span> - ' +\n '<span class=\"post-submission-date\">' + creationDate + '</span>' +\n '</small>' +\n '</div>' +\n '</button>'\n );\n\n postsSection.append(postElement);\n }\n });\n}", "function addPosts(html) {\n verb(\"Initiating addPosts...\")\n\n try {\n\n var par = new DOMParser()\n , doc = par.parseFromString(html, \"text/html\")\n // Old and new posts\n , oids = document.querySelectorAll(\"tr[id^='post-']\")\n , nids = addIgnoredIds(doc.querySelectorAll(\"tr[id^='post-'], .ignored\"))\n // Old and new userlists\n , ous = document.querySelector(\".c_view\")\n , nus = doc.querySelector(\".c_view\")\n // t_viewer body\n , tvib = document.querySelector(\"#topic_viewer > tbody\")\n // oids without previous pages; newly old IDs\n , noids = oids.slice(Math.floor(oids.length / 25) * 25)\n\n debu( \"oids: \" + oids.length + \", nids: \" + nids.length + \", noids: \"\n + noids.length\n )\n\n debu(noids)\n\n // Replace userlist\n ous.parentNode.replaceChild(nus, ous)\n\n // TODO generalize code\n // New posts, removed posts and equal posts\n var newps = nids.mapDiff(function(e) { return e.id }, oids)\n , remps = noids.mapDiff(function(e) { return e.id }, nids)\n , oldps = nids.mapInter(function(e) { return e.id }, oids)\n\n // Remove deleted posts\n debu(\"Removed posts: \" + remps.length)\n remps.map(function(e) {\n var es\n if (! e.querySelector(\".ignored\"))\n es = fiveSiblings(e)\n else es = [e]\n\n for (var i = 0; i < es.length; i++) {\n tvib.removeChild(es[i])\n }\n\n })\n\n // Add new posts\n debu(\"New posts: \" + newps.length)\n newps.map(function(e) {\n var es\n if (! e.querySelector(\".ignored\"))\n es = fiveSiblings(e)\n else es = [e]\n\n for (var i = 0; i < es.length; i++) {\n tvib.insertBefore(es[i], tvib.querySelector(\".c_view\").parentNode)\n\n // Add spoiler event\n if (i == 1) addSpoilerEvent(es[i])\n\n // Add quick quote event\n if (i === 3) addQuoteEvent(es[i])\n }\n })\n\n if (newps.length > 0 && readify(\"beta-beep\", false))\n document.querySelector(\"#beta-beep\").play()\n\n // Update time before update detecting\n if (newps.length > 0 || remps.length > 0) time = 10000\n else time = Math.min(160000, Math.floor(time * 1.5))\n\n // Update old posts\n debu(\"Old posts: \" + oldps.length)\n oldps.map(function(e) {\n if (! e.querySelector(\".ignored\")) {\n var eq = document.querySelector('#' + e.id)\n , ne = e.nextElementSibling.children[1]\n , oe = eq.nextElementSibling.children[1]\n\n // Replace timestamp\n eq.parentNode.replaceChild(e, eq)\n\n verb(e.textContent.replace(/\\s+/g, ' '))\n\n updatePost(ne, oe)\n }\n })\n\n octave()\n\n var roidslen = removeOld()\n\n // TODO test against deleted posts, might get stuck on page from < 25 posts\n // Switch to new page\n cid = iid + Math.floor(roidslen / 25)\n\n debu(cid)\n\n } catch(e) { throw e }\n}", "function fetchAllPosts() {\n fetchPosts(numAllResponses, addPostsToPage);\n document.getElementById(\"projects\").innerHTML = \"\"\n}", "async function createNewRow(post) {\n // card div\n const cardEl = $(\"<div>\");\n cardEl.addClass(\"card\");\n $(\".blog-container\").append(cardEl);\n // creating card header\n const cardHeader = $(\"<div>\");\n cardHeader.addClass(\"card-header\");\n cardEl.append(cardHeader);\n // creating card contents to append to card header\n const postTitle = $(\"<h3>\");\n postTitle.addClass(\"post-title\");\n postTitle.text(post.title);\n cardHeader.append(postTitle);\n const user = $(\"<h5>\");\n user.addClass(\"post-username\");\n user.text(\"created by: \" + post.author);\n cardHeader.append(user);\n // creating card body\n const cardBody = $(\"<div>\");\n cardBody.addClass(\"card-body\");\n cardEl.append(cardBody);\n // creating card contents to append to card body\n const postBody = $(\"<p>\");\n postBody.addClass(\"post-body\");\n postBody.text(post.body);\n cardBody.append(postBody);\n\n cardEl.data(\"post\", post);\n return cardEl;\n }", "function showReplies(allReplies, rowId) {\n\n var rowReply = document.getElementById(rowId);\n rowReply.innerHTML = \"\";\n\n var obj = JSON.parse(allReplies);\n\n // var text = document.createTextNode(\"Test\");\n // rowReply.appendChild(text);\n\n //alert(obj.post.post_image);\n\n if (obj.post.post_image != \"\") {\n\n // Column for Image\n var imageColumn = document.createElement(\"div\");\n imageColumn.classList.add(\"col-12\", \"col-sm-12\", \"col-md-12\", \"col-lg-12\");\n imageColumn.setAttribute(\"id\", \"imageColumn\");\n rowReply.appendChild(imageColumn);\n\n var postImage = document.createElement(\"img\");\n postImage.classList.add(\"postImage\");\n postImage.setAttribute(\"id\", \"postImage\");\n postImage.setAttribute(\"src\", obj.post.post_image);\n imageColumn.appendChild(postImage);\n }\n\n // Column for description\n var descColumn = document.createElement(\"div\");\n descColumn.classList.add(\"col-12\", \"col-sm-12\", \"col-md-12\", \"col-lg-12\");\n descColumn.setAttribute(\"id\", \"descColumn\");\n rowReply.appendChild(descColumn);\n\n var postDesc = document.createTextNode(obj.post.post_body);\n descColumn.appendChild(postDesc);\n\n // Add a new reply to this column\n var addReplyColumn = document.createElement(\"div\");\n addReplyColumn.classList.add(\"col-12\", \"col-sm-12\", \"col-md-12\", \"col-lg-12\");\n addReplyColumn.setAttribute(\"id\", \"addReplyColumn\");\n rowReply.appendChild(addReplyColumn);\n\n // Text area and submit row\n var textSubmitRow = document.createElement(\"div\");\n textSubmitRow.classList.add(\"row\");\n textSubmitRow.setAttribute(\"id\", \"textSubmitRow\");\n addReplyColumn.appendChild(textSubmitRow);\n\n // A new reply text column\n var replyTextColumn = document.createElement(\"div\");\n replyTextColumn.classList.add(\"col-12\", \"col-sm-10\", \"col-md-10\", \"col-lg-10\");\n replyTextColumn.setAttribute(\"id\", \"replyTextColumn\");\n textSubmitRow.appendChild(replyTextColumn);\n\n // Text area for a new reply\n var replyTextArea = document.createElement(\"textarea\");\n replyTextArea.setAttribute(\"rows\", \"3\");\n replyTextArea.classList.add(\"form-control\");\n replyTextArea.setAttribute(\"id\", \"replyTextArea\" + obj.post.post_id);\n replyTextColumn.appendChild(replyTextArea);\n\n // Submit button column for a new reply\n var replySubmitColumn = document.createElement(\"div\");\n replySubmitColumn.classList.add(\"col-12\", \"col-sm-2\", \"col-md-2\", \"col-lg-2\");\n replySubmitColumn.setAttribute(\"id\", \"replySubmitColumn\");\n textSubmitRow.appendChild(replySubmitColumn);\n\n var replyIsComingFrom = \"whenExpanded\";\n\n // Submit button for a new reply\n var submitReply = document.createElement(\"button\");\n submitReply.classList.add(\"btn\", \"btn-secondary\", \"btn-block\");\n submitReply.setAttribute(\"id\", \"submitReply\");\n submitReply.setAttribute(\"onclick\", \"addReply(\" + obj.post.post_id + \", '\" + replyIsComingFrom + \"', '\" + obj.post.user + \"')\");\n replySubmitColumn.appendChild(submitReply);\n\n var submitReplyText = document.createTextNode(\"Reply\");\n submitReply.appendChild(submitReplyText);\n\n // All replies column\n var allReplyColumn = document.createElement(\"div\");\n allReplyColumn.classList.add(\"col-12\", \"col-sm-12\", \"col-md-12\", \"col-lg-12\");\n allReplyColumn.setAttribute(\"id\", \"allReplyColumn\");\n rowReply.appendChild(allReplyColumn);\n\n // All replies row\n var allReplyRow = document.createElement(\"div\");\n allReplyRow.classList.add(\"row\");\n allReplyRow.setAttribute(\"id\", \"allReplyRow\" + obj.post.post_id);\n allReplyColumn.appendChild(allReplyRow);\n\n if (obj.replies.length == 0) {\n var noRepliesColumn = document.createElement(\"div\");\n noRepliesColumn.classList.add(\"offset-sm-1\", \"offset-md-1\", \"offset-lg-1\", \"col-10\", \"col-sm-10\", \"col-md-10\", \"col-lg-10\", \"alert\", \"alert-info\");\n noRepliesColumn.setAttribute(\"id\", \"noRepliesColumn\");\n noRepliesColumn.setAttribute(\"role\", \"alert\");\n allReplyRow.appendChild(noRepliesColumn);\n\n var noReplyText = document.createTextNode(\"No reply yet\");\n noRepliesColumn.appendChild(noReplyText);\n\n } else {\n //console.log(allReplies);\n for (var i = obj.replies.length - 1; i >= 0; i--) {\n // for (var i = 0; i < obj.replies.length; i++) {\n\n if (obj.replies[i].parent_id == \"None\") {\n\n // All reply id\n var allRepliesIdHolder = document.getElementById(\"allReplyRow\" + obj.post.post_id);\n\n // Add a main reply to post\n var mainReplyColumn = document.createElement(\"div\");\n mainReplyColumn.classList.add(\"col-12\", \"col-sm-12\", \"col-md-12\", \"col-lg-12\", \"individualMainReply\");\n mainReplyColumn.setAttribute(\"id\", \"mainReplyColumn\" + obj.replies[i].reply__reply_id);\n //allReplyRow.appendChild(mainReplyColumn);\n allReplyRow.insertBefore(mainReplyColumn, allReplyRow.childNodes[0]);\n\n // var mainReplyText = document.createTextNode(obj.replies[i].reply_body);\n // mainReplyColumn.appendChild(mainReplyText);\n\n } else if (obj.replies[i].parent_id != \"None\") {\n var parentReplyId = document.getElementById(\"mainReplyColumn\" + obj.replies[i].parent_id);\n\n console.log(\"Test to append child: \" + obj.replies[i].parent_id);\n\n // Add a main reply to post\n var mainReplyColumn = document.createElement(\"div\");\n mainReplyColumn.classList.add(\"col-12\", \"col-sm-12\", \"col-md-12\", \"col-lg-12\", \"individualMainReply\");\n mainReplyColumn.setAttribute(\"style\", \"padding-left: 30px;\");\n mainReplyColumn.setAttribute(\"id\", \"mainReplyColumn\" + obj.replies[i].reply__reply_id);\n parentReplyId.appendChild(mainReplyColumn);\n\n // var replyToReplyText = document.createTextNode(obj.replies[i].reply_body);\n // mainReplyColumn.appendChild(replyToReplyText);\n\n }\n\n // Main reply card row for main reply\n var mainReplyRow = document.createElement(\"div\");\n mainReplyRow.classList.add(\"row\", \"replyBorder\");\n mainReplyRow.setAttribute(\"id\", \"mainReplyRow\" + obj.replies[i].reply__reply_id);\n mainReplyColumn.appendChild(mainReplyRow);\n\n // Posted by and body column for main reply\n var postByBodyColumn = document.createElement(\"div\");\n\n postByBodyColumn.classList.add(\"col-12\", \"col-sm-10\", \"col-md-10\", \"col-lg-10\");\n postByBodyColumn.setAttribute(\"id\", \"postByBodyColumn\");\n mainReplyRow.appendChild(postByBodyColumn);\n\n // Posted by and body row for main reply\n var postByBodyRow = document.createElement(\"div\");\n postByBodyRow.classList.add(\"row\");\n postByBodyRow.setAttribute(\"id\", \"postByBodyRow\");\n postByBodyColumn.appendChild(postByBodyRow);\n\n // Posted by and time column for main reply\n var postByTimeColumn = document.createElement(\"div\");\n postByTimeColumn.classList.add(\"col-12\", \"col-sm-12\", \"col-md-12\", \"col-lg-12\");\n postByTimeColumn.setAttribute(\"id\", \"postByTimeColumn\");\n postByBodyRow.appendChild(postByTimeColumn);\n\n // Span for posted by user\n var spanByUser = document.createElement(\"span\");\n spanByUser.setAttribute(\"style\", \"font-weight: bold; font-size: 15px;\");\n postByTimeColumn.appendChild(spanByUser);\n\n if (obj.replies[i].parent_id == \"None\") {\n\n // Posted by user\n var postedByText = document.createTextNode(obj.replies[i].user + \" replied to post\");\n spanByUser.appendChild(postedByText);\n } else {\n\n // Posted by user\n var postedByText = document.createTextNode(obj.replies[i].user + \" replied to \" + obj.replies[i].parent_user);\n spanByUser.appendChild(postedByText);\n }\n\n\n\n // creating time string\n var todaysDate = new Date();\n var replyDate = createDate(todaysDate, obj.replies[i].reply_datetime);\n\n // Span for reply time \n var spanForReplyTime = document.createElement(\"span\");\n spanForReplyTime.setAttribute(\"style\", \"font-size: 10px; font-color: grey; margin-left: 10px;\");\n postByTimeColumn.appendChild(spanForReplyTime);\n\n // Posted by user\n var postedByTimeText = document.createTextNode(\" \" + replyDate);\n spanForReplyTime.appendChild(postedByTimeText);\n\n // Post body column for main reply\n var replyBodyColumn = document.createElement(\"div\");\n replyBodyColumn.classList.add(\"col-12\", \"col-sm-12\", \"col-md-12\", \"col-lg-12\");\n replyBodyColumn.setAttribute(\"id\", \"replyBodyColumn\");\n postByBodyRow.appendChild(replyBodyColumn);\n\n // Reply body/description\n var replyBodyText = document.createTextNode(obj.replies[i].reply_body);\n replyBodyColumn.appendChild(replyBodyText);\n\n // Connect and reply column for main reply\n var connectReplyColumn = document.createElement(\"div\");\n connectReplyColumn.classList.add(\"col-12\", \"col-sm-2\", \"col-md-2\", \"col-lg-2\");\n connectReplyColumn.setAttribute(\"id\", \"connectReplyColumn\");\n mainReplyRow.appendChild(connectReplyColumn);\n\n // Connect and reply row for main reply\n var connectReplyRow = document.createElement(\"div\");\n connectReplyRow.classList.add(\"row\");\n connectReplyRow.setAttribute(\"id\", \"connectReplyRow\");\n connectReplyColumn.appendChild(connectReplyRow);\n\n // Connect column for main reply\n var connectColumn = document.createElement(\"div\");\n connectColumn.classList.add(\"col-6\", \"col-sm-12\", \"col-md-12\", \"col-lg-12\");\n connectColumn.setAttribute(\"id\", \"connectColumn\");\n connectReplyRow.appendChild(connectColumn);\n\n var label = \"reply\";\n\n // Connect Button for main reply\n var buttonForMainReplyConnect = document.createElement(\"button\");\n buttonForMainReplyConnect.classList.add(\"button\", \"btn\", \"btn-primary\", \"replyButtons\");\n buttonForMainReplyConnect.setAttribute(\"id\", \"connectToReply\" + obj.replies[i].reply__reply_id);\n buttonForMainReplyConnect.setAttribute(\"onclick\", \"connectIncrement(\" + obj.replies[i].reply__reply_id + \",'\" + label + \"')\");\n connectColumn.appendChild(buttonForMainReplyConnect);\n\n if (obj.replies[i].connect_count > 1) {\n var mianReplyConnectsText = document.createTextNode(obj.replies[i].connect_count + \" Connects\");\n buttonForMainReplyConnect.appendChild(mianReplyConnectsText);\n } else if (obj.replies[i].connect_count <= 1) {\n var mianReplyConnectsText = document.createTextNode(obj.replies[i].connect_count + \" Connect\");\n buttonForMainReplyConnect.appendChild(mianReplyConnectsText);\n }\n\n\n // Reply column for main reply\n var replyColumn = document.createElement(\"div\");\n replyColumn.classList.add(\"col-6\", \"col-sm-12\", \"col-md-12\", \"col-lg-12\");\n replyColumn.setAttribute(\"id\", \"replyColumn\");\n connectReplyRow.appendChild(replyColumn);\n\n // Reply button for main reply\n var buttonForMainReplyToReply = document.createElement(\"button\");\n buttonForMainReplyToReply.classList.add(\"button\", \"btn\", \"btn-primary\", \"replyButtons\");\n //buttonForMainReplyToReply.setAttribute(\"id\", replyButtonId);\n buttonForMainReplyToReply.setAttribute(\"onclick\", \"replyToReplyFun(\" + obj.replies[i].reply__reply_id + \")\");\n replyColumn.appendChild(buttonForMainReplyToReply);\n\n\n if (obj.replies[i].reply_count > 1) {\n var mainReplyToReplyText = document.createTextNode(obj.replies[i].reply_count + \" Replies\");\n buttonForMainReplyToReply.appendChild(mainReplyToReplyText);\n } else if (obj.replies[i].reply_count <= 1) {\n var mainReplyToReplyText = document.createTextNode(obj.replies[i].reply_count + \" Reply\");\n buttonForMainReplyToReply.appendChild(mainReplyToReplyText);\n }\n\n\n\n\n // Reply to reply column\n // Add a new reply to this column\n var addReplyColumn = document.createElement(\"div\");\n addReplyColumn.classList.add(\"col-12\", \"col-sm-12\", \"col-md-12\", \"col-lg-12\");\n addReplyColumn.setAttribute(\"id\", \"replyToReplyColumn\" + obj.replies[i].reply__reply_id);\n addReplyColumn.setAttribute(\"style\", \"display:none\");\n mainReplyRow.appendChild(addReplyColumn);\n\n // Text area and submit row\n var textSubmitRow = document.createElement(\"div\");\n textSubmitRow.classList.add(\"row\");\n textSubmitRow.setAttribute(\"id\", \"textSubmitRow\");\n addReplyColumn.appendChild(textSubmitRow);\n\n // A new reply text column\n var replyTextColumn = document.createElement(\"div\");\n replyTextColumn.classList.add(\"col-12\", \"col-sm-10\", \"col-md-10\", \"col-lg-10\");\n replyTextColumn.setAttribute(\"id\", \"replyTextColumn\");\n textSubmitRow.appendChild(replyTextColumn);\n\n // Text area for a new reply\n var replyTextArea = document.createElement(\"textarea\");\n replyTextArea.setAttribute(\"rows\", \"3\");\n replyTextArea.classList.add(\"form-control\");\n replyTextArea.setAttribute(\"id\", \"replyToReplyTextArea\" + obj.replies[i].reply__reply_id);\n replyTextColumn.appendChild(replyTextArea);\n\n // Submit button column for a new reply\n var replySubmitColumn = document.createElement(\"div\");\n replySubmitColumn.classList.add(\"col-12\", \"col-sm-2\", \"col-md-2\", \"col-lg-2\");\n replySubmitColumn.setAttribute(\"id\", \"replySubmitColumn\");\n\n textSubmitRow.appendChild(replySubmitColumn);\n\n var fromWhere = \"replyToReply\";\n\n // Submit button for a new reply\n var submitReply = document.createElement(\"button\");\n submitReply.classList.add(\"btn\", \"btn-secondary\", \"btn-block\");\n submitReply.setAttribute(\"id\", \"submitReply\");\n submitReply.setAttribute(\"onclick\", \"addReplyToReply(\" + obj.post.post_id + \",\" + obj.replies[i].reply__reply_id + \",'\" + obj.replies[i].user + \"','\" + localStorage.username + \"')\");\n replySubmitColumn.appendChild(submitReply);\n\n var submitReplyText = document.createTextNode(\"Reply\");\n submitReply.appendChild(submitReplyText);\n\n\n }\n }\n\n}", "function loadPostsAndReplies(forumId){\n\tgetPostsAndReplies(forumId,function(result){\n\t\tif(result != null){\n\t\t\tvar noOfPosts = result.length; \t\t\t\n\t\t\t//console.log('noOfPosts - '+noOfPosts);\n\t\t\t$(\"#noOfPostsInfo\").text(noOfPosts + ' Posts');\t\t\t\n\t\t\tfor (var i=0; i < noOfPosts; i++) {\n\t\t\t\tvar postDescription = result[i].post.description;\n\t\t\t\tvar postCreatedDate = result[i].post.createdDate;\n\t\t\t\tvar noOfPdays = getNoOfDays(postCreatedDate);\n\t\t\t\tvar createdBy = result[i].post.createdBy;\n\t\t\t\tvar creatorName = result[i].postCreatorName;\n\t\t\t\tvar postCreatorInfo = 'By '+creatorName+', '+noOfPdays+' days ago';\n\t\t\t\tvar noOfReplies = result[i].replies.length;\n\t\t\t\tvar replyInfo = noOfReplies + ' Reply(s)';\n\t\t\t\tvar postId = result[i].post.postId;\n\t\t\t\t//console.log('postId - '+ postId + ', noOfReplies -' +noOfReplies +', postCreator - '+creatorName);\n\n\t\t\t\t$(\"#blogs\").append($('<div style=\"text-align:left;\">')\n\t\t\t\t\t\t.append('<div class=\"img1\"><img class=\"img-circle\" src=\"./img/profileIcon.jpg\" width=\"30px\" height=\"30px\"/></div>')\n\t\t\t\t\t\t.append('<div data-toggle=\"collapse\" data-target=\"#demo'+i+'\" class=\"postText\" onclick =\"toggle('+i+');\" id=\"postText\">'+postDescription+'</div> <img data-toggle=\"collapse\" class =\"allreplies\" data-target=\"#demo'+i+'\" src=\"./img/close.png\" onclick =\"toggle('+i+');\" id =\"collapse'+i+'\" title =\"Click to view replies\"/>')\n\t\t\t\t\t\t.append('</br>')\n\t\t\t\t\t\t.append('<div id=\"noOfRepliesInfo\" data-toggle=\"collapse\" data-target=\"#demo'+i+'\" onclick =\"toggle('+i+');\" class=\"noOfRepliesInfo\"><a href\"#\" id =\"replyCount'+i+'\" title =\"Click to view replies\">'+replyInfo+'</a></div>')\n\t\t\t\t\t\t.append('<div id=\"postCreator\" class=\"postCreator\">'+postCreatorInfo+'</div>'))\n\t\t\t\t\t\t.append('</div>'); \n\t\t\t\t$(\"#blogs\").append('<div id=\"demo'+i+'\" class=\"collapse\" style=\"margin-left: 50px\">');\n\t\t\t\t\n\t\t\t\tfor (var j=0; j < noOfReplies; j++) {\n\t\t\t\t\tvar replyDescription = result[i].replies[j].description;\t\t\t\t\t\n\t\t\t\t\t$(\"#demo\"+i).append('<div style=\"text-align:left;\" class =\"postCls\" id=\"replies'+i+'\">'+replyDescription+'</div>');\n\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\t$(\"#demo\"+i).append('<div id=\"comment'+i+'\"><div class=\"replyText\"><input type=\"text\" id =\"newReply'+i+'\" name=\"newReply\" placeholder=\"Reply...\" style=\"color: black;font-size: 15px;font-family: Times New Roman, Georgia, Serif;\"/><input type=\"button\" name=\"reply\" value=\"Send\" onclick=createReply(\"'+postId+'\",\"'+i+'\") class=\"replyBtn\" /></div></div>');\n\t\t\t\t$(\"#blogs\").append('</div>');\t\t\t\n\t\t\t}\n\t\t\t$(\"#blogs\").append('<div class=\"space\"></div>');\n\t\t};\n\t});\n}", "render() {\n\t\t//5. Loop over all of the to do list items now living in state from firebase!\n\t\tlet blogPosts = this.state.blogPosts.map((item, index)=>{\n\t\t\treturn (\n\t\t\t\t<div>\n\t\t\t\t\t<li className=\"list-group-item title\">{item.title}</li>\n\t\t\t\t\t<img className=\"blogImage m-3\" src={item.image}/>\n\t\t\t\t\t<div className=\"blogText\">\n\t\t\t\t\t\t<p className=\" body\">{item.body}</p>\n\t\t\t\t\t</div>\n\t\t\t\t\t<button className=\"btn btn-danger mb-3\" onClick={this.handleDelete}>Delete</button>\n\t\t\t\t</div>\n\t\t\t)\n\n\t\t});\n\n\n\t\treturn (\n\t\t\t<div className=\"container\">\n\t\t\t\t<div className=\"row justify-content-center\">\n\t\t\t\t\t<div className=\"col-10\">\n\t\t\t\t\t\t<h1 className=\"bg-light m-3 p-3\">Blog</h1>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"row\">\n\t\t\t\t\t\t<div className=\"col-3\">\n\t\t\t\t\t\t\t<input className=\"m-3\" onChange={this.titleChange} placeholder=\"Enter title here\"/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"col-3\">\n\t\t\t\t\t\t\t<input className=\"m-3\" onChange={this.imageChange} placeholder=\"Enter Image Address\"/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"col-5\">\n\t\t\t\t\t\t\t<button className=\"btn btn-primary m-2\" onClick={this.handleClick}>Submit</button>\n\t\t\t\t\t\t\t<button className=\"btn btn-danger m-2\" onClick={this.deleteAll}>Delete All Posts</button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"row\">\n\t\t\t\t\t\t<div className=\"col-10\">\n\t\t\t\t\t\t\t<textarea className=\"bodyText\" type=\"textarea\" placeholder=\"Enter Blog Post Here...\" onChange={this.handleChange}/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\n\n\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div className=\"col-12\">\n\t\t\t\t\t\t<h1 className=\"bg-light m-3 p-3\">Previous Posts</h1>\n\t\t\t\t\t\t\t{blogPosts}\n\t\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t);\n\t}", "function prep() {\n $.ajax({\n url: '/api/news/',\n method: 'GET',\n success: function (feed) {\n //$('#newsfeedPost').html(\"\");\n\n if (feed.length === 0) {\n $('#nothingHereFeed').css(\"display\", \"block\")\n }\n\n for (var i = 0; i < feed.length; i++) {\n var length = 50;\n var text = feed[i].post_text.split(\" \");\n var short = \"\";\n var rest = \"\";\n for (var j = 0; j < length && j < text.length; j++) {\n short += text[j] + \" \";\n }\n for (var k = j; k < text.length; k++) {\n rest += text[k] + \" \";\n }\n a = new Date(feed[i].posted_datetime);\n testy = a.toDateString();\n $('#newsfeedPost').append(homeFeedPost({\n name: feed[i].forename + (feed[i].middlename ? ' ' + feed[i].middlename : '') + ' ' + feed[i].lastname,\n payload: ((feed[i].attachment_type === 1) ? '/api/news/data/' + feed[i].post_id : ''),\n groupname: feed[i].group_name,\n text: short,\n rest_text: rest,\n image_url: '/api/user/' + feed[i].person_id + '/picture_tiny',\n data: 'data-id=\"' + feed[i].post_id + '\"',\n datetime: testy,\n lang_read_more: \"Read more...\"\n }));\n\n if(k <= length) {\n $(\"#newsfeedPost div[data-id=\" + feed[i].post_id + \"] a\").hide();\n } else {\n $(\"#newsfeedPost div[data-id=\" + feed[i].post_id + \"] a\").click(function(){\n\n $(this).closest(\"div\").find(\"span\").show();\n $(this).remove();\n });\n }\n\n }\n }\n });\n}", "function generatePosts(dataArr, dest) {\n dest.innerHTML = dataArr\n .map(\n (post) => `\n <div class=\"card m-2 \">\n <div class=\"card-header\">Author: ${post.author}</div>\n <div class=\"card-body\">\n <h5 class=\"card-title\">${post.title}</h5>\n <a href=\"single-posts.html?postId=${post.postId}\" class=\"btn btn-primary btn-sm\">See more</a>\n <button data-postid='${post.postId}' class=\"btn btn-sm btn-danger delete-post\">Delete</button>\n </div>\n <div class=\"card-footer\">Time ${post.timeStamp}</div>\n </div>\n `,\n )\n .join('');\n}", "function displayCreatedPosts(){\n //outputing the rows of posts\n let display_table = document.getElementById(\"tableDisplayRow\");\n let output_rows = \"<table class='pure-table' id='historyTable'><thead><th>Post Id</th><th>Post Title</th><th>Post link</th></thead><tbody>\";\n for (let i = 0; i < created_posts.length; i++){\n let post = created_posts[i];\n output_rows += \"<tr><td>\" + post.id + \"</td><td> \" + post.title + \" </td><td>\";\n output_rows += `<div> <button class='btn btn-primary' id='more_btn' onclick=\"transfer_admin_post('${post.id}');\"> View More </button> </div>`;\n output_rows += \"</td></tr>\";\n\n }\n\n output_rows += \"</tbody></table>\";\n display_table.innerHTML = output_rows;\n}", "function populatePosts() {\n $.ajax({\n // sends a request to get the posts from the db\n url: \"/get/posts\",\n method: \"GET\",\n success: function(result) {\n // updates text with result from request\n results = JSON.parse(result);\n let displayedResult = '';\n // iterates through each post and adds it to the result\n for (i in results) {\n displayedResult += generatePosts(results[i], i);\n }\n // sets the inner html to the posts html generated in generatePosts()\n postsContent.innerHTML = displayedResult;\n }\n });\n}", "function makePost(postData) {\n let postList = document.getElementById(\"post-list\");\n let container = document.createElement(\"div\");\n container.id = postData.title;\n let postTitle = postData.title;\n let postContent = postData.content;\n let postDate = postData.date;\n\n container.innerHTML = `\n <h2>${postTitle} ${postDate}</h2>\n <p>${postContent}</p>\n `;\n\n let editBtn = document.createElement(\"button\");\n editBtn.innerHTML = \"Edit\";\n editBtn.type = \"button\";\n editBtn.id = \"edit:\" + postTitle;\n editBtn.addEventListener(\"clicked\", editPost);\n container.appendChild(editBtn);\n\n let deleteBtn = document.createElement(\"button\");\n deleteBtn.innerHTML = \"Delete\";\n deleteBtn.type = \"button\";\n deleteBtn.id = \"delete:\" + postTitle;\n editBtn.addEventListener(\"clicked\", deletePost);\n container.appendChild(deleteBtn);\n\n postList.appendChild(container);\n console.log(\"make post\");\n}", "function loadBlogPosts() {\n console.log(`loading...`);\n fetchPosts().then((data) => {\n removeLoadingState();\n appendPosts(data.items);\n });\n}", "function getPosts() {\n $.get('/api/posts/', function (data) {\n var postsToAdd = [];\n for (var i = 0; i < data.length; i++) {\n\n newPost = data[i];\n\n postsToAdd.push(createPostDiv(newPost));\n renderPost(postsToAdd);\n }\n });\n }", "function postBlog(){\n\tvar postContent = document.getElementById('ripple-put-blog').value.trim();\n\n\tif(postContent === undefined || postContent.length === 0){\n\t\talert('Please enter something to post');\n\t\treturn;\n\t}\n\n\tvar postBlogxhrq = new XMLHttpRequest();\n\tvar postBlogURL = 'http://127.0.0.1:3000/postBlog';\n\tvar contentSection = document.getElementById('sub-content-content');\n\tvar postHTML = '<p class=\"ripple-post-date\">{%PostDate%}</p>' + \n\t\t\t\t '<p class=\"ripple-post-content\">{%PostContent%}</p>' + \n\t\t\t\t '<p class=\"ripple-post-likes\">{%PostLikes%} Likes</p>';\n\tvar enterPost = '<textarea class=\"ripple-put-blog\" id=\"ripple-put-blog\"></textarea>' + \n\t\t\t\t '<button class=\"common-btn ripple-post-btn\" id=\"ripple-post-btn\">Post</button>';\n\n\t// get current date\n\tvar today = new Date();\n\tvar dd = today.getDate();\n\tvar mm = today.getMonth()+1;\n\tvar yyyy = today.getFullYear();\n\n\tif(dd<10) dd = '0' + dd;\n\tif(mm<10) mm = '0' + mm;\n\n\ttoday = yyyy + '-' + mm + '-' + dd;\n\n\tvar newPost = {};\n\tnewPost['userID'] = sessionStorage.getItem('user_id');\n\tnewPost['content'] = postContent;\n\tnewPost['date'] = '' + today;\n\tnewPost['like'] = 0;\n\n\tpostBlogxhrq.open('post', postBlogURL, true);\n\tpostBlogxhrq.onreadystatechange = function(){\n\t\tif(postBlogxhrq.readyState === XMLHttpRequest.DONE){\n\t\t\tvar resMsg = JSON.parse(postBlogxhrq.responseText);\n\t\t\tif(resMsg['message'] === 'good'){\n\t\t\t\talert('Add a New Entry!');\n\t\t\t\tpostHTML = postHTML.replace('{%PostDate%}', today);\n\t\t\t\tpostHTML = postHTML.replace('{%PostContent%}', postContent);\n\t\t\t\tpostHTML = postHTML.replace('{%PostLikes%}', 0);\n\n\t\t\t\tvar newLi = document.createElement('li');\n\t\t\t\tnewLi.innerHTML = postHTML;\n\n\t\t\t\tvar postArea = document.getElementById('ripple-post-area');\n\t\t\t\tcontentSection.removeChild(postArea);\n\t\t\t\tcontentSection.appendChild(newLi);\n\n\t\t\t\tvar enterDiv = document.createElement('div');\n\t\t\t\tenterDiv.setAttribute('id', 'ripple-post-area');\n\t\t\t\tenterDiv.innerHTML = enterPost;\n\n\t\t\t\tcontentSection.appendChild(enterDiv);\n\t\t\t}else{\n\t\t\t\talert('New Post Failed!');\n\t\t\t}\n\n\t\t}\n\t};\n\tpostBlogxhrq.send(JSON.stringify(newPost));\n}", "function handlePostDelete() {\n\n var currentId = $(this).attr(\"entryID\");\n\n deletePost(currentId);\n }", "function getPost(sub) {\n dataBase.ref(\"Posts/\" + sub).once('value', function (data) {\n //if there are no posts in the database under the category then say there are no posts\n if(data.numChildren() === 0)\n insertNoPost(sub)\n else{\n //keep track of how many of the elements in this category are hidden\n var hiddenCount = 0\n //for each post in this category grab all the data out out it\n data.forEach(function (childSnapshot) {\n var childData = childSnapshot.val();\n var postID = childSnapshot.key;\n var question = childData.question;\n var description = childData.description;\n var bounty = childData.bounty;\n var category = childData.category;\n var visibility = childData.visibility;\n var displayName = childData.displayName;\n var myUid = childData.uid;\n\n //If the post is listed as visible in the database then display it to the page\n if(visibility == 'visible'){\n //create the html to be injected\n var html = [\n '<div class=\"post_topbar\">',\n '<div class=\"usy-dt\">',\n '<div class=\"usy-name\">',\n '<h3>',displayName,'</h3>',\n '<span>$',bounty,'</span>',\n '</div>',\n '</div>',\n '<div class=\"ed-opts\">',\n '<a href=\"#\" title=\"\" class=\"ed-opts-open\"><i class=\"la la-ellipsis-v\"></i></a>',\n '<input id=\"button',postID,'\" type=\"button\" value=\"Claim Bounty\" onclick=\"openChatPage(\\'',postID,'\\');\" style=\"float:right; background-color: green; color: white; height: 25px; width: 100px; border: none;\"></input>',\n '<ul class=\"ed-options\">',\n '<li><a href=\"#\" title=\"\">Edit Post</a></li>',\n '<li><a href=\"#\" title=\"\">Unsaved</a></li>',\n '<li><a href=\"#\" title=\"\">Unbid</a></li>',\n '<li><a href=\"#\" title=\"\">Close</a></li>',\n '<li><a href=\"#\" title=\"\">Hide</a></li>',\n '</ul>',\n '</div>',\n '</div>',\n '<div class=\"job_descp\">',\n '<h3>',question,'</h3>',\n '<p>',description,'</p>',\n '</div>'\n ].join('');\n var div = document.createElement('div');\n div.setAttribute('class', 'post-bar');\n div.setAttribute('id', postID);\n div.innerHTML = html;\n //add the div with the html elements inside to the posts section of the page\n document.getElementById('posts-section').appendChild(div);\n }\n //Increment count of hidden items\n else{hiddenCount++}\n\n //If all posts within the category are hidden, then display that there are\n //currently no posts for that category\n if(data.numChildren() === hiddenCount)\n insertNoPost(sub)\n });\n }\n });\n}", "function getProfPosts() {\n var posts_length,\n myPostMold;\n $.ajax({\n url: site_host + \"posts/myposts\",\n type: \"post\",\n data: {\n ajax: true\n },\n dataType: \"json\",\n success: function (response) {\n posts_length = response.data.length;\n if (posts_length === 0) {\n // ther is no posts\n $('#main-posts > .loader').hide();\n alert(\"There is no Posts\");\n return;\n }\n for (count_posts; count_posts < posts_length; count_posts += 1) {\n $('#main-posts > .loader').before(createPostMold());\n myPostMold = $(\".publication_mold\");\n myPostMold.last().find(\".module_teacher h3\").html(response.data[count_posts].title);\n myPostMold.last()\n .find(\".module_teacher .time_pub\").html(response.data[count_posts].date_parsed);\n myPostMold.last()\n .find(\".module_teacher .module_name\").html(response.data[count_posts].type_parsed);\n myPostMold.last()\n .find(\".publication_body p\").html(response.data[count_posts].text_post);\n myPostMold.last().attr(\"data-target\", response.data[count_posts]._id_post);\n\n // change Save to Delete \n myPostMold.last().find(\".publication_body .react-bar li .save-post\")\n .removeClass('save-post').addClass('delet-post').attr('title', 'Supprimer');\n myPostMold.last().find(\".publication_body .react-bar li .delet-post\")\n .children(\"i.fa\").attr(\"class\", \"fa fa-trash fa-2x\");\n }\n $('#main-posts > .loader').hide();\n },\n complete: function () {\n autosize();\n }\n });\n }", "function getAllPosts(num){\n var userID = \"5\";\n $.ajax({\n url: postsURL + userID,\n type: 'GET',\n contentType: 'application/json',\n success: function (res) {\n var i = res.length-1;\n for(i ; i >= 0 ; i--){\n var postData = res[i];\n var dateObj = postData.date.split(\" \");\n var currentPost = \"<div class='post'>\"+\n \"<div class='image'>\"+\n \"<img src='images/profiles/user.jpeg' alt=''>\"+\n \"</div>\"+\n \"<div class='post-content'>\"+\n \"<div class='text'>\"+\n \"<h6 class='name second-color'>\"+postData.name+\"<span class='date'>\"+dateObj[0].substr(0,dateObj[0].lastIndexOf(\"/\"))+\"<i class='dot'></i>\"+dateObj[1].substr(0,dateObj[1].lastIndexOf(\":\"))+\"</span></h6>\"+\n \"<p>\"+postData.text+\"</p>\"+\n \"<span class='hr'></span>\"+\n \"</div>\"+\n \"<div class='votes'>\"+\n \"<div class='up'>\"+\n \"<i class='fas fa-chevron-up disabled'></i>\"+\n \"<span>\"+postData.votesUp+\"</span>\"+\n \"</div>\"+\n \"<div class='down'>\"+\n \"<span>\"+postData.votesDown+\"</span>\"+\n \"<i class='fas fa-chevron-down disabled'></i>\"+\n \"</div>\"+\n \"</div>\"+\n \"<div class='comments btn' data-toggle='modal' data-target='#comments' data-postid=\"+postData._id+\">\"+\n \"<span onclick=getAllComments('\"+postData._id+\"','0')>Comments</span>\"+\n \"</div>\"+\n \"</div>\"+\n \"</div>\";\n if(num==-1){\n $(\".profile .posts\").prepend(currentPost);\n break;\n }\n $(\".profile .posts\").append(currentPost);\n }\n },\n error: function () {\n alert(\"Something Went Wrong!!\");\n },\n });\n }", "function postToPage(sheet) {\n // cut down the sheet to only the last X rows\n var sheetLastX = sheet.slice(-postsToShow);\n\n var postsEl = document.getElementById('js-posts-container');\n\n // create the content we'll write to the page\n var postContent = document.createElement('div');\n postContent.setAttribute('id', 'js-posts');\n \n // loop through the last X rows most recent first (ie, process the sheet bottom up)\n for (var i = sheetLastX.length - 1; i >= 0; --i) {\n // sheet is an array of objects, row is an object\n var row = sheetLastX[i];\n // go generate the post html for this row\n var post = generatePost(row);\n // add that post to our content\n postContent.appendChild(post);\n }\n // write once to the page\n postsEl.appendChild(postContent);\n }", "function renderBlogposts() {\n\n let $sideBlogList = $(`\n <div class=\"side-blog-list\">\n <ul>\n </ul>\n </div>\n `);\n\n function addBlogToList(model) {\n let $liContainer = $(`\n <li>\n <h2>${model.get('username')}</h4>\n <h3>${model.get('title')}</h3>\n <p>${model.get('body')}</p>\n </li>\n `);\n $sideBlogList.find('ul').append($liContainer);\n }\n\n\n blogCollection.forEach(addBlogToList);\n blogCollection.on('add', addBlogToList);\n blogCollection.fetch();\n\n let $sideBlog = $(`\n <ul id=\"single-blog\">\n <li>\n\n <li>\n </ul>\n `);\n\n\n\n\n return $sideBlogList;\n}", "function generatePostDeleteButtons() {\n var posts = document.getElementsByClassName(\"post-header-btn-row\");\n // iterate through posts adding delete buttons\n for (var i = 0; i < posts.length; i++) {\n var delBtn = document.createElement(\"button\");\n delBtn.classList.add(\"btn\", \"delete-post-btn\", \"c-btn\");\n delBtn.setAttribute(\"data-toggle\", \"tooltip\");\n delBtn.setAttribute(\"data-placement\", \"right\");\n delBtn.setAttribute(\"title\", \"Slett inlegg\");\n var icon = document.createElement(\"i\");\n icon.className = \"fa fa-trash\";\n icon.setAttribute(\"aria-hidden\", \"true\");\n delBtn.appendChild(icon);\n posts[i].appendChild(delBtn);\n\n delBtn.addEventListener(\"click\", function() {\n var post_id = this.parentElement.parentElement.id;\n deletePost(post_id);\n });\n }\n\n // In the starting state, the event listener leads to generating the buttons.\n // Now after it is clicked (buttons generated), we remove that event listener function.\n document.getElementById(\"delete-news\").removeEventListener(\"click\", generatePostDeleteButtons);\n // Instead, we add an event listener to remove all these 'delete' buttons on the next click\n document.getElementById(\"delete-news\").addEventListener(\"click\", removePostDeleteButtons);\n\n // delete all button\n var deleteAllBtn = document.createElement(\"button\");\n deleteAllBtn.className = \"btn btn-danger\";\n deleteAllBtn.id = \"delete-all-posts-btn\";\n deleteAllBtn.setAttribute(\"data-toggle\", \"tooltip\");\n deleteAllBtn.setAttribute(\"data-placement\", \"bottom\");\n deleteAllBtn.setAttribute(\"title\", \"Slett alle innlegg.\");\n\n deleteAllBtn.addEventListener(\"click\", deleteAllWithConfirm);\n\n var globe_icon = document.createElement(\"i\");\n globe_icon.className = \"fa fa-globe\";\n globe_icon.setAttribute(\"aria-hidden\", \"true\");\n deleteAllBtn.appendChild(globe_icon);\n document.getElementById(\"news-advanced-functions\").appendChild(deleteAllBtn);\n}", "function deletePost(blogID) \n {\n swal({\n title: \"Attention\",\n text: \"Are you sure you want to delete this post?\",\n type: \"warning\",\n showCancelButton: true,\n confirmButtonColor: \"#DD6B55\",\n confirmButtonText: \"Yes!\",\n cancelButtonText: \"No!\"\n /*closeOnConfirm: false,\n closeOnCancel: false*/\n }).then(function(result){\n\n if (result.value) \n {\n //name vairables\n var table = $('#posts');\n blockUI(); \n\n $.ajax({\n type: 'DELETE',\n url: `${API_URL_ROOT}/blog/${blogID}`,\n dataType: 'json',\n headers: {'x-access-token':token},\n success: function(response)\n {\n if(response.error == false)\n {\n unblockUI();\n showSimpleMessage(\"Success\", response.message, \"success\");\n table.DataTable().ajax.reload(null, false) \n }\n else\n {\n unblockUI();\n showSimpleMessage(\"Attention\", response.message, \"error\");\n }\n },\n error: function(req, status, error)\n {\n unblockUI();\n showSimpleMessage(\"Attention\", \"ERROR - \"+req.status+\" : \"+req.statusText, \"error\");\n }\n });\n } \n else \n {\n showSimpleMessage('Canceled', 'Process Abborted', 'error');\n }\n });\n }", "function displayPostsDOM(posts) {\n posts.forEach((post) => {\n appendPostDOM(post);\n });\n}", "function posts(arr) {\n let postApi = arr.filter((el) => el.userId == id);\n postApi.forEach(element => {\n fragmentPost.appendChild(renderPosts(element));\n });\n elPostListWrapper.appendChild(fragmentPost)\n }", "function deletePost (x) {\r\n let id = x.parentElement.parentElement.id\r\n\r\n let post = {id}\r\n\r\n let stringfiedPost = JSON.stringify(post)\r\n\r\n const options = {method:\"DELETE\", \r\n headers: new Headers({'content-type': 'application/json'}),\r\n body: stringfiedPost \r\n }\r\n fetch(ip+\"/api/erase\", options)\r\n .then(handleErrors)\r\n .then((res)=>{\r\n updatePosts()\r\n }).catch((error) => {console.log(error);errorMessage();})\r\n\r\n}", "getContentBlog(callback){\n let me = this,\n cfg = me.cfg,\n url = cfg.blogUrl,\n options = {\n url:url,\n headers:me.headers\n },\n request = me.request,\n cheerio = me.cheerio,\n log = me.log,\n blogPosts = []\n request(options,(err,res,body)=>{\n log(res.headers)\n let $ = cheerio.load(body)\n var posts = $('.date-posts')\n // log(posts.length)\n // this.inspectPost(posts.eq(0).html())\n for(let i = 0 ; i < posts.length; i++){\n blogPosts.push(this.inspectPost(posts.eq(i).html()))\n }\n // blogPosts.forEach(p => {\n // log(p.postTitle)\n // log(p.postLink)\n // log(p.postContent)\n // })\n callback(blogPosts)\n })\n }", "function loadPosts() {\n const postsCollection = firebase.firestore().collection(\"postagens\");\n container.querySelector(\"#lista-feed\").innerHTML = \"Carregando...\";\n postsCollection.get().then((querySnapshot) => {\n container.querySelector(\"#lista-feed\").innerHTML = \"\";\n querySnapshot.forEach((doc) => {\n const post = { id: doc.id, data: doc.data() };\n const componente = postTemplate(post);\n console.log(componente)\n container.querySelector(\"#lista-feed\").appendChild(componente);\n });\n });\n }", "function loadBlogPage(index) {\n console.log('loadBlogPage INITIATED')\n $postList.innerHTML = '';\n index = Number(index || 0);\n httpGetAsync('blogIndex/' + index, function(data) {\n var data = JSON.parse(data);\n for (i in data) {\n localBlogCache[i] = localBlogCache[i] || data[i]; // store locally if not cached\n // cut it short for preview and add the button under it to load that specific blog post fully with comments\n $postList.innerHTML += data[i].slice(0, data[i].indexOf('<CUT>')) + '</div></div>' + makeShowPostButton(i);\n }\n });\n}", "function getPosts() {\n const data = { channel_id: currentChannelId, last_id: lastId };\n\n fetch('api/getPostsByChannel.php',\n {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(data),\n }\n )\n .then(response => response.json())\n .then(data => {\n console.log(data);\n\n for (i = 0 ; i < data.length ; i++) {\n body = data[i]['body'];\n author = data[i]['author'];\n lastId = data[i]['id'];\n\n document.getElementById('posts').insertAdjacentHTML('beforeend', '<div><span class=\"name\">'+ author +'</span> : '+ body +'</div>');\n }\n });\n}", "function deletePost(id) {\n // console.log(id)\n $.ajax({\n method: \"DELETE\",\n url: \"api/private/\" + id\n })\n .then(function() {\n getPosts() // show me posts after deleting\n\n });\n }", "function loadMainPostList(position) {\n\n // Check to ensure the main posts should be displayed\n if ($('#mainpostlist').length > 0) {\n\n // Check to see if the position is the start or the end\n if (position == 0) {\n position = 0;\n } else {\n position = $('#mainpostlist').children().size();\n }\n\n // Build the request object\n var listData = new Object();\n listData.start = position;\n listData.size = numberOfPostsToLoad;\n\n // Convert the object to json\n var query = JSON.stringify(listData);\n\n // Request the list of posts\n $.ajax({\n type: \"POST\",\n url: \"listposts.php\",\n dataType: \"json\",\n data: { json: query },\n success: function (data) {\n\n // Get the response data\n var response = data;\n\n // Check to see the response status\n if (response.status == 0 || response.status == -1) {\n\n // No additional posts\n displayMessage(\"No more posts are currently available\", 3);\n } else {\n\n // Get the posts\n var posts = response.posts;\n\n // Loop through the posts\n for (var i = 0; i < posts.length; i++) {\n\n // Setup the initial post details\n var element = 'post' + posts[i].id;\n var posthold = $('<div id=\"' + element + '\" class=\"post\"><div>');\n\n // Check to ensure that the post does not already exist\n if ($('#' + element).length == 0) {\n\n var post = '';\n\n // Check to see if the post type a text post\n if (posts[i].type == 4) {\n post += '<h2><a href=\"./view.php?post=' + posts[i].id + '\">' + posts[i].title + '</a></h2><p>' + posts[i].details.replace(/[\\r\\n]/g, \"<br />\") + '</p>';\n post += '<span class=\"footer\">Written by ' + posts[i].author + '&nbsp;</span>&nbsp;<span class=\"formatteddate\">0 seconds</span><span>&nbsp;ago</span>';\n post += '<span class=\"footer\">&nbsp;and filed under ' + posts[i].categoryname + '</span>';\n post += '<span class=\"comments\">' + posts[i].comments + '</span>';\n } else if (posts[i].type == 8) {\n post += '<h2><a href=\"./view.php?post=' + posts[i].id + '\">' + posts[i].title + '</a></h2><img src=\"./previewimage.php?f=' + posts[i].filename + '\" class=\"image\" /><p>' + posts[i].details.replace(/[\\r\\n]/g, \"<br />\") + '</p>';\n post += '<span class=\"footer\">Written by ' + posts[i].author + '&nbsp;</span>&nbsp;<span class=\"formatteddate\">0 seconds</span><span>&nbsp;ago</span>';\n post += '<span class=\"footer\">&nbsp;and filed under ' + posts[i].categoryname + '</span>';\n post += '<span class=\"comments\">' + posts[i].comments + '</span>';\n }\n post += '<div class=\"postid\">' + posts[i].id + '</div>';\n post += '<div class=\"posttype\">' + posts[i].type + '</div>';\n post += '<div class=\"postdate\">' + posts[i].dateposted + '</div>';\n post += '<div class=\"clear\"></div>';\n\n // Format the date\n formatDate(posts[i].dateposted);\n\n // Add the post to the screen\n post = $(post);\n\n // Determine the position to add the element\n var insertPosition = determinePostInsertPosition(posts[i].dateposted);\n\n // Check to see if the element is null and the new element should be added to the bottom\n if (insertPosition == null) {\n\n // Add the post to the screen\n $(posthold).hide().appendTo('#mainpostlist').fadeIn(2000);\n $(posthold).append(post);\n } else {\n\n // Add the post to the screen in the correct position\n $(insertPosition).before($(posthold));\n $(posthold).append(post);\n }\n } else {\n\n }\n }\n\n // Update the date and time on the posts\n updateDateTime();\n\n // Set the timer to update the date time in the post footer if not set\n if (timeOut == null) {\n timeOut = setInterval(function () { updateDateTime() }, 1000);\n }\n }\n }\n });\n }\n}", "function renderPost(post){ //here we pass an object with post parameters needed to render the post\n //creating new elements of the layout\n var postContainer = document.createElement('div'),\n postTitle = document.createElement('h1'),\n postPicture = document.createElement('img'),\n postLink = document.createElement('a'),\n postDescription = document.createElement('p'),\n postPublicationDate = document.createElement('p');\n\n //setting proper attributes to the html tags of the layout\n postContainer.className = \"single-post \"; // here you can add bootstrap classes\n postTitle.innerHTML = post.title;\n postLink.setAttribute('href', post.link);\n postLink.setAttribute('target', '_blank');\n postLink.className = 'thumbnail'; // bootstrap thumbnail class\n postPicture.src = post.imgSrc;\n postDescription.innerHTML = post.description;\n postPublicationDate.innerHTML = \"Published: \" + post.date;\n\n\n //Appending elements to the DOM\n postLink.appendChild(postTitle);\n postLink.appendChild(postPicture);\n postLink.appendChild(postDescription);\n postLink.appendChild(postPublicationDate);\n postContainer.appendChild(postLink);\n document.getElementsByClassName('widget-container')[0].appendChild(postContainer);\n}", "function createBlogPost(client, id, blogPost, callBack){\n client.HSET('posts', id, JSON.stringify(blogPost), callBack)\n}", "async function showPosts() {\n const posts = await getPosts();\n\n posts.forEach((post) => {\n const postEl = document.createElement(\"div\");\n postEl.classList.add(\"post\");\n postEl.innerHTML = `\n <div class=\"post-number\">${post.id}</div>\n <div class=\"post-info\">\n <h2 class=\"post-title\">${post.title}</h2>\n <div class=\"post-body\">${post.body}</div>\n </div>\n `;\n postsContainer.appendChild(postEl);\n // The Node.appendChild() method adds a node to the end of the list of children of a specified parent node.\n // The fetch() method takes one mandatory argument, the path to the resource you want to fetch.\n // It returns a Promise that resolves to the Response to that request, whether it is successful or not\n });\n}", "function generatePosts(postObj, i){\n var str = '';\n // the 'i' is used to differentiate each div to help locate specific posts\n str += '<div class=\"postDiv\" id=\"postDiv' + i + '\">';\n str += '<h2 id=\"getTitle' + i + '\">' + postObj.Title + '</h2>';\n str += '<div id=\"getContent' + i + '\">' + postObj.Content + '</div>';\n str += '<br><br>';\n str += '<div id= \"actionBar' + i + '\">';\n // comment, like, and share buttons\n str += '<span id=\"Comment' + i + '\">';\n str += '<input type = \"text\" name = comment id = \"getCommentText' + i + '\"/>';\n str += '<input type=\"button\"value=\"Comment\"onclick=\"comment(this);\" id = \"commentButton' + i + '\">';\n str += '</span>';\n str += '<br><span id=\"Like' + i + '\">';\n str += '<input type=\"button\" value=\"Like\" onclick=\"like(this);\">';\n str += ' ' + postObj.Likes.length + ' Likes';\n str += '</span>';\n str += '<br><span id=\"Share' + i + '\">';\n str += '<input type=\"button\" value=\"Share\" onclick=\"share(this);\">';\n str += '</span>';\n str += '</div>';\n str += '<br>';\n str += '<div>Comments:</div>';\n str += '<br>';\n // adds the comments\n for (j in postObj.Comments) {\n str += '<div id=commentDiv>' + postObj.Comments[j].Content+ '</div>';\n }\n str += '</div>';\n // returns completed html\n return str;\n}", "function paginate(posts, rows_per_page, currentPage) {\n postContainer.innerHTML = \"\";\n currentPage--;\n let start_index = currentPage * rows_per_page;\n let end_index = start_index + rows_per_page;\n\n let posts_per_page = posts.slice(start_index, end_index);\n\n displayPostsDOM(posts_per_page);\n}", "function getStdPosts() {\n var posts_length,\n myPostMold;\n $.ajax({\n url: site_host + \"posts/all\",\n type: \"post\",\n data: {\n _id_student: user_id,\n ajax: true\n },\n dataType: \"json\",\n success: function (response) {\n posts_length = response.data.length;\n if (posts_length === 0) {\n // ther is no posts\n $('#main-posts > .loader').hide();\n alert(\"There is no Posts\");\n return;\n }\n for (count_posts; count_posts < posts_length; count_posts += 1) {\n $('#main-posts > .loader').before(createPostMold());\n myPostMold = $(\".publication_mold\");\n myPostMold.last().find(\".module_teacher h3\").html(response.data[count_posts].fullName);\n myPostMold.last()\n .find(\".module_teacher .time_pub\").html(response.data[count_posts].date_parsed);\n myPostMold.last()\n .find(\".module_teacher .module_name\").html(response.data[count_posts].title);\n myPostMold.last()\n .find(\".publication_body p\").html(response.data[count_posts].text_post);\n myPostMold.last().attr(\"data-target\", response.data[count_posts]._id_post);\n if (response.data[count_posts].saved == 1) {\n myPostMold.last().find(\".react-bar .save-post\").attr(\"title\", \"Sauvegardé\")\n\n myPostMold.last().find(\".react-bar .save-post\")\n .children(\"i\").removeClass(\"fa-bookmark\");\n\n myPostMold.last().find(\".react-bar .save-post\")\n .children(\"i\").addClass(\"fa-check\");\n myPostMold.last().find(\".react-bar .save-post\")\n .removeClass(\"save-post\");\n }\n }\n $('#main-posts > .loader').hide();\n },\n complete: function () {\n autosize();\n }\n });\n }", "function createPost(doc) {\n// creates the elements \n // creates a new div for the container aka. creates the post box\n var post = document.createElement(\"div\");\n // create an img element\n var img = document.createElement(\"img\");\n // create a p element for the caption\n var caption = document.createElement(\"p\");\n // create a p element for the x \n var x = document.createElement(\"p\");\n// set the inputs into the elements\n // img element\n img.src = doc.data().image;\n // caption element\n caption.innerHTML = doc.data().caption;\n // x element\n x.innerHTML = \"x\";\n// connect caption and img to post and then post to container\n post.appendChild(x);\n post.appendChild(img);\n post.appendChild(caption);\n document.getElementById(\"container\").appendChild(post);\n// adding classes to elements\n post.classList.add(\"post\");\n img.classList.add(\"image\");\n caption.classList.add(\"caption\");\n x.classList.add(\"x\");\n// remove the post when clicked\n var post_id = doc.id;\n post.id = post_id;\n\n x.addEventListener(\"click\", function() { \n document.getElementById(post_id).remove();\n db.collection(\"posts\").doc(post.id).delete();\n });\n}", "function loadPosts(array) {\n\tvar container = document.getElementById(outerDiv);\n\t\n\tfor (var i = 0; i < array.length; i++) {\n\t\tvar entry = array[i];\n\t\tvar article = \"\";\n\t\tvar thumbs = \"\";\n\t\t\n\t\t//Checks if an article is present\n\t\tif (entry.article.displayName) {\n\t\t\tarticle = '<div class=\"link\"><a class=\"title\" href=\"' + \n\t\t\t\tentry.article.url + '\">' +\n\t\t\t\tentry.article.displayName + '</a><p>' +\n\t\t\t\tentry.article.content + '</p></div>';\n\t\t}\n\t\t\n\t\t//Checks if a image, album, or video is present\n\t\tif (entry.thumbnails.length > 0) {\n\t\t\tconsole.log(i);\n\t\t\tthumbs = '<div class=\"attachments\">';\n\t\t\tfor (var k = 0; k < entry.thumbnails.length; k++) {\n\t\t\t\tthumbs += '<a href=\"' + entry.thumbnails[k].link +\n\t\t\t\t'\"><img src=\"' + entry.thumbnails[k].url + '\">';\n\t\t\t}\n\t\t\tthumbs += '</div>';\n\t\t}\n\t\t\n\t\t// If you would like to use abbreviated month names, change the array to:\n\t\t// [ \"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \n\t\t//\t\"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\" ]\n\t\tvar monthNames = [ \"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \n\t\t\t\"July\", \"August\", \"September\", \"October\", \"November\", \"December\" ];\n\t\t\n\t\t//Turns the data into an article div. You can change this if you want a different output\n\t\tcontainer.innerHTML += '<article>' +\n\t\t\tentry.body + article + thumbs +\n\t\t\t'<a class=\"ar-footer\" href=\"' + entry.url + '\">' + '<span class=\"date\">' + \n\t\t\tmonthNames[entry.date.getMonth()] + ' ' + entry.date.getDate() + ', ' +\n\t\t\tentry.date.getFullYear() + '</span> <span class=\"plusone\">+' + entry.plusones + \n\t\t\t'</span> <span class=\"comments\">' + entry.comments + \n\t\t\t' Comments</span> <span class=\"reshares\">' + entry.reshares + ' Reshares</span></a>' + \n\t\t\t'<a class=\"author\" href=\"' + entry.author.url + '\">By ' + entry.author.name + '</a>';\n\t}\n}", "function getPosts(author) {\n authorId = author || \"\";\n if (authorId) {\n authorId = \"/?author_id=\" + authorId;\n }\n $.get(\"/api/posts\" + authorId, function(data) {\n console.log(\"Posts\", data);\n posts = data;\n if (!posts || !posts.length) {\n displayEmpty(author);\n }\n else {\n initializeRows();\n }\n });\n }", "function createPost(id, title, body, date) { \n var post = [`<div class=\"post-preview\">`,\n `<h2 class=\"post-title\">${title}</h2>`,\n `<p class=\"post-subtitle\">${body}</p>`, \n `<p class=\"post-meta\">Posted at ${date}`,\n `<a href=\"javascript:edit(${id})\" class=\"btn\"><span class=\"glyphicon glyphicon-pencil\"></span></a>`,\n `<a href=\"javascript:del(${id})\" class=\"btn\"><span class=\"glyphicon glyphicon-trash\"></span></a></p>`,\n `</div>`,\n `<hr>`].join(\"\\n\")\n return post;\n}//E N D function createPost", "function listPreviousPosts() {\n previousPosts.innerHTML = \"\"\n\n db.collection(\"posts\").orderBy(\"date\").get().then((snapshot) => { \n snapshot.forEach((doc) => {\n let post = doc.data()\n let postDetail =\n `<div class=\"postListPosts\">\n <div class=\"postListImage\"> <img src=${post.image}></img></div>\n <div class=\"postListPosting\"> ${post.name}: ${post.message} </div>\n </div>`\n \n previousPosts.insertAdjacentHTML(\"afterbegin\", postDetail)\n })\n \n })\n}", "function post_format(data) {\n let mainContainer = document.getElementById('post-list');\n mainContainer.innerHTML = '';\n\n for (let i=0; i<data.length; i++) {\n let div = document.createElement(\"div\");\n div.className = \"postList\";\n div.id = `post-table${i}`;\n \n div.innerHTML = `\n <table class=\"postTable\">\n <tr><td><button class=\"username-button\">${data[i].username}</button></td></tr>\n <tr><td><div class=\"gap-10\"></div></td></tr>\n <tr id=\"edit${i}\"><td class=\"post-area\">${data[i].comment}</td>\n ${ data[i].myself ? `<td class=\"edit-button\"><button class=\"btn btn-warning btn-sm\">Edit</button></td></tr>` : `</tr>`}\n <tr><td><hr></td></tr>\n <tr><td class=\"edit-timestamp\">${data[i].latestEdit != null ? `(Edited on ${data[i].latestEdit})` : ``}</td></tr>\n <tr><td class=\"timestamp\">${data[i].timestamp}</td></tr>\n <tr><td>&#10084;&#65039; <span class=\"like-area${i}\">${data[i].likes == \"likes\" ? `0` : `${data[i].likes}` }</span> </td> <td class=\"like-button\"><button id=\"like-button${i}\" class=\"btn btn-danger btn-sm\">${data[i].liked == false ? `Like` : `Unlike`}</button></td></tr>\n </table>\n `\n \n div.querySelector(\".username-button\").addEventListener('click', () => load_profile(data[i].user));\n //div.querySelector(`#like-button${i}`).addEventListener('click', () => like_post(i, data[i].id));\n div.querySelector(`#like-button${i}`).addEventListener('click', function() {\n like_post(i, data[i].id);\n });\n \n if (data[i].myself === true) {\n div.querySelector('.edit-button').addEventListener('click', () => edit_post(i, data[i].id)); \n }\n \n mainContainer.appendChild(div);\n }\n}", "function deletePost(postId) {\n // TODO : Implement this\n}", "function appendPosts(p, n) {\n //find the feed ul\n const feed = document.querySelector('#feed'); \n\n //------------------GET AND APPEND THE FEED CONTENTS--------------------\\\\\n //creates post list item for each post in JSON and append to feed if fetch successful\n const token = localStorage.getItem('loginToken');\n const url =`${API_URL}/user/feed?p=${p}&n=${n}`; \n //check if user is logged in i.e. there's a token stored \n if(!helper.loggedIn()) {\n fetchPostsAnon();\n }\n //attempt to fetch user feed \n else {\n fetch(url, {\n method: 'GET',\n headers: {\n 'Authorization': `Token ${token}`\n }\n })\n //check status messages \n .then(res => {\n if (res.status === INVALID_AUTH) {\n alert(\"Invalid auth token\");\n } \n return res.json();\n })\n //create each post element, add to them and append post to feed \n .then(json => { \n //if there is no feed header, add the feed header \n if(document.querySelector('#feed-head') === NO_FEED_HEADER) {\n feedHeader();\n }\n //sort the posts in order of publication \n json.posts.sort(function(a,b) {\n return a.meta.published > b.meta.published;\n });\n //for each post in the feed, create an element for it and add all its contents\n //including buttons, title, publication date, author etc. \n json.posts.forEach(post => {\n //create post list element\n const postElement = helper.createEleTextless('li', 'post')\n feed.appendChild(postElement);\n\n //create divs for each post bit \n //vote\n const vote = helper.createEleTextless('div', 'content');\n postElement.appendChild(vote);\n\n //Create content wrapper. Filled with the content of the post ofc. \n const content = helper.createEleTextless('div', 'content');\n postElement.appendChild(content);\n //Create title node\n const postTitle = helper.createEle('h3', post.title, 'post', 'alt-text', 'post-title');\n //Create author node \n const time = helper.unixStampConverter(parseInt(post.meta.published));\n const author = helper.createEle('p', `Posted by ${post.meta.author} on ${time} \n to s/${post.meta.subseddit}`, 'post-author');\n //set the bullshit autotest attributes\n author.setAttribute('data-id-author', '');\n author.setAttribute('data-id-upvotes', '');\n author.setAttribute('data-id-title', '');\n\n //Create text node\n const postText = helper.createEle('p', post.text, 'post', 'text');\n //create image div\n const image = document.createElement('img');\n //create image and add image if image is not null\n if(post.image !== NO_IMAGE) {\n image.src = `data:image/png;base64,${post.image}`;\n }\n //append everything to content div \n helper.appendToParent(content,postTitle, postText, image, author);\n\n\n //----------------create buttons and add listeners------------------\\\\\n const upListBtn = helper.createEle('btn', 'Show upvote list', 'button-small', 'button');\n //update upvote list content and display modal on click\n upListBtn.addEventListener(\"click\", () => {\n voteInfo.upModalContent(post, localStorage.getItem('loginToken'));\n helper.showModal(document.querySelector('#upvote-modal'));\n });\n //create show comment button\n const showComBtn = helper.createEle('btn', 'Show comment list', 'button-small', 'button');\n //update comment modal content and display it on click \n showComBtn.addEventListener(\"click\", () => {\n comments.commentModContent(post);\n helper.showModal(document.querySelector('#comment-modal'));\n });\n\n //create upvote button\n const upvotes = post.meta.upvotes.length;\n const upvoteButton = helper.createEle('btn', `Upvote (${upvotes})`, 'button-small', 'button');\n //create remove upvote button\n const removeUpvoteBtn = helper.createEle('btn', 'Remove upvote', 'button-small', 'button');\n //make upvote request on click. \n upvoteButton.addEventListener(\"click\", () => {\n postInfo.upvotePost(post, token, ADD_UPVOTE);\n });\n //make remove upvote request on click. \n removeUpvoteBtn.addEventListener(\"click\", () => {\n postInfo.upvotePost(post, token, REMOVE_UPVOTE);\n });\n //if we are logged in, show all these buttons.\n if (helper.loggedIn()) {\n helper.appendToParent(content, upListBtn,showComBtn,upvoteButton,removeUpvoteBtn);\n }\n });\n })\n .catch(error => {\n alert(\"He's dead Jim (Issue getting feed)\");\n });\n }\n}", "async function addRecentPosts() {\n const posts = await fetchPosts();\n const recentPosts = posts.slice(-3);\n\n recentPosts.forEach((post) => {\n const postCard = createPostCard(post);\n postSection.appendChild(postCard);\n });\n}", "makeViewMisBlogs(data){\n\t\tfor(var i in data){\n\t\t\tdocument.getElementById(\"datablogs\").innerHTML +=`\n\t\t\t<div class=\"row\">\n\t\t\t\t<div class=\"col-md-7 col-lg-9 eachrowmisblogs\">\n\t\t\t\t\t<div class=\"row rowmis-blogs\">\n\t\t\t\t\t\t<div class=\"col-md-12 col-lg-12\">\n\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t <div class=\"col-md-3 col-lg-4\">\n\t\t\t\t\t\t\t \t<div class=\"inputnewname\" id=\"divnewname${i}\">\n\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" id=\"newname${i}\" value=\"${data[i].name_blog}\">\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"currentname\" id=\"currentname${i}\">${data[i].name_blog}</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"col-md-3 col-lg-4 text-left\">\n\t\t\t\t\t\t\t\t\t<div class=\"inputnewurl\" id=\"divnewurl${i}\">\n\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" id=\"newurl${i}\" value=\"${data[i].url_name}\">\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"currenturl\" id=\"currenturl${i}\"><a href=\"${data[i].url_name}\" target=\"blank\">${data[i].url_name}</a></div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"col-md-1\">\n\t\t\t\t\t\t\t\t\t<span class=\"update\" onclick=\"object.Blog.changeInput(${i},${data[i].ID})\" id=\"update${i}\"><i class=\"fas fa-edit\" title=\"editar\"></i></span>\n\t\t\t\t\t\t\t\t\t<span class=\"fingerup\" id=\"finger${i}\" title=\"actualizar\"><i class=\"fas fa-thumbs-up\"></i></span>\t\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"col-md-3 col-lg-3 text-center\">\n\t\t\t\t\t\t\t\t\t<span onclick=\"object.Blog.details(${data[i].ID})\" class=\"butoninfoblogs\"><i class=\"fas fa-info\"></i> Ver detalles</span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t`\n\t\t}\n\t}", "function destroyPosts() {\r\n // Each post has three corresponding rows in the table that contains all the posts. Get all those rows.\r\n var postInfo = document.getElementsByClassName('onePostCreatorsTierInfo');\r\n var postContent = document.getElementsByClassName('onePostCreatorsTierBody');\r\n var quickReply = document.getElementsByClassName('mbQuickReplyRow');\r\n \r\n // Go through the posts to find ones authored by the CHILDREN OF EVIL\r\n for (var i = postContent.length-1; i >= 0; --i) {\r\n // Drill down into this post's content to pull out the author's username.\r\n var username = postContent[i].getElementsByClassName('mb_t_p_t_poster_username')[0].innerHTML;\r\n \r\n // There are newlines at the start and end of the username. Get rid of 'em.\r\n username = username.substring(1, username.length-1);\r\n \r\n if (usersToRemove.indexOf(username) != -1) {\r\n // OK, we're removing this post.\r\n postInfo[i].parentNode.removeChild(postInfo[i]);\r\n postContent[i].parentNode.removeChild(postContent[i]);\r\n quickReply[i].parentNode.removeChild(quickReply[i]);\r\n }\r\n }\r\n}", "function loadPosts () {\n\n var key = \"api_key=iSCTzggSVfQGj4CkKfEmBSShk0T7J0qtj6dBMwb4b1ixavvS1h\";\n var api = \"https://api.tumblr.com/v2/blog/sergeymisharin.tumblr.com/\";\n\n $.getJSON(api + \"posts/text?callback=?&filter=text&limit=3&offset=0&\" + key,function(data) {\n $.each(data.response.posts, function(i, item) {\n var content = item.body;\n var divWithContent = '<div class=\"col-sm-6\">' + content + '</div>';\n $(\".space_weather\").append(divWithContent);\n });\n\n });\n }", "function insertPost(){\n const liveEdit = $.createElement('div');\n const viewPostsWrap = $.querySelector('.view-posts-wrap');\n var date = new Date();\n var currentDate = `${date.getDate()}/${date.getMonth() + 1}/${date.getFullYear()}`;\n liveEdit.setAttribute(\"class\", \"live-edit\");\n const postHeading = $.createElement('h4');\n postHeading.innerHTML = \"All Posts\";\n postHeading.setAttribute(\"class\", \"post-header\");\n app.appendChild(postHeading);\n allPosts.setAttribute(\"class\", \"all-posts\")\n app.appendChild(allPosts);\n const liveHeading = $.createElement('h4');\n liveHeading.innerHTML = \"Live Edit\";\n liveHeading.setAttribute(\"class\", \"live-header\");\n viewPostsWrap.prepend(liveEdit);\n viewPostsWrap.prepend(liveHeading);\n\n //Live Edit\n if(liveEdit.innerHTML == 0){\n liveEdit.innerHTML = `<h3 class=\"empty-value\">Empty!</h3>`;\n }\n postInsert.addEventListener('keyup', function(){\n liveEdit.innerHTML = `\n <p>Published Date: ${currentDate}</p>\n <h3><span class=\"first-letter\">${titleField.value.charAt(0)}</span>${titleField.value}</h3>\n <p>${contentField.value}</p>\n `;\n if (titleField.value.length == 0){\n $.querySelector('.first-letter').setAttribute(\"style\", \"display: none\");\n }\n })\n\n //add post\n $.querySelector('.add-post').addEventListener(\"click\", function(e){\n var newPost = `\n <li class=\"each-post\">\n <p>Published Date: ${currentDate}</p>\n <h3><span class=\"first-letter\">${titleField.value.charAt(0)}</span>${titleField.value}</h3>\n <p>${contentField.value}</p>\n </li>\n `;\n if (titleField.value && contentField.value) {\n allPosts.insertAdjacentHTML('afterbegin', newPost)\n } else{\n alert(\"Missing data!\");\n }\n\n // clear field value\n titleField.value = '';\n contentField.value = '';\n liveEdit.innerHTML = '';\n if (liveEdit.innerHTML == 0) {\n liveEdit.innerHTML = `<h3 class=\"empty-value\">Empty!</h3>`;\n }\n\n //comment init\n cmtLikeArea();\n })\n\n }", "function renderPost(post){ //here we pass an object with post parameters needed to render the post\n\n //creating new elements of the layout\n var postContainer = document.createElement('div'),\n postTitle = document.createElement('h1'),\n postPicture = document.createElement('img'),\n postLink = document.createElement('a'),\n postDescription = document.createElement('p'),\n postPublicationDate = document.createElement('p');\n\n //setting proper attributes to the html tags of the layout\n postContainer.className = \"single-post \"; // here you can add bootstrap classes\n postTitle.innerHTML = post.title;\n postLink.setAttribute('href', post.link);\n postLink.setAttribute('target', '_blank');\n postLink.className = 'thumbnail'; // bootstrap thumbnail class\n postPicture.setAttribute('src', post.imageUrl);\n postDescription.innerHTML = post.description;\n postPublicationDate.innerHTML = \"Published: \" + post.date;\n\n\n //Appending elements to the DOM\n postLink.appendChild(postTitle);\n postLink.appendChild(postPicture);\n postLink.appendChild(postDescription);\n postLink.appendChild(postPublicationDate);\n postContainer.appendChild(postLink);\n document.getElementsByClassName('widget-container')[0].appendChild(postContainer);\n }", "function removeOld() {\n var oids = document.querySelectorAll(\"tr[id^='post-']\")\n , tvib = document.querySelector(\"#topic_viewer > tbody\")\n , amount = [NaN, 25, 50, 100, 250][readify(\"beta-load-amount\", 0)]\n , height = 0\n , roidslen = oids.length\n\n if (amount !== NaN) {\n // Negative of how many posts to keep, slice keeps that amount backwards\n var n = oids.length - amount\n var ooids = oids.slice(0, n > 0 ? n : 0)\n\n debu(\"Old removed posts: \" + ooids.length)\n ooids.map(function(e) {\n var es\n if (! e.querySelector(\".ignored\"))\n es = fiveSiblings(e)\n else es = [e]\n\n for (var i = 0; i < es.length; i++) {\n height += es[i].offsetHeight\n tvib.removeChild(es[i])\n }\n\n })\n\n // FIXME pages are ADDED when NOT NEEDED FUCK\n // - ONLY remove 25 replies at a time?\n // - slice(0, Math.ceil(n / 25) * 25)\n if (ooids.length > 0) iid = cid\n roidslen = oids.length - ooids.length\n }\n\n window.scrollBy(0, height * -1)\n\n return roidslen\n}", "function appendPostDOM(post) {\n //paragraph for caontaining the post body\n let p = document.createElement(\"p\");\n //header for post title\n let h1 = document.createElement(\"h1\");\n //header for userId\n let h3 = document.createElement(\"h3\");\n //header for postID\n let h4 = document.createElement(\"h4\");\n //card that will caontain all the data\n let cardDiv = document.createElement(\"div\");\n //form for editing the post\n\n //div for holding the btns\n let btnDiv = document.createElement(\"div\");\n btnDiv.className += \"btnDiv\";\n\n //edit btn\n let editBtn = document.createElement(\"button\");\n editBtn.textContent = \"Edit\";\n editBtn.className += \"editBtn\";\n\n //update field for a post\n let updateDiv = document.createElement(\"div\");\n let editForm = document.createElement(\"form\");\n let editTitle = document.createElement(\"input\");\n let editPost = document.createElement(\"input\");\n editForm.onsubmit = (event) => {\n event.preventDefault();\n editBtn.textContent = \"Edit\";\n let updatedPost = {\n userId: post.userId,\n body: editPost.value,\n id: post.id,\n title: editTitle.value,\n };\n updateDiv.remove();\n cardDiv.remove();\n updatePost(updatedPost);\n };\n editForm.className += \"edit-From\";\n editTitle.className += \"edit-title\";\n editPost.className += \"edit-post\";\n\n //edit button functions\n editBtn.onclick = () => {\n if (editBtn.textContent === \"Edit\") {\n editForm.appendChild(editTitle);\n editForm.appendChild(editPost);\n updateDiv.appendChild(editForm);\n cardDiv.appendChild(updateDiv);\n editBtn.textContent = \"Update\";\n editTitle.value = post.title;\n editPost.value = post.body;\n } else {\n editBtn.textContent = \"Edit\";\n let updatedPost = {\n userId: post.userId,\n body: editPost.value,\n id: post.id,\n title: editTitle.value,\n };\n updateDiv.remove();\n cardDiv.remove();\n updatePost(updatedPost);\n }\n };\n\n //delete btn\n let deleteBtn = document.createElement(\"button\");\n deleteBtn.textContent = \"Remove\";\n deleteBtn.className = \"deleteBtn\";\n deleteBtn.onclick = () => {\n deletePost(post.id);\n cardDiv.remove();\n };\n\n //adding a post\n cardDiv.className += \"postcard\";\n h1.innerHTML = post.title;\n h3.innerHTML = \"User Id: \" + post.userId;\n h4.innerHTML = \"Post Id: \" + post.id;\n p.innerHTML = post.body;\n btnDiv.appendChild(editBtn);\n btnDiv.appendChild(deleteBtn);\n cardDiv.appendChild(h1);\n cardDiv.appendChild(h3);\n cardDiv.appendChild(h4);\n cardDiv.appendChild(p);\n cardDiv.appendChild(btnDiv);\n $(\".card-container\").prepend(cardDiv);\n}", "generate()\n {\n this.post = document.createElement(\"div\");\n this.post.setAttribute(\"id\", \"haiku\"+this.id);\n this.post.setAttribute(\"class\", \"posts \" + this.gridClass);\n \n let postElements = [];\n\n let post_header = document.createElement(\"div\");\n post_header.setAttribute(\"class\", \"post-header\");\n post_header.setAttribute(\"style\", \"background-image: url('../uploads/background/\" + this.background + \"');\");\n let posts_haiku = document.createElement(\"div\");\n posts_haiku.setAttribute(\"class\", \"posts-haiku\");\n let post_haiku = document.createElement(\"div\");\n post_haiku.setAttribute(\"class\", \"post-haiku\");\n post_haiku.innerHTML = this.content;\n posts_haiku.appendChild(post_haiku);\n post_header.appendChild(posts_haiku);\n postElements.push(post_header);\n\n if(this.contentNative != \"NO\")\n {\n let lang_switch = document.createElement(\"div\");\n lang_switch.setAttribute(\"class\", \"lang-switch\");\n let lang_switcher = document.createElement(\"label\");\n lang_switcher.setAttribute(\"class\", \"lang-switcher\");\n let lang_input = document.createElement(\"input\");\n lang_input.setAttribute(\"type\", \"checkbox\");\n lang_input.setAttribute(\"class\", \"language-value\");\n let lang_slider = document.createElement(\"span\");\n lang_slider.setAttribute(\"class\", \"lang-slider\");\n lang_switcher.appendChild(lang_input);\n lang_switcher.appendChild(lang_slider);\n lang_switch.appendChild(lang_switcher);\n postElements.push(lang_switch);\n }\n\n let post_nav = document.createElement(\"div\");\n post_nav.setAttribute(\"class\", \"post-nav\");\n\n var post_nav_dot = document.createElement(\"div\");\n post_nav_dot.setAttribute(\"class\", \"post-nav-dot\");\n post_nav.appendChild(post_nav_dot);\n\n let post_nav_handwriting = document.createElement(\"div\");\n post_nav_handwriting.setAttribute(\"class\", \"post-nav-handwriting\");\n post_nav_handwriting.setAttribute(\"id\", \"post-nav-handwriting\");\n post_nav_handwriting.setAttribute(\"style\", \"background-image: url(../uploads/handwriting/\"+ this.handwriting +\")\");\n let post_nav_handwriting_close = document.createElement(\"div\");\n post_nav_handwriting_close.setAttribute(\"class\", \"post-nav-handwriting-close\");\n post_nav_handwriting_close.setAttribute(\"id\", \"post-nav-handwriting-close\");\n post_nav_handwriting.appendChild(post_nav_handwriting_close);\n post_nav.appendChild(post_nav_handwriting);\n\n var post_nav_sub = document.createElement(\"div\");\n post_nav_sub.setAttribute(\"class\", \"post-nav-sub\");\n\n let options = [\"Handwriting\", \"Report\"];\n\n if(this.loggedIn == true)\n options = [\"Handwriting\", \"Edit\", \"Delete\"];\n \n options.forEach(option => {\n let post_nav_sub_option = document.createElement(\"div\");\n post_nav_sub_option.setAttribute(\"class\", \"post-nav-sub-option\");\n post_nav_sub_option.textContent = option;\n post_nav_sub.appendChild(post_nav_sub_option);\n });\n\n post_nav.appendChild(post_nav_sub);\n\n postElements.push(post_nav);\n\n let post_footer = document.createElement('div');\n post_footer.setAttribute(\"class\", \"post-footer\");\n\n let post_author = document.createElement('div');\n post_author.setAttribute(\"class\", \"post-author\");\n post_author.textContent = this.authorName;\n post_footer.appendChild(post_author);\n\n let post_country = document.createElement('div');\n post_country.setAttribute(\"class\", \"post-country\");\n post_country.textContent = this.authorCountry;\n post_footer.appendChild(post_country);\n\n let post_like = document.createElement('div');\n post_like.setAttribute(\"class\", \"post-like\");\n if(this.likeStatus == true)\n post_like.style.backgroundImage = \"url('img/icons/heart_full_normal.svg')\";\n\n let post_like_counter = document.createElement('span');\n post_like_counter.textContent = this.likes;\n post_like.appendChild(post_like_counter);\n post_footer.appendChild(post_like);\n\n postElements.push(post_footer);\n\n postElements.forEach(element => {\n this.post.appendChild(element);\n });\n }", "function loadPosts() {// 02\n $.get({ // send get to take all posts\n url: apiBaseUrl + 'posts',\n headers: authorizationHeader\n })\n .then(fillDropDownMenu)\n .catch(renderError);\n }", "function displayPosts(stringPosts) {\n var jsonPosts = JSON.parse(stringPosts);\n var posts = [];\n jsonPosts.forEach(function (jsonPost) {\n var post = new BlogPost();\n post.fillFromJSON(jsonPost);\n posts.push(post);\n });\n posts.forEach(function (post) {\n var htmlPost = \"<div class=\\\"col-md-4\\\">\" +\n post.getHtml() +\n \"</div>\";\n $(\"#posts\")\n .append(htmlPost);\n });\n}", "function addPost(post) {\n //const feedList = document.getElementById('');\n // creates list container for the post\n var img = null;\n if (post.image != null) {\n img = document.createElement('img');\n img.className = 'post image';\n img.src = 'data:image/jpeg;base64,' + post.image;\n }\n const list = document.createElement('li');\n list.className = 'post';\n list.setAttribute('data-id-post', '');\n // number of upvotes\n const upVotes = document.createElement('div');\n upVotes.className = 'post vote';\n upVotes.setAttribute('data-id-upvotes', '');\n upVotes.innerText = post.meta.upvotes.length;\n\n // create a container for the content\n const content = document.createElement('div');\n content.className = 'content';\n\n // title of post\n const contentTitle = document.createElement('h4');\n contentTitle.setAttribute('data-id-title', '');\n contentTitle.className = 'post-title alt-text';\n contentTitle.innerText = post.title;\n\n // contents of post\n const contentText = document.createElement('p');\n contentText.className = 'post content';\n contentText.innerText = post.text;\n\n // n comments on post\n const comments = document.createElement('p');\n comments.className = 'post-author';\n comments.innerText = post.comments.length + ' Comments';\n\n // subseddit of post\n const subText = document.createElement('p');\n subText.className = 'post-author';\n subText.innerText = 's/'+ post.meta.subseddit;\n\n // author of post + time\n const contentAuthor = document.createElement('p');\n contentAuthor.className = 'post-author';\n contentAuthor.setAttribute('data-id-author', '');\n var d = new Date(post.meta.published*1000);\n var date = formatTime(d.getDate()) + '/' + formatTime(d.getMonth()) + '/' + d.getFullYear();\n var time = formatTime(d.getHours()) + ':' + formatTime(d.getMinutes()) + ':' + formatTime(d.getSeconds());\n contentAuthor.innerText = 'Posted by @' + post.meta.author + ' at ' + time + ', ' + date;\n\n content.appendChild(contentTitle);\n content.appendChild(subText);\n content.appendChild(contentAuthor);\n content.appendChild(contentText);\n if (img != null) {\n content.appendChild(img);\n }\n content.appendChild(comments);\n list.append(upVotes);\n list.append(content);\n return list;\n}", "function fetchAllProjects() {\n fetchProjects(numAllResponses, addProjectsToPage);\n document.getElementById(\"posts\").innerHTML = \"\"\n}", "function getPost() {\n fetch('https://jsonplaceholder.typicode.com/posts')\n .then((response) => response.json())\n .then((data) => {\n // bring in the parent container that will hold & display our fetched/gotten array content\n let layoutParent = document.querySelector('#postParent');\n // userPost = data\n // console.log(userPost)\n // create an empty container that will be later used in concatenating our array list. Typical of Mr Ogo to call this html\n let layoutChild = \" \";\n // next is to loop display through the array elements using forEach\n // had to change the array name from 'data' to 'userPost' for me to fake display the 101 object for the createPost function since we have equated data to userPost on line 20. HOWEVER, i have to change it back to 'data' again so as to work on displaying each object in the data array in a new window or tab (using maybe the window.open() method)\n posts = data;\n\n posts.forEach((element, index) => {\n let stringiFiedElem = JSON.stringify(element);\n\n layoutChild += `\n <div class=\"col-6 col-md-4 col-lg-3 my-3\" >\n <div class=\"card h-100\">\n\n <div class=\"card-body\" id= \"card-element\">\n <div class=\"d-flex justify-content-end\">\n <h6 class=\"text-info\">${stringiFiedElem}</h6>\n </div>\n <h5 class=\"post-title\">${element.title}</h5>\n <p class=\"post-body\">${element.body} </p>\n \n <div class=\"d-flex justify-content-end align-items-end\">\n <button class=\"btn btn-danger\">Delete</button>\n </div>\n <div class=\"mt-3 d-flex justify-content-end align-items-end\">\n <button class=\"btn btn-warning\">Update</button>\n </div>\n\n </div>\n \n <div class=\"mt-3 d-flex justify-content-end\">\n <button class=\" mt-0 m-3 px-3 btn btn-info\" target=\"_blank\" onclick=\"openNew(\\' ${index} '\\)\">Open</button>\n </div>\n </div>\n </div>\n `;\n\n layoutParent.innerHTML = layoutChild;\n });\n\n });\n}", "function loadPosts() {\n\n\n}", "function addPost(postText) {\r\n\t\r\n\topen = '<tr class=\"post_row\"><td class=\"post_cell\">'\r\n\tclose = '</td></tr>'\r\n\tcontent = processText(postText)\r\n\t\r\n\telement = open+content+close\r\n\tfeed = $(\"#feed_body\")[0]\r\n\tfeed.insertAdjacentHTML(\"afterbegin\", element)\r\n}", "function renderBlogs (data) {\n \n let HTML = '';\n\n\n if ( !Array.isArray (data) ) {\n return console.error('ERROR: negaliu sugeneruoti sekcijos, del blogo formato duomenu.');\n }\n\n if ( data.length === 0 ) {\n return console.error('ERROR: negaliu sugeneruoti sekcijos del tuscio saraso.');\n }\n \n\n for ( let i=0; i<data.length; i++ ) {\n\n const blogiukai = data[i];\n\nHTML += `<div class= \"blokai\">\n <a href =\"#\" class = \"photo\">\n <img id = \"foto\" src=\"./img/Blog/${blogiukai.img}\" alt=\"User photo\">\n </a>\n <p class=\"date\">\n ${blogiukai.date.day}\n ${blogiukai.date.month}\n ${blogiukai.date.years}\n ${blogiukai.date.design} \n </p>\n <div class=\"textas\">\n <a href=\"#\">\n <h3>${blogiukai.description}</h3>\n </a> \n <p>${blogiukai.text}</p>\n </div>\n <a class = 'nuoroda' href =\"#\">\n <p>${blogiukai.link}</p>\n </a> \n </div>`; \n}\n\n \n\n return document.querySelector('#Blogs > .row').innerHTML = HTML;\n}", "function onLoadOfPage(){ \n newNode=document.createElement('p'); //created a \"para\" child elemnt to pass on the post-id to be deleted to the deletemodal\n newNode.setAttribute(\"id\",\"postClicked\"); \n parent=document.getElementById('rUSure');\n parent.appendChild(newNode); // child para element is appended to parent which is a element on delete modal\n newNode.style.display=\"none\"; //the para element is invisible\n const listItems = document.getElementById('flex').children;\n const listArray = Array.from(listItems);\n listArray.forEach((item) => {\n var post=item.getAttribute(\"id\");\n var x =document.getElementById(post);\n if(post===\"post5\"){\n var x=document.getElementById(post);\n x.style.margin=\"10px 300px 10px 300px\";\n } \n });\t\n}", "function processData(data) {\n\n //Logging the data so that you can always see what de request is providing\n console.log(data);\n\n for (i = 0; i < data.newsposts.length; i++) {\n\n var postcontainer = document.getElementById('news-updates');\n\n var fullpost = document.createElement('a');\n fullpost.setAttribute('href', 'http://localhost/Redcraft/php/fullpost.php?id=' + data.newsposts[i].id);\n\n var post = document.createElement('div');\n post.setAttribute('class', 'news-updates-post');\n post.setAttribute('id', 'news-updates-post');\n\n var postdate = document.createElement('div');\n postdate.setAttribute('class', 'news-updates-post-date');\n postdate.setAttribute('id', 'news-updates-post-date');\n postdate.innerHTML = data.newsposts[i].date;\n\n var posttitle = document.createElement('div');\n posttitle.setAttribute('class', 'news-updates-post-title');\n posttitle.setAttribute('id', 'news-updates-post-title');\n posttitle.innerHTML = data.newsposts[i].title;\n\n var postcontent = document.createElement('div');\n postcontent.setAttribute('class', 'news-updates-post-content');\n postcontent.setAttribute('id', 'news-updates-post-content');\n postcontent.innerHTML = data.newsposts[i].content;\n\n postcontainer.appendChild(fullpost);\n fullpost.appendChild(post);\n post.appendChild(postdate);\n post.appendChild(posttitle);\n post.appendChild(postcontent);\n\n }\n}", "function blogToDom(res) {\n let parsed = JSON.parse(res);\n parsed = parsed.reverse();\n const cleanedBlog = parsed.map((post, i) => {\n let cleanedBody = post.body.replace(/style=\"[a-zA-Z0-9:;\\.\\s\\(\\)\\-\\,]*\"/gi, \"\").replace(/<p><br><\\/p>/gi, \"\");\n const imgs = [...post.body.matchAll(/\\[\\[.*?\\]\\]/g)];\n imgs.forEach(img => {\n const split = cleanedBody.split(img[0]);\n cleanedBody = split.join(\"\");\n })\n post.body = cleanedBody;\n return post;\n });\n\n // Paginate.js library for pagination.\n $('#paginate-container').pagination({\n dataSource: cleanedBlog,\n pageSize: 3,\n callback: function (data, pagination) {\n var html = blogTemplate(data);\n $('#blog-container').fadeOut(0, () => {\n $('#blog-container').fadeIn().html(html);\n });\n }\n });\n\n archiveToDom(parsed.reverse());\n}", "function populate_posts(parsed_json)\n{\n let post_counter = 0;\n const REDDIT_HOST = 'https://www.reddit.com';\n\n $.each(parsed_json, function (jsonkey, jsonval) {\n let media_html = '';\n let epoch_date = parsed_json[jsonkey]['date_created'];\n let date_object = new Date(epoch_date*1000);\n let string_date = date_object.getMonth() + '/' + date_object.getDate() + '/' + date_object.getFullYear() + ' ' + date_object.getHours() + ':' + date_object.getMinutes();\n post_counter++;\n\n if (typeof parsed_json[jsonkey]['author']['media'] !== 'undefined' && typeof parsed_json[jsonkey]['author']['media']['url'] !== 'undefined')\n {\n media_html = '<img src=\"' + parsed_json[jsonkey]['author']['media']['url'] + '\">';\n }\n\n $('.post_score', $('#thread>ul:nth-child(' + post_counter + ')')).text(\n parsed_json[jsonkey]['score']\n );\n $('.post_title', $('#thread>ul:nth-child(' + post_counter + ')')).html(\n '<div><a href=\"#\" onclick=\"call_external_url(\\'' + REDDIT_HOST + parsed_json[jsonkey]['permalink'] + '\\')\" class=\"button large\" target=\"_blank\">' + parsed_json[jsonkey]['title'] + '</a></div>'\n );\n $('.post_details', $('#thread>ul:nth-child(' + post_counter + ')')).html(\n 'Posted on ' + string_date + ' by ' + parsed_json[jsonkey]['author'] + '<br>' + media_html\n );\n });\n\n return post_counter;\n}", "function BlogIndex(conf) {\n\n var self = this;\n\n this.conf = conf;\n\n this.genBlogIndex = function() {\n\n /* write some HTML to format the data */\n var mdBodyObj = document.getElementById(gs_body_id);\n var ul = document.createElement('ul');\n appendAttribute(ul, 'class', 'list-group');\n mdBodyObj.appendChild(ul);\n\n var firstPost = 1;\n var reqPage = self.conf.requested_blog_index_page;\n var itemMax = self.conf.blog_items.length;\n\n if (self.conf.paginationIsActive()) {\n itemMax = self.conf.pagination;\n firstPost = (reqPage-1) * itemMax + 1;\n var gsPagination = new PageNav(gsConfig);\n gsPagination.genNavListTags();\n }\n\n var itemCnt = 0;\n for (index = firstPost; index < self.conf.blog_items.length; index++) {\n if (itemCnt >= itemMax) { break; }\n\n var item = self.conf.blog_items[index];\n var li = document.createElement('li');\n li.setAttribute('id', item);\n appendAttribute(li, 'class', 'list-group-item');\n ul.appendChild(li);\n\n self.PostPreviewToHTML(gs_post_path+'/'+item, item);\n itemCnt++;\n }\n };\n\n /* Download a post file (yaml + markdown), parse YAML, convert to HTML,\n * then post to given div-id. */\n this.PostPreviewToHTML = function(relpath, markdown_div) {\n var callback = function (text) {\n\n /* circumvent github's auto-meta parsing */\n text = text.replace(\"(((\",'---');\n text = text.replace(\")))\",'---');\n\n if ((isBlank(text)) || (text == null) || (text == 'null') ||\n (typeof text === 'undefined')) {\n var li = document.getElementById(markdown_div);\n li.innerHTML = 'Unable to load text for: '+relpath;\n return;\n }\n\n /* parse YAML header */\n var obj = jsyaml.loadFront(text)\n\n /* check for post meta data */\n var date = typeof obj.Date !== 'undefined' ? obj.Date.toDateString() : '';\n var author = typeof obj.Author !== 'undefined' ? obj.Author : '';\n var summary = typeof obj.Summary !== 'undefined' ? obj.Summary : '';\n var title = typeof obj.Title !== 'undefined' ? obj.Title : '';\n\n /* write some HTML to format the data */\n var li = document.getElementById(markdown_div);\n li.innerHTML = '<a href=?post='+markdown_div+'><b>'+title+\n '</b><br></a> ' + author + ' | <small>' + \n date + '</small><br><i>' + summary +\n '</i>';\n\n };\n getFile(relpath, callback);\n };\n\n this.genBlogIndex();\n}", "async function loadMorePosts() {\n if (end == true) {\n return\n }\n\n const posts = await fetch('/api/latest/load/morePosts?skip=' + skip + '&context=' + postContext + '&userid=' + userid);\n skip = skip + 1\n\n const json = await posts.json()\n\n if (json.length == 0) {\n document.getElementById('bottomWarning').innerHTML = 'Sorry, no more posts<span class=\"text-blue-600\">.</span>'\n\n return end = true\n }\n\n var html = ''\n\n for (i = 0; i < json.length; i++) {\n html = html + createPost(json[i])\n }\n\n var html = htmlToElems(html)\n\n document.getElementById('postsContainer').appendChild(html)\n}", "function initBlog() {\n \"use strict\";\n\n if($j('.blog_holder.masonry').length) {\n var width_blog = $j(this).closest('.container_inner').width();\n if($j('.blog_holder.masonry').closest(\".column_inner\").length) {\n width_blog = $j('.blog_holder.masonry').closest(\".column_inner\").width();\n }\n $j('.blog_holder.masonry').width(width_blog);\n var $container = $j('.blog_holder.masonry');\n\n $container.waitForImages(function() {\n setTimeout(function() {\n $container.isotope({\n itemSelector: 'article',\n resizable: false,\n masonry: {columnWidth: '.blog_holder_grid_sizer', gutter: '.blog_holder_grid_gutter'}\n });\n\n $j('.blog_holder.masonry').animate({opacity: \"1\"}, 500);\n }, 400);\n });\n\n $j('.filter').click(function() {\n var selector = $j(this).attr('data-filter');\n $container.isotope({filter: selector});\n return false;\n });\n\n if($container.hasClass('masonry_infinite_scroll')) {\n $container.infinitescroll({\n navSelector: '.blog_infinite_scroll_button span',\n nextSelector: '.blog_infinite_scroll_button span a',\n itemSelector: 'article',\n loading: {\n finishedMsg: finished_text,\n msgText: loading_text\n }\n },\n // call Isotope as a callback\n function(newElements) {\n $container.isotope('appended', $j(newElements));\n fitVideo();\n fitAudio();\n initFlexSlider();\n setTimeout(function() {\n $j('.blog_holder.masonry').isotope('layout');\n }, 400);\n }\n );\n } else if($container.hasClass('masonry_load_more')) {\n\n\n var i = 1;\n $j('.blog_load_more_button a').off('click tap').on('click tap', function(e) {\n e.preventDefault();\n\n var load_more_holder = $j('.blog_load_more_button');\n var load_more_loading = $j('.blog_load_more_button_loading');\n load_more_holder.hide();\n load_more_loading.show();\n\n var link = $j(this).attr('href');\n var $content = '.masonry_load_more';\n var $anchor = '.blog_load_more_button a';\n var $next_href = $j($anchor).attr('href');\n $j.get(link + '', function(data) {\n var $new_content = $j($content, data).wrapInner('').html();\n $next_href = $j($anchor, data).attr('href');\n $container.append($j($new_content)).isotope('reloadItems').isotope({sortBy: 'original-order'});\n fitVideo();\n fitAudio();\n initFlexSlider();\n setTimeout(function() {\n $j('.blog_holder.masonry').isotope('layout');\n }, 400);\n\n load_more_holder.show();\n load_more_loading.hide();\n\n if($j('.blog_load_more_button span').attr('rel') > i) {\n $j('.blog_load_more_button a').attr('href', $next_href); // Change the next URL\n } else {\n $j('.blog_load_more_button').remove();\n }\n });\n i++;\n });\n\n }\n }\n}", "function getComments(){\n $(\"#example-list\").empty()\n $.get(\"/api/examples/\" + postId,function( data ){\n console.log(data.Comments)\n for(i = 0; i < data.Comments.length; i++){\n $(\"#example-list\").append($(\"<div class='row animation-element slide-left'><div class='card mt-4 cardx'><div class='card-body'><p>\"+ data.Comments[i].text +\"</p></div></div></div>\"))\n }\n})\n}", "function createRedditPost(data) {\n // create column container for reddit post\n var redditPostDiv = document.createElement('div');\n redditPostDiv.classList = \"column is-half-tablet is-one-third-desktop\";\n // create box for styling\n var redditPost = document.createElement('div');\n redditPost.classList = \"box\";\n // redditPost.textContent=reduceCharacters(\"aa\")\n // title of the post\n var redditTitle = document.createElement('h2');\n redditTitle.textContent = data.title.replace(/&amp;/g, '&'); //replace &amp; with &\n redditTitle.classList = \"title is-4\";\n // author and timestamp\n var redditInfo = document.createElement('p');\n redditInfo.textContent = \"Posted by - \" + data.author + ' - ' + data.created;\n redditInfo.classList = \"subtitle is-6\";\n // post url\n var redditLink = document.createElement('a');\n \n redditLink.textContent = data.permalink;\n redditLink.setAttribute('href', 'https://www.reddit.com' + data.permalink);\n redditLink.setAttribute('target', '_blank');\n\n\n // add divs to DOM\n redditPost.appendChild(redditTitle);\n redditPost.appendChild(redditInfo);\n redditPost.appendChild(redditLink);\n\n // if the post has selfText create element\n if (data.selftext) {\n var redditTextContent = document.createElement('p');\n redditTextContent.innerHTML = data.selftext.replace(/&amp;/g, '&');\n redditPost.appendChild(redditTextContent);\n }\n\n // if the post has an image create element\n if (data.preview) {\n var redditPreview = document.createElement('img');\n redditPreview.setAttribute('src', data.preview.images[0].source.url.replace(/&amp;/g, '&'));\n redditPreview.setAttribute('style', 'width: 80%');\n redditPost.appendChild(redditPreview);\n }\n\n redditPostDiv.appendChild(redditPost);\n postSection.appendChild(redditPostDiv);\n}", "function addAllPost(){\n\tfor(i = 0; i < posts.length; i++){//\n\t\tdocument.getElementById(\"posts\").appendChild(posts[i]);\n\t}\n}", "function produceBlogs (event) {\n // Clear the blogs first before displaying the new ones\n blogEl.innerHTML = \"\"\n\n // Which number did the user click on?\n const pageNumber = parseInt(\n Array.from(event.target.classList)\n .find(clazz => {\n if (clazz.startsWith(\"page-\")) return clazz\n })\n .split(\"-\")[1]\n )\n\n // Change the class name of the previous arrow\n if ((pageNumber - 1) === 0) {\n previousEl.style.visibility = \"hidden\"\n } else {\n previousEl.style.visibility = \"visible\"\n previousEl.className = `page-${pageNumber - 1}`\n }\n\n // Change the class name of the next arrow\n if ((pageNumber + 1) > numberOfPages) {\n nextEl.style.visibility = \"hidden\"\n } else {\n nextEl.style.visibility = \"visible\"\n nextEl.className = `page-${pageNumber + 1}`\n }\n\n // Determine which items to display by slicing the array\n const itemsToDisplay = storedBlogs.articles.slice(\n (pageNumber - 1) * itemsPerPage, \n pageNumber * itemsPerPage\n )\n\n // Display a <section> representation of each data object\n for (let i = 0; i < itemsToDisplay.length; i++) {\n let currentBlog = itemsToDisplay[i];\n blogEl.innerHTML += `\n <section class=\"boxy ${currentBlog.title}\">\n <h3>\"${currentBlog.title}\"</h3>\n <h4>Post: ${currentBlog.id}</h4>\n <h5>${currentBlog.body}</h5>\n </section>\n `\n }\n}" ]
[ "0.6730714", "0.65798175", "0.646155", "0.6374156", "0.6374156", "0.63092834", "0.6309041", "0.63025695", "0.62781805", "0.6271256", "0.62627643", "0.6240731", "0.62363905", "0.6223824", "0.6137714", "0.61287135", "0.6128233", "0.60775584", "0.6076449", "0.6048756", "0.60451686", "0.60314476", "0.5975122", "0.5968126", "0.59615886", "0.5922491", "0.5912158", "0.58895373", "0.5878599", "0.5871972", "0.58646226", "0.5853255", "0.58455455", "0.5839949", "0.5838947", "0.58381623", "0.582846", "0.58185565", "0.58141536", "0.579822", "0.57851774", "0.5778673", "0.57706004", "0.5770272", "0.5733773", "0.57267326", "0.57170427", "0.57102126", "0.5705195", "0.56992376", "0.5694434", "0.5684921", "0.5682522", "0.56824183", "0.5665979", "0.5665099", "0.5652839", "0.563924", "0.563802", "0.5630068", "0.5625778", "0.5623054", "0.5622136", "0.5621762", "0.5620952", "0.5598422", "0.55926996", "0.55918676", "0.55889785", "0.5567147", "0.55622053", "0.5557701", "0.5556812", "0.5551096", "0.55505", "0.55503845", "0.55475235", "0.5539188", "0.5533772", "0.55207753", "0.5513758", "0.5509889", "0.5505864", "0.5505505", "0.5496454", "0.54837775", "0.5477432", "0.5476007", "0.5469625", "0.5469272", "0.54656696", "0.54518163", "0.544689", "0.5439819", "0.5438868", "0.5433619", "0.54280627", "0.54277605", "0.5425833", "0.5425675" ]
0.6947592
0
This function constructs a post's HTML
function createNewRow(post) { var formattedDate = new Date(post.createdAt); formattedDate = moment(formattedDate).format("MMMM Do YYYY"); var newPostPanel = $("<div>"); newPostPanel.addClass("blog-container"); var newPostPanelHeading = $("<div>"); newPostPanelHeading.addClass("panel-heading"); var newPostTitle = $("<h2>"); var newPostDate = $("<small>"); var newPostAuthor = $("<h5>"); newPostAuthor.text("Written by: " + post.Author.name); newPostAuthor.css({ float: "right", color: "pink", "margin-top": "-10px" }); var newPostPanelBody = $("<div>"); newPostPanelBody.addClass("blog-container"); var newPostBody = $("<p>"); newPostTitle.text(post.title + " "); newPostBody.text(post.body); newPostDate.text(formattedDate); newPostTitle.append(newPostDate); newPostPanelHeading.append(newPostTitle); newPostPanelHeading.append(newPostAuthor); newPostPanelBody.append(newPostBody); newPostPanel.append(newPostPanelHeading); newPostPanel.append(newPostPanelBody); newPostPanel.data("post", post); return newPostPanel; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function postHTML(post){\n return `\n <div class=\"card\">\n <div class=\"card-content\">\n <span class=\"card-title\">${post.title}</span>\n <p>${post.author}</p>\n <p>${post.content}</p>\n <button class=\"colorButton\">Change Background</button>\n </div>\n </div>\n \n `\n}", "function post_to_html(post) {\n var node = post_template.clone();\n node = node.removeClass('hidden');\n node = node.attr('id',\"post\"+post.id);\n node.find(\"#post_pic\").attr('src', '/recipe/' + post.id + '/pic');\n node.find(\".post_detail\").attr('href', '/recipe/' + post.id );\n node.find(\"#post_title\").html(post.title);\n \n // if (for )\n stars = ''\n for (var i = 1; i < post.tastiness; i++) {\n stars += star;\n }\n\n if ((i - post.tastiness) == 0.5) {\n stars += star_half\n i+=1;\n }\n\n for (; i < 6; i++) {\n stars += star_empty;\n }\n\n node.find(\"#post_rating\").html(stars);\n node.find(\"#post_time\").html(post.time);\n \n // node.find(\"#post_date\").html(new Date(post.date).toLocaleString());\n // node.find(\"#post_user_photo\").attr('src', '/user_photo/' + post.user.id);\n // node.find(\"#profile_link\").attr('href', '/profile/' + post.user.id);\n // node.find(\"#comment_link\").click(function () {\n // show_comments(post.id)\n // });\n // if (post.comments_qty)\n // node.find(\"#comments_qty\").html(post.comments_qty);\n\n return node;\n}", "function renderPost(post){ //here we pass an object with post parameters needed to render the post\n\n //creating new elements of the layout\n var postContainer = document.createElement('div'),\n postTitle = document.createElement('h1'),\n postPicture = document.createElement('img'),\n postLink = document.createElement('a'),\n postDescription = document.createElement('p'),\n postPublicationDate = document.createElement('p');\n\n //setting proper attributes to the html tags of the layout\n postContainer.className = \"single-post \"; // here you can add bootstrap classes\n postTitle.innerHTML = post.title;\n postLink.setAttribute('href', post.link);\n postLink.setAttribute('target', '_blank');\n postLink.className = 'thumbnail'; // bootstrap thumbnail class\n postPicture.setAttribute('src', post.imageUrl);\n postDescription.innerHTML = post.description;\n postPublicationDate.innerHTML = \"Published: \" + post.date;\n\n\n //Appending elements to the DOM\n postLink.appendChild(postTitle);\n postLink.appendChild(postPicture);\n postLink.appendChild(postDescription);\n postLink.appendChild(postPublicationDate);\n postContainer.appendChild(postLink);\n document.getElementsByClassName('widget-container')[0].appendChild(postContainer);\n }", "function createPost(id, title, body, date) { \n var post = [`<div class=\"post-preview\">`,\n `<h2 class=\"post-title\">${title}</h2>`,\n `<p class=\"post-subtitle\">${body}</p>`, \n `<p class=\"post-meta\">Posted at ${date}`,\n `<a href=\"javascript:edit(${id})\" class=\"btn\"><span class=\"glyphicon glyphicon-pencil\"></span></a>`,\n `<a href=\"javascript:del(${id})\" class=\"btn\"><span class=\"glyphicon glyphicon-trash\"></span></a></p>`,\n `</div>`,\n `<hr>`].join(\"\\n\")\n return post;\n}//E N D function createPost", "function createHTML(postsData) {\n\tvar ourHTMLString = '';\n\tfor (i = 0; i < postsData.length; i++) {\n\t\tourHTMLString += '<h2>' + postsData[i].title.rendered + '</h2>';\n\t}\n\tppc.innerHTML = ourHTMLString;\n}", "function generatePostContent(postObject){\n\tlet id = postObject.id;\n\t\n\tlet element = htmlToElement(postObject.html);\n\tif (postObject.type == \"pokebeach\"){\n\t\tlet messageContent = element.getElementsByClassName(\"messageContent\")\n\t\tif (messageContent[0])\n\t\t\treturn messageContent[0];\n\t}\n\telse if (postObject.type == \"qt\"){\n\t\tlet messageContent = element.getElementsByClassName(\"topic-messagebody\")\n\t\tif (messageContent[0])\n\t\t{\n\t\t\tlet editNote = messageContent[0].getElementsByClassName(\"div-topic-message-edited-note\")\n\t\t\tif (editNote[0])\n\t\t\t\tdeleteNode(editNote[0]); //TODO: might not remove editNote\n\t\t\treturn messageContent[0];\n\t\t}\n\t}\n\t\n\treturn document.createElement(\"text\");\n}", "function construct_html(href, title, describe,tags) {\n url1 = '<article class=\"post tag-sync_sulab post__wrapper\" data-cols=\"4\">' + '<div class=\"post__wrapper_helper post__wrapper_helper--notloaded el__transition post__wrapper_helper--hover\">' + '<div class=\"post__preview el__transition\">' + '<header class=\"post__header\">' + '<h2 class=\"post__title\">' + '<a href='\n\n url2 = ' class=\"post__link post__title_link\"><span>'\n\n url3 = '</span></a></h2></header><p class=\"post__excerpt\"><a href='\n url4 = ' class=\"post__link post__readmore\">'\n\n url5 = '</a></p></div><footer class=\"post__meta\"><ul class=\"post__tags\">'\n url6 = '</ul></footer></div></article>'\n html = url1 + href + url2 + title + url3 + href + url4 + describe + url5\n for(var i=0; i < tags.length; i++) {\n if (tags[i] != 'sync_sulab') { // skip internal sync_sulab tag\n html += construct_tag(tags[i]);\n }\n };\n html += url6;\n return html\n}", "function renderPost(post){ //here we pass an object with post parameters needed to render the post\n //creating new elements of the layout\n var postContainer = document.createElement('div'),\n postTitle = document.createElement('h1'),\n postPicture = document.createElement('img'),\n postLink = document.createElement('a'),\n postDescription = document.createElement('p'),\n postPublicationDate = document.createElement('p');\n\n //setting proper attributes to the html tags of the layout\n postContainer.className = \"single-post \"; // here you can add bootstrap classes\n postTitle.innerHTML = post.title;\n postLink.setAttribute('href', post.link);\n postLink.setAttribute('target', '_blank');\n postLink.className = 'thumbnail'; // bootstrap thumbnail class\n postPicture.src = post.imgSrc;\n postDescription.innerHTML = post.description;\n postPublicationDate.innerHTML = \"Published: \" + post.date;\n\n\n //Appending elements to the DOM\n postLink.appendChild(postTitle);\n postLink.appendChild(postPicture);\n postLink.appendChild(postDescription);\n postLink.appendChild(postPublicationDate);\n postContainer.appendChild(postLink);\n document.getElementsByClassName('widget-container')[0].appendChild(postContainer);\n}", "function createPost() {\n var protoClass = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'proto-post';\n var imgSrc = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'https://static.scientificamerican.com/blogs/cache/file/638FC5CE-96EC-46DA-AAC64985822092FE_source.jpg?w=590&h=800&BDB89ACC-71A2-463A-928419A181070C770';\n var postContent = arguments.length > 2 ? arguments[2] : undefined;\n var authorUsername = arguments.length > 3 ? arguments[3] : undefined;\n var authorImg = arguments.length > 4 ? arguments[4] : undefined;\n var newPost = document.getElementsByClassName(protoClass)[0].cloneNode(true);\n newPost.getElementsByTagName('img')[0].src = authorImg;\n newPost.getElementsByTagName('img')[1].src = imgSrc;\n newPost.getElementsByTagName('h1')[0].textContent = authorUsername;\n newPost.getElementsByTagName('p')[0].textContent = postContent;\n return newPost;\n} //-----------------show posts from everyone------------------", "function build_post() {\n $( '.skeleton' ).removeClass( 'skeleton' );\n var date = new Date( object.date );\n if ( featured_img_ID !== 0 ) {\n if ( $( '.featured-image' ).length ) {\n $( '.featured-image' ).replaceWith( output_the_image() );\n } else {\n $( '.post' ).before( output_the_image() );\n }\n } else {\n $( '.featured-image' ).remove();\n }\n $( '.post-title' ).text( object.title.rendered );\n $( '.post-author' ).text( object._embedded.author[0].name );\n $( '.post-date' ).text( date.toDateString() );\n $( '.post-link' ).replaceWith( '<span class=\"post-link\">' + '<a href=\"' + object.link + '\" rel=\"bookmark\">Original source</a><span>' );\n $( '.post-content' ).replaceWith( '<div class=\"post-content\">' + object.content.rendered + '</div>' );\n }", "function createBlogPost(post) {\n var title = $(\"<h1/>\").text(post.title);\n \n // Regular textarea (store as plain text)\n // var content = $(\"<p/>\").text(post.content);\n\n // TinyMCE Editor (the editor converts it to HTML)\n var content = $(\"<p/>\").html(post.content);\n var footer = $(\"<p/>\").text(\n \"Published by \" + post.author + \" on \" + post.date);\n\n var blogPostHTML = $(\"<div/>\").append([title, content, footer]).addClass(\"blogpost\");\n\n $(\".content\").prepend(blogPostHTML);\n }", "function randomPost() {\r\n\r\n // Generate the post\r\n var post = '<article> <div class=\"post\"> <div class=\"col-xs-12\" style=\"padding: 0px;\"> <!--<div class=\"col-xs-1 user-top\"> <img class=\"img-circle\" src=\"https://ssl.gstatic.com/accounts/ui/avatar_2x.png\"> </div>--> <div class=\"col-xs-12\" style=\"padding: 0px;\"> <div class=\"ribbon-top\"> <strong>@jgoa156</strong><span class=\"text-muted\" style=\"margin-left: 20px;\">5 dias atrás</span> </div> </div> </div> <div class=\"col-xs-12\" style=\"padding: 0px;\"> <!--<div class=\"col-xs-1 user-bottom\"></div>--> <div class=\"col-xs-12\" style=\"padding: 0px;\"> <div class=\"ribbon-bottom\"> Panel content </div> </div> </div> </div> <h6 style=\"color: white;\">A</h6></article>';\r\n\r\n return post;\r\n}", "function renderPosts(posts) {\n //delete\n \n let divchild = document.createElement(\"div\");\n let article = document.createElement(\"p\");\n let title = document.createElement(\"h2\");\n \n divchild.setAttribute(\"class\", \"post\");\n\n title.appendChild(document.createTextNode(posts[0].title));\n \n article.appendChild(document.createTextNode(posts[0].body))\n \n divchild.appendChild(title)\n divchild.appendChild(article)\n \n divContenedorPost.appendChild(divchild);\n\n \n}", "function renderCatstagramPost(postData) {\n return `\n <div data-postid=\"${postData.id}\">\n <h2>${postData.caption}</h2>\n <!-- ***** ADD EXTRA HTML HERE **** -->\n </div>\n <img src=\"${postData.image}\"/>\n <p>'Number of Likes'${postData.numberOfLikes}</p>\n `;\n}", "function createRedditPost(data) {\n // create column container for reddit post\n var redditPostDiv = document.createElement('div');\n redditPostDiv.classList = \"column is-half-tablet is-one-third-desktop\";\n // create box for styling\n var redditPost = document.createElement('div');\n redditPost.classList = \"box\";\n // redditPost.textContent=reduceCharacters(\"aa\")\n // title of the post\n var redditTitle = document.createElement('h2');\n redditTitle.textContent = data.title.replace(/&amp;/g, '&'); //replace &amp; with &\n redditTitle.classList = \"title is-4\";\n // author and timestamp\n var redditInfo = document.createElement('p');\n redditInfo.textContent = \"Posted by - \" + data.author + ' - ' + data.created;\n redditInfo.classList = \"subtitle is-6\";\n // post url\n var redditLink = document.createElement('a');\n \n redditLink.textContent = data.permalink;\n redditLink.setAttribute('href', 'https://www.reddit.com' + data.permalink);\n redditLink.setAttribute('target', '_blank');\n\n\n // add divs to DOM\n redditPost.appendChild(redditTitle);\n redditPost.appendChild(redditInfo);\n redditPost.appendChild(redditLink);\n\n // if the post has selfText create element\n if (data.selftext) {\n var redditTextContent = document.createElement('p');\n redditTextContent.innerHTML = data.selftext.replace(/&amp;/g, '&');\n redditPost.appendChild(redditTextContent);\n }\n\n // if the post has an image create element\n if (data.preview) {\n var redditPreview = document.createElement('img');\n redditPreview.setAttribute('src', data.preview.images[0].source.url.replace(/&amp;/g, '&'));\n redditPreview.setAttribute('style', 'width: 80%');\n redditPost.appendChild(redditPreview);\n }\n\n redditPostDiv.appendChild(redditPost);\n postSection.appendChild(redditPostDiv);\n}", "function renderPost() {\n let result_post = document.querySelector(\"#post-result\");\n let template = document.querySelector(\"#post-template\");\n result_post.innerHTML = \"\";\n for (i in posts) {\n let el = template.cloneNode(true);\n el.querySelector(\".card-header > h6\").innerText = `${posts[i].date}`;\n el.querySelector(\".card-header > .pointer\").setAttribute(\n \"onclick\",\n `removePost(${i})`\n );\n el.querySelector(\n \".card-body > .card-text\"\n ).innerText = `${posts[i].message}`;\n el.style.display = \"block\";\n result_post.appendChild(el);\n }\n}", "function createHTML(postsData) {\n var postlistHTML = '';\n var api_value = document.getElementById(\"restapi\").value;\n for (i = 0; i < postsData.length; i++) {\n\n postlistHTML += '<div class=\"slider--item\"' + '>'\n if (postsData[i].episode_featured_image) {\n postlistHTML += '<a target=\"_blank\" href=' + postsData[i].link + '><img src=' + postsData[i].episode_featured_image + '></a>';\n }\n postlistHTML += '<div class=\"slider--content\">'\n postlistHTML += '<h4 class=\"slider--title\"> <a target=\"_blank\" href=' + postsData[i].link + '>' + postsData[i].title.rendered + '</a></h4 >';\n postlistHTML += '<div class=\"slider--date\">' + new Date(postsData[i].date.substring(0, 10)).toDateString() + '</div>';\n postlistHTML += '<div class=\"slider--excerpt\">' + postsData[i].excerpt.rendered + '</div>';\n postlistHTML += '</div>';\n postlistHTML += '</div>';\n\n\n }\n PostsContainer.innerHTML = postlistHTML;\n }", "function formatPostHTML(j) {\n\tlet paragraphHTMLString = \"\";\n\tfor (i=0; i < blogEntries[j].paragraphs.length; i++) {\n\tparagraphHTMLString += `<p>${blogEntries[j].paragraphs[i]}</p>`;\n\t}\n\tprimaryContent.innerHTML += `<article>\n\t\t\t\t<h3>${blogEntries[j].title}</h3>\n\t\t\t\t<span>${blogEntries[j].date}</span>\n\t\t\t\t${paragraphHTMLString}\n\t\t\t\t</article>`;\n\t}", "function create_post(post, type, user) {\n const div = document.createElement('div');\n div.id = `post-${post['id']}`;\n document.querySelector('#posts').append(div);\n // Format the post\n format_post(post, type, user);\n}", "function newPostDom(title, postContent) {\n var dom = `<div class=\"main-post\">\n <div class=\"post-header\">\n <div class=\"user-img\">\n <img src=\"images/user-post-1.png\" alt=\"\">\n </div>\n <div class=\"user\">\n <h1>Mark Klein</h1>\n <span>uploaded a video</span>\n </div>\n <div class=\"time\">10 mins ago\n <a href=\"#\" class=\"edit-menu-btn\">\n <i class=\"fa fa-ellipsis-v\" aria-hidden=\"true\"></i>\n </a>\n <ul class=\"slide-menu\">\n <li>\n <a href=\"#\">Edit</a>\n </li>\n <li>\n <a href=\"#\" class=\"delete\">Delete</a>\n </li>\n </ul>\n </div>\n </div>\n <div class=\"post-content\">\n <div class=\"content\">\n <h2>`+ title + `</h2>\n <div class=\"text-content\">\n <p>`+ postContent + `</p>\n </div>\n </div>\n </div>\n <div class=\"share-section\">\n <ul>\n <li>\n <span class=\"like-count\">14</span>\n <i class=\"fa fa-thumbs-o-up addLike\" aria-hidden=\"true\"></i>\n </li>\n <li>\n <span class=\"comment-count\">7</span>\n <i class=\"fa fa-commenting-o\" aria-hidden=\"true\"></i>\n </li>\n <li>\n <div class=\"share-links\">\n <ul>\n <li>\n <a href=\"#\">\n <i class=\"fa fa-facebook\" aria-hidden=\"true\"></i>\n </a>\n </li>\n <li>\n <a href=\"#\">\n <i class=\"fa fa-twitter\" aria-hidden=\"true\"></i>\n </a>\n </li>\n <li>\n <a href=\"#\">\n <i class=\"fa fa-instagram\" aria-hidden=\"true\"></i>\n </a>\n </li>\n <li>\n <a href=\"#\">\n <i class=\"fa fa-pinterest\" aria-hidden=\"true\"></i>\n </a>\n </li>\n </ul>\n </div>\n <i class=\"fa fa-share-alt\" aria-hidden=\"true\"></i>\n </li>\n </ul>\n </div>\n <div class=\"add-comment-post\">\n <div class=\"row\">\n <div class=\"col-md-12\">\n <form>\n <img src=\"images/profil1.png\" alt=\"profile\" class=\"comment-img\">\n <div class=\"input-group\">\n <input type=\"text\" class=\"form-control\" placeholder=\"&#xf040; Add comment\">\n <span class=\"input-group-btn\">\n <button class=\"btn button-video\" type=\"button\">\n <i class=\"fa fa-video-camera\" aria-hidden=\"true\"></i>\n </button>\n <button class=\"btn button-send\" type=\"button\">Send</button>\n </span>\n </div>\n </form>\n </div>\n </div>\n </div>\n</div>`;\n\n return dom;\n}", "generate()\n {\n this.post = document.createElement(\"div\");\n this.post.setAttribute(\"id\", \"haiku\"+this.id);\n this.post.setAttribute(\"class\", \"posts \" + this.gridClass);\n \n let postElements = [];\n\n let post_header = document.createElement(\"div\");\n post_header.setAttribute(\"class\", \"post-header\");\n post_header.setAttribute(\"style\", \"background-image: url('../uploads/background/\" + this.background + \"');\");\n let posts_haiku = document.createElement(\"div\");\n posts_haiku.setAttribute(\"class\", \"posts-haiku\");\n let post_haiku = document.createElement(\"div\");\n post_haiku.setAttribute(\"class\", \"post-haiku\");\n post_haiku.innerHTML = this.content;\n posts_haiku.appendChild(post_haiku);\n post_header.appendChild(posts_haiku);\n postElements.push(post_header);\n\n if(this.contentNative != \"NO\")\n {\n let lang_switch = document.createElement(\"div\");\n lang_switch.setAttribute(\"class\", \"lang-switch\");\n let lang_switcher = document.createElement(\"label\");\n lang_switcher.setAttribute(\"class\", \"lang-switcher\");\n let lang_input = document.createElement(\"input\");\n lang_input.setAttribute(\"type\", \"checkbox\");\n lang_input.setAttribute(\"class\", \"language-value\");\n let lang_slider = document.createElement(\"span\");\n lang_slider.setAttribute(\"class\", \"lang-slider\");\n lang_switcher.appendChild(lang_input);\n lang_switcher.appendChild(lang_slider);\n lang_switch.appendChild(lang_switcher);\n postElements.push(lang_switch);\n }\n\n let post_nav = document.createElement(\"div\");\n post_nav.setAttribute(\"class\", \"post-nav\");\n\n var post_nav_dot = document.createElement(\"div\");\n post_nav_dot.setAttribute(\"class\", \"post-nav-dot\");\n post_nav.appendChild(post_nav_dot);\n\n let post_nav_handwriting = document.createElement(\"div\");\n post_nav_handwriting.setAttribute(\"class\", \"post-nav-handwriting\");\n post_nav_handwriting.setAttribute(\"id\", \"post-nav-handwriting\");\n post_nav_handwriting.setAttribute(\"style\", \"background-image: url(../uploads/handwriting/\"+ this.handwriting +\")\");\n let post_nav_handwriting_close = document.createElement(\"div\");\n post_nav_handwriting_close.setAttribute(\"class\", \"post-nav-handwriting-close\");\n post_nav_handwriting_close.setAttribute(\"id\", \"post-nav-handwriting-close\");\n post_nav_handwriting.appendChild(post_nav_handwriting_close);\n post_nav.appendChild(post_nav_handwriting);\n\n var post_nav_sub = document.createElement(\"div\");\n post_nav_sub.setAttribute(\"class\", \"post-nav-sub\");\n\n let options = [\"Handwriting\", \"Report\"];\n\n if(this.loggedIn == true)\n options = [\"Handwriting\", \"Edit\", \"Delete\"];\n \n options.forEach(option => {\n let post_nav_sub_option = document.createElement(\"div\");\n post_nav_sub_option.setAttribute(\"class\", \"post-nav-sub-option\");\n post_nav_sub_option.textContent = option;\n post_nav_sub.appendChild(post_nav_sub_option);\n });\n\n post_nav.appendChild(post_nav_sub);\n\n postElements.push(post_nav);\n\n let post_footer = document.createElement('div');\n post_footer.setAttribute(\"class\", \"post-footer\");\n\n let post_author = document.createElement('div');\n post_author.setAttribute(\"class\", \"post-author\");\n post_author.textContent = this.authorName;\n post_footer.appendChild(post_author);\n\n let post_country = document.createElement('div');\n post_country.setAttribute(\"class\", \"post-country\");\n post_country.textContent = this.authorCountry;\n post_footer.appendChild(post_country);\n\n let post_like = document.createElement('div');\n post_like.setAttribute(\"class\", \"post-like\");\n if(this.likeStatus == true)\n post_like.style.backgroundImage = \"url('img/icons/heart_full_normal.svg')\";\n\n let post_like_counter = document.createElement('span');\n post_like_counter.textContent = this.likes;\n post_like.appendChild(post_like_counter);\n post_footer.appendChild(post_like);\n\n postElements.push(post_footer);\n\n postElements.forEach(element => {\n this.post.appendChild(element);\n });\n }", "function formatPost() {\n const h = document.querySelector('#headline').value;\n const c = document.querySelector('#content').innerHTML;\n const post = formatHeadline(h) + '\\n' + formatContent(c) + '\\n<hr>\\n';\n return post;\n}", "function createHTML(postsData) {\n var ourHTMLString = '';\n var thumbUrl = '';\n\n ourHTMLString = \"<ul class=listado_equipo>\";\n for (i = 0; i < postsData.length; i++) {\n\n if(postsData[i].better_featured_image != null){\n thumbUrl = postsData[i].better_featured_image.source_url;\n }else{\n thumbUrl = 'http://www.carey.cl/wp-content/uploads/2010/01/no-image-133x166.jpg';\n }\n\n //console.log(thumbUrl);\n ourHTMLString += '<li><div class=click-to-top><img src='+ thumbUrl + ' width=197 height=247 class=lazy /><div><span>' + postsData[i].title.rendered +'<br>'+ postsData[i].acf.cargo_esp +'</span></div></div></li>';\n //ourHTMLString += postsData[i].content.rendered;\n\n }\n ourHTMLString += \"</ul>\";\n equipo.innerHTML = ourHTMLString;\n}", "function tumblr2html ( blog, options ) {\n\n // Maps type of posts posts to specific formatting\n var formats = {\n 'regular':\n '<article class=\"post\">' +\n '<h2>{regular-title}</h2>' +\n '<div>{regular-body}</div>' +\n '</article>',\n 'quote':\n '<article class=\"quote\">' +\n '<blockquote>{quote-text}</blockquote>' +\n '<span>{quote-source}</span>' +\n '</article>',\n 'photo':\n '<article class=\"photo\">' +\n '<img src=\"{photo-url-500}\">' +\n '{photo-caption}' +\n '</article>',\n 'link':\n '<article class=\"link\">' +\n '<a href=\"{link-url}\">{link-text}</a>' +\n '{link-description}' +\n '</article>',\n 'conversation': function (post) {\n return '<article class=\"conversation\">' +\n post.conversation.map(function (convo) {\n return interpolate(\n \"<p><span>{name}</span>: {phrase}</p>\",\n convo\n );\n }).join(\"\\n\") +\n \"</article>\";\n },\n 'audio':\n '<article class=\"audio\">' +\n '{audio-player}' +\n '{audio-caption}' +\n '</article>'\n };\n\n // Grab any format overrides from the options hash\n if ( options.formats ) {\n for ( var key in options.formats ) {\n if ( options.formats.hasOwnProperty(key) ) {\n formats[key] = options.formats[key];\n }\n }\n }\n\n /** Executed after the Tumblr API loads */\n function onLoad () {\n var posts = window.tumblr_api_read.posts; // jshint ignore:line\n\n var html =\n posts\n .slice(\n 0,\n options.limit ?\n Math.min(posts.length, options.limit) :\n posts.length\n )\n .map(function (post) {\n var format = formats[post.type];\n if ( format ) {\n if ( typeof format === \"string\" ) {\n return interpolate( format, post );\n }\n else if ( typeof format === \"function\" ) {\n return format(post);\n }\n }\n return \"\";\n })\n .join(\"\\n\");\n\n var anchor = typeof options.elem === \"string\" ?\n document.getElementById(options.elem) :\n options.elem;\n\n if ( anchor.nodeName === \"SCRIPT\" ) {\n var div = document.createElement(\"section\");\n div.innerHTML = html;\n [].slice.call(div.childNodes)\n .reverse()\n .reduce(function (before, elem) {\n before.parentNode.insertBefore(elem, before);\n return elem;\n }, anchor);\n }\n else {\n anchor.innerHTML = html;\n }\n }\n\n var script = document.createElement(\"script\");\n script.addEventListener(\"load\", onLoad);\n script.src = \"http://\" + blog + \".tumblr.com/api/read/json\";\n document.head.appendChild(script);\n }", "render(isSingle) {\n const containerPost = document.createElement('div');\n containerPost.classList.add('post')\n\n const linkHTMLString = isSingle ?\n `<a href=\"./edit-post.html?id=${this.id}\">Edit</a>`\n : `<a href=\"./view-post.html?id=${this.id}\">View</a>`\n\n containerPost.innerHTML = `\n <h1>${this.title}</h1>\n <p> ${this.text}</p>\n ${linkHTMLString}\n `\n return containerPost;\n }", "function generatePosts(postObj, i){\n var str = '';\n // the 'i' is used to differentiate each div to help locate specific posts\n str += '<div class=\"postDiv\" id=\"postDiv' + i + '\">';\n str += '<h2 id=\"getTitle' + i + '\">' + postObj.Title + '</h2>';\n str += '<div id=\"getContent' + i + '\">' + postObj.Content + '</div>';\n str += '<br><br>';\n str += '<div id= \"actionBar' + i + '\">';\n // comment, like, and share buttons\n str += '<span id=\"Comment' + i + '\">';\n str += '<input type = \"text\" name = comment id = \"getCommentText' + i + '\"/>';\n str += '<input type=\"button\"value=\"Comment\"onclick=\"comment(this);\" id = \"commentButton' + i + '\">';\n str += '</span>';\n str += '<br><span id=\"Like' + i + '\">';\n str += '<input type=\"button\" value=\"Like\" onclick=\"like(this);\">';\n str += ' ' + postObj.Likes.length + ' Likes';\n str += '</span>';\n str += '<br><span id=\"Share' + i + '\">';\n str += '<input type=\"button\" value=\"Share\" onclick=\"share(this);\">';\n str += '</span>';\n str += '</div>';\n str += '<br>';\n str += '<div>Comments:</div>';\n str += '<br>';\n // adds the comments\n for (j in postObj.Comments) {\n str += '<div id=commentDiv>' + postObj.Comments[j].Content+ '</div>';\n }\n str += '</div>';\n // returns completed html\n return str;\n}", "function addToHTML() {\n for(var i = 0; i < blog.post.length; i++) {\n var article = document.querySelector('#blog_posts');\n var title = document.createElement('h1');\n var date = document.createElement('p');\n var image = document.createElement('img');\n var text = document.createElement('p');\n var blog_title = blog.post[i].title;\n var blog_date = blog.post[i].date;\n var blog_image = blog.post[i].image;\n var blog_text = blog.post[i].text;\n title.textContent=blog_title;\n date.textContent=blog_date;\n image.setAttribute('src', blog_image);\n text.textContent=blog_text;\n article.appendChild(title);\n article.appendChild(date);\n article.appendChild(image);\n article.appendChild(text);\n }\n}", "function beautifyPost(post) {\n // add title-note <span>s to parens in headings\n forEach(post.querySelectorAll('h1, h2, h3'), function (heading) {\n heading.innerHTML = heading.innerHTML.replace(/\\(.*?\\)/g, '<span class=\"title-note\">$&</span>');\n });\n // wrap images with captions into <figure> elements\n forEach(post.querySelectorAll('img[title]'), function (img) {\n var figure = document.createElement('figure'),\n figcaption = document.createElement('figcaption'),\n text = img.getAttribute('title');\n\n figcaption.innerHTML = text;\n\n img.parentNode.insertBefore(figure, img);\n figure.appendChild(img);\n figure.appendChild(figcaption);\n\n // remove only-child figures from restrictive paragraphs\n var p = figure.parentNode;\n if (p.childNodes.length == 1) {\n p.parentNode.insertBefore(figure, p);\n p.parentNode.removeChild(p);\n }\n });\n // create table of contents based on fragments\n var toc = document.createElement('div'),\n fragments = post.querySelectorAll('.fragment'),\n links = [];\n if (fragments.length > 0) {\n forEach(post.querySelectorAll('.fragment'), function (fragment) {\n links.push('<a href=\"#' + fragment.id + '\">' + fragment.innerHTML.toLowerCase() + '</a>');\n });\n toc.className = 'article-contents';\n toc.innerHTML = '<span class=\"article-contents__label\">Contents:</span> ' +\n links.join(' &nbsp;<span class=\"article-contents__divider\">/</span>&nbsp; ');\n post.insertBefore(toc, post.children[0]);\n }\n }", "function showPostPreview() {\n document.querySelector('#fullHTML').value = formatPost();\n document.querySelector('#preview').innerHTML = document.querySelector('#fullHTML').value;\n //document.querySelector('#nothing').value = document.querySelector('#content').innerHTML;\n aTagBlank();\n return formatPost()\n}", "function createPostDiv(postData) {\n // RandomNuber\n var randNum = Math.floor(Math.random() * 10);\n\n var postId = \"post\" + postData.id;\n var Post = $('<div class=\"postings\">');\n Post.attr('id', postId);\n\n Post.append('<img src= ' + postImage(postData.category) + ' + width=\"250px\">');\n // Post.append('<img src=\"https://s-media-cache-ak0.pinimg.com/originals/28/81/4d/28814dbf59005e2f4953ee62f76df0b6.jpg\" width=\"250px\">');\n Post.append(\"<p>\" + postData.title + \"</p>\");\n Post.append(\"<p>\" + postData.category + \"</p>\");\n Post.append(\"<p>\" + postData.distance + \"</p>\");\n Post.append('<button data-toggle=\"modal\" class=\"detail-btn\" href=\"#postInfo\" >Details</button>');\n // var button = $('<button type=\"button\" class=\"btn btn-default comment-btn\" id=\"message\" aria-label=\"Left Align\"></button>');\n // Post.append(button);\n // button.append('<span class=\"glyphicon glyphicon-comment\" aria-hidden=\"true\"></span>');\n return Post;\n\n }", "function projectHtmlFromPrjct(key, prjct){\n return '<div class=\"item row\" style=\"box-shadow: 2px 2px #29B6F6;\">'\n +' <div class=\"blog-card col-sm-12 col-md-7\">'\n + '<div class=\"media-block\">'\n + ' <a href=\"projects/project.html?pagekey='+prjct.id+'\">'\n + ' <img class=\"post-image img-responsive\" src=\"'+prjct.prjctimg+'\" alt=\"blog-post\" />'\n + '<div class=\"mask\"></div>'\n + '<div class=\"post-date\"><span class=\"month\">'+prjct.date+'</span></div>'\n +'</a>'\n +'</div>'\n +'<div class=\"post-info\">'\n + ' <ul class=\"category'\n + ' <li><a href=\"#\">'+prjct.subject+'</a></li>'\n + '</ul>'\n + '<a href=\"projects/project.html?pagekey='+prjct.id+'\"><h4 class=\"blog-item-title\">'+prjct.title+'</h4></a>'\n +'</div>'\n +'</div>'\n\t\t\t\t\t +'<div class=\"blog-card col-sm-10 col-md-5 \">'\n\t\t\t\t\t\t+'<h3><strong>'+ prjct.title+'</strong></h3>'\n\t\t\t\t\t\t+'<i>'+prjct.date+'</i><br/>'\n\t\t\t\t\t\t+prjct.subject+'<hr/>'\n\t\t\t\t\t\t+prjct.description+'<br/>'\n\t\t\t\t\t +'</div>'\n +'</div>'+'<br/><br/>'\n}", "function createPostElement(\n title = \"\",\n content = \"\",\n id = \"\",\n name = \"\",\n date = \"\"\n) {\n var postContainer = document.createElement(\"DIV\");\n var header = document.createElement(\"H3\");\n var p = document.createElement(\"P\");\n var hiddenIdTag = document.createElement(\"P\");\n var creator = document.createElement(\"H6\");\n\n postContainer.className = \"row post mx-auto\";\n header.className = \"title\";\n p.className = \"description\";\n hiddenIdTag.className = \"hide\";\n\n header.innerText = title;\n p.innerText = content;\n creator.innerText = \"posted by: \" + name + \" at: \" + date;\n hiddenIdTag.innerText = id;\n\n postContainer.addEventListener(\"click\", () => {\n location.assign(`/post/${id}`);\n });\n\n postContainer.appendChild(creator);\n postContainer.appendChild(header);\n postContainer.appendChild(p);\n postContainer.appendChild(hiddenIdTag);\n\n myPostContainer.appendChild(postContainer);\n}", "function projectHtmlFromObject(key, project){\n return '<div class=\"item\">'\n +' <div class=\"blog-card\">'\n + '<div class=\"media-block\">'\n + ' <a href=\"blog/blog-post.html?pagekey='+project.id+'\">'\n + ' <img class=\"post-image img-responsive\" src=\"'+project.blogimg+'\" alt=\"blog-post\" />'\n + '<div class=\"mask\"></div>'\n + '<div class=\"post-date\"><span class=\"month\">'+project.date+'</span></div>'\n +'</a>'\n +'</div>'\n +'<div class=\"post-info\">'\n + ' <ul class=\"category'\n + ' <li><a href=\"#\">'+project.subject+'</a></li>'\n + '</ul>'\n + '<a href=\"blog/blog-post.html?pagekey='+project.id+'\"><h4 class=\"blog-item-title\">'+project.title+'</h4></a>'\n +'</div>'\n +'</div>'\n +'</div>'\n \n}", "function WisePost() {\n\n\tthis.postWidget = document.createElement('DIV');\n\tthis.postWidget.style.width = \"280px\";\n\tthis.postWidget.style.height = \"250px\";\n\tthis.postWidget.style.backgroundColor = \"#FFFFDD\";\n\tthis.postWidget.style.float = \"left\";\n\tthis.postWidget.style.marginTop = \"50px\";\n\tthis.postWidget.style.marginBottom = \"50px\";\n\tthis.postWidget.style.marginLeft = \"25px\";\n\tthis.postWidget.style.marginRight = \"25px\";\n\tthis.postWidget.style.borderRadius = \"5px\";\n this.postWidget.style.boxShadow = \"0 0 5px rgba(0,0,0,.3)\";\n\n\tthis.postWidget.wTitle = document.createElement('DIV'); this.postWidget.appendChild(this.postWidget.wTitle);\n\tthis.postWidget.wContent = document.createElement('DIV'); this.postWidget.appendChild(this.postWidget.wContent);\n\n\tcontent.postsContainer.posts.appendChild(this.postWidget);\n\n\tthis.setTitle = function(text){\n\t\tthis.postWidget.wTitle.innerText = text;\n\t}\n\n\tthis.setContent = function(text){\n\t\tthis.postWidget.wContent.innerText = text;\n\t}\n\n}", "function create_posts(post_json)\n{\n var parsed_json = JSON.parse(post_json);\n var html_string = '';\n $.each(parsed_json, function (jsonkey, jsonval) {\n html_string += '<ul class=\"thread accordion\" data-accordion data-allow-all-closed=\"true\">';\n html_string += '<li class=\"accordion-item\" data-accordion-item>';\n html_string += '<a href=\"#\" class=\"accordion-title\"><span class=\"stat post_score\">-</span> points <div class=\"post_title\"></div></a>';\n html_string += '<div class=\"accordion-content post_details\" data-tab-content></div>';\n html_string += '</li></ul>';\n });\n\n $('#thread').html(html_string);\n\n return parsed_json;\n}", "function CreatePost(id, content) {\n\n var mainDiv = $('<div>').attr('class', 'col-sm-12 col-md-12');\n\n var panel = $('<div>').attr('class', 'panel panel-defualt');\n\n var panelBody = $('<div>').attr('class', 'panel-body');\n\n var media = $('<div>').attr('class', 'media');\n\n var mediaLeft = $('<div>').attr('class', 'media-left');\n\n var imglink = $('<a>').attr('href', '../profile/' + id);\n\n var img = $('<img>').attr({\n 'src': '/static/img/profile.png',\n 'class': 'media-object',\n 'alt': 'profile'\n });\n\n var mediaBody = $('<div>').attr('class', 'media-body');\n\n var bodyDiv = $('<div>').text(content);\n\n var mediaHeading = $('<div>').attr('class', 'media-heading');\n var innerHeading = $('<h4>').text(\"User ID: \" + id);\n\n mediaBody.append(mediaHeading.append(innerHeading));\n mediaBody.append(bodyDiv);\n mediaLeft.append(imglink.append(img));\n\n media.append(mediaLeft);\n media.append(mediaBody);\n mainDiv.append(panel.append(panelBody.append(media)));\n\n return mainDiv;\n}", "function makePost(postData) {\n let postList = document.getElementById(\"post-list\");\n let container = document.createElement(\"div\");\n container.id = postData.title;\n let postTitle = postData.title;\n let postContent = postData.content;\n let postDate = postData.date;\n\n container.innerHTML = `\n <h2>${postTitle} ${postDate}</h2>\n <p>${postContent}</p>\n `;\n\n let editBtn = document.createElement(\"button\");\n editBtn.innerHTML = \"Edit\";\n editBtn.type = \"button\";\n editBtn.id = \"edit:\" + postTitle;\n editBtn.addEventListener(\"clicked\", editPost);\n container.appendChild(editBtn);\n\n let deleteBtn = document.createElement(\"button\");\n deleteBtn.innerHTML = \"Delete\";\n deleteBtn.type = \"button\";\n deleteBtn.id = \"delete:\" + postTitle;\n editBtn.addEventListener(\"clicked\", deletePost);\n container.appendChild(deleteBtn);\n\n postList.appendChild(container);\n console.log(\"make post\");\n}", "function randomPost() {\n // Paragraphs that will appear in the post\n var paragraphs = [\n '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras vitae suscipit arcu. Praesent pretium orci neque, non egestas massa suscipit non. In urna ligula, pretium ac magna in, consectetur venenatis dui. Etiam id commodo neque, vel semper nunc. Vivamus porttitor condimentum pulvinar. Quisque et consequat mi. Suspendisse luctus, quam in dapibus venenatis, velit erat malesuada lacus, dapibus tincidunt neque ex vitae leo. Suspendisse fermentum sit amet urna eu dignissim. Curabitur vel nibh quis justo volutpat porttitor et tempus sem.</p>',\n '<p>In a luctus purus, in tempus mi. Integer vulputate tincidunt arcu quis aliquet. Maecenas sollicitudin nec nisi sit amet dictum. Curabitur sagittis nulla id sem vulputate, eget blandit nibh ullamcorper. Nam feugiat elementum pharetra. Vestibulum a purus eget mi mattis tincidunt a sed felis. Sed pretium dignissim elementum. Cras est arcu, posuere et justo in, vehicula rutrum elit. Phasellus dictum risus libero, non cursus neque faucibus a. Nunc dignissim at purus vitae condimentum. Curabitur in libero mi.</p>',\n '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed at tristique nibh, sed congue ligula. Curabitur eu porttitor tellus. Aliquam eu mollis tortor. Donec tortor sapien, molestie eu turpis vel, ultrices pulvinar orci. Aenean sagittis sem sit amet viverra maximus. Morbi id enim ipsum. Curabitur luctus placerat erat ut volutpat. In quis eros mattis, rutrum neque ut, malesuada neque.</p>',\n '<p>Integer erat eros, vestibulum at tortor vitae, sollicitudin finibus est. Aliquam ornare, elit nec gravida sagittis, sapien nibh elementum felis, eu eleifend eros lectus non mi. Nulla vel nisl scelerisque, consectetur nibh vel, malesuada lacus. Nam lobortis accumsan nisl consequat dictum. Praesent eget lobortis lorem. Ut sed ultrices enim. Nam nec ultricies felis.</p>',\n '<p>Donec hendrerit dolor id auctor ullamcorper. Curabitur ut mauris dolor. Quisque vitae cursus eros, ac rutrum sem. Aenean in turpis turpis. Fusce sit amet libero id massa dictum fermentum at eget arcu. Vestibulum eget blandit urna. In eu tristique augue. Phasellus augue risus, porttitor vel arcu nec, tincidunt laoreet tellus. Nam ornare leo dapibus ipsum dictum interdum.</p>',\n '<p>Nulla molestie porttitor justo vitae pharetra. Proin non convallis lacus, eget malesuada metus. Duis aliquam eu massa molestie rhoncus. Vestibulum a malesuada nulla. Morbi at libero tempus, hendrerit quam vitae, auctor eros. Vivamus tincidunt enim a est tincidunt, sed fringilla erat placerat. Nulla cursus, eros sed posuere sagittis, dui est lobortis tellus, id dapibus dui sem eget enim. Vestibulum eleifend lacus velit, ut suscipit nisi bibendum at. Nulla facilisi. Aenean luctus tellus eget nisi vestibulum, eget interdum lectus efficitur.</p>',\n '<p>Quisque facilisis aliquet dui, ut blandit odio vulputate et. Ut ac nisl turpis. Pellentesque scelerisque massa sit amet ipsum commodo cursus. Aenean eget ante et neque gravida tempor. Phasellus aliquam, purus quis malesuada vestibulum, sem mi cursus justo, a convallis purus dolor non lorem. Nunc dapibus vehicula nisi, eget egestas tellus lacinia vel. Nullam nisl ipsum, vehicula dignissim feugiat eu, semper nec arcu. Duis porttitor ut ex eget commodo. Curabitur accumsan diam ac euismod tincidunt. Cras dui urna, volutpat quis vehicula vitae, rhoncus a lacus. Curabitur ut purus aliquet, venenatis felis in, laoreet massa. Nullam lobortis sollicitudin aliquam. Quisque nec nisl eu sem vulputate venenatis. Proin sagittis erat sit amet sem vestibulum vehicula. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.</p>'\n ];\n\n // Shuffle the paragraphs\n for (var i = paragraphs.length - 1; !!i; --i) {\n var j = Math.floor(Math.random() * i);\n var p = paragraphs[i];\n paragraphs[i] = paragraphs[j];\n paragraphs[j] = p;\n }\n\n // Generate the post\n var post = '<li>';\n post += '<article>';\n post += '<h1>Random Article!</h1>';\n post += paragraphs.join('');\n post += '</article>';\n post += '</li>';\n\n return post;\n}", "function CreateNewPost(title, body, id) {\n var template = $(\"#templatePost\").text();\n console.log(template);\n\n // return template;\n $(\"body\").append(template);\n\n var $article = $(\"article:last-of-type\");\n\n $article.find(\"h2\").html(title);\n\n body = body.replace(\"\\n\", \"<br>\");\n\n $article.find(\"p\").html(body);\n\n $article.find(\"button\").attr(\"value\", id);\n $article.find(\"button\").attr(\"onClick\", \"ToggleComments(this)\");\n\n //We place our comments in this\n $article.find(\"section\").attr(\"id\", \"comments-\" + id);\n\n}", "showPost(data) {\n\t\t// Put the data we get from the server into this.postOutput\n\t\t\tdata.forEach(element => {\n\t\t\t\t\n\t\t\t\tthis.postOutput.innerHTML += `\n\t\t\t\t\t<div>\n\t\t\t\t\t\t${\n\t\t\t\t\t\t\t(element.img) ? `<img src=\"${element.img}\">` : \"\"\n\t\t\t\t\t\t}\n\t\t\t\t\t\t<p>${element.text}</p>\n\t\t\t\t\t</div>\n\t\t\t\t`\n\t\t\t});\n\t}", "function addPost(postText) {\r\n\t\r\n\topen = '<tr class=\"post_row\"><td class=\"post_cell\">'\r\n\tclose = '</td></tr>'\r\n\tcontent = processText(postText)\r\n\t\r\n\telement = open+content+close\r\n\tfeed = $(\"#feed_body\")[0]\r\n\tfeed.insertAdjacentHTML(\"afterbegin\", element)\r\n}", "function PostToHTML(relpath, markdown_body) {\n var callback = function (text) {\n\n /* circumvent github's auto-meta parsing */\n text = text.replace(\"(((\",'---');\n text = text.replace(\")))\",'---');\n\n /* write some HTML to format the data */\n var body = document.getElementById(markdown_body);\n var post_head = document.createElement('div');\n var post_body = document.createElement('div');\n body.appendChild(post_head);\n body.appendChild(post_body);\n\n if ((isBlank(text)) || (text == null) || (text == 'null') || (typeof text === 'undefined')) {\n post_head.innerHTML = 'Unable to load text for: '+relpath;\n return;\n }\n\n /* parse YAML header */\n var obj = jsyaml.loadFront(text)\n\n /* check for post meta data */\n var date = typeof obj.Date !== 'undefined' ? obj.Date.toDateString() : '';\n var author = typeof obj.Author !== 'undefined' ? obj.Author : '';\n var summary = typeof obj.Summary !== 'undefined' ? obj.Summary : '';\n var title = typeof obj.Title !== 'undefined' ? obj.Title : '';\n\n /* write some HTML to format the data */\n post_head.innerHTML = '<b>'+title+'</b><br> &nbsp; &nbsp; '+author+\n ' | <small>'+date+'</small><br><br>';\n\n /* convert the unparsed content as markdown */\n post_body.innerHTML = Showdown(obj.__content);\n $('.linenums').removeClass('linenums');\n prettyPrint();\n };\n getFile(relpath, callback);\n}", "function createPost(title, price, description, url){\n // Set page title to post title.\n document.title = title;\n\n // Book title header.\n document.getElementById(\"title\").innerHTML = title;\n\n // Gets container to post it in.\n var content = document.getElementById(\"container\");\n\n\n // Getting images and setting text.\n document.getElementById(\"image\").src = url;\n document.getElementById(\"price\").innerHTML = \"$\" + price;\n document.getElementById(\"description\").innerHTML = description;\n}", "function prepareDocument(){\r\n\tlinkify(document.getElementById('ctl00_ContentPlaceHolder1_DiscussionText'));\r\n\tvar posts = getPostBodies();\r\n\tfor ( var i=0; i<posts.length; i++ ) {\r\n\t\tlinkify(posts[i]);\r\n\t}\r\n}", "function postView (targetname, post) {\n\n let target = document.getElementById(targetname)\n let template = Handlebars.compile(\n document.getElementById(\"post-template\").textContent\n )\n\n target.innerHTML = template(post);\n\n }", "function build() {\n // Tidy directory first\n // to ensure all files\n // are in the right place\n tidy();\n\n mmark.parseDirectory(process.cwd() + \"/posts\", function(err, posts){\n if (err) {\n console.log(err.red);\n }\n\n var feed_html = \"\";\n for (post in posts) {\n var post = posts[post];\n\n // Fetch post data\n var title = post['meta']['title'];\n var date = post['meta']['date'];\n var markd = post['content'];\n\n // Produce HTML\n var html = [\n '<div class=\"post\">',\n '<h2 class=\"post-title\">',\n title,\n '</h2>',\n '<h4 class=\"post-date\">',\n date,\n '</h4>',\n markd,\n '</div>'\n ].join();\n\n feed_html += html;\n }\n var out = tinyt.renderFile(template_source, {feed: feed_html});\n fs.writeFile(html_source, out, function(data, err){\n if (err) {\n console.log(err);\n }\n console.log(\"All posts succesfully rendered ✔\".green);\n });\n });\n\n}", "function displayPost(post) {\r\n\r\n}", "function postTemplate() {\n var width = 550,\n height = 180,\n postData = [],\n individualPostSectionColor = \"white\",\n individualPostSectionHeight = 115,\n userIcon = \"M1600 1405q0 120-73 189.5t-194 69.5h-874q-121 0-194-69.5t-73-189.5q0-53 3.5-103.5t14-109 26.5-108.5 43-97.5 62-81 85.5-53.5 111.5-20q9 0 42 21.5t74.5 48 108 48 133.5 21.5 133.5-21.5 108-48 74.5-48 42-21.5q61 0 111.5 20t85.5 53.5 62 81 43 97.5 26.5 108.5 14 109 3.5 103.5zm-320-893q0 159-112.5 271.5t-271.5 112.5-271.5-112.5-112.5-271.5 112.5-271.5 271.5-112.5 271.5 112.5 112.5 271.5z\",\n likesIcon = \"M21.216 8h-2.216v-1.75l1-3.095v-3.155h-5.246c-2.158 6.369-4.252 9.992-6.754 10v-1h-8v13h8v-1h2l2.507 2h8.461l3.032-2.926v-10.261l-2.784-1.813zm.784 11.225l-1.839 1.775h-6.954l-2.507-2h-2.7v-7c3.781 0 6.727-5.674 8.189-10h1.811v.791l-1 3.095v4.114h3.623l1.377.897v8.328z\",\n commentsIcon = \"M1408 768q0 139-94 257t-256.5 186.5-353.5 68.5q-86 0-176-16-124 88-278 128-36 9-86 16h-3q-11 0-20.5-8t-11.5-21q-1-3-1-6.5t.5-6.5 2-6l2.5-5 3.5-5.5 4-5 4.5-5 4-4.5q5-6 23-25t26-29.5 22.5-29 25-38.5 20.5-44q-124-72-195-177t-71-224q0-139 94-257t256.5-186.5 353.5-68.5 353.5 68.5 256.5 186.5 94 257zm384 256q0 120-71 224.5t-195 176.5q10 24 20.5 44t25 38.5 22.5 29 26 29.5 23 25q1 1 4 4.5t4.5 5 4 5 3.5 5.5l2.5 5 2 6 .5 6.5-1 6.5q-3 14-13 22t-22 7q-50-7-86-16-154-40-278-128-90 16-176 16-271 0-472-132 58 4 88 4 161 0 309-45t264-129q125-92 192-212t67-254q0-77-23-152 129 71 204 178t75 230z\",\n commentedByIcon = \"M1792 896q0 174-120 321.5t-326 233-450 85.5q-70 0-145-8-198 175-460 242-49 14-114 22-17 2-30.5-9t-17.5-29v-1q-3-4-.5-12t2-10 4.5-9.5l6-9 7-8.5 8-9q7-8 31-34.5t34.5-38 31-39.5 32.5-51 27-59 26-76q-157-89-247.5-220t-90.5-281q0-130 71-248.5t191-204.5 286-136.5 348-50.5q244 0 450 85.5t326 233 120 321.5z\",\n iconColor = \"green\",\n wordsLengthMesage = 90,\n wordsLengthPostStory = 55,\n postCreationDate = '',\n commentCreationDate = '',\n postStory,\n postMessage,\n commentSenderName,\n commentMessage,\n postCommentCount,\n postLikeCount,\n postUserName = userName;\n\n\n /*\n Function to get the pot story without first name if psot story is present\n */\n function cutShortPostStory(pstStory) {\n //cut the post story upto the limit ;todo: could be improvised\n\n if (pstStory == \"\") {\n return \"\";\n }\n else {\n //make the first 2 spaces of the post as user name\n var indexOfFirstSpace = pstStory.indexOf(\" \");\n var sentenceAfterFirstName = pstStory.substring(indexOfFirstSpace + 1, pstStory.length);\n var lengthOfSecondSpace = sentenceAfterFirstName.indexOf(\" \");\n var tokens = pstStory.split(' ');\n postUserName = tokens[0] + \" \" + tokens[1];\n postUserName = pstStory.substring(0, eval(indexOfFirstSpace + lengthOfSecondSpace + 1));\n var postStory1 = pstStory.substring(eval(tokens[0].length + tokens[1].length + 2), pstStory.length)\n var postStory2 = (pstStory.length > wordsLengthPostStory) ? postStory1.substring(0, wordsLengthPostStory) + \"...\" : postStory1.substring(0, wordsLengthPostStory);\n return postStory2;\n }\n\n\n }\n\n function getPostData(postID) {\n //loop over chart\n for (var count = 0; count < chartData.length; count++) {\n if (chartData[count].app_specific_post_id == postID && chartData[count].is_post == \"1\") {\n\n //cut the post message upto the limit ;todo: could be improvised\n var postStory1 = (typeof chartData[count].post_story === 'undefined' || chartData[count].post_story === null) ? \"\" : chartData[count].post_story;\n postStory = cutShortPostStory(postStory1);\n\n postMessage = ((typeof chartData[count].post_message === 'undefined') || (chartData[count].post_message === null)) ? \"\" : chartData[count].post_message;\n postMessage = (postMessage == \"\") ? \"\" : (postMessage.length > wordsLengthMesage) ? postMessage.substring(0, wordsLengthMesage) + \"...\" : postMessage.substring(0, wordsLengthMesage);\n postCreationDate = new Date(chartData[count].created_time);\n postCommentCount = chartData[count].post_comment_count;\n postLikeCount = chartData[count].post_like_count;\n break;\n }\n\n\n }\n\n\n }\n\n var post = function (selection) {\n if (selection === 'undefined') {\n console.log(\"selection is undefined\");\n return;\n }\n\n if ((typeof postData == 'undefined') || (postData.length == 0)) {\n return;\n }\n\n //get the chart datas\n if (postData.is_post == \"1\") {\n postCreationDate = new Date(postData.created_time);\n //cut the post story upto the limit ;todo: could be improvised\n var postStory1 = (typeof postData.post_story === 'undefined' || postData.post_story === null) ? \"\" : postData.post_story;\n postStory = cutShortPostStory(postStory1);\n\n\n //cut the post message upto the limit ;todo: could be improvised\n postMessage = (typeof postData.post_message === 'undefined' || postData.post_message === null) ? \"\" : postData.post_message;\n postMessage = (postMessage == \"\") ? \"\" : postMessage.substring(0, wordsLengthMesage) + \"...\";\n postCommentCount = postData.post_comment_count;\n postLikeCount = postData.post_like_count;\n }\n else {\n commentCreationDate = new Date(postData.created_time);\n commentSenderName = postData.comment_sender_name;\n commentMessage = postData.comment_message;\n getPostData(postData.app_specific_post_id);\n }\n\n\n //create an outer group\n var selectedSvg = selection.append(\"svg\")\n .attr(\"width\", width)\n .attr(\"height\", (postData.is_post == \"1\") ? individualPostSectionHeight : height)\n //create a rectangle and fill it white for design\n selectedSvg.append(\"rect\")\n .attr(\"width\", width)\n .attr(\"height\", height)\n .attr(\"fill\", \"none\")\n .attr(\"class\", \"postMainSection\");\n //individual post\n var individualPost = selectedSvg.append(\"g\")\n .attr(\"transform\", \"translate(0,0)\")\n .attr(\"class\", \"individualPost\");\n //fill individualPost with white\n individualPost.append(\"rect\")\n .attr(\"fill\", individualPostSectionColor)\n .attr(\"width\", width)\n .attr(\"height\", individualPostSectionHeight);\n //create a post section\n var postSection = individualPost.append(\"g\")\n .attr(\"class\", \"postSection\");\n //story section\n var storySection = postSection.append(\"g\")\n .attr(\"class\", \"StorySection\");\n\n //add user icon\n var userIconElem = storySection.append(\"svg\")\n .attr(\"fill\", iconColor)\n .attr(\"width\", 30)\n .attr(\"height\", 30)\n .attr(\"viewBox\", \"0 0 1792 1792\")\n\n //add path for user icon\n\n userIconElem.append(\"path\")\n .attr(\"d\", userIcon);\n\n storySection.append(\"text\")\n .attr(\"transform\", \"translate(30,25)\")\n .attr(\"class\", \"userName\")\n .text(postUserName)\n\n\n storySection.append(\"text\")\n .attr(\"transform\", \"translate(140,25)\")\n .text(postStory)\n //Add date of post creation\n\n postSection.append(\"text\")\n .attr(\"transform\", \"translate(5,43)\")\n .attr(\"class\", \"dateDisplay\")\n .text(postCreationDate.toLocaleString(\"en-us\", {month: \"short\"}) + \" \" + postCreationDate.getDate() + \", \" + postCreationDate.getFullYear() + \" \" + postCreationDate.toLocaleTimeString())\n //append the full psot message\n postSection.append(\"text\")\n .attr(\"transform\", \"translate(5,70)\")\n .attr(\"class\", \"postMessage\")\n .text(postMessage)\n\n //Add the comment section\n var commentSection = selectedSvg.append(\"g\")\n .attr(\"transform\", \"translate(0,100)\")\n .attr(\"class\", \"commentSection\");\n\n //create section to add stats\n var statsSection = commentSection.append(\"g\")\n .attr(\"class\", \"statsSection\");\n // add section for like stats\n var likeStats = statsSection.append(\"g\")\n .attr(\"class\", \"likeStats\")\n .attr(\"transform\", \"translate(5,-15)\");\n\n //add like icon\n var likeIcon = likeStats.append(\"svg\")\n .attr(\"fill\", iconColor)\n .attr(\"width\", 20)\n .attr(\"height\", 20)\n .attr(\"viewBox\", \"0 0 24 24\")\n\n //add path for like icon\n\n likeIcon.append(\"path\")\n .attr(\"d\", likesIcon)\n // add the like count\n\n likeStats.append(\"text\")\n .attr(\"transform\", \"translate(32,15)\")\n .attr(\"id\", \"likeCount\")\n .text(postLikeCount);\n\n\n // add section for comment stats\n var commentStats = statsSection.append(\"g\")\n .attr(\"class\", \"CommentStats\")\n .attr(\"transform\", \"translate(70,-15)\");\n\n //add comments icon\n var commentIcon = commentStats.append(\"svg\")\n .attr(\"fill\", iconColor)\n .attr(\"width\", 20)\n .attr(\"height\", 20)\n .attr(\"viewBox\", \"0 0 1792 1792\")\n\n //add path for comments icon\n\n commentIcon.append(\"path\")\n .attr(\"d\", commentsIcon)\n // add the comments count\n commentStats.append(\"text\")\n .attr(\"transform\", \"translate(35,15)\")\n .attr(\"id\", \"commmentCount\")\n .text(postCommentCount);\n\n if (postData.is_post != \"1\") {\n //user comment in post section\n var commentStarts = commentSection.append(\"g\")\n .attr(\"class\", \"commentStats\")\n .attr(\"transform\", \"translate(5,40)\");\n\n //section for comment by user name and date of comment\n var commentNameAndDate = commentStarts.append(\"g\")\n .attr(\"class\", \"commentNameandDate\")\n .attr(\"transform\", \"translate(0,-2)\");\n ;\n\n var userCommentIcon = commentStarts.append(\"g\")\n .attr(\"transform\", \"translate(5,-22)\");\n\n //add the comment icon\n var svgComment = userCommentIcon.append(\"svg\")\n .attr(\"fill\", iconColor)\n .attr(\"width\", 25)\n .attr(\"height\", 25)\n .attr(\"viewBox\", \"0 0 1792 1792\")\n //add the path of the icon\n svgComment.append(\"path\")\n .attr(\"d\", commentedByIcon);\n //add commenter name\n var commentSender = commentNameAndDate.append(\"text\")\n .attr(\"transform\", \"translate(35,-2)\")\n .attr(\"class\", \"commentSenderName\")\n .text(commentSenderName);\n //find the widht occupied by this text\n var bboxSenderComment = commentSender.node().getBBox();\n //section for user comment on the post\n //add the commented text after the sender name\n commentNameAndDate.append(\"text\")\n .attr(\"transform\", \"translate(\" + eval(35 + bboxSenderComment.width + 5) + \",-2)\")\n .attr(\"class\", \"commentText\")\n .text(commentMessage);\n\n //add commented date\n commentNameAndDate.append(\"text\")\n .attr(\"transform\", \"translate(5,20)\")\n .attr(\"class\", \"dateDisplay\")\n .text(commentCreationDate.toLocaleString(\"en-us\", {month: \"short\"}) + \" \" + commentCreationDate.getDate() + \", \" + commentCreationDate.getFullYear() + \" \" + commentCreationDate.toLocaleTimeString());\n\n\n }\n\n\n return post;\n }\n post.postData = function (arg) {\n if (arguments.length == 0)\n return postData;\n postData = arg;\n return post;\n }\n post.height = function (arg) {\n if (arguments.length == 0)\n return height;\n height = arg;\n return post;\n }\n\n post.width = function (arg) {\n if (arguments.length == 0)\n return width;\n width = arg;\n return post;\n }\n\n\n return post;\n }", "function buildMessage (post) {\n let data = {\n 'response_type': 'in_channel',\n 'text': '<'+post.url+'|'+ post.title +'>',\n 'unfurl_links': true,\n 'unfurl_media': true,\n 'attachments': [\n {\n 'pretext': post.selftext,\n 'text': 'Fresh from ' + post.subreddit_name_prefixed + '! <https://www.reddit.com'+post.permalink+'|See on Reddit>',\n 'author_name': 'posted by ' + post.author.name + ' | Score: ' + post.score + ' | Comments: ' + post.num_comments,\n 'ts': post.created,\n 'footer': 'The Morning Bunch :green_heart:',\n 'color': '#439FE0'\n }\n ]\n };\n if(post.over_18) {\n // will need to change this again, to update the text\n data = {\n 'response_type': 'ephemeral',\n 'text': 'Oops, we can\\'t show you this content :flushed:',\n 'attachments': [\n {\n 'text': ':thinking_face: You may want to try something else.',\n 'footer': 'The Morning Bunch :green_heart:',\n 'color': 'danger'\n }\n ]\n }\n }\n return data;\n}", "function showPostsInConsole(posts)\n{\n let tempstr = '';\n posts.forEach((p, index) => {\n tempstr += \n`==========================================================================================================================================\nPost ${index + 1}: \\t ${p.title} \n==========================================================================================================================================\nsynopsis: \\t ${p.synopsis}\nbody: \\t\\t ${p.body}\nthumbnail: \\t ${p.thumbnail}\nCreated at: \\t ${p.created}\nModified at: \\t ${p.modified}\n------------------------------------------------------------------------------------------------------------------------------------------\nAUTHORS\n------------------------------------------------------------------------------------------------------------------------------------------\n${getStringForAuthors(p.authors)}\n------------------------------------------------------------------------------------------------------------------------------------------\nCOMMENTS\n------------------------------------------------------------------------------------------------------------------------------------------\n${getStringForComments(p.comments)}\n`\n });\n return tempstr;\n}", "function generatePosts(dataArr, dest) {\n dest.innerHTML = dataArr\n .map(\n (post) => `\n <div class=\"card m-2 \">\n <div class=\"card-header\">Author: ${post.author}</div>\n <div class=\"card-body\">\n <h5 class=\"card-title\">${post.title}</h5>\n <a href=\"single-posts.html?postId=${post.postId}\" class=\"btn btn-primary btn-sm\">See more</a>\n <button data-postid='${post.postId}' class=\"btn btn-sm btn-danger delete-post\">Delete</button>\n </div>\n <div class=\"card-footer\">Time ${post.timeStamp}</div>\n </div>\n `,\n )\n .join('');\n}", "function createPostCard(post) {\n const postCard = document.createElement(\"div\");\n postCard.classList.add(\"card\");\n\n const postImage = document.createElement(\"img\");\n postImage.classList.add(\"card-img-top\");\n postImage.src = post.image ? post.image : \"https://picsum.photos/500/300\";\n postImage.alt = post.title;\n\n const postCardBody = document.createElement(\"div\");\n postCardBody.classList.add(\"card-body\");\n\n const postTitle = document.createElement(\"h5\");\n postTitle.classList.add(\"card-title\");\n postTitle.textContent = post.title;\n\n const postLink = document.createElement(\"a\");\n postLink.classList.add(\"btn\", \"btn-primary\");\n postLink.href = `./posts/${post.file}`;\n postLink.textContent = \"Read More\";\n\n postCardBody.appendChild(postTitle);\n postCardBody.appendChild(postLink);\n\n postCard.appendChild(postImage);\n postCard.appendChild(postCardBody);\n\n return postCard;\n}", "function RenderPost(hash) {\n // Ingat, kita telah memiliki variable 'hash' yang isinya adalah url setelah tanda pagar\n // ex: '#/post/2' atau '#/post/3'\n\n // Menjalankan Function HideOtherPage dengan passing paramter bernilai 'post'\n // sehingga halaman lain akan disembunyikan sedangkan halaman 'post' tidak\n HideOtherPage('post')\n\n /*\n Mengambil paramter ID setelah url '#/post/{id}'\n\n Untuk mengambilnya memang agak ribet, tapi InsyaaAllah bakalan mudah kalau kita mau baca\n referensinya. Jadi untuk awal kita mendeklarasikan variable 'url' dimana variable ini\n akan kita jadikan acuan untuk pencarian 'id'\n */\n var url = '/post/'\n\n\n /*\n Kita mencari tahu dimana posisi tulisan '/post/' dan mengambil tulisan yang ada setelah tulisan tsb yaitu 'id' nya.\n indexOf ini fungsinya untuk mencari posisi.\n referensi: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/indexOf\n */\n var idPosition = hash.indexOf(url) + url.length\n\n // Setelah mengetahui posisi ID, sekarang kita ambil id tersebut dengan cara mensubsitusikan string tersebut\n // referensi: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substr\n var id = hash.substr(idPosition, hash.length)\n\n // Kemudian jalan function getPostById dengan parameter 'id' yang telah kita dapatkan tadi\n var post = getPostById(id)\n\n // Kita membuat template lagi\n var template = [\n '<img src=\"'+ post.cover +'\" />',\n '<div class=\"post-content\">',\n '<h1>'+ post.title +'</h1>',\n '<p>'+ post.content +'</p>',\n '</div>'\n ]\n\n // Lalu menyatukannya kemudian langsung memasukkannya kedalam html dari elemen ber-id 'post'\n $('#post').html(template.join(''))\n }", "async buildPost (filename) {\n let md = await this.fs.promises.readFile(`${this.config.settings.SRC}/${filename}`, \"utf8\")\n let { content, data } = matter(md)\n data.permalink = filename\n let html = marked(content, { baseUrl: \"../../\" }) \n //await this.processContent( { content, html, data, filename } )\n //await this.processImages({ content })\n await this.plugins(\"onsave\", { content, html, data, filename })\n return { html, data }\n }", "function generateCard(post) {\n let card = gen(\"article\");\n card.classList.add(\"card\");\n card.id = post[\"id\"];\n let image = postProfilePic(post);\n let contents = postContent(post);\n let info = postInformation(post);\n card.appendChild(image);\n card.appendChild(contents);\n card.appendChild(info);\n return card;\n }", "function addPost(post) {\n var postElt = Mustache.render(postTmpl, post);\n console.log('generated HTML: %s', postElt);\n $('#index_list_posts').prepend(postElt);\n }", "function getPost(){\n fetch('http://jsonplaceholder.typicode.com/posts')\n .then((res) => res.json())\n .then((data) => {\n let outputPost = `<h2 class=\"bb-4\">Posts</h2>`;\n data.forEach((post) => {\n outputPost += `\n <div class=\"card csard-body mb-3 p-3\">\n <h3>${post.title}</h3>\n <p>${post.body}</p>\n </div>\n `;\n });\n document.getElementById('output').innerHTML = outputPost;\n })\n .catch((err) => console.log(err));\n}", "function postToElem( post, kind ) {\n /*\n \"userpost\" :\n {\n \"n\" : username,\n \"k\" : seq number,\n \"t\" : \"post\" / \"dm\" / \"rt\"\n \"msg\" : message (post/rt)\n \"time\" : unix utc\n \"height\" : best height at user\n \"dm\" : encrypted message (dm) -opt\n \"rt\" : original userpost - opt\n \"sig_rt\" : sig of rt - opt\n \"reply\" : - opt\n {\n \"n\" : reference username\n \"k\" : reference k\n }\n }\n \"sig_userpost\" : signature by userpost.n\n */\n\n // Obtain data from userpost\n var postJson = $.toJSON(post);\n var userpost = post[\"userpost\"];\n if( \"rt\" in userpost ) {\n var rt = userpost[\"rt\"];\n var n = rt[\"n\"];\n var k = rt[\"k\"];\n var t = rt[\"time\"];\n var msg = rt[\"msg\"];\n var content_to_rt = $.toJSON(rt);\n var content_to_sigrt = userpost[\"sig_rt\"];\n var retweeted_by = userpost[\"n\"];\n } else {\n var n = userpost[\"n\"];\n var k = userpost[\"k\"];\n var t = userpost[\"time\"];\n var msg = userpost[\"msg\"]\n var content_to_rt = $.toJSON(userpost);\n var content_to_sigrt = post[\"sig_userpost\"];\n var retweeted_by = undefined;\n }\n\n // Now create the html elements\n var elem = $.MAL.getPostTemplate().clone(true);\n elem.removeAttr('id');\n elem.addClass(kind);\n elem.attr('data-time', t);\n\n var postData = elem.find(\".post-data\");\n postData.addClass(kind);\n postData.attr('data-userpost', postJson);\n postData.attr('data-content_to_rt', content_to_rt);\n postData.attr('data-content_to_sigrt', content_to_sigrt);\n postData.attr('data-screen-name', n);\n postData.attr('data-id', k);\n postData.attr('data-text', msg);\n if( \"reply\" in userpost ) {\n postData.attr('data-replied-to-screen-name', userpost[\"reply\"][\"n\"]);\n postData.attr('data-replied-to-id', userpost[\"reply\"][\"k\"]);\n }\n\n var postInfoName = elem.find(\".post-info-name\");\n postInfoName.attr('href',$.MAL.userUrl(n));\n postInfoName.text(n);\n getFullname( n, postInfoName );\n elem.find(\".post-info-tag\").text = \"@\" + n;\n getAvatar( n, elem.find(\".avatar\") );\n elem.find(\".post-info-time\").text(timeGmtToText(t));\n elem.find(\".post-info-time\").attr(\"title\",timeSincePost(t));\n\n var mentions = [];\n htmlFormatMsg( msg, elem.find(\".post-text\"), mentions);\n postData.attr('data-text-mentions', mentions);\n\n var replyTo = \"\";\n if( n != defaultScreenName )\n replyTo += \"@\" + n + \" \";\n for( var i = 0; i < mentions.length; i++ ) {\n if( mentions[i] != n && mentions[i] != defaultScreenName ) {\n replyTo += \"@\" + mentions[i] + \" \";\n }\n }\n elem.find(\".post-area-new textarea\").attr(\"placeholder\", polyglot.t(\"reply_to\", { fullname: replyTo })+ \"...\");\n elem.find(\".post-area-new textarea\").attr(\"data-reply-to\",replyTo);\n postData.attr(\"data-reply-to\",replyTo);\n\n if( retweeted_by != undefined ) {\n elem.find(\".post-context\").show();\n var retweetedByElem = elem.find(\".post-retransmited-by\");\n retweetedByElem.attr(\"href\", $.MAL.userUrl(retweeted_by));\n retweetedByElem.text('@'+retweeted_by);\n }\n //hed//image in post\n var previewContainer = elem.find('.preview-container'), postText = elem.find(\".post-text\");\n \n if(imagePreview(postText)){\n previewContainer.show();\n previewContainer.append(imagePreview(postText))\n };\n \n\n return elem;\n}", "function displayPosts(posts) {\n console.log(posts)\n $.each( posts, function( key, value ) {\n post = value;\n if (key <= 6) {\n document.getElementById('posts-container').innerHTML += '<a class=\"post\" target=\"_blank\" href=\"' + post.full_url + '\">'+\n '<div style=\"background-image:url(' + post.image + ')\"><h2>Member: </h2><h3>' + post.poster_name + \"</h3>\" +\n '</div></a>';\n }\n });\n }", "showPost(post) {\n alert(post.body);\n }", "renderHTML() {\n let domPurify = createDomPurify(new JSDOM().window);\n return { __html: domPurify.sanitize(this.state.post.html) }; //Sanitize html so no hackers can inject\n }", "function createPost(postData) {\n const div = document.createElement('div');\n const h2 = document.createElement('h2');\n const p = document.createElement('p');\n const btn = document.createElement('button');\n\n btn.textContent = 'Delete Post';\n // On click, it should delete the item from the database\n // Then remove the item from the DOM on success\n btn.addEventListener('click', () => {\n // Pessimistic rendering, don't delete unless the post\n // was actually deleted from the DB\n fetch(`${url}/${postData.id}`, { method: 'DELETE' })\n .then(res => res.json())\n .then(() => {\n // We can access the div because it's available one level up\n // in the scope chain\n div.remove();\n })\n });\n\n h2.textContent = postData.title;\n p.textContent = postData.text;\n div.append(h2, p, btn);\n\n const postsSection = document.querySelector('.posts');\n\n postsSection.append(div);\n}", "showPosts(posts) {\n let output = '';\n\n posts.forEach(post => {\n output += `\n <div class='card mb-3'>\n <div class='card-body'>\n <h4 class='card-title'>${post.title}</h4>\n <p class='card-text'>${post.body}</p>\n <a \n href='#' \n class='edit card-link' \n data-id=${post.id}\n >\n <i class=\"material-icons left\">edit</i>\n </a>\n <a \n href='#' \n class='delete card-link' \n data-id=${post.id}\n >\n <i \n class=\"material-icons left\" \n style=\"color:red;\"\n >\n delete\n </i>\n </a>\n </div>\n </div>\n `;\n });\n\n this.posts.innerHTML = output;\n }", "function newPostDomWithShowMoreBtn(title, postContent) {\n var dom = `<div class=\"main-post\">\n <div class=\"post-header\">\n <div class=\"user-img\">\n <img src=\"images/user-post-1.png\" alt=\"\">\n </div>\n <div class=\"user\">\n <h1>Mark Klein</h1>\n <span>uploaded a video</span>\n </div>\n <div class=\"time\">10 mins ago\n <a href=\"#\" class=\"edit-menu-btn\">\n <i class=\"fa fa-ellipsis-v\" aria-hidden=\"true\"></i>\n </a>\n <ul class=\"slide-menu\">\n <li>\n <a href=\"#\">Edit</a>\n </li>\n <li>\n <a href=\"#\" class=\"delete\">Delete</a>\n </li>\n </ul>\n </div>\n </div>\n <div class=\"post-content\">\n <div class=\"content\">\n <h2>`+ title + `</h2>\n <div class=\"text-content\">\n <p>`+ postContent + `</p>\n </div>\n <a class=\"read-more-btn\" href=\"#\">Read more</a>\n </div>\n </div>\n <div class=\"share-section\">\n <ul>\n <li>\n <span class=\"like-count\">14</span>\n <i class=\"fa fa-thumbs-o-up addLike\" aria-hidden=\"true\"></i>\n </li>\n <li>\n <span class=\"comment-count\">7</span>\n <i class=\"fa fa-commenting-o\" aria-hidden=\"true\"></i>\n </li>\n <li>\n <div class=\"share-links\">\n <ul>\n <li>\n <a href=\"#\">\n <i class=\"fa fa-facebook\" aria-hidden=\"true\"></i>\n </a>\n </li>\n <li>\n <a href=\"#\">\n <i class=\"fa fa-twitter\" aria-hidden=\"true\"></i>\n </a>\n </li>\n <li>\n <a href=\"#\">\n <i class=\"fa fa-instagram\" aria-hidden=\"true\"></i>\n </a>\n </li>\n <li>\n <a href=\"#\">\n <i class=\"fa fa-pinterest\" aria-hidden=\"true\"></i>\n </a>\n </li>\n </ul>\n </div>\n <i class=\"fa fa-share-alt\" aria-hidden=\"true\"></i>\n </li>\n </ul>\n </div>\n <div class=\"add-comment-post\">\n <div class=\"row\">\n <div class=\"col-md-12\">\n <form>\n <img src=\"images/profil1.png\" alt=\"profile\" class=\"comment-img\">\n <div class=\"input-group\">\n <input type=\"text\" class=\"form-control\" placeholder=\"&#xf040; Add comment\">\n <span class=\"input-group-btn\">\n <button class=\"btn button-video\" type=\"button\">\n <i class=\"fa fa-video-camera\" aria-hidden=\"true\"></i>\n </button>\n <button class=\"btn button-send\" type=\"button\">Send</button>\n </span>\n </div>\n </form>\n </div>\n </div>\n </div>\n</div>`;\n\n return dom;\n}", "function renderPost(post, site) {\n //take the tags plugin, filter off properties that is not functions, then return an array of functions because showdown needs an array\n var converter = new _marked.Converter({tables: true, extensions: Object.keys(_tags).filter(function (key) {\n var black_list = ['post', 'site'];\n\n return black_list.indexOf(key) === -1;\n }).map(function (key) {\n return _tags[key];\n })}),\n path;\n\n //before we convert markdown, we need to init our extensions to the current post\n _tags.post = post;\n _tags.site = site;\n\n post.body = post.content;\n\n //before templating, we need to convert the body into html\n post.body = converter.makeHtml(post.body);\n\n //check tags to ensure got plugins\n getTags(post.body).forEach(function (tag) {\n //if a tag do not have plugin we notify\n if (_tags[tag.name] === undefined) {\n console.error('Tag plugin not found: ' + tag.name + ' ' + post.slug);\n }\n });\n\n post.is_post = true;\n post.is_home = false;\n\n getRelated(site, post);\n\n //Convert markdown to html\n path = _path.join(post.folder, '/_theme/_post.ejs');\n\n //if there is a _post.ejs in site/_theme we use it, otherwise we default to octa/_theme/_post.ejs\n return _fs.pathExists(path).then(function (exists) {\n if (!exists) { path = _path.join(cwd, '/_theme/_post.ejs'); }\n\n return _ejs.renderFile(path, {data: post, site: site, helper: _helper})\n .then(function (str) { return syncFile(str, _path.join(post.output, 'index' + config.extension)); });\n });\n\n function getTags(content) {\n var str = content,\n close_regex = /\\{% (\\w+)(.*?)%\\}\\n(.*?)\\n\\{% end\\1 %\\}\\n/gs,\n tag_regex = /(?:<p>)?\\{% (\\w+) (.*?)%\\}(?:<p>)?/g,\n tags = [],\n matches;\n\n //for closing tags, we get the content\n while (matches = close_regex.exec(content)) {\n tags.push({name: matches[1]});\n\n //tags.push({name: matches[1], content: matches[3], args: getArgs(matches[2]), body: matches[0]});\n\n str = str.replace(matches[0], '');\n }\n\n //for non closing tags, we do not care about content\n while (matches = tag_regex.exec(str)) {\n tags.push({name: matches[1]});\n //tags.push({name: matches[1], args: getArgs(matches[2]), body: matches[0]});\n }\n\n return tags;\n }\n\n function getRelated(site, post) {\n var i = 0;\n\n post.related = [];\n\n //for each of the sorted post, find if they contain any tags in the current post\n for (; i < site.sorted.length; i++) {\n //do not check own self\n if (post.slug !== site.posts[site.sorted[i]].slug && exist(post.tags, site.posts[site.sorted[i]].tags)) {\n post.related.push(site.posts[site.sorted[i]]);\n if (post.related.length >= 3) { break; }\n }\n }\n\n //if after finding all the tags, and related is still not length === 3, we insert the latest post\n if (post.related.length < 3) {\n i = 0;\n do {\n if (post.slug !== site.posts[site.sorted[i]].slug) {\n post.related.push(site.posts[site.sorted[i]]);\n }\n i++;\n } while (post.related.length < 3 && i < site.sorted.length);\n }\n\n function exist(needles, haystack) {\n return (needles || []).some(function (needle) { return (haystack || []).indexOf(needle) >= 0; });\n }\n }\n }", "function createPostSummary(k,i){var m,j,e,n,l=document,g=configSummary,h,a=l.getElementById(k),c=jQuery(\"#\"+k).parents(\".post\"),f=c.find(\".post-title.entry-title a\").text();e=jQuery(\"#\"+k+\" img\");n=e.attr(\"src\");id=k.replace(\"summaryContainer-\",\"\");j='<a class=\"thumbimgx\" title=\"'+f+'\" href=\"'+i+'\"><img class=\"post-thumbnail\" src=\"'+n.replace(/\\/s[0-9]+(\\-c)?\\//,\"/\"+g.thumbnailSize+\"/\")+'\" alt=\"'+f+'\"></a>';if(n.indexOf(\"img.youtube.com\")!=-1){j='<a class=\"thumbimgx\" title=\"'+f+'\" href=\"'+i+'\"><img class=\"post-thumbnail\" src=\"'+n.replace(\"default\",\"0\")+'\" alt=\"'+f+'\"></a>'}jQuery(\"#\"+k+\" p\").addClass(\"loadisi\");$.get(window.location.protocol+\"//\"+window.location.host+\"/feeds/posts/default/\"+id+\"?alt=json-in-script\",function(b){entry=b.entry;h=(\"content\" in entry)?entry.content.$t:(\"summary\" in entry)?entry.summary.$t:\"\";h=h.replace(/<\\S[^>]*>/g,\"\").replace(/\"/g,\"&quot;\");if(h.length>g.summaryLength){h=h.substring(0,g.summaryLength)+\"...\"}a.innerHTML=j+'<strong><a class=\"titlex\" href=\"'+i+'\">'+f+\"</a></strong><p>\"+h+\"</p>\"},\"jsonp\")}", "render() {\n\t\tif (this.state.post.length === 0) {\n\t\t\treturn <div />;\n\t\t}\n\n\t\tconst { title, content } = this.state.post[0];\n\t\treturn (\n\t\t\t<div className=\"post-page\">\n\t\t\t\t<h1 className=\"ui header\">{title.rendered}</h1>\n\t\t\t\t<div dangerouslySetInnerHTML={{ __html: content.rendered }} />\n\t\t\t</div>\n\t\t);\n\t}", "function layout (post, details) {\n if (!details || !post.content) {\n return post.short\n }\n if (!post.shareImage) {\n return post.content\n }\n return `<img src=\"${post.shareImage}\" alt=\"${post.title}\" style=\"display:block;width:100%;margin-bottom:25px\">${post.content}`\n}", "function addPost() {\n // POST\n // Create a post that will contain all the elements\n $post = $('<div></div>').addClass('post');\n $post.appendTo('.feed');\n\n // BANNER\n // Add the banner\n // Create a div\n let $banner = $('<div></div>').addClass('banner');\n $banner.appendTo($post);\n // Add the image of the avatar\n let $avatar = $('<img></img>').addClass('avatar').attr('src', 'assets/images/avatar.png');\n $avatar.appendTo($banner);\n\n // Display the chosen username\n let $username = $(`<p><b>${username}</b></p>`).addClass('username');\n $username.appendTo($banner);\n // Display the triple dot\n let $tripleDot = $('<img></img>').addClass('tripleDot').attr('src', 'assets/images/triple_dot.png');\n $tripleDot.appendTo($banner);\n\n // IMAGE\n // Add the image\n let $image = $('<img>').addClass('image').attr('src', images[currentImage].path);\n $image.appendTo($post);\n\n // ACTIONS\n let $actions = $('<div></div>').addClass('actions');\n $actions.appendTo($post);\n // Add the heart, the speech bubble, the plane, and the bookmark\n let $heart = $('<img></img>').addClass('heart').attr('src', 'assets/images/heart_logo.png');\n $heart.appendTo($actions);\n let $speechBubble = $('<img></img>').addClass('speechBubble').attr('src', 'assets/images/speech_bubble_logo.png');\n $speechBubble.appendTo($actions);\n let $message = $('<img></img>').addClass('message').attr('src', 'assets/images/plane_logo.png');\n $message.appendTo($actions);\n let $bookmark = $('<img></img>').addClass('bookmark').attr('src', 'assets/images/bookmark_logo.png');\n $bookmark.appendTo($actions);\n\n // STATUS\n let $status = $('<div></div>').addClass('status');\n $status.appendTo($post);\n // Add the likes\n let $likes = $(`<p class='likes'><b>${images[currentImage].likes} likes</b></p>`);\n $likes.appendTo($post);\n // Add the caption\n let $caption = $(`<div class='caption'><p><b>${username}</b> ${hiddenCaption}</p></div>`);\n $caption.appendTo($post);\n // // Add the comments\n // let $comment = $(`<p class='comment'><b>${trueUsername}</b> ${images[currentImage].comment}</p>`);\n // $comment.appendTo($post); // **TO BE ADDED LATER\n\n // DATE\n // Create an array for every month so they are printed as a string not numbers\n let month = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];\n // Get today's date\n let today = new Date();\n // Print it in this format : Month 00, 2000\n let date = month[today.getMonth()] + ' ' + today.getDate() + ', ' + today.getFullYear();\n // Add date\n let $date = $(`<p class='date'>${date}</p>`);\n $date.appendTo($post);\n\n // Add the post to the array\n addList($post);\n}", "function renderPosts() {\n display.empty();\n // loops posts Arr and append the OBJs\n // debugger\n for (let i = 0; i < posts.length; i++) {\n display.append(`<form action=\"\">\n <p class='post' data-id=` + posts[i].ids + `> ` + posts[i].texts +\n ` <button type='button' class='remove' data-id=` + i +\n `>REMOVE</button>` + `</p>\n <input type=\"text\" name=\"\" class=\"commentName\" placeholder=\"name\">\n <input type=\"text\" name=\"\" class=\"commentComment\" placeholder=\"comment\">\n <ul class = \"postComment\">\n </ul>\n <button class = \"goComment\"type=\"button\">go</button>\n </form>`)\n\n // renderComments(getIndexByID(posts[i].ids), posts[i].ids);\n }\n}", "function renderPosts(data) {\r\n postLists.innerHTML = null;\r\n const nameBox = document.createElement(\"h3\");\r\n nameBox.textContent = \"POSTS\";\r\n postLists.appendChild(nameBox);\r\n\r\n data.forEach((element) => {\r\n const newUserPost = userPostTemp.cloneNode(true);\r\n const postTitle = newUserPost.querySelector(\".post-title\");\r\n postTitle.textContent = element.title;\r\n postTitle.dataset.post_id = element.id;\r\n newUserPost.querySelector(\".body\").textContent = element.body;\r\n postLists.appendChild(newUserPost);\r\n });\r\n}", "function createPostElement(postId, title, text, author, authorId, authorPic) {\n var uid = firebase.auth().currentUser.uid;\n\n var html =\n '<div class=\"post post-' + postId + ' mdl-cell mdl-cell--12-col ' +\n 'mdl-cell--6-col-tablet mdl-cell--4-col-desktop mdl-grid mdl-grid--no-spacing\">' +\n '<div class=\"mdl-card mdl-shadow--2dp\">' +\n '<div class=\"mdl-card__title mdl-color--light-blue-600 mdl-color-text--white\">' +\n '<h4 class=\"mdl-card__title-text\"></h4>' +\n '</div>' +\n '<div class=\"header\">' +\n '<div>' +\n '<div class=\"avatar\"></div>' +\n '<div class=\"username mdl-color-text--black\"></div>' +\n '</div>' +\n '</div>' +\n '<span class=\"star\">' +\n '<div class=\"not-starred material-icons\">star_border</div>' +\n '<div class=\"starred material-icons\">star</div>' +\n '<div class=\"star-count\">0</div>' +\n '</span>' +\n '<div class=\"text\"></div>' +\n '<div class=\"comments-container\"></div>' +\n '<form class=\"add-comment\" action=\"#\">' +\n '<div class=\"mdl-textfield mdl-js-textfield\">' +\n '<input class=\"mdl-textfield__input new-comment\" type=\"text\">' +\n '<label class=\"mdl-textfield__label\">Comment...</label>' +\n '</div>' +\n '</form>' +\n '</div>' +\n '</div>';\n\n // Create the DOM element from the HTML.\n var div = document.createElement('div');\n div.innerHTML = html;\n var postElement = div.firstChild;\n if (componentHandler) {\n componentHandler.upgradeElements(postElement.getElementsByClassName('mdl-textfield')[0]);\n }\n\n var addCommentForm = postElement.getElementsByClassName('add-comment')[0];\n var commentInput = postElement.getElementsByClassName('new-comment')[0];\n var star = postElement.getElementsByClassName('starred')[0];\n var unStar = postElement.getElementsByClassName('not-starred')[0];\n\n // Set values.\n postElement.getElementsByClassName('text')[0].innerText = text;\n postElement.getElementsByClassName('mdl-card__title-text')[0].innerText = title;\n postElement.getElementsByClassName('username')[0].innerText = author || 'Anonymous';\n postElement.getElementsByClassName('avatar')[0].style.backgroundImage = 'url(\"' +\n (authorPic || './silhouette.jpg') + '\")';\n\n // Listen for comments.\n // [START child_event_listener_recycler]\n var commentsRef = firebase.database().ref('post-comments/' + matchId + '/' + postId);\n commentsRef.on('child_added', function(data) {\n addCommentElement(postElement, data.key, data.val().text, data.val().author);\n });\n\n commentsRef.on('child_changed', function(data) {\n setCommentValues(postElement, data.key, data.val().text, data.val().author);\n });\n\n commentsRef.on('child_removed', function(data) {\n deleteComment(postElement, data.key);\n });\n // [END child_event_listener_recycler]\n\n // Listen for likes counts.\n // [START post_value_event_listener]\n var starCountRef = firebase.database().ref('posts/' + matchId + '/' + postId + '/starCount');\n starCountRef.on('value', function(snapshot) {\n updateStarCount(postElement, snapshot.val());\n });\n // [END post_value_event_listener]\n\n // Listen for the starred status.\n var starredStatusRef = firebase.database().ref('posts/' + matchId + '/' + postId + '/stars/' + uid);\n starredStatusRef.on('value', function(snapshot) {\n updateStarredByCurrentUser(postElement, snapshot.val());\n });\n\n // Keep track of all Firebase reference on which we are listening.\n listeningFirebaseRefs.push(commentsRef);\n listeningFirebaseRefs.push(starCountRef);\n listeningFirebaseRefs.push(starredStatusRef);\n\n // Create new comment.\n addCommentForm.onsubmit = function(e) {\n e.preventDefault();\n createNewComment(postId, firebase.auth().currentUser.displayName, uid, commentInput.value);\n commentInput.value = '';\n commentInput.parentElement.MaterialTextfield.boundUpdateClassesHandler();\n };\n\n // Bind starring action.\n var onStarClicked = function() {\n var globalPostRef = firebase.database().ref('/posts/' + matchId + '/' +postId);\n var userPostRef = firebase.database().ref('/user-posts/' +authorId + '/' + matchId + '/' + postId);\n toggleStar(globalPostRef, uid);\n toggleStar(userPostRef, uid);\n };\n unStar.onclick = onStarClicked;\n star.onclick = onStarClicked;\n\n return postElement;\n}", "function mypost()\n{\n\t/*====Parent DIV (mainpost)========*/\n\tvar div=document.createElement(\"DIV\");\n\tdiv.className=\"mainpost\";\n\n\t/* -------- adding div at the top ---------*/\n\tvar parent=document.getElementsByClassName(\"allpost\");\n\tparent[0].insertBefore(div, parent[0].childNodes[0]);\n\t// var hr=document.createElement(\"hr\");\n\t// parent[0].insertBefore(hr, parent[0].childNodes[1]);\n\n\t/*============ DIV userimg ===============*/\n\tvar div1=document.createElement(\"DIV\");\n\tdiv1.className=\"userimg\";\n\tvar img=document.createElement(\"img\");\n\timg.src=\"../images/profile/upload.png\";\n\tdiv1.appendChild(img);\n\tdiv.appendChild(div1);\n\n\t/*============ DIV username ===============*/\n\tvar div2=document.createElement(\"DIV\");\n\tdiv2.className=\"username\";\n\tvar para=document.createElement(\"p\");\n\tpara.className=\"name\";\n\tvar text1=document.createTextNode(\"Rajkumar Rocktim Narayan Singha\");\n\tpara.appendChild(text1);\n\tdiv2.appendChild(para);\n\tdiv.appendChild(div2);\n\n\t/*---------- paragraph time ---------------*/\n\tvar para1=document.createElement(\"p\");\n\tpara1.className=\"time\";\n\tvar text2=document.createTextNode(\"Just now\");\n\tpara1.appendChild(text2);\n\tdiv.appendChild(para1);\n\n\t/*---------- paragraph quotes ---------------*/\n\tvar para2=document.createElement(\"p\");\n\tpara2.className=\"quotes\";\n\tvar pararec=document.getElementById(\"mypara\");\n\t// var paapa=pararec.value;\n\tvar paapa=pararec.value.replace(/\\s/g, \"\\u00a0\");\n\tpararec.value=\"\";\n\n\tvar text3=document.createTextNode(paapa);\n\tpara2.appendChild(text3);\n\tdiv.appendChild(para2);\n\n\t/*============ DIV post ===============*/\n\tvar div3=document.createElement(\"DIV\");\n\tdiv3.className=\"post\";\n\tvar img1=document.createElement(\"img\");\n\timg1.className=\"postimg\";\n\tvar output = document.getElementById('load2');\n img1.src = output.src;\n output.src=\"\";\n\tdiv3.appendChild(img1);\n\tdiv.appendChild(div3);\n\n\t/*============ DIV likedislike ===============*/\n\tvar div4=document.createElement(\"DIV\");\n\tdiv4.className=\"likedislike\";\n\t/*$$$$$$$$$$ paragraph like $$$$$$$$$$$$$$$$*/\n\tvar para3=document.createElement(\"p\");\n\tpara3.className=\"like\";\n\t/*........... Span nooflike ............*/\n\tvar span1=document.createElement(\"span\");\n\tspan1.className=\"nooflike\";\n\tspan1.id=\"like\"+incre;\n\tvar spantext=document.createTextNode(\"0 \");\n\tspan1.appendChild(spantext);\n\tvar text4=document.createTextNode(\" likes \\u00a0 \");\n\tpara3.appendChild(span1);\n\tpara3.appendChild(text4);\n\tdiv4.appendChild(para3);\n /*........... Span noofdislike ............*/\n\tvar span2=document.createElement(\"span\");\n\tspan2.className=\"noofdislike\";\n\tspan2.id=\"dislike\"+incre;\n\tvar spantext1=document.createTextNode(\"0 \");\n\tspan2.appendChild(spantext1);\n\tvar text5=document.createTextNode(\" dislikes\");\n\tpara3.appendChild(span2);\n\tpara3.appendChild(text5);\n\tdiv4.appendChild(para3);\n\t/*$$$$$$$$$$$ paragraph likedisbttn $$$$$$$$$$$$$$$*/\n\tvar para4=document.createElement(\"p\");\n\tpara4.className=\"likedisbttn\";\n\t/*........... Span fa fa-thumbs-up ............*/\n\tvar span3=document.createElement(\"span\");\n\tspan3.className=\"fa fa-thumbs-up\";\n\tspan3.id=\"thumbsup\"+incre;\n\t// span3.setAttribute(\"onClick\",fun1);\n\t// para4.appendChild(span3);\n\t// div4.appendChild(para4);\n /*........... Span noofdislike ............*/\n\tvar span4=document.createElement(\"span\");\n\tspan4.className=\"fa fa-thumbs-down\";\n\tspan4.id=\"thumbsdown\"+incre;\n\t/*^^^^^^^^^^ Span3 onclick code and append ^^^^^^^^^^*/\n\tvar fun1=\"increase\"+\"(\"+\"'\"+span1.id+\"'\"+\",\"+\"'\"+span2.id+\"'\"+\",\"+\"'\"+span3.id+\"'\"+\",\"+\"'\"+span4.id+\"'\"+\");\";\n\tspan3.setAttribute(\"onClick\",fun1);\n\tpara4.appendChild(span3);\n\tdiv4.appendChild(para4);\n\t/*^^^^^^^^^^ Span4 onclick code and append ^^^^^^^^^^*/\n\tvar fun2=\"decrease\"+\"(\"+\"'\"+span1.id+\"'\"+\",\"+\"'\"+span2.id+\"'\"+\",\"+\"'\"+span3.id+\"'\"+\",\"+\"'\"+span4.id+\"'\"+\");\";\n\tspan4.setAttribute(\"onclick\",fun2);\n\tpara4.appendChild(span4);\n\tdiv4.appendChild(para4);\n\t/*############## Appending DIV4 ############*/\n\tdiv.appendChild(div4);\n\n\tincre++;\n}", "function postDescriptionString(post){\n return \"`New post from \" + post.subreddit_name_prefixed + \"`\\n\\n\"\n + \"**\" + post.title + \"** \" + \"*by \" + post.author.name + \"*\\n\" \n + \"**Thread**\\n\" + \"https://www.reddit.com\" + post.permalink + \"\\n**Link**\\n\"\n + post.url + \"\\n\";\n}", "function displayPosts(post) {\n\n //s'il s'agit du tout 1er message il reçoit le message 'new'\n let newest = '';\n if (isFirst) {\n newest = '<p class=\"new\">New</p>';\n }\n\n let img = '';\n if (post.imageURL !== null) {\n img = '<p id=\"para__Img\"><img src=\"' + post.imageURL + '\" alt=\"image publiée par l\\'utilisateur\"></p>';\n }\n document.getElementById('main').innerHTML +=\n `<article class = \"card\" \"data-key\"=${post.id}>\n ${newest}\n <header class = \"card__header card__header--avatar\">\n <img src=\"./images/20456790.jpg\" alt=\"photo profil de l'utilisateur\" class=\"card__avatar\">\n <div class=\"card__pseudo\">${post.User.username}</div>\n <div class=\"card__time\">${new Date(post.createdAt).toLocaleDateString('fr-FR', { year: \"numeric\", month: \"long\", day: \"numeric\" })}</div>\n <a id=\"title__link\" href=\"./singlePost.html?id=${post.id}\"><h2 class=\"card__title\">${post.title}</h2>\n </a>\n </header>\n <div id =\"card__body\">\n ${img}\n <p class =\"card__text\">${post.content}</p>\n </div>\n <footer class=\"card__footer\">\n <div class=\"card__like\">\n <a href=\"#\"><i class=\"far fa-thumbs-up\" aria-hidden=\"true\"></i></a>\n </div>\n <div class=\"card__dislike\">\n <a href=\"#\"><i class=\"far fa-thumbs-down\" aria-hidden=\"true\"></i></a>\n </div>\n <div id=\"card__comments\"><a href=\"./singlePost.html?id=${post.id}\"><i class=\"far fa-comment-alt\" aria-hidden=\"true\"></i></a></div>\n </footer>\n </article>`\n\n const paraImg = document.getElementById('para__Img');\n\n}", "function displayPost() {\n console.log('Post Title');\n console.log('Post Content');\n}", "function addPost(post) {\n //const feedList = document.getElementById('');\n // creates list container for the post\n var img = null;\n if (post.image != null) {\n img = document.createElement('img');\n img.className = 'post image';\n img.src = 'data:image/jpeg;base64,' + post.image;\n }\n const list = document.createElement('li');\n list.className = 'post';\n list.setAttribute('data-id-post', '');\n // number of upvotes\n const upVotes = document.createElement('div');\n upVotes.className = 'post vote';\n upVotes.setAttribute('data-id-upvotes', '');\n upVotes.innerText = post.meta.upvotes.length;\n\n // create a container for the content\n const content = document.createElement('div');\n content.className = 'content';\n\n // title of post\n const contentTitle = document.createElement('h4');\n contentTitle.setAttribute('data-id-title', '');\n contentTitle.className = 'post-title alt-text';\n contentTitle.innerText = post.title;\n\n // contents of post\n const contentText = document.createElement('p');\n contentText.className = 'post content';\n contentText.innerText = post.text;\n\n // n comments on post\n const comments = document.createElement('p');\n comments.className = 'post-author';\n comments.innerText = post.comments.length + ' Comments';\n\n // subseddit of post\n const subText = document.createElement('p');\n subText.className = 'post-author';\n subText.innerText = 's/'+ post.meta.subseddit;\n\n // author of post + time\n const contentAuthor = document.createElement('p');\n contentAuthor.className = 'post-author';\n contentAuthor.setAttribute('data-id-author', '');\n var d = new Date(post.meta.published*1000);\n var date = formatTime(d.getDate()) + '/' + formatTime(d.getMonth()) + '/' + d.getFullYear();\n var time = formatTime(d.getHours()) + ':' + formatTime(d.getMinutes()) + ':' + formatTime(d.getSeconds());\n contentAuthor.innerText = 'Posted by @' + post.meta.author + ' at ' + time + ', ' + date;\n\n content.appendChild(contentTitle);\n content.appendChild(subText);\n content.appendChild(contentAuthor);\n content.appendChild(contentText);\n if (img != null) {\n content.appendChild(img);\n }\n content.appendChild(comments);\n list.append(upVotes);\n list.append(content);\n return list;\n}", "function render() {\n var bodVal = tBody.val(); // Raw article markup\n var m = marked(bodVal); // Convert markup to html\n\n // Render article preview (rendered HTML)\n pMarkOut.html(m);\n //3. Finds each <pre><code> tag in the pMarkOut jQuery element\n pMarkOut.find('pre code').each(function(i, block) {\n //4. Applies highlighting to each block it finds. Returns an object with language, relevance, value (HTML string), and top properties; value HTML string is then rendered in the DOM\n hljs.highlightBlock(block); // Syntax-highlight each code block \"in place\"\n });\n\n pHrawOut.text(m); // Draw raw HTML\n\n // Update JSON article\n //5a. Use dot notation to assign the articleBody key a value of m, (the markup converted to HTML in line 10); user sees entered markup rendered as HTML\n mObj.articleBody = m;\n //5b. Populate the #pJson element's text with the JSON version of the mObj object. Stringify converts mObj from a javascript object to JSON format which the user can now see.\n var jsonStr = pJson.text(JSON.stringify(mObj));\n }", "async function getEmbedMessage(post, context) {\n let embed = embedTool.createMessage(await post.title.slice(0, 256),undefined, undefined, false);\n // use the permalink to make sure that even for image posts you get the reddit link, not the image link\n embed.setAuthor(\"u/\" + await post.author.name, undefined, \"https://www.reddit.com\" + await post.permalink);\n embed.setFooter(await post.subreddit_name_prefixed + \" → Score: \" + \n await post.score + \" → Requested by \" + context.channel.guild.member(context.author).nickname);\n embed.setURL(await post.url);\n return embed;\n}", "function displayPosts(stringPosts) {\n var jsonPosts = JSON.parse(stringPosts);\n var posts = [];\n jsonPosts.forEach(function (jsonPost) {\n var post = new BlogPost();\n post.fillFromJSON(jsonPost);\n posts.push(post);\n });\n posts.forEach(function (post) {\n var htmlPost = \"<div class=\\\"col-md-4\\\">\" +\n post.getHtml() +\n \"</div>\";\n $(\"#posts\")\n .append(htmlPost);\n });\n}", "function buildWebPage(result){\n document.getElementById('article').innerHTML = result.description;\n document.getElementById('article-title').innerHTML = result.title;\n}", "function postJsonToElement(aPost){\n var numberless=aPost.options==\"numberless\"\n\tvar afterNo=numberless?\"XXXXXX\":aPost.after_no\n\tvar postId=afterNo+\"-\"+aPost.id\n\tvar date=new Date(aPost.timestamp*1000)\n\tvar dateString=\n\t\tpadding(date.getMonth()+1,2)+\"/\"+\n\t\tpadding(date.getDate(),2)+\"/\"+\n\t\t(\"\"+date.getFullYear()).slice(-2)+\n\t\t\"(\"+weekdays[date.getDay()]+\")\"+\n\t\tpadding(date.getHours(),2)+\":\"+\n\t\tpadding(date.getMinutes(),2)+\":\"+\n\t\tpadding(date.getSeconds(),2)\n\tvar linkReply\n\tif(!numberless){\n\t\tlinkReply=[0,\n\t\t\t\" \",\n\t\t\t[\"a\",{\n\t\t\t\thref:\"#p\"+postId,\n\t\t\t\ttitle:\"Link to this post\"\n\t\t\t},\"No.\"],\n\t\t\t[\"a\",{\n\t\t\t\thref:\"javascript:quote('\"+postId+\"');\",\n\t\t\t\tonclick:insertQuote,\n\t\t\t\ttitle:\"Reply to this post\"\n\t\t\t},postId]\n\t\t]\n\t}\n\tvar replyHideX=document.documentElement.classList.contains(\"reply-hide\")\n\tvar post=element(\n\t\t[\"div#post\",{\n\t\t\tclass:\"postContainer replyContainer greenPostContainer\",\n\t\t\tid:\"pc\"+aPost.after_no\n\t\t},\n\t\t\t(replyHideX?\n\t\t\t\t[\"div\",{\n\t\t\t\t\tid:\"sa\"+postId\n\t\t\t\t},\n\t\t\t\t\t[\"a\",{\n\t\t\t\t\t\tclass:\"hide-reply-button\"\n\t\t\t\t\t},\n\t\t\t\t\t\t[\"span\",{\n\t\t\t\t\t\t\tclass:\"fa fa-minus-square-o\"\n\t\t\t\t\t\t}]\n\t\t\t\t\t]\n\t\t\t\t]\n\t\t\t:\n\t\t\t\t[\"div\",{\n\t\t\t\t\tclass:\"sideArrows\",\n\t\t\t\t\tid:\"sa\"+postId\n\t\t\t\t},\">>\"]\n\t\t\t),\n\t\t\t[\"div\",{\n\t\t\t\tclass:\"post reply\",\n\t\t\t\tid:\"p\"+postId\n\t\t\t},\n\t\t\t\t[\"div\",{\n\t\t\t\t\tclass:\"postInfoM mobile\",\n\t\t\t\t\tid:\"pim\"+postId\n\t\t\t\t},\n\t\t\t\t\t[\"span\",{\n\t\t\t\t\t\tclass:\"nameBlock\"\n\t\t\t\t\t},\n\t\t\t\t\t\t[\"span\",{\n\t\t\t\t\t\t\tclass:\"name\"\n\t\t\t\t\t\t},aPost.username],\n\t\t\t\t\t\t[\"br\"]\n\t\t\t\t\t],\n\t\t\t\t\t[\"span\",{\n\t\t\t\t\t\tclass:\"dateTime postNum\",\n\t\t\t\t\t\t\"data-utc\":aPost.timestamp\n\t\t\t\t\t},\n\t\t\t\t\t\tdateString,\n\t\t\t\t\t\tlinkReply\n\t\t\t\t\t]\n\t\t\t\t],\n\t\t\t\t[\"div\",{\n\t\t\t\t\tclass:\"postInfo desktop\",\n\t\t\t\t\tid:\"pi\"+postId\n\t\t\t\t},\n\t\t\t\t\t[\"input\",{\n\t\t\t\t\t\ttype:\"checkbox\",\n\t\t\t\t\t\tname:\"ignore\",\n\t\t\t\t\t\tvalue:\"delete\"\n\t\t\t\t\t}],\n\t\t\t\t\t[\"span\",{\n\t\t\t\t\t\tclass:\"nameBlock\"\n\t\t\t\t\t},\n\t\t\t\t\t\t[\"span\",{\n\t\t\t\t\t\t\tclass:\"name\"\n\t\t\t\t\t\t},aPost.username]\n\t\t\t\t\t],\n\t\t\t\t\t\" \",\n\t\t\t\t\t[\"span\",{\n\t\t\t\t\t\tclass:\"dateTime\",\n\t\t\t\t\t\t\"data-utc\":aPost.timestamp\n\t\t\t\t\t},dateString],\n\t\t\t\t\t(!numberless&&\n\t\t\t\t\t\t[\"span\",{\n\t\t\t\t\t\t\tclass:\"postNum desktop\",\n\t\t\t\t\t\t\tonclick:insertQuote,\n\t\t\t\t\t\t\ttitle:\"Reply to this post\"\n\t\t\t\t\t\t},linkReply]\n\t\t\t\t\t)\n\t\t\t\t],\n\t\t\t\t[\"blockquote\",{\n\t\t\t\t\tclass:\"postMessage\",\n\t\t\t\t\tid:\"m\"+postId,\n\t\t\t\t\tinnerHTML:aPost.text.replace(/\\r/g,\"\")\n\t\t\t\t}]\n\t\t\t]\n\t\t]\n\t).post\n return post\n}", "function RenderPostText({ post }) {\n return <React.Fragment>\n {post.content}\n <br />\n </React.Fragment>;\n}", "function createHtmlFromLinks(links) {\n\tvar html = \"\";\n\t//console.log(links.length);\n\tfor(var i = 0; i < links.length; ++i) {\n\t\tvar link = links[i].data;\n\t\t//console.log(link.id);\n\t\tvar title = link.title;\n\t\tvar thumb = link.thumbnail;\n\t\tvar url = \"http://www.reddit.com\"+link.permalink;\n\t\tvar subreddit = link.subreddit;\n\t\tvar time = link.created_utc;\n\t\thtml += '<li class=\"link\">\\n';\n\t\thtml += '<a href=\"'+url+'\">'+title+'</a>';\n\t\thtml += ' <span class=\"subreddit\">(r/'+subreddit+')';\n\t\thtml += ' <br><span class=\"time\">date posted: ' + timeConverter(time) + '</span>';\n\t\thtml += '</li>';\n\t}\n\treturn html;\n}", "function print_matter(data){\n var post_type = 'post';\n var datetime = matter_datetime();\n var title = \"'\" + data['m_title'] + \"'\";\n var slug = matter_slug(data['m_title']);\n var filename = get_filename(curr_time());\n var msg = data['m_msg'];\n var commit_msg = matter_commit_msg(post_type, data['m_msg']);\n // var commit_desc = matter_commit_desc(post_type, matter_title(data['m_title']), 'summmary goes here', slug, filename);\n var branch = matter_branch_name(filename);\n\n // Checks to see what the post type is and prints the front-matter for each type\n // ========================================\n // POST\n var matter = [\n \"---\",\n \"date: \" + datetime,\n \"title: \" + title,\n \"author: \" + list_items(data['m_author']),\n \"---\",\n ,\n msg\n ].join(\"\\n\");\n var body = encodeURIComponent(matter);\n var submit_url = 'https://github.com/GSA/hi/new/master/_posts/draft?filename='+filename+'&value='+body+'&message='+commit_msg+'&target_branch='+branch;\n\n $('#post-matter').text(matter);\n $('#filename').text(filename);\n $('#open-form').attr('action', submit_url);\n $('.btn').attr('href', submit_url);\n // inputs the current date in the date field\n $('input[name=\"m_datetime\"]').val(matter_datetime() );\n }", "function displayPostsDOM(posts) {\n posts.forEach((post) => {\n appendPostDOM(post);\n });\n}", "function renderOnePost(todoItems) {\n // const sortedData = todoItems.sortby(['id'])\n const mainContainer = document.querySelector('.js-to-hide');\n mainContainer.style.display = \"none\";\n\n\n const postContainer = document.querySelector('.js-one-post');\n postContainer.style.display = \"block\";\n\n postContainer.innerHTML = '';\n // const todoItemsReverse = todoItems.reverse();\n // for (const todoItem of sortedData) {\n for (const todoItem of todoItems) {\n // const div = document.createElement('div');\n postContainer.innerHTML = `\n <a href=\"../index.html\">Back to home</a>\n\n <header>\n <h2>${todoItem.data.title}</h2>\n <p>${todoItem.data.todo}</p>\n </header>\n <section>\n <hr />\n <header>\n <p>${todoItem.data.when}</p>\n </header>\n </section>\n `;\n // container.appendChild(div);\n };\n }", "function postToPage(sheet) {\n // cut down the sheet to only the last X rows\n var sheetLastX = sheet.slice(-postsToShow);\n\n var postsEl = document.getElementById('js-posts-container');\n\n // create the content we'll write to the page\n var postContent = document.createElement('div');\n postContent.setAttribute('id', 'js-posts');\n \n // loop through the last X rows most recent first (ie, process the sheet bottom up)\n for (var i = sheetLastX.length - 1; i >= 0; --i) {\n // sheet is an array of objects, row is an object\n var row = sheetLastX[i];\n // go generate the post html for this row\n var post = generatePost(row);\n // add that post to our content\n postContent.appendChild(post);\n }\n // write once to the page\n postsEl.appendChild(postContent);\n }", "articleMaker(title, imageLink, author, date, text, url) {\n author = author ? author : \"Anonymous\";\n return (\n '<div class=\"box\"><article class=\"media\"><div class=\"media-left\"><a href=\"' +\n url +\n '\"><figure class=\"image is-64x64\"><img src=\"' +\n imageLink +\n '\" alt=\"No Image\"/></figure></a></div><div class=\"media-content\"><div class=\"content\"><p><a href=\"' +\n url +\n '\"><strong>' +\n title +\n \"</strong></a> <small>\" +\n author +\n \"</small> <small>\" +\n date +\n \"</small><br />\" +\n text +\n \"</p></div></div></article></div>\"\n );\n }", "function buildPage(contents)\n{\n\tvar pageContents = \"\";\n\tfor(var i = 0; i < contents.length; i++)\n\t{\n\t\t//build a page.\n\t\tpageContents += \"<div class= 'post'><h2>\" + contents[i].gsx$posttitle.$t + \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Made on \" + contents[i].gsx$timestamp.$t + \"</h2><p>\" + contents[i].gsx$postbody.$t + \"</p></div>\";\n\t}\n\t//now load it.\n\t$(\".mainContent\").html(pageContents);\n}", "function buildHtml() {\n $(\"<article>\", {class: \"article\"}).append(\n $(\"<section>\", {class:\"impressions\"}).append(\"News Source\"),\n $(\"<section>\", {class:\"featuredImage\"}).append(\n $(\"<img src =\" + image + \" alt = ''>\")\n ),\n $(\"<section>\", {class:\"articleContent\"}).append(\n $(\"<a href =\" + link + \">\").append(\n $(\"<h3>\").text(title), \n $(\"<h6>\").text(source)\n )\n ),\n $(\"<section>\", {class:\"impressions\"}).append(source),\n $(\"<div>\", {class:\"clearfix\"})\n ).appendTo(\"#article-list\")\n $(\".loader\").addClass(\"hidden\");\n}", "function createfeedTile(post) {\n const section = createElement('section', null, { class: 'post', id: post.id });\n const timeFormat = \"Posted on \" + timeConvert(post.meta.published);\n\n const author = createElement('h1', post.meta.author, { class: 'post-title', style: 'cursor:pointer', id: 'post-author' + post.id });\n author.addEventListener('click', () => userpost(post.meta.author));\n section.appendChild(author);\n\n section.appendChild(createElement('h5', post.meta.description_text, { class: 'post-description', id: 'post-description' + post.id }));\n section.appendChild(createElement('h5', timeFormat, { class: 'post-time' }));\n\n section.appendChild(createElement('img', null, \n { src: 'data:image/png;base64,' + post.src, alt: post.meta.description_text, class: 'post-image', id: 'post-image' + post.id }));\n\n const likeicon = createElement('img', null, \n { src: '/src/likes.png', alt: 'Likes', class: 'post-button', style: \"cursor:pointer\" });\n likeicon.addEventListener('click', () => tolike(post.id));\n section.appendChild(likeicon);\n \n section.appendChild(createElement('img', null, \n { src: '/src/comments.jpg', alt: 'Comments', class: 'post-button', style: \"cursor:pointer\" }));\n\n if (checkStore('username') === post.meta.author){\n const deleteIcon = createElement('img', null, \n { src: '/src/trashbin.png', alt: 'Delete', class: 'post-button', style: \"cursor:pointer\" });\n deleteIcon.addEventListener('click', () => liveUpdate(post.id, 2));\n section.appendChild(deleteIcon);\n\n const updateIcon = createElement('img', null, \n { src: '/src/update.png', alt: 'Update', class: 'post-button', style: \"cursor:pointer\" });\n updateIcon.addEventListener('click', () => {\n const updateWindow = document.getElementById(\"updatefile\" + post.id);\n if (updateWindow.style.display === 'none'){\n updateWindow.style.display = 'inline-block';\n }\n else{\n updateWindow.style.display = 'none';\n }\n });\n section.appendChild(updateIcon);\n }\n\n section.appendChild(createElement('h5', null, { class: \"post-pad\" }));\n section.appendChild(createElement('h5', likeCalculator(post), { class: \"post-num\", id: \"likes-num\" + post.id }));\n section.appendChild(createElement('h5', post.comments.length, { class: \"post-num\", id: \"comment-num\" + post.id }));\n section.appendChild(createElement('h5', null, { class: \"post-pad\" }));\n\n if (checkStore('username') === post.meta.author){\n const frame = createElement('li', null, { class: \"post-update\", id: \"updatefile\" + post.id });\n const updateImg = createElement('input', null, { type: \"file\" });\n updateImg.addEventListener('change', (event) => postUpdate(event, post.id));\n frame.appendChild(updateImg);\n\n const updateDes = createElement('input', null, { type: \"text\", size: \"35\", placeholder: \"Description\", id: \"update-des\" + post.id });\n updateDes.addEventListener('keydown', (event) => {\n if (event.key === 'Enter'){\n const payload = {\n \"description_text\": updateDes.value\n };\n toPostUpdate(payload, post.id);\n updateDes.value = '';\n }\n });\n frame.appendChild(updateDes);\n section.appendChild(frame);\n }\n\n const commentinput = createElement('input', null, { class: \"comment-input\" , placeholder: \"Leave some comments\", id: \"comment-input\" + post.id });\n commentinput.addEventListener('keydown', (event) => {\n if (event.key === 'Enter'){\n tocomment(post.id, commentinput.value);\n }\n });\n section.appendChild(commentinput);\n post.comments = sortByKey(post.comments, 'published');\n for (let i = 0; i < post.comments.length; i++){\n section.appendChild(createElement('h5', post.comments[i].comment + '----------' + post.comments[i].author + ' ' + timeConvert(post.comments[i].published), { class: 'post-comments' }));\n }\n return section;\n}", "function post(numero,divDuPost){\r\n\t//alert(\"creation\");\r\n\tthis.div=divDuPost;\r\n\r\n\t/**numero du post**/\r\n\r\n\tthis.num=numero;\r\n\r\n\t/**nom du poster**/\r\n\r\n\tthis.poster=divDuPost.childNodes[1].childNodes[1].firstChild.childNodes[1].childNodes[2].firstChild.nodeValue;\r\n\r\n\ttmp=divDuPost.childNodes[1].childNodes[1].firstChild.childNodes[1].childNodes[2];\r\n\r\n\t//tmp.tagName est A si simple poster, FONT/B/A si moro/vik/mk, FONT/A si kodama faiblard\r\n\r\n\t//on remonte jusqu'à le A\r\n\r\n\twhile(tmp.tagName!=\"A\"){\r\n\r\n\t\ttmp=tmp.firstChild;\r\n\r\n\t}\r\n\r\n\ttmp=tmp.getAttributeNode(\"href\").nodeValue;\r\n\r\n\t/**numero du poster**/\r\n\r\n\tthis.numPoster=tmp.substr(19,tmp.length-19);\r\n\r\n\r\n\r\n\tfunction isLoved(){\r\n\r\n\t\treturn divDuPost.getElementsByClassName(\"uvote\")[0].getElementsByTagName(\"TD\")[0].firstChild.getAttributeNode(\"src\").nodeValue.indexOf(\"y\",0)!=-1;\r\n\r\n\t}\r\n\r\n\t\tthis.isLoved=isLoved;\r\n\r\n\r\n\r\n\tfunction isHated(){\r\n\r\n\t\treturn divDuPost.getElementsByClassName(\"uvote\")[0].getElementsByTagName(\"TD\")[1].firstChild.getAttributeNode(\"src\").nodeValue.indexOf(\"y\",0)!=-1;\r\n\r\n\t}\r\n\r\n\tthis.isHated=isHated;\r\n\r\n\r\n\r\n\tfunction hate(){\r\n\r\n\t\tif (!this.isHated()){\r\n\r\n\t\treturn XHUVote(divDuPost.getElementsByClassName(\"uvote\")[0],'id='+this.numPoster+'&for=0');\r\n\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tthis.hate=hate;\r\n\r\n\r\n\r\n\tfunction love(){\r\n\r\n\t\tif (!this.isLoved()){\r\n\r\n\t\treturn XHUVote(divDuPost.getElementsByClassName(\"uvote\")[0],'id='+this.numPoster+'&for=1');\r\n\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tthis.love=love;\r\n\r\n\tfunction clean(){\r\n\t\tcomment=this.div.getElementsByClassName(\"comment\")[0].cloneNode(true);\r\n\t\tfor (i=0;i<comment.childNodes.length;i++){\r\n\t\t\tnode=comment.childNodes[i];\r\n\t\t\tif (node.tagName==\"FONT\" || node.tagName==\"B\"){\r\n\t\t\t\tcomment.removeChild(node);\r\n\t\t\t\tfor (j=0;j<node.childNodes.length;j++){\r\n\t\t\t\t\tcomment.appendChild(node.childNodes[j]);\t\r\n\t\t\t\t}\r\n\t\t\t\ti=-1;\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.div.getElementsByClassName(\"comment\")[0].parentNode.replaceChild(comment,this.div.getElementsByClassName(\"comment\")[0]);\r\n\t}\r\n\tthis.clean=clean;\r\n\r\n\r\n\tfunction apply(){\r\n\t\tdocument.getElementById(\"post\"+this.num).parentNode.replaceChild(this.div,document.getElementById(\"post\"+this.num));\r\n\t}\r\n\tthis.apply=apply;\r\n\r\n\r\n}", "renderpost(){\n {return this.state.posts.map(post=> <div key={post.id} className=\"media\">\n <div className=\"media-left\">\n \n </div>\n <div className=\"media-body\">\n <a href={`/users/${post.user.username}`}><b>{post.user.username}</b></a>{' '}\n - {post.created_at}\n \n\n <p> {post.body}</p>\n </div>\n </div>)}\n }", "function paper_to_html(paper) {\n return '<p class=\"paper-paragraph\">' +\n ' <a href=\"' + paper.link + '\">' + paper.title + '</a>' +\n '</p>' +\n '<a href=\"' + paper.link + '\">' +\n ' <img class=\"paper-thumb\" src=\"' + paper.thumbnail + '\">' +\n '</a>';\n}", "static async makePost(post) {\n return new Post({\n id: 0,\n pid: 0,\n tid: post.tid,\n communityID: post.communityID,\n created: post.created,\n\n body: post.body,\n painting: post.painting,\n empathy: 0,\n screenName: post.screenName,\n\n appData: post.appData,\n });\n }", "function BuildMenu() {\r\n const container = document.createElement(\"div\");\r\n container.className = 'menu';\r\n\r\n const ul = document.createElement(\"ul\");\r\n container.appendChild(ul);\r\n\r\n for(const post of posts) {\r\n const menuItem = document.createElement(\"li\");\r\n \r\n const span = document.createElement(\"span\");\r\n span.className = 'method';\r\n span.innerText = post.data.type.type\r\n\r\n const color = post.GetMethodColor()\r\n\r\n if( color !== '' )\r\n span.setAttribute(color, '');\r\n\r\n const text = document.createTextNode(post.data.path);\r\n\r\n menuItem.appendChild(span);\r\n menuItem.appendChild(text);\r\n\r\n ul.appendChild(menuItem);\r\n\r\n menuItem.addEventListener(\"click\", () => {\r\n post.BuildHTML()\r\n .then( html => document.querySelector(\".content\").innerHTML = html )\r\n });\r\n }\r\n\r\n document.body.insertBefore(container, document.querySelector(\".content\"));\r\n}", "function renderPost(posts) {\n\n if (posts.length) {\n $(\".post-area\").prepend(posts);\n }\n\n }", "function createPostElement(postId, title, text, tel, author, authorId, authorPic) {\n var uid = firebase.auth().currentUser.uid;\n\n var html =\n \t'<div class=\"card mdl-card\">' +\n '<div class=\"card-body mdl-card__title\">' +\n '<h4 class=\"title card-text\"></h4>' +\n '<p><img class=\"avatar\" style=\"height:32px;width:32px;background-size:32px 32px;border-radius:32px;border: 2px white solid;margin-right:10px;\"><span class=\"username card-subtitle mb-2 text-muted\"></span></p>' +\n '<div class=\"card-text\">☎️: <span class=\"tel card-text\"></span></div>' +\n\t\t\t'<div class=\"text card-text\"></div>' + \n\t\t '</div>' +\n\t\t '<div class=\"card-footer text-muted\">' +\n\t\t \t'<div class=\"comments-container\"></div>' +\n\t\t \t'<form class=\"add-comment\" action=\"#\">' +\n \t '<div class=\"form-group mdl-textfield mdl-js-textfield\">' +\n \t '<input placeholder=\"Commenta...\" aria-label=\"Commenta...\" class=\"form-control input-sm new-comment\" type=\"text\" required>' +\n '</div>' +\n\t\t\t'</form>' +\n\t\t '</div>' + \n '</div>';\n\n // Create the DOM element from the HTML.\n var div = document.createElement('div');\n div.innerHTML = html;\n var postElement = div.firstChild;\n if (componentHandler) {\n componentHandler.upgradeElements(postElement.getElementsByClassName('mdl-textfield')[0]);\n }\n\n var addCommentForm = postElement.getElementsByClassName('add-comment')[0];\n var commentInput = postElement.getElementsByClassName('new-comment')[0];\n\n\n // Set values.\n postElement.getElementsByClassName('text')[0].innerText = text;\n postElement.getElementsByClassName('tel')[0].innerText = tel;\n postElement.getElementsByClassName('title')[0].innerText = title;\n postElement.getElementsByClassName('username')[0].innerText = author || 'Anonymous';\n postElement.getElementsByClassName('avatar')[0].src = (authorPic || './img/silhouette.jpg');\n \n/*\n postElement.getElementsByClassName('avatar')[0].style.backgroundImage = 'url(\"' +\n (authorPic || './img/silhouette.jpg') + '\")';\n*/\n\n // Listen for comments.\n // [START child_event_listener_recycler]\n var commentsRef = firebase.database().ref('post-comments/' + postId);\n commentsRef.on('child_added', function(data) {\n addCommentElement(postElement, data.key, data.val().text, data.val().author);\n });\n\n commentsRef.on('child_changed', function(data) {\n setCommentValues(postElement, data.key, data.val().text, data.val().author);\n });\n\n commentsRef.on('child_removed', function(data) {\n deleteComment(postElement, data.key);\n });\n // [END child_event_listener_recycler]\n\n\n // Keep track of all Firebase reference on which we are listening.\n listeningFirebaseRefs.push(commentsRef);\n\n\n // Create new comment.\n addCommentForm.onsubmit = function(e) {\n e.preventDefault();\n createNewComment(postId, firebase.auth().currentUser.displayName, uid, commentInput.value);\n commentInput.value = '';\n commentInput.parentElement.MaterialTextfield.boundUpdateClassesHandler();\n };\n\n return postElement;\n}", "render(){\n let posts = this.posts\n .map( posts => \n `<li data-post-id=\"${posts.id}\">\n <h3>${posts.id} - ${posts.title}</h3>\n <p>${posts.body}</hp>\n </li>`)\n\n return $(`<section>\n <hr>\n <ul>${posts.join(\"\")}</ul>\n </section>`);\n }", "function buildHTML() {\n //initialize html\n html = \"\";\n\n for(var i=0; i<elements.length; i++) {\n switch(elements[i].type) {\n case 'title':\n buildTitle(elements[i].options);\n break;\n case 'header':\n buildHeader(elements[i].options);\n break;\n case 'img-one':\n buildImageOne(elements[i].options);\n break;\n case 'img-two':\n buildImageTwo(elements[i].options);\n break;\n case 'img-three':\n buildImageThree(elements[i].options);\n break;\n case 'article-right':\n buildArticleRight(elements[i].options);\n break;\n case 'article-left':\n buildArticleLeft(elements[i].options);\n break;\n case 'text' :\n buildText(elements[i].options);\n break;\n \n }\n }\n buildEnd();\n\n document.getElementById('HTML').innerText = `${html}`;\n}" ]
[ "0.76431787", "0.75064105", "0.7470904", "0.7450804", "0.73155046", "0.7254313", "0.71349424", "0.71274376", "0.6976102", "0.69743454", "0.68133074", "0.6801224", "0.6789249", "0.6787127", "0.67849565", "0.6755449", "0.6735643", "0.6734232", "0.672879", "0.67183894", "0.67100376", "0.66943395", "0.66849905", "0.66517526", "0.66468245", "0.66441816", "0.66249365", "0.657936", "0.65688556", "0.6520247", "0.6517157", "0.64494115", "0.6444954", "0.6435801", "0.64252806", "0.6404944", "0.6396604", "0.6376117", "0.63617814", "0.6357886", "0.63374764", "0.6335385", "0.6328895", "0.632657", "0.6326314", "0.6322887", "0.63116556", "0.62964207", "0.62658095", "0.6263366", "0.62591565", "0.6247853", "0.6239651", "0.6223788", "0.6201612", "0.61268926", "0.61209404", "0.61098665", "0.6104316", "0.60967386", "0.60836095", "0.607728", "0.60574245", "0.60496265", "0.60476846", "0.6041933", "0.6034708", "0.6031143", "0.6028795", "0.60142434", "0.60119945", "0.59977704", "0.59958684", "0.59894913", "0.59866583", "0.5983705", "0.59782475", "0.5973923", "0.59728736", "0.5966008", "0.59648865", "0.596485", "0.5961097", "0.5954349", "0.59501714", "0.5949381", "0.5948986", "0.5943565", "0.59327203", "0.5929036", "0.5919144", "0.59189385", "0.5915396", "0.59036636", "0.58958054", "0.5893662", "0.5893552", "0.5891822", "0.58906054", "0.5884311", "0.58617383" ]
0.0
-1
This function displays a messgae when there are no posts
function displayEmpty(id) { var query = window.location.search; var partial = ""; if (id) { partial = " for Author #" + id; } blogContainer.empty(); var messageh2 = $("<h2>"); messageh2.css({ "text-align": "center", "margin-top": "50%" }); messageh2.html("This NerdGirl has not posted anything yet." ); blogContainer.append(messageh2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayEmpty() {\n blogContainer.empty();\n var messageH2 = $(\"<h2>\");\n messageH2.css({ \"text-align\": \"center\", \"margin-top\": \"50px\",\"color\":\"gray\" });\n messageH2.html('No posts yet for this category. Click \"Add Post\" at top of page');\n blogContainer.append(messageH2);\n }", "function displayEmpty() {\n reviewContainer.empty();\n var messageH2 = $(\"<h2>\");\n messageH2.css({ \"text-align\": \"center\", \"margin-top\": \"50px\" });\n messageH2.html(\"No posts yet for this rating.\");\n reviewContainer.append(messageH2);\n }", "function displayEmpty() {\n blogContainer.empty();\n var messageh2 = $(\"<h2>\");\n messageh2.css({ \"text-align\": \"center\", \"margin-top\": \"50px\" });\n messageh2.html(\"No dancers yet\");\n blogContainer.append(messageh2);\n }", "renderPosts() {\n if ( this.props.posts.length > 0 ) {\n return this.props.posts.map( ( post ) => {\n return <div key={ post._id }>{post.title}</div>;\n });\n } else if (!this.props.posts) {\n return <div>No posts found.</div>;\n } else {\n return <div>Loading...</div>\n }\n }", "function getNoEntriesNotification() {\n\t\t\tvar resultMsg = searchModeActivated.state ? localizeString(\"ASWidget-no-search-entries-found\", \"No entries found with your search parameter $1.\", searchModeActivated.query) : localizeString(\"ASWidget-no-entries-found\", \"There are no updates to display.\"),\n\t\t\t\tnothingToDisplay$ = $('<ul/>').addClass('ASWidget-NoContent-Ul')\n\t\t\t\t\t.append(\n\t\t\t\t\t\t$('<li/>').addClass('normalPostEntryItem')\n\t\t\t\t\t\t\t.append($('<div/>').addClass('container-ASWidgetAlert')\n\t\t\t\t\t\t\t\t.append($('<div/>').addClass('alert').text(resultMsg)))\n\t\t\t\t\t);\n\t\t\treturn nothingToDisplay$[0].outerHTML;\n\t\t}", "function fetchMessages(){\n //const url = '/feed';\n fetch(url).then((response) => {\n return response.json();\n }).then((messages) => {\n const messageContainer = document.getElementById('message-container');\n if(messages.length == 0){\n messageContainer.innerHTML = '<p>There are no posts yet.</p>';\n }\n else{\n messageContainer.innerHTML = '';\n }\n messages.forEach((message) => {\n if(!message.hasOwnProperty('chat')) {\n const messageDiv = buildMessageDiv(message);\n messageContainer.appendChild(messageDiv);\n }\n });\n });\n }", "function displayEmpty() {\n blogContainer.empty();\n var messageh2 = $(\"<h2>\");\n messageh2.css({ \"text-align\": \"center\", \"margin-top\": \"50px\" });\n messageh2.html(\"No parents yet\");\n blogContainer.append(messageh2);\n }", "function noResults() {\n\tvar handlebars = handlebarsInit('#message');\n\t// handlebars append\n\tvar context = {\n\t\tmessage: 'Nessun film o serie TV corrispondono alla ricerca effettuata'\n\t};\n\tvar html = handlebars(context);\n\t$('.results').append(html);\n}", "function noContent() {\n let noContent = '';\n noContent += '<p class=\"text-center mt-20\">No data available.</p>';\n // noContent += '<img src=\"'+config.cloud.server.protocol+'://'+\n // cloudServerAddress+'/'+config.projects.name.dashboard+'/assets/dist/img/no_content.png\" />';\n // noContent += '</div>';\n // noContent += '<p class=\"text-center m-10 text-muted\">Details Unavailable.</p>';\n // noContent += '<p class=\"text-center m-10 text-muted\">There is no detail available.</p>';\n\n return noContent;\n}", "onMyPostsFail(err) {\n this.postMessage = 'Listing not added. Please try again.';\n }", "render() {\n const {post} = this.state\n return (\n \n <div>\n \n\n { \n post.length?\n post.map((post) =>\n <div key={post.id}> {post.title}</div> \n \n ):null\n }\n </div>\n )\n }", "function displayPost(postId, postData) {\n var div = document.getElementById(postId);\n // if post was already retrieved and displayed, skip\n if (div) return;\n\n var template = document.getElementById(\"posts\").querySelector(\"template\");\n var copy = document.importNode(template.content, true);\n div = copy.querySelector('div');\n div.id = postId;\n\n if (!referenceToOldestPost) postListElement.appendChild(div);\n else postListElement.insertBefore(div, referenceToOldestPost);\n referenceToOldestPost = div;\n nbOfPostsDisplayed++;\n\n div.querySelector('.MqU2J').src = postData.actor.image.url;\n div.querySelector('.sXku1c').textContent = postData.actor.displayName;\n\n var publicationDate = moment(postData.published);\n div.querySelector('.o8gkze').textContent = publicationDate.fromNow();\n\n // check if the access.description field contains a community category\n var regExp = /\\(([^)]+)\\)/;\n var category = regExp.exec(postData.access.description);\n if (category) div.querySelector('.IJ13Ic').textContent = category[1];\n\n // Display HTML content of the post\n var messageElement = div.querySelector('.jVjeQd');\n messageElement.innerHTML = postData.object.content;\n\n // Check if post contains an attachment (photo or article)\n if (postData.object.attachments && postData.object.attachments['0']) {\n div.querySelector('div[data-jsname=\"MTOxpb\"]').style.display = \"block\";\n\n var attachment = postData.object.attachments['0'];\n if (attachment.objectType === \"photo\") {\n var attachmentDiv = div.querySelector('.e8zLFb');\n attachmentDiv.style.display = \"block\";\n var imgAttachmentEl = attachmentDiv.querySelector('.JZUAbb');\n if (attachment.image.firebaseImageRef) {\n storage.ref(attachment.image.firebaseImageRef).getDownloadURL().then(function(url) {\n imgAttachmentEl.src = url;\n });\n }\n else {\n imgAttachmentEl.src = attachment.image.url;\n }\n imgAttachmentEl.height = attachment.fullImage.height;\n imgAttachmentEl.width = attachment.fullImage.width;\n imgAttachmentEl.alt = attachment.displayName;\n\n imgAttachmentEl.onload = function(){\n attachmentDiv.querySelector('.E68jgf').style.paddingTop = (imgAttachmentEl.clientHeight / imgAttachmentEl.clientWidth * 100) + \"%\";\n }\n }\n else if (attachment.objectType === \"article\") {\n var attachmentDiv = div.querySelector('div[data-jsname=\"attachmentTypeArticle\"]');\n attachmentDiv.style.display = \"block\";\n\n attachmentDiv.querySelectorAll('.NHphBb').forEach(function(el) {\n el.href = attachment.url;\n });\n\n\n attachmentDiv.querySelector('.Tuxepf').innerText = attachment.displayName;\n if (attachment.image) {\n var imgAttachmentEl = attachmentDiv.querySelector('.JZUAbb');\n if (attachment.image.firebaseImageRef) {\n storage.ref(attachment.image.firebaseImageRef).getDownloadURL().then(function(url) {\n imgAttachmentEl.src = url;\n });\n }\n else {\n imgAttachmentEl.src = attachment.image.url;\n }\n imgAttachmentEl.height = attachment.image.height;\n imgAttachmentEl.width = attachment.image.width;\n imgAttachmentEl.alt = attachment.displayName;\n\n imgAttachmentEl.onload = function(){\n attachmentDiv.querySelector('.E68jgf').style.paddingTop = (imgAttachmentEl.clientHeight / imgAttachmentEl.clientWidth * 100) + \"%\";\n }\n }\n\n attachmentDiv.querySelector('.g0644c').innerText = attachment.url.split('/')[2];\n }\n }\n\n // LIKES / PLUSONES\n var plusOnesContainer = div.querySelector('.oHo9me');\n plusOnesContainer.dataset.itemid = \"update/\" + postId;\n\n var nbOfPlusones = postData.object.plusoners.totalItems;\n plusOnesContainer.dataset.count = nbOfPlusones;\n div.querySelector('.M8ZOee').textContent = nbOfPlusones;\n\n // Check if current user has +1 this post. In that case, make the +1 button red.\n var currentUser = firebase.auth().currentUser;\n if (currentUser) {\n var path = '/plusoners/' + postId + '/' + currentUser.providerData[0].uid + '/id';\n firebase.database().ref(path).once('value').then(function(snapshot) {\n if(snapshot.val()) {\n var element = plusOnesContainer.querySelector('[aria-label=\"+1\"]');\n element.classList.add('y7OZL');\n element.classList.add('M9Bg4d');\n plusOnesContainer.dataset.pressed = true;\n }\n else {\n plusOnesContainer.dataset.pressed = false;\n }\n });\n\n // display the current user profile picture next to the comment UI\n div.querySelector('.WWCMIb').src = currentUser.photoURL;\n }\n else {\n // if user not authenticated, hide profile picture placeholder + comment textbox\n div.querySelector('.JPtOFc').style.display = 'none';\n }\n\n // RESHARES\n if (postData.object.resharers.totalItems) {\n div.querySelectorAll('.M8ZOee')[1].textContent = postData.object.resharers.totalItems;\n }\n\n // COMMENTS\n if (postData.object.replies.totalItems) {\n if (postData.object.replies.totalItems > 3) {\n div.querySelector('.GA5Ak').style.display = \"block\";\n div.querySelector('.CwaK9').firstChild.innerText = \"Show all \" + postData.object.replies.totalItems + \" comments\";\n }\n\n var commentSection = div.querySelector('.EMg45');\n var path = '/comments/' + postId;\n var query = firebase.database().ref(path).orderByChild('published').limitToLast(3);\n query.on('child_added', function (snapshot) {\n if(snapshot.val()) {\n var comment = snapshot.val();\n var commentTemplate = commentSection.querySelector(\"template\");\n var copy = document.importNode(commentTemplate.content, true);\n var div = copy.querySelector('div');\n commentSection.appendChild(div);\n div.querySelector('.vGowKb').textContent = comment.actor.displayName;\n div.querySelector('.Wj5EM').querySelector('span').innerHTML = comment.object.content;\n }\n });\n }\n\n}", "function renderPost(posts) {\n\n if (posts.length) {\n $(\".post-area\").prepend(posts);\n }\n\n }", "renderPosts() {\n if (this.state.posts.length !== 0)\n return this.state.posts[0].slice(0).map((postItem) => {\n const hasImage = postItem.post_image ? postItem.post_image.url : null;\n return (\n <PostItemCard\n key={postItem.id}\n authorName={postItem.author.email}\n authorImg={postItem.author.profile_pic.url}\n description={postItem.description}\n postDate={postItem.createdAt}\n imgSrc={hasImage}\n />\n );\n });\n else\n return (\n <div className=\"ui inverted segment\">\n <p></p>\n <div className=\"ui inverted divider\"></div>\n <p></p>\n <h4 className=\"ui horizontal inverted divider\">\n there are no post available\n </h4>\n </div>\n );\n }", "function displayNoResultsMessage() {\n var $noResultsDiv = $(document.createElement('div'));\n $noResultsDiv.addClass('no-social-results');\n $noResultsDiv.text(noResultsMsg);\n $host.append($noResultsDiv);\n }", "function displayEmpty() {\n var emptyCase = `\n <div class = \"alert alert-warning\" role = \"alert\">\n <h5>No new articles available.</h5>\n </div>`;\n articleContainer.append(emptyCase);\n }", "function renderEmpty(){\n // This function renders some HTML to the page explaining we don't have any articles to view\n // using a joined array of HTML string data because it's easier to read/change than a concatenated string\n var emptyAlert =\n $([\"<div calss='alert-warning text-center'>\",\n \"<h4>Uh oh. Looks like we don't have any new articles.</h4>\",\n \"</div>\",\n \"<div class='panel panel-default'>\",\n \"<div class='panel-heading text-center'>\",\n \"<h3>What Would You Like To Do?</h3>\",\n \"</div>\",\n \"<div class='panel-body text-center'>\",\n \"<h4><a class='class'scrape-new'>Try Scraping New Articles</a></h4>\",\n \"</div>\"\n ].join(\"\"));\n // appending this data to the page\n articleContainer.append(emptyAlert);\n}", "function displayPosts(post) {\n\n //s'il s'agit du tout 1er message il reçoit le message 'new'\n let newest = '';\n if (isFirst) {\n newest = '<p class=\"new\">New</p>';\n }\n\n let img = '';\n if (post.imageURL !== null) {\n img = '<p id=\"para__Img\"><img src=\"' + post.imageURL + '\" alt=\"image publiée par l\\'utilisateur\"></p>';\n }\n document.getElementById('main').innerHTML +=\n `<article class = \"card\" \"data-key\"=${post.id}>\n ${newest}\n <header class = \"card__header card__header--avatar\">\n <img src=\"./images/20456790.jpg\" alt=\"photo profil de l'utilisateur\" class=\"card__avatar\">\n <div class=\"card__pseudo\">${post.User.username}</div>\n <div class=\"card__time\">${new Date(post.createdAt).toLocaleDateString('fr-FR', { year: \"numeric\", month: \"long\", day: \"numeric\" })}</div>\n <a id=\"title__link\" href=\"./singlePost.html?id=${post.id}\"><h2 class=\"card__title\">${post.title}</h2>\n </a>\n </header>\n <div id =\"card__body\">\n ${img}\n <p class =\"card__text\">${post.content}</p>\n </div>\n <footer class=\"card__footer\">\n <div class=\"card__like\">\n <a href=\"#\"><i class=\"far fa-thumbs-up\" aria-hidden=\"true\"></i></a>\n </div>\n <div class=\"card__dislike\">\n <a href=\"#\"><i class=\"far fa-thumbs-down\" aria-hidden=\"true\"></i></a>\n </div>\n <div id=\"card__comments\"><a href=\"./singlePost.html?id=${post.id}\"><i class=\"far fa-comment-alt\" aria-hidden=\"true\"></i></a></div>\n </footer>\n </article>`\n\n const paraImg = document.getElementById('para__Img');\n\n}", "function displayPosts(posts) {\n console.log(posts)\n $.each( posts, function( key, value ) {\n post = value;\n if (key <= 6) {\n document.getElementById('posts-container').innerHTML += '<a class=\"post\" target=\"_blank\" href=\"' + post.full_url + '\">'+\n '<div style=\"background-image:url(' + post.image + ')\"><h2>Member: </h2><h3>' + post.poster_name + \"</h3>\" +\n '</div></a>';\n }\n });\n }", "function checkForNoItems() {\n $list.find(\".noitems\").remove();\n\n if (!$list.find(\".feed-element\").length > 0) {\n $(\"<div class='noitems text-center text-muted m-t-md m-b-lg'>\" +\n \"<i class='fa fa-2x fa-search text-warning m-b-sm'></i>\" +\n \"<h4>No activities found.</h4>\" +\n \"</div>\").appendTo($list);\n }\n\n }", "function renderEmpty() {\n var alertDiv = $(\"<div>\");\n alertDiv.addClass(\"alert alert-danger\");\n alertDiv.text(\"You must create a Reviewer before you can create a Post.\");\n reviewerContainer.append(alertDiv);\n }", "function renderEmpty(){\n\n if( $(\"#newsArea\").children(\"#no-articles-warning\").length === 0 ){\n var div = $(\"<div class='alert alert-warning' role='alert'>\");\n div.text(\"No new artciles have been added!\");\n div.attr(\"id\", \"no-articles-warning\");\n $(\"#newsArea\").prepend(div);\n }\n\n}", "function renderEmpty() {\n reviewContainer.empty();\n\n var alertDiv = $(\"<div>\");\n alertDiv.addClass(\"alert alert-danger\");\n alertDiv.text(\"There must be a Review created before you can view one.\");\n reviewContainer.append(alertDiv);\n\n var query = window.location.search;\n var partial = \"\";\n if (movieSelect.val()) {\n partial = \" for Movie Title\" + movieSelect.val();\n }\n\n var message = $(\"<h2>\");\n message.css({ \"text-align\": \"center\", \"margin-top\": \"50px\" });\n message.html(\"No reviews yet\" + partial + \", navigate <a href='/cms\" + query +\n \"'>here</a> in order to get started.\");\n reviewContainer.append(message);\n }", "function displayPostData(data) {\n var results = data.map((post, index) => {\n return renderResult(post, index);\n });\n\n if (results.length > 0) {\n $(\".posts\").html(results);\n } else {\n $(\".posts\").html(\n `<h2 class=\"first-post\">Welcome to Day! Submit your first post to start building your journal.</h2>`\n );\n $(\".first-post\").css(\"height\", \"540px\");\n $(\".first-post\").css(\"padding\", \"50px 15px 0px 15px\");\n }\n}", "function displayEmpty(id) {\n var query = window.location.search;\n var partial = \"\";\n if (id) {\n partial = \" for Merchant #\" + id;\n }\n blogContainer.empty();\n var messageH2 = $(\"<h2>\");\n messageH2.css({ \"text-align\": \"center\", \"margin-top\": \"50px\" });\n messageH2.html(\"No products yet\" + partial + \", navigate <a href='/cms\" + query +\n \"'>here</a> in order to get started.\");\n blogContainer.append(messageH2);\n }", "renderEmpty(){\n if (this.state.alerts.length === 0){\n return (\n <div class=\"col-12\">\n <Alert className=\"no-alerts-alert\" color=\"primary\">\n There are no alerts to display.\n </Alert>\n </div>\n );\n }\n }", "function renderEmpty() {\n var alertDiv = $(\"<div>\");\n alertDiv.addClass(\"alert alert-danger\");\n alertDiv.text(\"No Comments So Far\");\n commentContainer.append(alertDiv);\n }", "function displayEmpty(id) {\n var query = window.location.search;\n var partial = \"\";\n if (id) {\n partial = \" for Workout #\" + id;\n }\n blogContainer.empty();\n var messageh2 = $(\"<h2>\");\n messageh2.css({ \"text-align\": \"center\", \"margin-top\": \"50px\" });\n messageh2.html(\"No exercises yet\" + partial + \", navigate <a href='/exercise\" + query +\n \"'>here</a> in order to get started.\");\n blogContainer.append(messageh2);\n }", "function displayPost(post) {\r\n\r\n}", "returnNoResults() {\n let template = RoKA.Application.getExtensionTemplateItem(this.template, \"noposts\");\n let message = template.querySelector(\".single_line\");\n message.textContent = RoKA.Application.localisationManager.get(\"post_label_noresults\");\n /* Set the icon, text, and event listener for the button to switch to the Disqus comments. */\n let googlePlusButton;\n let googlePlusContainer;\n if (RoKA.Application.currentMediaService() === Service.YouTube) {\n googlePlusButton = template.querySelector(\"#at_switchtogplus\");\n template.querySelector(\"#at_switchtodisqus\").style.display = \"none\";\n googlePlusButton.addEventListener(\"click\", this.onGooglePlusClick, false);\n googlePlusContainer = document.getElementById(\"watch-discussion\");\n }\n else if (RoKA.Application.currentMediaService() === Service.KissAnime) {\n googlePlusButton = template.querySelector(\"#at_switchtodisqus\");\n template.querySelector(\"#at_switchtogplus\").style.display = \"none\";\n googlePlusButton.addEventListener(\"click\", this.onGooglePlusClick, false);\n googlePlusContainer = document.getElementById(\"disqus_thread\");\n }\n else if (RoKA.Application.currentMediaService() === Service.KissManga) {\n googlePlusButton = template.querySelector(\"#at_switchtodisqus\");\n template.querySelector(\"#at_switchtogplus\").style.display = \"none\";\n googlePlusButton.addEventListener(\"click\", this.onGooglePlusClick, false);\n googlePlusContainer = document.getElementById(\"disqus_thread\");\n }\n if (RoKA.Preferences.getBoolean(\"showGooglePlusButton\") === false || googlePlusContainer === null) {\n googlePlusButton.style.display = \"none\";\n }\n this.set(template);\n if (RoKA.Preferences.getBoolean(\"showGooglePlusWhenNoPosts\") && googlePlusContainer) {\n googlePlusContainer.style.display = \"\";\n googlePlusContainer.style.height = \"auto\";\n document.getElementById(\"RoKA\").style.display = \"none\";\n let redditButton = document.getElementById(\"at_switchtoreddit\");\n if (redditButton) {\n redditButton.classList.add(\"noresults\");\n }\n }\n }", "function displayEmpty() {\n responseContainer.empty();\n var messageh2 = $(\"<h2>\");\n messageh2.css({ \"text-align\": \"center\", \"margin-top\": \"50px\" });\n messageh2.html(\"No responses yet for this category, navigate <a href='/questionnaire'>here</a> in order to create a new response.\");\n responseContainer.append(messageh2);\n }", "function getConversation(post) {\n fetch(API_URL + `message/?target=${post[\"id\"]}`, {\n method: \"GET\",\n credentials: \"include\",\n })\n .then((response) => {\n if (response.ok) return response.json();\n else alert(\"An error occured\");\n })\n .then((data) => {\n messagesLoaderElement.style.display = \"none\";\n\n messageList.insertAdjacentHTML(\"afterbegin\", \"<br/>\");\n\n // show post title and body as initial messages\n const postTitleAsMessage = {\n body: currentPost.title,\n is_author: currentPost.is_author,\n timestamp: currentPost.timestamp,\n };\n drawMessage(postTitleAsMessage);\n if (currentPost.body) {\n const postBodyAsMessage = {\n body: currentPost.body,\n is_author: currentPost.is_author,\n timestamp: currentPost.timestamp,\n };\n drawMessage(postBodyAsMessage);\n }\n\n const isResponsePresent = data.length > 0;\n if (currentPost[\"is_author\"] && !isResponsePresent) {\n disableInput();\n messageList.insertAdjacentHTML(\n \"beforeend\",\n chatWindowNoResponseMessage\n );\n } else {\n for (let i = data.length - 1; i >= 0; i--) {\n drawMessage(data[i]);\n }\n messageList.animate({ scrollTop: messageList.scrollHeight });\n enableInput();\n\n // remove post's number of new messages badge\n nNewMessages[currentPost[\"id\"]] = 0;\n const nNewMessagesForPostElement = document.getElementById(\n \"n-new-messages-\" + currentPost[\"id\"]\n );\n nNewMessagesForPostElement.innerHTML = \"\";\n\n // if no not seen messages through all posts remove [my talks] new messages badge\n let noNewMessages = true;\n for (let postId in nNewMessages) {\n if (nNewMessages[postId]) noNewMessages = false;\n }\n\n if (noNewMessages) notificationBadge.style.visibility = \"hidden\";\n }\n });\n}", "render(){\n const {posts,errormsg}=this.state //destruct the state\n return(\n <div>\n {\n posts.length?posts.map(post=><div key ={post.id}>{post.title}</div> ):null\n }\n {\n errormsg ? <div>{errormsg}</div>:null\n }\n </div>\n )\n }", "function clearPosts() {\n\t\t$(articleContainer).html('');\n\t}", "function clearPosts() {\n\t\t$(articleContainer).html('');\n\t}", "function loadPosts() {\n const postsCollection = firebase.firestore().collection(\"postagens\");\n container.querySelector(\"#lista-feed\").innerHTML = \"Carregando...\";\n postsCollection.get().then((querySnapshot) => {\n container.querySelector(\"#lista-feed\").innerHTML = \"\";\n querySnapshot.forEach((doc) => {\n const post = { id: doc.id, data: doc.data() };\n const componente = postTemplate(post);\n console.log(componente)\n container.querySelector(\"#lista-feed\").appendChild(componente);\n });\n });\n }", "function displayNoData(data, msg) {\n var hasData = data && data.length;\n var x = (containerWidth - margin.left - margin.right) / 2 + margin.left;\n var y = (containerHeight - margin.top - margin.bottom) / 2 + margin.top;\n return utility.displayNoData(hasData, container, (msg || strings.noData), x, y);\n }", "function displayIfNoLinks() {\n\n // Used in showing if there are no results\n const page = document.querySelector(\".page\");\n\n // If there is already an h1 tag, it is removed\n if (page.lastElementChild.tagName === \"H1\") {\n page.removeChild(page.lastElementChild);\n }\n\n // If there are 0 links that match the search, then a message is outputted\n if (linksToDisplay.length === 0) {\n const noTextMessage = makeH1(\"No matches found!\");\n\n // Makes h1 tag for output\n page.appendChild(noTextMessage);\n }\n}", "function renderEmpty() {\n const alertText = \"Uh Oh. Looks like we don't have any articles.\";\n const alertBox = $('<div/>')\n .addClass('shadow alert alert-warning text-center')\n .append($('<h4/>').text(alertText));\n\n const cardHeaderText = 'What Would You Like To Do?';\n const cardHeader = $('<div/>')\n .addClass('card-header d-block')\n .append($('<h3/>').addClass('text-center').text(cardHeaderText));\n\n const scrapeLink = $('<a/>')\n .addClass('scrape-new')\n .attr({ href: '#' })\n .text('Try Scraping New Articles');\n const savedLink = $('<a/>')\n .addClass('go-to-saved')\n .attr({ href: '/saved' })\n .text('Go to Saved Articles');\n\n const cardBody = $('<div/>')\n .addClass('card-body text-center')\n .append(\n $('<h4/>').append(scrapeLink),\n $('<h4/>').append(savedLink)\n );\n\n const card = $('<div/>').addClass('card').append(cardHeader, cardBody);\n\n articleContainer.append(alertBox, card);\n }", "function displayPost() {\n console.log('Post Title');\n console.log('Post Content');\n}", "render () {\n const { post } = this.props;\n // when POST_SHOW first renders it doesn't have a post from redux yet, in that case, we'll display a message\n if (!post) {\n return <div>Loading...</div>;\n }\n\n return (\n <div>\n <Link to=\"/\" className=\"btn btn-primary\">Back to Index</Link>\n <button\n className=\"btn btn-danger pull-xs-right\"\n onClick={this.onDeleteClick.bind(this)}\n >\n Delete Post\n </button>\n <h3>{post.title}</h3>\n <h6>Categories: {post.categories}</h6>\n <p>{post.content}</p>\n </div>\n );\n }", "getDisplayMessage() {\n switch (this.props.fetchStatus) {\n case FETCH_INIT:\n return <span>Loading tweets...</span>;\n case FETCH_ERROR:\n case FETCH_SUCCESS:\n return (\n <div>\n <p>\n No results found <span className=\"text-warning\">:sad_panda:</span>\n </p>\n <img className=\"sad-panda\" src=\"/images/sad_panda.gif\" alt=\"\" />\n </div>\n );\n default:\n return null;\n }\n }", "function renderEmpty() {\n var alertDiv = $(\"<div>\");\n alertDiv.addClass(\"alert alert-danger\");\n alertDiv.text(\"You must create an property before you can create a Post.\");\n propertyContainer.append(alertDiv);\n }", "function noEventsFound() {\n\t$('#events_scroller').empty()\n\t\t.append($(\"<div id='no_events_container'>Sorry, no events found.</div>\"));\t\n}", "function displayEmptyPageMessage() {\n $(\"#emptyPageMessageWrapper\").removeClass(\"hidden\");\n }", "function getPosts(userID, name) {\n $.get(\"/api/posts\", function(data) {\n posts = data.reverse();\n console.log(posts)\n if (!posts || !posts.length) {\n displayEmpty(userID, name);\n }\n else {\n initializeRows(userID);\n }\n });\n }", "function renderEmpty() {\n var alertDiv = $(\"<div>\");\n alertDiv.addClass(\"alert alert-info\");\n alertDiv.text(\"No Records Found\");\n inventoryContainer.append(alertDiv);\n }", "function display_posts() {\n\t\tconsole.log(\"display_posts\");\n\t\t$.ajax({\n\t\t\turl: '/api/index.php',\n\t\t\ttype: \"GET\",\n\t\t\tdata: \"controller=post&action=createPost&title=website&message=adhabdkhajbdhjkasd\",\n\t\t\tcache: false,\n\t\t\tsuccess: function(responseText){\n\t\t\t\t//alert('new post added !!');\n\t\t\t\t$('#container').fadeIn().load(\"viewPosts.php\");\n\t\t\t}\n\t\t});\n\t}", "allPosts() {\n console.log('New posts have arrived.');\n // console.log('allPosts was modified, updating feed!');\n if (!this.allPosts) {\n return;\n }\n this.redrawFeed();\n }", "function renderNotPublishedError(notification) {\n console.warn(\"BEAUTIFUL IB RESULTS: %s\", \"results not published yet\");\n\n //extract date (+-1 accounts for spaces)\n let startIndex = notification.indexOf(\"published on\") + \"published on\".length + 1;\n let endIndex = notification.indexOf(\"GMT\") - 1;\n let dateString = notification.substring(startIndex, endIndex);\n\n //parse date\n let date = luxon.DateTime.fromFormat(dateString, \"dd-LLLL-yyyy HH:mm:ss\", {zone: \"Etc/GMT\"});\n\n //get the element within the template which will contain the subjects\n const subject_list = document.querySelector(\".subject-list\");\n //get the error template element\n const template = document.querySelector(\"#template_error\");\n\n //create a clone of the error\n let clone = template.content.cloneNode(true);\n\n //change the error message\n clone.querySelector(\".subject\").textContent = `Results have not been published yet.`;\n //render the subject\n subject_list.append(clone);\n\n //start the countdown\n countdown({stop: false, end: date});\n }", "function displayFeed(i,value){\n\t\t\t\t\tstory=value.story;\n\t\t\t\t\tmessage=value.message;\n\t\t\t\t\ttime=value.created_time;\n\t\t\t\t\t\n\t\t\t\t\t//To handle all the cases, and check the worst case conditions\n\t\t\t\t\tif(message==null || message==\"undefined\"){\n\t\t\t\t\t\t$('#feeds').append(\n\t\t\t\t\t\t\t$('<div>').addClass('container').attr(\"id\",\"badge\").html(\"<b>\"+story+\"</b>\"+\"<p>\"+time+\"</p>\")\t\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\telse if(story==null || story==\"undefined\"){\n\t\t\t\t\t\t$('#feeds').append(\n\t\t\t\t\t\t\t$('<div>').addClass('container').attr(\"id\",\"badge\").html(\"<p>\"+message+\"</p>\"+\"<p>\"+time+\"</p>\")\t\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\telse{\n\t\t\t\t\t\t$('#feeds').append(\n\t\t\t\t\t\t\t$('<div>').addClass('container').attr(\"id\",\"badge\").html(\"<b>\"+story+\"</b><br/>\"+\"<p>\"+time+\"</p>\"+\"<p>\"+message+\"</p>\")\t\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}", "function showEventInfo(posts) {\n logger.info('Count of parse posts: ' + posts.length);\n \n for (var i = 0, len = posts.length; i < len; i++) {\n logger.info('---------------------');\n logger.info(posts[i].title);\n logger.info('Время: ' + posts[i].time);\n logger.info('Цена: ' + posts[i].price);\n logger.info('Место: ' + posts[i].place);\n logger.info('---------------------');\n }\n }", "function displayPosts() {\n var posts = JSON.parse(this.response);\n var postsContainer = $(\"#posts\");\n for (var i=0; i<posts.length; i++) {\n postsContainer.append(\"<li>\" + posts[i].body + \"</li>\")\n }\n }", "function displayNoData() {\n $(\"#loadingcard\").hide();\n //create a div that holds no data.\n var top = $(\"div.col-sm-12\");\n\n var div1 = $(\"<div/>\")\n .addClass(\"card mb-4\")\n .appendTo(top);\n\n var div2 = $(\"<div/>\")\n .addClass(\"card-body text-center\")\n .appendTo(div1);\n\n var h5 = $(\"<h5/>\")\n .addClass(\"card-title\")\n .text(\"Newest Releases\")\n .appendTo(div2);\n\n var p = $(\"<p/>\")\n .addClass(\"card-text\")\n .text(\"Opps, Cannot display. Refresh the page.\")\n .appendTo(div2);\n }", "function renderPosts(posts) {\n //delete\n \n let divchild = document.createElement(\"div\");\n let article = document.createElement(\"p\");\n let title = document.createElement(\"h2\");\n \n divchild.setAttribute(\"class\", \"post\");\n\n title.appendChild(document.createTextNode(posts[0].title));\n \n article.appendChild(document.createTextNode(posts[0].body))\n \n divchild.appendChild(title)\n divchild.appendChild(article)\n \n divContenedorPost.appendChild(divchild);\n\n \n}", "function grabFeedPosts()\n\t{\n\t\t$.ajax(`/poem/fetchmore/4?page=${$page}`, {\n\t\t\t\ttype:'GET',\n\t\t\terror:function(data) {\n\t\t\t\tconsole.log(data.responseText);\n\t\t\t},\n\t\t\tsuccess:function(data) {\n\t\t\t\t$poemscontainer.append(data);\n\n\t\t\t\tif($spanmore.text().trim() == $('.poem').length)\n\t\t\t\t{\n\t\t\t\t\t$loaderbody.remove();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$loaderbody.hide();\n\t\t\t\t}\n\n\t\t\t\t$page++;\n\t\t\t}\n\t\t})\n\t}", "function empty() {\n res.send(\n {\n \"response_type\": \"ephemeral\",\n \"text\": \"Sorry, Desk give me any results :(\",\n }\n )\n }", "function initUnreadPosts() {\n // First mark all posts as unread\n $('.post.reply').each( function (index, data) {\n var postId = $(this).attr('id').replace(/^reply_/, '');\n unreadPosts[unreadPosts.length] = postId;\n });\n checkUnreadPosts();\n \n $(window).scroll(function() {\n checkUnreadPosts();\n });\n}", "function initUnreadPosts() {\n // First mark all posts as unread\n $('.post.reply').each( function (index, data) {\n var postId = $(this).attr('id').replace(/^reply_/, '');\n unreadPosts[unreadPosts.length] = postId;\n });\n checkUnreadPosts();\n \n $(window).scroll(function() {\n checkUnreadPosts();\n });\n}", "function renderEmpty() {\n var alertDiv = $(\"<div>\");\n alertDiv.addClass(\"alert alert-danger\");\n alertDiv.text(\"Sorry - Nothing to reServe today!\");\n groceryContainer.append(alertDiv);\n }", "function getPosts(author) {\n authorId = author || \"\";\n if (authorId) {\n authorId = \"/?author_id=\" + authorId;\n }\n $.get(\"/api/posts\" + authorId, function(data) {\n console.log(\"Posts\", data);\n posts = data;\n if (!posts || !posts.length) {\n displayEmpty(author);\n }\n else {\n initializeRows();\n }\n });\n }", "render(){\n\t\t if(!this.props.post){\n\t\t \treturn <div>Loading....</div>\n\t\t }\n\t\treturn(\n <div>\n <div> {this.props.params.id}</div>\n <h3>Post</h3>\n ju\n </div>\n\t );\n\t}", "function renderOnePost(todoItems) {\n // const sortedData = todoItems.sortby(['id'])\n const mainContainer = document.querySelector('.js-to-hide');\n mainContainer.style.display = \"none\";\n\n\n const postContainer = document.querySelector('.js-one-post');\n postContainer.style.display = \"block\";\n\n postContainer.innerHTML = '';\n // const todoItemsReverse = todoItems.reverse();\n // for (const todoItem of sortedData) {\n for (const todoItem of todoItems) {\n // const div = document.createElement('div');\n postContainer.innerHTML = `\n <a href=\"../index.html\">Back to home</a>\n\n <header>\n <h2>${todoItem.data.title}</h2>\n <p>${todoItem.data.todo}</p>\n </header>\n <section>\n <hr />\n <header>\n <p>${todoItem.data.when}</p>\n </header>\n </section>\n `;\n // container.appendChild(div);\n };\n }", "function displayEmpty() {\n requestsContainer.empty();\n var messageh2 = $(\"<h2>\");\n messageh2.css({ \"text-align\": \"center\", \"margin-top\": \"50px\" });\n messageh2.html(\"No time off requests have been made.\");\n requestsContainer.append(messageh2);\n }", "function showLimitedPosts(response){\n\n /* html to format the posts displayed*/\n var startFormatContent = \"<div class='row' id='feed'><div class='col-md-3 col-xs-12'></div><div class='col-md-8 col-xs-12' id='post'>\";\n var endFormatContent = \"<hr></div></div>\";\n\n var content = \"\"; // empty string to store the whole div before adding it to html\n response.map(function(eachPost){\n content = \"\";\n var userId = eachPost.from.id; //saving userid for accessing their profile picture\n pictureUrl = \"https://graph.facebook.com/\"+ userId + \"/picture?type=large\"; //saving url of profile picture of user\n switch (eachPost.type) { // for checking which type of post user posted\n case \"status\":\n content += startFormatContent;\n content += \"<img class='feed-img' id='feed-img-id' src='\" + pictureUrl + \"' alt='pic'>\";\n content += \"<p class='feed-img'> \" + eachPost.from.name + \"</p>\";\n content += \"<p class='feed-img time'>\" + dateFormat(eachPost.created_time) + \"</p>\";\n content += \"<p class='format-msg'>\" + checkMessage(eachPost.message) + \"</p>\";\n content += \"<p class='feed-img'> \" + checkMessage(eachPost.story) + \"</p>\";\n content += endFormatContent;\n $(\"div#myfeed\").append(content);\n break;\n\n case \"photo\":\n content += startFormatContent;\n content += \"<img class='feed-img' id='feed-img-id' src='\" + pictureUrl + \"' alt='pic'>\";\n content += \"<p class='feed-img'> \" + eachPost.from.name + \"</p>\";\n content += \"<p class='feed-img time'>\" + dateFormat(eachPost.created_time) + \"</p>\";\n content += \"<p class='format-msg'>\" + checkMessage(eachPost.message) + \"</p>\";\n content += \"<img src='\" + eachPost.picture + \"' class='post-img' alt='post pic'>\";\n content += endFormatContent;\n $(\"div#myfeed\").append(content);\n break;\n\n case \"video\":\n content += startFormatContent;\n content += \"<img class='feed-img' id='feed-img-id' src='\" + pictureUrl + \"' alt='pic'>\";\n content += \"<p class='feed-img'> \" + eachPost.from.name + \"</p>\";\n content += \"<p class='feed-img time'>\" + dateFormat(eachPost.created_time) + \"</p>\";\n content += \"<p class='format-msg'>\" + checkMessage(eachPost.message) + \"</p>\";\n content += \"<video width='240' height='180' controls><source src='\" + eachPost.source +\"' type='video/mp4'></video>\";\n content += endFormatContent;\n $(\"div#myfeed\").append(content);\n break;\n\n case \"link\":\n content += startFormatContent;\n content += \"<img class='feed-img' id='feed-img-id' src='\" + pictureUrl + \"' alt='pic'>\";\n content += \"<p class='feed-img'> \" + eachPost.from.name + \"</p>\";\n content += \"<p class='feed-img time'>\" + dateFormat(eachPost.created_time) + \"</p>\";\n content += \"<p class='format-msg'>\" + checkMessage(eachPost.message) + \"</p>\";\n content += \"<a href='\" + eachPost.link + \"'class='format-msg' style='text-decoration: underline' \\\n target='_blank'><b>\" + checkMessage(eachPost.name) + \"</b></a>\";\n content += \"<p class='format-msg'>\" + checkMessage(eachPost.description) + \"</p>\";\n content += endFormatContent;\n $(\"div#myfeed\").append(content);\n break;\n\n default:\n break;\n }\n\n });\n\n /*to style and append load more button*/\n content = \"\";\n content += \"<div class='row' id='feed'><div class='col-md-3 col-xs-12'></div><div class='col-md-8 col-xs-12' id='post'\\\n style='background-color: transparent; box-shadow: none'>\";\n content += \"<button class='btn btn-primary btn-center'>Load More</button>\";\n content += endFormatContent;\n $(\"div#myfeed\").append(content);\n\n }", "function insertNoPost(sub){\n //create the html to be injected\n var html = ['<p style=\"text-align: center; margin-top: 115px;\">','There are currently no active bounties for ',sub,'</p>'].join('');\n var div = document.createElement('div');\n div.setAttribute('id', 'noBounties');\n div.innerHTML = html;\n //add the div with the html elements inside to the posts section of the page\n document.getElementById('posts-section').appendChild(div);\n}", "renderNoMessage() {\n return (\n <Text style={styles.text}>\n No Sub Todo's Yet\n </Text> \n )\n }", "function getPosts() {\n setTimeout(() => {\n let output = \"\";\n posts.forEach((e, i) => {\n output += `<li>${e.title}</li>`;\n });\n document.body.innerHTML = output;\n }, 1000);\n}", "function renderEmpty() {\n const alertText = \"Uh Oh. Looks like we don't have any saved articles.\";\n const alertBox = $('<div/>')\n .addClass('shadow alert alert-warning text-center')\n .append($('<h4/>').text(alertText));\n\n const cardHeaderText = 'Would You Like to Browse Available Articles?';\n const cardHeader = $('<div/>')\n .addClass('card-header d-block')\n .append($('<h3/>').addClass('text-center').text(cardHeaderText));\n\n const browseLink = $('<a/>')\n .addClass('browse-articles')\n .attr({ href: '/' })\n .text('Browse Articles');\n const cardBody = $('<div/>')\n .addClass('card-body text-center')\n .append($('<h4/>').append(browseLink));\n const card = $('<div/>').addClass('card').append(cardHeader, cardBody);\n\n articleContainer.append(alertBox, card);\n }", "function displayEmpty(id) {\n var query = window.location.search;\n var partial = \"\";\n if (id) {\n partial = \" for restaurant #\" + id;\n }\n menuContainer.empty();\n var messageH2 = $(\"<h2>\");\n messageH2.css({ \"text-align\": \"center\", \"margin-top\": \"50px\" });\n messageH2.html(\"No menus yet\");\n menuContainer.append(messageH2);\n }", "function renderEmpty() {\n var alertDiv = $(\"<div>\");\n alertDiv.addClass(\"alert alert-danger\");\n alertDiv.text(\"You must create an Author before you can create a Definition.\");\n authorContainer.append(alertDiv);\n }", "function displayPosts(posts) {\r\n\t// use helper function displayPost\r\n\r\n}", "function fetchWallPosts(){\n\t//get current url user id \n\tvar userid = gup('userID');\n\t\n\t$.get('renderWall', {userid:userid}, function(data){\n\t\t\n\t\tif(data == null){\n\t\t\t$('#statusWrapper div:first').after(\"Feel free to write your wall!\");\n\t\t\t$('#moreWallPosts').html(\"\");\n\t\t\treturn;\n\t\t}else{\n\t\t\t\n\t\t\tvar s = \"\";\n\t\t\t//access and loop through each json object\n\t\t\t$.each(data, function(index){\n\t\t\t\t//alert(data[index]['username']);\n\t\t\t\ts += \"<div class=\\\"walldiv\\\"><h5>\";\n\t\t\t\ts += \"<a href=\\\"/viewProfile.php?userID=\" + data[index]['posterID'] + \"\\\">\" + data[index]['name'] + \"</a>\";\n\t\t\t\ts += \"<span>\" + data[index]['time'] + \"</span></h5>\";\n\t\t\t s += \"<div id=\\\"msg\\\">\" + data[index]['content'] + \"</div></div>\";\t\t\t\t\t\n\t\t\t});//end of each \n\t\t\t$('#statusWrapper div').after(s);\n\t\t}//end of else\n\t}, 'json');//end of get\n}//end of fetchWallPost ", "function fetchMessages() {\n let url = '/messages?user=' + parameterUsername;\n\n const parameterLanguage = defaultLanguage;\n if (parameterLanguage) {\n url += '&language=' + parameterLanguage;\n }\n\n console.log(url);\n\n fetch(url)\n .then((response) => {\n return response.json();\n })\n .then((messages) => {\n const messagesContainer = document.getElementById('message-container');\n if (messages.length == 0) {\n messagesContainer.innerHTML = '<p>This user has no posts yet.</p>';\n } else {\n messagesContainer.innerHTML = '';\n }\n\n\n var count = 0;\n\n messages.forEach((message) => {\n const messageDiv = buildMessageDiv(message);\n\n if (count !== maxMessages) {\n \tcount++;\n } else {\n \tmessageDiv.hidden = true;\n }\n\n messagesContainer.appendChild(messageDiv);\n });\n\n });\n}", "function showAllPosts() {\n\tfor(var i = 0; i < allPosts.length; i++) {\n\t\tallPosts[i].style.display = \"initial\";\n\t}\n}", "function empty_description() {\n $('#post_error').text(\"Musíte zadat popisek!\");\n}", "function noInput() {\n\tvar handlebars = handlebarsInit('#message');\n\t// handlebars append\n\tvar context = {\n\t\tmessage: 'Scrivi il nome di un film o una serie TV'\n\t};\n\tvar html = handlebars(context);\n\t$('.results').append(html);\n}", "function getNoAccessNotification() {\n\t\t\tvar resultMsg = localizeString(\"ASWidget-no-access-to-entries\", \"You do not have permission to access this page.\"),\n\t\t\t\tnoAccessMsg = '<ul class=\"ASWidget-NoEntries-Ul\"><li class=\"normalPostEntryItem\">' +\n\t\t\t\t\t$('<div/>').addClass('container-ASWidgetAlert').append(createAlert(resultMsg, 'danger'))[0].outerHTML + '</li></ul>';\n\t\t\treturn noAccessMsg;\n\t\t}", "function showAllPosts(text) {\n // Grab the pinboard div from the page\n pinboardElement = document.getElementById('pinboard');\n // Decode the post data\n postData = JSON.parse(text);\n // Clear the pinboard\n pinboardElement.innerHTML = '';\n // Loop through the postData\n postData.forEach(function (post) {\n console.log('here');\n // Show the item\n pinboardElement.innerHTML += '<div class=\"post\"><a class=\"title\" href=\"' + post.url + '\">' + post.title + '</a><span class=\"meta\">Posted ' + post.date + ' by ' + post.user + '</span></div>';\n });\n \n // TODO: Make the back button work\n}", "function displayPosts(forum)\n{\n\tif(forum != \"home\")\n\t{\n\t\tvar route = \"posts\"; \n\t\tswitch(forum)\n\t\t{\n\t\t\tcase \"leaving\":\n\t\t\t\troute += \"?offer=ride\"; \n\t\t\t\tbreak; \n\t\t\tcase \"arriving\": \n\t\t\t\troute += \"?offer=shelter\"; \n\t\t\t\tbreak; \n\t\t\tcase \"waiting\":\n\t\t\t\troute += \"?offer=donation\"; \n\t\t\t\tbreak; \n\t\t}\n \t$.get(route, function(data, status){ //make ajax call to the forum, gets all posts\n \t data.posts.forEach((post) => { //display results\n \t var $post = $(\"<div class='list-group-item' id='\"+ post.UserId + \"'>\" \n\t\t\t\t\t+ \"<p>Address: \" + post.street + \"</p>\" \n\t\t\t\t\t+ \"<p>State: \" + post.state + \"</p>\"\n\t\t\t\t\t+ \"<p>City: \" + post.city + \"</p>\" \n\t\t\t\t\t+ \"<p>Space: \" + post.space + \"</p>\" \n\t\t\t\t\t+ \"<p>Pets: \" + post.pets + \"</p>\" \n\t\t\t\t\t+ \"<p>Message: \" + post.message + \"</p>\" \n + \"<form method='get'>\"\n + \"<input type='hidden' name='PostId' value='\" + post.Id + \"'>\"\n + \"<button type='submit' formaction='/viewPost'>View Post</button>\"\n + \"<button type='submit' formaction='/editPost'>Edit</button>\"\n + \"<button type='submit' formaction='/deletePost'>Delete</button>\"\n + \"<button type='submit' formaction='/reportForm'>Report</button>\"\n + \"</form>\"\n\t\t\t\t\t+ \"</div>\"); \n \t $(\"#postsDiv\").append($post); \n \t })\n \t}); \n\t}\n}", "function renderEmpty() {\n var alertDiv = $(\"<div>\");\n alertDiv.addClass(\"alert alert-danger\");\n alertDiv.html(\"You must create a Mood before you can create a Comment.\");\n moodContainer.append(alertDiv);\n }", "async function showPosts() {\n const posts = await getPosts();\n\n posts.forEach((post) => {\n const postEl = document.createElement(\"div\");\n postEl.classList.add(\"post\");\n postEl.innerHTML = `\n <div class=\"post-number\">${post.id}</div>\n <div class=\"post-info\">\n <h2 class=\"post-title\">${post.title}</h2>\n <div class=\"post-body\">${post.body}</div>\n </div>\n `;\n postsContainer.appendChild(postEl);\n // The Node.appendChild() method adds a node to the end of the list of children of a specified parent node.\n // The fetch() method takes one mandatory argument, the path to the resource you want to fetch.\n // It returns a Promise that resolves to the Response to that request, whether it is successful or not\n });\n}", "function renderPost() {\n let result_post = document.querySelector(\"#post-result\");\n let template = document.querySelector(\"#post-template\");\n result_post.innerHTML = \"\";\n for (i in posts) {\n let el = template.cloneNode(true);\n el.querySelector(\".card-header > h6\").innerText = `${posts[i].date}`;\n el.querySelector(\".card-header > .pointer\").setAttribute(\n \"onclick\",\n `removePost(${i})`\n );\n el.querySelector(\n \".card-body > .card-text\"\n ).innerText = `${posts[i].message}`;\n el.style.display = \"block\";\n result_post.appendChild(el);\n }\n}", "function checkFirstUnread() {\n if (unreadPosts.length == 0)\n return false;\n \n if (!document.hasFocus())\n return false;\n \n var postId = unreadPosts[0];\n var post = $(\"#reply_\"+postId);\n if ($(window).scrollTop() + $(window).height() >= post.position().top + post.height())\n {\n unreadPosts.shift();\n return true;\n }\n else\n return false;\n}", "function checkFirstUnread() {\n if (unreadPosts.length == 0)\n return false;\n \n if (!document.hasFocus())\n return false;\n \n var postId = unreadPosts[0];\n var post = $(\"#reply_\"+postId);\n if ($(window).scrollTop() + $(window).height() >= post.position().top + post.height())\n {\n unreadPosts.shift();\n return true;\n }\n else\n return false;\n}", "function noMessages() {\n if (localStorage.getItem(\"message\") === null) {\n return (\n <tr>\n <td>There is no messages yet</td>\n </tr>\n );\n } \n // ...else\n return getStorage.map((contact, idx) => {\n\n const { name, email, message } = contact;\n return (\n <MessagesLayout\n key={idx}\n name={name}\n email={email}\n message={message}\n idx={idx}\n />\n );\n });\n }", "render() {\n return (\n <div>\n {this.state.unreadMessages.lenght > 0 &&\n <h2>You have {this.state.unreadMessages.lenght} unread messages!</h2>}\n </div>\n )\n }", "function noUniResults() {\n if (!$(\"#uni-results\").children().length > 0) {\n $(\"#uni-results\").append(\"No results found\");\n count = 0;\n }\n }", "function ResultsMessage() {\n noResultsDiv = document.createElement(\"div\");\n let noResultsMessage = document.createElement(\"span\");\n noResultsMessage.innerHTML = \"No results found\";\n noResultsDiv.appendChild(noResultsMessage);\n noResultsDiv.style.textAlign = \"center\";\n noResultsDiv.style.display = \"none\";\n pageDiv.appendChild(noResultsDiv);\n}", "function getPosts() {\n setTimeout(() => {\n let output = \"\";\n posts.forEach((post, index) => {\n output += `<li> ${post.title}</li>`;\n });\n document.body.innerHTML = output;\n }, 1000);\n}", "function empty_title() {\n $('#post_error').text(\"Musíte zadat titul!\");\n}", "checkComments() {\n if(this.state.data.comments) {\n if(this.state.data.comments.length !== 0) {\n return (\n <div>\n <h3>Comments: </h3>\n <CommentList data={this.state.data.comments} wall={this.props.match.params.wall_id}/>\n </div>\n );\n } else {\n return (\n <p className=\"message\">There are no comments to diplay at this time.</p>\n );\n }\n }\n }", "static messageNoData() {\n //\n noDataMessage.style.display = 'block';\n }", "function loadPosts() {\n\n\n}", "function displayEmpty(id) {\n var query = window.location.search;\n var partial = \"\";\n if (id) {\n partial = \" for Patient #\" + id;\n }\n pillboxContainer.empty();\n var messageh2 = $(\"<h2>\");\n messageh2.css({ \"text-align\": \"center\", \"margin-top\": \"50px\" });\n messageh2.html(\"No schedules yet\" + partial + \", navigate <a href='/cms\" + query +\n \"'>here</a> in order to get started.\");\n pillboxContainer.append(messageh2);\n }", "function getProfPosts() {\n var posts_length,\n myPostMold;\n $.ajax({\n url: site_host + \"posts/myposts\",\n type: \"post\",\n data: {\n ajax: true\n },\n dataType: \"json\",\n success: function (response) {\n posts_length = response.data.length;\n if (posts_length === 0) {\n // ther is no posts\n $('#main-posts > .loader').hide();\n alert(\"There is no Posts\");\n return;\n }\n for (count_posts; count_posts < posts_length; count_posts += 1) {\n $('#main-posts > .loader').before(createPostMold());\n myPostMold = $(\".publication_mold\");\n myPostMold.last().find(\".module_teacher h3\").html(response.data[count_posts].title);\n myPostMold.last()\n .find(\".module_teacher .time_pub\").html(response.data[count_posts].date_parsed);\n myPostMold.last()\n .find(\".module_teacher .module_name\").html(response.data[count_posts].type_parsed);\n myPostMold.last()\n .find(\".publication_body p\").html(response.data[count_posts].text_post);\n myPostMold.last().attr(\"data-target\", response.data[count_posts]._id_post);\n\n // change Save to Delete \n myPostMold.last().find(\".publication_body .react-bar li .save-post\")\n .removeClass('save-post').addClass('delet-post').attr('title', 'Supprimer');\n myPostMold.last().find(\".publication_body .react-bar li .delet-post\")\n .children(\"i.fa\").attr(\"class\", \"fa fa-trash fa-2x\");\n }\n $('#main-posts > .loader').hide();\n },\n complete: function () {\n autosize();\n }\n });\n }", "function getfeed(){\r\n //call to facebook graph api with ajax function\r\n $.ajax('https://graph.facebook.com/me/posts?access_token=' + token + \"&fields=caption,created_time,message,story,full_picture,attachments.limit(100),likes,comments,shares\",{\r\n //The success function\r\n success: function(response) {\r\n \r\n //the result div will be shown\r\n $(\"#result\").show();\r\n var d, i;\r\n\r\n /*Here, three vaiables have three divs which are represented with different design;\r\n * The datetime div is responsible for showing the time of the respective post.\r\n * posts1 and posts2 will be used alternatively to show a post.\r\n */\r\n var datetime = \"<div class='separator text-muted'><time id='time'></time></div>\";\r\n var posts1 = \"<article class='panel panel-primary' id='article' style='display:inline-block;max-width:500px;'><div class='panel-heading icon'><i class='glyphicon glyphicon-plus'></i></div><div class='panel-heading'><h2 class='panel-title' id='story'>Status Updated</h2></div><div class='panel-body' id='message'></div><div class='panel-body' id='pic_div'><img class='img-responsive img-rounded' src='#' id='picture' width=350 height=150></div><div class='panel-footer'><span class='glyphicon glyphicon-thumbs-up'></span><span id='likescount'></span><i class='fa fa-comment' aria-hidden='true'></i><span id='commentscount'></span><i class='fa fa-share' aria-hidden='true'></i><span id='sharescount'></span></div></article>\";\r\n var posts2= \"<article class='panel panel-success' style='display:inline-block;max-width:500px;'><div class='panel-heading icon'><i class='glyphicon glyphicon-plus'></i></div><div class='panel-heading'><h2 class='panel-title' id='story'></h2></div><div class='panel-body' id='message'></div><div class='panel-body' id='pic_div'><img class='img-responsive img-rounded' src='#' id='picture' width=350 height=150></div><div class='panel-footer'><span class='glyphicon glyphicon-thumbs-up'></span><span id='likescount'></span><i class='fa fa-comment' aria-hidden='true'></i><span id='commentscount'></span><i class='fa fa-share' aria-hidden='true'></i><span id='sharescount'></span></div></article>\";\r\n\r\n //for loop ti use datetime, posts1, posts2 for all the posts coming through the graph api\r\n //In this, the div with id=\"tm\" is appended with one of the divs i.e. datetime, posts1 or posts2\r\n for (i = 0; i < response.data.length; i++){\r\n $(\"#tm\").append(datetime);\r\n\r\n //To use posts1 and posts2 alternatively\r\n if (i % 2 == 0) \r\n $(\"#tm\").append(posts1);\r\n else\r\n $(\"#tm\").append(posts2);\r\n\r\n\r\n $(\"#time\").attr('id', 'time' + i); //Change the attribute 'id' by appending iteration number\r\n //'created_time' format is changed by calling the function fbDateFix()\r\n d = fbDateFix(response.data[i].created_time);\r\n\r\n //'d' value which is returned by the function is assigened to div of id 'time(i)'\r\n $(\"#time\" + i).text(d);\r\n\r\n //The availablity of each field in the 'response' is checked with 'hasOwnProperty()'\r\n //If the response has the field then an only then the response is assigned to the respective field\r\n $(\"#story\").attr('id', 'story' + i);\r\n\r\n if (response.data[i].hasOwnProperty('story'))\r\n $(\"#story\" + i).html(\"<strong>\" + response.data[i].story + \"</strong>\");\r\n\r\n /*\r\n *Some responses may contain only 'message field', 'caption field' or both or unavailability of both\r\n * so the assignment of the same is decided here\r\n */\r\n $(\"#message\").attr('id', 'message' + i);\r\n if (response.data[i].hasOwnProperty('message')) {\r\n $(\"#message\" + i).text(response.data[i].message);\r\n\r\n if (response.data[i].hasOwnProperty('caption'))\r\n $(\"#message\" + i).append(\"<br/>\" + response.data[i].caption);\r\n \r\n } \r\n else if (response.data[i].hasOwnProperty('caption'))\r\n $(\"#message\" + i).append(\"<br/>\" + response.data[i].caption);\r\n\r\n\r\n $(\"#picture\").attr('id', 'picture' + i);\r\n $(\"#pic_div\").attr('id', 'pic_div' + i);\r\n\r\n if (response.data[i].hasOwnProperty('full_picture'))\r\n $(\"#picture\" + i).attr('src', response.data[i].full_picture);\r\n \r\n else if (response.data[i].hasOwnProperty('attachments.data' + [i] + '.media.image.src'))\r\n $(\"#picture\" + i).attr('src', response.data[0].attachments.data[0].media.image.src);\r\n else\r\n $(\"#pic_div\" + i).hide();\r\n\r\n /* \"Likes, comments and shares\" count is displayed by the following*/\r\n $(\"#likescount\").attr('id', 'likescount' + i);\r\n if (response.data[i].hasOwnProperty('likes'))\r\n $(\"#likescount\" + i).html(\"&nbsp;\" + response.data[i].likes.data.length + \"&nbsp;\");\r\n else\r\n $(\"#likescount\" + i).html(\"&nbsp;\" + 0 + \"&nbsp;\");\r\n\r\n $(\"#commentscount\").attr('id', 'commentscount' + i);\r\n if (response.data[i].hasOwnProperty('comments'))\r\n $(\"#commentscount\" + i).html(\"&nbsp;\" + response.data[i].comments.data.length + \"&nbsp;\");\r\n else\r\n $(\"#commentscount\" + i).html(\"&nbsp;\" + 0 + \"&nbsp;\");\r\n\r\n $(\"#sharescount\").attr('id', 'sharescount' + i);\r\n if (response.data[i].hasOwnProperty('shares'))\r\n $(\"#sharescount\" + i).html(\"&nbsp;\" + response.data[i].shares.count + \"&nbsp;\");\r\n else\r\n $(\"#sharescount\" + i).html(\"&nbsp;\" + 0 + \"&nbsp;\");\r\n\r\n }\r\n /*At the last of all the posts \"That is all\" is displayed by using following code*/\r\n if (i == response.data.length)\r\n $(\"#tm\").append(\"<article class='panel panel-info panel-outline'><div class='panel-heading icon' style='background-color:##4CAF50'><i class='glyphicon glyphicon-info-sign'></i></div><div class='panel-body'>That is all.</div></article>\");\r\n },\r\n /*Before sending the query loader will be displayed and \r\n * after completing the process of getting response \r\n * the loader will be hidden\r\n */\r\n beforeSend : function(){\r\n $('.loader').show();\r\n\r\n }, \r\n complete : function(){\r\n $('.loader').hide();\r\n }\r\n });//End of ajax()\r\n }", "function getStdPosts() {\n var posts_length,\n myPostMold;\n $.ajax({\n url: site_host + \"posts/all\",\n type: \"post\",\n data: {\n _id_student: user_id,\n ajax: true\n },\n dataType: \"json\",\n success: function (response) {\n posts_length = response.data.length;\n if (posts_length === 0) {\n // ther is no posts\n $('#main-posts > .loader').hide();\n alert(\"There is no Posts\");\n return;\n }\n for (count_posts; count_posts < posts_length; count_posts += 1) {\n $('#main-posts > .loader').before(createPostMold());\n myPostMold = $(\".publication_mold\");\n myPostMold.last().find(\".module_teacher h3\").html(response.data[count_posts].fullName);\n myPostMold.last()\n .find(\".module_teacher .time_pub\").html(response.data[count_posts].date_parsed);\n myPostMold.last()\n .find(\".module_teacher .module_name\").html(response.data[count_posts].title);\n myPostMold.last()\n .find(\".publication_body p\").html(response.data[count_posts].text_post);\n myPostMold.last().attr(\"data-target\", response.data[count_posts]._id_post);\n if (response.data[count_posts].saved == 1) {\n myPostMold.last().find(\".react-bar .save-post\").attr(\"title\", \"Sauvegardé\")\n\n myPostMold.last().find(\".react-bar .save-post\")\n .children(\"i\").removeClass(\"fa-bookmark\");\n\n myPostMold.last().find(\".react-bar .save-post\")\n .children(\"i\").addClass(\"fa-check\");\n myPostMold.last().find(\".react-bar .save-post\")\n .removeClass(\"save-post\");\n }\n }\n $('#main-posts > .loader').hide();\n },\n complete: function () {\n autosize();\n }\n });\n }", "function displayEmpty(id) {\n const query = window.location.search;\n let partial = \"\";\n if (id) {\n partial = \" for Organization #\" + id;\n }\n eventFeed.empty();\n const messageH2 = $(\"<h2>\");\n messageH2.css({ \"text-align\": \"center\", \"margin-top\": \"50px\" });\n messageH2.html(\n \"No events yet\" +\n partial +\n \", navigate <a href='/orgLogin\" +\n query +\n \"'>here</a> in order to get started.\"\n );\n eventFeed.append(messageH2);\n }", "async function showPosts() {\n\tconst posts = await getPosts();\n\n\t// Get post one by one\n\tposts.forEach((post) => {\n\t\t// ! Create post container from api\n\t\tconst postEl = document.createElement('div');\n\t\tpostEl.classList.add('post');\n\t\tpostEl.innerHTML = `\n <div class=\"number\">${post.id}</div>\n <div class=\"post-info\">\n <h2 class=\"post-title\">${post.title}</h2>\n <p class=\"post-body\">${post.body}</p>\n </div>`;\n\n\t\t// ! Add the post data in to the post container\n\t\tpostContainer.appendChild(postEl);\n\t});\n}" ]
[ "0.74588084", "0.69013363", "0.6767553", "0.65592355", "0.65546995", "0.65341586", "0.6472723", "0.6362076", "0.63145685", "0.6266904", "0.6246553", "0.622791", "0.621313", "0.61999077", "0.61548173", "0.6151635", "0.61148363", "0.61038643", "0.60918754", "0.6072007", "0.60711426", "0.60626125", "0.6041094", "0.602906", "0.6016358", "0.6008006", "0.5988076", "0.59832495", "0.5940755", "0.59240425", "0.5922241", "0.5908414", "0.5899089", "0.5874076", "0.5874076", "0.5872295", "0.5866886", "0.58304065", "0.5829736", "0.58247054", "0.5823516", "0.58180064", "0.5812795", "0.5812742", "0.5809951", "0.58000445", "0.5797284", "0.5793721", "0.57903075", "0.5782607", "0.5745189", "0.57446384", "0.57309073", "0.5730629", "0.5728022", "0.5726162", "0.5716363", "0.5714633", "0.5714633", "0.570627", "0.5692048", "0.5680417", "0.5671045", "0.5667743", "0.56675225", "0.56612945", "0.5658302", "0.5656164", "0.56502354", "0.5649852", "0.5644981", "0.5629242", "0.5628394", "0.5628319", "0.5627513", "0.56142545", "0.5612359", "0.56059057", "0.5600098", "0.559602", "0.55947876", "0.559411", "0.55926186", "0.5592605", "0.5592605", "0.5589782", "0.5581504", "0.5560367", "0.5558767", "0.5556024", "0.55500317", "0.5548269", "0.5544726", "0.55436015", "0.5538748", "0.55385303", "0.55330276", "0.5530443", "0.5527164", "0.55210197" ]
0.64505893
7
prevent a player from clicking on 2 parts to addclasslist add selected class, on click set a condition, not to execute img src change, if the box already ahs the class target .box to display x when clicked
function addXsAndOs(){ for (var i =0; i<oneBox.length; i++) { oneBox[i].square = i; oneBox[i].addEventListener('click',function(){ if (!this.move){ this.querySelector('img').src = letter; this.move = letter; //currentPlayer.indexString = true if(turn){ playerX[this.square] = true; }else{ playerO[this.square] = true; } turnChanger(); changeTurn(); winningCombination(); } }); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clickedBox(element) {\r\n console.log(element);\r\n if(players.classList.contains(\"player\")) {\r\n element.innerHTML = `<i class=\"${playerOIcon}\"></i>`;\r\n players.classList.add(\"active\");\r\n } else {\r\n element.innerHTML = `<i class=\"${playerXIcon}\"></i>`;\r\n players.classList.add(\"active\");\r\n }\r\n element.style.pointerEvents = \"none\";\r\n bot();\r\n}", "function boxClickHandler (){\n if(!this.innerHTML){\n this.innerHTML = currentPlayer.image;\n // switchTurns();\n\n }\n if(checkWinnerTtt ()) {\n lockBoard()\n }\n if(checkWinnerTtt2()) {\n lockBoard2()\n }\n\n switchTurns()\n\n }", "function boxClicked() {\r\n let clickedBox = this.className;\r\n let mark = this;\r\n let player = \"User\";\r\n mark.style.background = \"url(img/x-brush.png) no-repeat\";\r\n mark.style.backgroundSize = \"contain\";\r\n mark.style.backgroundPosition = \"center\";\r\n mark.style.pointerEvents = \"none\";\r\n checkClass(clickedBox, player);\r\n computerRandomizer(boxRow, mark);\r\n console.log(updateList.length);\r\n\r\n state();\r\n}", "function boxClickedForHuman(e){\n const id = e.target.id; \n if(!spaces[id] && flag == true ){\n spaces[id] = currentPlayer;\n e.target.innerText = currentPlayer;\n if(currentPlayer == \"X\"){\n var element = document.querySelectorAll(\".box\");\n element[id].classList.add(\"color-red\")\n }else{\n var element = document.querySelectorAll(\".box\");\n element[id].classList.add(\"color-blueviolet\")\n }\n currentPlayer = currentPlayer == O_TEXT? X_TEXT:O_TEXT;\n setText('turn' , currentPlayer+\"'s turn\");\n count++;\n winX();\n winO();\n }\n}", "function onClick() { //This function is called on row 194\n if (!(event.target.classList.contains('clicked'))) {\n if (player1.classList.contains('active')) {\n event.target.classList.add('box-filled-1');\n event.target.classList.add('clicked');\n player1Moves.push(event.target.id);\n checkForActive(player1, player2);\n checkForWin(player1Moves);\n } else if (blockXMoves()) {\n event.target.classList.add('box-filled-2');\n event.target.classList.add('clicked');\n player2Moves.push(event.target.id);\n player2Selections.push(event.target);\n checkForActive(player2, player1);\n checkForWin(player2Moves);\n }\n }\n}", "clickCommande(e){\r\n\r\n let index = this.indexImageActive()\r\n\r\n this.images[index].classList.remove('active')\r\n this.cercles[index].classList.remove('active-cercle')\r\n\r\n if(e.classList.contains('left')){\r\n\r\n if(index === 0){\r\n\r\n this.images[this.nbImg - 1].classList.add('active')\r\n this.cercles[this.nbImg - 1].classList.add('active-cercle')\r\n\r\n }else{\r\n\r\n this.images[index - 1].classList.add('active')\r\n this.cercles[index - 1].classList.add('active-cercle')\r\n\r\n }\r\n\r\n }else{\r\n \r\n if(index === this.nbImg - 1){\r\n\r\n this.images[0].classList.add('active')\r\n this.cercles[0].classList.add('active-cercle')\r\n\r\n\r\n }else{\r\n\r\n this.images[index + 1].classList.add('active')\r\n this.cercles[index + 1].classList.add('active-cercle')\r\n\r\n }\r\n }\r\n\r\n }", "function check(){\r\n if(dot1.classList.contains(\"selected\")){\r\n\r\n count = 1;\r\n img1.style.zIndex = \"4\";\r\n img2.style.zIndex = \"2\";\r\n img3.style.zIndex = \"2\";\r\n img1.style.left = \"0%\";\r\n img2.style.left = \"-100%\";\r\n img3.style.left = \"100%\";\r\n\r\n }else if(dot2.classList.contains(\"selected\")){\r\n\r\n img2.style.zIndex = \"4\";\r\n img1.style.zIndex = \"2\";\r\n img3.style.zIndex = \"2\";\r\n img2.style.left = \"0%\";\r\n img1.style.left = \"100%\";\r\n img3.style.left = \"-100%\";\r\n count = 2;\r\n\r\n }else if(dot3.classList.contains(\"selected\")){\r\n img3.style.zIndex = \"4\";\r\n img2.style.zIndex = \"2\";\r\n img1.style.zIndex = \"2\";\r\n img3.style.left = \"0%\";\r\n img3.style.zIndex = \"4\";\r\n img1.style.left = \"-100%\";\r\n img2.style.left = \"100%\";\r\n count = 0;\r\n }\r\n}", "function start1Player(){\r\n $box.each(function(){\r\n $(this).mouseenter(function(){ // Add the background image on hover\r\n if ( $playerOne.hasClass(\"active\")) {\r\n $(this).css('background-image', 'url(\"img/o.svg\")');\r\n } else {\r\n $(this).css('background-image', 'url(\"img/x.svg\")');\r\n }\r\n });\r\n $(this).mouseleave(function(){ // On mouseleave, remove the background image\r\n $box.css('background-image', '');\r\n });\r\n });\r\n $box.click(function(){ // On click, check to see if user already placed piece down. If not, then add class box-filled, add background image, unbind the mouseleave function, fire nextTurn function to switch active class to next player. Check for win condition.\r\n if ($playerOne.hasClass(\"active\")) {\r\n $(this).addClass('box-filled-1');\r\n $(this).addClass('selected');\r\n $(this).css('background-image', 'url(\"img/o.svg\")');\r\n $(this).off();\r\n checkIfWon();\r\n switchPlayerTurn();\r\n setTimeout(CPUplay,1000);//delaying the cpu play, acts like its thinking\r\n }\r\n });\r\n}", "function mouseClick(e) {\n // need to figure out which li was clicked in the ul list\n var index = nodeIndex(this);\n\n if(player1.className == 'players active' && e.target.className != 'box box-filled-1' && e.target.className != 'box box-filled-2') {\n e.target.className = 'box box-filled-1';\n player1.className = 'players';\n player2.className = 'players active';\n currPlayer = 1;\n plays += 1;\n } \n else if(player2.className == 'players active' && e.target.className != 'box box-filled-1' && e.target.className != 'box box-filled-2'){\n e.target.className = 'box box-filled-2';\n player1.className = 'players active';\n player2.className = 'players';\n currPlayer = 0;\n plays += 1;\n }\n\n // pass the className, player, and the li index to boardCheck\n boardCheck(currPlayer, index); \n playXO();\n\n // check if aiGame\n if(aiGame == true) {\n randomPlay();\n }\n}", "function classChange(){\n document.addEventListener('mouseover', (boxClass)=>{\n if(!boxClass.target.classList.contains('boxClass')){\n console.log(\"Not a Box\")\n return;\n }else{\n console.log(\"A box\")\n boxClass.target.classList.add('hover');\n }\n }, false);\n}", "function clicked() { \n if ($(this).find(\".inner-wrap\").hasClass(\"flipped\")) {\n return;\n }\n $(this).find(\".inner-wrap\").toggleClass(\"flipped\");\n checkArray.push($(this).find(\"img\").attr(\"src\"));\n idArray.push($(this).attr(\"id\"));\n check();\n }", "function imageSelector() {\n\tclearclasses();\n\tif (counter == 0) {\n\t\t//console.log('de counter staat op 0');\n\t\tframe.classList.add('pos0');\n\t}\n\telse if (counter == 1) {\n\t\t//console.log('de counter staat op 1');\n\t\tframe.classList.add('pos1');\n\t}\n\telse if (counter == 2) {\n\t\t//console.log('de counter staat op 2');\n\t\tframe.classList.add('pos2');\n\t}\n\telse if (counter == 3) {\n\t\t//console.log('de counter staat op 3');\n\t\tframe.classList.add('pos3');\n\t}\n\telse {\n\t\tconsole.log('Er is hier geen afbeelding voor.')\n\t}\n}", "function G_initLightBox() {\n\n // Buttons\n var black = document.getElementById(\"Background-black-JS\");\n var spawnPointID = document.getElementById(\"Ligh-Box-Spawn-Point\");\n var imgLightBoxButtonArray = document.getElementsByClassName('img-lightBox');\n for (var i = 0; i < imgLightBoxButtonArray.length; i++) {\n imgLightBoxButtonArray[i].onclick = function() {\n // Add class\n SwapLightBox(this);\n }\n }\n // Swap\n function SwapLightBox(buttonSrc) {\n if (buttonSrc) {\n spawnPointID.firstChild.src = buttonSrc.src;\n }\n spawnPointID.classList.toggle(\"Ligh-Box-Spawn-Point-In\");\n black.classList.toggle(\"Blackback-gruond-in-JS\");\n black.onclick = function() {\n SwapLightBox();\n }\n spawnPointID.firstChild.classList.toggle(\"img-Zoom-ligth-box-big\");\n }\n\n} // End G_initLightBox()", "clickCercle(elm){\r\n\r\n let index = this.indexImageActive()\r\n let indexClick = this.indexCercle(elm)\r\n\r\n this.images[index].classList.remove('active')\r\n this.cercles[index].classList.remove('active-cercle')\r\n\r\n this.images[indexClick].classList.add('active')\r\n this.cercles[indexClick].classList.add('active-cercle')\r\n\r\n\r\n }", "click () {\n this.appContainer.querySelectorAll('#bricks')[0].addEventListener('click', function (event) {\n event.preventDefault()\n let img = event.target.nodeName === 'IMG' ? event.target : event.target.firstElementChild\n let index = img.getAttribute('brickNum')\n img.src = 'image/' + this.tiles[index] + '.png'\n setTimeout(function () {\n img.src = '../image/0.png'\n }, 600)\n if (this.click1 === false) {\n this.turn1 = this.tiles[index]\n this.click1 = true\n img.src = 'image/' + this.turn1 + '.png'\n this.img1 = img\n } else {\n this.turn2 = this.tiles[index]\n img.src = 'image/' + this.turn2 + '.png'\n this.img2 = img\n this.click1 = false\n }\n if (this.turn1 === this.turn2 && this.img1.getAttribute('brickNum') !== this.img2.getAttribute('brickNum')) {\n console.log('pair ')\n setTimeout(function () {\n this.img1.classList.add('removed')\n this.img2.classList.add('removed')\n this.pairs += 1\n if (this.pairs === this.tiles.length / 2) {\n console.log('win')\n }\n }.bind(this), 600)\n }\n }.bind(this))\n }", "function resetClassList() {\n if (clicked[0] === false) {\n DOMString.schoollist1.className = 'score-list-box';\n }\n if (clicked[1] === false) {\n DOMString.schoollist2.className = 'score-list-box';\n }\n if (clicked[2] === false) {\n DOMString.schoollist3.className = 'score-list-box';\n }\n if (clicked[3] === false) {\n DOMString.schoollist4.className = 'score-list-box';\n }\n if (clicked[4] === false) {\n DOMString.schoollist5.className = 'score-list-box';\n }\n if (clicked[5] === false) {\n DOMString.schoollist6.className = 'score-list-box';\n }\n if (clicked[6] === false) {\n DOMString.specificlist3x.className = 'score-list-box';\n }\n if (clicked[7] === false) {\n DOMString.specificlist4x.className = 'score-list-box';\n }\n if (clicked[8] === false) {\n DOMString.specificlistFull.className = 'score-list-box';\n }\n if (clicked[9] === false) {\n DOMString.specificlistLS.className = 'score-list-box';\n }\n if (clicked[10] === false) {\n DOMString.specificlistBS.className = 'score-list-box';\n }\n if (clicked[11] === false) {\n DOMString.specificlistRescue.className = 'score-list-box';\n }\n if (clicked[12] === false) {\n DOMString.specificlist5x.className = 'score-list-box';\n }\n}", "function inacPlayer(currentShape){\nif(currentShape=='circle'){document.getElementById('player-2').classList.remove('player-inactive');\ndocument.getElementById('player-1').classList.add('player-inactive')}\nelse {\n document.getElementById('player-1').classList.remove('player-inactive');\n document.getElementById('player-2').classList.add('player-inactive');\n}\n}", "function addPics () {\r\n\te.classList.remove(\"hidebox\")\r\n\tf.classList.remove(\"hidebox\")\r\n\ta.classList.remove(\"pulse1\")\r\n\ta.classList.remove(\"cursor\")\r\n\ta.classList.remove(\"grey\")\r\n\ta.classList.remove(\"shadow\")\r\n}", "function activateUserTurn() {\n document.querySelectorAll('.imageBorder').forEach(circle => {\n circle.onclick = userTurn\n circle.classList.add(\"active\")\n })\n}", "function addActiveDefault(){\nlgImg[0].classList.add('active');\n}", "function boxClickedForComp(e){\n \n currentPlayer = O_TEXT?O_TEXT:X_TEXT;\n const id = e.target.id;\n if(!spaces[id] && flag == true && currentPlayer == O_TEXT && check == 1){\n setText('turn' , \"Computer's turn\");\n spaces[id] = currentPlayer;\n e.target.innerText = currentPlayer;\n var element = document.querySelectorAll(\".box\");\n element[id].classList.add(\"color-blueviolet\")\n count++;\n winX();\n winO();\n check = 0;\n } \n if(check == 0){\n setTimeout(function(){\n setText('turn' , \"Your's turn\");\n while(moves!=1 && flag == true){\n let position = Math.round((Math.random()*8));\n if(boxes[position].textContent === \"\"){\n boxes[position].textContent = X_TEXT;\n var element = document.querySelectorAll(\".box\");\n element[position].classList.add(\"color-red\")\n count++;\n spaces[position] = X_TEXT;\n moves = 1;\n check = 1;\n winX();\n winO();\n }\n }\n }, 1000);\n moves = 0;\n }\n}", "function showonlyone(thechosenone) {\n $('.box').each(function (index) {\n if ($(this).attr(\"id\") == thechosenone) {\n $(this).show(200);\n if ($(this).attr(\"id\") == \"box1\") {\n\n $('.logostrelicaimg').addClass('circle1');\n $('.logostrelicaimg').removeClass('circle2');\n $('.logostrelicaimg').removeClass('circle3');\n $('.logostrelicaimg').removeClass('circle4');\n $('.logostrelicaimg').removeClass('circle5');\n\n\n }\n if ($(this).attr(\"id\") == \"box2\") {\n\n $('.logostrelicaimg').addClass('circle2');\n $('.logostrelicaimg').removeClass('circle3');\n $('.logostrelicaimg').removeClass('circle4');\n $('.logostrelicaimg').removeClass('circle5');\n $('.logostrelicaimg').removeClass('circle1');\n\n }\n if ($(this).attr(\"id\") == \"box3\") {\n\n $('.logostrelicaimg').addClass('circle3');\n $('.logostrelicaimg').removeClass('circle2');\n $('.logostrelicaimg').removeClass('circle4');\n $('.logostrelicaimg').removeClass('circle1');\n $('.logostrelicaimg').removeClass('circle5');\n\n }\n if ($(this).attr(\"id\") == \"box4\") {\n\n $('.logostrelicaimg').addClass('circle4');\n $('.logostrelicaimg').removeClass('circle3');\n $('.logostrelicaimg').removeClass('circle2');\n $('.logostrelicaimg').removeClass('circle1');\n $('.logostrelicaimg').removeClass('circle5');\n\n }\n if ($(this).attr(\"id\") == \"box5\") {\n\n $('.logostrelicaimg').addClass('circle5');\n $('.logostrelicaimg').removeClass('circle3');\n $('.logostrelicaimg').removeClass('circle2');\n $('.logostrelicaimg').removeClass('circle1');\n $('.logostrelicaimg').removeClass('circle4');\n\n }\n\n }\n else {\n $(this).hide(200);\n\n }\n });\n\n}", "function pickedImg() { //the clicked img will be run every other time\n for ( var k = 0; k < imgShort.length; k +=2 ) {\n };\n function clicky(event) {\n var clicked1 = event.target.id;\n document.getElementById('img_box').addEventListener('click', clicky);\n }\n}", "function clickEffect() {\n takePic.forEach(pic => {\n var effect = dropMenu.value;\n if (effect === 'sepia') {\n pic.classList = 'thumbs-item';\n pic.classList.add('sepia');\n }\n if (effect === 'grayscale') {\n pic.classList = 'thumbs-item';\n pic.classList.add('grayscale');\n }\n if (effect === 'invert') {\n pic.classList = 'thumbs-item';\n pic.classList.add('invert');\n }\n if (effect === '') {\n pic.classList = 'thumbs-item';\n }\n });\n\n}", "function executeClassCheck(event) {\n\n var btnClass = event.currentTarget.classList.item(1);\n\n var wrapperChildren = document.getElementById(\"wrapper\").children;\n\n\n for (i = 0; i < wrapperChildren.length; i++) {\n\n var iets = wrapperChildren[i].classList.item(1)\n\n if (wrapperChildren[i].classList.item(1) !== btnClass) {\n wrapperChildren[i].classList.toggle(\"show\")\n //wrapperChildren[i].style.display = \"none\";\n } else {\n wrapperChildren[i].classList.remove(\"show\")\n //wrapperChildren[i].style.display = \"\";\n }\n\n // bij deze functie word gekeken of de class matcht van de button met de verhalen\n // als dit klopt dan worden alleen de verhalen laten zien die matchen met de button\n \n\n }\n \n}", "function squareClicked() {\r\n //ciclo che assegna lo stile red a 15 div random, corrispondenti ai 15 numeri dell'array\r\n for (var i = 0; i < assigned.length; i++) {\r\n var indiceSquare = assigned[i]-1;\r\n $('.square').eq(indiceSquare).addClass('red');\r\n }\r\n // se il quadrato ha la classe rossa, allora\r\n if($(this).hasClass('red')){\r\n $(this).addClass('active');\r\n $('.red').addClass('bomba active');\r\n square.not('.red').addClass('green fiore');\r\n\r\n $('.losepage').fadeIn(5000);\r\n $('button.restart').slideDown(6000);\r\n //se non ha la classe rossa\r\n }else {\r\n $(this).addClass('green fiore');\r\n }\r\n\r\n}", "function thechecker()\n {\n removeactive();\n slidnum.textContent ='slid# ' + (currentslid) + ' of ' + (slidcount);\n slidimg[currentslid -1 ].classList.add('active');\n newul.children[currentslid-1].classList.add('active');\n \n if(currentslid==1)\n {\n prevButton.classList.add('disabled')\n }\n \n else \n {\n prevButton.classList.remove('disabled')\n }\n \n if(currentslid==slidcount)\n {\n nextButton.classList.add('disabled')\n }\n else \n {\n nextButton.classList.remove('disabled')\n }\n \n }", "function toggleSingleItem(e) {\n // const optionValue = e.srcElement.innerHTML.toLowerCase();\n const optionValue = e.target.id;\n const category = e.target.classList[1];\n // console.log(e.target);\n const imgItem = document.getElementById(`${category}-${optionValue}`);\n const imgRock = document.getElementById(\"rock\");\n // console.log(imgItem);\n\n if (!imgItem.classList.contains(\"display\")) {\n removeCategoryImg(category);\n imgItem.classList.add(\"display\");\n imgRock.classList.remove(\"default\");\n render();\n e.target.querySelector(\"circle\").style.stroke = `${darkPurpleColor}`;\n e.target.querySelector(\"circle\").style.strokeWidth = `3`;\n } else {\n removeCategoryImg(category);\n imgItem.classList.remove(\"display\");\n imgRock.classList.add(\"default\");\n render();\n e.target.querySelector(\"circle\").style.stroke = ``;\n e.target.querySelector(\"circle\").style.strokeWidth = ``;\n }\n // console.log(imgItem);\n}", "function setOldImage()\n \n {\n document.getElementById(\"img1\").classList.remove(\"visitimg\"); \n document.getElementById(\"img1\").src =\"img/visitkort.png\";\n document.getElementById(\"img1\").classList.add(\"qrimg\"); \n }", "function gameOver(){\n //playBoard.classList.add(\"hide\"); //menyembunyikan select box\n resultBox.classList.add(\"show\");\n}", "function add_selected_class() {\n if(clicked.piece != '' & clicked.piece != null){\n selection = clicked;\n console.log('updated selection to clicked spot');\n }\n\n // remove the \"selected\" class from the last selection\n if (last_selector != '') {\n last_selector.removeClass(\"selected\");\n }\n\n\n\n //if selection is defined add the \"selected\" class to the div that was clicked\n if (clicked.piece != '') {\n\n \n last_selector = selector;\n\n selector = $(\"[column=\" + selection.col + \"][row=\" + selection.row + \"]\");\n\n selector.addClass(\"selected\");\n\n // how to update the piece on the newly clicked square\n // selector.attr(\"piece\", \"b_queen\");\n\n // remove the \"selected\" class from the last selection\n if (last_selector != '') {\n last_selector.removeClass(\"selected\");\n remove_moves = true;\n }\n\n piece= true;\n \n\n }\n\n // update last selector to remove \"selected\" class\n\n}", "playerEffect() {\n if (this.human === \"rock\") {\n rockPlayerClass.classList.add(\"game-img-clicked\");\n paperPlayerClass.classList.remove(\"game-img-clicked\");\n scissorPlayerClass.classList.remove(\"game-img-clicked\");\n } else if (this.human === \"paper\") {\n paperPlayerClass.classList.add(\"game-img-clicked\");\n scissorPlayerClass.classList.remove(\"game-img-clicked\");\n rockPlayerClass.classList.remove(\"game-img-clicked\");\n } else if (this.human === \"scissor\") {\n scissorPlayerClass.classList.add(\"game-img-clicked\");\n rockPlayerClass.classList.remove(\"game-img-clicked\");\n paperPlayerClass.classList.remove(\"game-img-clicked\");\n }\n }", "comEffect() {\n if (this.computer === \"rock\") {\n rockCompClass.classList.add(\"game-img-clicked\");\n paperCompClass.classList.remove(\"game-img-clicked\");\n scissorCompClass.classList.remove(\"game-img-clicked\");\n } else if (this.computer === \"paper\") {\n paperCompClass.classList.add(\"game-img-clicked\");\n scissorCompClass.classList.remove(\"game-img-clicked\");\n rockCompClass.classList.remove(\"game-img-clicked\");\n } else if (this.computer === \"scissor\") {\n scissorCompClass.classList.add(\"game-img-clicked\");\n rockCompClass.classList.remove(\"game-img-clicked\");\n paperCompClass.classList.remove(\"game-img-clicked\");\n }\n }", "function playerTurn(side){\n $('.field').click(function(){\n //first check if spot have been already taken for 'X' or 'O'\n if($(this).hasClass('classX') || $(this).hasClass('classO')){\n window.alert('Place taken');\n } else {\n //Add class 'X' or 'O' to an empty spot\n $(this).addClass('class'+side);\n //Check any victory combination\n if($('#spot1').hasClass('class'+side) && $('#spot2').hasClass('class'+side) && $('#spot3').hasClass('class'+side) ||\n $('#spot4').hasClass('class'+side) && $('#spot5').hasClass('class'+side) && $('#spot6').hasClass('class'+side) ||\n $('#spot7').hasClass('class'+side) && $('#spot8').hasClass('class'+side) && $('#spot9').hasClass('class'+side) ||\n $('#spot1').hasClass('class'+side) && $('#spot4').hasClass('class'+side) && $('#spot7').hasClass('class'+side) ||\n $('#spot2').hasClass('class'+side) && $('#spot5').hasClass('class'+side) && $('#spot8').hasClass('class'+side) ||\n $('#spot3').hasClass('class'+side) && $('#spot6').hasClass('class'+side) && $('#spot9').hasClass('class'+side) ||\n $('#spot1').hasClass('class'+side) && $('#spot5').hasClass('class'+side) && $('#spot9').hasClass('class'+side) ||\n $('#spot3').hasClass('class'+side) && $('#spot5').hasClass('class'+side) && $('#spot7').hasClass('class'+side)\n ){\n // In the case of a Victory combination, display message and reset the game\n $('#winMessage').show();\n playerPoints++;\n setTimeout(resetGame,1500);\n //If there is no more turns, game tied\n } else if (turns == 8) {\n $('#drawMessage').show();\n draws++;\n setTimeout(resetGame,1500);\n } else {\n turns++;\n if(side === 'X'){\n computerPlay('O')\n } else {\n computerPlay('X');\n }\n }\n }\n\n });\n\n}", "function tileClick() {\n\n //le quitamos el eventlistener para no poder hacerle click\n this.removeEventListener(\"click\", tileClick);\n\n //cambiamos clase para mostar la tile\n this.classList.replace(\"undigged\", \"digged\")\n\n //comprobamos si la tile tiene algun item que mostrar\n stageMaster[currentPlayerLevel].forEach((item) => {\n\n item.piece.forEach(piece => {\n if (piece.pos.x == this.dataset.row && piece.pos.y == this.dataset.column) {\n\n //creamos el elemento de la imagen \n var newImg = document.createElement('img');\n\n //añadimos clase al elemento img\n newImg.classList.add(\"itemImg\");\n\n //añadimos clase si la imagen tiene que estar girada\n newImg.classList.add(\"rot-\" + piece.rot);\n\n //añadimos los parametros de ruta la imagen\n newImg.src = piece.img;\n\n //finalmente añadimos el div a la tile\n this.appendChild(newImg);\n }\n });\n })\n}", "function startP1() {\t\n$(\".three\").off(\"click\").on(\"click\", function() {\n\t$(\".board\").addClass(\"hide\");\t\n\t$(\".board3\").addClass(\"hide\");\t\n\t$(\".four\").addClass(\"hide\");\t\t\t\n\t$(\".board2\").removeClass(\"hide\");\n\t$(\".three\").removeClass(\"hide\");\t\n\thighlightBoard2();\n});\n}", "function draw_other_box(element, classes, $i) {\n\n var element_p = $(element);\n\n var elementClasses = element_p.attr(\"class\");\n\n if (element_p === null) {\n return false;\n }\n\n if (element_p[0].nodeName == \"HTML\" || element_p[0].nodeName == \"BODY\") {\n return false;\n }\n\n if (element_p.length === 0) {\n return false;\n }\n\n // Be sure this is visible on screen\n if (element_p.css(\"display\") == 'none' || element_p.css(\"visibility\") == 'hidden' || element_p.css(\"opacity\") == '0') {\n return false;\n }\n\n // Not show if p tag and is empty.\n if (element_p.html() == '&nbsp;' && element_p.prop(\"tagName\") == 'P') {\n return false;\n }\n\n // Stop.\n if (body.hasClass(\"yp-has-transform\")) {\n return false;\n }\n\n // not draw new box and delete last.\n if (isDefined(elementClasses)) {\n\n elementClasses = elementClasses.replace(/yp-selected-others/g, '');\n\n if (elementClasses.match(/yp-selected/g) || elementClasses.match(/yp-tooltip-small/g) || elementClasses.match(/yp-edit-menu/g) || element_p.hasClass(\"yp-selected-others-box\")) {\n if (iframe.find(\".\" + classes + \"-\" + $i + \"-box\").length > 0) {\n iframe.find(\".\" + classes + \"-\" + $i + \"-box\").remove();\n }\n\n return false;\n\n }\n\n }\n\n // Stop.\n if (check_with_parents(element_p, \"transform\", \"none\", \"!=\") === true) {\n element_p.addClass(\"yp-selected-has-transform\");\n return false;\n }\n\n // Stop.\n if (check_with_parents(element_p, \"display\", \"none\", \"==\") === true || check_with_parents(element_p, \"opacity\", \"0\", \"==\") === true || check_with_parents(element_p, \"visibility\", \"hidden\", \"==\") === true) {\n return false;\n }\n\n //Dynamic boxes variables\n var element_offset = element_p.offset();\n var topBoxes = element_offset.top;\n var leftBoxes = element_offset.left;\n var widthBoxes = element_p.outerWidth(false);\n var heightBoxes = element_p.outerHeight(false);\n\n if (heightBoxes > 1 && widthBoxes > 1) {\n\n // Append Dynamic Box\n if (iframe.find(\".\" + classes + \"-\" + $i + \"-box\").length === 0) {\n iframeBody.append(\"<div class='\" + classes + \"-box \" + classes + \"-\" + $i + \"-box'></div>\");\n }\n\n // Dynamic Boxes position\n iframe.find(\".\" + classes + \"-\" + $i + \"-box\").css(\"top\", topBoxes).css(\"left\", leftBoxes).css(\"width\", widthBoxes).css(\"height\", heightBoxes);\n\n }\n\n }", "function chooseTurn(playerNum) {\r\n\t$(\"#playerImage\" + playerNum).addClass('selectedPlayer');\r\n\tfor(var i = 0; i < 8; i++) {\r\n\t\tif($(\"#playerImage\" + i) !== undefined && i !== playerNum){\r\n\t\t\t$(\"#playerImage\" + i).removeClass('selectedPlayer');\r\n\t\t}\r\n\t}\r\n}", "function moveToNextBox (oldTag, newTag) {\n\n $(\".finished[tag=\" + oldTag + \"]\").attr('src', \"/smart-images/check-mark-green.png\");\n\n if (boxes[newTag] != \"selected\")\n {\n if (newTag == 9)\n {\n $(\".finished[tag=\" + newTag + \"]\").attr('src', \"/smart-images/check-required.png\"); \n }\n else\n {\n $(\".finished[tag=\" + newTag + \"]\").attr('src', \"/smart-images/check-current.png\"); \n }\n } \n \n $(\".finished[tag=\" + oldTag + \"]\").attr('height', 15);\n $(\".finished[tag=\" + oldTag + \"]\").attr('width', 15);\n\n boxes[oldTag] = \"selected\";\n }", "function setNewImage()\n {\n document.getElementById(\"img1\").classList.remove(\"qrimg\");\n document.getElementById(\"img1\").src =\"img/visit.jpg\"; \n document.getElementById(\"img1\").classList.add(\"visitimg\");\n }", "function returnClass(x){\n\t\t\tcheck(x);\n\t\t\tfor (var v = 0; v < 9; v++){\n\t\t\t\tif($(x).hasClass(boxes[v])){\n\t\t\t\t\tif(empty(W.spaces[v]).length == 0){\n\t\t\t\t\t\tW.next = -1;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tW.next = v;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\t\t\n\t\t\tclicks++;\n\n//////////////////////////////////////////////////////////////////////\n\t\t\tif(W.val == \"\"){\n\t\t\t\tnum = sim(difficulty);\n\t\t\t\tnum2 = Math.floor(num/9);\n\t\t\t\tnum3 = num%9;\n\t\t\t\tclicks=clicks-difficulty;\n\n\t\t\t\tvar m = move(num, W);\n\t\t\t\tclicks++;\n\t\t\t\tif (Player == 0){\n\t\t\t\t\t$(\".\" + wboxes[num2] + \".\" + boxes[num3]).text(\"o\");\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$(\".\" + wboxes[num2] + \".\" + boxes[num3]).text(\"x\");\n\t\t\t\t}\n\t\t\t\t$(\".\" + wboxes[num2] + \".\" + boxes[num3]).css(\"background-color\", \"lightgreen\")\t;\n\t\t\t\tif(W.spaces[num2].val != m.spaces[num2].val){\n\t\t\t\t\tW = m;\n\t\t\t\t\taddLine();\n\t\t\t\t\tswitch(line2){\n\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t$(\".\" + wboxes[num2] + \".\" + boxes[num3]).removeClass(\"diagonal1\");\n\t\t\t\t\t\t\t$(\".\" + wboxes[num2] + \".\" + boxes[num3]).addClass(\"green1\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t$(\".\" + wboxes[num2] + \".\" + boxes[num3]).removeClass(\"diagonal2\");\n\t\t\t\t\t\t\t$(\".\" + wboxes[num2] + \".\" + boxes[num3]).addClass(\"green2\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\t$(\".\" + wboxes[num2] + \".\" + boxes[num3]).removeClass(\"horizontal\");\n\t\t\t\t\t\t\t$(\".\" + wboxes[num2] + \".\" + boxes[num3]).addClass(\"green3\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\t$(\".\" + wboxes[num2] + \".\" + boxes[num3]).removeClass(\"vertical\");\n\t\t\t\t\t\t\t$(\".\" + wboxes[num2] + \".\" + boxes[num3]).addClass(\"green4\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t\telse{\n\t\t\t\t\tW = m;\n\t\t\t\t}\n\t\t\t\tif (W.val != \"\"){\n\t\t\t\t\tif (Player == 0){\n\t\t\t\t\t\talert(\"WINNER: PLAYER 2\");\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\talert(\"WINNER: PLAYER 1\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n//////////////////////////////////////////////////////////////////////\n\t\t\tif(clicks==81){\n\t\t\t\tW.val = -1;\n\t\t\t\talert(\"TIE\");\n\t\t\t}\n\t\t}", "function restrictClick(card) {\n for (card=0; card < cardArray.length; card++) {\n if (cardArray[card].classList.contains(\"card-image\")) {\n cardArray[card].classList.add(\"unclickable\");\n }\n }\n}", "function openBox() {\n if (disableClicks) {\n return;\n }\n //console.log(this);\n if (openedBoxes.length < 3) {\n this.classList.toggle(\"open\");\n this.classList.toggle(\"disabled\");\n //counter++;\n openedBoxes.push(this);\n //trackClicks.push(this);\n //console.log(trackClicks);\n\n // var turn = [];\n // var clickCounter = 0;\n // for (let i = 0; i < trackClicks.length; i++) {\n // console.log(trackClicks[i]);\n // }\n\n //console.log(\"counter\", counter);\n }\n if (openedBoxes.length === 3) {\n if (checkMatched()) {\n successCounter++;\n if (successCounter === 12) {\n var button = $(\"#shuffle\")[0];\n button.style.visibility = \"visible\";\n button.addEventListener(\"click\", refresh);\n }\n\n //counter = 0;\n }\n }\n\n // let clickCounter = 0;\n // let cardsMatchedCounter = 0;\n // for (let i = 0; i < trackClicks.length; i++) {}\n\n // create a function for matched\n function checkMatched() {\n // console.log(openedBoxes[);\n if (\n openedBoxes[0].className === openedBoxes[1].className &&\n openedBoxes[1].className === openedBoxes[2].className\n ) {\n console.log(\"MATCH!\");\n openedBoxes = [];\n return true;\n //create class called match and apply to matches cards\n } else {\n openedBoxes[0].classList.remove(\"disabled\");\n openedBoxes[1].classList.remove(\"disabled\");\n openedBoxes[2].classList.remove(\"disabled\");\n disableClicks = true;\n setTimeout(notMatched, 1000);\n return false;\n }\n }\n // create a functio for unmatched\n function notMatched() {\n openedBoxes[0].classList.toggle(\"open\");\n openedBoxes[1].classList.toggle(\"open\");\n openedBoxes[2].classList.toggle(\"open\");\n openedBoxes = [];\n disableClicks = false;\n }\n}", "function imageClick() {\n $(\"#gifs img\").click(function() {\n \n var IMG = $(this).data(\"status\");\n var HTML = $(this).data(\"html\");\n \n for (var i = 0; i < buttons.length; i++) {\n if (IMG === \"still\" && HTML === buttons[i].html) {\n $(this).replaceWith(\"<img data-status='active' data-html='\" + buttons[i].html + \"' src='\" + buttons[i].active + \"' width='200'/>\");\n imageClick();\n } else if (IMG === \"active\" && HTML === buttons[i].html) {\n $(this).replaceWith(\"<img data-status='still' data-html='\" + buttons[i].html + \"' src='\" + buttons[i].still + \"' width='200'/>\");\n imageClick();\n }\n }\n \n }); \n }", "function deleteClass(e){\n \n let targetRow = parseInt(e.target.getAttribute('row'));\n let targetCol = parseInt(e.target.getAttribute('col'));\n let check = \"\"\n if (targetRow > 0){\n check += \"(arrOfRows[targetRow - 1].childNodes[targetCol].classList.length == 1)\"\n };\n if (targetCol > 0){\n if (check.length > 0) {\n check += \" || (arrOfRows[targetRow].childNodes[targetCol - 1].classList.length == 1)\"\n }\n else {check += \"(arrOfRows[targetRow].childNodes[targetCol - 1].classList.length == 1)\"}\n };\n if (targetCol < meshSize - 1){\n if (check.length > 0) {\n check += \" || (arrOfRows[targetRow].childNodes[targetCol + 1].classList.length == 1)\"\n }\n else {check += \"(arrOfRows[targetRow].childNodes[targetCol + 1].classList.length == 1)\"}\n };\n if (eval(check)){\n if ((currentlySelectedTool == \"shovel\")&&(e.target.classList[1] == 'dirt')){\n inventory.dirt += 1;\n let dirtInv = document.getElementById(\"dirtInv\");\n dirtInv.innerHTML = inventory.dirt;\n e.target.classList = 'box';\n }\n else if ((currentlySelectedTool == \"shovel\")&&(e.target.classList[1] == 'grass')){\n inventory.grass += 1;\n let grassInv = document.getElementById(\"grassInv\");\n grassInv.innerHTML = inventory.grass;\n e.target.classList = 'box';\n }\n\n else if ((currentlySelectedTool == \"pickaxe\")&&(e.target.classList[1] == 'stone')){\n inventory.stone += 1;\n let stoneInv = document.getElementById(\"stoneInv\");\n stoneInv.innerHTML = inventory.stone;\n e.target.classList = 'box';\n }\n else if ((currentlySelectedTool == \"axe\")&&(e.target.classList[1] == 'bark')){\n inventory.bark += 1;\n let barkInv = document.getElementById(\"barkInv\");\n barkInv.innerHTML = inventory.bark;\n e.target.classList = 'box';\n }\n else if ((currentlySelectedTool == \"axe\")&&(e.target.classList[1] == 'leaves')){\n inventory.leaves += 1;\n let leavesInv = document.getElementById(\"leavesInv\");\n leavesInv.innerHTML = inventory.leaves;\n e.target.classList = 'box';\n } else {\n for (let k=0;k<toolArray.length;k++){\n if (toolArray[k].classList[1] == 'selectedTool'){\n toolArray[k].classList.add('red');\n setTimeout(function(){toolArray[k].classList.remove('red')},1000);\n }\n }\n }\n }\n}", "function clickedOn(c)\n{\nif(play == true && $(c).hasClass('')){\n\t\nclickedElem = c;\nc.setAttribute('id', 'marked');\nc.firstChild.setAttribute('id', 'marked');\n\n\nclickCount = clickCount+1;\n\n\tif (clickCount < 2)\n\t\t{\n\t\telem1=c.firstChild.innerHTML;\n\t\telement1 = c;\n\t\t}\n\t\n\telse if (clickCount == 2){\n\t\telem2=c.firstChild.innerHTML;\n\t\telement2 = c;\n\t\tsetTimeout('checkElements()',1300);\n\t\t }\n\telse if (clickCount > 2)\n\t{\n\t\tif($(c).hasClass(''))\n\t\t{\n c.firstChild.setAttribute('id', 'punmarked');\n\t\tc.setAttribute('id','unmarked');\n\t\tsetTimeout('checkElements()',1300);\n\t\t}\n\t}\n}\nelse\nalert(\"Click the Play Button to Begin!\");\n}", "function change(event) {\n var linkArr = document.querySelectorAll('#holder IMG');\n var currentIdx = 0;\n for (var i = 0; i < linkArr.length; i++) {\n if (linkArr[i].className.indexOf('show') > -1) {\n currentIdx = i;\n }\n }\n if (event.clientX - xMove > 10) {\n xMove = event.clientX;\n if (0 === currentIdx) {\n linkArr[currentIdx].className = 'hide';\n linkArr[linkArr.length - 1].className = 'show';\n } else {\n linkArr[currentIdx].className = 'hide';\n linkArr[currentIdx - 1].className = 'show';\n }\n } else if (event.clientX - xMove < -10) {\n xMove = event.clientX;\n if (linkArr.length - 1 === currentIdx) {\n linkArr[currentIdx].className = 'hide';\n linkArr[0].className = 'show';\n } else {\n linkArr[currentIdx].className = 'hide';\n linkArr[currentIdx + 1].className = 'show';\n }\n }\n}", "function image(number) {\n $('#imghang').removeAttr(\"class\").addClass(\"image\" + number);\n}", "function addCurlBaby(val){\r\n\t$(\"img.baby-curl\"+val).addClass('curl-active');\r\n\t$(\"div.baby-code\"+val).addClass('code-active');\r\n}", "function addListeners5(){\n for (let i = 0; i < pickups.length; i++){\n pickups[i].addEventListener('click', function(evt){\n if (hold == null) {\n camera.innerHTML += '<a-box id=\"js--hold\" class=\"js--pickup js--interact\" color=\"'+ this.getAttribute(\"color\") + '\" height='+ this.getAttribute(\"height\") +' rotation=\"0 0 -90\" position=\"2 -2 -4\" depth=\"0.1\">'+ this.innerHTML + '</a-box>'\n hold = \"box\";\n console.log(\"true\");\n }\n });\n }\n }", "function addSwipebox() {\n $('.realisationImagier').click(function (event) {\n event.preventDefault();\n $('.blocImagier' + getClientFormat() +' .realisationImagier a').addClass('swipebox');\n });\n}", "function animationBoxes(){\r\n\tdocument.getElementById(\"one\").classList.add(\"disabled\");\r\n\tdocument.getElementById(\"two\").classList.add(\"disabled\");\r\n\tdocument.getElementById(\"three\").classList.add(\"disabled\");\r\n\tdocument.getElementById(\"four\").classList.add(\"disabled\");\r\n\tdocument.getElementById(\"five\").classList.add(\"disabled\");\r\n\tdocument.getElementById(\"six\").classList.add(\"disabled\");\r\n}", "function clickHandler(){\n\tctr++;\n\tclearTimeout(timeoutID);\n\n /*---------------------\n Resets the boxes when a match\n has not been made\n ---------------------*/\n\tif(ctr % 2 !== 0 && his.length > 0){\n\t\this.pop().setAttributeNS(null, \"fill\", \"lightgrey\");\n\t\this.pop().setAttributeNS(null, \"fill\", \"lightgrey\");\n\t}\n\tvar currentBox = this;\n\tcurrentBox.setAttributeNS(null, \"fill\", colors[currentBox.getAttributeNS(null,\"idx\")]);\n\n /*---------------------\n Sets selection equal to\n the box that has been selected first\n ---------------------*/\n\tif(ctr % 2 !== 0){\n\t\tselection = this;\n\t}\n\n /*---------------------\n Handles the second click\n\n First, checks if the same box as selection\n is clicked, does nothing in this case.\n ---------------------*/\n\tif(ctr % 2 === 0){\n\t\tif(selection.getAttributeNS(null,\"idx\") === currentBox.getAttributeNS(null,\"idx\")){\n\t\t\tctr--;\n\t\t}\n\t\telse{\n\t\t\tif(colors[selection.getAttributeNS(null, \"idx\")] === colors[currentBox.getAttributeNS(null, \"idx\")]){\n\t\t\t\tselection.removeEventListener('click', clickHandler, false);\n\t\t\t\tcurrentBox.removeEventListener('click', clickHandler, false);\n\t\t\t\tmatches++; //if a match has been made, removes the listeners for those boxes\n\t\t\t\tif(matches===50){ //Checks the win condition\n\t\t\t\t\talert(\"Congratulations, you've won!\");\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\this.push(currentBox);\n\t\t\t\this.push(selection);\n\t\t\t\ttimeoutID = setTimeout(function(){\n\t\t\t\t\tcurrentBox.setAttributeNS(null, \"fill\", \"lightgrey\");\n\t\t\t\t\tselection.setAttributeNS(null, \"fill\", \"lightgrey\");\n\t\t\t\t},500);\n\t\t\t}\n\t\t}\n\t}\n}", "function onlyTwo() {\n cards.classList.add(\"unclickable\");\n}", "function addClickToGifs() {\n $('.gif').on('click', function(e) {\n var state = $(this).attr('data-state');\n\n if (state === 'still') {\n $(this).attr('src', $(this).attr('data-animate')).attr('data-state', 'animate');\n console.log(this)\n } else {\n $(this).attr('src', $(this).attr('data-still')).attr('data-state', 'still');\n console.log(this)\n }\n\n });\n}", "function startP2() {\t\n$(\".four\").off(\"click\").on(\"click\", function() {\n\t$(\".board\").addClass(\"hide\");\t\n\t$(\".board2\").addClass(\"hide\");\t\n\t$(\".four\").addClass(\"hide\");\t\t\t\n\t$(\".board3\").removeClass(\"hide\");\n\t$(\".three\").removeClass(\"hide\")\t\n\thighlightBoard3();\n});\n}", "addClick(e) {\n //console.log(this.m.gameOver)\n if (!this.m.gameOver) {\n let player;\n if (e.target.innerText == \"\") {\n if (!this.m.gameOver) {\n //if tiled has been clicked or not\n if (this.m.beenClicked % 2 == 0) {\n // console.log('x clicked')\n e.target.innerText = \"X\";\n player = this.m.firstPlayer;\n } else {\n e.target.innerText = \"O\";\n //console.log('o clicked')\n player = this.m.secondPlayer;\n }\n\n this.m.beenClicked++;\n // console.log(e);\n // console.log('clicked on', e.target.id)\n //was clicked=true\n if (this.m.beenClicked > 4) {\n this.checkWin();\n }\n this.playerTurn(player);\n\n }\n }\n }\n }", "function selectImage(e) {\r\n if(e.target.innerHTML === \"\") //ensures only images can be clicked\r\n removeClasses(e);\r\n\r\n }", "function resetClickedBox() {\n\t\tif (clickedBox) {\n\t\t\tclickedBox.removeClass('clicked');\n\t\t\tclickedBox = null;\n\t\t}\n\t}", "function eCorrect(el){\r\n\tif (document.getElementById('ball5a').src.match(\"images/even/under10.png\") && document.getElementById('ball6a').src.match(\"images/even/under10.png\")){\r\n\tel.classList.add(\"opaque\");\r\n\t}\r\n\telse {\r\n\t\tvar audio = new Audio('sounds/glove.mp3');\r\n\t\taudio.play();\r\n\t}\r\n\tpartOnePass();\r\n}", "function clickRegularViewFocusImg(e) {\n\n var clickedThing = e.target;\n\n // if clicked element is a single image or the focus img in a gallery\n if (clickedThing.classList.contains('clickme')) {\n\n // define imgToShow\n var imgToShow = clickedThing;\n\n // call NAMED lightbox function\n lightbox(imgToShow);\n\n // call NAMED function to populate lightbox dots\n populateLightboxDots(imgToShow);\n\n } // close if ('clickme')\n} // close function", "function clickPallino(){\r\n \r\n $(\".active\").removeClass(\"active\");\r\n $(this).addClass(\"active\");\r\n $(\"img\").eq($(this).index()).addClass(\"active\");\r\n}", "function showCurrentPlayer (currentPlayer) {\n switch (currentPlayer){\n case 1:\n playerOneTotalScoreElement.parentElement.classList.remove('waiting-player');\n playerTwoTotalScoreElement.parentElement.classList.add('waiting-player');\n break;\n case 2:\n playerOneTotalScoreElement.parentElement.classList.add('waiting-player');\n playerTwoTotalScoreElement.parentElement.classList.remove('waiting-player');\n break;\n };\n}", "function imageClicked(eventData) {\n let clickInformation = eventData;\n if ( clickInformation.target.className = 'image') {\n if (clickInformation.target.alt === \"rock\") {\n let playerSelection = \"rock\";\n rockImage.classList.add('image','playerWeapon');\n outcome = playRound(playerSelection, computerPlay());\n \n if (playerScore != 5 && compScore != 5) {\n whoWon(outcome);\n \n }\n\n } else if (clickInformation.target.alt === \"paper\") {\n let playerSelection = \"paper\";\n paperImage.classList.add('image','playerWeapon');\n outcome = playRound(playerSelection, computerPlay());\n\n if (playerScore != 5 && compScore != 5) {\n whoWon(outcome);\n \n }\n \n } else if (clickInformation.target.alt === \"scissors\") {\n let playerSelection = \"scissors\";\n scissorsImage.classList.add('image','playerWeapon');\n outcome = playRound(playerSelection, computerPlay());\n\n if (playerScore != 5 && compScore != 5) {\n whoWon(outcome);\n \n }\n }\n }\n \n }", "function selectImage (event) {\n const button = event.currentTarget; //significa botão clicad\n console.log('selectImage', event.currentTarget);\n //(button.children)\n\n //acessar cada button e excluir de cada um no html a class=\"active\"\n const buttons = document.querySelectorAll(\".images button\");\n console.log(buttons);\n buttons.forEach( (button) => {\n button.classList.remove(\"active\");\n });\n /*\n buttons.forEach(removeActiveClass);\n\n function removeActiveClass (button) {\n button.classList.remove(\"active\")\n }\n*/\n\n\n//clicando e carregando a imagem no principal:\nconst image = button.children[0]\nconst imageContainer = document.querySelector(\".orphanage-details > img\")\n\n//mudando o container, ou seja, a imagem principal\nimageContainer.src = image.src;\n\n\n//adicionando a class=\"active\" em cada button\nbutton.classList.add(\"active\") // está buscando o button da const no começo da funcão\n\n}", "function looper(){\n if(index > maxID){\n $('.highlighted').removeClass('highlighted');\n $('#0').addClass('highlighted');\n //$('.shown').fadeOut().removeClass('shown');\n //$('.gif 0').fadeIn().addClass('highlighted');\n index = 0;\n }else if(index < 0){\n $('.highlighted').removeClass('highlighted');\n $('.dots-holder').children().last().addClass('highlighted');\n //$('.shown').fadeOut().removeClass('shown');\n //$('.pictures').children().last().fadeIn().addClass('shown');\n index = 20;\n }\n}", "function selectAdvancedImage(event) {\n document.querySelectorAll(\".qwant-panel__content__img-container__element--active\")[0]\n .classList.remove(\"qwant-panel__content__img-container__element--active\");\n event.target.classList.add(\"qwant-panel__content__img-container__element--active\");\n}", "function toggleMultipleItems(e) {\n // const optionValue = e.srcElement.innerHTML.toLowerCase();\n const optionValue = e.target.id;\n const category = e.target.classList[1];\n // console.log(e.srcElement);\n // console.log(e.srcElement.classList[1]);\n // console.log(e.target.querySelector(\"circle\"));\n const imgItem = document.getElementById(`${category}-${optionValue}`);\n if (!imgItem.classList.contains(\"display\")) {\n imgItem.classList.add(\"display\");\n render();\n e.target.querySelector(\"circle\").style.stroke = `${darkPurpleColor}`;\n e.target.querySelector(\"circle\").style.strokeWidth = `3`;\n\n // console.log(document.getElementById(`fairy-${optionValue}`));\n } else {\n imgItem.classList.remove(\"display\");\n e.target.querySelector(\"circle\").style.stroke = ``;\n e.target.querySelector(\"circle\").style.strokeWidth = ``;\n render();\n }\n // console.log(document.getElementById(`${category}-${optionValue}`));\n}", "function click() {\n\t// If clicking on a cell with your piece in it, highlight the cell\n\tif (!selectedBox) { // 1st click\n\t\tif ((!blueTurn && this.hasClassName(\"red\")) || (blueTurn && this.hasClassName(\"blue\"))) {\n\t\t\tthis.addClassName(\"selected\");\n\t\t\tselectedBox = this;\n\t\t}\n\t}\n\t\n\t// Player is trying to move a piece\n\telse { // 2nd click\n\t\tselectedBox.removeClassName(\"selected\");\n\t\tthis.onmouseout();\n\t\t\n\t\t// If there are forced jumps and player is not jumping, highlight forced jumps\n\t\tif (forcedJumps != false) {\n\t\t\tif (!jump(this)) {\n\t\t\t\thighlightForcedJumps(forcedJumps);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Try moving, then try jumping\n\t\telse if (!move(this))\n\t\t\tjump(this);\n\t\t\t\n\t\tselectedBox = null;\n\t\tcheckVictory();\n\t}\n}", "function func(e) {\r\n // console.log(e.target.parentNode.getAttribute('class'));\r\n var p = e.target\r\n while (p.className !== \"music_image\") {\r\n p = p.parentNode\r\n }\r\n // var change = p.querySelector('img').src;\r\n\r\n changePreview(p.id);\r\n }", "function digitHintReveal(el){\r\n\t\tel.src = \"images/blank.png\";\r\n\tvar audio = new Audio('sounds/whoosh.mp3');\r\n\taudio.play();\r\n\tif (document.getElementById('ball5a').src.match(\"images/blank.png\") && document.getElementById('ball6a').src.match(\"images/blank.png\")){\r\n\t\tdocument.getElementById('ball5a').src = \"images/even/under10.png\"\r\n\t\tdocument.getElementById('ball6a').src = \"images/even/under10.png\"\r\n\t\tdocument.getElementById('ball5a').classList.remove(\"hint-size\");\r\n\t\tdocument.getElementById('ball5a').classList.add(\"make-small\");\r\n\t\tdocument.getElementById('ball6a').classList.remove(\"hint-size\");\r\n\t\tdocument.getElementById('ball6a').classList.add(\"make-small\");\r\n\t\tvar audio = new Audio('sounds/batcrack.wav');\r\n\taudio.play();\r\n\t}\r\n\telse {\r\n\t}\t\r\n}", "function addToSelected(div) {\n div.classList.add(selClass);\n document.getElementById(\"eMalButtons\").classList.add(\"emActive\");\n}", "function pinstripleHintReveal(el){\r\n\t\tel.src = \"images/blank.png\";\r\n\tvar audio = new Audio('sounds/whoosh.mp3');\r\n\taudio.play();\t\r\n\tif (document.getElementById('ball3a').src.match(\"images/blank.png\") && document.getElementById('ball4a').src.match(\"images/blank.png\")){\r\n\t\tdocument.getElementById('ball3a').src = \"images/pinstripes/pinstripe.png\"\r\n\t\tdocument.getElementById('ball4a').src = \"images/pinstripes/pinstripe.png\"\r\n\t\tdocument.getElementById('ball3a').classList.remove(\"hint-size\");\r\n\t\tdocument.getElementById('ball3a').classList.add(\"make-small\");\r\n\t\tdocument.getElementById('ball4a').classList.remove(\"hint-size\");\r\n\t\tdocument.getElementById('ball4a').classList.add(\"make-small\");\r\n\t\tvar audio = new Audio('sounds/batcrack.wav');\r\n\taudio.play();\r\n\t} \r\n\telse {\r\n\t}\r\n}", "function out() {\n\tif (this.id == 0)\n\tthis.src = \"box.png\";\n}", "function changeClass(currentClassName, newClassName){\n let cardsToChange = document.getElementsByClassName(currentClassName);\n cardsToChange[0].parentElement.className = newClassName;\n cardsToChange[1].parentElement.className = newClassName;\n\n if (newClassName === \"card\") {\n //enable mouse events for cards that are not open / matched yet\n var allCards = document.getElementsByClassName(\"card\");\n for (var i = 0; i < allCards.length; i++) {\n if (openCards.indexOf(allCards[i].firstElementChild.className) === -1) {\n allCards[i].style.pointerEvents = \"auto\";\n }\n }\n }\n}", "function selectOption(optionChoose) {\n var imgOption = \"img/\" + optionChoose + \"-icon.svg\";\n // console.log(\" Img es : \" + imgOption);\n document.getElementById(\"option-choose-play\").src = imgOption;\n document.getElementById(\"option-left-box\").classList.add(\"background-color-new\");\n document.getElementById(\"option-right-box\").classList.add(\"background-color-new\");\n btn_newplay.style.display = \"block\";\n}", "function verliefdEmotie(){\n \n\n if (state == false){\n verliefd.src = \"images/gfblozenfoto.png\";\n bodyElement.classList.add('rozeAchtergrond');\n lieveWoordjesSelector.classList.remove(\"liefPraatje\");\n mobiel.classList.remove(\"mobielPlaatje\");\n telefoonWoordjesSelector.classList.remove(\"mobielPraatje\");\n state = true;\n }\n else{\n verliefd.src = \"images/onlinegfnomood.png\";\n bodyElement.classList.remove('rozeAchtergrond');\n state = false;}\n }", "function svgChangeClass() {\n for (c of classes) {\n if (classesSelection.value == c) { \n classIcon.setAttribute(\"src\", `./img/classes/${c}.svg`);\n }\n }\n }", "function click(square) {\n\tlet currentId = square.id\n\tif (isGameOver) return\n\tif (square.classList.contains('checked') || square.classList.contains('flag')) return\n\tif (square.classList.contains('bomb')) {\n\t\tgameOver(square)\n\t} else {\n\t\tlet total = square.getAttribute('data')\n\t\tif (total != 0) {\n\t\t\tsquare.classList.add('checked')\n\t\t\tif (total == 1) square.classList.add('one') //adding classes to style numbers differently\n\t\t\tif (total == 2) square.classList.add('two') //adding classes to style numbers differently\n\t\t\tif (total == 3) square.classList.add('three') //adding classes to style numbers differently\n\t\t\tif (total == 4) square.classList.add('four') //adding classes to style numbers differently\n\t\t\tsquare.innerHTML = total\n\t\t\treturn\n\t\t}\n\t\tcheckSquare(square, currentId) // If the total is 0(zero) , only then ,this function will be called to\n\t\t\t\t\t\t\t\t\t //check the neighouring elements and showing them if they are valid. \n\t}\n\tsquare.classList.add('checked')\n}", "function oneClick() {\n this.innerHTML = player\n if (player === \"x\") {\n player = \"o\"\n }\n\n else if (player === \"o\") {\n player = \"x\"\n }\n $(this).off(\"click\")\n \n // get all possibilities\n\n if (box1.innerHTML !== \" \" && box1.innerHTML === box2.innerHTML && box2.innerHTML === box3.innerHTML) {\n if (player !== \"x\") {\n alert(\"x wins\");\n // playerOneScore++\n // $(\"#playerOne\").html(\"Player One: \" + playerOneScore)\n for (i = 1; i < 10; i++) {\n box = $(\"#box\" + i)\n box.off(\"click\")\n }\n\n } else {\n alert(\"o wins\")\n // playerTwoScore++\n // $(\"#playerTwo\").html(\"Player Two: \" + playerTwoScore)\n for (i = 1; i < 10; i++) {\n box = $(\"#box\" + i)\n box.off(\"click\")\n }\n }\n } else if (box4.innerHTML !== \" \" && box4.innerHTML === box5.innerHTML && box4.innerHTML === box6.innerHTML) {\n if (player !== \"x\") {\n alert(\"x wins\");\n // playerOneScore++\n // $(\"#playerOne\").html(\"Player One: \" + playerOneScore)\n for (i = 1; i < 10; i++) {\n box = $(\"#box\" + i)\n box.off(\"click\")\n }\n } else {\n alert(\"o wins\")\n playerTwoScore++\n $(\"#playerTwo\").html(\"Player Two: \" + playerTwoScore)\n for (i = 1; i < 10; i++) {\n box = $(\"#box\" + i)\n box.off(\"click\")\n }\n }\n } else if (box7.innerHTML !== \" \" && box7.innerHTML === box8.innerHTML && box7.innerHTML === box9.innerHTML) {\n if (player !== \"x\") {\n alert(\"x wins\");\n // playerOneScore++\n // $(\"#playerOne\").html(\"Player One: \" + playerOneScore)\n for (i = 1; i < 10; i++) {\n box = $(\"#box\" + i)\n box.off(\"click\")\n }\n } else {\n alert(\"o wins\")\n // playerTwoScore++\n // $(\"#playerTwo\").html(\"Player Two: \" + playerTwoScore)\n for (i = 1; i < 10; i++) {\n box = $(\"#box\" + i)\n box.off(\"click\")\n }\n }\n } else if (box1.innerHTML !== \" \" && box1.innerHTML === box4.innerHTML && box1.innerHTML === box7.innerHTML) {\n if (player !== \"x\") {\n alert(\"x wins\");\n // playerOneScore++\n // $(\"#playerOne\").html(\"Player One: \" + playerOneScore)\n for (i = 1; i < 10; i++) {\n box = $(\"#box\" + i)\n box.off(\"click\")\n }\n } else {\n alert(\"o wins\")\n // playerTwoScore++\n // $(\"#playerTwo\").html(\"Player Two: \" + playerTwoScore)\n for (i = 1; i < 10; i++) {\n box = $(\"#box\" + i)\n box.off(\"click\")\n }\n }\n } else if (box1.innerHTML !== \" \" && box1.innerHTML === box4.innerHTML && box1.innerHTML === box7.innerHTML) {\n if (player !== \"x\") {\n alert(\"x wins\");\n // playerOneScore++\n // $(\"#playerOne\").html(\"Player One: \" + playerOneScore)\n for (i = 1; i < 10; i++) {\n box = $(\"#box\" + i)\n box.off(\"click\")\n }\n } else {\n alert(\"o wins\")\n // playerTwoScore++\n // $(\"#playerTwo\").html(\"Player Two: \" + playerTwoScore)\n for (i = 1; i < 10; i++) {\n box = $(\"#box\" + i)\n box.off(\"click\")\n }\n }\n\n } else if (box2.innerHTML !== \" \" && box2.innerHTML === box5.innerHTML && box2.innerHTML === box8.innerHTML) {\n if (player !== \"x\") {\n alert(\"x wins\");\n // playerOneScore++\n // $(\"#playerOne\").html(\"Player One: \" + playerOneScore)\n for (i = 1; i < 10; i++) {\n box = $(\"#box\" + i)\n box.off(\"click\")\n }\n } else {\n alert(\"o wins\")\n // playerTwoScore++\n // $(\"#playerTwo\").html(\"Player Two: \" + playerTwoScore)\n for (i = 1; i < 10; i++) {\n box = $(\"#box\" + i)\n box.off(\"click\")\n }\n }\n\n } else if (box3.innerHTML !== \" \" && box3.innerHTML === box6.innerHTML && box3.innerHTML === box9.innerHTML) {\n if (player !== \"x\") {\n alert(\"x wins\");\n // playerOneScore++\n // $(\"#playerOne\").html(\"Player One: \" + playerOneScore)\n for (i = 1; i < 10; i++) {\n box = $(\"#box\" + i)\n box.off(\"click\")\n }\n } else {\n alert(\"o wins\")\n // playerTwoScore++\n // $(\"#playerTwo\").html(\"Player Two: \" + playerTwoScore)\n for (i = 1; i < 10; i++) {\n box = $(\"#box\" + i)\n box.off(\"click\")\n }\n }\n\n } else if (box1.innerHTML !== \" \" && box1.innerHTML === box5.innerHTML && box1.innerHTML === box9.innerHTML) {\n if (player !== \"x\") {\n alert(\"x wins\");\n // playerOneScore++\n // $(\"#playerOne\").html(\"Player One: \" + playerOneScore)\n for (i = 1; i < 10; i++) {\n box = $(\"#box\" + i)\n box.off(\"click\")\n }\n } else {\n alert(\"o wins\")\n // playerTwoScore++\n // $(\"#playerTwo\").html(\"Player Two: \" + playerTwoScore)\n for (i = 1; i < 10; i++) {\n box = $(\"#box\" + i)\n box.off(\"click\")\n }\n }\n\n } else if (box3.innerHTML !== \" \" && box3.innerHTML === box5.innerHTML && box3.innerHTML === box7.innerHTML) {\n if (player !== \"x\") {\n alert(\"x wins\");\n // playerOneScore++\n // $(\"#playerOne\").html(\"Player One: \" + playerOneScore)\n for (i = 1; i < 10; i++) {\n box = $(\"#box\" + i)\n box.off(\"click\")\n }\n } else {\n alert(\"o wins\")\n // playerTwoScore++\n // $(\"#playerTwo\").html(\"Player Two: \" + playerTwoScore)\n for (i = 1; i < 10; i++) {\n box = $(\"#box\" + i)\n box.off(\"click\")\n }\n }\n } if (box1.innerHTML !== \" \" && box2.innerHTML !== \" \" && box3.innerHTML !== \" \" && box4.innerHTML !== \" \"\n && box5.innerHTML !== \" \" && box6.innerHTML !== \" \" && box7.innerHTML !== \" \" && box8.innerHTML !== \" \" && box9.innerHTML !== \" \") {\n alert(\"Tie\")\n \n }\n }", "function showpunch(){ \n punchlineDiv.classList.remove('hidden');\n punchlineDiv.classList.add('bubble');\n punchlineBtn.classList.add('hidden');\n newJokeBtn.classList.remove('hidden');\n \n}", "function divTocenter(mainClass, addingClass,containBox){\n\tlet divWithFotos = document.querySelectorAll(mainClass);\n\n\tfor(let i=0;i<divWithFotos.length;i++){\n\t\tdivWithFotos[i].onclick = function(event) {\n\t\t\tdivWithFotos[i].classList.toggle(addingClass);\n\t\t\taddNewPosition(divWithFotos[i]);\n\t\t}\n\t}\n}", "function pCorrect(el){\r\n\tif (document.getElementById('ball3a').src.match(\"images/pinstripes/pinstripe.png\") && document.getElementById('ball4a').src.match(\"images/pinstripes/pinstripe.png\")){\r\n\tel.classList.add(\"opaque\"); \r\n\t}\r\n\telse{\r\n\t\tvar audio = new Audio('sounds/glove.mp3');\r\n\t\taudio.play();\r\n\t}\r\n\tpartOnePass();\r\n}", "function cardSelected()\r\n{\r\n\t//alert(\"cardname:\" + this.className + \" row:\" + this.row + \" col\" + this.col + \" card index:\" + this.id + \" imgIdx: \" + this.imgIdx);\r\n\r\n\t// Ignore cards that have been removed from the game board...\t\r\n\tif (this.className == \"card reveal remove\")\r\n\t{\r\n\t\treturn;\r\n\t}\r\n\r\n\t// Ignore clicks on the same card\r\n\tif (g_selectedCards[0] == this)\r\n\t{\r\n\t//\talert(\"Don't choose same card!\");\r\n\t\treturn;\r\n\t}\r\n\r\n\r\n\tif (g_selectedCards[0] == null)\r\n\t{\r\n\t\tthis.className += \" reveal\"; // reveal the card\r\n\t\tg_selectedCards[0] = this;\r\n\t}\r\n\telse if (g_selectedCards[1] == null)\r\n\t{\r\n\t\tthis.className += \" reveal\"; // reveal the card\r\n\t\tg_selectedCards[1] = this;\r\n\t}\r\n\t// the next click needs to put the cards away or hide them again...\r\n\telse if (g_selectedCards[0].imgIdx == g_selectedCards[1].imgIdx)\r\n\t{\r\n\t\t// Eventually these would change to the \"remove\" class\r\n\t\tg_selectedCards[0].className += \" remove\";\r\n\t\tg_selectedCards[1].className += \" remove\";\r\n\t\tg_selectedCards[0] = null;\r\n\t\tg_selectedCards[1] = null;\r\n\t\tg_cardsRemoved += 2;\r\n\r\n\t\tif (g_cardsRemoved >= (MAX_ROWS * MAX_COLS))\r\n\t\t{\r\n\t\t\talert(\"Game Over\\n\\nClick 'OK' to reload a new game\");\r\n\t\t\twindow.location.reload(); // reload the page\r\n\t\t}\r\n\t}\r\n\telse\r\n\t{\r\n\t\tg_selectedCards[0].className = \"card\";\r\n\t\tg_selectedCards[1].className = \"card\";\r\n\t\tg_selectedCards[0] = null;\r\n\t\tg_selectedCards[1] = null;\r\n\t}\r\n\r\n\r\n\t/* Using this instead of the above allows you to look at all images without game logic... \r\n\t// Here we are changing the name of the card to add the \"reveal\" capability to it. By \r\n\t// doing this we initiate the animations for the reveal class of cards\r\n\tif (this.className == \"card\")\r\n\t{\r\n\t\tthis.className += \" reveal\";\r\n\t}\r\n\telse\r\n\t{\r\n\t\tthis.className = \"card\";\r\n\t}\r\n\t*/\r\n}", "function addBoxLight(num) {\n for (let i = 0; i < num; i++) {\n if (!boxes[i].classList.contains(\"blue-light-hi\")) boxes[i].classList.add(\"blue-light-hi\");\n }\n}", "function notMatched(){\n openCards[0].classList.add(\"unmatched\");\n openCards[1].classList.add(\"unmatched\");\n hideCards();\n}", "function changeBGAct3 (){\n removeClasses();\n body.classList.add(\"act3\");\n}", "function clickGif() {\n \n //console.log($(this).attr(\"still\"));\n \n if($(this).attr(\"still\") === \"true\") {\n console.log(\"making image move\")\n console.log($(this).attr(\"activeLink\"))\n $(this).attr(\"src\", $(this).attr(\"activeLink\"));\n $(this).attr(\"still\", \"false\");\n } else {\n //console.log(\"making image still\")\n $(this).attr(\"src\", $(this).attr(\"stillLink\"));\n $(this).attr(\"still\", \"true\");\n \n }\n }", "function letsCheck() {\n\t\t// add delay to 1 sec so you can see what color you clicked.\n\t\tsetTimeout(function(){\n\t\t\n\t\tvar marked1 = $(\".marked1\");\n\t\tvar marked2 = $(\".marked2\");\n\t\tif (marked1.attr(\"value\") === marked2.attr(\"value\")) {\n\t\t\tmarked1.addClass(\"finnished\");\n\t\t\tmarked2.addClass(\"finnished\");\n\t\t\tmarked1.removeClass(\"marked1\");\n\t\t\tmarked2.removeClass(\"marked2\");\n\t\t}\n\t\telse {\n\t\t\tmarked1.attr(\"src\", \"cards/memory_front.jpg\");\n\t\t\tmarked2.attr(\"src\", \"cards/memory_front.jpg\");\n\t\t\tmarked1.removeClass(\"marked1\");\n\t\t\tmarked2.removeClass(\"marked2\");\n\t\t}\n\t\tclassesCheck = 0;\n\t\tisAllDone();\n\t\t\n\t\t}, 1000);\n\t}", "function alternateGif(elem) {\r\n\tswitchBox();\r\n\t/*if its the first time getting clicked*/\r\n\tif (arrowNotClicked) {\r\n\t\telem.classList.add(\"move-arrow-to-bottom\");\r\n\t\tarrowNotClicked = false;\r\n\t}\r\n\telem.classList.toggle(\"move-arrow-to-top\");\r\n\telem.classList.toggle(\"move-arrow-to-bottom\");\r\n}", "function notMatching(){\n\t\t\t\t\t\t\t\n\tselectedCard.className += ' down';\n\t\t\t\t\t\n\tstoredCard.className += ' down';\n\t\n\t//enable all cards again \n\tfor(var i = 0;i<16;i++){\n\t\t\t\t\n\t\tdocument.getElementById(i).style.pointerEvents = 'auto';\n\t\t\t\t\n\t}\n\t\n\tclickCount+=2;\n\t\n\t\n}", "function removeClicked(element){\n element.getElementsByClassName('flipper')[0].classList.remove('clicked');\n}", "function addListeners1(){\n for (let i = 0; i < talen.length; i++){\n talen[i].addEventListener('click', function(evt){\n if (hold == null) {\n camera.innerHTML += '<a-box id=\"js--hold\" class=\"js--talen js--interact\" color=\"'+ this.getAttribute(\"color\") + '\" height='+ this.getAttribute(\"height\") +' rotation=\"0 0 90\" position=\"2 -1 -2\" depth=\"0.1\" width=\"0.8\">'+ this.innerHTML + '</a-box>'\n hold = \"box\";\n console.log(\"true\");\n }\n });\n }\n }", "function checkerSelection(evt){\n if(scores.winner !== null) return;\n evt.stopImmediatePropagation();\n const target = evt.target;\n \n if((target.attributes.player.value === playerTurn) && (pieceSelected === true)) {\n selectedPieceArray[0].classList.remove('selected')\n }\n if((target.attributes.player.value !== playerTurn) && (pieceSelected === true)){\n readyJump(target, selectedPieceArray);\n \n }else clearSelection();\n\n if(target.attributes.player.value !== playerTurn) return\n target.classList.add('selected')\n selectedPieceArray.push(target)\n pieceSelected = true;\n}", "click_extra() {\r\n if (this.isOff == true) {\r\n this.image = document.getElementById(\"power-clicked\");\r\n } else {\r\n this.image = document.getElementById(\"power-idle\");\r\n }\r\n }", "function dotClick(oldClassOne, oldClassTwo, newClass) {\n if (tests.classList.contains(oldClassOne)) {\n tests.classList.remove(oldClassOne);\n }\n\n if (tests.classList.contains(oldClassTwo)) {\n tests.classList.remove(oldClassTwo)\n }\n\n window.clearInterval(nextNextInt);\n window.clearInterval(nextint);\n window.clearInterval(prevint);\n tests.classList.add(newClass);\n}", "function displayGif(response){\n for(var i=0; i<response.data.length;i++){\n var box=$(\"<div>\").addClass(\"mainBox\");\n var image=$(\"<img>\").attr(\"src\",response.data[i].images.downsized_still.url).addClass(\"imageSize\").attr(\"data-name-still\",response.data[i].images.downsized_still.url).attr(\"data-name-moving\",response.data[i].images.downsized.url).attr(\"image-state\",\"still\");\n console.log(i+response.data[i].rating);\n var rating=$(\"<b>\").text(\"Rating : \"+response.data[i].rating).addClass(\"imageBox\");\n box.append(rating);\n box.append(image);\n $(\"#gifDisplayArea\").prepend(box);\n }\n $(\".imageSize\").on(\"click\",function(){\n var state=$(this).attr(\"image-state\");\n if(state === \"still\"){\n $(this).attr(\"src\",$(this).attr(\"data-name-moving\"));\n state= $(this).attr(\"image-state\",\"moving\");\n }\n else{\n $(this).attr(\"src\",$(this).attr(\"data-name-still\"));\n state= $(this).attr(\"image-state\",\"still\");\n }\n });\n}", "function clearSelection () {\n if (a4i.classList.contains('box-select')) {\n a4i.classList.remove('box-select');\n };\n if (b4i.classList.contains('box-select')) {\n b4i.classList.remove('box-select');\n };\n if (c4i.classList.contains('box-select')) {\n c4i.classList.remove('box-select');\n };\n if (d4i.classList.contains('box-select')) {\n d4i.classList.remove('box-select');\n };\n if (a3i.classList.contains('box-select')) {\n a3i.classList.remove('box-select');\n };\n if (b3i.classList.contains('box-select')) {\n b3i.classList.remove('box-select');\n };\n if (c3i.classList.contains('box-select')) {\n c3i.classList.remove('box-select');\n };\n if (d3i.classList.contains('box-select')) {\n d3i.classList.remove('box-select');\n };\n if (a2i.classList.contains('box-select')) {\n a2i.classList.remove('box-select');\n };\n if (b2i.classList.contains('box-select')) {\n b2i.classList.remove('box-select');\n };\n if (c2i.classList.contains('box-select')) {\n c2i.classList.remove('box-select');\n };\n if (d2i.classList.contains('box-select')) {\n d2i.classList.remove('box-select');\n };\n if (a1i.classList.contains('box-select')) {\n a1i.classList.remove('box-select');\n };\n if (b1i.classList.contains('box-select')) {\n b1i.classList.remove('box-select');\n };\n if (c1i.classList.contains('box-select')) {\n c1i.classList.remove('box-select');\n };\n if (d1i.classList.contains('box-select')) {\n d1i.classList.remove('box-select');\n };\n}", "setActiveDifficulty() {\n let first = this.$difficulties.childNodes[0].childNodes[0];\n first.classList.add('active-big');\n \n // Toggle class for selected button\n let btns = document.querySelectorAll(\".btn-big\");\n Array.from(btns).forEach(item => {\n item.addEventListener(\"click\", () => {\n let selected = document.querySelectorAll(\".active-big\");\n selected[0].className = selected[0].classList.toggle(\"active-big\");\n item.classList.add('active-big');\n });\n });\n \n this.createSliderValue();\n }", "function addClick(){\n\tfor(var i = 0; i < images.length; i++){\n\t\timages[i].addEventListener(\"click\", gameNotStarted);\n\t}\n}", "function OnMouseDown()\n{\t\n if(manager.turn == color)\n {\n if(color == 0 && gameObject.tag == \"Inactive White Piece\")\n {\n transform.gameObject.tag = \"Active White Piece\";\n movement();\n }\n else if(color == 0 && gameObject.tag == \"Active White Piece\")\n {\n \tmanager.unhighlightAllSquares();\n \ttransform.gameObject.tag = \"Inactive White Piece\";\n }\n else if(color == 1 && gameObject.tag == \"Inactive Black Piece\")\n {\n transform.gameObject.tag = \"Active Black Piece\";\n movement();\n }\n else if(color == 1 && gameObject.tag == \"Active Black Piece\")\n {\n \tmanager.unhighlightAllSquares();\n \ttransform.gameObject.tag = \"Inactive Black Piece\";\n }\n }\n}" ]
[ "0.65079087", "0.64757144", "0.6464441", "0.6430988", "0.6419099", "0.6229779", "0.62190425", "0.6189169", "0.61679804", "0.6041993", "0.5988708", "0.597747", "0.59698343", "0.59338707", "0.5932756", "0.59186476", "0.5915373", "0.59063154", "0.59047467", "0.58931607", "0.5873636", "0.5871704", "0.58663154", "0.5864761", "0.5854376", "0.585267", "0.58396333", "0.58195716", "0.58176434", "0.5815896", "0.58136696", "0.5809183", "0.5800369", "0.5795686", "0.577265", "0.5761481", "0.5752346", "0.57516074", "0.5749079", "0.57442987", "0.57384026", "0.57275945", "0.5721992", "0.57216746", "0.5720645", "0.5683164", "0.5682875", "0.56818676", "0.5678647", "0.56758463", "0.5673516", "0.5667123", "0.5664452", "0.56487924", "0.56364465", "0.5629526", "0.5628246", "0.5627779", "0.5624348", "0.56212825", "0.56134075", "0.5611928", "0.560433", "0.55907434", "0.5574186", "0.5572665", "0.55726266", "0.5572456", "0.5572172", "0.55708987", "0.5568887", "0.556575", "0.5561229", "0.5561077", "0.5558041", "0.5557604", "0.5555972", "0.55515075", "0.5544088", "0.5540006", "0.5539771", "0.552434", "0.55169624", "0.5513368", "0.55115753", "0.550924", "0.55079913", "0.55061567", "0.55040807", "0.55032045", "0.55001813", "0.54883826", "0.54872453", "0.548455", "0.5483693", "0.54834753", "0.5477907", "0.5476249", "0.54752576", "0.54740036", "0.5471852" ]
0.0
-1
Render and update each star
display() { // Lerp to proper colors if (blackStarfield) { this.alpha = 127; this.bg = color(0); this.color = color(255); } else { this.alpha = lerp(this.alpha, curLevel.alpha, STARFIELD_LERP); this.bg = lerpColor(this.bg, color(curLevel.bg), STARFIELD_LERP); this.color = lerpColor(this.color, color(curLevel.color), STARFIELD_LERP); } // Skip rendering stars if low graphics mode if (!showStars) return; // Render stars for (let i = 0; i < this.stars.length; i++) { let s = this.stars[i]; // Render star this.color.setAlpha(this.alpha * noise(s.noise)); fill(this.color); noStroke(); ellipse(s.x, s.y, s.r, s.r); // Update position if (!paused) { s.y += s.dy * dt(); if (s.y - s.r > height) { s.r = random(2); s.x = random(width); s.y = 0; s.dy = random(this.speed); } } // Update noise s.noise += s.deltaNoise; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function render_stars(){\n \n}", "function drawStars() {\n translate(width / 2, height / 2);\n for (var i = 0; i < stars.length; i++) {\n stars[i].update();\n stars[i].show();\n }\n}", "function renderStars() {\n var canv = document.getElementById('star-canvas');\n\n // check if the canvas exists\n if(!canv) {\n // Initialise the document background\n canv = initBackgroundCanvas(\"star-canvas\");\n createLocations();\n }\n\n var cont = canv.context;\n\n\n\n // check if the canvas is not null\n if(!cont) {\n cont = canv.getContext('2d');\n }\n\n for (var i = 0; i < star_locations.length; i++) {\n cont.beginPath(); // Begin drawing\n\n // Scale the star locations\n var star_x = star_locations[i][0] * (getDocumentWidth() / initialSize[0]);\n var star_y = star_locations[i][1] * (getDocumentHeight() / initialSize[1]);\n\n // Actually draw the star\n drawStar(cont, star_locations[i][0], star_locations[i][1]);\n\n // Set the fill colour to white and fill the circle\n cont.fillStyle = \"white\";\n cont.fill();\n }\n\n}", "function dispStars() {\n let starsOnPage = generateStars();\n document.querySelector('.stars').innerHTML = starsOnPage;\n}", "updateStarIcon(i) {\n //after clicking, appear meaning of selections\n this.buildStarExplanation();\n for (let a = 1; a <= i; a++) {\n $(`#star-icon${a}`).addClass('full-star');\n }\n // //remove any stars from after i, in case\n for (let a = 5; a > i; a--) {\n $(`#star-icon${a}`).removeClass('full-star');\n }\n const textExplanation =\n `<div id='text-explanation-paragraphs'>\n <p>\n 1 star = \"Poor\"\n </p>\n <p>\n 2 star = \"Fair\"\n </p>\n <p>\n 3 star = \"Average\"\n </p>\n <p>\n 4 star = \"Good\"\n </p>\n <p>\n 5 star = \"Great\"\n </p></div>\n `;\n $(`#text-explanation`).empty()\n $(`#text-explanation`).append(textExplanation)\n // this.buildStarExplanation()\n\n }", "function displayStars(num) {\n var starLevelTemplate = '<li><i class=\"fa fa-star fa-3x animated bounceIn\"></i></li>';\n var starTemplate = '<li><i class=\"fa fa-star \"></i></li>';\n $(\"#starLevel\").empty();\n $(\".stars\").empty();\n for (var i = 0; i < num; i++) {\n $(\".stars\").append(starTemplate);\n $(\"#starLevel\").append(starLevelTemplate)\n }\n }", "function updateStars(numberOfStars) {\n\n // Creating the stars container object\n let stars = document.querySelector('.stars');\n\n stars.innerHTML = '';\n\n for (let i = 1; i <= numberOfStars; i++) {\n let starItem = document.createElement('li');\n let starContent = document.createElement('i');\n starContent.classList.add('fa', 'fa-star');\n starItem.appendChild(starContent);\n stars.appendChild(starItem);\n }\n}", "function displayStars(num, point, width, height, idname, ratid, ratidin) {\n \n var imag = \"<span>\";\n \n count++;\n \n document.getElementById(ratid).innerHTML = \"0/\"+num;\n \n for(var i = 0; i<num; i++) {\n imag += \"<img src='https://dl.dropboxusercontent.com/u/77110529/ratingSystem/plainStar.png' width=\"+width+\" height=\"+height+\" usemap='#\"+i+\"star\"+count+\"' id='\"+i+\"star\"+count+\"' alt='plain' />\";\n \n if(point) {\n imag += \"<map name='\"+i+\"star\"+count+\"'>\";\n imag += \"<area id='\"+i+\"star+\"+count+\"' shape='rect' coords='0,0,\"+Math.floor(width/2)+\",\"+Math.floor(height)+\"' onmouseover='printData(\\\"\"+i+\"star\"+count+\"\\\", \"+i+\", \"+count+\", \"+point+\")' onmouseout='eraseData(\\\"\"+i+\"star\"+count+\"\\\", \"+i+\", \"+count+\")' onclick='setPermanent(\\\"\"+i+\"star\"+count+\"\\\", \"+i+\", \"+count+\", \"+num+\", \"+point+\", \\\"\"+ratid+\"\\\", \\\" \"+ratidin+\" \\\")'/>\";\n imag += \"<area id='\"+i+\"star++\"+count+\"' shape='rect' coords='\"+Math.floor(height/2)+\",0,\"+width+\",\"+height+\"' onmouseover='printData(\\\"\"+i+\"star-\"+count+\"\\\", \"+i+\", \"+count+\", \"+point+\")' onmouseout='eraseData(\\\"\"+i+\"star-\"+count+\"\\\", \"+i+\", \"+count+\")' onclick='setPermanent(\\\"\"+i+\"star-\"+count+\"\\\", \"+i+\", \"+count+\", \"+num+\", \"+point+\", \\\"\"+ratid+\"\\\", \\\" \"+ratidin+\" \\\")'/>\";\n imag += \"</map>\";\n } else {\n imag += \"<map name='\"+i+\"star\"+count+\"'>\";\n \n imag += \"<area id='\"+i+\"star+\"+count+\"' shape='rect' coords='0,0,\"+Math.floor(width)+\",\"+Math.floor(height)+\"' onmouseover='printData(\\\"\"+i+\"star\"+count+\"\\\", \"+i+\", \"+count+\", \"+point+\")' onmouseout='eraseData(\\\"\"+i+\"star\"+count+\"\\\", \"+i+\", \"+count+\")' onclick='setPermanent(\\\"\"+i+\"star\"+count+\"\\\", \"+i+\", \"+count+\", \"+num+\", \"+point+\", \\\"\"+ratid+\"\\\", \\\" \"+ratidin+\" \\\")'/>\";\n\n imag += \"</map>\";\n }\n }\n \n imag += \"</span>\";\n \n document.getElementById(idname).innerHTML = imag;\n \n return starCount;\n}", "function draw_stars(){\n if (system){\n for (let i = 0; i < system['stars'].length; i++){\n draw_star(system['stars'][i]);\n }\n }\n}", "updateStars() {\n for (var i = 0; i < numStars; i++) {\n this.rotatePoint(this.starPoints[i], starRotationSpeed, starOriginPoint);\n }\n }", "function renderStars(){\n\t// clear stars\n\tctx.fillStyle = \"#000000\";\n\tctx.fillRect(0,0,canvas.width,canvas.height);\n\t// set the new star location\n\tfor( var i = 0; i < stars.length; i++ ) {\n\t\tif (rover.landMode === true){\n\t\t\tstars[i].x += 1.5;\n\t\t} else {\n\t\t\tstars[i].x += 3;\n\t\t}\n\t\t// if star hits the bottom of the frame make it reappear at the top\n\t\tif( stars[i].x >= canvas.height ) {\n stars[i].x = 0;\n \t}\n\t}\n\t// set the new star location for big stars\n\tfor( var i2 = 0; i2 < stars_2.length; i2++ ) {\n\t\tif (rover.landMode === true){\n\t\t\tstars_2[i2].x += 1;\n\t\t} else {\n\t\t\tstars_2[i2].x += 2;\n\t\t}\n\t\t// if star hits the bottom of the frame make it reappear at the top\n\t\tif( stars_2[i2].x >= canvas.height ) {\n stars_2[i2].x = 0;\n \t}\n\t}\n\t// create stars in new location\n\tfor( var i3 = 0; i3 < stars.length; i3++ ) {\n \t\tctx.fillStyle='#ffffff';\n\t\tctx.fillRect(stars[i3].y,stars[i3].x,1,1);\n\t\t// if (lightupCount > 0){\n\t\t// \tvar realOpacity = lightupOpacity/100\n // \t\t\tctx.fillStyle='rgba(255,255,255,' + realOpacity + ')';\n\t\t// \tctx.fillRect(stars[i].y-2.5,stars[i].x -2.5,5,5);\t\n\t\t// }\n\t}\n\t// if (lightupCount >= 1){ \n\t// \tlightupCount--;\t\n\t// \tlightupOpacity -= 5;\n\t// \t//console.log(\"opacity: \" + lightupOpacity + \" count: \" + lightupCount);\n\t// } else {\n\t// \tlightupOpacity = 100;\n\t// }\n\n\t// create stars in new location for big stars\n\tfor( var i4 = 0; i4 < stars_2.length; i4++ ) {\n \t\tctx.fillStyle='#ffffff';\n\t\tctx.fillRect(stars[i4].y,stars_2[i4].x,2,2);\n\t}\n}", "function updateStars(){\n for(let star in stars){\n if(counter > 8 && counter < 15){\n stars[2].classList.add('star-colour');\n totalStars = 2;\n }\n if(counter > 16){\n stars[1].classList.add('star-colour');\n totalStars = 1;\n }\n }\n}", "render() {\n let starData = [];\n for (let i = 1; i <= 5; i++) {\n starData.push({ id: i, active: i <= this.props.stars });\n }\n\n return (\n <div className=\"rating\">\n {starData.map(star => (\n <span\n style={{ color: star.active ? \"red\" : \"grey\" }}\n onClick={clickEvent => {\n if (this.props.interactive) {\n this.props.onStarsChange(star.id);\n }\n }}\n >\n ★\n </span>\n ))}\n </div>\n );\n }", "function displayStars(star){\n star.setAttribute(\"class\", \"stars\");\n global.starsDiv.appendChild(star);\n}", "function updateStars() {\n\t{\n\t\t$(\".fa-star\").last().attr(\"class\", \"fa fa-star-o\");\n\t\tif (numStars > 0)\n\t\t{\n\t\t\tnumStars--;\n\t\t}\n\t\t$(\".numStars\").text(numStars);\n\t}\n}", "function animateStar(){\n if(stepAnimateStar == 160){\n stepAnimateStar = 0;\n }\n for (let k = 1; k <= numberofStar; k++) {\n $('#star' + k).css('width','7%');\n $('#star' + k).css({\"transform\":\"rotateY(\" + stepAnimateStar+2 + \"deg)\"})\n }\n stepAnimateStar++;\n requestAnimationFrame(animateStar);\n }", "function stars(){\n\t\n\t\t\t\t\t \tvar tl = new TimelineMax(),\n\t\t\t\t\t screenH = window.innerHeight,\n\t\t\t\t\t star = document.getElementById('star'),\n\t\t\t\t\t starAnimation = document.getElementById('starAnimation');\n\n\t\t\t\t\t\tfor (var i=0; i < 1000; i++) {\n\t\t\t\t\t\t var newStar = star.cloneNode(true);\n\t\t\t\t\t\t var xPos = Math.random()*80-40;\n\t\t\t\t\t\t var rotate = Math.random()*1440-720;\n\t\t\t\t\t\t starAnimation.appendChild(newStar);\n\t\t\t\t\t\t tl.fromTo(newStar, 0.5, \n\t\t\t\t\t\t {\n\t\t\t\t\t\t opacity:0,\n\t\t\t\t\t\t top:screenH,\n\t\t\t\t\t\t rotation:rotate,\n\t\t\t\t\t\t display:'block'\n\t\t\t\t\t\t },\n\t\t\t\t\t\t {\n\t\t\t\t\t\t opacity:.9,\n\t\t\t\t\t\t width:(Math.random()*5+3)+'%',\n\t\t\t\t\t\t top:Math.random()*100,\n\t\t\t\t\t\t ease:Power1.easeOut,\n\t\t\t\t\t\t rotation:rotate/4,\n\t\t\t\t\t\t display:'block',\n\t\t\t\t\t\t left:(50+(xPos/2))+'%'\n\t\t\t\t\t\t },i/20)\n\t\t\t\t\t\t .to(newStar, 0.5, {\n\t\t\t\t\t\t opacity:0,\n\t\t\t\t\t\t rotation:0,\n\t\t\t\t\t\t top:'80%',\n\t\t\t\t\t\t left:(50+xPos)+'%',\n\t\t\t\t\t\t ease:Power1.easeIn\n\t\t\t\t\t\t },(i/20)+.45);\n\t\t\t\t\t\t}\n\t\t\t\t\t \n}", "function paintStars(numStars) {\n\tfor(var i = 0; i < numStars; i++) {\n\t\tvar star = document.createElement(\"img\");\n\t\tstar.className = \"star\";\n\t\tstar.style.height = gaussian(4.5);\n\t\tstar.style.top = Math.random()*$(\"body\").height();\n\t\tstar.style.left = Math.random()*$(\"body\").width();\n\n\t\t$(\"body\").append(star)\n\t}\n\n\ttwinkle();\n}", "function updateStars() {\n if (moves > 10 && moves < 20) {\n starsList[4].setAttribute('class', 'fa fa-star-o');\n stars = 4;\n }\n if (moves >= 20 && moves < 30) {\n starsList[3].setAttribute('class', 'fa fa-star-o');\n stars = 3;\n }\n if (moves >= 30 && moves < 40) {\n starsList[2].setAttribute('class', 'fa fa-star-o');\n stars = 2;\n }\n if (moves >= 40) {\n starsList[1].setAttribute('class', 'fa fa-star-o');\n stars = 1;\n }\n }", "function paintStars(stars) {\n ctx.fillStyle = '#000000';\n ctx.fillRect(0, 0, canvas.width, canvas.height);\n ctx.fillStyle = '#ffffff';\n stars.forEach(function (star) {\n ctx.beginPath();\n ctx.arc(star.x, star.y, star.size, 0, 2 * Math.PI);\n ctx.stroke();\n ctx.fill();\n });\n}", "draw(state)\n {\t\n\t\tconst _context = state.context;\n\t\t_context.save();\n\t\t_context.fillStyle = \"#fff\";\n\t\tvar starNum = this.stars.length,\n\t\tzoom = state.zoom,\n\t\tx = state.zx,\n\t\ty = state.zy;\n\t\t\t\n\t\tfor(var star = 0; star < starNum; star++){\n\t\t\t_context.fillRect((this.stars[star].x - x) * zoom, (this.stars[star].y*zoom)-y, this.stars[star].size, this.stars[star].size);\n\t\t}\n\t\t_context.restore();\n }", "function showStars(num) {\n const starHtml = '<li class=\"fa fa-star\"></li>';\n stars.innerHTML = \"\";\n for (let i = 0; i < num; i++) {\n stars.innerHTML += starHtml;\n }\n }", "function resetStar() {\n\tfor(star of allStars) {\n\t\tstar.style.display = 'inline';\n\t}\n}", "function initStars() {\n\tfor (let i = 0; i < 3; i++) {\n\t\t$('#stars1').append('<li><i class=\"fa fa-star\" id=\"star1\"></i></li>');\n\t\t$('#stars2').append('<li><i class=\"fa fa-star\" id=\"star2\"></i></li>');\n\t}\n}", "function draw_star(star){\n // optionally draw highlight\n if (star['highlighted']){\n // draw orbital path with grayish color\n ctx.fillStyle = 'white';\n ctx.beginPath();\n ctx.arc(star['x'], star['y'], HIGHLIGHT_RADIUS_STAR*radius_of_star(star) * zoom, 0, 2*Math.PI);\n ctx.fill();\n ctx.closePath();\n\n ctx.strokeStyle = 'white';\n ctx.beginPath();\n ctx.moveTo(star['x'], star['y']);\n ctx.lineTo(star['x'], c.height/2);\n ctx.stroke();\n ctx.lineTo(c.width, c.height/2);\n ctx.stroke();\n ctx.closePath();\n }\n\n // draw the planet\n let rad = radius_of_star(star)*zoom;\n // load image for different types\n if (star['type'] === 'Red Dwarf'){\n ctx.drawImage(img_star_redd, star['x'] - rad, star['y'] - rad, 2*rad, 2*rad);\n } else if (star['type'] === 'Brown Dwarf'){\n ctx.drawImage(img_star_brownd, star['x'] - rad, star['y'] - rad, 2*rad, 2*rad);\n } else if (star['type'] === 'Neutron'){\n ctx.drawImage(img_star_neutron, star['x'] - rad, star['y'] - rad, 2*rad, 2*rad);\n } else if (star['colors'][0] === 'red'){\n ctx.drawImage(img_star_redg, star['x'] - rad, star['y'] - rad, 2*rad, 2*rad);\n } else if (star['colors'][0] === 'blue'){\n ctx.drawImage(img_star_blueg, star['x'] - rad, star['y'] - rad, 2*rad, 2*rad);\n } else if (star['colors'][0] === 'yellow'){\n ctx.drawImage(img_star_yellow, star['x'] - rad, star['y'] - rad, 2*rad, 2*rad);\n }\n}", "function draw()\r\n{\r\n\tc.fillStyle = \"black\";\r\n c.fillRect(0,0,canvas.width,canvas.height);\r\n\t for(var i= 0; i<numStars;i++)\r\n {\r\n\tstars[i].show();\r\n\tstars[i].move();\r\n\t\r\n\t\r\n }\r\n}", "function drawStar(){\n\t// for each branch, scale .15 and rotate 72 degrees\n\tfor ( var i = 0; i < 5; i++ ){\n\t\tlet r = 72.0 * i;\n\t\tlet scale = 0.15;\n\t\tgl.uniform1f( gl.getUniformLocation(program, \"brAngle\"), r );\n\t\tgl.uniform1f( gl.getUniformLocation(program, \"scl\"), scale );\n\t\tdrawBranch();\n\t}\n}", "function setStars(dat, height, width, rating, idname) {\n\n var imag = \"<span>\";\n \n for(var i = 1; i<=dat; i++) {\n \n if(rating > 0.5) {\n imag += \"<img src='https://dl.dropboxusercontent.com/u/77110529/ratingSystem/fullStar.png' width=\"+width+\" height=\"+height+\" alt='plain' />\";\n rating--;\n } else {\n if(rating > 0) {\n imag += \"<img src='https://dl.dropboxusercontent.com/u/77110529/ratingSystem/halfStar.png' width=\"+width+\" height=\"+height+\" alt='plain' />\";\n rating--;\n } else {\n imag += \"<img src='https://dl.dropboxusercontent.com/u/77110529/ratingSystem/plainStar.png' width=\"+width+\" height=\"+height+\" alt='plain' />\";\n }\n }\n }\n \n imag += \"</span>\";\n \n $(\"#\"+idname).prepend(imag);\n}", "ratingDisplay() {\n let myRating = document.getElementById(\"rating\");\n for(let i = 0; i < this.state.data.rating; i++) {\n let star = document.createElement(\"SPAN\");\n star.setAttribute(\"class\", \"glyphicon glyphicon-star\");\n myRating.appendChild(star);\n }\n\n for(let i = this.state.data.rating; i < 5; i++) {\n //let myRating = document.getElementById(\"rating\");\n let star = document.createElement(\"SPAN\");\n star.setAttribute(\"class\", \"glyphicon glyphicon-star-empty\");\n myRating.appendChild(star);\n }\n }", "function drawStars() {\r\n ctx.clearRect(0, 0, winWidth, winHeight);\r\n for(i=0; i<starCnt; i++) {\r\n ctx.beginPath();\r\n ctx.arc(stars[i].x, stars[i].y, stars[i].r, 0 ,360);\r\n ctx.fillStyle = \"hsla(\"+ stars[i].h + \",\" + stars[i].s + \"%,\" + stars[i].l + \"%,\" + stars[i].a +\")\";\r\n ctx.fill();\r\n ctx.closePath();\r\n }\r\n}", "function initStars() {\n stars = 3;\n $('.stars i').removeClass(\"fa-star-o\");\n $('.stars i').addClass(\"fa-star\");\n updateStars();\n}", "function starFillContent(starRating) {\n var content = \"\";\n var starIndex;\n for (starIndex = 0; starIndex < starRating; starIndex++) {\n content += `<span class=\"fa fa-star fa-lg\"></span>`;\n }\n while (starIndex < 5) {\n content += `<span class=\"fa fa-star-o fa-lg\"></span>`;\n starIndex += 1;\n }\n return content;\n}", "function buildStars() {\r\n stars = [];\r\n for(i=0; i<starCnt; i++) {\r\n stars.push(\r\n {\r\n x: Math.random() * winWidth,\r\n y: Math.random() * winHeight,\r\n r: 0.4 + (Math.random()*1.5),\r\n h: 195 + (Math.random()*90),\r\n s: Math.random() * 100,\r\n l: 70,\r\n a: 0.4 + (Math.random()-0.25)\r\n }\r\n );\r\n }\r\n\r\n // Draw static star field\r\n drawStars();\r\n}", "function drawloop() {\n if (secondflag) {\n //allows the speed of the stars to increase depending on the y co-ordinates of the mouse pointer\n speed = map(mouseY, 0, width, 0, 50);\n background(0);\n translate(width / 2, height / 2);\n //for loop that is dependant on the length of the stars array, and runs in order to move the stars and show them on the screen\n for (var j = 0; j < stars.length; j++) {\n stars[j].update();\n stars[j].show();\n }\n }\n }", "function fillStars() {\n\n $(\".listings\").each(function() {\n var star = $(this).children().children().children();\n var ratingSum = $(this).children().eq(5).text();\n var ratingCount = $(this).children().eq(6).text();\n if (ratingCount == 0) {\n var rating = 0;\n } else {\n var rating = (ratingSum/ratingCount).toFixed(1); \n }\n $(this).children().eq(1).children().text(ratingCount + \" ratings\");\n $(this).children().children(\".avgRating\").text(rating);\n\n if (roundHalf(rating) == 0) {\n $(star).attr(\"src\",\"images/empty_star.png\");\n } \n else {\n $(star[Math.ceil(roundHalf(rating))-1]).prevAll().attr(\"src\",\"images/full_star.png\");\n $(star[Math.ceil(roundHalf(rating))-1]).nextAll().attr(\"src\",\"images/empty_star.png\");\n \n if (roundHalf(rating) - Math.ceil(roundHalf(rating)) == 0) \n {\n $(star[Math.ceil(roundHalf(rating))-1]).attr(\"src\",\"images/full_star.png\");\n } \n else \n {\n $(star[Math.ceil(roundHalf(rating))-1]).attr(\"src\",\"images/half_star.png\");\n }\n\n }\n\n });\n\n }", "function setStars() {\n let starList = $stars;\n\n // determine whether stars need to be added or reset\n if (starList.childNodes.length == 0) {\n\n // add the stars to the board\n for(let i=0; i<stars; i++) {\n let starItem = document.createElement('li');\n starItem.innerHTML = '<i class=\"fa fa-star\"></i>';\n starList.appendChild(starItem);\n }\n } else {\n // reset stars that alredy exist\n for(let i=0;i<stars; i++){\n starList.childNodes[i].innerHTML = '<i class=\"fa fa-star\"></i>';\n }\n }\n}", "function displayStars(numFullStars, numHalfStars) {\n var numTotalStars = 5;\n var elementId;\n // add the fa-star, fa-star-half-o, or fa-star-o class OR neutral-color for no reviews yet\n if ((numFullStars == 0) && (numHalfStars == 0)) {\n console.log(\"displayStars(): no reviews yet\");\n return;\n }\n // Replace empty star with full star and add color\n var i;\n for (i = 1; i <= numFullStars; i++) {\n elementId = \"#star-\" + i; \n $(elementId).removeClass(\"fa-star-o\");\n $(elementId).addClass(\"fa-star\");\n $(elementId).addClass(\"star-color\");\n }\n // Replace empty star with half star and add color\n var j = numFullStars + 1;\n numHalfMax = numFullStars + numHalfStars;\n if (numHalfMax > numTotalStars) {\n return false;\n }\n for (j; j <= numHalfMax; j++) {\n elementId = \"#star-\" + j; \n $(elementId).removeClass(\"fa\");\n $(elementId).removeClass(\"fa-star-o\");\n $(elementId).addClass(\"fas\");\n $(elementId).addClass(\"fa-star-half-alt\");\n $(elementId).attr(\"aria-hidden\",\"true\"),\n $(elementId).addClass(\"star-color\");\n }\n // Add color to remaining stars\n var m = numHalfMax + 1;\n while (m <= numTotalStars) { \n elementId = \"#star-\" + m; \n $(elementId).addClass(\"star-color\");\n m = m + 1;\n }\n console.log(\"displayStars(\" + numFullStars + \", \" + numHalfStars + \")\");\n}", "function Stars(props) {\n\n\t// Declare vars\n\tlet stars = [];\n\tlet fullCounter = 0;\n\tlet halfCounter = 0;\n\n\t// Separate whole number for full star\n\tlet integerTemp = props.rating.toString().substring(0, 1);\n\tlet integerHolder = Number(integerTemp);\n\n\t// Separate decimal for half star\n\tlet decimalTemp = props.rating.toString().substring(2, 3);\n\tlet decimalHolder = Number(decimalTemp);\n\n\t// Run 'for' loop 5 times\n\tfor (let x = 0; x < 5; x++) {\n\t\t// Run to check for full stars\n\t\tif (fullCounter < integerHolder && halfCounter === 0) {\n\t\t\t// Add full star\n\t\t\tstars.push(<i className='fas fa-star star' key={x}></i>);\n\t\t\tfullCounter ++;\n\t\t// Run to check for half star\n\t\t} else if (fullCounter >= integerHolder && halfCounter < 1) {\n\t\t\t// Add half star\n\t\t\tif (decimalHolder >= 3) {\n\t\t\t\tstars.push(<i className='fas fa-star-half-alt star' key={x}></i>);\n\t\t\t\thalfCounter ++;\n\t\t\t// Add empty star\n\t\t\t} else {\n\t\t\t\tstars.push(<i className='far fa-star star' key={x}></i>);\n\t\t\t\thalfCounter ++;\n\t\t\t}\n\t\t// Add empty star\n\t\t} else {\n\t\t\tstars.push(<i className='far fa-star star' key={x}></i>);\n\t\t}\n\t}\n\n\n\t// ===============================\n\t// RETURN STARS\n\t// ===============================\t\n\treturn (\n\t\t\t<div className=\"starRow\">\n\t\t\t\t{stars}\n\t\t\t</div>\n\t);\n}", "buildStarIcons(){\n let starIconsDiv = [];\n for (let i = 1; i <= 5; i++) {\n starIconsDiv.push(\n <span className= \"fa fa-star empty-star star-modal\" id={'star-icon' + i} onClick = {()=> {\n this.setState({overallRating: i });\n this.updateStarIcon(i);\n }}></span>\n )\n }\n\n\n this.setState({starIcons: <div><div id ='star-div-modal'>{starIconsDiv}</div><span id='text-explanation'></span></div>})\n\n }", "function setStars(numStars){\n let count = 0;\n let indexRating = global.ratingPara.indexOf(\":\") + 2;\n let ratingNum = parseFloat(global.ratingPara.slice(indexRating));\n\n for (let i=0; i < numStars; i++){\n let star = document.createElement(\"span\");\n\n // sets constants representing the minimum and maximum ratings\n const FIVE_STARS = 5;\n const ZERO_STARS = 0;\n\n if(ratingNum == FIVE_STARS){\n star.textContent = \"\\u2605\";\n }\n else if (ratingNum == ZERO_STARS){\n star.textContent = \"\\u2606\";\n }\n else{\n // ensures that ratings with decimals do not count as an extra star. Ex: Rating 2.9 --> 2 stars.\n let difference = ratingNum - count;\n if (count <= ratingNum && difference >= 1){\n star.textContent = \"\\u2605\";\n count++;\n }\n else{\n star.textContent = \"\\u2606\";\n }\n }\n displayStars(star);\n }\n}", "function make_stars() {\n var i, vb;\n vb = SVG.viewBox.baseVal;\n while (STARS.firstChild) {\n STARS.removeChild(STARS.firstChild);\n }\n for (i = 0; i < N_STARS; i += 1) {\n make_star(vb, STARS);\n }\n }", "function update() {\n\n\tcontext2D.clearRect( 0, 0, context2D.canvas.width, context2D.canvas.height ) // Clear canvas\n\n\t/** This const \"stars\" gives us easy access to the population of stars inside cradleOfStars */\n\tconst stars = cradleOfStars.stars\n\n\tfor ( const starID in stars ) {\n\n\t\t/** This const \"currentStar\" gives us easy access to unique starID inside cradleOfStars */\n\t\tconst currentStar = stars[starID]\n\n\t\tconst currentTimeToFall = currentStar.timeToFall\n\n\t\tif ( currentTimeToFall >= 0 ) {\n\n\t\t\tcurrentStar.timeToFall = currentTimeToFall - 1\n\n\t\t}\n\n\t\telse {\n\n\t\t\t/**\n\t\t\t *\n\t\t\t * Here is the rebirth of stars; here we treat what happens whenever each star falls out of the canvas.\n\t\t\t *\n\t\t\t */\n\t\t\tif ( currentStar.x <= 0 || currentStar.x >= context2D.canvas.width || currentStar.y >= context2D.canvas.height ) {\n\n\n\t\t\t\tcurrentStar.x = getRandomIntNumber( 2, context2D.canvas.width )\n\t\t\t\tcurrentStar.y = getRandomIntNumber( 3, 325 )\n\t\t\t\tcurrentStar.color = COLOR_PALLETE[getRandomIntNumber( 0, COLOR_PALLETE.length - 1 )]\n\t\t\t\tcurrentStar.timeToFall = getRandomIntNumber( 0, MAX_TIME_TO_FALL ) // See wait = http://bit.ly/2TXHvjy\n\t\t\t\tcurrentStar.velocityToFall = getRandomIntNumber( 4, 5 )\t// Changes the Y axis\n\t\t\t\tcurrentStar.angleToFall = getRandomIntNumber( -9, 9 ) \t// Changes the X axis\n\n\t\t\t\t/**\n\t\t\t\t *\n\t\t\t\t * If a star didn't reach its max diameter yet, it's incremented; and if it\n\t\t\t\t * reaches its max diameter, then is is randomically redefined.\n\t\t\t\t *\n\t\t\t\t */\n\t\t\t\tif (currentStar.diameter <= 1.25) { currentStar.diameter = currentStar.diameter + 0.05 }\n\t\t\t\telse { currentStar.diameter = Math.random() }\n\n\t\t\t}\n\n\t\t\tconst currentVelocityToFall\t= currentStar.velocityToFall\n\t\t\tconst currentAngleToFall = currentStar.angleToFall\n\n\t\t\tconst currentPositionX = currentStar.x\n\t\t\tconst currentPositionY = currentStar.y\n\n\t\t\tcurrentStar.x = currentPositionX + 1 * currentAngleToFall\n\t\t\tcurrentStar.y = currentPositionY + currentVelocityToFall\n\n\t\t}\n\t}\n\n\tdrawSky()\n\tdrawStars()\n\tdrawCity()\n\n}", "function returnStars() {\n\t$(\".stars\").append(star1,star2,star3);\n}", "function rating () {\n if (moves < maxStars) {\n ratingStar = \"<i class= 'star fas fa-star'></i><i class= 'star fas fa-star'></i><i class='star fas fa-star'></i>\";\n } else if (moves < minStars) {\n stars[2].style.color = \"#444\";\n ratingStar = \"<i class='star fas fa-star'></i><i class= 'star fas fa-star'></i>\";\n } else {\n stars[1].style.color = \"#444\";\n ratingStar = \"<i class='star fas fa-star'></i>\";\n }\n}", "function generateStar(starsLost) {\n for (let i = 0; i < starsLost; i++) {\n const starSymbol = document.createElement('li');\n starSymbol.innerHTML = '<i class=\"fa fa-star\"></i>';\n stars.appendChild(starSymbol);\n }\n}", "function StarManager(windowSize) {\r\n\r\n this.stars = new Array();\r\n this.windowSize = windowSize;\r\n this.starDensity = 0.0002;\r\n\r\n\r\n //Create a new set of stars\r\n this.createStars = function() {\r\n this.stars = new Array();\r\n var starCount = this.windowSize.x * this.windowSize.y * this.starDensity;\r\n\r\n if(starCount < 50) starCount = 50;\r\n\r\n for (var i = 0; i < starCount; i++) {\r\n this.stars.push(new Star(new Vector(Math.random()*this.windowSize.x, Math.random()*this.windowSize.y), new Vector(0.09, 0.07), this.windowSize));\r\n }\r\n\r\n }\r\n\r\n\r\n //Draw stars\r\n this.draw = function (ctx) {\r\n for (var i = 0; i < this.stars.length; i++) {\r\n this.stars[i].draw(ctx);\r\n }\r\n }\r\n\r\n //Update stars\r\n this.update = function (time, newWindowSize) {\r\n\r\n if(this.windowSize.x != newWindowSize.x || this.windowSize.y != newWindowSize.y){\r\n this.windowSize = newWindowSize;\r\n this.createStars();\r\n }\r\n\r\n\t\tthis.windowSize = newWindowSize;\r\n for (var i = 0; i < this.stars.length; i++) {\r\n this.stars[i].update(time, newWindowSize);\r\n }\r\n }\r\n\r\n //Create new star on edge of screen\r\n this.createNewStar = function () {\r\n\r\n var sides = [\"top\", \"bottom\", \"left\", \"right\"];\r\n var side = sides[Math.floor(Math.random() * sides.length)];\r\n var position;\r\n if (side == \"top\")\r\n position = new Vector(Math.random() * this.windowSize.x, 0); \r\n else if (side == \"bottom\")\r\n position = new Vector(Math.random() * this.windowSize.x, this.windowSize.y);\r\n else if (side == \"left\")\r\n position = new Vector(0, Math.random()*this.windowSize.y);\r\n else if (side == \"right\")\r\n position = new Vector(this.windowSize.x, Math.random() * this.windowSize.y);\r\n\r\n this.stars.push(new Star(position, new Vector(0.09, 0.07), this.windowSize));\r\n }\r\n\r\n //Set velocity of all stars\r\n this.setVelocity = function(v) {\r\n for (var i = 0; i < this.stars.length; i++) {\r\n this.stars[i].velocity = v;\r\n }\r\n }\r\n\r\n //Set approach speed of all stars\r\n this.setApproachSpeed = function (s) {\r\n for (var i = 0; i < this.stars.length; i++) {\r\n this.stars[i].approachSpeed = s;\r\n }\r\n }\r\n\r\n //Set approach speed of all stars\r\n this.setShake = function (s) {\r\n for (var i = 0; i < this.stars.length; i++) {\r\n this.stars[i].setShake(s);\r\n }\r\n }\r\n\r\n //Set approach speed of all stars\r\n this.setColorMode = function (c) {\r\n for (var i = 0; i < this.stars.length; i++) {\r\n this.stars[i].colorMode = c;\r\n }\r\n }\r\n\r\n\r\n\r\n this.createStars();\r\n}", "function updateStar() {\n\tlet starCount = 0;\n\tfor(star of allStars) {\n\t\tif(star.hidden === false) {\n\t\t\tstarCount++;\n\t\t}\n\t}\n\treturn starCount;\n}", "function drawStars() {\r\n if (!endGame) {\r\n ctx.fillStyle = \"#000\";\r\n ctx.fillRect(0, 0, cnvsWidth, cnvsHeight);\r\n } else {\r\n // Creates trail and spins canvas on end game screens\r\n ctx.fillStyle = \"rgba(0, 0, 0, 0.2)\";\r\n ctx.fillRect(-1000, -1000, canvas.width + 3000, canvas.height + 3000);\r\n ctx.translate(centreOfX, centreOfY);\r\n ctx.rotate(Math.PI * -0.0009);\r\n ctx.translate(-centreOfX, -centreOfY);\r\n }\r\n\r\n // Calls methods on Star objects array each frame\r\n for (var i = 0; i < numberOfStars; i++) {\r\n starsArray[i].showStar(); // Updates the z value\r\n starsArray[i].moveStar(); // Paints new object\r\n }\r\n}", "function drawStars() {\n if (!endGame) {\n ctx.fillStyle = \"#000\";\n ctx.fillRect(0, 0, cnvsWidth, cnvsHeight);\n } else {\n // Creates trail and spins canvas on end game screens\n ctx.fillStyle = \"rgba(0, 0, 0, 0.2)\";\n ctx.fillRect(-1000, -1000, canvas.width + 3000, canvas.height + 3000);\n ctx.translate(centreOfX, centreOfY);\n ctx.rotate(Math.PI * -0.0009);\n ctx.translate(-centreOfX, -centreOfY);\n }\n\n // Calls methods on Star objects array each frame\n for (var i = 0; i < numberOfStars; i++) {\n starsArray[i].showStar(); // Updates the z value\n starsArray[i].moveStar(); // Paints new object\n }\n}", "stars(lib) {\n for (let i=0; i<100; i++){\n var star = this.madeStars[i];\n lib.penColor(\"white\");\n lib.moveTo(star.x,star.y);\n lib.dot(star.size);\n star.x += .25;\n if (star.x > this.lib.width + 5) {\n star.x = -5;\n star.y = Math.random()*lib.height;\n star.size = Math.random()*3;\n }\n }\n this.smolMoons(lib);\n }", "Render() {\n gdi.HollowBrush();\n gdi.PurplePen();\n\n for ( let spt = 0; spt < this.m_Spots.length; ++spt ) {\n gdi.Circle( this.m_Spots[ spt ].m_vPos, this.m_Spots[ spt ].m_dScore );\n }\n\n if ( this.m_pBestSupportingSpot != null ) {\n gdi.GreenPen();\n gdi.Circle( this.m_pBestSupportingSpot.m_vPos, this.m_pBestSupportingSpot.m_dScore );\n };\n }", "function printStars() {\n document.querySelectorAll('.stars').forEach(panel => panel.innerHTML = showStar[numStars-1])\n}", "function renderBlankStar(into) {\n\t\t\t\n\t\t\tinto.innerHTML += `<li data-id=${dataId} class=\"star\" />`\n\t\t\t\n\t\t}", "function makeStars() {\n let num_stars = 50 // number of stars\n for (let i=0; i<num_stars; i++) {\n let start_position_x = width/2 // currently the center of the screen\n let start_position_y = height // currently the bottom of the screen\n let random_star = { x: start_position_x,\n y: start_position_y,\n vx: random(-3, 3), // left and right\n vy: random(-2, -8), // negative vy makes it go up\n points: random([7, 9, 11, 13]), // how many star points?\n size: random(10, 50), // how big? 15\n vsize: 1, // animate size\n color: [random(255), random(255), random(255)]\n }\n stars.push(random_star)\n }\n}", "function mapStars()\n{\n //Generate random stars and save their locations in a JSON array:\n for (iterator = 0; iterator < NumberOfStars; iterator++)\n {\n var x = getRandomInt(canvas.width);\n var y = getRandomInt(canvas.height);\n starMatrix.push(x);\n starMatrix.push(y);\n }\n}", "function setStars() {\r\nlet starsDOM = document.querySelector('.stars');\r\n if (moveCounter == 0) {\r\n starsDOM.innerHTML = `<li><i class=\"fa fa-star\"></i></li>\r\n <li><i class=\"fa fa-star\"></i></li>\r\n <li><i class=\"fa fa-star\"></i></li>`;\r\n starCounter = 3;\r\n } else if (moveCounter == 14) {\r\n starsDOM.innerHTML = `<li><i class=\"fa fa-star\"></i></li>\r\n <li><i class=\"fa fa-star\"></i></li>`;\r\n starCounter = 2;\r\n } else if (moveCounter == 22) {\r\n starsDOM.innerHTML = `<li><i class=\"fa fa-star\"></i></li>`;\r\n starCounter = 1;\r\n } else if (moveCounter == 30) {\r\n starsDOM.innerHTML = ``;\r\n starCounter = 0;\r\n }\r\n}", "function addStars(noOfStars){\n let strHTML ='';\n for(let i=1; i<=noOfStars; i++)\n {\n strHTML += `<li><i class=\"fa fa-star\"></i></li>`;\n }\n stars.innerHTML = strHTML;\n }", "function displayStars(count) {\n let starNodes = [...document.querySelectorAll('.fa-star')];\n if (starNodes.length === 3) {\n if (count === 3) {\n starNodes[0].style.visibility = \"\";\n starNodes[1].style.visibility = \"\";\n starNodes[2].style.visibility = \"\";\n } else if (count === 2) {\n starNodes[0].style.visibility = \"\";\n starNodes[1].style.visibility = \"\";\n starNodes[2].style.visibility = \"hidden\";\n } else if (count === 1) {\n starNodes[0].style.visibility = \"\";\n starNodes[1].style.visibility = \"hidden\";\n starNodes[2].style.visibility = \"hidden\";\n } else if (count === 0) {\n starNodes[0].style.visibility = \"hidden\";\n starNodes[1].style.visibility = \"hidden\";\n starNodes[2].style.visibility = \"hidden\";\n }\n }\n }", "function draw_starfield() {\n \tif ( defaultFalse( currentPart.starfield ) ) SDStarfield.draw();\t// That was easy!\n }", "function updateStars(){\n if (incorrectGuesses === 10) {\n $('#star-10').attr('src','images/black-star.png');\n startingStars -= 1;\n }\n else if (incorrectGuesses === 20) {\n $('#star-20').attr('src','images/black-star.png');\n startingStars -= 1;\n }\n else if (incorrectGuesses === 30) {\n $('#star-30').attr('src','images/black-star.png');\n startingStars -= 1;\n }\n}", "function updateStars(starsArray, rating) {\n let invisible = starsArray.slice(rating);\n let visible = starsArray.slice(0, rating);\n invisible.forEach(star => star.style.visibility = \"hidden\");\n visible.forEach(star => star.style.visibility = \"visible\");\n}", "function outputStars(newRating) {\n\tlet intRating = parseInt(newRating)\n\t\n\t$('#rating-stars i').each(function(i) {\n\t\tlet $this = $(this)\n\t\t$this.removeClass('user-rating')\n\t\tif (i < intRating) {\n\t\t\t$this.removeClass('far').addClass('fas')\n\t\t} else {\n\t\t\t$this.removeClass('fas').addClass('far')\n\t\t}\n\t})\n}", "function resetStars() {\n countStars = 3;\n for (star of stars) {\n star.style.display = 'inline';\n }\n}", "function fillstars(x)\t{\r\n\ty=x*1+1\r\n\r\n\tswitch(x)\t{\r\n\t\t\r\n\t\tcase \"1\": document.getElementById('zRatingIcon_'+x).src= star2.src;\r\n\t\tbreak;\r\n\r\n\t\tcase \"2\":for (i=1;i<y;i++)\t{\r\n\t\t\tdocument.getElementById('zRatingIcon_'+i).src= star2.src;\r\n\t\t\t}\r\n\t\tbreak;\r\n\r\n\t\tcase \"3\":for (i=1;i<y;i++)\t{\r\n\t\t\tdocument.getElementById('zRatingIcon_'+i).src= star2.src;\r\n\t\t\t}\r\n\t\tbreak;\r\n\t\t\r\n\t\tcase \"4\":for (i=1;i<y;i++)\t{\r\n\t\t\tdocument.getElementById('zRatingIcon_'+i).src= star2.src;\r\n\t\t\t}\r\n\t\tbreak;\r\n\t\t\r\n\t\tcase \"5\":for (i=1;i<y;i++)\t{\r\n\t\t\tdocument.getElementById('zRatingIcon_'+i).src= star2.src;\r\n\t\t\t}\r\n\t\tbreak;\r\n\t\t\r\n\t\t}\r\n\t\r\n\t}", "function drawStar(index, agePct) {\n // Goes from 0 to 1 to 0, smoothly\n let fade = Math.sin(agePct * Math.PI)\n\n\n // Draw the center\n p.noStroke()\n\n // Flicker 10 times per lifespan\n let blink = .6 + .3 * Math.sin(agePct * Math.PI * 20)\n p.fill(0, 100, 100, fade * blink)\n p.circle(0, 0, 5)\n\n p.fill((index * 20) % 360, 100, 80, fade * blink * .1)\n p.circle(0, 0, 25 * blink)\n\n p.fill(0, 100, 100, fade * .8)\n p.beginShape()\n let starPts = 10\n\n for (var i = 0; i < starPts; i++) {\n let theta = Math.PI * 2 * i / starPts\n // Use noise to ascillate the length of the star's \"arms\"\n // for a twinkling effect\n let r = fade * 20 * (i % 2 + .2) * p.noise(i + index, 10 * agePct)\n p.vertex(r * Math.cos(theta), r * Math.sin(theta))\n }\n p.endShape()\n }", "shatter() {\n this.radius -=3\n\n for (let i = 0; i< 8; i++) {\n miniStars.push(new miniStar(this.x, this.y, 2))\n }\n }", "function resetStarsDisplay() {\n let stars = document.getElementsByClassName(\"stars\")[0];\n starsCounter = stars.getElementsByTagName(\"li\").length;\n stars.innerHTML = \"\";\n for(let s=0; s<starsCounter; ++s){\n let listElement = document.createElement(\"li\");\n let starElement = document.createElement(\"i\");\n starElement.classList.add(\"fa\");\n starElement.classList.add(\"fa-star\");\n listElement.appendChild(starElement);\n stars.appendChild(listElement);\n }\n}", "function loadStars(n){\n var stars = \"\";\n for(var i=0; i<n; i++){\n stars += \"<span class=\\\"oi oi-star\\\"></span>\";\n }\n return stars;\n}", "function resetStars() {\n\tstars = 0;\n\tconst starList = document.querySelectorAll('.stars li');\n\tfor (star of starList) {\n\t star.style.display = 'inline';\t\n\t}\n}", "createStars(space){\n for(var x = 100; x < space.starFieldWidth; x+= 150 )\n for(var y = 100; y < space.starFieldHeight; y += 150)\n space.stars.push(new Star(x, y));\n }", "render(){\n ctx.drawImage(Resources.get(this.sprite), this.x, this.y);\n ctx.font = '16px arial';// Style score text font\n ctx.strokeStyle = 'red';// Style score text color\n ctx.strokeText('+'+this.score, this.x+35, this.y+110);// Draw The score text inside the star\n\n }", "function initalRating(){\n for (let i=0; i<3; i++){\n $(\".stars\").append(`<li><i class=\"fa fa-star\"></i></li>`);\n }\n}", "showStar() {\r\n // Algorythm creates movement when called each frame\r\n let xPos = (this.x - centreOfX) * (cnvsLength / this.z);\r\n let yPos = (this.y - centreOfY) * (cnvsLength / this.z);\r\n // Relocates zero to centre of screen and ensures objects move away from this centre including object positions decreasing in value\r\n xPos = xPos + centreOfX;\r\n yPos = yPos + centreOfY;\r\n // Changes size of the Star object in relation to the centre of canvas and Z value, size is smallest when in the centre\r\n let s = size * (cnvsLength / this.z);\r\n // Renders circular star shapes, changing colour as points increase\r\n ctx.beginPath();\r\n if (score <= 1000) {\r\n ctx.fillStyle = \"#82caff\";\r\n } else if (score <= 2100) {\r\n ctx.fillStyle = \"#00FA9A\";\r\n } else if (score <= 3200) {\r\n ctx.fillStyle = \"#306eff\";\r\n } else if (score <= 4000) {\r\n ctx.fillStyle = \"#7609c4\";\r\n } else if (score <= 4300) {\r\n ctx.fillStyle = \"#6900b4\";\r\n } else if (score <= 5400) {\r\n ctx.fillStyle = \"#1b1bd6\";\r\n } else if (score <= 5950) {\r\n ctx.fillStyle = \"#7f00d4\";\r\n } else if (score <= 6500) {\r\n ctx.fillStyle = \"#132aff\";\r\n } else if (score <= 7000) {\r\n ctx.fillStyle = \"#00708b\";\r\n } else if (score <= 7500) {\r\n ctx.fillStyle = \"#386323\";\r\n } else if (score <= 8150) {\r\n ctx.fillStyle = \"#5d794f\";\r\n } else if (score <= 8700) {\r\n ctx.fillStyle = \"#4cc437\";\r\n } else if (score <= 9200) {\r\n ctx.fillStyle = \"#838383\";\r\n } else if (score <= 10000) {\r\n ctx.fillStyle = \"#704cf0\";\r\n }\r\n ctx.arc(xPos, yPos, s, 0, Math.PI * 2);\r\n ctx.fill();\r\n }", "function starChange(star){\n\tstarNumber = star;\n\tvar starButtons = document.getElementsByClassName(\"stars\");\n\t\n\tfor (var i = 0; i < starNumber ; i++){\n\t\tstarButtons[i].style.backgroundImage = \"url('../CAB230-Project/images/starfull.png')\";\n\t\tif (starNumber == 1){\n\t\t\tstarratingValue.innerHTML = \"ANY RATING\";\n\t\t\tstarValue.value = 0;\n\t\t\tstarButtons[i].style.backgroundImage = \"url('../CAB230-Project/images/starempty.png')\";\n\t\t}\n\t\t\n\t\telse if(starNumber == 5)\n\t\t{\n\t\t\tstarratingValue.innerHTML = (starNumber) + \" STARS\";\n\t\t\tstarValue.value = 5;\n\t\t}\n\t\t\n\t\telse{\n\t\t\tstarratingValue.innerHTML = (starNumber) + \"+ STARS\";\n\t\t\tstarValue.value = starNumber;\n\t\t}\n\t}\n\tfor (var j = starNumber; j < 5; j++){\n\t\tstarButtons[j].style.backgroundImage = \"url('../CAB230-Project/images/starempty.png')\";\n\t}\t\n}", "function starRating() {\n if (moves > 13 && moves < 16) {\n starCounter = 3;\n } else if (moves > 17 && moves < 27) {\n starCounter = 2;\n } else if (moves > 28) {\n starCounter = 1;\n }\n showStars(starCounter);\n }", "function resetStars() {\n\tstars = 0;\n\tconst starList = document.querySelectorAll('.stars li');\n\tfor (star of starList) {\n\t\tstar.style.display = 'inline';\n\t}\n}", "function fillStarsTill(starNo){\n\tclearAllStars();\n\t\n\tif(starNo == 1){\n\t\tdocument.getElementById(\"1\").className = \"glyphicon glyphicon-star\";\n\t\tdocument.getElementById(\"1\").style.color = \"yellow\";\n\t\t\n\t\tdocument.getElementById(\"starRating\").value = \"1\";\n\t}\n\t\n\tif(starNo == 2){\n\t\tdocument.getElementById(\"1\").className = \"glyphicon glyphicon-star\";\n\t\tdocument.getElementById(\"1\").style.color = \"yellow\";\n\t\t\n\t\tdocument.getElementById(\"2\").className = \"glyphicon glyphicon-star\";\n\t\tdocument.getElementById(\"2\").style.color = \"yellow\";\n\t\t\n\t\tdocument.getElementById(\"starRating\").value = \"2\";\n\t}\n\t\n\tif(starNo == 3){\n\t\tdocument.getElementById(\"1\").className = \"glyphicon glyphicon-star\";\n\t\tdocument.getElementById(\"1\").style.color = \"yellow\";\n\t\t\n\t\tdocument.getElementById(\"2\").className = \"glyphicon glyphicon-star\";\n\t\tdocument.getElementById(\"2\").style.color = \"yellow\";\n\t\t\n\t\tdocument.getElementById(\"3\").className = \"glyphicon glyphicon-star\";\n\t\tdocument.getElementById(\"3\").style.color = \"yellow\";\n\t\t\n\t\tdocument.getElementById(\"starRating\").value = \"3\";\n\t}\n\t\n\tif(starNo == 4){\n\t\tdocument.getElementById(\"1\").className = \"glyphicon glyphicon-star\";\n\t\tdocument.getElementById(\"1\").style.color = \"yellow\";\n\t\t\n\t\tdocument.getElementById(\"2\").className = \"glyphicon glyphicon-star\";\n\t\tdocument.getElementById(\"2\").style.color = \"yellow\";\n\t\t\n\t\tdocument.getElementById(\"3\").className = \"glyphicon glyphicon-star\";\n\t\tdocument.getElementById(\"3\").style.color = \"yellow\";\n\t\t\n\t\tdocument.getElementById(\"4\").className = \"glyphicon glyphicon-star\";\n\t\tdocument.getElementById(\"4\").style.color = \"yellow\";\n\t\t\n\t\tdocument.getElementById(\"starRating\").value = \"4\";\n\t}\n\t\n\tif(starNo == 5){\n\t\tdocument.getElementById(\"1\").className = \"glyphicon glyphicon-star\";\n\t\tdocument.getElementById(\"1\").style.color = \"yellow\";\n\t\t\n\t\tdocument.getElementById(\"2\").className = \"glyphicon glyphicon-star\";\n\t\tdocument.getElementById(\"2\").style.color = \"yellow\";\n\t\t\n\t\tdocument.getElementById(\"3\").className = \"glyphicon glyphicon-star\";\n\t\tdocument.getElementById(\"3\").style.color = \"yellow\";\n\t\t\n\t\tdocument.getElementById(\"4\").className = \"glyphicon glyphicon-star\";\n\t\tdocument.getElementById(\"4\").style.color = \"yellow\";\n\t\t\n\t\tdocument.getElementById(\"5\").className = \"glyphicon glyphicon-star\";\n\t\tdocument.getElementById(\"5\").style.color = \"yellow\";\n\t\t\n\t\tdocument.getElementById(\"starRating\").value = \"5\";\n\t}\n}", "function starClicked(starId) {\n setStarCount(starId)\n\n for (let j = starId; j < 6; j++) {\n let starIcon = $('#star_' + (j + 1))\n starIcon.addClass('disabled')\n starIcon.removeClass('active')\n }\n for (let j = 1; j <= starId; j++) {\n let starIcon = $('#star_' + j)\n starIcon.addClass('active')\n starIcon.removeClass('disabled')\n }\n }", "showStar() {\n // Algorythm creates movement when called each frame\n let xPos = (this.x - centreOfX) * (cnvsLength / this.z);\n let yPos = (this.y - centreOfY) * (cnvsLength / this.z);\n // Relocates zero to centre of screen and ensures objects move away from this centre including object positions decreasing in value\n xPos = xPos + centreOfX;\n yPos = yPos + centreOfY;\n // Changes size of the Star object in relation to the centre of canvas and Z value, size is smallest when in the centre\n let s = size * (cnvsLength / this.z);\n // Renders circular star shapes, changing colour as points increase\n ctx.beginPath();\n if (score <= 1000) {\n ctx.fillStyle = \"#82caff\";\n } else if (score <= 2100) {\n ctx.fillStyle = \"#00FA9A\";\n } else if (score <= 3200) {\n ctx.fillStyle = \"#306eff\";\n } else if (score <= 4000) {\n ctx.fillStyle = \"#7609c4\";\n } else if (score <= 4300) {\n ctx.fillStyle = \"#6900b4\";\n } else if (score <= 5400) {\n ctx.fillStyle = \"#1b1bd6\";\n } else if (score <= 5950) {\n ctx.fillStyle = \"#7f00d4\";\n } else if (score <= 6500) {\n ctx.fillStyle = \"#132aff\";\n } else if (score <= 7000) {\n ctx.fillStyle = \"#00708b\";\n } else if (score <= 7500) {\n ctx.fillStyle = \"#386323\";\n } else if (score <= 8150) {\n ctx.fillStyle = \"#5d794f\";\n } else if (score <= 8700) {\n ctx.fillStyle = \"#4cc437\";\n } else if (score <= 9200) {\n ctx.fillStyle = \"#838383\";\n } else if (score <= 10000) {\n ctx.fillStyle = \"#704cf0\";\n }\n ctx.arc(xPos, yPos, s, 0, Math.PI * 2);\n ctx.fill();\n }", "function setInfoTandR()\r\n{\r\n\tif(movecount < 31){\r\n\t\tstarcount = 3;\r\n\t}\r\n\telse if(movecount > 30 && movecount < 51){\r\n\t\tstarcount = 2;\r\n\t}\r\n\telse{\r\n\t\tstarcount = 1;\r\n\t}\r\n\tge = document.getElementById(\"stars\");\r\n\tge.innerHTML=\"\";\r\n\t\r\n\tfor (var j = 0; j < this.starcount; j++){\r\n\t\tvar a = document.createElement('span');\r\n\t\ta.innerHTML=star_img_tag;\r\n\t\tge.appendChild(a);\r\n\t}\r\n\t++totalsecscount;\r\n game_secs = format_time(totalsecscount%60);\r\n game_mins = format_time(parseInt(totalsecscount/60));\r\n\tgametime.innerHTML= game_mins+\":\"+game_secs;\r\n}", "function addStars(starFieldWidth, starFieldHeight, noOfStars) {\n var starField = document.getElementById('star-field');\n var numberOfStars = noOfStars;\n \n for (var i = 0; i < numberOfStars; i++) {\n var star = document.createElement('div');\n \tstar.className = 'star';\n var topOffset = Math.floor((Math.random() * starFieldHeight) + 1);\n var leftOffset = Math.floor((Math.random() * starFieldWidth) + 1);\n star.style.top = topOffset + 'px';\n star.style.left = leftOffset + 'px';\n star.style.position = 'absolute';\n \tstarField.appendChild(star);\n }\n}", "function setRating() {\r\n // Assigning Stars according to number of moves\r\n if (moves <= 12) {\r\n var stars = '<i class=\"fa fa-star\" aria-hidden=\"true\"></i> <i class=\"fa fa-star\" aria-hidden=\"true\"></i> <i class=\"fa fa-star\" aria-hidden=\"true\"></i>';\r\n } else if (moves <= 14) {\r\n var stars = '<i class=\"fa fa-star\" aria-hidden=\"true\"></i> <i class=\"fa fa-star\" aria-hidden=\"true\"></i> <i class=\"fa fa-star-half-o\" aria-hidden=\"true\"></i>';\r\n } else if (moves <= 16) {\r\n var stars = '<i class=\"fa fa-star\" aria-hidden=\"true\"></i> <i class=\"fa fa-star\" aria-hidden=\"true\"></i> <i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>';\r\n } else if (moves <= 18) {\r\n var stars = '<i class=\"fa fa-star\" aria-hidden=\"true\"></i> <i class=\"fa fa-star-half-o\" aria-hidden=\"true\"></i> <i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>';\r\n } else if (moves <= 20) {\r\n var stars = '<i class=\"fa fa-star\" aria-hidden=\"true\"></i> <i class=\"fa fa-star-o\" aria-hidden=\"true\"></i> <i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>';\r\n } else {\r\n var stars = '<i class=\"fa fa-star-half-o\" aria-hidden=\"true\"></i> <i class=\"fa fa-star-o\" aria-hidden=\"true\"></i> <i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>';\r\n }\r\n // Appending Stars\r\n $('.starsB').html(stars);\r\n }", "function drawStarsMove(mX, mY) {\r\n // Clear Canvas\r\n ctx.clearRect(0, 0, winWidth, winHeight);\r\n\r\n // Redraw all stars\r\n for(i=0; i<starCnt; i++) {\r\n // Calculate distance to mouse pointer\r\n xDist = mX - stars[i].x;\r\n yDist = mY - stars[i].y;\r\n xDist2 = xDist * xDist;\r\n yDist2 = yDist * yDist;\r\n mag = Math.sqrt(xDist2 + yDist2);\r\n xNorm = xDist / mag;\r\n yNorm = yDist / mag;\r\n xMove = xNorm * (1/mag) * 450;\r\n yMove = yNorm * (1/mag) * 450;\r\n \r\n // Draw static stars (all stars outside of the area of influence)\r\n if(mag > starAreaOfInfluence) {\r\n // Draw star - Filled circle using hsla() color for fill style\r\n ctx.beginPath();\r\n ctx.arc(stars[i].x, stars[i].y, stars[i].r, 0 ,360);\r\n ctx.fillStyle = \"hsla(\"+ stars[i].h + \",\" + stars[i].s + \"%,\" + stars[i].l + \"%,\" + stars[i].a +\")\";\r\n ctx.fill();\r\n ctx.closePath();\r\n }\r\n // Draw adjusted stars\r\n else {\r\n // Draw star - With adjusted x and y position to create visual affect around the mouse cursor\r\n ctx.beginPath();\r\n ctx.arc(stars[i].x + xMove, stars[i].y + yMove, stars[i].r, 0 ,360);\r\n ctx.fillStyle = \"hsla(\"+ stars[i].h + \",\" + stars[i].s + \"%,\" + stars[i].l + \"%,\" + stars[i].a +\")\";\r\n ctx.fill();\r\n ctx.closePath();\r\n }\r\n\r\n }\r\n}", "function starRating(state) {\n switch(state) {\n case 0:\n return <img src=\"images/stars/[email protected]\" />;\n case 1:\n return <img src=\"images/stars/[email protected]\" />;\n case 1.5:\n return <img src=\"images/stars/[email protected]\" />;\n case 2:\n return <img src=\"images/stars/[email protected]\" />;\n case 2.5:\n return <img src=\"images/stars/[email protected]\" />;\n case 3:\n return <img src=\"images/stars/[email protected]\" />;\n case 3.5:\n return <img src=\"images/stars/[email protected]\" />;\n case 4:\n return <img src=\"images/stars/[email protected]\" />;\n case 4.5:\n return <img src=\"images/stars/[email protected]\" />;\n case 5:\n return <img src=\"images/stars/[email protected]\" />;\n default:\n return null;\n }\n\n}", "function StarRating({ rating }) {\n const emptyRating = 5 - rating;\n const filledStars = new Array(rating).fill(1);\n const emptyStars = new Array(emptyRating).fill(0);\n\n return (\n <div>\n <link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css\" />\n {filledStars.map((star, index) => (\n <i className=\"fa fa-star orange-color\" key={`star empty ${index}`} />\n ))}\n {emptyStars.map((star, index) => (\n <span className=\"fa fa-star-o\" key={`star empty ${index}`} />\n ))}\n </div>\n );\n}", "function placeStars(){\n //Template\n let htmlStar = '<div class=\"star\" style=\"left: _%; top: __%; opacity: 0;\"><svg viewBox=\"0 0 488.34 488.34\"><path class=\"constStar\" d=\"M496,251.12l-202.8-33.8L259.37,14.51a4.16,4.16,0,0,0-8.2,0l-33.8,202.81-202.8,33.8a4.15,4.15,0,0,0,0,8.19l202.8,33.8,33.8,202.8a4.16,4.16,0,0,0,8.2,0l33.8-202.8L496,259.31A4.15,4.15,0,0,0,496,251.12Z\"/></svg></div>';\n\n //Just scatter some around the screen\n for(let i = 1; i < 100; i += 10){\n //Enter correct coords\n let htmlStuff = htmlStar.replace(\"__\", Math.floor(Math.random() * i)).replace(\"_\", Math.floor(Math.random() * i));\n //Add it to the body\n $(htmlStuff).appendTo('body')\n //Animate a nice fade in effect with random opacity values and delays\n .animate({\n \"opacity\": Math.random() * (1 - .5 + 1) + .5\n }, Math.floor(Math.random() * (2000 - 250 + 1 ) + 250));\n }\n for(let i = 200; i > 10; i -= 10){\n //Enter correct coords\n let htmlStuff = htmlStar.replace(\"__\", Math.floor(Math.random() * i)).replace(\"_\", Math.floor(Math.random() * i));\n //Add it to the body\n $(htmlStuff).appendTo('body')\n //Animate a nice fade in effect with random opacity values and delays\n .animate({\n \"opacity\": Math.random() * (1 - .5 + 1) + .5\n }, Math.floor(Math.random() * (2000 - 250 + 1 ) + 250));\n }\n}", "function stars() {\n\tconst starar = star.getElementsByTagName('i');\n\tfor (i = 0; i < starar.length; i++) {\n\t\tif (moves > 14 && moves <= 19) {\n\t\t\tstarar[2].className = 'fa fa-star-o';\n\t\t\tstarnum = 2;\n\t\t} else if (moves > 19) {\n\t\t\tstarar[1].className = 'fa fa-star-o';\n\t\t\tstarnum = 1;\n//\t\t} else if (moves > 24) {\n//\t\t\tstarar[0].className = 'fa fa-star-o';\n//\t\t\tstarnum = 0;\n\t\t} else {\n\t\t\tstarar[0].className = 'fa fa-star';\n\t\t\tstarar[1].className = 'fa fa-star';\n\t\t\tstarar[2].className = 'fa fa-star';\n\t\t\tstarnum = 3;\n\t\t}\n\t}\n}", "function resetStars() {\n stars = 0;\n const starList = document.querySelectorAll('.stars li');\n for (star of starList) {\n star.style.display = 'inline';\n }\n}", "function initStars(){\n\tstar.width = DOM_stars[0].clientWidth-1;\n\tstar.height = DOM_stars[0].clientHeight-1;\n\tstar.count = DOM_stars.length;\n\tfor(let i = 0; i < star.count; i++){\n\t\t// Update variables\n\t\tDOM_stars[i].temp_x = (star.width)*i;\n\t\t// Draw cloud\n\t\tDOM_stars[i].style.transform = \"translate3d(\"+ DOM_stars[i].temp_x +\"px, 0px, 0px)\";\n\t}\n}", "function initStars(){\n let stars = document.getElementById(\"stars\");\n for (let i=1; i<6; i++){\n let li = document.createElement(\"li\");\n let i = document.createElement(\"i\");\n stars.appendChild(li);\n i.className=\"fa fa-star on\";\n li.appendChild(i);\n }\n}", "function createStarBonus(){\n for (let i = 1; i <= numberofStar; i++) {\n var imgStr = document.createElement('img');\n imgStr.src=\"./img/star.png\";\n imgStr.id =\"star\" + i;\n imgStr.style=\"position:absolute;z-index:2\"\n document.body.appendChild(imgStr);\n }\n }", "function resetStars () {\n const starList = document.querySelectorAll(\".stars li\");\n for (star of starList) {\n star.style.display = 'inline';\n }\n}", "function emptyStar() {\n $(\"#rating\").append(\"<img src='../static/img/star-empty.png'></img>\");\n }", "function setStars() {\n if (movements === 0) {\n totalStars = 3;\n let fStar = document.querySelector(\"#firstStar\");\n fStar.remove();\n let starsUl = document.querySelector(\".stars\");\n let newStar = document.createElement(\"li\");\n newStar.className = \"fa fa-star\";\n newStar.id=\"firstStar\";\n starsUl.appendChild(newStar);\n let sStar = document.querySelector(\"#secondStar\");\n sStar.remove();\n let starsUl2 = document.querySelector(\".stars\");\n let newStar2 = document.createElement(\"li\");\n newStar2.className = \"fa fa-star\";\n newStar2.id=\"secondStar\";\n starsUl.appendChild(newStar2);\n let tStar = document.querySelector(\"#thirdStar\");\n tStar.remove();\n let starsUl3 = document.querySelector(\".stars\");\n let newStar3 = document.createElement(\"li\");\n newStar3.className = \"fa fa-star\";\n newStar3.id=\"thirdStar\";\n starsUl.appendChild(newStar3);}\n else if (movements === 14) {\n totalStars = 2;\n let fStar = document.querySelector(\"#firstStar\");\n fStar.remove();\n let starsUl = document.querySelector(\".stars\");\n let newStar = document.createElement(\"li\");\n newStar.className = \"fa fa-star-o\";\n newStar.id=\"firstStar\";\n starsUl.appendChild(newStar);\n } else if (movements === 21) {\n totalStars = 1;\n let fStar = document.querySelector(\"#secondStar\");\n fStar.remove();\n let starsUl = document.querySelector(\".stars\");\n let newStar = document.createElement(\"li\");\n newStar.className = \"fa fa-star-o\";\n newStar.id=\"secondStar\";\n starsUl.appendChild(newStar);\n } else if (movements === 24) {\n totalStars = 0;\n let fStar = document.querySelector(\"#thirdStar\");\n fStar.remove();\n let starsUl = document.querySelector(\".stars\");\n let newStar = document.createElement(\"li\");\n newStar.className = \"fa fa-star-o\";\n newStar.id=\"thirdStar\";\n starsUl.appendChild(newStar);\n }\n}", "function showStars() {\n for (var i = 0; i < stars.length; i++) {\n stars[i].style.visibility = \"visible\";\n }\n}", "function createStars(solidRating, fadedRating) {\n let rating = [];\n\n for (let i = 0; i < solidRating; i++) {\n rating.push(<StarIcon style={{ color: \"#64b5f6\" }} />);\n }\n\n for (let i = 0; i < fadedRating; i++) {\n rating.push(<StarTwoToneIcon style={{ color: \"#90caf9\" }} />);\n }\n\n while (rating.length < 5) {\n rating.push(<StarBorderIcon />);\n }\n\n return <div>{rating}</div>;\n}", "function resetStars() {\n\tconst stars = document.querySelector('.stars');\n\tstars.innerHTML = \"<li><i class='fa fa-star'></i></li><li><i class='fa fa-star'></i></li><li><i class='fa fa-star'></i></li><li><i class='fa fa-star'></i></li><li><i class='fa fa-star'></i></li>\";\n}", "function addProfileStars(quantity) {\n const starSection = document.querySelector(\".user-stars\");\n starSection.innerHTML += \"<i class='fas fa-star'></i> \".repeat(quantity);\n}", "function createStars() {\n debug(\"createStars\");\n\n for (let j = 0; j < 3; j++) {\n newLi = document.createElement('li');\n newIcon = document.createElement('i');\n stars = document.querySelector('.stars');\n\n newIcon.setAttribute(\"class\", \"fa fa-star\");\n stars.appendChild(newLi);\n stars.lastChild.appendChild(newIcon); \n }\n }", "function newStar () {\n\n\tlet body = document.getElementById('Body');\n\tlet star = document.createElement('div');\n\tstar.setAttribute('class', 'star');\n\tstar.setAttribute('oldL', 0);\n\tstar.setAttribute('oldT', 0);\n\tstar.setAttribute('lifetime', 0);\n\n\tsetStar (star, 0);\n\n\tallStars.push(star);\n\n\tbody.appendChild(star);\n}" ]
[ "0.76497924", "0.7639961", "0.7323112", "0.70052344", "0.6998917", "0.697177", "0.6949528", "0.6925531", "0.6915522", "0.6860622", "0.6836881", "0.6821338", "0.6811593", "0.67965996", "0.6764044", "0.67459244", "0.67275316", "0.67196304", "0.6657981", "0.66561586", "0.66533715", "0.6632403", "0.6617182", "0.6601779", "0.65875137", "0.6583091", "0.65830517", "0.6577628", "0.6556727", "0.6556689", "0.6537726", "0.65219325", "0.64998686", "0.64995384", "0.6497004", "0.64850307", "0.6471288", "0.6451982", "0.6444523", "0.64428127", "0.6417029", "0.6408719", "0.6388736", "0.6368679", "0.63672805", "0.6344764", "0.634064", "0.63226", "0.6321882", "0.6321795", "0.631955", "0.6311275", "0.63064045", "0.62919724", "0.6277464", "0.62621826", "0.6259148", "0.6253707", "0.6252019", "0.6238897", "0.62330633", "0.62290823", "0.62256354", "0.6219502", "0.6213324", "0.62040323", "0.62025326", "0.6201208", "0.6195768", "0.6194137", "0.6191424", "0.61823833", "0.61731064", "0.6171139", "0.61687344", "0.6163796", "0.615795", "0.61540526", "0.6149597", "0.61475384", "0.61426926", "0.6142049", "0.6137484", "0.61205417", "0.61195934", "0.61124736", "0.61115", "0.610434", "0.6102817", "0.6090635", "0.60905176", "0.60885435", "0.6087189", "0.6068533", "0.60629845", "0.6061743", "0.60615885", "0.60591346", "0.6045483", "0.60417444" ]
0.71064484
3
function for creating new shopping list
function creatNewList(newItem){ //localStorage.removeItem("ekShoppingList"); var existingEntries = JSON.parse(localStorage.getItem(myShoppingLists)); if(existingEntries == null){ existingEntries = {} }; var newShoppingList = {}; newShoppingList[newItem] = []; //existingEntries[newItem] = newShoppingList; $.extend(existingEntries, newShoppingList ); localStorage.setItem(myShoppingLists, JSON.stringify(existingEntries)); // return JSON.stringify(existingEntries) console.log(existingEntries); return existingEntries; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async createShoppingList(data) {\n const response = await apiReq.post(API_ROUTES.shoppingLists, data);\n return response.data;\n }", "function NewList() {\r\n}", "function newList(){\n let obj = {\n title: listTitleInput.value,\n listItems: []\n }\n exampleData.push(obj);\n saveData();\n populateDropDownMenu();\n listTitleInput.value='';\n}", "createList(newList) {\n console.log(\"hello from Service\");\n let list = new List(newList);\n store.State.lists.push(list);\n store.saveState();\n }", "function createPage(){\nvar header = document.createElement('h3');\nheader.innerText = \"Shopping List\";\ndocument.body.appendChild(header);\ncreateForm();\npopulateList();\n}", "function makeListing() {\n\tconsole.log(\"Make Listing Button Pressed.\");\n\n\t//numberOfWhateverUnits variables initialized in 'make-a-listing-page.js'\n\tpost = {\n\t\tnumFashion: numberOfFashionUnits,\n\t\tnumElectronics: numberOfElectronicsUnits,\n\t\tnumCollectables: numberOfCollectablesUnits,\n\t\tquantity: 1, //default for now. Possibly based on user input down the road. \n\t\titemName: selectedItemType,\n\t\tprice: price\n\t}\n\n\t$.ajax({\n method: \"POST\",\n url: \"/api/new-listing\",\n data: post\n })\n .done(function(data) {\n \tif (data.success)\n \t\twindow.location = data.redirectTo;\n });\n}", "function addShopping() {\n ShoppingList.push(form.value)\n updateDom()\n }", "function newLiButtonClicked(){\n createListItem();\n }", "function addToList() {\n $('#js-shopping-list-form').on('submit', event => {\n event.preventDefault();\n const itemName = $('#shopping-list-entry').val();\n $('.shopping-list').append(createNewItem(itemName));\n $('#shopping-list-entry').val('');\n });\n}", "createList(event) {\n event.preventDefault()\n let formData = event.target\n let newList = {\n title: formData.title.value,\n primaryColor: formData.primaryColor.value,\n secondaryColor: formData.secondaryColor.value,\n textColor: formData.textColor.value,\n accentColor: formData.accentColor.value,\n }\n _listService.createList(newList)\n _drawLists()\n formData.reset()\n }", "processCreateNewList() {\n // MAKE A BRAND NEW LIST\n window.todo.model.loadNewList();\n\n // CHANGE THE SCREEN\n window.todo.model.goList();\n }", "renderNewList() {}", "function addListItem() {\n var itemInput = document.getElementById('itemInput');\n var priceInput = document.getElementById('priceInput');\n listObject.addListItem(itemInput.value, priceInput.value);\n itemInput.value = '';\n priceInput.value = '';\n buildList(listObject.listItems);\n listObject.saveList();\n}", "function handleCreateNewList(listName, todoAppData, todoService, todoViewSetter) {\n\t//create new list and add it to the model\n\tlet newList = todoAppData.addList(listName);\n\t//select the new list in the model\n\ttodoAppData.setSelectedList(listName);\n\t//save list to persistance storage\n\ttodoService.saveListsToLocalStore(todoAppData.lists);\n\t//update view for new list\n\tlet newListMenuItemEl = todoViewSetter.addNewList(newList);\n\t//select the new list in the view\n\ttodoViewSetter.setActiveListMenuItem(newListMenuItemEl);\n\ttodoViewSetter.setSelectedList(todoAppData.selectedList);\n}", "function addToList(newName, newPrice, newIsTaxable){\n\tif (newName.length > 0 && isNaN(newPrice) === false) {\n\t\tshoppingCart[shoppingCart.length] = {\n\t\t\tname: newName,\n\t\t\tprice: newPrice,\n\t\t\tisTaxable: newIsTaxable\n\t\t}\n\t} else {\n\t\talert('Please input an item name and valid dollar amount.');\n\t}\n\t\tpopulateList();\n\n}", "function createlist() {\n\n var context = SP.ClientContext.get_current();\n var web = context.get_web();\n\n try {\n\n var Listcreation = new SP.ListCreationInformation();\n Listcreation.set_title(\"ProKabaddi\");\n Listcreation.set_templateType(SP.ListTemplateType.contacts);\n\n var list = web.get_lists().add(Listcreation);\n\n //context.load(list);\n context.executeQueryAsync(success, fail);\n\n }\n \n\n catch (ex) {\n alert(ex.message);\n }\n\n\n function success() {\n\n var result = list.get_title() + \"Created.\";\n alert(result);\n\n }\n\n function fail(sender, args) {\n\n alert(\"error file not created:\" + args.get_message());\n }\n\n }", "function addToProdList(item)\n{\n //window.alert(JSON.stringify(item));\n var id = getProdId();\n \n var content = $('<div></div>').html(item.DESCRIP);\n \n var li = $('<li></li>').attr(\"id\", id).attr(\"class\", \"list-group-item\").html(content).click(function(){\n \n localStorage.setItem(\"prdescrip\", \"\");\n localStorage.setItem(\"prcantidad\", \"\");\n\n setPriceSelect(item);\n \n setStatLabel(\"info\", item.DESCRIP);\n $('#prodtb').val(item.ARTICULO);\n currentProd = item;\n\n \n $('#searchProdModal').modal('hide');\n saveState();\n\n $('#prodSearch ul').empty();\n \n })\n \n console.log(id + \";\");\n $('#prodSearch ul').append(li);\n \n}", "function addItemToShoppingList() {\n var newProduct = document.getElementById(\"product\").value;\n var newQuantity = document.getElementById(\"quantity\").value;\n var newType = document.getElementById(\"type\").value;\n var tempShoppingList = new shoppingList(newProduct,newQuantity,newType);\n shoppingListArray.push(tempShoppingList);\n writeAddedItemToLocalStorage();\n shoppingListArray.sort(compareProduts);\n divShoppingListElement.innerHTML = \"\";\n document.getElementById(\"product\").value = \"\";\n document.getElementById(\"quantity\").value = \"\";\n document.getElementById(\"type\").value = \"\";\n shoppingListOnPage(divShoppingListElement, shoppingListArray);\n}", "function addItemToList(operation, metaData, requestParams) {\n\n var type = 'item';\n\t\tif(requestParams && requestParams.item){\n\t\t\tif(requestParams.item.type !== undefined){\n\t\t\t type = requestParams.item.type;\n\t\t\t}\n\t\t}\n var createListUrl , addToListUrl ;\n if(type === 'collection'){\n \tcreateListUrl = '/customer/list/v2/createlist';\n \taddToListUrl = '/customer/list/v1/addcollections'\n }else{\n \tcreateListUrl = '/customer/list/v1/createlist';\n \taddToListUrl = '/customer/list/v1/additems';\n }\n\t\tvar isCreateOperation = (operation === OP_CODE_CREATE) ? true : false,\n\t\t\turl = (isCreateOperation) ? createListUrl : addToListUrl;\n\n\t\toverlay.toggleLoader(true);\n\n\t\t$.support.cors = true; //Fix for IE8\n\t\tvar $promise = $.ajax({\n\t\t\ttype: 'POST',\n\t\t\turl: secureHostName + url,\n\t\t\tcontentType: 'application/json',\n\t\t\tdataType: 'json',\n\t\t\txhrFields: {\n\t\t\t\twithCredentials: true\n\t\t\t},\n\t\t\tdata: getPayLoad(operation, metaData, requestParams),\n\t\t\tbeforeSend: function (xhr) {\n\t\t\t\txhr.setRequestHeader('Authorization', privateMethods.getAuthToken());\n\t\t\t\tif (isGuestUser() && isFeatureSwitchEnabled(GUESTLIST_HMAC_ENABLED)) {\n\t\t\t\t\txhr.setRequestHeader('clientId', CLIENT_ID);\n\t\t\t\t\txhr.setRequestHeader('timestamp', TIMESTAMP);\n\t\t\t\t\txhr.setRequestHeader('clientDelay', 0);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t$promise.then(function (response) {\n\t\t\twindow.dispatchEvent(new CustomEvent('ADD_TO_LIST_SUCCESS', { detail: requestParams.item.itemId}));\n var listId = '';\n if(response){\n \tif(response.ListResponse){\n listId = response.ListResponse.listId;\n \t}else if(response.ListResponseV2) {\n \t listId = response.ListResponseV2.listId;\n \t}\n\t\t\t}\n\t\t\t\n\t\t\tif(isB2BUser()){\n\t\t\t\tgenerateMessageContent(true, 'Nice choice', 'We\\'ve saved this ' + type + ' to your list.', (isCreateOperation ? listId : metaData.listId), requestParams);\n\t\t\t} else {\n\t\t\t\tgenerateMessageContent(true,\n\t\t\t\t\t(isCreateOperation && (MY_FAVORITES === requestParams.listName) ? 'Great' : 'Nice choice'),\n\t\t\t\t\t(isCreateOperation && (MY_FAVORITES === requestParams.listName) ? 'We\\'ve saved this ' + type + ' to your new favorites.' : 'We\\'ve saved this ' + type + ' to your favorites.'),\n\t\t\t\t\t(isCreateOperation ? listId : metaData.listId),\n\t\t\t\t\trequestParams);\n\t\t\t}\n\t\t\t//Analaytics\n\t\t\tif(type === 'collection'){\n\t\t\t\tanalytics.trackAddCollection(isGuestUser(), isCreateOperation, requestParams.item.itemId);\n\t\t\t}\n\t\t\telse\n\t\t\tanalytics.trackAddItem(isGuestUser(), isCreateOperation, requestParams.source, requestParams.item.quantity,\n\t\t\t\trequestParams.item.price, requestParams.item.itemId);\n\t\t}, function (error) {\n\t\t\t//Extracting the error json from response\n\t\t\tvar responseJSON = (error && error.responseText) ? JSON.parse(error.responseText) : {},\n\t\t\t\terrorJson = (responseJSON && responseJSON.ListResponse\n\t\t\t\t\t&& responseJSON.ListResponse.errorData && responseJSON.ListResponse.errorData.errors)\n\t\t\t\t\t? responseJSON.ListResponse.errorData.errors : {};\n\n\t\t\tif (errorJson && errorJson.length > 0 && errorJson[0].id === ERR_CD_DUPLICATE_LIST) {\n\t\t\t\tconst errorMessage = 'You already have a list with that name. Please enter a different name.';\n\t\t\t\tshowInlineError(errorMessage);\n\t\t\t\tanalytics.trackInlineErrors(errorJson[0].id, errorMessage);\n\t\t\t} else {\n\t\t\t\tgenerateGenericErrorMessage();\n\t\t\t}\n\t\t});\n\n\t\t$promise.always(function () {\n\t\t\toverlay.toggleLoader(false);\n\t\t});\n\t}", "function ShoppingService(){\n\nthis.list = [];\nvar list = this.list;\n\nthis.saveList = function(amount, name){\n\tvar item = {\n\t\tamount: amount,\n\t\tname: name\n\t};\n\n\tlist.push(item);\n};\n\nthis.remove = function(index){\n\tlist.splice(index, 1);\n}\n\n}", "function addItem() {\n var contents = document.getElementById('newTask').value;\n var item = new listItem(Date.now(), contents, false);\n masterList.push(item);\n showList(masterList);\n saveList();\n}", "function addItemToList()\n{\n\t// Item list to append new item to\n\tvar itemList = document.getElementById(\"itemlist\");\n\t\n\t// Array of individual items in list\n\tvar saleArray = [];\n\tsaleArray = document.getElementsByClassName(\"item\");\n\n\t// Set unique id's for all item elements in saleArray\n\tvar i = 0;\n\twhile (i < saleArray.length)\n\t{\n\t\tsaleArray[i].id = \"item_\" + i;\n\t\ti++;\n\t}\n\n\t// Clone the last instance of element with name \"item\" and give it and its children unique id\"s\n\tvar cloneItem = document.getElementById(\"item_\" + (i - 1));\n\tvar newItem = cloneItem.cloneNode(true);\n\t\n\t// Set id\"s and name values for database submission\n\tnewItem.id = \"item_\" + i;\n\tnewItem.name = \"item_\" + i;\n\t\n\tnewItem.getElementsByClassName(\"itemname\")[0].id = \"itemname_\" + i;\n\tnewItem.getElementsByClassName(\"itemname\")[0].name = \"itemname_\" + i;\n\n\tnewItem.getElementsByClassName(\"itemid\")[0].id = \"itemid_\" + i;\n\tnewItem.getElementsByClassName(\"itemid\")[0].name = \"itemid_\" + i;\n\n\tnewItem.getElementsByClassName(\"itemquantity\")[0].id = \"itemquantity_\" + i;\n\tnewItem.getElementsByClassName(\"itemquantity\")[0].name = \"itemquantity_\" + i;\n\n\tnewItem.getElementsByClassName(\"unitcost\")[0].id = \"unitcost_\" + i;\n\tnewItem.getElementsByClassName(\"unitcost\")[0].name = \"unitcost_\" + i;\n\n\tnewItem.getElementsByClassName(\"totalcost\")[0].id = \"totalcost_\" + i;\n\tnewItem.getElementsByClassName(\"totalcost\")[0].name = \"totalcost_\" + i;\n\n\t// Set default values\n\tnewItem.getElementsByClassName(\"itemquantity\")[0].value = 1;\n\n\t// Remove buttons from previous list item\n\tcloneItem.getElementsByClassName(\"additem\")[0].remove();\n\t\n\tif (cloneItem.contains(cloneItem.getElementsByClassName(\"removeItem\")[0]))\n\t{\n\t\t// Remove the remove button from the clonee if it exists\n\t\tcloneItem.getElementsByClassName(\"removeItem\")[0].remove();\n\t}\n\telse\n\t{\n\t\t// Add the remove button to current list item\n\t\tvar removeButton = document.createElement(\"button\");\n\t\tremoveButton.innerHTML = \"Remove\";\n\t\tremoveButton.className = \"removeItem\";\n\t\tremoveButton.type = \"button\";\n\t\tnewItem.appendChild(removeButton);\n\t}\n\n\t// Add event listerners\n\tnewItem.getElementsByClassName(\"itemname\")[0].addEventListener(\"change\", formUpdate);\n\tnewItem.getElementsByClassName(\"itemquantity\")[0].addEventListener(\"change\", formUpdate);\n\tnewItem.getElementsByClassName(\"additem\")[0].addEventListener(\"click\", addItemToList);\n\tnewItem.getElementsByClassName(\"removeItem\")[0].addEventListener(\"click\", removeItemFromList);\n\n\t// Add newItem to itemList\n\titemList.appendChild(newItem);\n\n\t//Update form\n\tformUpdate();\n\n\tif (debug)\n\t{\n\t\ti = 0;\n\t\tvar debugMsg = \"\";\n\t\twhile (i < saleArray.length)\n\t\t{\n\t\t\tdebugMsg += saleArray[i].id + \"\\n\";\n\t\t\ti++;\n\t\t}\n\t\talert(debugMsg);\n\t}\n}", "function createNewProduct () {\n // create an object that takes on the newly created product and producer information\n var newProduct = {\n productName: newProductName.value,\n productDescription: newProductDescription.value,\n productProductionDate: newProductProductionDate.value,\n productExpiryDate: newProductExpiryDate.value,\n productPrice: newProductPrice.value,\n productTotalAvailable: newProductTotalAvailable.value,\n\n producerName: newProducerName.value,\n producerPhoneNumber: newProducerPhoneNumber.value,\n producerEmail: newProducerEmail.value,\n producerAddress: newProducerAddress.value,\n producerWebsiteAddress: newProducerWebsiteAddress.value,\n producerWebsiteTitle: newProducerWebsiteTitle.value\n } \n // check if the \"newProducts\" key is empty and push the object inside the newProducts array\n if (localStorage.getItem(\"newProducts\") === null) {\n newProducts = [] // This is added here in case if the ADMIN deletes all products from the store\n newProducts.push(newProduct)\n // convert the newProducts array to a JSON string and assign it as a value to the \"newProducts\" key\n localStorage.setItem(\"newProducts\", JSON.stringify(newProducts))\n } else { \n // checks if localStorage is not empty and convert it to a javaScript object\n newProducts = JSON.parse(localStorage.getItem(\"newProducts\"))\n // then push a newly created note to the newProducts array\n newProducts.push(newProduct)\n // and convert the newProducts array back to a JSON string and assign it as a value to the \"newProducts\" key\n localStorage.setItem(\"newProducts\", JSON.stringify(newProducts))\n } \n }", "function addToList(cakeId, cakeName, quantity, selectedText , price, description, productImage) {\n const item = {\n cakeId: cakeId, \n cakeName: cakeName,\n quantity: quantity, \n weight: selectedText, \n price: price, \n description: description,\n productImage: productImage\n }\n formList.push(item);\n console.log(formList);\n// clear the form for the next input \n clearForm();\n console.log(`Total Submission: ${formList.length}`.formList);\n}", "function addItemToShoppingList(itemName) {\n store.push({id: cuid(), name: itemName, checked: false});\n}", "addNewItemToList(list, initDescription, initDueDate, initStatus) {\n let newItem = new ToDoListItem(this.nextListItemId++);\n newItem.setDescription(initDescription);\n newItem.setDueDate(initDueDate);\n newItem.setStatus(initStatus);\n list.addItem(newItem);\n if (this.currentList) {\n this.view.refreshList(list);\n }\n }", "onCreate (item) {\n\t\t// Hide the create form\n\t\tthis.toggleCreateModal(false);\n\t\t// Redirect to newly created item path\n\t\tconst list = this.props.currentList;\n\t\tthis.context.router.push(`${Keystone.adminPath}/${list.path}/${item.id}`);\n\t}", "function setupProductList() {\n if(document.getElementById(\"productList\")) {\n for (productSku of Object.keys(products)) {\n\t // products[productSku].name\t\n\t $(\"#productList\").append(\n\t $(\"<a>\").attr(\"href\",\"product.html?sku=\" + productSku).append(\t \n $(\"<div>\").addClass(\"productItem\").append(\n\t $(\"<h2>\").addClass(\"productTitle\").text(products[productSku].name)\n\t ).append(\n\t\t $(\"<span>\").addClass(\"productPrice\").text(products[productSku].price)\n\t ).append(\n $(\"<img>\").addClass(\"productImage\").attr(\"src\", \"img/\" + products[productSku].img)\n\t )\n\t )\n\t );\n }\n }\n}", "async function createListing(event) {\n if (event) {\n event.preventDefault();\n }\n\n try {\n const { askingPrice, itemName, itemDesc, saleType } = formik.values;\n if (saleType === \"0\") {\n // invoke createListing method in marketplace contract to generate listing with given details, and asking price converted to wei\n await contracts.marketplace.methods\n .createListing(\n itemName,\n itemDesc,\n Web3.utils.toWei(askingPrice.toString(), \"ether\")\n )\n .send({ from: accounts[0] });\n } else if (saleType === \"1\") {\n // invoke createListing method in firstAuction contract\n await contracts.firstAuction.methods\n .createListing(itemName, itemDesc)\n .send({ from: accounts[0] });\n } else if (saleType === \"2\") {\n // invoke createListing method in secondAuction contract\n await contracts.secondAuction.methods\n .createListing(itemName, itemDesc)\n .send({ from: accounts[0] });\n } else if (saleType === \"3\") {\n // invoke createListing method in averageAuction contract\n await contracts.averageAuction.methods\n .createListing(itemName, itemDesc)\n .send({ from: accounts[0] });\n }\n } catch (ex) {\n // Catch any errors for any of the above operations.\n console.log(\"Error while creating listing\", ex);\n }\n }", "function create_new_list(){\n\tfor(var i = 0; i < localStorage.length; i++){\n\t\t// trayendo info desde el Local Storage\n\t\ttodo = localStorage.getItem('names_' + i );\n\n\t\t$('#todo_list').append('<li id=\"' + i + '\"><a href=\"#\">' + todo + '</a><a href=\"#\" data-rel=\"dialog\" data-transition=\"slideUp\" id=\"remove\">Remover</a></li>');\n\t}\n\n\t$('todo_list').listview();\n\t$('todo_list').listview('refresh');\n}", "function createNewUpsaleItem(item ,price) {\n\t\t\t\tvar new_portion_li = document.createElement(\"li\");\n\t\t\t\tnew_portion_li.className = \"food_item_info_li substitutions_and_extras\";\n\t\t\t\tnew_portion_li.innerHTML = '<span class=\"food_item_info_span_L substitutions_and_extras\">'+\n\t\t\t\t\t\t\t\t\t\t\t\tenterHtml(item)+\n\t\t\t\t\t\t\t\t\t\t '</span>'+\n\t\t\t\t \t\t\t '<span class=\"food_item_info_span_R substitutions_and_extras\">'+\n\t\t\t\t \t\t\t \t\tenterHtml(price)+\n\t\t\t\t \t\t\t \t'</span>';\n\t\t\t\t \n\t\t\t\treturn new_portion_li;\n\t\t\t}", "function createStore(event) {\n event.preventDefault();\n\n // get values - convert number inputs to floats\n var storeName = event.target.storeName.value;\n var minCust = parseInt(event.target.minCust.value);\n var maxCust = parseInt(event.target.maxCust.value);\n var cupsPer = parseFloat(event.target.cupsPer.value);\n var poundsPer = parseFloat(event.target.poundsPer.value);\n\n // instantiate a new item Object\n if (names.indexOf(storeName) !== -1) {\n updateStore(storeName, minCust, maxCust, cupsPer, poundsPer);\n updateHtmlTables();\n } else {\n var newLocation = new CoffeeStand(storeName, minCust, maxCust, cupsPer, poundsPer, hours);\n newLocation.methodCaller();\n updateHtmlTables();\n }\n}", "function shoppingList() {\n $(\"#js-shopping-list-form\").on(\"submit\", function (event) {\n event.preventDefault();\n const newItem = $(\"#shopping-list-entry\").val();\n $(\".shopping-list\").append(\n '<li><span class=\"shopping-item\">' +\n newItem +\n '</span><div class=\"shopping-item-controls\"><button class=\"shopping-item-toggle\"><span class=\"button-label\">check</span></button> <button class=\"shopping-item-delete\"><span class=\"button-label\">delete</span></button></div></li>'\n );\n });\n $(\".shopping-list\").on(\"click\", \".shopping-item-toggle\", function (event) {\n $(this).parents('li').find('.shopping-item').toggleClass(\"shopping-item__checked\");\n });\n $(\".shopping-list\").on(\"click\", \".shopping-item-delete\", function (event) {\n $(this).parents('li').remove();\n });\n}", "function create(req, res) {\n var wishlist = new _wishlist2.default();\n wishlist.user = req.user._id;\n wishlist.productId = req.body.product;\n wishlist.save(function (err) {\n if (err) {\n return handleError(err, res);\n } else {\n res.json(wishlist);\n }\n });\n}", "function createList(name, type, listEntries = []){\r\n\r\n val = {listName: name, type: type, entries: listEntries}\r\n \r\n window.localStorage.setItem(name,JSON.stringify(val)) \r\n populate()\r\n}", "function create_item() {\n document.getElementById('modify-header').textContent = 'Creating new Item';\n create_form('meat_shop_item','content-div');\n}", "function addNewItem() {\r\n // create a new LI tag and some text to go with it.\r\n var oLINode = document.createElement(\"li\");\r\n var oLIText = document.createTextNode(\"New Item\");\r\n // Add the text to the LI tag\r\n oLINode.appendChild(oLIText);\r\n // Add the finished LI tag to the UL\r\n gTheList.appendChild(oLINode);\r\n}", "function createListing(payload, cb) {\n // TODO: handle validation here or at the controller level? Let's try controller level\n\n base('listings').create(payload, function(err, record) {\n if (err) {\n console.error(err);\n return cb(err);\n }\n\n clearCache();\n // cb(null, record.getId());\n // Q: how should we return this for the permalink?\n // The unique ID is really the most important part...\n var permalink = record.get('unique_id') + '-' + record.get('permalink');\n cb(null, permalink);\n });\n\n // fetch the record that was just created to get the unique ID (for the permalink...)\n\n // bust the cache so the new listing will show up on the home page\n}", "function handleNewItemSubmit(){\n //user inputs a new item in the list - which needs to be stored\n //new item appears/appends onto the original list - generate a new list\n //render new shopping list in DOM each time the user adds a new item\n $('#js-shopping-list-form').submit(function(event) {\n event.preventDefault();\n const newItemName = $('.js-shopping-list-entry').val();\n //console.log(newItemName);\n $('.js-shopping-list-entry').val('');\n addItemToShoppingList(newItemName);\n renderShoppingList();\n });\n}", "function addToList (itemName, itemPrice, quantityCount) {\n var newObject = {groceryItem: itemName, price: itemPrice, quantity: quantityCount};\n groceryList.push(newObject);\n}", "function addItemToShoppingList(itemName) {\n console.log(`Adding \"${itemName}\" to shopping list`);\n STORE.items.push({name: itemName, checked: false});\n}", "function addNewWatchList() {\n const watchList = STATE.getWatchList();\n\n const newWatchList = {\n id: watchList[watchList.length - 1].id + 1,\n title: \"Watchlist \" + watchList[watchList.length - 1].id + 1,\n currencies: []\n }\n STATE.watchlist.push(newWatchList);\n const container = $('.watchlist-right-sidebar .sidebar-container .sidebar-content');\n container.append(getWatchListHTML({ id: STATE.watchlist.length, title: `Watchlist ${STATE.watchlist.length}` }))\n registerWatchListEvents()\n }", "function addProductToShoppingList(clicked_id) {\n newProduct = categories[clicked_id].product;\n newQuantity = categories[clicked_id].quantity;\n newType = categories[clicked_id].type;\n shoppingListArray.push(new shoppingList(newProduct, newQuantity, newType));\n //Save to Local Store\n writeAddedItemToLocalStorage();\n shoppingListArray.sort(compareProduts);\n divShoppingListElement.innerHTML = \"\";\n shoppingListOnPage(divShoppingListElement, shoppingListArray);\n searchDiv.innerHTML = \"\";\n document.getElementById(\"searchInput\").value = \"\";\n}", "addItem(newItemData, listId){\n \n \n let list = _store.State.lists.find(list => list.id == listId)\n\n console.log(_store.State.lists)\n list.items.push(newItemData)\n _store.saveState()\n }", "function makeShoppingList(item1 = 'milk', item2 = 'bread', item3 = 'eggs'){\r\n console.log(`Remember to buy ${item1}`);\r\n console.log(`Remember to buy ${item2}`);\r\n console.log(`Remember to buy ${item3}`);\r\n }", "function addShop (name, address, wHours, coords){\r\n shopStorage.push(new Shop({\r\n name: name,\r\n address: address,\r\n wHours: wHours,\r\n number: shopStorage.length + 1,\r\n coords: coordsFromStr(coords)\r\n }));\r\n updateShopList(); \r\n dialog.close();\r\n }", "addList() {\n event.preventDefault();\n let listForm = event.target;\n // @ts-ignore\n if (listForm.color.value == \"Choose colors...\") {\n prompt(\"Please choose a color\");\n }\n // @ts-ignore\n if (listForm.color.value != \"Choose colors...\") {\n let newList = {\n // @ts-ignore\n name: listForm.name.value,\n // @ts-ignore\n color: listForm.color.value,\n };\n console.log(newList);\n ListService.addList(newList);\n }\n _drawLists();\n }", "_createNewListItem(e) {\n e.preventDefault();\n\n const itemName = itemNameInput.value;\n const dueDate = itemDueDateInput.value;\n const timeDue = itemTimeDueInput.value;\n const description = itemDescriptionInput.value;\n const priority = itemPriorityInput.value;\n\n // Creating new listItem Obj\n const listItem = new ListItem(\n itemName,\n dueDate,\n timeDue,\n description,\n priority\n );\n\n // Adding new list item to obj in listCollection\n this.listCollection[this._findObjectAlgo()].listItems.push(listItem);\n // Altering the curList\n this.curList = this.listCollection[this._findObjectAlgo()];\n\n this._insertionSort();\n this._setLocalStorage();\n\n // Clears input fields\n this._clearForm();\n\n // Reset listItemsParent and re-render sorted list items\n listItemsParent.innerHTML = \"\";\n this.curList.listItems.forEach((item) => this._renderListItem(item));\n\n // Shows and hides success message\n successMessage.classList.remove(\"hidden\");\n setTimeout(function () {\n successMessage.classList.add(\"hidden\");\n }, 750);\n }", "function createListing(user_id, title, picture, description, longitude, latitude, address, zipcode, category) {\n\treturn db.any('INSERT INTO listings (user_id, title, picture, post_date, description, longitude, latitude, address, zipcode, status, category) VALUES ($1, $2, $3, now(), $4, $5, $6, $7, $8, $9, $10)', [user_id,\n\t\ttitle, picture, description, longitude, latitude, address, zipcode, 0, category]);\n\t}", "function createElement() {\n var len = document.getElementById(\"loclist\").getElementsByTagName(\"li\").length;\n if (len < 53) {\n var li = document.createElement(\"li\");\n li.appendChild(document.createTextNode(input.value));\n ul.appendChild(li);\n var location = input.value;\n input.value = \"\";\n strikeThrough(li); \n var roomcode = sessionStorage[\"code\"];\n addLocation(location, roomcode, numloc); //add location to database\n ++numloc;\n }else {\n input.placeholder = \"Cannot Add More\";\n input.readonly = readonly;\n }\n}", "function createNewItem(item) { \n return $(`\n <li>\n <span class=\"shopping-item\">${item}</span>\n <div class=\"shopping-item-controls\">\n <button class=\"shopping-item-toggle\">\n <span class=\"button-label\">check</span>\n </button>\n <button class=\"shopping-item-delete\">\n <span class=\"button-label\">delete</span>\n </button>\n </div>\n </li>\n `);\n}", "function MakeObjectToAddInList(success) {\n return {\n \"itemId\": success.data.data.id,\n \"itemName\": success.data.data.itemName,\n \"itemPrice\": null,\n \"collection\": null,\n \"images\": [],\n \"quantity\": null,\n \"dateOfPurchase\": success.data.data.dateOfPurchase,\n \"category\": null,\n \"rooms\": null,\n \"currentValue\": null,\n \"brand\": success.data.data.brand,\n \"model\": success.data.data.model,\n \"description\": success.data.data.description,\n \"roomId\": null,\n \"collectionId\": null,\n \"price\": success.data.data.quotedPrice,\n \"categoryId\": success.data.data.category.id,\n \"categoryName\": GetCategoryOrSubCategoryOnId(true, success.data.data.category.id),\n \"subCategoryId\": success.data.data.subCategory.id,\n \"subCategoryName\": GetCategoryOrSubCategoryOnId(false, success.data.data.subCategory.id),\n \"templateType\": null,\n \"itemWorth\": 0,\n \"policyNumber\": null,\n \"appraisalValue\": null,\n \"productSerialNo\": null,\n \"imageId\": null,\n \"jwelleryTypeId\": null,\n \"jwelleryType\": null,\n \"claimed\": false,\n \"claimId\": success.data.data.claimId,\n \"vendorId\": null,\n \"age\": success.data.data.age,\n \"status\": null,\n \"statusId\": success.data.data.statusId,\n \"itemCategory\": null,\n \"contact\": null,\n \"notes\": null,\n \"additionalInfo\": null,\n \"approved\": false,\n \"scheduled\": success.data.data.isScheduledItem\n }\n }", "function new_list() {\n console.log('Click');\n if(inputField.value === \"\"){\n addButton.value = \"Disabled\";\n }else {\n addButton.value = \"Enabled\";\n var newList = document.createElement('li');\n newList.classList.add(\"list-item\");\n newList.innerHTML = `${inputField.value}`;\n unList.append(newList);\n var icon = document.createElement('i');\n icon.setAttribute(\"class\", \"fas fa-trash\");\n newList.appendChild(icon);\n saveLocalTodos(inputField.value);\n }\n inputField.value = \"\";\n\n}", "function addNewItem() {\n // Only add a new list item if there is a value in the input\n const newestListItem = document.querySelector('#item-to-add').value;\n if(newestListItem){\n // create an object with the input value as text\n // and a default false value of not checked\n const listObject = {\n text : newestListItem,\n isItDone : false\n };\n // if todoList active\n if (activeListName == 'todoList') {\n // set a default false value for high priority\n listObject.highPriority = false; \n }\n if (activeListName == 'menuPlanner') {\n // set a default none value for day\n listObject.day = 'none';\n }\n console.log(listObject);\n console.log(activeList);\n // add the new list item to the active list array\n activeList.push(listObject);\n // update the localstorage\n localStorage.setItem(activeListName, JSON.stringify(activeList));\n // repopulate the list in the HTML\n repopulateList();\n } else {\n // display error \n console.log('You must write something to add');\n }\n}", "createListWithListItems(numberOfListItems) {\n for (let i = 0; i < numberOfListItems; i++) {\n this.createListItem.click();\n this.addNewListItem(\n \"Add a new list item\",\n `List item ${i}`,\n `Help text ${i}`,\n `${i}`\n );\n }\n }", "function addToListItem (){\n // Capture value of this input field\n var newListItem = $('.new-list-item').val();\n \n // Render DOM element to the page with the above value\n $(\"#todo\").append(`<li class=\"list-item\">\n <span>${newListItem}</span>\n <button class=\"edit\">Edit</button>\n <button class=\"remove\">Remove</button></li>`);\n \n // Reset the input field to be blank for new submission\n $('.new-list-item').val('');\n\n addCount();\n }", "function addNewItem() {\n \n const item = window.prompt('What is your new task?','');\n const count = document.getElementById('selectedListOl').\n getElementsByTagName('LI').length;\n \n // let newItem;\n \n if (item) {\n notesItems += `\n <LI><label id=\"label${(count+1)}\"><input type=\"checkbox\" \n id=\"item${(count+1)}\">${item}</label></LI>`;\n \n reRenderDashboard();\n\n // list updated\n edited = true;\n document.getElementById('saveList').disabled = false;\n }\n \n }", "function createListItem(){\r\n //use createElement to create all the buttons \r\n console.log(\"create a item...\");\r\n\tvar listItem=document.createElement(\"li\");\r\n\tvar checkBox=document.createElement(\"input\");\r\n\tvar label=document.createElement(\"label\");\r\n\tvar inputText=document.createElement(\"input\");\r\n\tvar editButton=document.createElement(\"button\");\r\n\tvar deleteButton=document.createElement(\"button\");\r\n\t\r\n\r\n\t//set type information\r\n\tcheckBox.type=\"checkbox\";\r\n\tinputText.type=\"text\";\r\n\teditButton.className=\"edit\";\r\n\tdeleteButton.className=\"delete\";\r\n\teditButton.innerText=\"Edit\";\r\n\tdeleteButton.innerText=\"Delete\";\r\n label.innerText=input.value;\r\n\r\n\t//append buttons to listItem\r\n\t//well,have to follow the order- -!\r\n\tlistItem.appendChild(checkBox);\r\n\tlistItem.appendChild(label);\r\n\tlistItem.appendChild(inputText);\r\n\tlistItem.appendChild(editButton);\r\n\tlistItem.appendChild(deleteButton);\r\n\t\r\n\r\n\treturn listItem;\r\n\t\r\n\r\n}", "function addListAfterClick() {\n\n\t\tcreateListElement();\n}", "function newList(){\n $.ajax({\n\t type: \"GET\",\n\t url: theurl,\n\t data: {repo: repo, list: list, email: email},\n\t dataType: \"json\",\n\t success: function(da){\n\t \t//returns an object with exists=1 or 0\n\t\t\tuserd = da.items;\n\t\t\tconsole.log(userd);\n\t\t\t$.each(userd, function(index, userinfo) {\n\t \t \texi = userinfo.exists;\n\t \t \tconsole.log(exi);\n\t\t\t});\n\t\t\t//alert('about to set a cookie');\n\t\t\tvar lists = new cookieList(\"lists\");\n\t\t\tlists.add(repo + \".\" + list);\t\n\t\t\t$('#lioptions').append('<li data-theme=\"b\"><a href=\"food2buy.html?repo=' + repo + '&list=' + list + '\" data-ajax=\"false\"><p><span style=\"font-size: 2.25em;\">' + list + '</span><br/>repository: ' + repo + '</p></a></li>');\t\n\t\t\t$('#lioptions').listview('refresh');\n\t\t\t$('#addalist').remove();\n\t\t\t$('#allyourlists').trigger('create');\t\n\t\t\t//$('#allyourlists').listview('refresh');\t\t\t\t\t\t\n \t}\n });\n}", "function newItem(todo) {\n var listItem = document.createElement(\"li\");\n listItem.textContent = todo;\n list.appendChild(listItem);\n}", "function createListItem(webUrl, listName, itemProperties, success, failure) {\n document.getElementById(\"runout\").innerHTML = \"here\";\n $.ajax({\n url: webUrl + \"/_vti_bin/listdata.svc/\" + listName,\n type: \"POST\",\n processData: false,\n contentType: \"application/json;odata=verbose\",\n data: JSON.stringify(itemProperties),\n headers: {\n \"Accept\": \"application/json;odata=verbose\"\n },\n success: function (data) {\n success(data.d);\n },\n error: function (data) {\n failure(data.responseJSON.error);\n }\n });\n }", "addListItem(itemName, itemPrice) {\n this.listItems.push(new listItem(itemName, itemPrice));\n }", "function loadList() {\n newToDoItem(\"Buy milk\", true)\n newToDoItem(\"Do dishes\", false)\n newToDoItem(\"Feed Tito\", true)\n}", "async function createAndPutItems() {\n // get the items in the store \n var stores = JSON.parse(locStor.getItem(\"store\"));\n var productList = document.getElementById(\"product-list\");\n\n // if cart already exists\n if (locStor.getItem(\"itemCount\")) {\n // get the cart from html and local storage and update \n var count = document.getElementById(\"cart-count\");\n addList = JSON.parse(locStor.getItem(\"itemCount\"));\n count.innerHTML = addList.length;\n //if the card doesn't exist in local storage\n } else {\n // add an empty list to cart\n locStor.setItem(\"itemCount\", addList);\n }\n\n //for all items, create an element for each of them and put it on the page\n for (i in stores) {\n var proItem;\n\n //id, imgSrc, title, itemPrice, added\n let id = stores[i].id;\n let imgSrc = stores[i].image;\n let title = stores[i].title;\n let price = stores[i].price;\n let added;\n\n //if the list has current item\n if (addList.includes(stores[i].id)) {\n added = \"Remove from Cart\";\n //if the list doesn't have current item \n } else {\n added = \"Add to Cart\";\n }\n //create the item element\n proItem = new ProductItem(id, imgSrc, title, price, added);\n\n //add the created item to product-list\n productList.appendChild(proItem);\n }\n}", "function addNewItem() {\n log.debug('[TodoList] : addNewItem');\n\n var formValues = getFormValues();\n var id;\n // Edit or create new\n if (todo_id) {\n todoItem.set(formValues);\n todoItem.save();\n id = todo_id;\n } else {\n var newModel = Alloy.createModel(\"ToDo\", formValues);\n newModel.save();\n id = newModel.get(\"todo_id\");\n }\n\n // Make sure the collection is current\n todo.fetch();\n\n //alert(\"Saved this model: \" + JSON.stringify(newModel, null, 4));\n\n Alloy.Globals.Menu.setMainContent('TodoListDetail', {todo_id: id});\n\n}", "function addList (name) {\n if(name.length <= 8) {\n var div = document.createElement('div');\n div.id = name;\n div.className = 'tab';\n div.innerHTML = name;\n $(div).insertBefore($('.plustab'));\n\n var list= {\n _id: 'list:'+name+':'+(new Date()).getTime(),\n title: name\n };\n\n localDB.put(list, function callback(err, result) {\n if (!err) {\n console.log('Successfully created a list!');\n showStatus('good', 'New List created: '+name);\n $.JSONView(result, $('#output-resp'));\n }else{\n showStatus('bad', 'Problem creating List: '+name);\n }\n console.log(err || result);\n });\n\n $(div).click(function() {\n tabClicked($(this));\n });\n\n }else{\n alert('Please don\\'t add more than 8 chars');\n }\n }", "function addItem() {\n var materialName = document.getElementById(\"name\").value;\n var price = document.getElementById(\"price\").value;\n var inStock = document.getElementById(\"in-stock\").checked;\n\n // Create a new instance of the Product \n // object with the new Item's info\n var newProd = new Product(materialName, price, inStock);\n products.push(newProd);\n\n displayInventory();\n\n}", "function createNewList(list_object){\n ToDoLists.create(\n {\n list_name: list_object.list_name,\n is_complete: list_object.is_complete,\n timestamp_updated: list_object.timestamp_updated,\n tasks: list_object.tasks\n }, function (err, new_list_object) {\n if (err){\n console.log(err);\n return false\n\n }\n }\n )\n}", "function submitNewStuff() {\n \tvar itemAdd = document.getElementById(\"itemInput\").value; //naming an added item to a variable\n \tvar priceAdd = document.getElementById(\"priceInput\").value; //naming an added price to a variable\n\n\n\tvar unorderedList = document.getElementById('shoppinglist'); //creates a variable for the unordered list with the ID 'shoppinglist' in the HTML\n\tvar myList = document.createElement('li'); //creates list items for each grocery item & price, creates a variable of it to call later\n\tvar displayTotal = document.getElementById('totalDisplay'); //creates a variable for the grocery item total from the <p> tag in the HTML\n\n \tpriceAdd = parseInt(priceAdd); //making sure the price is a number\n\n\tmyList.innerHTML=itemAdd + \"- \\$\" + priceAdd; //adds the grocery items and prices into the html in 'li' format\n\tunorderedList.appendChild(myList); //adds the li to the unordered list\n\n\n \ttotal += priceAdd;\n }", "function storeItem(itemName) {\n\tsessionList.push(itemName);\n\tlocalStorage.setItem(\"shoppingLists\", JSON.stringify(shoppingLists));\n}", "function createNewList(name) {\n return {\n id: Date.now().toString(),\n name: name,\n tasks: [],\n };\n}", "function loadItemsToList() {\n var shoppingItems = JSON.parse(localStorage.getItem(\"shoppingItems\"));\n for (let item of shoppingItems) {\n $( \"#CreateShoppinglist > ul\" ).append( \"<li>\" + item + \"</li>\" );\n }\n}", "function createListItem(item) {\n const ul = document.getElementById(\"item-list\");\n const listItem = extractItemTemplate();\n const deleteBtn = listItem.getElementById(\"delete-btn\");\n const editBtn = listItem.getElementById(\"edit-btn\");\n const itemContainer = listItem.getElementById(\"item-container\");\n itemContainer.innerText = JSON.stringify(item, null, 4);\n\n deleteBtn.addEventListener(\"click\", () => deleteItem(item));\n editBtn.addEventListener(\"click\", () => displayForm(item));\n\n ul.append(listItem);\n}", "function handleShoppingList() {\n renderShoppingList();\n handleNewItemSubmit();\n handleItemCheckClicked();\n handleDeleteItemChecked();\n }", "function handleAddItem() {\n // Listen for when users submit a new list item\n $('#js-shopping-list-form').submit(event => {\n event.preventDefault();\n // Get the name of the new item from the text input\n const inputObject = $('.js-shopping-list-entry');\n const newListItem = inputObject.val();\n // Clear out the value of the input so new items can be addeed\n inputObject.val('');\n // Update the store\n addItemToStore({ name: newListItem, completed: false });\n // Rerender the shopping list\n renderShoppingList();\n });\n}", "function createProduct(listOfProducts) {\n var product = document.createElement(\"div\")\n product.className = \"productClass\";\n\n //.. title\n var getTitle = document.createElement(\"h1\");\n getTitle.innerText = listOfProducts.title;\n product.appendChild(getTitle);\n\n //.. description\n var getDescription = document.createElement(\"h2\");\n getDescription.innerText = listOfProducts.description;\n product.appendChild(getDescription);\n\n //.. image\n var getImage = document.createElement(\"img\");\n getImage.src = \"img/\" + listOfProducts.image;\n product.appendChild(getImage);\n\n //.. price\n var GetPrice = document.createElement(\"p\");\n GetPrice.innerText = listOfProducts.price + \" kr\";\n product.appendChild(GetPrice);\n\n //.. an \"add to cart\" button.\n var addCartButton = document.createElement(\"button\")\n addCartButton.innerText = \"Lägg till i kundvagnen\";\n addCartButton.onclick = function() {\n numberOfProducts ++\n \n cartCount.innerText = numberOfProducts;\n }\n product.appendChild(addCartButton);\n \n\n\n \n \n\n\n //returning what to function created out from the function\n return product;\n \n \n\n}", "add(state, product) {\n\t state.productList.push(product)\n\t}", "newTodoList () {\n this.props.createTodoListAction(false).then(id => {\n this.props.history.push(\"todolist/\" + id);\n });\n }", "function CreateListItem(){\r\n\t// creating list element\r\n var task = document.createElement('li');\r\n\t// checkbox\r\n var taskCheckBox = document.createElement('INPUT');\r\n taskCheckBox.setAttribute('type','checkbox');\r\n\ttask.appendChild(taskCheckBox);\r\n\t\r\n\t// h3 tag for name\r\n var taskNameValue = document.createElement('h3');\r\n taskNameValue.textContent = document.getElementById('taskname').value;\r\n task.appendChild(taskNameValue);\r\n\r\n\t// delete button\r\n var deleteButton = document.createElement('button');\r\n\tdeleteButton.textContent = \"X Delete\";\r\n\tdeleteButton.setAttribute('class','delete');\r\n\ttask.appendChild(deleteButton);\r\n\t// onclick event triggers\r\n deleteButton.onclick = TaskEvent;\r\n taskCheckBox.onclick = TaskEvent;\r\n\r\n\t// adding to list container ordered list\r\n\tdocument.getElementById('listContainer').prepend(task);\r\n \r\n}", "function createItem() {\n var input = document.getElementById(\"iteminputfield\").value;\n document.getElementById(\"textentry_new\").innerHTML = input;\n var inBucketList = JSON.parse(localStorage.getItem('inBucketList')); \n inBucketList.push(\"bl_new\");\n localStorage.setItem('inBucketList', JSON.stringify(inBucketList));\n localStorage.setItem('inputKey', input); // store the text entered in the input field in the entry box\n checkBucketList();\n}", "function handleCreateNewItem(itemName, todoAppData, todoService, todoViewSetter) {\n\t\n\t//add new item to the model\n\tlet newItem = todoAppData.selectedList.addItem(itemName);\n\t//persist new item to storage\n\ttodoService.saveListsToLocalStore(todoAppData.lists);\n\t//add new item to view\n\ttodoViewSetter.addNewItem(newItem, todoAppData.selectedList.items.length - 1);\n}", "function populateList() {\n // adds a new element (specified JSON object) to $scope.itemsList\n $scope.itemsList.push({\"name\":\"big screen TV\", \"room\":\"Basement\"});\n $scope.itemsList.push({\"name\":\"Xbox One\", \"room\":\"Basement\"});\n $scope.itemsList.push({\"name\":\"Ice Maker\", \"room\":\"Kitchen\"});\n }", "function ShoppingListCheckOffServiceFactory(){\n var service = {};\n\n //toBuyList is used to store predefined list of items you can buy\n service.toBuyList = [{name: 'banana', quantity: 10},\n\t\t\t\t\t\t {name: 'apple', quantity: 20},\n\t\t\t\t\t\t {name: 'grape', quantity: 30},\n\t\t\t\t\t\t {name: 'watermelon', quantity: 5},\n\t\t\t\t\t\t {name: 'strawberry', quantity: 40}];\n //boughtList is used to show the items you have bought\n service.boughtList = [];\n\n service.getToBuyList = function(){\n return service.toBuyList;\n };\n\n service.getBoughtList = function(){\n return service.boughtList;\n };\n\n //buyItem function moves the selected item from toBuyList to boughtList\n service.buyItem = function(itemIndex){\n var item = {};\n item.name = service.toBuyList[itemIndex].name;\n item.quantity = service.toBuyList[itemIndex].quantity;\n service.boughtList.push(item);\n service.toBuyList.splice(itemIndex, 1);\n };\n\n //cancelTransaction function moves the selected item from boughtList to toBuyList\n service.cancelTransaction = function(itemIndex){\n var item = {};\n item.name = service.boughtList[itemIndex].name;\n item.quantity = service.boughtList[itemIndex].quantity;\n service.toBuyList.push(item);\n service.boughtList.splice(itemIndex, 1);\n };\n\treturn service;\n }", "function addToList() {\r\n let value = document.getElementById('shop-item').value;\r\n let li = document.createElement(\"li\");\r\n let textNode = document.createTextNode(value);\r\n\r\n// Alert when the text box is empty\r\nif (value === \"\") {\r\n alert(\"Please add an item\");\r\n close.appendChild(closeNode) = \"none\";\r\n}\r\n\r\n// Append value to list item\r\nli.appendChild(textNode);\r\ndocument.getElementById('shop-container').appendChild(li);\r\n\r\n// Add a Delete Button to each list item\r\nvar close = document.createElement(\"button\");\r\nvar closeNode = document.createTextNode(\"Delete\");\r\nclose.appendChild(closeNode);\r\nli.appendChild(close);\r\nclose.className= \"close\";\r\n\r\n// Have Delete Button remove list item on click\r\ndocument.body.addEventListener(\"click\", function(event) {\r\n if (event.target.className == \"close\")\r\n event.target.parentElement.style.display=\"none\";\r\n });\r\n}", "function MakeList(array,string) {\n \n var list = document.createElement('ul');\n list.setAttribute(\"id\",\"main-list-text\")\n \n for (var i = 0; i < array.length; i++) {\n \n var item = document.createElement('li');\n item.setAttribute(\"class\",\"list-item\");\n\n var pic = document.createElement('img');\n pic.setAttribute(\"class\",\"list-image\")\n pic.src = i + '.jpg';\n\n item.appendChild(pic);\n \n var name = document.createTextNode(array[i][0]);\n item.appendChild(name);\n\n item.appendChild(document.createTextNode(\" - \"));\n\n var description = document.createTextNode(array[i][1]);\n item.appendChild(description);\n\n item.appendChild(document.createTextNode(\" Price: $\"));\n var price = document.createTextNode(array[i][2]);\n item.appendChild(price);\n\n var button = document.createElement(\"button\");\n button.setAttribute(\"class\",\"cart-button\");\n button.innerHTML = \"Add to cart\";\n\n button.onclick = function(){AddToCart(item)};\n\n item.appendChild(button);\n\n list.appendChild(item);\n }\n \n return list;\n }", "function storeGroceryItems()\r\n{\r\n\tlocalStorage.setObject(\"shoppinglist\", groceryItems);\r\n}", "function createProduct() {\n\n // array with all details of product\n const data = JSON.stringify({\n \"name\": document.getElementById('name').value,\n \"price\": document.getElementById('price').value,\n \"manufacturer\": document.getElementById('manufacturer').value,\n \"category\": document.getElementById('category').value,\n \"description\": document.getElementById('description').value,\n \"tags\": \"\"\n });\n \n // API call to add product\n const xhr = new XMLHttpRequest();\n xhr.withCredentials = true;\n \n xhr.addEventListener(\"readystatechange\", function () {\n if (this.readyState === this.DONE) {\n\n // redirect to home page once product has been added\n window.location.href = \"index.html\";\n }\n });\n \n xhr.open(\"POST\", \"https://my-store2.p.rapidapi.com/catalog/product\");\n xhr.setRequestHeader(\"content-type\", \"application/json\");\n xhr.setRequestHeader(\"x-rapidapi-key\", \"ef872c9123msh3fdcc085935d35dp17730cjsncc96703109e1\");\n xhr.setRequestHeader(\"x-rapidapi-host\", \"my-store2.p.rapidapi.com\");\n \n xhr.send(data);\n\n }", "function createList(req,res){\n req.body.associatedUsers=req.user.sub\n let list=new List(req.body); // obtengo los valores del cuerpo de la peticion\n if(!req.body.nameList ) return res.status(500).send({message:'debe introducir un nombre para la lista '}) // si no tiene el nombre o el tipo relenado no dejo guardar en la base de datos\n console.log({list}) \n return list.save().then(list => res.status(201).send({list})) // lo guardo en la base de datos\n \n .catch(error => res.status(500).send(error)); // si da fallo mando un mensage no discrimina err tipo y duplicado de entrada \n }", "addListItem (newListItemData, listId){\n let list = _store.State.lists.find(list => list.id == listId)\n list.listsItems.push(newListItemData)\n console.log(list)\n _store.saveState()\n }", "function CreateproductAndSave(itemLocal) {\n //Create a product\n let product = {\n id: productId,\n image: image,\n productName: productName,\n currentPrice: currentPrice,\n oldPrice: oldPrice,\n quantity: quantity,\n total: currentPrice,\n maxQuantity: maxQuantity\n };\n //add product\n itemLocal.list.push(product);\n //save localsorage\n localStorage.setItem(itemLocal.name, JSON.stringify(itemLocal.list));\n }", "function addItemToCart() {}", "function addItemToCart() {}", "function addItem() {\n // Creating all the items\n let listWrapper = document.createElement(\"div\");\n let productName = document.createElement(\"span\");\n let productPrice = document.createElement(\"span\");\n let productAmount = document.createElement(\"div\");\n let productlabel = document.createElement(\"label\");\n let productInput = document.createElement(\"input\");\n let productTotal = document.createElement(\"div\");\n let subTotal = document.createElement(\"label\");\n let subTotalValue = document.createElement(\"span\"); \n let productDelete = document.createElement(\"div\");\n let deleteButton = document.createElement(\"button\"); \n\n\n // Getting the values from New Items input\n let createName = document.getElementById(\"create-name\");\n let createPrice = document.getElementById(\"create-price\");\n productName.innerHTML = createName.value;\n productPrice.innerHTML = createPrice.value;\n\n\n // Setting classes, IDs and Values to the items\n listWrapper.className = \"list-wrapper\";\n listWrapper.id = \"list-wrapper\";\n productName.className = \"product-name\";\n productPrice.className = \"product-price\";\n productAmount.className = \"product-amount\";\n productlabel.innerHTML = \"Qty\";\n productInput.innerHTML = 0;\n productInput.className = \"quantity\";\n productTotal.className = \"produt-total\";\n subTotal.innerHTML = \"Subtotal: \";\n subTotalValue.className = \"sub-total\";\n subTotalValue.value = 0;\n \n productDelete.className = \"product-delete\"\n deleteButton.className = \"btn btn-delete\"\n deleteButton.innerHTML = \"Delete Row\";\n \n // Adding the structure\n document.getElementById(\"shopping-wrapper\").appendChild(listWrapper);\n listWrapper.appendChild(productName);\n listWrapper.appendChild(productPrice);\n listWrapper.appendChild(productAmount);\n productAmount.appendChild(productlabel);\n productAmount.appendChild(productInput);\n listWrapper.appendChild(productTotal);\n productTotal.appendChild(subTotal);\n productTotal.appendChild(subTotalValue);\n listWrapper.appendChild(productDelete);\n productDelete.appendChild(deleteButton);\n}", "function createList(holderName,nameResult,idResult){\n console.log('creating list inside '+holderName+', name is '+nameResult+'. and id is '+ idResult);\n var listHolder = document.getElementById(holderName); \n \n var newItem = document.createElement('li');\n \n newItem.setAttribute(\"data-ref\",idResult);\n newItem.innerHTML = nameResult; \n \n listHolder.appendChild(newItem); \n app.cancel();\n}", "function createListElement() {\n\n\tvar span = document.createElement(\"span\");\n\n\tspan.appendChild(document.createTextNode(input.value));\n\tspan.id = input.value;\n\tspan.value = span.id;\n\tspan.onclick = ChangeDoneStatusForCreatedItems;\n\n\tvar li = document.createElement(\"li\");\n\n\tli.className = \"toDo\";\n\tul.appendChild( li );\n\tli.appendChild( span );\n\n\tvar delBtn = document.createElement( \"button\" );\n\tdelBtn.appendChild(document.createTextNode(\"Delete\"));\n\tdelBtn.className = \"delete\";\n\tdelBtn.onclick = DeleteListElement;\n\tli.insertBefore( delBtn, span );\n\n\tul.appendChild( li );\n\n\tinput.value = \"\";\n\n}", "function addNewToList() {\n let selected = document.querySelector(\"select\");\n let value = selected.options[selected.selectedIndex].value;\n stockArray.push(value);\n callToApiForStockDataAndSendToRender(value);\n}", "addItem(req, res) {\n //grab the new item and push it to the list\n const { addOn } = req.body;\n list.push(addOn);\n res.status(200).send(list);\n }", "function createPlaylist() {\n\t\t// create request\n\t\tvar request = {};\n\t\trequest[\"artistPool\"] = artistPool;\n\t\t\n\t\tvar requestBuilder = new SpotifyRequestBuilder();\n\t\trequestBuilder.postRequest(common.generatePlaylistURL, onCreatePlaylist, JSON.stringify(request));\n\t}", "function addToBasket(detail) { }" ]
[ "0.7192332", "0.70064694", "0.6830746", "0.6791286", "0.6781548", "0.6717105", "0.6711765", "0.6663963", "0.66310936", "0.6592421", "0.6590341", "0.65873086", "0.6561819", "0.65436167", "0.6533186", "0.6528961", "0.64702594", "0.6441108", "0.6430826", "0.6420733", "0.6419674", "0.63874733", "0.63546777", "0.63450956", "0.6306362", "0.6286459", "0.6275522", "0.6272872", "0.6238246", "0.6227185", "0.62198925", "0.6216444", "0.62150466", "0.62071604", "0.6201935", "0.6193918", "0.6186485", "0.6180025", "0.6168839", "0.6163758", "0.6161691", "0.6160978", "0.6150344", "0.6149474", "0.6145215", "0.61265725", "0.61102855", "0.6105647", "0.60972893", "0.6089952", "0.6087236", "0.6086475", "0.608644", "0.60864365", "0.6086136", "0.6084224", "0.6083997", "0.6083619", "0.6082796", "0.6072147", "0.6066969", "0.60660446", "0.60604805", "0.60586655", "0.6057474", "0.60558844", "0.6053049", "0.6049269", "0.6048336", "0.6047398", "0.60470915", "0.6046665", "0.60450983", "0.604188", "0.6029789", "0.60281116", "0.6013022", "0.60125506", "0.6002562", "0.59910226", "0.5986687", "0.5984635", "0.5984321", "0.59805006", "0.59795356", "0.5977235", "0.59751683", "0.5973269", "0.59648544", "0.5963229", "0.59622484", "0.59575415", "0.59575415", "0.59523606", "0.5951169", "0.5949382", "0.59474033", "0.5947318", "0.594581", "0.5936554" ]
0.65058905
16
adding item to a shopping list require: listName
function addItem(listName, item, quantity){ console.log(listName, item, quantity); //return false; var myShoppingLists = "ekShoppingList"; var existingEntries = JSON.parse(localStorage.getItem("ekShoppingList")); /*var entryItem = $("#item").val(); var entryQty = $("#quantity").val();*/ //console.log(typeof existingEntries); //console.log(existingEntries[listName]); //return false; var len = existingEntries[listName].length-1; var i = 0; if(len == -1){ i=1 }else{ //$.each(existingEntries[listName], function(index, result) { for(var j = 0; j < existingEntries[listName].length; j++){ if(existingEntries[listName][j].item == item){ var itemIndex = existingEntries[listName][j].id; //existingEntries[listName].splice(index,1); quantity = Number(existingEntries[listName][j].quantity) + Number(quantity); existingEntries[listName][j].quantity = quantity; localStorage.setItem(myShoppingLists, JSON.stringify(existingEntries)); console.log(itemIndex, quantity, listName); console.log('good'); var returnData = { 'status' : 'updated', 'quantity' : quantity } return returnData; //break; //deleteItem(listName, itemIndex); } } /*if (result.item == item) { console.log(index); //existingEntries[listName].splice(index,1); deleteItem(listName, item); quantity = result.quantity + quantity; //return false; }*/ //}); i = existingEntries[listName][len]; i = i.id + 1; //i = i+1; } //console("not good"); //return false; console.log(i); var itemToAdd = {"id": i, "item": item, "quantity": quantity, "status": "new"}; existingEntries[listName].push(itemToAdd); localStorage.setItem(myShoppingLists, JSON.stringify(existingEntries)); console.log(JSON.stringify(existingEntries)); //showHomepage(); $('#index').trigger('refresh'); itemToAdd.itemCount = i + 1; return itemToAdd; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addToList(newName, newPrice, newIsTaxable){\n\tif (newName.length > 0 && isNaN(newPrice) === false) {\n\t\tshoppingCart[shoppingCart.length] = {\n\t\t\tname: newName,\n\t\t\tprice: newPrice,\n\t\t\tisTaxable: newIsTaxable\n\t\t}\n\t} else {\n\t\talert('Please input an item name and valid dollar amount.');\n\t}\n\t\tpopulateList();\n\n}", "function addItemToShoppingList(itemName) {\n console.log(`Adding \"${itemName}\" to shopping list`);\n STORE.items.push({name: itemName, checked: false});\n}", "function addListItem() {\n var itemInput = document.getElementById('itemInput');\n var priceInput = document.getElementById('priceInput');\n listObject.addListItem(itemInput.value, priceInput.value);\n itemInput.value = '';\n priceInput.value = '';\n buildList(listObject.listItems);\n listObject.saveList();\n}", "function addItemToShoppingList(itemName) {\n store.push({id: cuid(), name: itemName, checked: false});\n}", "addItem(newItemData, listId){\n \n \n let list = _store.State.lists.find(list => list.id == listId)\n\n console.log(_store.State.lists)\n list.items.push(newItemData)\n _store.saveState()\n }", "addListItem(itemName, itemPrice) {\n this.listItems.push(new listItem(itemName, itemPrice));\n }", "function addToList() {\n $('#js-shopping-list-form').on('submit', event => {\n event.preventDefault();\n const itemName = $('#shopping-list-entry').val();\n $('.shopping-list').append(createNewItem(itemName));\n $('#shopping-list-entry').val('');\n });\n}", "function addShopping() {\n ShoppingList.push(form.value)\n updateDom()\n }", "function addToList (itemName, itemPrice, quantityCount) {\n var newObject = {groceryItem: itemName, price: itemPrice, quantity: quantityCount};\n groceryList.push(newObject);\n}", "function handleAddItem() {\n // Listen for when users submit a new list item\n $('#js-shopping-list-form').submit(event => {\n event.preventDefault();\n // Get the name of the new item from the text input\n const inputObject = $('.js-shopping-list-entry');\n const newListItem = inputObject.val();\n // Clear out the value of the input so new items can be addeed\n inputObject.val('');\n // Update the store\n addItemToStore({ name: newListItem, completed: false });\n // Rerender the shopping list\n renderShoppingList();\n });\n}", "function addItem(state, itemName) {\n\tstate.list.push({\n\t\tdisplayName: itemName,\n\t\tcheckedOff: false \n\t});\n}", "function addItemToList(operation, metaData, requestParams) {\n\n var type = 'item';\n\t\tif(requestParams && requestParams.item){\n\t\t\tif(requestParams.item.type !== undefined){\n\t\t\t type = requestParams.item.type;\n\t\t\t}\n\t\t}\n var createListUrl , addToListUrl ;\n if(type === 'collection'){\n \tcreateListUrl = '/customer/list/v2/createlist';\n \taddToListUrl = '/customer/list/v1/addcollections'\n }else{\n \tcreateListUrl = '/customer/list/v1/createlist';\n \taddToListUrl = '/customer/list/v1/additems';\n }\n\t\tvar isCreateOperation = (operation === OP_CODE_CREATE) ? true : false,\n\t\t\turl = (isCreateOperation) ? createListUrl : addToListUrl;\n\n\t\toverlay.toggleLoader(true);\n\n\t\t$.support.cors = true; //Fix for IE8\n\t\tvar $promise = $.ajax({\n\t\t\ttype: 'POST',\n\t\t\turl: secureHostName + url,\n\t\t\tcontentType: 'application/json',\n\t\t\tdataType: 'json',\n\t\t\txhrFields: {\n\t\t\t\twithCredentials: true\n\t\t\t},\n\t\t\tdata: getPayLoad(operation, metaData, requestParams),\n\t\t\tbeforeSend: function (xhr) {\n\t\t\t\txhr.setRequestHeader('Authorization', privateMethods.getAuthToken());\n\t\t\t\tif (isGuestUser() && isFeatureSwitchEnabled(GUESTLIST_HMAC_ENABLED)) {\n\t\t\t\t\txhr.setRequestHeader('clientId', CLIENT_ID);\n\t\t\t\t\txhr.setRequestHeader('timestamp', TIMESTAMP);\n\t\t\t\t\txhr.setRequestHeader('clientDelay', 0);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t$promise.then(function (response) {\n\t\t\twindow.dispatchEvent(new CustomEvent('ADD_TO_LIST_SUCCESS', { detail: requestParams.item.itemId}));\n var listId = '';\n if(response){\n \tif(response.ListResponse){\n listId = response.ListResponse.listId;\n \t}else if(response.ListResponseV2) {\n \t listId = response.ListResponseV2.listId;\n \t}\n\t\t\t}\n\t\t\t\n\t\t\tif(isB2BUser()){\n\t\t\t\tgenerateMessageContent(true, 'Nice choice', 'We\\'ve saved this ' + type + ' to your list.', (isCreateOperation ? listId : metaData.listId), requestParams);\n\t\t\t} else {\n\t\t\t\tgenerateMessageContent(true,\n\t\t\t\t\t(isCreateOperation && (MY_FAVORITES === requestParams.listName) ? 'Great' : 'Nice choice'),\n\t\t\t\t\t(isCreateOperation && (MY_FAVORITES === requestParams.listName) ? 'We\\'ve saved this ' + type + ' to your new favorites.' : 'We\\'ve saved this ' + type + ' to your favorites.'),\n\t\t\t\t\t(isCreateOperation ? listId : metaData.listId),\n\t\t\t\t\trequestParams);\n\t\t\t}\n\t\t\t//Analaytics\n\t\t\tif(type === 'collection'){\n\t\t\t\tanalytics.trackAddCollection(isGuestUser(), isCreateOperation, requestParams.item.itemId);\n\t\t\t}\n\t\t\telse\n\t\t\tanalytics.trackAddItem(isGuestUser(), isCreateOperation, requestParams.source, requestParams.item.quantity,\n\t\t\t\trequestParams.item.price, requestParams.item.itemId);\n\t\t}, function (error) {\n\t\t\t//Extracting the error json from response\n\t\t\tvar responseJSON = (error && error.responseText) ? JSON.parse(error.responseText) : {},\n\t\t\t\terrorJson = (responseJSON && responseJSON.ListResponse\n\t\t\t\t\t&& responseJSON.ListResponse.errorData && responseJSON.ListResponse.errorData.errors)\n\t\t\t\t\t? responseJSON.ListResponse.errorData.errors : {};\n\n\t\t\tif (errorJson && errorJson.length > 0 && errorJson[0].id === ERR_CD_DUPLICATE_LIST) {\n\t\t\t\tconst errorMessage = 'You already have a list with that name. Please enter a different name.';\n\t\t\t\tshowInlineError(errorMessage);\n\t\t\t\tanalytics.trackInlineErrors(errorJson[0].id, errorMessage);\n\t\t\t} else {\n\t\t\t\tgenerateGenericErrorMessage();\n\t\t\t}\n\t\t});\n\n\t\t$promise.always(function () {\n\t\t\toverlay.toggleLoader(false);\n\t\t});\n\t}", "function addItem() {\n var contents = document.getElementById('newTask').value;\n var item = new listItem(Date.now(), contents, false);\n masterList.push(item);\n showList(masterList);\n saveList();\n}", "function addToListItem (){\n // Capture value of this input field\n var newListItem = $('.new-list-item').val();\n \n // Render DOM element to the page with the above value\n $(\"#todo\").append(`<li class=\"list-item\">\n <span>${newListItem}</span>\n <button class=\"edit\">Edit</button>\n <button class=\"remove\">Remove</button></li>`);\n \n // Reset the input field to be blank for new submission\n $('.new-list-item').val('');\n\n addCount();\n }", "addListItem (newListItemData, listId){\n let list = _store.State.lists.find(list => list.id == listId)\n list.listsItems.push(newListItemData)\n console.log(list)\n _store.saveState()\n }", "_addItemToList(e) {\n if (\n this.shadowRoot.querySelector(\"#itemtext\").value != \"\" &&\n typeof this.shadowRoot.querySelector(\"#itemtext\").value !==\n typeof undefined\n ) {\n this.push(\"items\", {\n label: this.shadowRoot.querySelector(\"#itemtext\").value,\n value: false,\n disabled: this.disabledList,\n id: \"item-id-\" + this.items.length\n });\n this.shadowRoot.querySelector(\"#itemtext\").value = \"\";\n }\n }", "function addToList(e) {\n // prevent default of form >>\n e.preventDefault();\n\n //make sure the input is not processed when it's empty with an if condition >>\n if (userInput.trim()) {\n // create item list and to ensure we don't replace the old listitem with the new>>\n props.setList((prevState) => [\n ...prevState,\n { id: uuidv4(), title: userInput.trim(), done: false, priority: 0 },\n ]);\n }\n\n // clear userInput on submit\n setUserInput(\"\");\n }", "function addItem(req, res) {\n req.body.user = req.currentUser\n List.findById(req.params.listId)\n .then(list => {\n if (!list) return res.status(404).json({ message: 'Not Found' })\n list.customItem.push(req.body)\n return list.save()\n })\n .then(list => res.status(201).json(list))\n .catch(err => res.status(404).json(console.log(err)))\n}", "function addToMylist() { return changeMylistState('add',this); }", "function addNewItemToList (listName,targetLocation,entryValue){\t\n\t\tvar noItems, i, j;\n\t\tnoItems = gapi.hangout.data.getValue(listName) || \"0\"; \t\t\t\t\t\t\t\t\t// get current number of list items\n\t\tnoItems = (parseInt(noItems, 10) + 1).toString(); \t\t\t\t\t\t// add 1 to value and convert to string \n\t\tgapi.hangout.data.setValue(listName, noItems);\t\t\t\t\t\t\t\t\t\t\t// Commits new item value\n\t\tj = noItems;\n\t\tfor ( i = noItems; i > targetLocation; i--) {\t\t\t\t\t\t\t\t\t\t\t// loop down moving element values up\n\t\t\tj--;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// j in loop always is i + 1\n\t\t\tgapi.hangout.data.setValue(listName + i, gapi.hangout.data.getValue(listName + j));\t// save data in pos j into i\n\t\t}\n\t\t//if(!entryValue){ var entryValue = \"List item \" + targetLocation;};\t\t\t\t\t\t// TESTING if no Value to enter, defult to blank\n\t\tif(!entryValue){ var entryValue = \"\";};\t\t\t\t\t\t\n\t\tgapi.hangout.data.setValue(listName + targetLocation, entryValue); \t\t\t\t\t\t// create textvalue for list item\t\t\t\t\t\n\t\tconsole.log(\"LIST OBJECT \" + noItems + \" Created with value \");\n\t}", "function addItem(item) {\n\t\t// if the item is not empty or not spaces, then go forward.\n\t\tif (/\\S/.test(item)) {\n\t\t\t// do not add duplicates\n\t\t\tif (isDuplicate(item)) {\n\t\t\t\talert(\"'\" + item + \"' is already in the shopping list.\");\n\t\t\t\treturn;\n\t\t\t}\n\n \t\tvar str = \"<li><span class='label'>\" + item + \"</span>\"\n \t\t\t\t\t+\"<div class='actions'><span class='done'><button class='fa fa-check'><span class='element-invisible'>Done</span></button></span>\"\n \t\t\t\t\t+ \"</span><span class='delete'><button class='fa fa-times'><span class='element-invisible'>Delete</span></button></span></div></li>\";\n\n \t\t// adding the new li tag to the end of the list - you are actually adding html string, but jQuery will create elements for you\n\t\t\t$(\"#items\").append(str);\n\t\t}\n\t}", "function addListItemFromForm() {\n addListItem( getFormValues());\n}", "function addItemToCart() {}", "function addItemToCart() {}", "function addItem(name) {\n try {\n Item.validateName(name);\n this.items.push(Item.create(name));\n } catch(error) {\n console.log(`${error.message}`);\n }\n }", "function addItem() {\n\n console.log('adding', { amount }, { name });\n\n dispatch({\n type: 'ADD_ITEM', payload: {\n name: name,\n amount: amount,\n list_id: id,\n }\n })\n //reset local state of new item textfield to allow for more items to be added\n setName('');\n setAmount(1);\n }", "function AddItem(item){\n console.log(\"Adding \" + item.Name + \" to the basket!\");\n basket.push(item);\n}", "function populateItems(listName) {\n let body = JSON.stringify({ listName: state.listName })\n //makeHTTPRequest('POST', '/items', body, cb)\n fetch('/items', {\n body: body,\n method: 'POST'\n })\n .then(response => response.text())\n .then(cb)\n}", "function addItem(){\n var itemName = $(\"#spinlabel\").html();\n var quantity = $(\"#spin\").val();\n for(var i = 0; i < CurrentShoppingListArray.length; i++){\n if(itemName == CurrentShoppingListArray[i].name){\n CurrentShoppingListArray[i].quantity = parseInt(CurrentShoppingListArray[i].quantity) + parseInt(quantity);\n return;\n }\n }\n var tempItem = new Item(itemName, quantity);\n CurrentShoppingListArray.push(tempItem);\n}", "function addKiwi(ourList){\n ourList.push(\"kiwi\");\n }", "function storeItem(itemName) {\n\tsessionList.push(itemName);\n\tlocalStorage.setItem(\"shoppingLists\", JSON.stringify(shoppingLists));\n}", "addNewItemToList(list, initDescription, initDueDate, initStatus) {\n let newItem = new ToDoListItem(this.nextListItemId++);\n newItem.setDescription(initDescription);\n newItem.setDueDate(initDueDate);\n newItem.setStatus(initStatus);\n list.addItem(newItem);\n if (this.currentList) {\n this.view.refreshList(list);\n }\n }", "function addList(item) {\n // if item is not empty\n if (item !== '') {\n // make a list object, which has id, name, and completed properties\n const list = {\n id: Date.now(),\n name: item,\n completed: false\n };\n\n // then add it to lists array\n lists.push(list);\n addToLocalStorage(lists); // then store it in localStorage\n\n // finally clear the input box value\n classInput.value = '';\n }\n}", "addItem(req, res) {\n //grab the new item and push it to the list\n const { addOn } = req.body;\n list.push(addOn);\n res.status(200).send(list);\n }", "createList(newList) {\n console.log(\"hello from Service\");\n let list = new List(newList);\n store.State.lists.push(list);\n store.saveState();\n }", "function addItemToList()\n{\n\t// Item list to append new item to\n\tvar itemList = document.getElementById(\"itemlist\");\n\t\n\t// Array of individual items in list\n\tvar saleArray = [];\n\tsaleArray = document.getElementsByClassName(\"item\");\n\n\t// Set unique id's for all item elements in saleArray\n\tvar i = 0;\n\twhile (i < saleArray.length)\n\t{\n\t\tsaleArray[i].id = \"item_\" + i;\n\t\ti++;\n\t}\n\n\t// Clone the last instance of element with name \"item\" and give it and its children unique id\"s\n\tvar cloneItem = document.getElementById(\"item_\" + (i - 1));\n\tvar newItem = cloneItem.cloneNode(true);\n\t\n\t// Set id\"s and name values for database submission\n\tnewItem.id = \"item_\" + i;\n\tnewItem.name = \"item_\" + i;\n\t\n\tnewItem.getElementsByClassName(\"itemname\")[0].id = \"itemname_\" + i;\n\tnewItem.getElementsByClassName(\"itemname\")[0].name = \"itemname_\" + i;\n\n\tnewItem.getElementsByClassName(\"itemid\")[0].id = \"itemid_\" + i;\n\tnewItem.getElementsByClassName(\"itemid\")[0].name = \"itemid_\" + i;\n\n\tnewItem.getElementsByClassName(\"itemquantity\")[0].id = \"itemquantity_\" + i;\n\tnewItem.getElementsByClassName(\"itemquantity\")[0].name = \"itemquantity_\" + i;\n\n\tnewItem.getElementsByClassName(\"unitcost\")[0].id = \"unitcost_\" + i;\n\tnewItem.getElementsByClassName(\"unitcost\")[0].name = \"unitcost_\" + i;\n\n\tnewItem.getElementsByClassName(\"totalcost\")[0].id = \"totalcost_\" + i;\n\tnewItem.getElementsByClassName(\"totalcost\")[0].name = \"totalcost_\" + i;\n\n\t// Set default values\n\tnewItem.getElementsByClassName(\"itemquantity\")[0].value = 1;\n\n\t// Remove buttons from previous list item\n\tcloneItem.getElementsByClassName(\"additem\")[0].remove();\n\t\n\tif (cloneItem.contains(cloneItem.getElementsByClassName(\"removeItem\")[0]))\n\t{\n\t\t// Remove the remove button from the clonee if it exists\n\t\tcloneItem.getElementsByClassName(\"removeItem\")[0].remove();\n\t}\n\telse\n\t{\n\t\t// Add the remove button to current list item\n\t\tvar removeButton = document.createElement(\"button\");\n\t\tremoveButton.innerHTML = \"Remove\";\n\t\tremoveButton.className = \"removeItem\";\n\t\tremoveButton.type = \"button\";\n\t\tnewItem.appendChild(removeButton);\n\t}\n\n\t// Add event listerners\n\tnewItem.getElementsByClassName(\"itemname\")[0].addEventListener(\"change\", formUpdate);\n\tnewItem.getElementsByClassName(\"itemquantity\")[0].addEventListener(\"change\", formUpdate);\n\tnewItem.getElementsByClassName(\"additem\")[0].addEventListener(\"click\", addItemToList);\n\tnewItem.getElementsByClassName(\"removeItem\")[0].addEventListener(\"click\", removeItemFromList);\n\n\t// Add newItem to itemList\n\titemList.appendChild(newItem);\n\n\t//Update form\n\tformUpdate();\n\n\tif (debug)\n\t{\n\t\ti = 0;\n\t\tvar debugMsg = \"\";\n\t\twhile (i < saleArray.length)\n\t\t{\n\t\t\tdebugMsg += saleArray[i].id + \"\\n\";\n\t\t\ti++;\n\t\t}\n\t\talert(debugMsg);\n\t}\n}", "function addNewItem() {\n //Adds a new item to the array then updates the list\n let newItem = document.getElementById(\"new-item-input\").value;\n let exitFuncton = false;\n //Stops adding more than one of the same item, not sure if there's a simplar method but it works!\n shoppingList.forEach((item) => {\n if (item.ingredients === newItem) {\n exitFuncton = true;\n return;\n }\n });\n if (exitFuncton) {\n return;\n }\n let newListObject = { ingredients: newItem, acquired: false };\n shoppingList.push(newListObject);\n addListItem(newListObject);\n}", "function addItemToBasket(item) {\n const parent = $(\"#order\");\n\n // Add item\n basket.push(item);\n parent.append(\"<li id='ordermenuitem-\" + item.id\n + \"' class='list-group-item list-group-item-action'>\\n\"\n + \" <span class='bold'>\" + item.name + \"</span>\"\n + \" <span class='span-right'>£\" + item.price + \"</span>\\n\"\n + \" <br>\\n\"\n + \" <span id='omi-instructions-\" + item.id\n + \"'><span id='omi-instructions-\" + item.id + \"-text'>\"\n + item.instructions + \"</span></span>\\n\"\n + \" <span class='span-right'><i id='omi-edit-\" + item.id\n + \"' class='fa fa-edit fa-lg edit' onclick='showEditOrderMenuItem(\"\n + item.id + \", \\\"\" + item.instructions\n + \"\\\");'></i><i class='fa fa-times fa-lg remove' onclick='confirmRemoveOrderMenuItem(\"\n + item.id + \");'></i></span>\\n\"\n + \"</li>\");\n}", "function addListListItem( listname ) {\n var element = $( \"#list\" ).clone();\n element.prop( \"id\", \"\" );\n\n element.find( \".list-name\" ).text(listname);\n var link = \"https://groups.mit.edu/webmoira/list/\" +\n encodeURIComponent(listname);\n element.find( \"a.webmoira-link\" ).attr(\"href\", link);\n\n element.find( \".subscribe\" ).click(function( event ) {\n event.preventDefault();\n var button = $( this );\n handleLoginButton(button, SUBSCRIBE_ACTION, function() {\n button.text( SUBSCRIBE_ONGOING );\n subscribe( listname, function() {\n element.remove();\n addListListItem( randomList() );\n });\n });\n \n });\n\n element.removeClass( \"hidden\" );\n $( \"#list\" ).after( element );\n }", "function addBasket(basket, move) {\n basket.find(\"ul\").append('<li data-id=\"' + move.attr(\"data-id\") + '\">' + '<span class=\"name\">' + move.find(\"h3\").html() + '</span>' + '<input class=\"count\" value=\"1\" type=\"text\">' + '<button class=\"delete\">&#10005;</button>');\n }", "function addToList(cakeId, cakeName, quantity, selectedText , price, description, productImage) {\n const item = {\n cakeId: cakeId, \n cakeName: cakeName,\n quantity: quantity, \n weight: selectedText, \n price: price, \n description: description,\n productImage: productImage\n }\n formList.push(item);\n console.log(formList);\n// clear the form for the next input \n clearForm();\n console.log(`Total Submission: ${formList.length}`.formList);\n}", "addList() {\n event.preventDefault();\n let listForm = event.target;\n // @ts-ignore\n if (listForm.color.value == \"Choose colors...\") {\n prompt(\"Please choose a color\");\n }\n // @ts-ignore\n if (listForm.color.value != \"Choose colors...\") {\n let newList = {\n // @ts-ignore\n name: listForm.name.value,\n // @ts-ignore\n color: listForm.color.value,\n };\n console.log(newList);\n ListService.addList(newList);\n }\n _drawLists();\n }", "function addToProdList(item)\n{\n //window.alert(JSON.stringify(item));\n var id = getProdId();\n \n var content = $('<div></div>').html(item.DESCRIP);\n \n var li = $('<li></li>').attr(\"id\", id).attr(\"class\", \"list-group-item\").html(content).click(function(){\n \n localStorage.setItem(\"prdescrip\", \"\");\n localStorage.setItem(\"prcantidad\", \"\");\n\n setPriceSelect(item);\n \n setStatLabel(\"info\", item.DESCRIP);\n $('#prodtb').val(item.ARTICULO);\n currentProd = item;\n\n \n $('#searchProdModal').modal('hide');\n saveState();\n\n $('#prodSearch ul').empty();\n \n })\n \n console.log(id + \";\");\n $('#prodSearch ul').append(li);\n \n}", "function addListItem() {\n if (checkInputLen() > 0) {\n createLi();\n }\n}", "function plusItem() {\n const productId = this.name;\n const cartList = JSON.parse(sessionStorage.getItem(\"shoppingCartItems\"));\n const item = cartList.find(product => product.id == productId);\n cartList.push(item);\n sessionStorage.setItem(\"shoppingCartItems\", JSON.stringify(cartList));\n shoppingCartCount();\n populateShoppingCartPage();\n}", "addNewList(name) {\n //Cheking if 'name' is available to use\n if (this.state.todosLists[name] === undefined) {\n let newList = {\n name: `${name}`,\n id: `list${name}`,\n todoCounterIndex: 0,\n todos: [],\n };\n //Adding list to copy of state\n const newListState = [...this.state.todosLists, newList];\n this.setState({ todosLists: newListState });\n } else {\n return;\n }\n }", "addItem(item) {\r\n this.list.push(item);\r\n }", "function addItem(buttonID) {\n\tvar quant = 1;\n\tvar exists = false;\n\tvar name = itemList[buttonID][0];\n\tvar price = itemList[buttonID][1];\n\tif (shopList.length !== 0) {\n\t\tfor (i = 0; i < shopList.length; i ++) {\n\t\t\tif (shopList[i][0] === name) {\n\t\t\t\tshopList[i][2] += quant;\n\t\t\t\texists = true;\n\t\t\t}\n\t\t}\n\t}\n\tconsole.log(shopList);\n\t\n\tif (!exists) {\n\t\tvar newItem = [name, price, quant];\n\t\tshopList.push(newItem);\n\t}\n\tnumItems++;\n\tupdateItemInfo(numItems, name, price);\n\tshopList.sort();\n}", "function addToList(){\n \n\n \n if(inputField.value === ''){\n alert('Please enter the name of the item before adding it.');\n } \n else {\n \n \n const item = `<li class=item>\n <i class=\"far ${tbdStyle}\" onclick=\"toggleClasses(this)\"></i>\n <p class=\"${tbdText}\">${inputField.value}</p>\n <i class=\"fas fa-minus-circle\" onclick=\"removeFromList()\"></i>\n </li>`;\n list.insertAdjacentHTML(\"beforeend\", item);\n inputField.value=\"\";\n }\n \n}", "AddItem() {}", "function addToBasket(detail) { }", "add(state, product) {\n\t state.productList.push(product)\n\t}", "addItem(name, quantity, pricePerUnit) {\n this.items.push({\n name,\n quantity,\n pricePerUnit\n })\n }", "function addToList ()\n{\n\t$(\"#js-shopping-list-form\").submit(function (e) \n {\n e.preventDefault();\n var userInput = $(\"input#shopping-list-entry\").val();\n\n $.trim(userInput);\n\n // Verify user input is valid, prompt if not.\n if (!userInput) \n {\n alert(\"Invalid input, please try again.\");\n $(this).toggleClass(\"error\", 1);\n } \n else \n {\n // Add item to list.\n console.log('Item_Added');\n $('.shopping-list').append('<li><span class=\"shopping-item\">' +\n userInput + '</span><div class=\"shopping-item-controls\">' + '<button class=\"shopping-item-toggle\">' + '<span class=\"button-label\"> check </span></button><button class=\"shopping-item-delete\">' + '<span class=\"button-label\"> delete </span></button></div></li>');\n }\n });\n}", "function addListItem() {\n\tvar inputText = input.value;\n\tvar newContent = document.createElement('li');\n\tnewContent.appendChild(document.createTextNode(inputText))\n\tlist.appendChild(newContent);\n\tinput.value = '';\n}", "function addNewItem() {\n \n const item = window.prompt('What is your new task?','');\n const count = document.getElementById('selectedListOl').\n getElementsByTagName('LI').length;\n \n // let newItem;\n \n if (item) {\n notesItems += `\n <LI><label id=\"label${(count+1)}\"><input type=\"checkbox\" \n id=\"item${(count+1)}\">${item}</label></LI>`;\n \n reRenderDashboard();\n\n // list updated\n edited = true;\n document.getElementById('saveList').disabled = false;\n }\n \n }", "function add (list, bookName) {\n let updatedList = [...list]\n\n updatedList.push(bookName);\n \n return updatedList;\n\n // Add your code above this line\n}", "function addToCurrentList(items){\n const ss = getSpreadSheet(LIST_SHEET);\n const lastRow = ss.getLastRow() + 1; \n const prices = getMealsPrices();\n const currentList = getCurrentList();\n\n // paste all the values in the end of a list\n for(var name in items){\n if (name in currentList || name === SELECT_FILE || items[name].length <= 0) continue;\n if (name === OTHER ) name = items[name];\n var listRange = ss.getRange(lastRow, 1, 1, 3);\n listRange.getCell(1, 1).setValue(name);\n var price = prices[name] ? prices[name] : 0;\n listRange.getCell(1, 3).setValue(price);\n lastRow ++;\n }\n}", "function addNewItem() {\n // Only add a new list item if there is a value in the input\n const newestListItem = document.querySelector('#item-to-add').value;\n if(newestListItem){\n // create an object with the input value as text\n // and a default false value of not checked\n const listObject = {\n text : newestListItem,\n isItDone : false\n };\n // if todoList active\n if (activeListName == 'todoList') {\n // set a default false value for high priority\n listObject.highPriority = false; \n }\n if (activeListName == 'menuPlanner') {\n // set a default none value for day\n listObject.day = 'none';\n }\n console.log(listObject);\n console.log(activeList);\n // add the new list item to the active list array\n activeList.push(listObject);\n // update the localstorage\n localStorage.setItem(activeListName, JSON.stringify(activeList));\n // repopulate the list in the HTML\n repopulateList();\n } else {\n // display error \n console.log('You must write something to add');\n }\n}", "function addListItem(listName, title, fieldValues) {\n\n var siteUrl = getSiteUrl();\n var deferred = $q.defer();\n\n // Build the POST data including the field values passed\n var postData = {\n __metadata: {\n type: \"SP.Data.\" + listName + \"ListItem\"\n },\n Title: title\n };\n for (var val in fieldValues) {\n postData[val] = fieldValues[val];\n }\n\n // Post the data\n $http.post(getSiteUrl() + \"/_api/web/lists/getbytitle('\" + listName + \"')/items\",\n postData, getPostConfig())\n .then(function (response) {\n deferred.resolve(response.data.d);\n })\n .catch(function (response) {\n deferred.reject(response.status);\n });\n\n return deferred.promise;\n }", "function add() {\n let inputValue = document.getElementById(\"inputValue\").value;\n\n if (inputValue != \"\") {\n // add value to Array\n itemsArray.push(inputValue);\n\n // insert value to localStorage array\n // localStorage.setItem(\"items\", JSON.stringify(itemsArray)); //convert JS object to JSON string\n insertData();\n\n var ul = document.getElementById(\"list\");\n var li = document.createElement(\"li\");\n li.appendChild(document.createTextNode(itemsArray[i]));\n\n // alert(\"New Item added successfully\");\n } else {\n alert(\"The value cannot be null..\");\n }\n}", "function addItem(item) {\n $state.go('main.addItem', {item: item, foodListId: $stateParams.foodListId});\n }", "function addBtnClick() {\r\n let itemTextInput = document.querySelector(\"#item\");\r\n let item = itemTextInput.value.trim();\r\n if (item.length > 0) {\r\n enableClearButton(true);\r\n showItem(item);\r\n groceryList.push(item);\r\n\r\n // Save groceryList to localStorage\r\n saveList(groceryList);\r\n }\r\n\r\n // Clear input\r\n itemTextInput.value = '';\r\n}", "function addToDo(newItemInput) {\n\t// Defining Variables for the method\n\tconst position = 'beforeend';\n\tlet text = `\n <li class=\"listItem\">\n <i class=\"${NOTCOMPLETED}\" job=\"complete\"></i> \n <p>${newItemInput}</p>\n <i class=\"fas fa-trash-alt icon\" job=\"trash\"></i>\n </li>`;\n\n\t// Method to insert the HTML\n\ttheList.insertAdjacentHTML(position, text);\n\n\t// Clears the input box after each entry\n\tinputBox.value = '';\n}", "function handleCreateNewList(listName, todoAppData, todoService, todoViewSetter) {\n\t//create new list and add it to the model\n\tlet newList = todoAppData.addList(listName);\n\t//select the new list in the model\n\ttodoAppData.setSelectedList(listName);\n\t//save list to persistance storage\n\ttodoService.saveListsToLocalStore(todoAppData.lists);\n\t//update view for new list\n\tlet newListMenuItemEl = todoViewSetter.addNewList(newList);\n\t//select the new list in the view\n\ttodoViewSetter.setActiveListMenuItem(newListMenuItemEl);\n\ttodoViewSetter.setSelectedList(todoAppData.selectedList);\n}", "doTransaction() {\n if (this.currentList != undefined)\n this.currentList.items[this.itemIndex] = this.newItem;\n }", "function addItem(data) {\n console.log(` Adding: ${data.lastName} (${data.owner})`);\n Items.insert(data);\n}", "function addItem(data) {\n console.log(` Adding: ${data.lastName} (${data.owner})`);\n Items.insert(data);\n}", "addPizza( pizza ){\n this.itemList.push(pizza);\n }", "function addItem() {\n\n}", "onAddItem () {\n const newItem = this.get('bunsenModel').items.type === 'object' ? {} : ''\n const items = this.get('items')\n const index = items.length\n\n items.pushObject(newItem)\n this.notifyParentOfNewItem(newItem, index)\n }", "function ShoppingService(){\n\nthis.list = [];\nvar list = this.list;\n\nthis.saveList = function(amount, name){\n\tvar item = {\n\t\tamount: amount,\n\t\tname: name\n\t};\n\n\tlist.push(item);\n};\n\nthis.remove = function(index){\n\tlist.splice(index, 1);\n}\n\n}", "addList(newList) {\n let addList = new List(newList);\n store.State.lists.push(addList);\n console.log(store.State.lists);\n store.saveState();\n }", "function addList() {\r\n var x = document.getElementById(\"stock_name\").value;\r\n callAPI(x, 0, -1); //calling API to add stock to list\r\n}", "function addOn() {\n var addItem = document.getElementById(\"addItem\").value;\n var addPrice = document.getElementById(\"addPrice\").value;\n\n// send to html\n\nvar el = document.createElement('li');\nel.textContent = addItem;\ndocument.getElementById(\"list\").appendChild(el);\n\nvar el2 = document.createElement('li');\nel2.textContent = addPrice;\ndocument.getElementById(\"price\").appendChild(el2);\n\nprice += addPrice;\n// var sum = document.createElement('p');\n// sum.textContent = price;\n// document.getElementById(\"total\").appendChild(sum);\n}", "function newList(){\n let obj = {\n title: listTitleInput.value,\n listItems: []\n }\n exampleData.push(obj);\n saveData();\n populateDropDownMenu();\n listTitleInput.value='';\n}", "addNewListItem(panelName, title, text, value) {\n let panelIndex = this.getPanel(panelName);\n this.itemTitle(title);\n this.helpText(text);\n this.itemValue(value);\n this.saveButton.scrollIntoView();\n this.saveButton.click();\n }", "function addItem(){\n var a = document.getElementById('a').value;\n var b = document.getElementById('b').value*1;\n var newItems = {name: a, price: b};\n if (a !=''){\n list.push(newItems)}\n}", "function addIngredient() {\r\n \r\n ingredientForList = document.querySelector('#ingredient-for-list').value;\r\n ingredientArr.push(ingredientForList);\r\n let newIngredientItem = document.createElement('li');\r\n newIngredientItem.innerText = ingredientForList;\r\n ingredientList.appendChild(newIngredientItem);\r\n}", "function handleNewItemSubmit(){\n //user inputs a new item in the list - which needs to be stored\n //new item appears/appends onto the original list - generate a new list\n //render new shopping list in DOM each time the user adds a new item\n $('#js-shopping-list-form').submit(function(event) {\n event.preventDefault();\n const newItemName = $('.js-shopping-list-entry').val();\n //console.log(newItemName);\n $('.js-shopping-list-entry').val('');\n addItemToShoppingList(newItemName);\n renderShoppingList();\n });\n}", "add(event, item) {\n event.preventDefault();\n this.props.addToBasket({\n product_id: item.product_id,\n product_name: item.product_name,\n product_images: item.product_images,\n product_price: item.product_price\n })\n }", "function addItem (name, quantity) {\n if(cart[name] == undefined) {\n createItem(name);\n }\n cart[name] = cart[name] + quantity;\n}", "function purchasedItem(listItem) {\n listItem.hide();\n purchased.append(listItem);\n listItem.show('slow');\n }", "function addSelectedItemToCart() {\n // TODO: suss out the item picked from the select list\n let selectedItem = event.target.items.value;\n console.log(selectedItem);\n // TODO: get the quantity\n let quantity = event.target.quantity.value;\n // TODO: using those, add one item to the Cart\n \n \n carts.addItem(selectedItem,quantity); \n console.log(carts.items);\n \n}", "function addItem (item) {\n if (listPeople.length == 0) getPeopleList()\n\n // busco si ya existe para no agregarlo nuevamente\n for (var i = 0; i < listPeople.length; i++) {\n if (item.name === listPeople[i].name) {\n return\n }\n }\n\n listPeople.push(item)\n\n setPeopleList()\n}", "function addItemToList(curElement){\n\t\tvar skuid = $(curElement).attr(\"data-skuid\");\n\t\tvar prodid = $(curElement).attr(\"data-prodid\");\n\t\tvar qty = $(curElement).attr(\"data-qty\");\n\t\tvar resturl = $(curElement).attr(\"data-resturl\");\n\t\tvar quantity = $(\"#\"+qty).val();\n\t\tif(qty==1)\n\t\t{\n\t\t\tquantity=1;\n\t\t}\n\t\tvar jsonResponse = \"\";\n\t\t $.ajax({\n\t\t\ttype: 'POST',\n\t\t\turl: resturl,\n\t\t\tdata: {\"quantity\":quantity,\"productId\":prodid,\"skuId\":skuid},\n\t\t\tdataType: \"JSON\",\n\t\t\tsuccess: function (json) {\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tvar listPrice = $(curElement).attr(\"data-listPrice\");\n\t\t\t\t\tvar salePrice = $(curElement).attr(\"data-salePrice\");\n\t\t\t\t\tvar offer = $(curElement).attr(\"data-offer\");\n\t\t\t\t\tvar upcNumber = $(curElement).attr(\"data-upcNumber\");\n\t\t\t\t\tvar overlay = $('<div id=\"modalDialogBoxBor\"></div>');\n\t\t\t\t\tif(json.atgResponse.statusCode==0){\n\n\t\t\t\t\tif(quantity==1)\n\t\t\t\t\t{\n\t\t\t\t\tvar headerDiv=$('<div class=\"mdboxHeader\"><p>1 item added to your shopping list</p></div>');\n\t\t\t\t\t}\n\t\t\t\t\toverlay.append(headerDiv);\n\t\t\t\t\tvar closemdboxProdDiv=$('<div class=\"closemdboxProd\"><img src=\"/bizcontent/merchandising/productimages/small/'+upcNumber+'.jpg\" alt=\"'+upcNumber+'\"></div>');\n\n\t\t\t\t if(offer==\"null\" || offer==null)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar descriptionDiv=$('<div class=\"closemdboxDesc\"><p class=\"title\">'+json.atgResponse.Items.displayname+'</p><p class=\"size\">Size: '+json.atgResponse.Items.size+' oz<br /><span class=\"qty\">Qty: '+json.atgResponse.Items.qty+'</span></p><br /><b class=\"red\">'+salePrice+'</b><br /><br /></div>');\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tvar descriptionDiv=$('<div class=\"closemdboxDesc\"><p class=\"title\">'+json.atgResponse.Items.displayname+'</p><p class=\"size\">Size: '+json.atgResponse.Items.size+' oz<br /><span class=\"qty\">Qty: '+json.atgResponse.Items.qty+'</span></p><br /><b class=\"red\">'+salePrice+'</b><br /><small class=\"strikethrough\">'+listPrice+'</small><br /><strong class=\"greentxt\">'+offer+'</strong></div>');\n\t\t\t\t\t}\n\t\t\t\t\tvar brLine=$('<br class=\"clear\"/>');\n\t\t\t\t\tvar hrLine=$('<hr class=\"closeMdboxHr\"/>');\n\t\t\t\t\tif(json.atgResponse.ItemsInListCount==1)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar cartDetailsDiv=$('<div class=\"cartDtls_ovrl\" >'+json.atgResponse.ItemsInListCount+' total item</div>');\n\t\t\t\t\t}else{\n\t\t\t\t\t\tvar cartDetailsDiv=$('<div class=\"cartDtls_ovrl\">'+json.atgResponse.ItemsInListCount+' total items</div>');\n\t\t\t\t\t}\n\n\t\t\t\t\tvar buttonDiv=$('<div class=\"shoppingBtns\"><div class=\"floatRight\"><div class=\"floatLeft mt10\"><span><a href=\"#\" class=\"closeOverlay secondaryR\">Continue Shopping</a></span></div> <div class=\"floatLeft\"><span class=\"ml20\"><a href=\"/account/shopping_list.jsp\" class=\"cvsbtn btn-red-lrg\" id=\"list\" name=\"list\" title=\"shoppinglist\" ><span class=\"left\"></span><span class=\"center\">Shopping List</span><span class=\"right-with-arrow\"></span></a></span></div></div></div>');\n\n\t\t\t\t\tvar detailsDiv=$('<div class=\"closemdboxCont\"></div>');\n\n\t\t\t\t\tdetailsDiv.append(closemdboxProdDiv);\n\t\t\t\t\tdetailsDiv.append(descriptionDiv);\n\t\t\t\t\tdetailsDiv.append(brLine);\n\t\t\t\t\tdetailsDiv.append(hrLine);\n\t\t\t\t\tdetailsDiv.append(cartDetailsDiv);\n\t\t\t\t\tdetailsDiv.append(buttonDiv);\n\n\t\t\t\t\toverlay.append(detailsDiv);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tvar headerDiv=$('<div class=\"mdboxHeader\"><p></p></div>');\n\t\t\t\t\t\toverlay.append(headerDiv);\n\t\t\t\t\t\tvar descriptionDiv=$('<div><b class=\"red\">'+json.atgResponse.error+'</b><br /></div>');\n\t\t\t\t\t\tvar detailsDiv=$('<div class=\"closemdboxCont\" ></div>');\n\t\t\t\t\t\tdetailsDiv.append(descriptionDiv);\n\t\t\t\t\t\toverlay.append(detailsDiv);\n\t\t\t\t\t}\n\n\t\t\t\t\t$('#addToCart-overlay .details').html(overlay);\n\n\t\t\t\t} catch (err)\n\t\t\t\t{\n\t\t\t\t\t$('#addToCart-overlay .details').html(\"<div class='error'>Sorry, there was an error processing your request.</div>\");\n\t\t\t\t}\n\n\t\t\t},\n\t\t\terror: function(jqxhr){\n\n\t\t\t},\n\t\t\tcomplete: function(jqxhr, textstatus){\n\t\t\t\tif (jqxhr.status == \"200\")\n\t\t\t\t{\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "function addToList() {\r\n\tvar newItem = \"<li>\" + document.getElementById('listItem').value + \"</li>\";\r\n\r\n\t// Prevents blank inputs\r\n\tif (newItem != \"<li></li>\") {\r\n\r\n\t\t// Adds new item to bottom of list (default)\r\n\t\tif (document.getElementById('bottom').checked) {\r\n\t\t\tmyList.push(newItem); \t\r\n\t\t} \r\n\r\n\t\t// Adds new item to top of list if selected in settings\r\n\t\telse if (document.getElementById('top').checked) {\r\n\t\t\tmyList.unshift(newItem);\r\n\t\t}\r\n\t}\r\n\r\n\tdocument.getElementById('list-content').innerHTML = myList.join(\"\"); // Output updated list\r\n document.getElementById('form').reset();\t// Reset Form - clear listItem input\r\n document.getElementById('listItem').focus(); // Move cursor to listItem input\r\n}", "function addItem(e){\n\tif(e.which==13)//Enter key pressed\n\t{\n\t\tvar input = $(this).val();\n\t\tvar item = \"<li><span class='name'>\" +input+ \"</span><span class='done'><input class='donecheck' type='checkbox'></input></span><span class='remove'><input type='checkbox' class='removecheck'></input></span></li>\";\n\t\t$(this).closest('.shopping-list').find('.list-items').append($(item));\n\t\t$(this).val('');\n\t}\n}", "function addItem() {\n\t\t\tvar order = ordersGrid.selection.getSelected()[0];\n\n\t\t\titensStore.newItem({\n\t\t\t\tpi_codigo: \"new\" + itensCounter,\n\t\t\t\tpi_pedido: order ? order.pe_codigo : \"new\",\n\t\t\t\tpi_prod: \"\",\n\t\t\t\tpi_quant: 0,\n\t\t\t\tpi_moeda: \"R$\",\n\t\t\t\tpi_preco: 0,\n\t\t\t\tpi_valor: 0,\n\t\t\t\tpi_desc: 0,\n\t\t\t\tpi_valort: 0,\n\t\t\t\tpr_descr: \"\",\n\t\t\t\tpr_unid: \"\"\n\t\t\t});\n\t\t\t\n\t\t\titensCounter = itensCounter + 1;\n\t\t}", "addItem(listUl, pokemon) {\n let item = null;\n let img = null;\n item = document.createElement('li');\n item.setAttribute('data-id', pokemon._id);\n item.setAttribute('class', 'm-list__li m-grid__3 m-grid__s__4')\n item.addEventListener('click', this.onPokemonSelect);\n img = new Image();\n img.setAttribute('class', 'm-list__li__img');\n img.src = pathImages + pokemon.Image;\n item.appendChild(img);\n listUl.appendChild(item);\n }", "function addItem(e) {\n\t\tif (e.keyCode == 13) {\n\t\t\tsetInputValue(inputValue);\n\t\t\tconst list = inputList.concat(inputValue);\n\t\t\tsetInputList(list);\n\t\t\tsetInputValue(\"\");\n\n\t\t\tfetch(\"https://assets.breatheco.de/apis/fake/todos/user/13\", {\n\t\t\t\tmethod: \"PUT\",\n\t\t\t\tbody: JSON.stringify(list),\n\t\t\t\theaders: {\n\t\t\t\t\t\"Content-Type\": \"application/json\"\n\t\t\t\t}\n\t\t\t}).then(response => {\n\t\t\t\tif (response.ok) {\n\t\t\t\t\tfetch(\"https://assets.breatheco.de/apis/fake/todos/user/13\")\n\t\t\t\t\t\t.then(response => {\n\t\t\t\t\t\t\tif (!response.ok) {\n\t\t\t\t\t\t\t\tthrow new Error(response.statusText);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn response.json();\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.then(data => setInputList(data))\n\t\t\t\t\t\t.catch(error => console.error(error));\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}", "function addListAfterClick() {\n\n\t\tcreateListElement();\n}", "function addToList(inputItem){\r\n if (inputItem.length > 0) {\r\n $.ajax(\r\n {\r\n url: 'http://157.230.17.132:3019/todos/',\r\n method: 'POST',\r\n data: {\r\n text: inputItem\r\n },\r\n success: function(dataResponse){\r\n getList();\r\n },\r\n error: function(){\r\n alert('Non è possibile aggiungere cose alla lista!')\r\n }\r\n }\r\n );\r\n } else {\r\n alert('Devi scrivere qualcosa prima di fare invio!')\r\n }\r\n }", "function submitAddToWishList(listId) {\n document.getElementById(\"customListId\").value = listId;\n document.forms[\"productForm\"].submit();\n}", "function addNewListName(){\n var tempArr = [];\n if (localStorage.getItem(\"ShoppingListsArrayNames\") != null) {\n tempArr = JSON.parse(localStorage.getItem(\"ShoppingListsArrayNames\"));\n }\n tempArr.push($(\"#SaveListName\").val());\n localStorage[\"ShoppingListsArrayNames\"] = JSON.stringify(tempArr);\n}", "_addNewItem() {\n // Add new Item from Order's Items array:\n this.order.items = this.order.items.concat([this.item]);\n // Update current Order:\n this.orderService.setCurrentOrder(this.order);\n this._closeAddNewItem();\n }", "async createShoppingList(data) {\n const response = await apiReq.post(API_ROUTES.shoppingLists, data);\n return response.data;\n }", "function AddItem() {\n\tlet item_to_add = prompt(\"Please add an item\");{\n\tlet listitem = document.createElement('li');\n\tdiv.appendChild(listitem);\n\tlet shopping_item = document.createTextNode(item_to_add);\n\tlistitem.appendChild(shopping_item);\n\n\t}\n}", "function addItem(listItem) {\n listItem.hide();\n items.append(listItem);\n listItem.show('slow');\n }", "add(slug) {\n\n console.log(\"favoritesList add\");\n // First see if recipe is already present\n let item = this.getItem(slug)\n\n if (item) {\n // Recipe is in favoritesList already; don't do anything\n\n } else {\n // Recipe not in favoritesList, add as new item\n this.items.push({\n slug: slug\n });\n }\n\n this.update();\n }", "function addItemToCart(name, price, count) {\n\n for (var i in shoppingList) {\n if (shoppingList[i].name === name) {\n shoppingList[i].count += count;\n return;\n }\n }\n //THIS WILL ADD ITEM TO ARRAY\n var item = new Item(name, price, count);\n shoppingList.push(item);\n}" ]
[ "0.7390823", "0.73492944", "0.73435456", "0.7271558", "0.7251157", "0.71057373", "0.7060767", "0.70528793", "0.700025", "0.699257", "0.69490236", "0.6935935", "0.6929857", "0.6928292", "0.69147563", "0.6836777", "0.6799491", "0.6749974", "0.67492914", "0.67391473", "0.6738114", "0.6734311", "0.67270756", "0.67270756", "0.672159", "0.6703445", "0.66774774", "0.66749054", "0.667484", "0.66703933", "0.6667065", "0.66623473", "0.6654926", "0.6635871", "0.6627683", "0.66185343", "0.66046935", "0.6587289", "0.65781724", "0.6554684", "0.65488034", "0.6533312", "0.6518677", "0.6518211", "0.65082145", "0.6507901", "0.65007704", "0.649893", "0.6489128", "0.6474856", "0.6464498", "0.64524", "0.6431066", "0.64217025", "0.641809", "0.64134175", "0.6412043", "0.6393561", "0.6389887", "0.63843876", "0.6379507", "0.6377362", "0.63571244", "0.63540083", "0.6342146", "0.6339624", "0.6338055", "0.6338055", "0.6338023", "0.6336452", "0.63312435", "0.6322487", "0.6313698", "0.63127726", "0.6309111", "0.630745", "0.63042736", "0.6300884", "0.62985545", "0.62976325", "0.6293032", "0.6291511", "0.6290966", "0.6281745", "0.62790537", "0.62757665", "0.62697375", "0.6262625", "0.6260441", "0.6250904", "0.6244737", "0.62409323", "0.62393916", "0.6236237", "0.62319046", "0.622738", "0.6220533", "0.6214375", "0.6210276", "0.6209581", "0.6209002" ]
0.0
-1
display current day at top of calender
function displayDate() { let currentDay = $("#currentDay").text(momentVar); return currentDay; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderCurrentDay() {\n currentday.text(curday);\n }", "function displayCurrentDate() {\n\n\t\tvar currentDate = new Date();\n\n\t\tvar day = currentDate.getDay();\n\n\t\tvar date = currentDate.getDate();\n\n\t\tvar month = currentDate.getMonth();\n\n\t\tvar year = currentDate.getFullYear();\n\n\t\t// Pretty similar to the instructions given for the first part\n\t\tif (day == 0) {\n\t\t\tday = \"Sunday\";\n\t\t}\n\n\t\telse if (day == 1) {\n\t\t\tday = \"Monday\";\n\t\t}\n\n\t\telse if (day == 2) {\n\t\t\tday = \"Tuesday\";\n\t\t}\n\n\t\telse if (day == 3) {\n\t\t\tday = \"Wednesday\";\n\t\t}\n\n\t\telse if (day == 4) {\n\t\t\tday = \"Thursday\";\n\t\t}\n\n\t\telse if (day == 5) {\n\t\t\tday = \"Friday\";\n\t\t}\n\n\t\telse if (day == 6) {\n\t\t\tday = \"Saturday\";\n\t\t}\n\n\t\t// Again, same thing like in the instructions\n\t\tif (date < 10) {\n\t\t\tdate = \"0\" + date;\n\t\t}\n\n\t\tif (month == 0) {\n\t\t\tmonth = \"January\";\n\t\t}\n\n\t\telse if (month == 1) {\n\t\t\tmonth = \"February\";\n\t\t}\n\n\t\telse if (month == 2) {\n\t\t\tmonth = \"March\";\n\t\t}\n\n\t\telse if (month == 3) {\n\t\t\tmonth = \"April\";\n\t\t}\n\n\t\telse if (month == 4) {\n\t\t\tmonth = \"May\";\n\t\t}\n\n\t\telse if (month == 5) {\n\t\t\tmonth = \"June\";\n\t\t}\n\n\t\telse if (month == 6) {\n\t\t\tmonth = \"July\";\n\t\t}\n\n\t\telse if (month == 7) {\n\t\t\tmonth = \"August\";\n\t\t}\n\n\t\telse if (month == 8) {\n\t\t\tmonth = \"September\";\n\t\t}\n\n\t\telse if (month == 9) {\n\t\t\tmonth = \"October\";\n\t\t}\n\n\t\telse if (month == 10) {\n\t\t\tmonth = \"November\";\n\t\t}\n\n\t\telse if (month == 11) {\n\t\t\tmonth = \"December\";\n\t\t}\n\n\t\t// Similar to the code to show time but just for date\n\t\tvar dateTodayDiv = document.getElementById('date');\n\t\tdateTodayDiv.innerText = day + \", \" + month + \" \" + date + \", \" + year;\n\n\t}", "function getCurrentDay() {\n $(\"#currentDay\").html(currentHeaderDate);\n}", "function displayCurrentDay() {\n\tlet initMoment = moment().format(\"dddd Do, MMMM YYYY\");\n\t$(\"#currentDay\").text(initMoment);\n}", "function printTime() {\n $(\"#currentDay\").text(todaysDate);\n }", "function today() {\n document.getElementById(\"day\").innerHTML = days[d.getDay()];\n\ndocument.getElementById(\"time\").innerHTML = d.timeNow();\n}", "function update() {\n $('#currentDay').html(moment().format('MMMM Do YYYY, h:mm:ss a'));\n }", "function getCurrentDay() {\n\tconst event = new Date(Date.now());\n\tconst options = { year: \"numeric\", month: \"long\", day: \"numeric\" };\n\tlet currentDay = event.toLocaleDateString(undefined, options);\n\n\t$(\"#currentDay\").text(\"Today's Date: \" + currentDay);\n}", "function updateClock(today) {\n // AM/PM\n side.text = today.getHours() >= 12 ? 'PM' : 'AM';\n // hours and minutes\n myLabel.text = `${today.getHours() % 12 || 12}:${zeroPad(today.getMinutes())}`;\n // day of the week and date\n dayed.text = `${['Sun','Mon','Tue','Wed','Thu','Fri','Sat'][today.getDay()]} ${zeroPad(today.getDate())}`;\n}", "function renderDate() {\n if (myStorage.getItem(\"use24hr\") == \"true\") {\n $(\"#currentDay\").text(moment().format(\"MMMM Do YYYY, H:mm:\"));\n } else {\n $(\"#currentDay\").text(moment().format(\"MMMM Do YYYY, h:mm:\"));\n }\n }", "function renderDate() {\n dateDiv.text(todaysDate)\n}", "function update() {\n\t$(currentDay).html(moment().format('D. MMMM YYYY H:mm:ss a'));\n }", "function time() {\n\t$('#currentDay').text(moment().format('LLLL'));\n}", "function displayTime() {\n var rightNow = moment().format('LLLL');\n currentDayEl.text(rightNow);\n}", "function displayDate() {\n // variable for date formatted day, month, day, year\n var date = now.format(\"dddd, MMMM Do YYYY\");\n // update text to show date\n currentDayEl.text(date);\n}", "function init(){\n $(\"#currentDay\").append(todayComposite);\n addTimeBlocks();\n }", "function showTimeDay() {\r\n var today = new Date();\r\n var time = today.getHours() + \":\" + today.getMinutes(); //getting time \r\n\r\n document.getElementById('topTime').innerHTML = time\r\n\r\n document.getElementById('time').innerHTML = time; //showing time on page\r\n\r\n var weekDays = [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"];//array of days\r\n document.getElementById('day').innerHTML = weekDays[today.getDay()] // showing todays day on page\r\n\r\n}", "function getHeaderDate() {\n //create a variable for the current date\n var currentDate = now.format(\"dddd, MMMM Do\");\n // Set date to Current day ID\n $(\"#currentDay\").text(currentDate);\n}", "function showdate() {\r\n \tdocument.getElementById(\"eventFunctions\").innerHTML = Date()\r\n }", "function displayDate() {\r\n currentDate.innerHTML = daysInWeek[currentDayInWeek] + ', ' + currentDay + 'th';\r\n}", "function GetTodayDate() {\n var months = ['January','February','March','April','May','June','July','August','September','October','November','December']; // Month name array\n var weekday = [\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"]; // weekday name array\n\n var todayDate = new Date(); //initialise object for current date\n var dayName = weekday[todayDate.getDay()]; //yields day name\n var dd = todayDate.getDate(); //yields date\n var MM = months[todayDate.getMonth()]; //yields month name\n var yyyy = todayDate.getFullYear(); //yields year\n\n var currentDate = dd + \" \" + MM + \" \" + yyyy; // Format for date display [ 11 March 2019]\n\n document.getElementById(\"todayDate\").innerHTML = currentDate;\n document.getElementById(\"dayName\").innerHTML = dayName;\n }", "function displayTime() {\n var curr = moment().format(\"MM-DD-YYYY HH:mm:ss\");\n currentDayEl.text(curr);\n}", "function currentTime() {\n let day = moment().format(\"MMM Do YYYY, HH:mm:ss\");\n currentDay.text(day);\n}", "function update() {\n $('#currentDay').html(moment().format('dddd, MMMM Do YYYY, h:mm:ss a'));\n}", "function setToday() {\n setDate(appstate.lastdate.getFullYear(),\n appstate.lastdate.getMonth() + 1,\n appstate.lastdate.getDate());\n $('#settoday').css('display', 'none');\n}", "function displayDateTime() {\n $(\"#currentDay\").text(\"Today is: \" + moment().format(\"dddd, MMMM Do YYYY\"));\n $(\"#currentTime\").text(\"Time is now: \" + moment().format(\"h:mm:ss A\"));\n }", "function renderCurrentDay() {\n var currentDay = moment().format(\"dddd, MMMM Do, YYYY\");\n $(\"#currentDay\").text(currentDay).attr(\"data-day\", moment().format(\"D\"));\n}", "function timeDis() {\n $(\"#currentDay\").text(date);\n}", "function setCalendarHeader(){\n let indexOfToday = $('.today').index(); \n switch (indexOfToday) {\n case 1:\n $(dayName[indexOfToday]).text(today.toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday + 1]).text(new Date((new Date()).valueOf() + 1000 * 3600 * 24).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday + 2]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 2)).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday + 3]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 3)).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday + 4]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 4)).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday + 5]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 5)).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday - 1]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 6)).toLocaleString('en-us', { weekday: 'long' }));\n FridayController(dayName[indexOfToday])\n SaturdayController(dayName[indexOfToday + 1])\n SundayController(dayName[indexOfToday +2 ])\n MondayController(dayName[indexOfToday + 3])\n TuesdayController(dayName[indexOfToday + 4])\n WednesdayController(dayName[indexOfToday + 5])\n ThursdayController(dayName[indexOfToday - 1])\n break;\n \n case 2:\n $(dayName[indexOfToday]).text(today.toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday + 1]).text(new Date((new Date()).valueOf() + 1000 * 3600 * 24).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday + 2]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 2)).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday + 3]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 3)).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday + 4]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 4)).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday - 2]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 5)).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday - 1]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 6)).toLocaleString('en-us', { weekday: 'long' }));\n FridayController(dayName[indexOfToday -1])\n SaturdayController(dayName[indexOfToday])\n SundayController(dayName[indexOfToday + 1])\n MondayController(dayName[indexOfToday + 2])\n TuesdayController(dayName[indexOfToday + 3])\n WednesdayController(dayName[indexOfToday + 4])\n ThursdayController(dayName[indexOfToday - 2])\n break;\n \n case 3:\n $(dayName[indexOfToday]).text(today.toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday + 1]).text(new Date((new Date()).valueOf() + 1000 * 3600 * 24).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday + 2]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 2)).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday + 3]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 3)).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday - 3]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 4)).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday - 2]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 5)).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday - 1]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 6)).toLocaleString('en-us', { weekday: 'long' }));\n FridayController(dayName[indexOfToday - 2])\n SaturdayController(dayName[indexOfToday - 1])\n SundayController(dayName[indexOfToday])\n MondayController(dayName[indexOfToday + 1])\n TuesdayController(dayName[indexOfToday + 2])\n WednesdayController(dayName[indexOfToday + 3])\n ThursdayController(dayName[indexOfToday - 3])\n break;\n \n case 4:\n $(dayName[indexOfToday]).text(today.toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday + 1]).text(new Date((new Date()).valueOf() + 1000 * 3600 * 24).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday + 2]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 2)).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday - 4]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 3)).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday - 3]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 4)).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday - 2]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 5)).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday - 1]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 6)).toLocaleString('en-us', { weekday: 'long' }));\n FridayController(dayName[indexOfToday - 3])\n SaturdayController(dayName[indexOfToday - 2])\n SundayController(dayName[indexOfToday - 1])\n MondayController(dayName[indexOfToday])\n TuesdayController(dayName[indexOfToday + 1])\n WednesdayController(dayName[indexOfToday + 2])\n ThursdayController(dayName[indexOfToday - 4])\n break;\n \n case 5:\n $(dayName[indexOfToday]).text(today.toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday + 1]).text(new Date((new Date()).valueOf() + 1000 * 3600 * 24).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday - 5]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 2)).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday - 4]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 3)).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday - 3]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 4)).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday - 2]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 5)).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday - 1]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 6)).toLocaleString('en-us', { weekday: 'long' }));\n FridayController(dayName[indexOfToday - 4])\n SaturdayController(dayName[indexOfToday - 3])\n SundayController(dayName[indexOfToday - 2])\n MondayController(dayName[indexOfToday - 1])\n TuesdayController(dayName[indexOfToday])\n WednesdayController(dayName[indexOfToday + 1])\n ThursdayController(dayName[indexOfToday - 5])\n break;\n \n case 6:\n $(dayName[indexOfToday]).text(today.toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday - 6]).text(new Date((new Date()).valueOf() + 1000 * 3600 * 24).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday - 5]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 2)).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday - 4]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 3)).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday - 3]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 4)).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday - 2]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 5)).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday - 1]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 6)).toLocaleString('en-us', { weekday: 'long' }));\n FridayController(dayName[indexOfToday - 5])\n SaturdayController(dayName[indexOfToday - 4])\n SundayController(dayName[indexOfToday - 3])\n MondayController(dayName[indexOfToday - 2])\n TuesdayController(dayName[indexOfToday -1])\n WednesdayController(dayName[indexOfToday])\n ThursdayController(dayName[indexOfToday - 6])\n break;\n \n default:\n $(dayName[indexOfToday]).text(today.toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday + 1]).text(new Date((new Date()).valueOf() + 1000 * 3600 * 24).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday + 2]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 2)).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday + 3]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 3)).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday + 4]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 4)).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday + 5]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 5)).toLocaleString('en-us', { weekday: 'long' }));\n $(dayName[indexOfToday + 6]).text(new Date((new Date()).valueOf() + ((1000 * 3600 * 24) * 6)).toLocaleString('en-us', { weekday: 'long' }));\n FridayController(dayName[indexOfToday + 1])\n SaturdayController(dayName[indexOfToday + 2])\n SundayController(dayName[indexOfToday + 3])\n MondayController(dayName[indexOfToday + 4])\n TuesdayController(dayName[indexOfToday + 5])\n WednesdayController(dayName[indexOfToday + 6])\n ThursdayController(dayName[indexOfToday])\n break;\n }\n }", "function displayCurrentDate() {\n var currentDate = moment().format(\"YYYY-MMMM-DD\");\n $(\"#currentDay\").text(currentDate);\n}", "function init() {\n currentDayEl.textContent=today; \n loop(); \n renderEvents();\n}", "function displayTime(){\r\n\tvar elt = \"#day\";\r\n\tvar now = new Date();\r\n\t$(elt).append(now.getDate()+\"/\"+(now.getMonth()+1) + \"/\"+now.getFullYear()+\" \"+(now.getHours())+\":\"+(now.getMinutes()+1)+\":\"+(now.getSeconds()+1));\r\n\r\n}", "function dayView(e) {\n\tvar self = Ti.UI.createView({\n\t\twidth : e.width,\n\t\theight : e.height,\n\t\tcurrent : e.current,\n\t\tcolor : e.color,\n\t\tbackgroundColor : util.CalendarWindowColor.BACKGROUND_COLOR,\n\t\tborderColor : util.CalendarWindowColor.BORDER_COLOR,\n\t\tborderWidth : '1dp'\n\t});\n\n\tvar dayLabel = Ti.UI.createLabel({\n\t\ttext : e.day,\n\t\ttextAlign : 'center',\n\t\tcolor : e.current == 'yes' ? 'black' : '#888888',\n\t\tcurrent : e.current,\n\t\tfont : {\n\t\t\tfontSize : e.fontSize,\n\t\t\tfontWeight : 'bold'\n\t\t}\n\t});\n\n\tif (e.taskcount) {\n\t\tvar taskNotifier = Ti.UI.createLabel({\n\t\t\ttext : e.taskcount,\n\t\t\ttextAlign : 'center',\n\t\t\tright : '2dp',\n\t\t\ttop : '2dp',\n\t\t\t//backgroundColor : util.CalendarWindowColor.BACKGROUND_COLOR,\n\t\t\tcolor : 'black',\n\t\t\tfont : {\n\t\t\t\tfontSize : 9,\n\t\t\t\tfontWeight : 'bold'\n\t\t\t}\n\t\t});\n\t\tself.add(taskNotifier);\n\t}\n\n\tself.text = dayLabel.text;\n\n\tself.add(dayLabel);\n\n\treturn self;\n}", "function addDate() {\n var currentDay = moment().format('LLLL');\n $(\"currentDay\").text(currentDay)\n }", "function displayDay() {\n var day;\n \n switch (new Date().getDay()) {\n case 0: \n day = \"Sunday\";\n break;\n case 1: \n day = \"Monday\";\n break;\n case 2:\n day = \"Tuesday\";\n break;\n case 3:\n day = \"Wednesday\";\n break;\n case 4:\n day = \"Thursday\";\n break;\n case 5:\n day = \"Friday\";\n break;\n case 6:\n day = \"Saturday\";\n break;\n }\n \n var dayDiv = document.getElementById('day');\n dayDiv.innerText = day;\n }", "function showDate()\n{\n var currentDate = new Date();\n var day = currentDate.getDate();\n var month = currentDate.getMonth();\n month = month+1;\n var year = currentDate.getFullYear();\n clearTimeout(t);\n document.getElementById('clock').innerHTML = day + \"/\" + month + \" \" + year;\n}", "function runClock (){\r\n//7. display date\r\n\r\nvar currentDay = new Date();\r\nvar date = currentDay.toLocaleDateString();\r\nvar time = currentDay.toLocaleTimeString();\r\n//display current time\r\ndocument.getElementById(\"header_title\").innerHTML = document.title +\"<br/>\" + date + \"<br/>\" + time;\r\n}", "function renderHeader() {\n\n var today = new Date();\n //alert(\"today: \" + today);\n var day = moment(today).date();\n\n var month = getMonth(moment(today).month());\n //var year = moment(today).year();\n\n var year = moment(today).year();\n \n // create today's date to be used as a key for storing the work schedule on local storage\n todayDate = day + \"/\" + month + \"/\" + year;\n //alert(\"todayDate: \" + todayDate);\n \n var weekDay = getWeekDay(moment(today).weekday());\n\n var currentDayVal = weekDay + \", \" + month + \" \" + day;\n $(\"#currentDay\").text(currentDayVal);\n}", "function Day(parent){var _this=_super.call(this,parent)||this;_this.viewClass='e-day-view';return _this;}", "function showTodaysDate() {\n var today = new Date();\n var dd = String(today.getDate()).padStart(2, '0');\n var mm = String(today.getMonth() + 1).padStart(2, '0');\n var yyyy = today.getFullYear();\n var date = dd + \"/\" + mm + \"/\" + yyyy;\n $('#dateDiv').html('Date : ' + date);\n }", "function currTime() {\n var dt = dateFilter(new Date(), format,'-0800');\n element.text(dt);\n // element point to line 11 span element\n }", "function displayDate() {\n var currentDay = new Date();\n var month;\n var date = currentDay.getDate();\n var year = currentDay.getFullYear();\n \n switch (currentDay.getMonth()) {\n case 0:\n month = \"January\";\n break;\n case 1:\n month = \"February\";\n break;\n case 2:\n month = \"March\";\n break;\n case 3:\n month = \"April\";\n break;\n case 4:\n month = \"May\";\n break;\n case 5:\n month = \"June\";\n break;\n case 6:\n month = \"July\";\n break;\n case 7:\n month = \"August\";\n break;\n case 8:\n month = \"September\";\n break;\n case 9:\n month = \"October\";\n break;\n case 10:\n month = \"November\";\n break;\n case 11:\n month = \"December\";\n break;\n }\n var dateDiv = document.getElementById('date');\n dateDiv.innerText = month + \" \" + date + \", \" + year;\n }", "function currentDay () {\n var currentDay = moment().format('dddd, MMMM Do YYYY, h:mm:ss a')\n $('#currentDay').html(currentDay)\n}", "function showDate()\r\n{\r\n\tvar today=new Date();\r\n\tvar displayDate = checkTime(today.getDate()) + '/' + checkTime(today.getMonth()+1) + '/' + today.getFullYear();\r\n\t$(\"#menu-date\").html(displayDate);\r\n}", "function calendarBeforeShowDayEdit(day) {\n return calendarBeforeShowDay(day, busy_at_edit, $(this));\n}", "setTitle2(date) {\n let currentDate = new Date();\n currentDate.setHours(0, 0, 0, 0);\n let cpd = new Date(date);\n cpd.setHours(0, 0, 0, 0);\n let diff = (currentDate.getTime() - cpd.getTime()) / (1000 * 3600 * 24);\n let t = '';\n if (diff == 0) t = \"Today\";else if (diff == 1) t = \"Yesterday\";else if (diff == -1) t = \"Tomorrow\";else t = cpd.toLocaleString('default', {\n weekday: 'long'\n }) + ', ' + cpd.toLocaleString('default', {\n month: 'long'\n }).substr(0, 3) + ' ' + cpd.getDate();\n return t;\n }", "function currentTime() {\n var date = new Date();\n var day = date.getDay();\n var hours = date.getHours();\n var minutes = date.getMinutes();\n var seconds = date.getSeconds();\n\n var days = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'];\n\n var i;\n for (i=0; i < days.length; i++) {\n if (i == day) {\n document.getElementById('ex_1a').innerHTML = \"Today is: \" + days[i-1];\n\n \n i ++;\n }\n\n }\n if (hours <= 12 ) {\n document.getElementById('ex_1b').innerHTML = \"\\nCurrent time is: \" + hours + \" AM \" + minutes + \" : \" + seconds; \n }\n else {\n document.getElementById('ex_1b').innerHTML = \"\\nCurrent time is: \" + hours + \" PM : \" + minutes + \" : \" + seconds; \n }\n\n}", "function renderDate(){\n // Show current day\n var today = moment().format('Do MMMM YYYY');\n $(\".date0\").text(today);\n let dayArray = []\n for (i = 1 ; i < 5 ; i++){\n dayArray[i] = moment().add(i,'days').format('Do MMMM YYYY');\n $(\".date\"+i).text(dayArray[i]);\n }\n \n }", "function showTodaysDate() {\n const currentDayEl = $('#currentDay');\n currentDayEl.text(moment().format('dddd, MMMM Do YYYY'));\n}", "function renderDay() {\n currentDay.innerHTML = `<h1>${moment().format('MMMM Do YYYY, h:mm:ss a')}</h1>`\n setInterval(renderDay, 1000);\n}", "function display(){\n\t$(\"#month\").html(getMonthName(currentDate.getMonth()));\n\t$(\"#year\").html(currentDate.getFullYear());\n\tfor(i=0;i<7;i++){\n\t\tif(week[i].getDate()==currentDate.getDate()){ //Add active class to day active\n\t\t\t$('#day'+i).html('<div class=\"day-active mx-auto\" >'+week[i].getDate()+'</div>');\n\t\t}else{\n\t\t\t$('#day'+i).html(week[i].getDate());\n\t\t}\n\t}\n\tgetWeekDescription()\t\n}", "function dateCurrent(){\n var today = new Date();\n var dd = today.getDate();\n var mm = today.getMonth()+1; //January is 0!\n var yyyy = today.getFullYear();\n if(dd<10) {\n dd = '0'+dd\n }\n if(mm<10) {\n mm = '0'+mm\n }\n var d = new Date(); // for now\n var hours = today.getHours();\n var mins = today.getMinutes();\n var secs = today.getSeconds();\n if(hours<10){\n hours=\"0\"+hours;\n }\n if(mins<10){\n mins=\"0\"+mins;\n }\n if(secs<10){\n secs=\"0\"+secs;\n }\n today = yyyy+\"-\"+mm+\"-\"+dd+\" \"+hours+\":\"+mins+\":\"+secs;\n $('#current-time').text(today);\n } //end of dateCurrent()", "function showDate(choose){\n var chooseTimeZone = choose;\n chooseTimeZone.setMinutes(chooseTimeZone.getMinutes() - timeZoneToday);\n var local = $('#local').data('local')\n var options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' };\n $('#date-choose').html(chooseTimeZone.toLocaleDateString(local, options));\n if (dateOpen.length){\n $.each(dateOpen, function(i, d) {\n var day = new Date(d.day.date.slice(0, 10));\n if (choose.getDate() == day.getDate() && choose.getMonth() == day.getMonth() && choose.getFullYear() == day.getFullYear()){\n $('#nb-places').html(1000 - d.nbVisitor);\n return false;\n }\n $('#nb-places').html('1000');\n });\n } else {\n $('#nb-places').html('1000');\n }\n $('#choose').css('display', 'block');\n // \n if ((choose.getDate() == today.getDate() && choose.getMonth() == today.getMonth() && choose.getFullYear() == today.getFullYear() && today.getHours() > 13)){\n $('#button-day').css('display', 'none');\n } else {\n $('#button-day').css('display', 'inline-block');\n }\n $('#button-half-day').css('display', 'inline-block');\n }", "function clock() {\n var dateString = moment().format('MMMM Do YYYY, h:mm:ss a');\n $('#currentDay').html(dateString);\n}", "function showDate() {\n const d = new Date()\n const today = document.getElementById('today')\n\n today.innerHTML = d\n}", "function displayDate(){\n //Get current date \n currentDateElement.text(moment().format('dddd, MMMM Do YYYY'));\n}", "function setCurrentDate () {\n const options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' };\n document.querySelector(\"#current-date\").innerHTML = new Date().toLocaleDateString('en-GB', options);\n}", "function displayDate() {\r\n var now = moment().format('MMMM Do YYYY, h:mm:ss');\r\n $('#currentDay').html(now)\r\n setTimeout(displayDate, 1000);\r\n}", "function updateDate(){\n LetterDay.changeDay(curDay);\n Schedule.changeDay(curDay);\n refresh();\n }", "function showCalender() {\n const time = document.getElementById(\"calendar-time\");\n setInterval(() => {\n time.innerHTML = fetchTimeWithSeconds().toUpperCase();\n }, 1000);\n reloadCalenderContent();\n $(\"div.calender-container\").css(\"z-index\", \"500\");\n $(\"div.calender-container\").css(\"opacity\", \"1\");\n $(\"div.calender-container\").toggle();\n}", "function HeaderCalendar_Daily()\n{\n\tif (boolSaveChanges || bSelectChanged)\n\t{\n\t\tSaveChanges(\"MoveToHeaderCalendar_Daily()\", \"Daily\");\n\t}\n\telse\n\t{\n\t\tMoveToHeaderCalendar_Daily();\n\t}\n}", "function displayDate(){\n\tdocument.getElementById(\"demo\").innerHTML=Date();\n}", "function clock() {\n var currTime = moment().format('MMMM Do YYYY, h:mm:ss a');\n $('#currentDay').html(currTime);\n}", "function loadAroundCurrentDate(currentDate)\n{\n\tcalendarTable.innerHTML = '';\n\tfirstMonthDay = new Date(currentDate);\n\n\t// moves firstMonthDay to the beginning of the week\n\twhile(firstMonthDay.getDay() != 0) firstMonthDay.setDate(firstMonthDay.getDate() - 1);\n\n\t// sets lastMonthDay to the day before firstMonthDay\n\tlastMonthDay = new Date(firstMonthDay);\n\tlastMonthDay.setDate(firstMonthDay.getDate() - 1);\n\tlastWeek();//generates the current week\n\twhile(documentScrollHeight() <= window.innerHeight)\n\t{\n\t\tfirstWeek();\n\t\tlastWeek();\n\t}\n\n\tsetTimeout('scrollToToday()', 50);\n}", "function refreshCurrentDate() {\n\t\t\t\tdateCurrent = getDateInRange(dateCurrent, dateShadow, before, after);\n\t\t\t}", "function getCurrentTime(){\r\n const today = new Date()\r\n const days = new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday')\r\n const currentDay = days[today.getDay()]\r\n const months = new Array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December')\r\n const currentMonth = months[today.getMonth()]\r\n const currentTime = today.toLocaleTimeString(\"en-us\", {timeStyle: \"short\"})\r\n dateTime.innerHTML = `\r\n ${currentDay}, ${today.getDate()} ${currentMonth} ${today.getFullYear()}\r\n <br/>\r\n <span> ${currentTime} </span>\r\n `\r\n}", "gotoDate (currentDate) {\n this.calendar.gotoDate(currentDate);\n }", "function display() {\n var thisDay = today.getDay();// lấy thứ theo số thứ tự của mảng 0-6, lưu giá trị hiển thị\n var thisMonth = today.getMonth();// lấy tháng theo index 0-11, lưu giá trị hiển thị\n var thisYear = today.getFullYear();// lấy năm đủ 4 chữ số, lưu giá trị hiển thị\n var thisDate = today.getDate();// lấy ra ngày 1-31, lưu giá trị hiển thị\n var nowDate = now.getDate();// lay ngay\n console.log(nowDate);\n var nowMonth = now.getMonth();// lay thang\n var nowYear = now.getFullYear();// lay nam\n var text = \"\";\n\n if (nowYear % 4 == 0) month_day[1]=29;\n console.log(nowYear);\n var first_date = new Date(thisYear, thisMonth, 1);// trả về kết quả đầy đủ h, ngày 1 tháng năm ở thời điểm được trỏ tới\n var first_day = first_date.getDay();// trả về thứ của ngày mùng 1 = so\n console.log(first_day);\n title = month_name[thisMonth] + ' ' + thisYear;\n document.getElementById('title').innerHTML = title;\n text += '<table border = 2 style=\"height: 300px;width: 440px;\">';\n text += '<tr><td style=\"color: orangered;\">' + \"Sunday\" + '</td><td style=\"color: orangered;\">' + \"Monday\" + '</td><td style=\"color: orangered;\">' + \"Tuesday\" + '</td><td style=\"color: orangered;\">' + \"Wednesday\" + '</td><td style=\"color: orangered;\">' + \"Thursday\" + '</td><td style=\"color: orangered;\">' + \"Friday\" + '</td><td style=\"color: orangered;\">' + \"Saturday\" + '</td></tr>';\n text+='<tr>';\n for (i = 0; i < first_day; i++) {\n console.log(i);\n console.log(first_day);\n text += \"<td> </td>\";\n }\n date = 1;\n while (date <= month_day[nowMonth]){\n for (j = first_day; j < 7; j++) {\n if ( date <= month_day[thisMonth]){\n if (nowDate == date && nowMonth == thisMonth && nowYear == thisYear){\n text +='<td id = \"nowDate\"><b style=\"color: orangered;\">' + date + '</b></td>';\n }else {\n text +='<td class = \"date\">' + date + '</td>';\n }\n } else {\n text += \"&nbsp\";\n }\n date++;\n }\n text += '</tr>';\n first_day = 0;\n }\n text += '</table>';\n document.getElementById(\"display\").innerHTML = text;\n}", "function beginningOfToday(date)\r\n{\r\n // log(date.toString().replace(/..:..:../, '00:00:00'));\r\n return new Date(date.toString().replace(/..:..:../, '00:00:00'));\r\n}", "function todaysDate() {\n var date = `${moment().format('dddd')}, ${moment().format('ll')}`;\n $(\"#currentDay\").append(date);\n}", "function onGanttRender_todayLine(today) {\n return function f() {\n var $today = $(\"#campaignchain_gantt_today\");\n if (!$today.length) {\n var elem = document.createElement(\"div\");\n elem.id = \"campaignchain_gantt_today\";\n gantt.$task_data.appendChild(elem);\n $today = $(elem);\n }\n var x_start = gantt.posFromDate(moment(today).zone(window.campaignchainTimezoneOffset));\n var x_end = gantt.posFromDate(moment(today).zone(window.campaignchainTimezoneOffset).add('day',1));\n $today.css(\"left\", Math.floor(x_start + 0.5 * (x_end - x_start)) + \"px\");\n };\n}", "function displayTime() {\n var today = new Date();\n \n //gathers information about current hour, min and sec. \n //Add zero at the head if it is a single digit number.\n var currentHour = addZero(today.getHours());\n var currentMin = addZero(today.getMinutes());\n var currentSec = addZero(today.getSeconds());\n \n // for formatting the display.\n hourElement.innerHTML = currentHour + \":\";\n minElement.innerHTML = currentMin + \":\";\n secElement.innerHTML = currentSec;\n }", "function addToday() {\n tomorrowView.classList.add(\"hidden\");\n laterView.classList.add(\"hidden\");\n todayViewList.classList.add(\"hidden\");\n todayAddButton.classList.add(\"hidden\");\n helpIcon.classList.add(\"hidden\");\n if (textForm.classList.contains(\"hidden\")) {\n textForm.classList.remove(\"hidden\");\n }\n var tempDate = new Date();\n dueDate = new Date(tempDate.getFullYear(),tempDate.getMonth(),tempDate.getDate());\n}", "function current() {\n let date = new Date();\n const week = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];\n let today = week[new Date().getDay()]\n let hours = date.getHours();\n // might need to adjust the conditonal for minight which is 0\n (hours > 12) ? hours += ' PM' : hours += ' AM';\n let minutes = date.getMinutes();\n let seconds = date.getSeconds();\n console.log(`Today is: ${today}`);\n console.log(`Current time is: ${hours}: ${minutes}: ${seconds}`);\n}", "function getDailyView() { return 'daily'; }", "function displayDate() {\n document.getElementById(\"o\").innerHTML = Date();\n}", "function goToToday(){\r\n\tvar tempDate = new Date;\r\n\tintYear = tempDate.getFullYear();\r\n\tlistReminders();\r\n\tinitialise();\n\r\n}", "function currentDay(){\r\n\tconst months = [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"];\r\n\tconst days = [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"];\r\n\tconst time = new Date();\r\n\t\r\n\treturn `${days[time.getDay()]},${time.getDate()} ${months[time.getMonth()]}`\r\n}", "highlightToday() {\n\n // find all day squares\n var days = C('day-square');\n\n // deletes all of the \n for (var i = 0; i < days.length; i++)\n days[i].classList.remove('today');\n\n // if it is the correct month and year, highlights the today's date\n if((this.month == this.today.getMonth()) && (this.year == this.today.getFullYear())) \n days[this.today.getDate() + this.monthInfo.firstDayOfWeek - 1].classList.add('today');\n \n }", "function headerDate() {\n var currentHeaderDate = moment().format('dddd, MMMM Do');\n $(\"#currentDay\").text(currentHeaderDate);\n}", "function ShowCalendarPopup(date) {\n\tClearPopupFormValues();\n\t$('#popupCalendarForm').show();\n $('#eventSummary').focus();\n}", "function runClock() {\r\n\r\n\t// Store the current date and time //\r\n\tvar currentDay = new Date();\r\n\tvar dateStr = currentDay.toLocaleDateString();\r\n\tvar timeStr = currentDay.toLocaleTimeString();\r\n\r\n\t// Display the current date and time //\r\n\tdocument.getElementById(\"dateNow\").innerHTML = dateStr + \"<br/>\" + timeStr;\r\n\r\n\r\n}", "function currentDate() {\n let date = moment().format(\"dddd MMMM Do YYYY \");\n $(\"#date\").html(\"<h5>\" + date + \"</h5>\");\n }", "function getToday() {\n // function addLeadingZeros (n, length){\n return dateFormatx('id',lpadZero(dd,2),monthFormat(mm),yyyy);\n }", "function currentDate() {\r\n var date = new Date();\r\n jQuery(\"#js-date\").html(date.getFullYear());\r\n }", "function calendarBeforeShowDayCreate(day) {\n return calendarBeforeShowDay(day, busy_at_create, $(this));\n}", "function dayTime() {\n // set the current time format\n currentTime = moment().format('dddd, MMMM Do YYYY, h:mm:ss a');\n\n // Empty the curent day element\n $('#currentDay').empty();\n\n // Display the current time\n $('#currentDay').text(currentTime);\n}", "function resume(){\n\ttempDate = getRightNow();\n\tdrawCalendar(tempDate);\n}", "function displayTime() {\n currDate = moment().format(\"dddd, MMMM Do YYYY, h:mm:ss a\");\n currentDayEl.html(currDate);\n currM = moment().format('m');\n currh = parseInt(moment().format(\"H\"));\n if(parseInt(currM)+0 === 0 && currh > prevHour){ /// This check is set the active hour automatically\n setBGClass();\n }\n}", "function showCalendarBubble()\r\n{\r\n var calendarBubble = $(\"#calendar\");\r\n var calendarBubbleClose = $(\"#calendar .close\");\r\n var input = document.lastCalendarInput;\r\n var date = formatCalendarInput(input.val());\r\n var earliestDate = input.earliestDate();\r\n var defaultDate;\r\n var farthestDate = input.farthestDate();\r\n\r\n delete input.lastCalendarTimeoutID;\r\n if (date != input.lastDate)\r\n {\r\n input.lastDate = date;\r\n defaultDate = parseDate(date);\r\n if (defaultDate == null)\r\n {\r\n defaultDate = input.defaultDate();\r\n }\r\n else if ((defaultDate < earliestDate) || (defaultDate > farthestDate))\r\n {\r\n defaultDate = input.defaultDate();\r\n }\r\n renderCalendarBubble(defaultDate, earliestDate, farthestDate);\r\n }\r\n}", "function displayCurrentDate() {\nvar currentDate = moment().format(\"dddd, MMMM Do YYYY, h:mm:ss a\");\n$(\"#currentDay\").text(currentDate);\nconsole.log(currentDate);\n}", "function calDisplay()\n{\nweek=7;\nselDate= new Date(opener.user_sel_val_holder);\ntoday = new Date(arguments[0]);\ncurrentVal = new Date(opener.cal_val_holder);\n// as of Danube, PT needs all the dates, including weekend dates, to be\n// hyperlinked in the Calendar for its Date type attributes, whereas PD\n// doesn't want weekend dates to be hyperlinked.\nhyperLinkWeekEndDates = arguments[1] == null ? false : arguments[1];\ncurr_day= today.getDate();\nsel_day= selDate.getDate();\nend_date= getEndDate(currentVal);\ncurrentVal.setDate(end_date);\nend_day=currentVal.getDay();\ncurrentVal.setDate(1);\nstart_day=currentVal.getDay();\nrow=0;\nend_week=week-end_day;\ndocument.writeln(\"<tr>\");\nfor (var odday=0;odday<start_day;odday++,row++)\n{\ndocument.writeln(\"<td class=\\\"\"+css[3]+\"\\\">&nbsp;</td>\");\n}\n\nfor (var day=1;day<=end_date;day++,row++)\n{\nif(row == week)\n{\ndocument.writeln(\"</tr> <tr> \");\nrow=0;\n}\ndocument.writeln(\"<td class=\\\"calendarday\\\"\");\nif(curr_day == day && currentVal.getMonth() == today.getMonth() && currentVal.getFullYear() == today.getFullYear())\ndocument.writeln(\" id=\\\"today\\\" > \");\nelse if(sel_day == day && currentVal.getMonth() == selDate.getMonth() && currentVal.getFullYear() == selDate.getFullYear())\ndocument.writeln(\" id=\\\"selectedDate\\\" > \");\nelse\ndocument.writeln(\" > \");\n\nif(isWeekend(day,currentVal) && !hyperLinkWeekEndDates)\ndocument.writeln(day+\"</td>\");\nelse\n if(sel_day == day)\n document.writeln(\"<a href=\\\"javascript:selectPeriod(\"+day+\",\"+currentVal.getMonth()+\",\"+currentVal.getFullYear()+\");\\\"; title=\\\"\"+ arguments[2]+\" \\\" >\"+day+\"</a></td>\");\n else\n document.writeln(\"<a href=\\\"javascript:selectPeriod(\"+day+\",\"+currentVal.getMonth()+\",\"+currentVal.getFullYear()+\");\\\" >\"+day+\"</a></td>\");\n}\n\nfor (var end=0;end<(end_week-1);end++)\n{\ndocument.writeln(\"<td class=\\\"\"+css[3]+\"\\\">&nbsp;</td>\");\n}\ndocument.writeln(\"</tr>\");\n\n\n}", "function DateNow(){\n var today = new Date();\n var day = today.getDate();\n var month = today.getMonth() + 1;\n var year = today.getFullYear();\n if (day < 10){\n day = '0' + day;\n }\n if (month < 10){\n month = '0' + month;\n }\n //Final Date Output;\n var dateNow = day + '.' + month + '.' + year;\n document.getElementById('date').innerHTML = dateNow;\n document.getElementById('footer-year').innerHTML = year + ' Kash Pizzas. All rights reserved.';\n }", "function calendarBeforeShowDay(day)\n{\n var result = true;\n var title = '';\n var day_class = 'contract-day';\n\n var timestamp = (day.getTime() - day.getTimezoneOffset()*60000)/1000;\n var role = $(this).data('role');\n\n if (rates[timestamp] === undefined) {\n result = false;\n } else {\n /**\n * rate_info structure:\n *\n * integer rate\n * integer min_stay\n * integer max_stay\n */\n var rate_info = rates[timestamp];\n\n title = translate_formatted(translate.TEXT_PROPERTY_CALENDAR_POPUP_PLACEHOLDER, [rate_info.rate, rate_info.min_stay]);\n\n if (busy_at[timestamp] !== undefined) {\n var busyness = busy_at[timestamp];\n\n switch (role) {\n case 'arrival':\n if (role == 'arrival' && busyness.arrival == false && busyness.departure == true) {\n day_class = day_class + ' departure';\n result = true;\n } else if (role == 'arrival' && busyness.arrival == true && busyness.departure == false) {\n day_class = day_class + ' arrival';\n result = false;\n } else {\n result = false;\n }\n\n break;\n\n case 'departure':\n if (role == 'departure' && busyness.arrival == true && busyness.departure == false) {\n day_class = day_class + ' arrival';\n result = true;\n } else if (role == 'departure' && busyness.arrival == false && busyness.departure == true) {\n day_class = day_class + ' departure';\n result = false;\n } else {\n result = false;\n }\n\n break;\n }\n\n if (busyness.arrival == true && busyness.departure == true) {\n day_class = day_class + ' arrival departure';\n result = false;\n }\n }\n }\n\n day_class = day_class + ' ' + (result === true ? 'available' : 'disabled');\n return [result, day_class, title];\n}", "function getCurrentDay () {\n\t\tvar today = new Date();\n\t\tvar dd = today.getDate();\n\t\t return dd;\n }", "function mostrarFecha() {\n document.getElementById(\"fecha\").innerHTML = Date();\n }", "function currentDate() {\n var date = document.getElementsByClassName(\"date\")[0];\n if (!date) return;\n var dateString = date.textContent;\n\n var today = new Date().toISOString().substr(0, 10);\n\n if (dateString === \"today\") {\n date.textContent = today;\n }\n}", "displaySchedule(schedule) {\n // helper-function: add leading Zero to Numbers < 10\n function addZero(i) {\n if (i < 10) {\n i = \"0\" + i;\n }\n return i;\n }\n\n let today = new Date();\n let target = document.querySelector(\"#wrapper\");\n let dayNames = [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"];\n\n let tempDay = -1;\n // for each entry\n for (let i in schedule) {\n // get start & end Date\n let start = new Date(parseInt(schedule[i].start) * 1000);\n let end = new Date(parseInt(schedule[i].end) * 1000);\n\n // if course is in the past -> skip\n if (\n start.getDate() < today.getDate() &&\n start.getMonth() < today.getMonth() &&\n start.getFullYear() <= today.getFullYear()\n ) {\n console.log(\n start.getDate(),\n today.getDate(),\n start.getMonth(),\n today.getMonth()\n );\n console.log(\"skip\");\n continue;\n }\n\n let dayforAriaLabel = \"\";\n // insert once per Day\n if (tempDay == -1 || tempDay != start.getDate()) {\n if (\n start.getDate() == today.getDate() &&\n start.getMonth() == today.getMonth() &&\n start.getFullYear() == today.getFullYear()\n ) {\n target.innerHTML += `\n <div class=\"schedule_day\">TODAY!</div>\n `;\n dayforAriaLabel = \"Today\";\n } else {\n target.innerHTML += `\n <div class=\"schedule_day\">${start.getDate()}.${start.getMonth() + 1} - ${dayNames[start.getDay()]}</div>\n `;\n\n dayforAriaLabel = `${dayNames[start.getDay()]} the ${start.getDate()}.${start.getMonth() + 1}`;\n }\n\n tempDay = start.getDate();\n }\n\n // Template\n target.innerHTML += `<div class=\"entry\" tabindex=\"0\" aria-label=\"${dayforAriaLabel}, ${schedule[i].title} in Room ${schedule[i].location} with ${schedule[i].lecturer} from ${addZero(start.getHours())}:${addZero(start.getMinutes())} to ${addZero(end.getHours())}:${addZero(end.getMinutes())}\">\n <div class=\"time\">\n ${addZero(start.getHours())}:${addZero(start.getMinutes())} - ${addZero(end.getHours())}:${addZero(end.getMinutes())}\n </div>\n <div class=\"detail\">\n ${schedule[i].title} / ${schedule[i].type} / ${schedule[i].lecturer} / ${schedule[i].location}\n </div>\n </div>\n `;\n }\n }", "function currentDayAndTime() {\n var date = new Date();\n var day = date.getDay();\n var dayList = [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"];\n var hours = date.getHours();\n var minutes = date.getMinutes() >= 10 ? date.getMinutes() : '0' + (date.getMinutes());\n var seconds = date.getSeconds() >= 10 ? date.getSeconds() : '0' + (date.getSeconds());\n var ampm;\n var strTimeAndDate;\n\n\n ampm = hours >= 12 ? 'PM' : 'AM';\n hours = hours % 12;\n strTimeAndDate = 'Today is: ' + dayList[day] + '.\\nCurrent time is: ' + hours + ' ' + ampm + ' : ' + minutes + ' : ' + seconds;\n\n\n return strTimeAndDate;\n\n}", "updateTodaysDate() {\n const currentView = this.currentView;\n let view;\n if (currentView === 'month') {\n view = this.monthView;\n }\n else if (currentView === 'year') {\n view = this.yearView;\n }\n else {\n view = this.multiYearView;\n }\n view._init();\n }" ]
[ "0.7309398", "0.6870157", "0.67809737", "0.6743349", "0.6711506", "0.6674878", "0.6672412", "0.66686124", "0.6658594", "0.66434824", "0.66394395", "0.65384156", "0.6495639", "0.64832294", "0.6470111", "0.64699394", "0.64534974", "0.6441912", "0.63844097", "0.6372117", "0.6362093", "0.63326997", "0.6276338", "0.6261311", "0.62531126", "0.62522453", "0.6246937", "0.6232733", "0.62322503", "0.6220357", "0.61976373", "0.61835617", "0.6169542", "0.61642593", "0.614695", "0.6145179", "0.61408705", "0.61317396", "0.6129287", "0.6123397", "0.61226296", "0.61159337", "0.61090773", "0.61010504", "0.6091328", "0.608499", "0.6072011", "0.6067623", "0.60673785", "0.6059901", "0.60580134", "0.60432875", "0.60401726", "0.6031171", "0.60275316", "0.59990543", "0.5983082", "0.59737355", "0.5964055", "0.5964047", "0.59607714", "0.5957301", "0.5933399", "0.5932186", "0.59313697", "0.59304196", "0.5919126", "0.5907474", "0.59056145", "0.58945084", "0.5892422", "0.58888066", "0.5886177", "0.58764136", "0.58714956", "0.5870323", "0.5858148", "0.5852834", "0.5850663", "0.5842602", "0.58324534", "0.5831299", "0.58283687", "0.5826853", "0.5820125", "0.5815425", "0.58020234", "0.57985294", "0.5790246", "0.5790164", "0.57878774", "0.57863647", "0.57850784", "0.57723284", "0.5767663", "0.57670355", "0.57609016", "0.57563937", "0.5747775", "0.57460517" ]
0.6144247
36
It will call the "main" function when ready. This function will be called when CrossBrowdy is ready:
function main() { //Function to execute when a canvas is created: var canvasLoaded = 0; var onLoadCanvas = function() { if (CB_REM.DEBUG_MESSAGES) { CB_console("Canvas '" + this.getId() + "' loaded! Mode used: " + this.getMode()); } canvasLoaded++; //Gets the "context" object to start working with the canvas: var canvasContext = this.getContext(); if (!canvasContext) { CB_console("ERROR: canvas context could not be obtained! Drawing cannot be performed."); return; } //Stores the canvas in the 'canvases' object: canvases[this.getId()] = this; //If both canvas (normal and buffer) have been created, proceeds with the rendering: if (canvasLoaded >= 2) { //When the screen changes its size or its orientation, both canvases will be re-adapted: var onResizeOrChangeOrientationTimeout = null; var onResizeOrChangeOrientation = function() { clearTimeout(onResizeOrChangeOrientationTimeout); onResizeOrChangeOrientationTimeout = setTimeout //NOTE: needs a delay as some clients on iOS update the screen size information in two or more steps (last step is the correct value). ( function() { //Resizes the canvas: canvases["my_canvas"].setWidth(CB_Screen.getWindowWidth()); canvases["my_canvas"].setHeight(CB_Screen.getWindowHeight()); canvases["my_canvas"].clear(); canvases["my_canvas"].disableAntiAliasing(); //Resizes the buffer canvas: canvases["my_canvas_buffer"].setWidth(CB_Screen.getWindowWidth()); canvases["my_canvas_buffer"].setHeight(CB_Screen.getWindowHeight()); canvases["my_canvas_buffer"].clear(); canvases["my_canvas_buffer"].disableAntiAliasing(); } ); }; CB_Screen.onResize(onResizeOrChangeOrientation); //Clears both canvas: canvases["my_canvas"].clear(); canvases["my_canvas_buffer"].clear(); //Disables anti-aliasing to avoid problems with adjacent sprites: canvases["my_canvas"].disableAntiAliasing(); canvases["my_canvas_buffer"].disableAntiAliasing(); //Creates the sprites groups: var graphicSpritesSceneObject = createSpritesGroups(); //Caches all needed images (performance purposes) and starts rendering sprites groups when all are loaded: myREM = new CB_REM(); myREM.cacheImages ( graphicSpritesSceneObject, //CB_GraphicSpritesSceneObject. undefined, //reload. function(imagesLoaded) //onLoad. { //Sets the current time as the start time to start counting the FPS (erased each second automatically): myREM._startTimeFPS = CB_Device.getTiming(); //Show the FPS (Frames Per Second) every time there is a new value: myREM.onUpdatedFPS(function(FPS) { graphicSpritesSceneObject.getById("fps_group").getById("fps").src = "FPS: " + FPS; }); //Processes the sprites groups: if (CB_REM.DEBUG_MESSAGES) { CB_console("Starts processing graphic sprites scene ('CB_GraphicSpritesScene' object) constantly..."); } processSpritesGroups(graphicSpritesSceneObject, canvases["my_canvas"], canvases["my_canvas"].getContext(), canvases["my_canvas_buffer"], canvases["my_canvas_buffer"].getContext()); } ); } }; //Creates the canvases: var canvases = {}; canvases["my_canvas"] = new CB_Canvas ( "my_canvas", //canvasId. Unique required parameter. "2d", //contextType. NOTE: some emulation methods only support "2d". Default: "2d". CB_Screen.getWindowWidth(), //canvasWidth. Use 'CB_Screen.getWindowWidth()' for complete width. Default: CB_Canvas.WIDTH_DEFAULT. CB_Screen.getWindowHeight(), //canvasHeight. Use 'CB_Screen.getWindowHeight()' for complete height. Default: CB_Canvas.HEIGHT_DEFAULT. onLoadCanvas, //onLoad. function(error) { CB_console("Canvas object problem! Error: " + error); }, //onError. undefined, undefined, !!FORCED_EMULATION_METHOD, !!FORCED_EMULATION_METHOD //Forces emulation method. ); canvases["my_canvas_buffer"] = new CB_Canvas ( "my_canvas_buffer", //canvasId. Unique required parameter. "2d", //contextType. NOTE: some emulation methods only support "2d". Default: "2d". CB_Screen.getWindowWidth(), //canvasWidth. Use 'CB_Screen.getWindowWidth()' for complete width. Default: CB_Canvas.WIDTH_DEFAULT. CB_Screen.getWindowHeight(), //canvasHeight. Use 'CB_Screen.getWindowHeight()' for complete height. Default: CB_Canvas.HEIGHT_DEFAULT. onLoadCanvas, //onLoad. function(error) { CB_console("Canvas object problem! Error: " + error); }, //onError. undefined, undefined, !!FORCED_EMULATION_METHOD, !!FORCED_EMULATION_METHOD //Forces emulation method. ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mainComplete() {\n\t\tconsole.log('it is all loaded up');\n\t\t//Demo.main.initialize();\n\t}", "function callMain() {\n console.log(documentReady);\n if(documentReady>=1) {\n\n window.main && window.main();\n } else {\n documentReady+=1;\n }\n\n }", "function main() {\n //your widget code goes here\n jQueryBeacon(document).ready(function () {\n console.log('Realgraph Beacon Loaded');\n var currentURL = window.location.href; // Returns full URL\n pingListener(currentURL);\n getAndRenderEntitiesData(currentURL);\n\n //example load css\n //loadCss(\"http://example.com/widget.css\");\n\n //example script load\n //loadScript(\"http://example.com/anotherscript.js\", function() { /* loaded */ });\n });\n }", "function main() {\n _readyInterval = window.setInterval(widgetReady, 500);\n }", "function main() {\n console.log('Ready!\\n');\n _hcsr04.fn.startMonitoring();\n}", "function mainComplete() {\n console.log('it is all loaded up');\n MyGame.game.initialize();\n\n }", "ready() { }", "ready() { }", "ready() { }", "ready() { }", "ready() { }", "ready() { }", "ready() { }", "ready() { }", "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 main() {\n init();\n worker();\n}", "static ready() { }", "function mainFn () {\n logFn( prefixStr + 'Start' );\n xhiObj.npmObj.load( xhiObj.fqPkgFilename, onLoadFn );\n }", "function main() {\n init();\n enable();\n}", "onReady() {}", "function main() {\n initQuestions();\n\n window.addEventListener('load', setup);\n}", "ready() {}", "ready() {}", "ready() {}", "function onready() {\n\tif (document.readyState == 'complete' ||\n\t\tdocument.readystate == 'interactive') {\n\t\tmain();\n\t} else {\n\t\tdocument.addEventListener(\"DOMContentLoaded\", function(event) {\n\t\t\tmain();\n\t\t});\n\t}\n}", "function main() {\n $(function() {\n // When document has loaded we attach FastClick to\n // eliminate the 300 ms delay on click events.\n FastClick.attach(document.body)\n\n // Event listener for Back button.\n $('.app-back').on('click', function() {\n history.back()\n })\n })\n\n // Event handler called when Cordova plugins have loaded.\n document.addEventListener(\n 'deviceready',\n onDeviceReady,\n false)\n window.onbeforeunload = function(e) {\n rfduinoble.close();\n };\n google.charts.load('current', {\n 'packages': ['corechart', 'controls', 'charteditor']\n });\n //google.setOnLoadCallback(drawChart);\n // google.setOnLoadCallback(function() {\n // genSampleData(generateSamples)\n // });\n }", "function main() {\n // Initialize some event listeners on the word info display choice.\n setup_word_info();\n\n // Initialize the first page of cues.\n previous_page();\n\n // Initialize the top scores leaderboard.\n load_leaderboard();\n\n // Initialize the Sammy.js app.\n app.run();\n}", "function main() {\n if (debug) console.log(`Main ran in ${window.name}`)\n // Whenever this is ran, an unload event (i.e. when the user loads a whatIf report)\n // triggers the collection of data needed to do a query for course information.\n // This isn't a listener because getting listeners to work inside iframes is hard.\n function setupWhatIfDataListener() {\n $(getWindow('frSelection')).on(\"unload\", fetchWhatIfData)\n }\n\n // It's ran 10 times per second because again, listeners on iframes are hard.\n // This means the app would break if the user managed to get through the\n // DegreeWorks WhatIf form in a 10th of a second.\n setInterval(setupWhatIfDataListener, 100);\n console.log(window.name)\n if (window.name === \"frBody\") {\n addModal();\n }\n if (window.name === \"frLeft\") {\n let button = addButton(`DegweeWorks Planner`, getDegreeInfo, null, \"genPossible\")\n // addNumberField('Min courses/semester', 'minCourses', 4)\n // addNumberField('Max courses/semester', 'maxCourses', 4);\n }\n }", "function onReady() {\n ns.brd = new Board();\n ns.client = new clientLib.Client(ns);\n ns.client.addAppBar();\n\n // App Bar can move elements on the screen\n ns.brd.resizeWindow();\n\n ns.client.poll();\n }", "function main() {\n client.waitForReady(4000, () => {\n async.series([\n runGetFeature,\n runListFeatures,\n runRecordRoute,\n runRouteChat\n ]); \n });\n}", "function init() {\n //called when document is fully loaded; your \"main method\"\n}", "ready() {\r\n\t\tsuper.ready();\r\n\t}", "function main() {\n\n var clientLib = namespace.lookup('com.pageforest.client');\n\n // Client library for Pageforest\n ns.client = new clientLib.Client(ns);\n\n // Use the standard Pageforest UI widget.\n //ns.client.addAppBar();\n\n // This app demonstrates auto-loading - will reload the doc if\n // it is changed by another user.\n ns.client.autoLoad = true;\n\n // Quick call to poll - don't wait a whole second to try loading\n // the doc and logging in the user.\n ns.client.poll();\n\n // Expose appid\n items.appid = ns.client.appid;\n }", "function initMain(){\n\tif(!isMobile || !isTablet){\n\t\t$('#canvasHolder').show();\t\n\t}else{\n\t\tcheckMobileOrientation();\t\n\t}\n\t\n\tinitAppCanvas(stageW,stageH);\n\tbuildAppCanvas();\n\tbuildPageButton();\n\tbuildCamera();\n\t\n\tgoPage('main');\n\tresizeCanvas();\n\t\n\tloadXML('stickers.xml');\n}", "function main() {\r\n initFlags();\r\n fixMarkup();\r\n changeLayout();\r\n initConfiguration();\r\n}", "function main() {\r\n mainLoop()\r\n}", "async function main () {\n const state = getState()\n drawNav(state)\n\n d3.select('body').classed('loading', true)\n await countries.load()\n d3.select('body').classed('loading', false)\n\n onStateChange()\n\n window.onresize = onStateChange\n window.addEventListener('hashchange', onStateChange)\n\n initSearch()\n}", "ready() {\n this.isReady = true;\n if (this.onLoad) {\n this.onLoad.call();\n }\n }", "function initMain()\r\n{\r\n\t// Initialize a new instance\r\n\tinitInstance();\r\n\r\n\t// Initialize AJAX components\r\n\tinitAjaxComponents();\r\n\r\n\t// Initialize AJAX navigation\r\n\tinitAjaxNavigation();\r\n\r\n\t// Initialize addons\r\n\tinitAddons();\r\n}", "function initMain(){\n\tbuildGameButton();\n\tbuildGameStyle();\n\tbuildScoreboard();\n\t\n\tgoPage('main');\n\tloadXML('questions.xml');\n}", "function onReady() {\n\t// TODO\n}", "_onReady() {\n this.changeState(EngineState.CHECK_USI);\n this.writeln(\"usi\");\n }", "function ready() {\n run();\n}", "function onReady() {\n // Initialize the board and event listeners\n Render.initialBoardRender();\n initializeEventListeners();\n}", "function _main() {\n log('> lesslms init...', 'info');\n _buildTree();\n _setupMenu();\n}", "function main() {\n init();\n render();\n handleVisibilityChange();\n}", "function main() {\n verb(\"BetaBoards!\")\n\n var s = style()\n\n if (isTopic()) {\n iid = getPage()\n cid = iid\n\n initEvents()\n remNextButton()\n postNums()\n floatQR()\n hideUserlists()\n\n quotePyramid(s)\n\n ignore()\n\n beepAudio()\n\n addIgnoredIds(document.querySelectorAll(\".ignored\"))\n\n var f = function(){\n pageUpdate()\n\n loop = setTimeout(f, time)\n }\n\n var bp = readify('beta-init-load', 2)\n , lp = isLastPage([0, 2, 5, 10, NaN][bp])\n\n verb(\"bp \" + bp + \", lp: \" + lp)\n\n if (lp || bp === 4) loop = setTimeout(f, time)\n\n } else if (isPage(\"post\")) {\n addPostEvent()\n\n } else if (isPage(\"msg\")) {\n try {\n addPostEvent()\n } catch(e) {\n addQuickMsgEvent()\n }\n\n } else if (isForum()) {\n hideUserlists()\n\n var f = function(){\n forumUpdate()\n\n loop = setTimeout(f, time)\n }\n\n loop = setTimeout(f, time)\n\n } else if (isHome()) {\n optionsUI()\n ignoreUI()\n\n // Hint events\n addHintEvents()\n\n }\n}", "function Main(){\n PubSub.call(this); // super();\n\n // ui system\n this.screens = new Screens(this);\n\n this.onceOn('init', this.init, this);\n }", "function initializeMain(){\n\tinit();\n\tanimate();\n}", "function Main() {\n console.log(`%c Main Function`, \"color: grey; font-size: 14px; font-weight: bold;\");\n buildInterface();\n interfaceLogic();\n }", "function readyCallBack() {\n}", "function main() {\r\n startMicroservice()\r\n registerWithCommMgr()\r\n loadCrediential()\r\n}", "function main(){ \n\tinitDisplaySettings() \n\taddAllPageEvents()\n \n\t// initialize DataManager instance\n\tdataManager = new DataManager(null, null, null, null); \n\t//dataManager.init(); \n\n\t// stores reference to the budget slider and adds a change listener\n\tslider = document.getElementById(\"budgetSlider\");\n\tslider.onchange = updateBudget; \n\n\t// stores references to the information output areas \n\tinformation = document.getElementById(\"information\");\n\tsummary = document.getElementById(\"summary\");\n\n\t// initializes budget value. \n\tslider.value = 0;\n\tslider.max = 10000;\n\tdataManager.budget = slider.value;\n\n\tif (typeof localData !== 'undefined') {\n\t\t// Working locally: localData is a global variable loaded from localData.js\n\t\tdataManager.init(localData);\n\t\tdataManager.addEventsToAllBranches(dataManager.networkSource);\n\t}\n\telse {\n\t\t// Normal case: make async call for the data\n\t\tvar barrierFile = \"BarrierAndStreamInfoOpt.json\"; // change this to use different data\n\t\t//var barrierFile = \"BarrierAndStreamInfoOptReduced1.json\"; // smaller test network one (westfield) \n\t\t//var barrierFile = \"BarrierAndStreamInfoOptReduced2.json\"; // smallest test network two (in middle left area of the main one)\n\t\t//var barrierFile = \"BarrierAndStreamInfoOptReduced3.json\"; // largest test network three (top third of main watershed)\n\n\t\t$.get(barrierFile, function(data){ \n\t\t\tdataManager.init(data);\n\t\t\tdataManager.addEventsToAllBranches(dataManager.networkSource);\n\t\t});\n\t}\n}", "function Main()\n {\n \n }", "function main() {\n board.reset();\n board.bootSounds();\n //board.motorCheck();\n board.openDamper();\n monitorTemperature();\n \n events.on(\"start-alarm\", alarm);\n}", "function main() {\n let msinfo = {\n cfg: null,\n acc: null,\n }\n loadConfig(msinfo)\n\n loadWallet(msinfo, (err) => {\n if(err) u.showErr(err)\n startMicroservice(msinfo)\n registerWithCommMgr()\n })\n}", "onReady() {\n\n }", "function main(){\n\t\n}", "function init () {\r\n\t\tconsole.log('all is loaded.');\r\n\t}", "init() {\n // hello from the other side\n }", "function setup() {\r\n // Calls the function to initialize pubnup API\r\n create_pubnub();\r\n // Calls the function to initialize and read the serialport - Arduino data from USB\r\n create_serial();\r\n // Creates the canvas/background to start the theremin\r\n create_scene();\r\n \r\n myzebra = new ZebraJump(windowWidth,windowHeight);\r\n mygiraffe = new GiraffeJump();\r\n }", "function ready() {\n\n\tif(!Modernizr.csstransforms3d) $('body').prepend('<div class=\"alert\"><div class=\"box\"><h2>Fatti un regalo.</h2><p>Questo sito usa tecnologie moderne non compatibili con il tuo vecchissimo browser.</p><p>Fatti un regalo, impiega due minuti a installare gratuitamente un browser recente, tipo <a href=\"http://www.google.it/intl/it/chrome/browser/\">Google Chrome</a>. Scoprirai che il web è molto più bello!</p></div></div>');\n\tloader.init();\n\t$('nav').addClass('hidden');\n\t//particles.init();\n\twork.init();\n\tnewhash.change(true);\n\textra();\n\tskillMng.init();\n\tcomponentForm.init();\n\tresponsiveNav();\n\tmaterial_click();\n\tcuul.init();\n\tdisableHover();\n\tscroll_down.init();\n}", "_init() {\r\n app.whenReady().then(() => {\r\n this.setLoadingWindow();\r\n this.setWindowMain();\r\n });\r\n this.beforeCloseFunctions();\r\n }", "function main(argc, argv) {\n\n //\n // Process arguments\n //\n process_args(argc, argv);\n\n // \n // Let's print out a welcome screen displaying the \n // application name and version\n // \n print_welcome();\n\n //\n // Wait until database initialization is complete\n //\n wait_for_database(function() {\n\n // \n // Start the Master worker\n // \n start_master();\n\n //\n // Prevent process from ending\n //\n Cpu.loop();\n\n });\n\n}", "function main () {\n // Initialise application\n\n // Get director singleton\n var director = Director.sharedDirector\n\n // Wait for the director to finish preloading our assets\n events.addListener(director, 'ready', function (director) {\n // Create a scene and layer\n var scene = new Scene()\n , layer = new Plague()\n\n // Add our layer to the scene\n scene.addChild(layer)\n\n // Run the scene\n director.replaceScene(scene)\n })\n\n // Preload our assets\n director.runPreloadScene()\n}", "function main()\n{\n init();\n loop();\n}", "function setup() {\n \n // create an HL app to start retrieving kinect datas\n // and automatically call the function update, onUserIn and onUserOut\n app = new HL.App();\n\n // set it up with our project's metadatas\n app.setup({\n projectName : 'Ball Bounce',\n author1 : 'Prenom Nom',\n author2 : 'Prenom Nom'\n });\n\n setupBall();\n setupObstacles();\n}", "function main() {\n addEventListeners();\n fetchListOfCurrencies();\n }", "function main() {\n buildNavbar();\n $(\"body\").append($(\"<div>\").addClass(\"container\").attr(\"id\", \"mainContainer2\"));\n createJumboTron();\n $(\"body\").append($(\"<div>\").addClass(\"container h-100 scrollspy\").attr(\"id\", \"mainContainer\"));\n buildMoviePage();\n\n }", "async init() {\n // Initiate classes and wait for async operations here.\n\n this.emit(Application.events.APP_READY);\n }", "function main() {\n init(fontSize);\n\n renderModel = ReadModel();\n renderUI = ReaderBaseFrame(RootContainer);\n renderModel.init(function (data) {\n renderUI(data);\n });\n\n EventHandler();\n }", "function Main() {\n\tappx.Bootstrap('Canvas');\n\n\t// Setup app context\n\tappx.context['gameId'] = '';\n\tappx.context['keyOnly'] = false;\n\tappx.context['roleCaptain'] = false;\n\tappx.context['language'] = 0;\n\tappx.context['pickedColor'] = 0;\n\tappx.context['ajax'] = new XMLHttpRequest();\n\tappx.context['online'] = true;\n\tappx.context['game'] = null;\n\tappx.context['fetchHandle'] = null;\n\tappx.context['dynamicFonts'] = false;\n\n\t// Toggle default page\n\tappx.DisplayPage(ID('PageMain'));\n}", "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 }", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n }", "function onReadyCallBack() {\n self.startupTime = performance.now() - self.startupTime;\n Logger.system.debug(\"WINDOW LIFECYCLE:STARTUP:RouterClient Ready\");\n isRouterReady = true;\n // console.profileEnd(\"Router\");\n // invoke all the parent callbacks waiting for router to be ready\n while (parentReadyCallbackQueue.length > 0) {\n Logger.system.debug(\"WINDOW LIFECYCLE:STARTUP:RouterClient parentReady invoked\");\n var nextParentCallback = parentReadyCallbackQueue.shift();\n nextParentCallback();\n }\n }", "function init() {\n lastTime = Date.now();\n main();\n }", "function init() {\n lastTime = Date.now();\n main();\n }", "_start() {\n this._loadPage();\n this._sayHello();\n }", "async onReady() {\n\t\t// Read already known devices\n\t\tawait this.tryKnownDevices();\n\n\t\t// Run Autodetect (Bonjour - Service, mDNS to be handled)\n\t\tawait this.scanDevices();\n\n\t\t// Connection state to online when adapter is ready to connect to devices\n\t\tthis.setState('info.connection', true, true);\n\t\tthis.log.info('WLED initialisation finalized, ready to do my job have fun !');\n\n\t\t// Start Polling timer\n\t\tthis.polling_timer();\n\n\t}", "function main () {\n // Initialise application\n\n // Get director singleton\n var director = Director.sharedDirector\n\n // Wait for the director to finish preloading our assets\n events.addListener(director, 'ready', function (director) {\n // Create a scene and layer\n var scene = new Scene()\n , layer = new Galaga()\n\n // Add our layer to the scene\n scene.addChild(layer)\n\n // Run the scene\n director.replaceScene(scene)\n })\n\n // Preload our assets\n director.runPreloadScene()\n}", "function _OnReady()\n{\n OnReady();\n gfx.isReady = true;\n}", "function initApp() {\n\tauthCode = null;\n\tchildWindow = null;\n\t//registerBbm();\n\n\t// setup our Foursquare credentials, and callback URL to monitor\n\tfoursquareOptions = {\n\t\tclientId: '*',\n\t\tclientSecret: '*',\n\t\tredirectUri: '*'\n\t};\n\n\t// (bbUI) push the start.html page\n\tbb.pushScreen('start.html', 'start');\n}", "function initBrython() {\n if (!initialized) {\n brython(1);\n initialized = true;\n }\n }", "function initBrython() {\n if (!initialized) {\n brython(1);\n initialized = true;\n }\n }", "startWhenReady (cb) {\n this.app.events.once('ready', () => this.start(cb))\n }", "function onAppReady(obj) {\r\n \"use strict\";\r\n \r\n console.log(\"init.js: onAppReady\");\r\n \r\n require([\"MainApp\", \"Router\", \"Config\", \"DataService\", \"handlebars\", \"templates\"], function (MainApp, Router, Config, DataService, handlebars, templates) {\r\n window.app = new MainApp(Config, templates, DataService);\r\n window.app.init();\r\n });\r\n}", "function initBrython() {\n if (!initialized) {\n brython(1);\n initialized = true\n }\n }", "function main() {\r\n init();\r\n draw();\r\n}", "function main() {\n startMicroservice()\n registerWithCommMgr()\n loadCrediential()\n}", "function main(){\r\n}" ]
[ "0.7388551", "0.7341496", "0.7240387", "0.71667963", "0.70972764", "0.69723034", "0.69498205", "0.69498205", "0.69498205", "0.69498205", "0.69498205", "0.69498205", "0.69498205", "0.69498205", "0.6814466", "0.67987233", "0.6794886", "0.67812496", "0.6779183", "0.67769635", "0.6714006", "0.66895306", "0.66895306", "0.66895306", "0.6661126", "0.66497725", "0.6600946", "0.6567972", "0.6565406", "0.6559766", "0.654677", "0.654247", "0.6533634", "0.652695", "0.6523258", "0.6509901", "0.6493819", "0.6474281", "0.6472218", "0.64613056", "0.6456318", "0.64561623", "0.64485", "0.6442616", "0.64314455", "0.64175653", "0.6410157", "0.6407949", "0.63986605", "0.63946086", "0.6369371", "0.6365982", "0.63482535", "0.63239294", "0.63113487", "0.6307576", "0.6302641", "0.6297538", "0.62935495", "0.62860084", "0.6278015", "0.6277355", "0.6270236", "0.6253239", "0.6244408", "0.6244281", "0.6243241", "0.62310547", "0.62254167", "0.62244844", "0.62200516", "0.62164944", "0.62144953", "0.62129426", "0.62129426", "0.62129426", "0.62129426", "0.62129426", "0.62129426", "0.62129426", "0.62129426", "0.62129426", "0.62129426", "0.62129426", "0.62129426", "0.6212653", "0.6210222", "0.6210222", "0.62048763", "0.6203994", "0.61998266", "0.61993444", "0.61975384", "0.61967075", "0.61967075", "0.6191099", "0.61893487", "0.61856246", "0.6183094", "0.61783636", "0.6176754" ]
0.0
-1
Creates the sprites groups:
function createSpritesGroups() { //Defines the sprites groups information ('CB_GraphicSpritesScene.SPRITES_GROUPS_OBJECT' object): /* Note: 1) Sprites groups, sprites and sub-sprites are always automatically ordered internally by their z-index (remember to use the 'setZIndex' method of each if you want to modify it). The elements of the scene will be rendered respecting this order. 2) We will use 'duration' in the 'data' property to disable a sprite or sub-sprite (if it is set to null, it will never be disabled). If used in a 'CB_GraphicSprites' object, it will affect its current sprite being pointed. 3) We will use the 'timeResetAndEnableAfter' in the 'data' property to enable again a sprite or sub-sprite (if it is set to null, it will never be enabled). It also resets the 'time' property of the sprite or sub-sprite. If used in a 'CB_GraphicSprites' object, it will affect its current sprite being pointed. 4) We will use 'skipAfter' in the 'data' property of a sprite to jump to the next one (if it is set to null, it will never jump automatically). * If used in a 'CB_GraphicSprites' object, it will affect its current sprite being pointed. 5) We can use 'beforeDrawing' and 'afterDrawing' callbacks defined in the 'data' object to be called before drawing an element or after doing it, respectively. For bitmaps, a 'beforeDrawingElement' callback can be used to call before drawing each map element. 6) We can set 'onlyUseInMap' to true in the 'data' object to just draw that element when it is being drawn as a part of a map (a map is an element whose 'srcType' equals to 'CB_GraphicSprites.SRC_TYPES.MAP'). 7) We can set 'loop' to true in the 'data' object to loop sprites infinitely instead of stopping at the last one. 8) We can set a number (which belongs to the index of a sprite) or a function returning a number in the 'pointerNext' property of the 'data' object to indicate the desired next sprite. 9) We can set a desired canvas filter (similar to CSS filters) in the 'filter' property of the 'data' object. 10) We can set 'positionAbsolute' to true in the 'data' object to do not have in mind the element's parent position to calculate the position of the element. 11) We can set 'hidden' to true in the 'data' object to skip that element so it will not be drawn. 12) To rotate an element, we can set the 'rotation' property in the 'data' object to rotate that element: * If the 'rotationUseDegrees' property is set to true, the value set in 'rotation' will be considered degrees, otherwise it will be considered radians. * To set the coordinates of the rotation axis (for rotation the canvas, internally), use the 'rotationX' and 'rotationY' properties. If any of them is not set, the rotation coordinate will be considered the center (horizontal or vertical) of the element. 13) Some properties in the 'data' object can be either a static value or a callback function (as for example the 'style' property). 14) The 'clearPreviousFirst' property in the 'data' object can be set to true to accomplish the following: * If it is a sprite, it will clean the space used by the previous sprite before drawing this sprite. * If it is a sub-sprite, it will clean the space that will be used by this sub-sprite. * If used in a 'CB_GraphicSprites' object, it will affect its current sprite being pointed. 15) We can set the 'parseIntLeft' and 'parseIntTop' properties to true in the 'data' object to use integer numbers internally for the position of the elements when drawing them. This can prevent some problems as for example tile maps with tiles separated in some screen resolutions. 16) We can set the 'avoidClearingCanvas' property to true in the 'data' object of the 'spritesGroupsData' to avoid clearing the canvas each cycle. */ var spritesGroupsData = { //'my_sprites_groups_1' ('CB_GraphicSpritesScene.SPRITES_GROUPS_OBJECT' object). Some missing or non-valid properties will get a default value: id: "my_sprites_groups_1", //Identifier of the sprites groups object (also used for the 'CB_GraphicSpritesScene' object). Optional but recommended. It should be unique. By default, it is generated automatically. srcWidth: 40, //The value for the "srcWidth" property which will be used as default if not provided (or the provided one was wrong) in the given 'CB_GraphicSprites.SPRITES_OBJECT' objects. Default: CB_GraphicSprites.WIDTH_SOURCE_DEFAULT. srcHeight: 40, //The value for the "srcHeight" property which will be used as default if not provided (or the provided one was wrong) in the given 'CB_GraphicSprites.SPRITES_OBJECT' objects. Default: CB_GraphicSprites.HEIGHT_SOURCE_DEFAULT. data: { skipAfter: null, duration: null, timeResetAndEnableAfter: null, loop: true, clearPreviousFirst: false }, //Object with any additional data desired which can be any kind. Default: { 'that' : CB_GraphicSprites.SPRITES_OBJECT, 'getThis' = function() { return this.that; } }. //Numeric array containing 'CB_GraphicSprites.SPRITES_OBJECT' objects with all the sprites groups that will be used (their "parent" property will be set to point the current 'CB_GraphicSpritesScene' object which contains them): spritesGroups: [ //'bird_sprites' ('CB_GraphicSprites.SPRITES_OBJECT' object). Some missing or non-valid properties will will be inherited from the parent ('CB_GraphicSpritesScene.SPRITES_GROUPS_OBJECT' object): { id: "bird_sprites", //Identifier of the sprites group (also used for the 'CB_GraphicSprites' object). Optional but recommended. It should be unique. If not provided, it will be calculated automatically. src: "img/bird_sprites.gif", //Source of origin. Can be a path or identifier of an image, text, bitmap, 3D object, etc. Optional but recommended. Default: this.parent.src || "". srcWidth: 38, //Width of the original source. Unit agnostic (only numeric values allowed). Default: this.parent.srcWidth || CB_GraphicSprites.WIDTH_SOURCE_DEFAULT. srcHeight: 36, //Height of the original source. Unit agnostic (only numeric values allowed). Default: this.parent.srcHeight || CB_GraphicSprites.HEIGHT_SOURCE_DEFAULT. left: 300, //Left (horizontal) position in the destiny (inside the sprites group). Unit agnostic (only numeric values allowed). Default: CB_GraphicSprites.LEFT_DEFAULT. width: 190, //Width of the destiny. Unit agnostic (only numeric values allowed). Default: this.parent.width || CB_GraphicSprites.WIDTH_DEFAULT. height: 160, //Height of the destiny. Unit agnostic (only numeric values allowed). Default: this.parent.height || CB_GraphicSprites.HEIGHT_DEFAULT. //Object with any additional data desired which can be any kind: //NOTE: it will always have a "that" property pointing to the 'CB_GraphicSprites.SPRITES_OBJECT' object where it belongs to and a function in its "getThis" property returning the same value (added automatically). data: { skipAfter: 600, clearPreviousFirst: true, onlyUseInMap: false /* Set to true to only display in maps */ }, //Object with any additional data desired which can be any kind. Default: CB_combineJSON(this.parent.data, this.data) || this.parent.data || { 'that' : CB_GraphicSprites.SPRITES_OBJECT, 'getThis' = function() { return this.that; } }. //Numeric array containing 'CB_GraphicSprites.SPRITE_OBJECT' objects with all the sprites that will be used: sprites: [ //'bird_sprite_1' ('CB_GraphicSprites.SPRITE_OBJECT' object). Some missing or non-valid properties will be inherited from the sprites group: { id: "bird_sprite_1", //Identifier for the sprite. Optional but recommended. It should be unique. If not provided, it will be calculated automatically. //Numeric array containing 'CB_GraphicSprites.SUBSPRITE_OBJECT' objects with the sub-sprites that this sprite uses: subSprites: [ //'bird_sprite_1_subsprite_1' ('CB_GraphicSprites.SUBSPRITE_OBJECT' object). Some missing or non-valid properties will be inherited from the parent sprite: { id: "bird_sprite_1_subsprite_1", //Identifier for the sub-sprite. Optional but recommended. It should be unique. If not provided, it will be calculated automatically. src: "img/sol.gif", srcLeft: 0, //Left (horizontal) position in the original source (having in mind its real width and height). Unit agnostic (only numeric values allowed). Default: this.parent.srcLeft || CB_GraphicSprites.LEFT_SOURCE_DEFAULT. srcTop: 0, //Top (vertical) position in the original source (having in mind its real width and height). Unit agnostic (only numeric values allowed). Default: this.parent.srcTop || CB_GraphicSprites.TOP_SOURCE_DEFAULT. srcWidth: 80, //Width of the original source. Unit agnostic (only numeric values allowed). Default: this.parent.srcWidth || CB_GraphicSprites.WIDTH_SOURCE_DEFAULT. srcHeight: 80, //Height of the original source. Unit agnostic (only numeric values allowed). Default: this.parent.srcHeight || CB_GraphicSprites.HEIGHT_SOURCE_DEFAULT. left: 20, //Left (horizontal) position in the destiny (inside the sprite). Unit agnostic (only numeric values allowed). Default: CB_GraphicSprites.LEFT_DEFAULT. top: 170, //Top (vertical) position in the destiny (inside the sprite). Unit agnostic (only numeric values allowed). Default: CB_GraphicSprites.TOP_DEFAULT. width: 40, //Width of the destiny (inside the sprite). Unit agnostic (only numeric values allowed). Default: this.parent.width || CB_GraphicSprites.WIDTH_DEFAULT. height: 40, //Height of the destiny (inside the sprite). Unit agnostic (only numeric values allowed). Default: this.parent.height || CB_GraphicSprites.HEIGHT_DEFAULT. data: { duration: 200, timeResetAndEnableAfter: 200 }, zIndex: 2 }, //'bird_sprite_1_subsprite_2' ('CB_GraphicSprites.SUBSPRITE_OBJECT' object). Some missing or non-valid properties will be inherited from the parent sprite: { id: "bird_sprite_1_subsprite_2", //Identifier for the sub-sprite. Optional but recommended. It should be unique. If not provided, it will be calculated automatically. src: "img/seta.gif", srcLeft: 0, //Left (horizontal) position in the original source (having in mind its real width and height). Unit agnostic (only numeric values allowed). Default: this.parent.srcLeft || CB_GraphicSprites.LEFT_SOURCE_DEFAULT. srcTop: 0, //Top (vertical) position in the original source (having in mind its real width and height). Unit agnostic (only numeric values allowed). Default: this.parent.srcTop || CB_GraphicSprites.TOP_SOURCE_DEFAULT. srcWidth: 40, //Width of the original source. Unit agnostic (only numeric values allowed). Default: this.parent.srcWidth || CB_GraphicSprites.WIDTH_SOURCE_DEFAULT. srcHeight: 40, //Height of the original source. Unit agnostic (only numeric values allowed). Default: this.parent.srcHeight || CB_GraphicSprites.HEIGHT_SOURCE_DEFAULT. top: 200, //Top (vertical) position in the destiny (inside the sprite). Unit agnostic (only numeric values allowed). Default: CB_GraphicSprites.TOP_DEFAULT. width: 12, //Width of the destiny (inside the sprite). Unit agnostic (only numeric values allowed). Default: this.parent.width || CB_GraphicSprites.WIDTH_DEFAULT. height: 12, //Height of the destiny (inside the sprite). Unit agnostic (only numeric values allowed). Default: this.parent.height || CB_GraphicSprites.HEIGHT_DEFAULT. data: { duration: null, beforeDrawing: function(element, canvasContext, canvasBufferContext, useBuffer, CB_GraphicSpritesSceneObject, drawingMap, x, y, mapElement) //Called before drawing the element. { this.height = this.width = this.width === 12 ? 15 : 12; if (drawingMap && this._attributes) { this.data._alternating = !this.data._alternating; this._attributes.width = this.data._alternating ? 60 : 50; this._attributes.height = this.data._alternating ? 90 : 80; } return this; //Same as 'element'. Must return the element to draw. Return null to skip drawing it. }, afterDrawing: function(element, canvasContext, canvasBufferContext, useBuffer, CB_GraphicSpritesSceneObject, drawingMap, x, y, mapElement, onDrawn) //Called after drawing the element. { //Here we could perform any tasks. } } } ] }, //'bird_sprite_2' ('CB_GraphicSprites.SPRITE_OBJECT' object). Some missing or non-valid properties will be inherited from the sprites group: { id: "bird_sprite_2", //Identifier for the sprite. Optional but recommended. It should be unique. If not provided, it will be calculated automatically. srcLeft: 38, //Left (horizontal) position in the original source (having in mind its real width and height). Unit agnostic (only numeric values allowed). Default: this.parent.srcLeft || CB_GraphicSprites.LEFT_SOURCE_DEFAULT. //Numeric array containing 'CB_GraphicSprites.SUBSPRITE_OBJECT' objects with the sub-sprites that this sprite uses: subSprites: [ //'bird_sprite_2_subsprite_1' ('CB_GraphicSprites.SUBSPRITE_OBJECT' object). Some missing or non-valid properties will be inherited from the parent sprite: { id: "bird_sprite_2_subsprite_1", //Identifier for the sub-sprite. Optional but recommended. It should be unique. If not provided, it will be calculated automatically. src: "img/sol.gif", srcLeft: 0, //Left (horizontal) position in the original source (having in mind its real width and height). Unit agnostic (only numeric values allowed). Default: this.parent.srcLeft || CB_GraphicSprites.LEFT_SOURCE_DEFAULT. srcTop: 0, //Top (vertical) position in the original source (having in mind its real width and height). Unit agnostic (only numeric values allowed). Default: this.parent.srcTop || CB_GraphicSprites.TOP_SOURCE_DEFAULT. srcWidth: 80, //Width of the original source. Unit agnostic (only numeric values allowed). Default: this.parent.srcWidth || CB_GraphicSprites.WIDTH_SOURCE_DEFAULT. srcHeight: 80, //Height of the original source. Unit agnostic (only numeric values allowed). Default: this.parent.srcHeight || CB_GraphicSprites.HEIGHT_SOURCE_DEFAULT. left: 20, //Left (horizontal) position in the destiny (inside the sprite). Unit agnostic (only numeric values allowed). Default: CB_GraphicSprites.LEFT_DEFAULT. top: 170, //Top (vertical) position in the destiny (inside the sprite). Unit agnostic (only numeric values allowed). Default: CB_GraphicSprites.TOP_DEFAULT. width: 40, //Width of the destiny (inside the sprite). Unit agnostic (only numeric values allowed). Default: this.parent.width || CB_GraphicSprites.WIDTH_DEFAULT. height: 40, //Height of the destiny (inside the sprite). Unit agnostic (only numeric values allowed). Default: this.parent.height || CB_GraphicSprites.HEIGHT_DEFAULT. data: { duration: 200, timeResetAndEnableAfter: 200 }, zIndex: 2 }, //'bird_sprite_2_subsprite_1' ('CB_GraphicSprites.SUBSPRITE_OBJECT' object). Some missing or non-valid properties will be inherited from the parent sprite: { id: "bird_sprite_2_subsprite_2", //Identifier for the sub-sprite. Optional but recommended. It should be unique. If not provided, it will be calculated automatically. src: "img/seta.gif", srcLeft: 0, //Left (horizontal) position in the original source (having in mind its real width and height). Unit agnostic (only numeric values allowed). Default: this.parent.srcLeft || CB_GraphicSprites.LEFT_SOURCE_DEFAULT. srcTop: 0, //Top (vertical) position in the original source (having in mind its real width and height). Unit agnostic (only numeric values allowed). Default: this.parent.srcTop || CB_GraphicSprites.TOP_SOURCE_DEFAULT. srcWidth: 40, //Width of the original source. Unit agnostic (only numeric values allowed). Default: this.parent.srcWidth || CB_GraphicSprites.WIDTH_SOURCE_DEFAULT. srcHeight: 40, //Height of the original source. Unit agnostic (only numeric values allowed). Default: this.parent.srcHeight || CB_GraphicSprites.HEIGHT_SOURCE_DEFAULT. top: 200, //Top (vertical) position in the destiny (inside the sprite). Unit agnostic (only numeric values allowed). Default: CB_GraphicSprites.TOP_DEFAULT. width: 12, //Width of the destiny (inside the sprite). Unit agnostic (only numeric values allowed). Default: this.parent.width || CB_GraphicSprites.WIDTH_DEFAULT. height: 12, //Height of the destiny (inside the sprite). Unit agnostic (only numeric values allowed). Default: this.parent.height || CB_GraphicSprites.HEIGHT_DEFAULT. data: { duration: null } } ] }, //'bird_sprite_3' ('CB_GraphicSprites.SPRITE_OBJECT' object). Some missing or non-valid properties will be inherited from the sprites group: { id: "bird_sprite_3", //Identifier for the sprite. Optional but recommended. It should be unique. If not provided, it will be calculated automatically. srcLeft: 38 * 2, //Left (horizontal) position in the original source (having in mind its real width and height). Unit agnostic (only numeric values allowed). Default: this.parent.srcLeft || CB_GraphicSprites.LEFT_SOURCE_DEFAULT. //Numeric array containing 'CB_GraphicSprites.SUBSPRITE_OBJECT' objects with the sub-sprites that this sprite uses: subSprites: [ //'bird_sprite_2_subsprite_1' ('CB_GraphicSprites.SUBSPRITE_OBJECT' object). Some missing or non-valid properties will be inherited from the parent sprite: { id: "bird_sprite_3_subsprite_1", //Identifier for the sub-sprite. Optional but recommended. It should be unique. If not provided, it will be calculated automatically. src: "img/sol.gif", srcLeft: 0, //Left (horizontal) position in the original source (having in mind its real width and height). Unit agnostic (only numeric values allowed). Default: this.parent.srcLeft || CB_GraphicSprites.LEFT_SOURCE_DEFAULT. srcTop: 0, //Top (vertical) position in the original source (having in mind its real width and height). Unit agnostic (only numeric values allowed). Default: this.parent.srcTop || CB_GraphicSprites.TOP_SOURCE_DEFAULT. srcWidth: 80, //Width of the original source. Unit agnostic (only numeric values allowed). Default: this.parent.srcWidth || CB_GraphicSprites.WIDTH_SOURCE_DEFAULT. srcHeight: 80, //Height of the original source. Unit agnostic (only numeric values allowed). Default: this.parent.srcHeight || CB_GraphicSprites.HEIGHT_SOURCE_DEFAULT. left: 20, //Left (horizontal) position in the destiny (inside the sprite). Unit agnostic (only numeric values allowed). Default: CB_GraphicSprites.LEFT_DEFAULT. top: 170, //Top (vertical) position in the destiny (inside the sprite). Unit agnostic (only numeric values allowed). Default: CB_GraphicSprites.TOP_DEFAULT. width: 40, //Width of the destiny (inside the sprite). Unit agnostic (only numeric values allowed). Default: this.parent.width || CB_GraphicSprites.WIDTH_DEFAULT. height: 40, //Height of the destiny (inside the sprite). Unit agnostic (only numeric values allowed). Default: this.parent.height || CB_GraphicSprites.HEIGHT_DEFAULT. data: { duration: 200, timeResetAndEnableAfter: 200 }, zIndex: 2 }, //'bird_sprite_2_subsprite_1' ('CB_GraphicSprites.SUBSPRITE_OBJECT' object). Some missing or non-valid properties will be inherited from the parent sprite: { id: "bird_sprite_3_subsprite_2", //Identifier for the sub-sprite. Optional but recommended. It should be unique. If not provided, it will be calculated automatically. src: "img/seta.gif", srcLeft: 0, //Left (horizontal) position in the original source (having in mind its real width and height). Unit agnostic (only numeric values allowed). Default: this.parent.srcLeft || CB_GraphicSprites.LEFT_SOURCE_DEFAULT. srcTop: 0, //Top (vertical) position in the original source (having in mind its real width and height). Unit agnostic (only numeric values allowed). Default: this.parent.srcTop || CB_GraphicSprites.TOP_SOURCE_DEFAULT. srcWidth: 40, //Width of the original source. Unit agnostic (only numeric values allowed). Default: this.parent.srcWidth || CB_GraphicSprites.WIDTH_SOURCE_DEFAULT. srcHeight: 40, //Height of the original source. Unit agnostic (only numeric values allowed). Default: this.parent.srcHeight || CB_GraphicSprites.HEIGHT_SOURCE_DEFAULT. top: 200, //Top (vertical) position in the destiny (inside the sprite). Unit agnostic (only numeric values allowed). Default: CB_GraphicSprites.TOP_DEFAULT. width: 12, //Width of the destiny (inside the sprite). Unit agnostic (only numeric values allowed). Default: this.parent.width || CB_GraphicSprites.WIDTH_DEFAULT. height: 12, //Height of the destiny (inside the sprite). Unit agnostic (only numeric values allowed). Default: this.parent.height || CB_GraphicSprites.HEIGHT_DEFAULT. data: { duration: null } } ] }, //'bird_sprite_4' ('CB_GraphicSprites.SPRITE_OBJECT' object). Some missing or non-valid properties will be inherited from the sprites group: { id: "bird_sprite_4", //Identifier for the sprite. Optional but recommended. It should be unique. If not provided, it will be calculated automatically. srcLeft: 38 * 3, //Left (horizontal) position in the original source (having in mind its real width and height). Unit agnostic (only numeric values allowed). Default: this.parent.srcLeft || CB_GraphicSprites.LEFT_SOURCE_DEFAULT. //Numeric array containing 'CB_GraphicSprites.SUBSPRITE_OBJECT' objects with the sub-sprites that this sprite uses: subSprites: [ //'bird_sprite_2_subsprite_1' ('CB_GraphicSprites.SUBSPRITE_OBJECT' object). Some missing or non-valid properties will be inherited from the parent sprite: { id: "bird_sprite_4_subsprite_1", //Identifier for the sub-sprite. Optional but recommended. It should be unique. If not provided, it will be calculated automatically. src: "img/sol.gif", srcLeft: 0, //Left (horizontal) position in the original source (having in mind its real width and height). Unit agnostic (only numeric values allowed). Default: this.parent.srcLeft || CB_GraphicSprites.LEFT_SOURCE_DEFAULT. srcTop: 0, //Top (vertical) position in the original source (having in mind its real width and height). Unit agnostic (only numeric values allowed). Default: this.parent.srcTop || CB_GraphicSprites.TOP_SOURCE_DEFAULT. srcWidth: 80, //Width of the original source. Unit agnostic (only numeric values allowed). Default: this.parent.srcWidth || CB_GraphicSprites.WIDTH_SOURCE_DEFAULT. srcHeight: 80, //Height of the original source. Unit agnostic (only numeric values allowed). Default: this.parent.srcHeight || CB_GraphicSprites.HEIGHT_SOURCE_DEFAULT. left: 20, //Left (horizontal) position in the destiny (inside the sprite). Unit agnostic (only numeric values allowed). Default: CB_GraphicSprites.LEFT_DEFAULT. top: 170, //Top (vertical) position in the destiny (inside the sprite). Unit agnostic (only numeric values allowed). Default: CB_GraphicSprites.TOP_DEFAULT. width: 40, //Width of the destiny (inside the sprite). Unit agnostic (only numeric values allowed). Default: this.parent.width || CB_GraphicSprites.WIDTH_DEFAULT. height: 40, //Height of the destiny (inside the sprite). Unit agnostic (only numeric values allowed). Default: this.parent.height || CB_GraphicSprites.HEIGHT_DEFAULT. data: { duration: 200, timeResetAndEnableAfter: 200 }, zIndex: 2 }, //'bird_sprite_2_subsprite_4' ('CB_GraphicSprites.SUBSPRITE_OBJECT' object). Some missing or non-valid properties will be inherited from the parent sprite: { id: "bird_sprite_4_subsprite_2", //Identifier for the sub-sprite. Optional but recommended. It should be unique. If not provided, it will be calculated automatically. src: "img/seta.gif", srcLeft: 0, //Left (horizontal) position in the original source (having in mind its real width and height). Unit agnostic (only numeric values allowed). Default: this.parent.srcLeft || CB_GraphicSprites.LEFT_SOURCE_DEFAULT. srcTop: 0, //Top (vertical) position in the original source (having in mind its real width and height). Unit agnostic (only numeric values allowed). Default: this.parent.srcTop || CB_GraphicSprites.TOP_SOURCE_DEFAULT. srcWidth: 40, //Width of the original source. Unit agnostic (only numeric values allowed). Default: this.parent.srcWidth || CB_GraphicSprites.WIDTH_SOURCE_DEFAULT. srcHeight: 40, //Height of the original source. Unit agnostic (only numeric values allowed). Default: this.parent.srcHeight || CB_GraphicSprites.HEIGHT_SOURCE_DEFAULT. top: 200, //Top (vertical) position in the destiny (inside the sprite). Unit agnostic (only numeric values allowed). Default: CB_GraphicSprites.TOP_DEFAULT. width: 12, //Width of the destiny (inside the sprite). Unit agnostic (only numeric values allowed). Default: this.parent.width || CB_GraphicSprites.WIDTH_DEFAULT. height: 12, //Height of the destiny (inside the sprite). Unit agnostic (only numeric values allowed). Default: this.parent.height || CB_GraphicSprites.HEIGHT_DEFAULT. data: { duration: null } } ] } ] }, //'panda_sprites' ('CB_GraphicSprites.SPRITES_OBJECT' object). Some missing or non-valid properties will will be inherited from the parent ('CB_GraphicSpritesScene.SPRITES_GROUPS_OBJECT' object): { id: "panda_sprites", //Identifier of the sprites group (also used for the 'CB_GraphicSprites' object). Optional but recommended. It should be unique. If not provided, it will be calculated automatically. width: 80, //Width of the destiny. Unit agnostic (only numeric values allowed). Default: this.parent.width || CB_GraphicSprites.WIDTH_DEFAULT. height: 80, //Height of the destiny. Unit agnostic (only numeric values allowed). Default: this.parent.height || CB_GraphicSprites.HEIGHT_DEFAULT. zIndex: 3, //The z-index for the destiny. Only numeric values allowed. Default: this.parent.zIndex || CB_GraphicSprites.ZINDEX_DEFAULT. //Object with any additional data desired which can be any kind: //NOTE: it will always have a "that" property pointing to the 'CB_GraphicSprites.SPRITES_OBJECT' object where it belongs to and a function in its "getThis" property returning the same value (added automatically). data: { skipAfter: 500 }, //Object with any additional data desired which can be any kind. Default: CB_combineJSON(this.parent.data, this.data) || this.parent.data || { 'that' : CB_GraphicSprites.SPRITES_OBJECT, 'getThis' = function() { return this.that; } }. //Numeric array containing 'CB_GraphicSprites.SPRITE_OBJECT' objects with all the sprites that will be used: sprites: [ //'panda_sprites_sprite_1' ('CB_GraphicSprites.SPRITE_OBJECT' object). Some missing or non-valid properties will be inherited from the sprites group: { id: "panda_sprites_sprite_1", //Identifier for the sprite. Optional but recommended. It should be unique. If not provided, it will be calculated automatically. src: "img/panda_1.gif" //Source of origin. Can be a path or identifier of an image, text, bitmap, 3D object, etc. Optional but recommended. Default: this.parent.src || "". }, //'panda_sprites_sprite_2' ('CB_GraphicSprites.SPRITE_OBJECT' object). Some missing or non-valid properties will be inherited from the sprites group: { id: "panda_sprites_sprite_2", //Identifier for the sprite. Optional but recommended. It should be unique. If not provided, it will be calculated automatically. src: "img/panda_2.gif" //Source of origin. Can be a path or identifier of an image, text, bitmap, 3D object, etc. Optional but recommended. Default: this.parent.src || "". } ] }, //'ranisima_sprites' ('CB_GraphicSprites.SPRITES_OBJECT' object). Some missing or non-valid properties will will be inherited from the parent ('CB_GraphicSpritesScene.SPRITES_GROUPS_OBJECT' object): { id: "ranisima_sprites", //Identifier of the sprites group (also used for the 'CB_GraphicSprites' object). Optional but recommended. It should be unique. If not provided, it will be calculated automatically. src: "img/ranisima.gif", //Source of origin. Can be a path or identifier of an image, text, bitmap, 3D object, etc. Optional but recommended. Default: this.parent.src || "". left: 110, //Left (horizontal) position in the destiny (inside the sprites group). Unit agnostic (only numeric values allowed). Default: CB_GraphicSprites.LEFT_DEFAULT. top: 80, //Top (vertical) position in the destiny (inside the sprites group). Unit agnostic (only numeric values allowed). Default: CB_GraphicSprites.TOP_DEFAULT. width: 160, //Width of the destiny. Unit agnostic (only numeric values allowed). Default: this.parent.width || CB_GraphicSprites.WIDTH_DEFAULT. height: 160, //Height of the destiny. Unit agnostic (only numeric values allowed). Default: this.parent.height || CB_GraphicSprites.HEIGHT_DEFAULT. zIndex: 2, //The z-index for the destiny. Only numeric values allowed. Default: this.parent.zIndex || CB_GraphicSprites.ZINDEX_DEFAULT. data: { rotation: 0, rotationX: undefined, rotationY: undefined, rotationUseDegrees: true, duration: 1000, timeResetAndEnableAfter: 250, clearPreviousFirst: true, opacity: 0.2, beforeDrawing: function(element, canvasContext, canvasBufferContext, useBuffer, CB_GraphicSpritesSceneObject, drawingMap, x, y, mapElement) //Called before drawing the element. { element.data.rotation++; return element; //Same as 'element'. Must return the element to draw. Return null to skip drawing it. } }, //Numeric array containing 'CB_GraphicSprites.SPRITE_OBJECT' objects with all the sprites that will be used: sprites: [ //'ranisima_sprites_sprite_1' ('CB_GraphicSprites.SPRITE_OBJECT' object). Some missing or non-valid properties will be inherited from the sprites group: { id: "ranisima_sprites_sprite_1" //Identifier for the sprite. Optional but recommended. It should be unique. If not provided, it will be calculated automatically. } ] }, //'text_group' ('CB_GraphicSprites.SPRITES_OBJECT' object). Some missing or non-valid properties will will be inherited from the parent ('CB_GraphicSpritesScene.SPRITES_GROUPS_OBJECT' object): { id: "text_group", srcType: CB_GraphicSprites.SRC_TYPES.TEXT, zIndex: 3, data: { skipAfter: 2000, clearPreviousFirst: true }, sprites: [ //'text_1' ('CB_GraphicSprites.SPRITE_OBJECT' object). Some missing or non-valid properties will be inherited from the sprites group: { id: "text_1", src: "Hello, CrossBrowdy!", left: 100, top: 24, data: { fontSize: "26px", fontFamily: "courier", style: "#ffff00", fontStyle: "normal", fontVariant: "normal", fontWeight: "bold", caption: null, smallCaption: null, icon: null, menu: null, messageBox: null, statusBar: null } }, //'text_2' ('CB_GraphicSprites.SPRITE_OBJECT' object). Some missing or non-valid properties will be inherited from the sprites group: { id: "text_2", src: "Stroke text", left: 100, top: 60, data: { fontSize: "48px", fontFamily: "arial", style: "#ff0000", stroke: true, fontStyle: "italic", fontVariant: "small-caps", fontWeight: "lighter", caption: null, smallCaption: null, icon: null, menu: null, messageBox: null, statusBar: null } } ] }, //'fps_group' ('CB_GraphicSprites.SPRITES_OBJECT' object). Some missing or non-valid properties will will be inherited from the parent ('CB_GraphicSpritesScene.SPRITES_GROUPS_OBJECT' object): { id: "fps_group", srcType: CB_GraphicSprites.SRC_TYPES.TEXT, zIndex: 3, sprites: [ //'fps' ('CB_GraphicSprites.SPRITE_OBJECT' object). Some missing or non-valid properties will be inherited from the sprites group: { id: "fps", src: "FPS: Calculating...", left: 110, top: 0, data: { fontSize: "26px", fontFamily: "courier", style: "#aa00dd", fontStyle: "normal", fontVariant: "normal", fontWeight: "bold", caption: null, smallCaption: null, icon: null, menu: null, messageBox: null, statusBar: null } } ] }, //'pixel_group' ('CB_GraphicSprites.SPRITES_OBJECT' object). Some missing or non-valid properties will will be inherited from the parent ('CB_GraphicSpritesScene.SPRITES_GROUPS_OBJECT' object): { id: "pixel_group", srcType: CB_GraphicSprites.SRC_TYPES.PIXEL, sprites: [ //'pixel_1' ('CB_GraphicSprites.SPRITE_OBJECT' object). Some missing or non-valid properties will be inherited from the sprites group: { id: "pixel_1", left: 85, top: 25, data: { style: "#ff00ff" }, subSprites: [ { id: "pixel_1_subsprite_1", top: 2 }, { id: "pixel_1_subsprite_2", top: 4 }, { id: "pixel_1_subsprite_3", top: 6 }, { id: "pixel_1_subsprite_4", top: 8 } ] } ] }, //'rectangle_group' ('CB_GraphicSprites.SPRITES_OBJECT' object). Some missing or non-valid properties will will be inherited from the parent ('CB_GraphicSpritesScene.SPRITES_GROUPS_OBJECT' object): { id: "rectangle_group", srcType: CB_GraphicSprites.SRC_TYPES.RECTANGLE, sprites: [ //'rectangle_1' ('CB_GraphicSprites.SPRITE_OBJECT' object). Some missing or non-valid properties will be inherited from the sprites group: { id: "rectangle_1", left: 400, top: 170, width: 60, height: 60, data: { style: "#00aa00" }, subSprites: [ { id: "rectangle_1_subsprite_1", left: 70, data: { style: function(element, canvasContext, canvasBufferContext, userBuffer) { var gradient = canvasContext.createLinearGradient(element.left, element.top, element.left + element.width, element.top + element.height); gradient.addColorStop(0, "#aa0000"); gradient.addColorStop(1, "#aaaa00"); return gradient; } } }, { id: "rectangle_1_subsprite_2", left: 140, data: { stroke: true, style: function(element, canvasContext, canvasBufferContext, userBuffer) { var gradient = canvasContext.createLinearGradient(element.left, element.top, element.left + element.width, element.top + element.height); gradient.addColorStop(0, "#00aa00"); gradient.addColorStop(1, "#00ffaa"); return gradient; } } }, { id: "rectangle_1_subsprite_3", left: 210, data: { filter: "sepia(1)", //Adds the desired filter. style: function(element, canvasContext, canvasBufferContext, userBuffer) { var src = "img/seta.gif"; var image = CB_REM._IMAGES_CACHE[src]; if (!image) { image = new Image() image.src = src; } return canvasContext.createPattern(image, 'repeat'); } } } ] } ] }, //'circle_group' ('CB_GraphicSprites.SPRITES_OBJECT' object). Some missing or non-valid properties will will be inherited from the parent ('CB_GraphicSpritesScene.SPRITES_GROUPS_OBJECT' object): { id: "circle_group", srcType: CB_GraphicSprites.SRC_TYPES.CIRCLE, data: { radius: 30, style: "#00aa00", opacity: 0.5 }, sprites: [ //'circle_1' ('CB_GraphicSprites.SPRITE_OBJECT' object). Some missing or non-valid properties will be inherited from the sprites group: { id: "circle_1", left: 35, top: 120, subSprites: [ { id: "circle_1_subsprite_1", top: 70, data: { style: function(element, canvasContext, canvasBufferContext, userBuffer) { var gradient = canvasContext.createRadialGradient(element.left, element.top, 10, element.left + 10, element.top + 10, 80); gradient.addColorStop(0, "red"); gradient.addColorStop(0.5, "black"); return gradient; } } }, { id: "circle_1_subsprite_2", top: 140, data: { style: "#aa0000", stroke: true } } ] } ] }, //'arc_group' ('CB_GraphicSprites.SPRITES_OBJECT' object). Some missing or non-valid properties will will be inherited from the parent ('CB_GraphicSpritesScene.SPRITES_GROUPS_OBJECT' object): { id: "arc_group", srcType: CB_GraphicSprites.SRC_TYPES.ARC, data: { radius: 10, startAngle: 2, endAngle: 11, style: "#00aa00" }, sprites: [ //'arc_1' ('CB_GraphicSprites.SPRITE_OBJECT' object). Some missing or non-valid properties will be inherited from the sprites group: { id: "arc_1", left: 80, top: 150, subSprites: [ { id: "arc_1_subsprite_1", top: 30 }, { id: "arc_1_subsprite_2", top: 60, data: { style: "#aa0000", stroke: true } } ] } ] }, //'ellipse_group' ('CB_GraphicSprites.SPRITES_OBJECT' object). Some missing or non-valid properties will will be inherited from the parent ('CB_GraphicSpritesScene.SPRITES_GROUPS_OBJECT' object): { id: "ellipse_group", srcType: CB_GraphicSprites.SRC_TYPES.ELLIPSE, data: { radiusX: 3, radiusY: 8, ellipseRotation: 20, startAngle: 2, endAngle: 11, anticlockwise: false, style: "#00aa00" }, sprites: [ //'ellipse_1' ('CB_GraphicSprites.SPRITE_OBJECT' object). Some missing or non-valid properties will be inherited from the sprites group: { id: "ellipse_1", left: 350, top: 100, subSprites: [ { id: "ellipse_1_subsprite_1", top: 20 }, { id: "ellipse_1_subsprite_2", top: 40, data: { style: "#aa0000", stroke: true } } ] } ] }, //'triangle_group' ('CB_GraphicSprites.SPRITES_OBJECT' object). Some missing or non-valid properties will will be inherited from the parent ('CB_GraphicSpritesScene.SPRITES_GROUPS_OBJECT' object): { id: "triangle_group", srcType: CB_GraphicSprites.SRC_TYPES.TRIANGLE, data: { x1: 3, y1: 8, x2: 20, y2: 2, style: "#00aa00" }, //The (x1, y1) and (x2, y2) points are relative to the element left and top. sprites: [ //'triangle_1' ('CB_GraphicSprites.SPRITE_OBJECT' object). Some missing or non-valid properties will be inherited from the sprites group: { id: "triangle_1", left: 370, top: 190, subSprites: [ { id: "triangle_1_subsprite_1", top: 20 }, { id: "triangle_1_subsprite_2", top: 40, data: { style: "#aa0000", stroke: true } } ] } ] }, //'segment_group' ('CB_GraphicSprites.SPRITES_OBJECT' object). Some missing or non-valid properties will will be inherited from the parent ('CB_GraphicSpritesScene.SPRITES_GROUPS_OBJECT' object): { id: "segment_group", srcType: CB_GraphicSprites.SRC_TYPES.SEGMENT, width: 10, data: { x1: 3, y1: 8, x2: 200, y2: 20, style: "#00aa00" }, //The (x1, y1) and (x2, y2) points are relative to the element left and top. sprites: [ //'segment_1' ('CB_GraphicSprites.SPRITE_OBJECT' object). Some missing or non-valid properties will be inherited from the sprites group: { id: "segment_1", left: 370, top: 250, subSprites: [ { id: "segment_1_subsprite_1", top: 20 }, { id: "segment_1_subsprite_2", top: 40, data: { style: "#aa0000" } } ] } ] }, //'bezier_curve_group' ('CB_GraphicSprites.SPRITES_OBJECT' object). Some missing or non-valid properties will will be inherited from the parent ('CB_GraphicSpritesScene.SPRITES_GROUPS_OBJECT' object): { id: "bezier_curve_group", srcType: CB_GraphicSprites.SRC_TYPES.BEZIER_CURVE, width: 5, data: { x1: 0, y1: 50, x2: 220, y2: 20, x3: 100, y3: 10, style: "#00aa00" }, //The (x1, y1), (x2, y2) and (x3, y3) points are relative to the element left and top. sprites: [ //'bezier_curve_1' ('CB_GraphicSprites.SPRITE_OBJECT' object). Some missing or non-valid properties will be inherited from the sprites group: { id: "bezier_curve_1", left: 0, top: 280, subSprites: [ { id: "bezier_curve_1_subsprite_1", top: 30 }, { id: "bezier_curve_1_subsprite_2", top: 60, data: { style: "#aa0000" } } ] } ] }, //'quadratic_bezier_curve_group' ('CB_GraphicSprites.SPRITES_OBJECT' object). Some missing or non-valid properties will will be inherited from the parent ('CB_GraphicSpritesScene.SPRITES_GROUPS_OBJECT' object): { id: "quadratic_bezier_curve_group", srcType: CB_GraphicSprites.SRC_TYPES.QUADRATIC_BEZIER_CURVE, width: 2, data: { x1: 0, y1: 50, x2: 220, y2: 20, style: "#00aa00" }, //The (x1, y1) and (x2, y2) points are relative to the element left and top. sprites: [ //'quadratic_bezier_curve_1' ('CB_GraphicSprites.SPRITE_OBJECT' object). Some missing or non-valid properties will be inherited from the sprites group: { id: "quadratic_bezier_curve_1", left: 150, top: 250, subSprites: [ { id: "quadratic_bezier_curve_1_subsprite_1", top: 30 }, { id: "quadratic_bezier_curve_1_subsprite_2", top: 60, data: { style: "#aa0000" } } ] } ] }, //'bitmap_group' ('CB_GraphicSprites.SPRITES_OBJECT' object). Some missing or non-valid properties will will be inherited from the parent ('CB_GraphicSpritesScene.SPRITES_GROUPS_OBJECT' object): { id: "bitmap_group", srcType: CB_GraphicSprites.SRC_TYPES.BITMAP, top: 340, left: 300, width: 10, //It will be updated when calling 'beforeDrawingElement'. height: 10, //It will be updated when calling 'beforeDrawingElement'. data: { beforeDrawingElement: function(element, canvasContext, canvasBufferContext, useBuffer, CB_GraphicSpritesSceneObject, drawingMap, x, y, mapElement) //Called before drawing the element. The 'element' and 'mapElement' will be the same. { this.width = 30; this.height = 20; return this; //Same as 'element'. Must return the element to draw. Return null to skip drawing it. } }, sprites: [ //Maps with string aliases: //'bitmap_current' ('CB_GraphicSprites.SPRITE_OBJECT' object). Some missing or non-valid properties will be inherited from the sprites group: { id: "bitmap_current", //Current map which will be displayed (it will be modified according to the position of the player and the other elements). src: [ [ true, true, true, true, true ], [ true, false, true, false, true ], [ true, false, true, false, true ] ] } ] }, //'map_group' ('CB_GraphicSprites.SPRITES_OBJECT' object). Some missing or non-valid properties will will be inherited from the parent ('CB_GraphicSpritesScene.SPRITES_GROUPS_OBJECT' object): { id: "map_group", src: //Map with string aliases: [ [ "#", "$", "@", "#", "", "@", "", "|", "!" ], [ 3, "%", "#", "@", "#", "@", "!", "", 1 ] ], srcType: CB_GraphicSprites.SRC_TYPES.MAP, left: 20, top: 400, width: 20, height: 20, data: { //References sprites or sub-sprites by their index or identifier. Define a "parentId" (parent identifier of the 'CB_GraphicSprites' object or of the 'CB_GraphicSprites.SPRITE_OBJECT' object) to improve performance. elementsData: { //Each property name is an alias which can be used in the map (in the "src" property). "1" : { index: 1, leftDependsOnPreviousElement: true, topDependsOnPreviousElement: true, parentId: "circle_1" }, //Has in mind the position of the last element to calculate its left and top. "3" : { index: 3, leftDependsOnPreviousElement: true, topDependsOnUpperElement: true, parentId: "bird_sprites" }, //Has in mind the position of the last element to calculate its left but to calculate its top has in mind the element above. "|": { id: "bird_sprites", leftDependsOnPreviousElement: true, //Has in mind the left position of the last element to calculate its left. topDependsOnPreviousElement: true //Has in mind the top position of the last element to calculate its top. }, "@": { id: "panda_sprites_sprite_1" }, "#": { id: "panda_sprites_sprite_2" }, "$": //If defined left and/or top, the position will always be that one (fixed). { id: "bird_sprite_2_subsprite_1", width: 120, height: 50, left: function(alias, element, elementData, elementMapParent, elementLoopLeftNext, x, y) { return 500; }, //It can be either a number or a function returning a number. The function will be called before drawing the element (sprite or sub-sprite) in each loop. top: 0, //It can be either a number or a function returning a number. The function will be called before drawing the element (sprite or sub-sprite) in each loop. //Renews the internal cache by creating a new copy of the cached element ('CB_GraphicSprites', 'CB_GraphicSprites.SPRITE_OBJECT' or 'CB_GraphicSprites.SUBSPRITE_OBJECT') every time it is rendered: renewCache: true }, "%": { id: "bird_sprite_1", //Renews the internal cache by creating a new copy of the cached element ('CB_GraphicSprites', 'CB_GraphicSprites.SPRITE_OBJECT' or 'CB_GraphicSprites.SUBSPRITE_OBJECT') every time it is rendered: renewCache: true, destroyOnRewnew: true //Destroys the previous stored element before renewing the internal cache. }, "!": { id: "bird_sprite_1_subsprite_2", width: function(alias, element, elementData, elementMapParent, elementLoopWidthDefault, x, y) { return 50; }, //It can be either a number or a function returning a number. The function will be called before drawing the element (sprite or sub-sprite) in each loop. height: 80, //It can be either a number or a function returning a number. The function will be called before drawing the element (sprite or sub-sprite) in each loop. leftDependsOnPreviousElement: true, //Has in mind the left position of the last element to calculate its left. topDependsOnPreviousElement: true, //Has in mind the top position of the last element to calculate its top. //Renews the internal cache by creating a new copy of the cached element ('CB_GraphicSprites', 'CB_GraphicSprites.SPRITE_OBJECT' or 'CB_GraphicSprites.SUBSPRITE_OBJECT') every time it is rendered: renewCache: true } }, elementsWidth: 40, //It can be either a number or a function returning a number. The function will be called before drawing the element (sprite or sub-sprite) in each loop. elementsHeight: function(alias, element, elementData, elementMapParent, elementLoopHeightDefault, x, y) { return 50; }, //It can be either a number or a function returning a number. The function will be called before drawing the element (sprite or sub-sprite) in each loop. /* Note: The "elementsLeft" and "elementsTop" properties can also be defined and can be either a number or a function returning a number. The function will be called before drawing the element (sprite or sub-sprite) in each loop. Uncomment them try: */ //elementsLeft: function(alias, element, elementData, elementMapParent, elementLoopLeftNext, x, y) { return 200; }, //elementsTop: 20, skipAfter: 5000 }, sprites: [ //'map_1' ('CB_GraphicSprites.SPRITE_OBJECT' object). Some missing or non-valid properties will be inherited from the sprites group: { id: "map_1" }, //'map_2' ('CB_GraphicSprites.SPRITE_OBJECT' object). Some missing or non-valid properties will be inherited from the sprites group: { id: "map_2", src: [ [ "", "%", "@", "#", "@", "#", "!" ], [ "$", "@", "#", "@", "|", "" ] ] }, //'map_3' ('CB_GraphicSprites.SPRITE_OBJECT' object). Some missing or non-valid properties will be inherited from the sprites group: { id: "map_3", left: 120, top: 100 }, //'map_4' ('CB_GraphicSprites.SPRITE_OBJECT' object). Some missing or non-valid properties will be inherited from the sprites group: { id: "map_4", left: 120, top: 100, src: [ [ "", "%", "@", "#", "@", "#", "!" ], [ "$", "@", "#", "@", "|", "" ] ] } ] } ] }; //Creates the graphic sprites object: return new CB_GraphicSpritesScene(spritesGroupsData); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "group(...sprites) {\n let container = new this.Container();\n sprites.forEach(sprite => {\n container.addChild(sprite);\n });\n return container;\n }", "defineGroups(){\n //creating invisible walls\n //don't forget to make these, ya know, actually invisible\n this.invisibleWallsGroup = this.add.group({\n classType: Phaser.Physics.Arcade.Sprite,\n active: true,\n runChildUpdate: false\n }).addMultiple([\n this.physics.add.sprite(-50, config.height/2, 'invisible_wall').setImmovable().setVisible(false),\n this.physics.add.sprite(config.width+50, config.height/2, 'invisible_wall').setImmovable().setVisible(false),\n this.physics.add.sprite(config.width/2, 149, 'invisible_wall_rotated').setImmovable().setVisible(false)\n ]);\n \n //creating the group to hold all the obstacles\n this.obstacleGroup = this.add.group({\n classType: Phaser.GameObjects.Sprite.Obstacle,\n defaultKey: null, //default texture to use\n defaultFrame: null, //default animation frame start to use\n active: true,\n maxSize: 15,\n runChildUpdate: true,\n createCallback: null, //what to do when an object is added to the group\n removeCallback: null, //what to do when an object is removed from the group\n createMultipleCallback: null //what to do when multiple objects are added to the group\n });\n\n //creating the group to hold all the enemies\n this.enemyGroup = this.add.group({\n classType: Phaser.GameObjects.Sprite.Enemy,\n active: true,\n maxSize: 5,\n runChildUpdate: true\n });\n\n //creating the group to hold all the attacks\n this.attackGroup = this.add.group({\n classType: Phaser.GameObjects.Sprite,\n active: true,\n maxSize: -1,\n runChildUpdate: true\n }); \n }", "createFromObjects(layerName, gid, spriteClass, group) {\n parent.stage.createFromObjects(layerName, gid, null, null, true, false, group, spriteClass, true);\n }", "drawGroups(context)\n\t{\n\t\tfor (let i = 0; i < this.groupDrawOrder.length; i++)\n\t\t{\n\t\t\tlet groupName = this.groupDrawOrder[i];\n\t\t\tthis.getGroup(groupName).drawSprites(context);\n\t\t}\n\t}", "function _create_sprites_elements(sprites) {\n for (let i = 0; i < sprites.length; i++) {\n if (!sprites[i]) { continue; }\n _create_image(sprites[i]);\n }\n }", "createLabelsAsSprites() {\n this.labelsGroup.clear();\n const verticesHashMap = this.createVerticesHashMap();\n Object.entries(verticesHashMap).forEach(([key, vertices]) => {\n for (let i = 0; i < vertices.length; i += 3) {\n const atomPosition = new THREE.Vector3().fromArray(vertices, i);\n const labelSprite = this.createLabelSprite(key, `label-for-${key}`);\n const offsetVector = this.getLabelOffsetVector(atomPosition, key);\n labelSprite.userData = { atomPosition, atomName: key };\n labelSprite.position.addVectors(atomPosition, offsetVector);\n this.labelsGroup.add(labelSprite);\n }\n });\n this.structureGroup.add(this.labelsGroup);\n }", "function create () {\n\n //Remove the first turn from the array (init information)\n var initInformation = serverJSON[0];\n serverJSON.shift();\n\n //set background image\n var background = game.add.sprite(0, 0, 'background');\n\n //create group for characters\n characters = game.add.group();\n\n //contains all the character objects in the initialInformation\n // as one array to make iteration easier\n var characterArray = [];\n initInformation.forEach(function(teamObject){\n teamObject.Characters.forEach(function(characterInfo){\n characterArray.push(characterInfo);\n });\n });\n\n //Add all players to the characters group at their initial locations and other init work\n for(var index = 0; index < statScreen.MultiPlayer.length; index++){\n //set CharacterID\n var characterID = characterArray[index].Id;\n statScreen.MultiPlayer[index].CharacterID = characterID;\n characterIDToMultiPlayerIndex[characterID] = index;\n\n var initPos = calcXAndY(characterArray[index].Position[0], characterArray[index].Position[1]);\n \n //generate the string of the key for the character sprite \n var teamNumber;\n if(index < 3){\n teamNumber = 1;\n }\n else{\n teamNumber = 2\n }\n //Wizard1.png, Druid2.png etc.\n var spriteName = characterArray[index].ClassId + teamNumber;\n\n //Add the character's sprite to its own Phaser Group\n //Used for rendering order of sprites\n var characterGroup = game.add.group(); \n statScreen.MultiPlayer[index].Sprite = characterGroup.create(initPos.x, initPos.y, spriteName);\n statScreen.MultiPlayer[index].PhaserGroup = characterGroup;\n\n //add the sprite to the characters group (global group)\n characters.add(statScreen.MultiPlayer[index].Sprite);\n\n\n //set the anchor of each character sprite to the middle of the sprite\n statScreen.MultiPlayer[index].Sprite.anchor.setTo(0.5);\n statScreen.MultiPlayer[index].Sprite.index = index;\n statScreen.MultiPlayer[index].Sprite.name = characterArray[index].Name;\n\n //Set initial values of attributes\n for(var attr in statScreen.MultiPlayer[index].InitialValue){\n statScreen.MultiPlayer[index].InitialValue[attr] = \n characterArray[index].Attributes[attr];\n }\n \n }\n\n //move the characters so they fit into the regions correctly\n moveCharactersQuadrantAbsolute(serverJSON[0]);\n\n\n //enable input for all character sprites\n characters.setAll('inputEnabled', true);\n //When input is detected (currently only clicking on a sprite is detected)\n // changeStatScreen is called by the sprite's corresponding player variable\n //Pass the variable of the calling character sprite to\n // changeStatScreen() \n characters.callAll('events.onInputDown.add', 'events.onInputDown', \n changeStatScreen, this);\n\n //Have the timer call all of the following functions every\n // TIME_TO_NEXT_UPDATE milliseconds\n //This function will only update the screen if serverJSON has \n // data within it (we aren't waiting for the server to send JSON over)\n processTurnTimerEvent = game.time.events.loop(TIME_TO_NEXT_UPDATE, processTurn, this);\n\n //add Graphics Object to the Game (used for drawing primitive shapes--health bars)\n singleGraphics = game.add.graphics();\n multiGraphics = game.add.graphics();\n\n //initializes both SinglePlayer and MultiPlayer screens, but keeps the MultiPlayer \n // screen active\n //default to player one\n initSinglePlayerStatScreen(statScreen[\"MultiPlayer\"][0].Sprite);\n statScreen.SinglePlayer.PlayerIndex = 0;\n hideSinglePlayerStatScreen();\n initMultiPlayerStatScreen();\n\n multiButton = game.add.text(GAME_WIDTH+250, 550, \"MULTI\", {font: \"4em Arial\", fill: \"#ff944d\"});\n multiButton.inputEnabled = true;\n multiButton.events.onInputDown.add(showMultiPlayerStatScreen, this);\n\n singleButton = game.add.text(GAME_WIDTH+20, 550, \"SINGLE\", {font: \"4em Arial\", fill: \"#ff944d\"});\n singleButton.inputEnabled = true;\n singleButton.events.onInputDown.add(showSinglePlayerStatScreen, this);\n\n //set up handle on spanTurnNumberElement\n spanTurnNumberElement = document.getElementById(\"turnNumber\");\n \n\n console.log(serverJSON);\n\n //log success\n console.log(\"create() complete\");\n}", "function makeGroups() {\n\tvar x = 400, y = 0\n\tfor (var i = 0, len = genres.length; i < len; i++) {\n\t\tcategoriesXY[genres[i]] = [ y , x ]\n\t\ty += 125\n\t\tif( i + 1 == Math.ceil(len/2) ) {\n\t\t\ty = 0\n\t\t\tx += 400\n\t\t}\n\t}\n}", "function createTilemap() {\r\n //Load in tilemap assets\r\n var map = this.make.tilemap({ key: \"tilemap\" });\r\n var landscape = map.addTilesetImage(\"landscape-tileset\", \"landscape\");\r\n var props = map.addTilesetImage(\"props-tileset\", \"props\");\r\n\r\n //Create first three layers\r\n map.createStaticLayer('backgroundLayer2', [landscape, props], 0, 0);\r\n map.createStaticLayer('backgroundLayer', [landscape, props], 0, 0);\r\n map.createStaticLayer('collisionLayer', [landscape, props], 0, 0);\r\n\r\n //Find the playerSpawn point\r\n var playerSpawn = map.findObject(\"objectLayer\", function (object) {\r\n if (object.type === \"player\") {\r\n return object;\r\n }\r\n });\r\n\r\n //Create player object\r\n createPlayer.call(this, playerSpawn);\r\n\r\n //Create groups\r\n jewels = this.physics.add.staticGroup();\r\n powerUps = this.physics.add.staticGroup();\r\n skulls = this.physics.add.staticGroup();\r\n\r\n //Find objects and create sprite for relevant group\r\n map.findObject(\"objectLayer\", function (object) {\r\n if (object.type === \"pickUp\" && object.name === \"jewel\") {\r\n jewels.create(object.x + map.tileWidth / 2, object.y - map.tileHeight / 2, \"jewel\");\r\n }\r\n\r\n if (object.type === \"powerUp\" && object.name === \"doubleJump\") {\r\n powerUps.create(object.x + map.tileWidth / 2, object.y - map.tileHeight / 2, \"cherry\");\r\n }\r\n if (object.type === \"pickUp\" && object.name === \"skull\") {\r\n skulls.create(object.x + map.tileWidth / 2, object.y - map.tileHeight / 2, \"skull\");\r\n }\r\n });\r\n\r\n //Create foreground layer\r\n map.createStaticLayer('foregroundLayer', landscape, 0, 1);\r\n\r\n //Return the map\r\n return map;\r\n}", "createMapLayerSprite(map, world, mapData, name, layerName, group) {\n\t\tvar tile = null;\n\t\tvar dx = 0;\n\t\tvar dy = 0;\n\t\tvar cls = true;\n\t\tmap.layer = layerName;\n\t\tconst tilesetStamps = [];\n\t\tconst chunkPixelSize = world.chunkSize * map.tileWidth;\n\t\tthis.tilesets.forEach(ts => {\n\t\t\ttilesetStamps[ts.name] = this.game.add.sprite(0, 0, ts.name);\n\t\t});\n\t\tconst texture = this.game.add.renderTexture(chunkPixelSize, chunkPixelSize);\n\t\tfor (var y = 0; y < world.chunkSize; y++) {\n\t\t\tfor (var x = 0; x < world.chunkSize; x++) {\n\t\t\t\ttile = map.getTile(x, y);\n\t\t\t\tif (tile) {\n\t\t\t\t\tconst tileIndex = tile.index;\n\t\t\t\t\tconst tileset = this.tilesets.find(t => tileIndex >= t.firstgid && tileIndex < t.firstgid + t.total);\n\t\t\t\t\tconst stamp = tilesetStamps[tileset.name];\n\t\t\t\t\tstamp.frame = tile.index - tileset.firstgid;\n\t\t\t\t\ttexture.renderXY(stamp, dx, dy, cls);\n\t\t\t\t\tcls = false;\n\t\t\t\t}\n\t\t\t\tdx += map.tileWidth;\n\t\t\t}\n\t\t\tdx = 0;\n\t\t\tdy += map.tileHeight;\n\t\t}\n\t\tconst sprite = this.game.add.sprite(mapData.x * chunkPixelSize, mapData.y * chunkPixelSize, texture, false, group);\n\t\tsprite.name = name;\n\t}", "initSpritesheets() {\n this.spritesheets = new Map(); // Map that stores spritesheets by ID\n\n for (let [id, spritesheet] of this.graph.spritesheets) {\n let ss = new MySpriteSheet(this, spritesheet.path, spritesheet.sizeM, spritesheet.sizeN);\n this.spritesheets.set(id, ss);\n }\n }", "function sprites() {\n \t\tspriteWobblers = new Object();\t\t\t\t\t\t\t\t\t\t\t// Set up arrays for the path/wobbles for each sprite\n \t\tphase4bob = new image(DEMO_ROOT + \"/def/resources/phase4.gif\");\t\t\t// Get the two sprites we've using this demo.\n \t\tatariBob = new image(DEMO_ROOT + \"/def/resources/atari.gif\");\n \t\tvar seperation = 0.30;\t\t\t\t\t\t\t\t\t\t\t\t\t// Distance between sprites\n \t\tvar spritePosition = 0;\t\t\t\t\t\t\t\t\t\t\t\t\t// Position in the path/wobble\n \t\tfor ( var i=0; i < noOfSprites; i++ ) {\t\t\t\t\t\t\t\t\t// For each sprite, set up a path/wobble\n \t\tspriteWobblers[i] = new SeniorDads.Wobbler(\n \t\t\t\t[\n\t \t\t\t\t \t{value: spritePosition, amp: 240, inc:0.08},\n\t \t\t\t\t \t{value: spritePosition, amp: 20, inc:0.30}\n \t\t\t\t],\n \t\t\t\t[\n\t \t\t\t\t \t{value: spritePosition, amp: 120, inc:0.06},\n\t \t\t\t\t \t{value: spritePosition, amp: 20, inc:0.40}\n \t\t\t\t]\n \t\t\t\t);\n \t\tspritePosition += seperation;\t\t\t\t\t\t\t\t\t\t// Move along position in the path/wobble for next sprite.\n \t\t}\n \t}", "function makeNewSprite(id) {\n var firstdiv = document.getElementById(\"controls\"); \n sprites[id] = document.createElement(\"div\");\n sprites[id].style.backgroundColor = \"#9ee\";\n sprites[id].style.opacity = \"0.8\";\n sprites[id].style.position = \"absolute\";\n sprites[id].style.zIndex = -1*Number(id); //hm.\n sprites[id].style.height = SPRITEWIDTH;\n sprites[id].style.width = SPRITEWIDTH;\n sprites[id].style.textAlign = \"center\";\n sprites[id].innerHTML = \"<span style='color:#52f;'>\"+id+\"</span>\";\n document.body.insertBefore(sprites[id], firstdiv); \n}", "buildMusicSprites() {\n let index = 0;\n for (const music of G.musics) {\n const offset = index++ - this.selected;\n const sprite = G.graphics.createSprite((w, h, self) => ({\n x: w,\n y: 0.3 * h + MUSIC_LIST_ITEM_HEIGHT * (1 - MUSIC_LIST_ITEM_Y_DELTA) * (offset - 0.5)\n }));\n sprite.width = 9999;\n sprite.height = MUSIC_LIST_ITEM_HEIGHT;\n // draw background\n sprite.addChild(G.graphics.createRect({\n top: 0,\n left: 0,\n width: 9999,\n height: MUSIC_LIST_ITEM_HEIGHT,\n background: 0x3498db,\n borderColor: 0x2980b9,\n borderWidth: 1,\n opacity: 1\n }));\n // draw inner text\n sprite.addChild(G.graphics.createText(`${music.artist} - ${music.name}`, {}, () => ({\n x: MUSIC_LIST_ITEM_PADDING,\n y: MUSIC_LIST_ITEM_PADDING\n })));\n sprite.addChild(G.graphics.createText(`Created by ${music.creator}`, {\n fontSize: MUSIC_LIST_ITEM_CREATOR_SIZE\n }, () => ({\n x: MUSIC_LIST_ITEM_PADDING,\n y: MUSIC_LIST_ITEM_PADDING + MUSIC_LIST_ITEM_TITLE_SIZE + MUSIC_LIST_ITEM_TITLE_MARGIN_BOTTOM\n })));\n // setup sprite\n this.musicListSprite.addChild(sprite);\n G.animation.set(sprite, (w, h, self) => ({\n x: w - MUSIC_LIST_ITEM_WIDTH + (Math.pow(Math.abs(offset), 1.2) * MUSIC_LIST_ITEM_WIDTH * MUSIC_LIST_ITEM_X_DELTA),\n y: 0.5 * h + MUSIC_LIST_ITEM_HEIGHT * (1 - MUSIC_LIST_ITEM_Y_DELTA) * (offset - 0.5)\n }), MUSIC_LIST_SWITCH_TIME * 3);\n }\n }", "function newEnemyGroup(groupData){\n enemies = game.add.group();\n // loop through enemy list and make enemies\n groupData.forEach(function(data) {\n //create the enemy\n enemy = enemies.create(-100, -100, data.image); //make them off screen\n //give the enemy HP\n enemy.health = data.hp;\n enemy.maxHealth = data.hp;\n //save info\n enemy.details = data;\n });\n // Add input to them\n enemies.setAll('inputEnabled', true);\n enemies.setAll('input.useHandCursor', true);\n // Do something when they are clicked\n enemies.forEach(function(enemy) {\n enemy.events.onInputDown.add(onEnemyClick, this);\n });\n}", "function tetris(){\n\tif(frameCount % 60 === 0) {\n\t\tvar tetris = createSprite(200,1,50,50);\n\t\ttetris.x = mario.x\n\t\ttetris.scale = 0.3\n\t\ttetris.velocityY = tetris.velocityY + 2\n\n\t\t\n\t\t\n\n\tvar rand = Math.round(random(1,7));\n switch(rand) {\n case 1: tetris.addImage(t1img);\n break;\n case 2: tetris.addImage(t2img);\n break;\n case 3: tetris.addImage(t3img);\n break;\n case 4: tetris.addImage(t4img);\n break;\n case 5: tetris.addImage(t5img);\n break;\n case 6: tetris.addImage(t6img);\n break;\n\t case 7: tetris.addImage(t7img);\n break;\n default: break;\n}\ntgroup.add(tetris)\n}}", "function createTiles(level) {\n tiles = [];\n\n let map = game.platform[level].map;\n\n for (let y = 0; y < map.length; y++) {\n tiles[y] = [];\n for (let x = 0; x < map[y].length; x++) {\n\n let type = map[y][x];\n\n let tile = new createjs.Sprite(game.tiles, type);\n tile.type = type;\n tile.gotoAndStop(type);\n tile.gridX = x;\n tile.gridY = y;\n\n tile.x = x * 60;\n tile.y = y * 60;\n if (tile.type != 6) {\n tiles[y][x] = tile;\n }\n game.stage.addChild(tile);\n }\n }\n playerOne.x = game.platform[level].p1.x;\n playerOne.y = game.platform[level].p1.y;\n game.stage.addChild(playerOne);\n playerTwo.x = game.platform[level].p2.x;\n playerTwo.y = game.platform[level].p2.y;\n game.stage.addChild(playerTwo);\n}", "create() {\n //add the following to the game\n //this.background = this.add.image(0, 0, \"background\"); //create the image\n this.background = this.add.tileSprite(0, 0, config.width, config.height, \"background\");\n this.background.setOrigin(0, 0); //determine where the image will load\n\n \n // this.ship1 = this.add.image(config.width / 2 - 50, config.height / 2, \"ship\");\n // this.ship2 = this.add.image(config.width / 2, config.height / 2, \"ship2\");\n // this.ship3 = this.add.image(config.width / 2 + 50, config.height / 2, \"ship3\");\n\n this.ship1 = this.add.sprite(config.width / 2 - 50, config.height / 2, \"ship\");\n this.ship2 = this.add.sprite(config.width / 2, config.height / 2, \"ship2\");\n this.ship3 = this.add.sprite(config.width / 2 + 50, config.height / 2, \"ship3\");\n\n //put all of our ships into a group\n this.enemies = this.physics.add.group();\n this.enemies.add(this.ship1);\n this.enemies.add(this.ship2);\n this.enemies.add(this.ship3);\n\n this.ship1.play(\"ship1_anim\");\n this.ship2.play(\"ship2_anim\");\n this.ship3.play(\"ship3_anim\");\n\n //make each ship interactive\n this.ship1.setInteractive();\n this.ship2.setInteractive();\n this.ship3.setInteractive();\n\n //add an event listener\n this.input.on('gameobjectdown', this.destroyShip, this);\n\n //create the power-ups for the game\n //there will be a maximum of 4 power-ups\n //set the power-ups to be located at a random position within the game\n this.powerUps = this.physics.add.group();\n\n var maxObjects = 4;\n for (var i=0; i <= maxObjects; i++) {\n var powerUp = this.physics.add.sprite(16, 16, \"power-up\");\n this.powerUps.add(powerUp);\n powerUp.setRandomPosition(0, 0, game.config.width, game.config.height);\n\n //make it a 50/50 chance of the animation being either red or gray\n if (Math.random() > 0.5) {\n powerUp.play(\"red\");\n }\n else {\n powerUp.play(\"gray\");\n }\n\n //set the velocity of the power-up to control how it travels on the screen\n //because we want the power-ups to collide with the boundaries, set the value to be true\n //because we want the power-ups to bounce off the boundaries, we set a bounce value\n //we want to keep its full velocity as it bounces, so the value will be 1\n powerUp.setVelocity(100, 100);\n powerUp.setCollideWorldBounds(true);\n powerUp.setBounce(1);\n }\n\n //add the player alongside its animation\n this.player = this.physics.add.sprite(config.width / 2 - 8, config.height - 64, \"player\");\n this.player.play(\"thrust\");\n\n //listen for any keyboard events\n this.cursorKeys = this.input.keyboard.createCursorKeys();\n\n //look for any collisions \n this.player.setCollideWorldBounds(true);\n\n //give the player the ability to use the spacebar\n this.spacebar = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.SPACE);\n\n this.projectiles = this.add.group();\n\n //enable any collisions that take place between objects\n //and groups of objects\n //third parameter uses an anonymous function which is called back\n //as the collision occurs\n this.physics.add.collider(this.projectiles, this.powerUps, function (projectile, powerUp) {\n projectile.destroy(); //destroys the shot as it collides with the object\n });\n //make the player pick up the power-up whenever the player touches it\n this.physics.add.overlap(this.player, this.powerUps, this.pickPowerUp, null, this);\n\n this.physics.add.overlap(this.player, this.enemies, this.hurtPlayer, null, this);\n\n this.physics.add.overlap(this.projectiles, this.enemies, this.hitEnemy, null, this);\n\n //create the graphics for the text\n //set the color of the text\n //and the size and length of the text\n var graphics = this.add.graphics();\n graphics.fillStyle(0x000000, 1);\n graphics.beginPath();\n graphics.moveTo(0, 0);\n graphics.lineTo(config.width, 0);\n graphics.lineTo(config.width, 20);\n graphics.lineTo(0, 20);\n graphics.lineTo(0, 0);\n graphics.closePath();\n graphics.fillPath();\n\n //set the score at startup - in this case it'll be 0\n this.score = 0;\n\n //create the score\n this.scoreLabel = this.add.bitmapText(10, 5, \"pixelFont\", \"SCORE \", 16);\n\n //create the sounds\n this.beamSound = this.sound.add(\"audio_beam\");\n this.explosionSound = this.sound.add(\"audio_explosion\");\n this.pickupSound = this.sound.add(\"audio_pickup\");\n\n this.music = this.sound.add(\"music\");\n\n var musicConfig = {\n mute: false,\n volume: 1,\n rate: 1,\n detune: 0,\n seek: 0,\n loop: false,\n delay: 0\n }\n this.music.play(musicConfig);\n }", "function spawnMonsters(){\n\n if (frameCount % 60 === 0 ){\n var monsters = createSprite(600,170,10,40);\n\n monsters.velocityX = -12\n\n\n var rand = Math.round(random(1,2));\n switch(rand) {\n case 1: monsters.addImage(turtleImg);\n break;\n case 2: monsters.addImage(vectorImg);\n break;\n default: break\n }\n\n monsters.lifetime = 300;\n\n monsterGroup.add(monsters)\n\n monsters.scale=1.5\n \n }\n}", "function Spawn_ForeverGround(){\r\n if (frameCount% 80 ===0) {\r\n var rand = Math.round(random(1,6));\r\n switch(rand) {\r\n case 1: var Forever_Ground = createSprite(width+100,height-240,10,10)\r\n Forever_Ground.addImage(ForeverGround_Img)\r\n Forever_Ground.scale = 0.5\r\n Forever_Ground.velocityX =-(3 + 3*score/100); \r\n \r\n \r\n var Forever_Ground2 = createSprite(width+164,height-240,10,10)\r\n Forever_Ground2.addImage(ForeverGround_Img2)\r\n Forever_Ground2.scale = 0.5\r\n Forever_Ground2.velocityX =-(3 + 3*score/100); \r\n\r\n var invisibleground = createSprite(width+164,height-265,200,5)\r\n invisibleground.velocityX = Forever_Ground2.velocityX\r\n invisibleground.visible = false\r\n \r\n var Forever_Ground3= createSprite(width+220,height-240,10,10)\r\n Forever_Ground3.addImage(ForeverGround_Img3)\r\n Forever_Ground3.scale = 0.5\r\n Forever_Ground3.velocityX =-(3 + 3*score/100); \r\n \r\n Forever_Ground.lifetime = 450\r\n Forever_Ground2.lifetime = 450\r\n Forever_Ground3.lifetime = 450\r\n invisibleground.lifetime = 450\r\n\r\n ForeverGroundGroup.add(Forever_Ground) \r\n ForeverGroundGroup.add(Forever_Ground2) \r\n ForeverGroundGroup.add(Forever_Ground3) \r\n CollideGroup.add(invisibleground);\r\n\r\n\r\n \r\n var Tree = createSprite(width+220,height-300,0,10)\r\n Tree.addImage(TreeImage)\r\n Tree.velocityX =-(3 + 3*score/100); \r\n Tree.scale=0.25\r\n Treegroup.add(Tree);\r\n \r\n var obstacle = createSprite(width+220,height-280,0,10)\r\n obstacle.addImage(ObstacleImage2)\r\n obstacle.velocityX =-(3 + 3*score/100); \r\n obstacle.scale = 0.5;\r\n ObstacleGroup.add(obstacle)\r\n \r\n \r\n CollideGroup.add(invisibleground) \r\n \r\n \r\n \r\n break;\r\n case 2: var Forever_Ground = createSprite(width+100,height-320,10,10)\r\n Forever_Ground.addImage(ForeverGround_Img)\r\n Forever_Ground.scale = 0.5\r\n Forever_Ground.velocityX =-(3 + 3*score/100); \r\n \r\n \r\n var Forever_Ground2 = createSprite(width+164,height-320,10,10)\r\n Forever_Ground2.addImage(ForeverGround_Img2)\r\n Forever_Ground2.scale = 0.5\r\n Forever_Ground2.velocityX =-(3 + 3*score/100); \r\n\r\n var invisibleground2 = createSprite(width+164,height-350,200,5)\r\n invisibleground2.velocityX = Forever_Ground2.velocityX\r\n invisibleground2.visible = false\r\n\r\n CollideGroup.add(invisibleground2)\r\n \r\n \r\n \r\n var Forever_Ground3= createSprite(width+220,height-320,10,10)\r\n Forever_Ground3.addImage(ForeverGround_Img3)\r\n Forever_Ground3.scale = 0.5\r\n Forever_Ground3.velocityX =-(3 + 3*score/100); \r\n\r\n Forever_Ground.lifetime = 450;\r\n Forever_Ground2.lifetime = 450;\r\n Forever_Ground3.lifetime = 450;\r\n invisibleground2.lifetime = 450;\r\n\r\n ForeverGroundGroup.add(Forever_Ground) \r\n ForeverGroundGroup.add(Forever_Ground2) \r\n ForeverGroundGroup.add(Forever_Ground3) \r\n \r\n break;\r\n case 3: var Forever_Ground = createSprite(width+100,height-120,10,10)\r\n Forever_Ground.addImage(ForeverGround_Img)\r\n Forever_Ground.scale = 0.5\r\n Forever_Ground.velocityX =-(3 + 3*score/100); \r\n \r\n \r\n var Forever_Ground2 = createSprite(width+164,height-120,10,10)\r\n Forever_Ground2.addImage(ForeverGround_Img2)\r\n Forever_Ground2.scale = 0.5\r\n Forever_Ground2.velocityX =-(3 + 3*score/100); \r\n \r\n var invisibleground3 = createSprite(width+164,height-145,200,5)\r\n invisibleground3.velocityX = Forever_Ground2.velocityX\r\n invisibleground3.visible = false\r\n\r\n \r\n var Forever_Ground3= createSprite(width+220,height-120,10,10)\r\n Forever_Ground3.addImage(ForeverGround_Img3)\r\n Forever_Ground3.scale = 0.5\r\n Forever_Ground3.velocityX =-(3 + 3*score/100); \r\n\r\n Forever_Ground.lifetime = 450\r\n Forever_Ground2.lifetime = 450\r\n Forever_Ground3.lifetime = 450\r\n invisibleground3.lifetime = 450\r\n\r\n ForeverGroundGroup.add(Forever_Ground) \r\n ForeverGroundGroup.add(Forever_Ground2) \r\n ForeverGroundGroup.add(Forever_Ground3)\r\n \r\n Tree = createSprite(width+164,height-180,0,10)\r\n Tree.addImage(TreeImage)\r\n Tree.velocityX =-(3 + 3*score/100); \r\n Tree.scale=0.25\r\n Treegroup.add(Tree);\r\n Tree.collide(Forever_Ground3)\r\n \r\n CollideGroup.add(invisibleground3)\r\n \r\n break;\r\n case 4: var Forever_Ground = createSprite(width+100,height/2,10,10)\r\n Forever_Ground.addImage(ForeverGround_Img)\r\n Forever_Ground.scale = 0.5\r\n Forever_Ground.velocityX =-(3 + 3*score/100); \r\n \r\n \r\n var Forever_Ground2 = createSprite(width+164,height/2,10,10)\r\n Forever_Ground2.addImage(ForeverGround_Img2)\r\n Forever_Ground2.scale = 0.5\r\n Forever_Ground2.velocityX =-(3 + 3*score/100); \r\n \r\n var invisibleground4=createSprite(width+164,height/2-25,200,5)\r\n invisibleground4.velocityX = Forever_Ground2.velocityX\r\n invisibleground4.visible = false\r\n\r\n \r\n\r\n var Forever_Ground3= createSprite(width+220,height/2,10,10)\r\n Forever_Ground3.addImage(ForeverGround_Img3)\r\n Forever_Ground3.scale = 0.5\r\n Forever_Ground3.velocityX =-(3 + 3*score/100); \r\n \r\n Forever_Ground.lifetime = 450\r\n Forever_Ground2.lifetime = 450\r\n Forever_Ground3.lifetime = 450\r\n invisibleground4.lifetime = 450\r\n\r\n ForeverGroundGroup.add(Forever_Ground) \r\n ForeverGroundGroup.add(Forever_Ground2) \r\n ForeverGroundGroup.add(Forever_Ground3) \r\n\r\n CollideGroup.add(invisibleground4)\r\n\r\n \r\n break;\r\n case 5: var Forever_Ground = createSprite(width+100,height-110,10,10)\r\n Forever_Ground.addImage(ForeverGround_Img)\r\n Forever_Ground.scale = 0.5\r\n Forever_Ground.velocityX =-(3 + 3*score/100); \r\n \r\n \r\n var Forever_Ground2 = createSprite(width+164,height-110,10,10)\r\n Forever_Ground2.addImage(ForeverGround_Img2)\r\n Forever_Ground2.scale = 0.5\r\n Forever_Ground2.velocityX =-(3 + 3*score/100); \r\n \r\n var invisibleground5 = createSprite(width+164,height-140,200,5)\r\n invisibleground5.velocityX = Forever_Ground2.velocityX\r\n invisibleground5.visible = false\r\n \r\n var Forever_Ground3= createSprite(width+220,height-110,10,10)\r\n Forever_Ground3.addImage(ForeverGround_Img3)\r\n Forever_Ground3.scale = 0.5\r\n Forever_Ground3.velocityX =-(3 + 3*score/100); \r\n \r\n Forever_Ground.lifetime = 450\r\n Forever_Ground2.lifetime = 450\r\n Forever_Ground3.lifetime = 450\r\n invisibleground5.lifetime = 450\r\n ForeverGroundGroup.add(Forever_Ground) \r\n ForeverGroundGroup.add(Forever_Ground2) \r\n ForeverGroundGroup.add(Forever_Ground3) \r\n \r\n\r\n CollideGroup.add(invisibleground5)\r\n var Tree = createSprite(width+164,height-170,0,10)\r\n Tree.addImage(TreeImage)\r\n Tree.velocityX =-(3 + 3*score/100); \r\n Tree.scale=0.25\r\n Treegroup.add(Tree);\r\n \r\n \r\n break;\r\n case 6: var Forever_Ground = createSprite(width+100,height-400,10,10)\r\n Forever_Ground.addImage(ForeverGround_Img)\r\n Forever_Ground.scale = 0.5\r\n Forever_Ground.velocityX =-(3 + 3*score/100); \r\n \r\n \r\n var Forever_Ground2 = createSprite(width+164,height-400,10,10)\r\n Forever_Ground2.addImage(ForeverGround_Img2)\r\n Forever_Ground2.scale = 0.5\r\n Forever_Ground2.velocityX =-(3 + 3*score/100); \r\n \r\n var invisibleground6 = createSprite(width +164,height-425,200,5);\r\n invisibleground6.velocityX = Forever_Ground2.velocityX\r\n invisibleground6.visible = false\r\n\r\n var Forever_Ground3= createSprite(width+220,height-400,10,10)\r\n Forever_Ground3.addImage(ForeverGround_Img3)\r\n Forever_Ground3.scale = 0.5\r\n Forever_Ground3.velocityX =-(3 + 3*score/100); \r\n\r\n Forever_Ground.lifetime = 450\r\n Forever_Ground2.lifetime = 450\r\n Forever_Ground3.lifetime = 450\r\n invisibleground6.lifetime = 450\r\n\r\n\r\n ForeverGroundGroup.add(Forever_Ground) \r\n ForeverGroundGroup.add(Forever_Ground2) \r\n ForeverGroundGroup.add(Forever_Ground3) \r\n \r\n CollideGroup.add(invisibleground6)\r\n break;\r\n default: break;\r\n \r\n }\r\n \r\n } \r\n }", "function create() {\n if (gameState === \"Menu\") {\n menuGroupSetup();\n } else if (gameState === \"Playing\") {\n game.world.removeAll();\n stageGroupSetup();\n entityGroupSetup();\n guiGroupSetup();\n game.sound.setDecodedCallback([monsterLaugh, mainTheme], playIntro);\n } else if (gameState === \"GameOver\") {\n gameOverGroupSetup();\n } else if (gameState === \"Win\") {\n gameWinGroupSetup();\n }\n\n game.input.mouse.capture = true;\n cursors = game.input.keyboard.createCursorKeys();\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 spawnBlocks(){\r\n if(frameCount%150===0){\r\n var r = Math.round(random(400,300));\r\n var block = createSprite(1500,r,200,160);\r\n block.scale = 0.4;\r\n block.setCollider(\"rectangle\",0,-80,470,180);\r\n block.velocityX = -3;\r\n var rand = Math.round(random(1,2));\r\n switch(rand){\r\n case 1: block.addImage(chocblock);\r\n break;\r\n case 2: block.addImage(strawblock);\r\n break;\r\n default:break;\r\n }\r\n blockGroup.add(block);\r\n //block.debug = true;\r\n }\r\n}", "function Spawn_BigGround(){\r\n if (frameCount%290===0){\r\n\r\n var BigGround = createSprite(width+180,height-145,10,10);\r\n BigGround.addImage(BigGround_Img);\r\n var BigGround2 = createSprite(width+300,height-145,10,10);\r\n BigGround2.addImage(BigGround_Img3);\r\n \r\n var BigGround3 = createSprite(width+180,height-25,10,10);\r\n BigGround3.addImage(BigGround_Img4);\r\n \r\n var BigGround4 = createSprite(width+300,height-25,10,10);\r\n BigGround4.addImage(BigGround_Img2);\r\n \r\n var BigGround5 = createSprite(width+400,height-25,10,10) ; \r\n BigGround5.addImage(BigGround_Img);\r\n\r\n var BigGround6 = createSprite(width+450,height-25,10,10);\r\n BigGround6.addImage(BigGround_Img3) ; \r\n \r\n BigGround.velocityX = -(3 + 3*score/100); \r\n BigGround2.velocityX = -(3 + 3*score/100); \r\n BigGround3.velocityX = -(3 + 3*score/100); \r\n BigGround4.velocityX = -(3 + 3*score/100); \r\n BigGround5.velocityX = -(3 + 3*score/100); \r\n BigGround6.velocityX = -(3 + 3*score/100); \r\n \r\n BigGround.lifetime = 350 \r\n BigGround2.lifetime = 350 \r\n BigGround3.lifetime = 350 \r\n BigGround4.lifetime = 350 \r\n BigGround5.lifetime = 350\r\n BigGround6.lifetime = 350\r\n \r\n \r\n \r\n BigGroundGroup.add(BigGround); \r\n BigGroundGroup.add(BigGround3);\r\n BigGroundGroup.add(BigGround2); \r\n BigGroundGroup.add(BigGround4); \r\n BigGroundGroup.add(BigGround5); \r\n BigGroundGroup.add(BigGround6); \r\n \r\n \r\n \r\n }\r\n \r\n }", "function buildGroup(hex,yMov,xMov,zRot,zPos){\n\n\tvar geometry = new THREE.Geometry();\n\tvar startPoint = new THREE.Vector3( -0.25, -0.25, zPos);\n\tvar object = buildFace(geometry,5,startPoint);\n\n\tobject.position.y += yMov;\n\tobject.position.x += xMov;\n\tobject.rotation.z += zRot;\n\thex.add(object);\n}", "function draw() {\n if(gameState===\"PLAY\"){\n //giving keyboard controls for ironman\n if (keyDown(\"up\")) {\n ironman.velocityY = -10;\n }\n if (keyDown(\"left\")) {\n ironman.x = ironman.x - 5;\n }\n if (keyDown(\"right\")) {\n ironman.x = ironman.x + 5;\n }\n ironman.velocityY = ironman.velocityY + 0.5;\n\n //calling the functions to generate the objects\n GenerateStone();\n GenerateDiamonds();\n GenerateSpikes();\n\n //making only one object of the group destory if mario touches it\n for (var i = 0; i < stoneGroup.length; i++) {\n var temp = stoneGroup.get(i)\n ironman.collide(temp);\n }\n\n for (var i = 0; i < diamondGroup.length; i++) {\n var temp = diamondGroup.get(i)\n\n if (temp.isTouching(ironman)) {\n score++\n temp.destroy();\n temp = null;\n }\n for (var i = 0; i < spikeGroup.length; i++) {\n var temp = spikeGroup.get(i)\n\n if (temp.isTouching(ironman)) {\n score = score - 5;\n temp.destroy();\n temp = null;\n }\n }\n }\n }\n else if(gameState===\"END\"){\n ironman.velocityY=0;\n spikeGroup.setVelocityXEach(0);\n stoneGroup.setVelocityXEach(0);\n diamondGroup.setVelocityXEach(0);\n diamondGroup.setLifetimeEach(-1);\n stoneGroup.setLifetimeEach(-1);\n spikeGroup.setLifetimeEach(-1);\n }\n \n\n //adding drawsprites to draw the sprites on the screen\n drawSprites();\n\n //giving color and size to the text\n fill(\"white\")\n textSize(25);\n text(\"Score : \" + score, 100, 100);\n}", "function staticSpriteLayout(){\n\n // Lilypads\n for(let n = 0; n < STATIC_SPRITES_LAYOUT.lilypads.length; n++){\n let newLilypad = new PIXI.Sprite(\n PIXI.loader.resources[\"images/static-sprites/lilypad.png\"].texture\n );\n gameScene.addChild(newLilypad);\n newLilypad.anchor.set(0.5);\n newLilypad.scale.set(STATIC_SPRITES_LAYOUT.lilypads[n].scale);\n newLilypad.rotation = STATIC_SPRITES_LAYOUT.lilypads[n].rotation;\n newLilypad.position.set(STATIC_SPRITES_LAYOUT.lilypads[n].x, STATIC_SPRITES_LAYOUT.lilypads[n].y);\n newLilypad.displayGroup = staticGroup;\n }\n}", "function createPlatform(nbr, platforms) {\n\n var offset = 100;\n\n for (var i = 0; i < nbr; i++) {\n\n var rndY = game.rnd.realInRange(500, 350);\n\n var rnd1 = game.rnd.realInRange(700, 3000);\n var rnd2 = game.rnd.realInRange(3010, 5000);\n var rnd3 = game.rnd.realInRange(5010, 7000);\n\n // DISPERSE PLATFORMS \n\n if (platforms.length <= 3) {\n platform = game.add.sprite((rnd1 + offset), rndY, 'platform'); \n } else if(platforms.length > 6 && platforms.length <= 8){\n platform = game.add.sprite((rnd2 + offset), rndY, 'platform'); \n } else{\n platform = game.add.sprite((rnd3 + offset), rndY, 'platform'); \n }\n\n platform.name = 'platform';\n game.physics.enable(platform, Phaser.Physics.ARCADE);\n platform.body.immovable = true;\n platform.body.gravity = 0;\n platform.body.setSize(70, 10, 0, 0); \n platforms.push(platform); \n }\n}", "createParts() {\n\t\tthis.parts = this.game.add.group();\n\n\t\tvar head = this.createHead(this.x-1, this.y); // offset the head a tiny bit respect to the other body parts\n\t\thead.leader = this;\n\t\tthis.parts.add(head); \n\n\t\tvar num = 10;\n\t\tvar nextLeader = head;\n\n\t\tfor(var i = 0; i < num; i++){\n\t\t\tvar x = head.x + (i+1) * this.partDistance;\n\t\t\tvar part = this.createBody(x, 20);\n\t\t\tthis.game.physics.enable(part, Phaser.Physics.ARCADE);\n\t\t\tpart.leaderDist = this.partDistance;\n\t\t\tpart.leader = nextLeader;\n\t\t\tnextLeader = part;\n\t\t\tthis.parts.add(part);\n\t\t}\n\n\t\t// Add each body part to the display list in reverse order they were created\n\t\tthis.parts.forEach(function(part) {\n\t\t\tthis.parts.sendToBack(part);\n\t\t\tpart.reset(this.x, this.y);\n\t\t}, this);\n\t}", "_createBoard() {\n let map = this.map = this._createHexagonMap();\n\n for (let q in map) {\n for (let r in map[q]) {\n this._createSprite(map[q][r]);\n }\n }\n }", "function addSpriteCrest() {\n\tdrawRect(RECT_UI_X, RECT_UI_Y, RECT_UI_W, RECT_UI_H, RECT_UI_COLOR);\n\n\tvar crest = addSprite(CREST_X, CREST_Y, 'crest');\n\tunsmoothSprite(crest);\n\tscaleSprite(crest);\n}", "function makeEnemyGroup(group, type) {\n for(var x = 0; x < 7; x++) {\n for(var y = 0; y < 10; y++){\n // baddy = group.create(200 + Math.random()*500, 50 + Math.random()*200, type);\n enemyHolder++\n baddy = group.create(530 + x*33, 50 + y*33, type);\n baddy.anchor.setTo(0.5);\n baddy.scale.x *= -1\n baddy.tint = Math.random() * 0xffffff;\n var tween = game.add.tween(baddy).to( { x: baddy.x-20 }, 2000, Phaser.Easing.Linear.None, true, 0, 1000, true);\n\n tween.onLoop.add(descend, this);\n }\n\n }\n}", "function makeSprites(stripName, animationName, yyData, data)\n{\n log(\"making\", stripName, animationName);\n \n return new Promise(function(resolve, reject) {\n var promises = [];\n \n var spriteName = config.prefixStr + stripName + \"_\" + animationName;\n \n yyData.name = spriteName;\n \n var layerId = uuidv1();\n \n var layerData = {\n \"visible\": true,\n \"isLocked\": false,\n \"blendMode\": 0,\n \"opacity\": 100.0,\n \"displayName\": \"default\",\n \"resourceVersion\": \"1.0\",\n \"name\": layerId,\n \"tags\": [],\n \"resourceType\": \"GMImageLayer\",\n };\n \n yyData.layers.push(layerData);\n \n //for each frame data, make seperate image data, since that is how yy files work\n for (var i=data.start; i<data.frames; i++)\n {\n promises.push(writeSpriteImage(i, yyData, spriteName, layerId));\n }\n \n Promise.all(promises).then(function() {\n log(\"Made \" + config.outputDirectory + spriteName + \"/\" + spriteName + \".yy\");\n \n //write out the json file, or yy file\n var str = JSON.stringify(yyData);\n fs.writeFileSync(config.outputDirectory + spriteName + \"/\" + spriteName + \".yy\", str);\n \n resolve();\n });\n });\n}", "function createTileSheet()\n{\n let sheet = new PIXI.BaseTexture.from(app.loader.resources[\"tiles\"].url);\n let crateSheet = new PIXI.BaseTexture.from(app.loader.resources[\"crate\"].url);\n let spikeSheet = new PIXI.BaseTexture.from(app.loader.resources[\"spikes\"].url);\n let w = 80;\n let h = 80;\n \n tileSheet[\"platform\"] = [\n new PIXI.Texture(sheet, new PIXI.Rectangle(0, 0, w, h))\n ];\n tileSheet[\"crate\"] = [\n new PIXI.Texture(crateSheet, new PIXI.Rectangle(0, 0, w, h))\n ];\n\n tileSheet[\"spikes\"] = [\n new PIXI.Texture(spikeSheet, new PIXI.Rectangle(0, 0, w, 20))\n ];\n}", "makeBoardOnScreen(){\n // Here we'll create a new Group\n for (var i=0; i < game.n; i++) {\n for (var j=0; j < game.n; j ++) {\n //initialize 2D array board to be empty strings\n for (var k=0; k < game.n; k++) {\n for (var l=0; l < game.n; l++) {\n //create square\n var square = game.addSprite(game.startingX + i*game.squareSize*3 + k*game.squareSize, game.startingY + j * game.squareSize*3 + l*game.squareSize, 'square');\n //allow square to respond to input\n square.inputEnabled = true\n //indices used for the 4D array\n square.bigXindex = i\n square.bigYindex = j\n square.littleXindex = k\n square.littleYindex = l\n //make have placePiece be called when a square is clicked\n square.events.onInputDown.add(game.placePiece, game)\n }\n }\n }\n }\n game.drawLines()\n }", "grid(\n columns = 0, rows = 0, cellWidth = 32, cellHeight = 32,\n centerCell = false, xOffset = 0, yOffset = 0,\n makeSprite = undefined,\n extra = undefined\n ){\n\n //Create an empty group called `container`. This `container`\n //group is what the function returns back to the main program.\n //All the sprites in the grid cells will be added\n //as children to this container\n let container = this.group();\n\n //The `create` method plots the grid\n let createGrid = () => {\n\n //Figure out the number of cells in the grid\n let length = columns * rows;\n\n //Create a sprite for each cell\n for(let i = 0; i < length; i++) {\n\n //Figure out the sprite's x/y placement in the grid\n let x = (i % columns) * cellWidth,\n y = Math.floor(i / columns) * cellHeight;\n\n //Use the `makeSprite` function supplied in the constructor\n //to make a sprite for the grid cell\n let sprite = makeSprite();\n\n //Add the sprite to the `container`\n container.addChild(sprite);\n\n //Should the sprite be centered in the cell?\n\n //No, it shouldn't be centered\n if (!centerCell) {\n sprite.x = x + xOffset;\n sprite.y = y + yOffset;\n }\n\n //Yes, it should be centered\n else {\n sprite.x \n = x + (cellWidth / 2) \n - sprite.halfWidth + xOffset;\n sprite.y \n = y + (cellHeight / 2) \n - sprite.halfHeight + yOffset;\n }\n\n //Run any optional extra code. This calls the\n //`extra` function supplied by the constructor\n if (extra) extra(sprite);\n }\n };\n\n //Run the `createGrid` method\n createGrid();\n\n //Return the `container` group back to the main program\n return container;\n }", "function main()\n{\n\tCB_console(\"CrossBrowdy and all needed modules loaded. Starting game engine example...\");\n\t\n\t//Sets the desired sprites scene data (can be modified dynamically):\n\tvar pandaLeftDefault = 100;\n\tvar pandaTopDefault = 100;\n\tvar pandaWidthDefault = 100;\n\tvar pandaHeightDefault = 100;\n\tCB_GEM.spritesGroupsData =\n\t{\n\t\t//'my_sprites_groups_1' ('CB_GraphicSpritesScene.SPRITES_GROUPS_OBJECT' object). Some missing or non-valid properties will get a default value:\n\t\tid: \"my_sprites_groups_1\", //Identifier of the sprites groups object (also used for the 'CB_GraphicSpritesScene' object). Optional but recommended. It should be unique. By default, it is generated automatically.\n\t\tsrcWidth: 40, //The value for the \"srcWidth\" property which will be used as default if not provided (or the provided one was wrong) in the given 'CB_GraphicSprites.SPRITES_OBJECT' objects. Default: CB_GraphicSprites.WIDTH_SOURCE_DEFAULT.\n\t\tsrcHeight: 40, //The value for the \"srcHeight\" property which will be used as default if not provided (or the provided one was wrong) in the given 'CB_GraphicSprites.SPRITES_OBJECT' objects. Default: CB_GraphicSprites.HEIGHT_SOURCE_DEFAULT.\n\t\tdata: { loop: true }, //Object with any additional data desired which can be any kind. Default: { 'that' : CB_GraphicSprites.SPRITES_OBJECT, 'getThis' = function() { return this.that; } }.\n\t\t//Numeric array containing 'CB_GraphicSprites.SPRITES_OBJECT' objects with all the sprites groups that will be used (their \"parent\" property will be set to point the current 'CB_GraphicSpritesScene' object which contains them):\n\t\tspritesGroups:\n\t\t[\n\t\t\t//'panda_sprites' ('CB_GraphicSprites.SPRITES_OBJECT' object). Some missing or non-valid properties will will be inherited from the parent ('CB_GraphicSpritesScene.SPRITES_GROUPS_OBJECT' object):\n\t\t\t{\n\t\t\t\t\n\t\t\t\tid: \"panda_sprites\", //Identifier of the sprites group (also used for the 'CB_GraphicSprites' object). Optional but recommended. It should be unique. If not provided, it will be calculated automatically.\n\t\t\t\tleft: pandaTopDefault, //Left (horizontal) position in the destiny (inside the sprites group). Unit agnostic (only numeric values allowed). Default: CB_GraphicSprites.LEFT_DEFAULT.\n\t\t\t\ttop: pandaTopDefault, //Top (vertical) position in the destiny (inside the sprites group). Unit agnostic (only numeric values allowed). Default: CB_GraphicSprites.TOP_DEFAULT.\n\t\t\t\twidth: pandaWidthDefault, //Width of the destiny. Unit agnostic (only numeric values allowed). Default: this.parent.width || CB_GraphicSprites.WIDTH_DEFAULT.\n\t\t\t\theight: pandaHeightDefault, //Height of the destiny. Unit agnostic (only numeric values allowed). Default: this.parent.height || CB_GraphicSprites.HEIGHT_DEFAULT.\n\t\t\t\t//Object with any additional data desired which can be any kind:\n\t\t\t\t//NOTE: it will always have a \"that\" property pointing to the 'CB_GraphicSprites.SPRITES_OBJECT' object where it belongs to and a function in its \"getThis\" property returning the same value (added automatically).\n\t\t\t\tdata: { skipAfter: 500, positionAbsolute: true }, //Object with any additional data desired which can be any kind. Default: CB_combineJSON(this.parent.data, this.data) || this.parent.data || { 'that' : CB_GraphicSprites.SPRITES_OBJECT, 'getThis' = function() { return this.that; } }.\n\t\t\t\t//Numeric array containing 'CB_GraphicSprites.SPRITE_OBJECT' objects with all the sprites that will be used:\n\t\t\t\tsprites:\n\t\t\t\t[\n\t\t\t\t\t//'panda_sprites_sprite_1' ('CB_GraphicSprites.SPRITE_OBJECT' object). Some missing or non-valid properties will be inherited from the sprites group:\n\t\t\t\t\t{\n\t\t\t\t\t\tid: \"panda_sprites_sprite_1\", //Identifier for the sprite. Optional but recommended. It should be unique. If not provided, it will be calculated automatically.\n\t\t\t\t\t\tsrc: \"img/panda_1.gif\" //Source of origin. Can be a path or identifier of an image, text, bitmap, 3D object, etc. Optional but recommended. Default: this.parent.src || \"\".\n\t\t\t\t\t},\n\t\t\t\t\t//'panda_sprites_sprite_2' ('CB_GraphicSprites.SPRITE_OBJECT' object). Some missing or non-valid properties will be inherited from the sprites group:\n\t\t\t\t\t{\n\t\t\t\t\t\tid: \"panda_sprites_sprite_2\", //Identifier for the sprite. Optional but recommended. It should be unique. If not provided, it will be calculated automatically.\n\t\t\t\t\t\tsrc: \"img/panda_2.gif\" //Source of origin. Can be a path or identifier of an image, text, bitmap, 3D object, etc. Optional but recommended. Default: this.parent.src || \"\".\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t//'bird_sprites' ('CB_GraphicSprites.SPRITES_OBJECT' object). Some missing or non-valid properties will will be inherited from the parent ('CB_GraphicSpritesScene.SPRITES_GROUPS_OBJECT' object):\n\t\t\t{\n\t\t\t\tid: \"bird_sprites\", //Identifier of the sprites group (also used for the 'CB_GraphicSprites' object). Optional but recommended. It should be unique. If not provided, it will be calculated automatically.\n\t\t\t\tsrc: \"img/bird_sprites.gif\", //Source of origin. Can be a path or identifier of an image, text, bitmap, 3D object, etc. Optional but recommended. Default: this.parent.src || \"\".\n\t\t\t\tsrcWidth: 38, //Width of the original source. Unit agnostic (only numeric values allowed). Default: this.parent.srcWidth || CB_GraphicSprites.WIDTH_SOURCE_DEFAULT.\n\t\t\t\tsrcHeight: 36, //Height of the original source. Unit agnostic (only numeric values allowed). Default: this.parent.srcHeight || CB_GraphicSprites.HEIGHT_SOURCE_DEFAULT.\n\t\t\t\tleft: 300, //Left (horizontal) position in the destiny (inside the sprites group). Unit agnostic (only numeric values allowed). Default: CB_GraphicSprites.LEFT_DEFAULT.\n\t\t\t\twidth: 190, //Width of the destiny. Unit agnostic (only numeric values allowed). Default: this.parent.width || CB_GraphicSprites.WIDTH_DEFAULT.\n\t\t\t\theight: 160, //Height of the destiny. Unit agnostic (only numeric values allowed). Default: this.parent.height || CB_GraphicSprites.HEIGHT_DEFAULT.\n\t\t\t\t//Object with any additional data desired which can be any kind:\n\t\t\t\t//NOTE: it will always have a \"that\" property pointing to the 'CB_GraphicSprites.SPRITES_OBJECT' object where it belongs to and a function in its \"getThis\" property returning the same value (added automatically).\n\t\t\t\tdata: { skipAfter: 600, clearPreviousFirst: true, onlyUseInMap: false /* Set to true to only display in maps */ }, //Object with any additional data desired which can be any kind. Default: CB_combineJSON(this.parent.data, this.data) || this.parent.data || { 'that' : CB_GraphicSprites.SPRITES_OBJECT, 'getThis' = function() { return this.that; } }.\n\t\t\t\t//Numeric array containing 'CB_GraphicSprites.SPRITE_OBJECT' objects with all the sprites that will be used:\n\t\t\t\tsprites:\n\t\t\t\t[\n\t\t\t\t\t//'bird_sprite_1' ('CB_GraphicSprites.SPRITE_OBJECT' object). Some missing or non-valid properties will be inherited from the sprites group:\n\t\t\t\t\t{\n\t\t\t\t\t\tid: \"bird_sprite_1\", //Identifier for the sprite. Optional but recommended. It should be unique. If not provided, it will be calculated automatically.\n\t\t\t\t\t\t//Numeric array containing 'CB_GraphicSprites.SUBSPRITE_OBJECT' objects with the sub-sprites that this sprite uses:\n\t\t\t\t\t\tsubSprites:\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t//'bird_sprite_1_subsprite_1' ('CB_GraphicSprites.SUBSPRITE_OBJECT' object). Some missing or non-valid properties will be inherited from the parent sprite:\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tid: \"bird_sprite_1_subsprite_1\", //Identifier for the sub-sprite. Optional but recommended. It should be unique. If not provided, it will be calculated automatically.\n\t\t\t\t\t\t\t\tsrc: \"img/sol.gif\",\n\t\t\t\t\t\t\t\tsrcLeft: 0, //Left (horizontal) position in the original source (having in mind its real width and height). Unit agnostic (only numeric values allowed). Default: this.parent.srcLeft || CB_GraphicSprites.LEFT_SOURCE_DEFAULT.\n\t\t\t\t\t\t\t\tsrcTop: 0, //Top (vertical) position in the original source (having in mind its real width and height). Unit agnostic (only numeric values allowed). Default: this.parent.srcTop || CB_GraphicSprites.TOP_SOURCE_DEFAULT.\n\t\t\t\t\t\t\t\tsrcWidth: 80, //Width of the original source. Unit agnostic (only numeric values allowed). Default: this.parent.srcWidth || CB_GraphicSprites.WIDTH_SOURCE_DEFAULT.\n\t\t\t\t\t\t\t\tsrcHeight: 80, //Height of the original source. Unit agnostic (only numeric values allowed). Default: this.parent.srcHeight || CB_GraphicSprites.HEIGHT_SOURCE_DEFAULT.\n\t\t\t\t\t\t\t\tleft: 20, //Left (horizontal) position in the destiny (inside the sprite). Unit agnostic (only numeric values allowed). Default: CB_GraphicSprites.LEFT_DEFAULT.\n\t\t\t\t\t\t\t\ttop: 170, //Top (vertical) position in the destiny (inside the sprite). Unit agnostic (only numeric values allowed). Default: CB_GraphicSprites.TOP_DEFAULT.\n\t\t\t\t\t\t\t\twidth: 40, //Width of the destiny (inside the sprite). Unit agnostic (only numeric values allowed). Default: this.parent.width || CB_GraphicSprites.WIDTH_DEFAULT.\n\t\t\t\t\t\t\t\theight: 40, //Height of the destiny (inside the sprite). Unit agnostic (only numeric values allowed). Default: this.parent.height || CB_GraphicSprites.HEIGHT_DEFAULT.\n\t\t\t\t\t\t\t\tdata: { duration: 200, timeResetAndEnableAfter: 200 },\n\t\t\t\t\t\t\t\tzIndex: 2\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t//'bird_sprite_1_subsprite_2' ('CB_GraphicSprites.SUBSPRITE_OBJECT' object). Some missing or non-valid properties will be inherited from the parent sprite:\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tid: \"bird_sprite_1_subsprite_2\", //Identifier for the sub-sprite. Optional but recommended. It should be unique. If not provided, it will be calculated automatically.\n\t\t\t\t\t\t\t\tsrc: \"img/seta.gif\",\n\t\t\t\t\t\t\t\tsrcLeft: 0, //Left (horizontal) position in the original source (having in mind its real width and height). Unit agnostic (only numeric values allowed). Default: this.parent.srcLeft || CB_GraphicSprites.LEFT_SOURCE_DEFAULT.\n\t\t\t\t\t\t\t\tsrcTop: 0, //Top (vertical) position in the original source (having in mind its real width and height). Unit agnostic (only numeric values allowed). Default: this.parent.srcTop || CB_GraphicSprites.TOP_SOURCE_DEFAULT.\n\t\t\t\t\t\t\t\tsrcWidth: 40, //Width of the original source. Unit agnostic (only numeric values allowed). Default: this.parent.srcWidth || CB_GraphicSprites.WIDTH_SOURCE_DEFAULT.\n\t\t\t\t\t\t\t\tsrcHeight: 40, //Height of the original source. Unit agnostic (only numeric values allowed). Default: this.parent.srcHeight || CB_GraphicSprites.HEIGHT_SOURCE_DEFAULT.\n\t\t\t\t\t\t\t\ttop: 200, //Top (vertical) position in the destiny (inside the sprite). Unit agnostic (only numeric values allowed). Default: CB_GraphicSprites.TOP_DEFAULT.\n\t\t\t\t\t\t\t\twidth: 12, //Width of the destiny (inside the sprite). Unit agnostic (only numeric values allowed). Default: this.parent.width || CB_GraphicSprites.WIDTH_DEFAULT.\n\t\t\t\t\t\t\t\theight: 12, //Height of the destiny (inside the sprite). Unit agnostic (only numeric values allowed). Default: this.parent.height || CB_GraphicSprites.HEIGHT_DEFAULT.\n\t\t\t\t\t\t\t\tdata:\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tduration: null\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//'bird_sprite_2' ('CB_GraphicSprites.SPRITE_OBJECT' object). Some missing or non-valid properties will be inherited from the sprites group:\n\t\t\t\t\t{\n\t\t\t\t\t\tid: \"bird_sprite_2\", //Identifier for the sprite. Optional but recommended. It should be unique. If not provided, it will be calculated automatically.\n\t\t\t\t\t\tsrcLeft: 38, //Left (horizontal) position in the original source (having in mind its real width and height). Unit agnostic (only numeric values allowed). Default: this.parent.srcLeft || CB_GraphicSprites.LEFT_SOURCE_DEFAULT.\n\t\t\t\t\t\t//Numeric array containing 'CB_GraphicSprites.SUBSPRITE_OBJECT' objects with the sub-sprites that this sprite uses:\n\t\t\t\t\t\tsubSprites:\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t//'bird_sprite_2_subsprite_1' ('CB_GraphicSprites.SUBSPRITE_OBJECT' object). Some missing or non-valid properties will be inherited from the parent sprite:\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tid: \"bird_sprite_2_subsprite_1\", //Identifier for the sub-sprite. Optional but recommended. It should be unique. If not provided, it will be calculated automatically.\n\t\t\t\t\t\t\t\tsrc: \"img/sol.gif\",\n\t\t\t\t\t\t\t\tsrcLeft: 0, //Left (horizontal) position in the original source (having in mind its real width and height). Unit agnostic (only numeric values allowed). Default: this.parent.srcLeft || CB_GraphicSprites.LEFT_SOURCE_DEFAULT.\n\t\t\t\t\t\t\t\tsrcTop: 0, //Top (vertical) position in the original source (having in mind its real width and height). Unit agnostic (only numeric values allowed). Default: this.parent.srcTop || CB_GraphicSprites.TOP_SOURCE_DEFAULT.\n\t\t\t\t\t\t\t\tsrcWidth: 80, //Width of the original source. Unit agnostic (only numeric values allowed). Default: this.parent.srcWidth || CB_GraphicSprites.WIDTH_SOURCE_DEFAULT.\n\t\t\t\t\t\t\t\tsrcHeight: 80, //Height of the original source. Unit agnostic (only numeric values allowed). Default: this.parent.srcHeight || CB_GraphicSprites.HEIGHT_SOURCE_DEFAULT.\n\t\t\t\t\t\t\t\tleft: 20, //Left (horizontal) position in the destiny (inside the sprite). Unit agnostic (only numeric values allowed). Default: CB_GraphicSprites.LEFT_DEFAULT.\n\t\t\t\t\t\t\t\ttop: 170, //Top (vertical) position in the destiny (inside the sprite). Unit agnostic (only numeric values allowed). Default: CB_GraphicSprites.TOP_DEFAULT.\n\t\t\t\t\t\t\t\twidth: 40, //Width of the destiny (inside the sprite). Unit agnostic (only numeric values allowed). Default: this.parent.width || CB_GraphicSprites.WIDTH_DEFAULT.\n\t\t\t\t\t\t\t\theight: 40, //Height of the destiny (inside the sprite). Unit agnostic (only numeric values allowed). Default: this.parent.height || CB_GraphicSprites.HEIGHT_DEFAULT.\n\t\t\t\t\t\t\t\tdata: { duration: 200, timeResetAndEnableAfter: 200 },\n\t\t\t\t\t\t\t\tzIndex: 2\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t//'bird_sprite_2_subsprite_1' ('CB_GraphicSprites.SUBSPRITE_OBJECT' object). Some missing or non-valid properties will be inherited from the parent sprite:\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tid: \"bird_sprite_2_subsprite_2\", //Identifier for the sub-sprite. Optional but recommended. It should be unique. If not provided, it will be calculated automatically.\n\t\t\t\t\t\t\t\tsrc: \"img/seta.gif\",\n\t\t\t\t\t\t\t\tsrcLeft: 0, //Left (horizontal) position in the original source (having in mind its real width and height). Unit agnostic (only numeric values allowed). Default: this.parent.srcLeft || CB_GraphicSprites.LEFT_SOURCE_DEFAULT.\n\t\t\t\t\t\t\t\tsrcTop: 0, //Top (vertical) position in the original source (having in mind its real width and height). Unit agnostic (only numeric values allowed). Default: this.parent.srcTop || CB_GraphicSprites.TOP_SOURCE_DEFAULT.\n\t\t\t\t\t\t\t\tsrcWidth: 40, //Width of the original source. Unit agnostic (only numeric values allowed). Default: this.parent.srcWidth || CB_GraphicSprites.WIDTH_SOURCE_DEFAULT.\n\t\t\t\t\t\t\t\tsrcHeight: 40, //Height of the original source. Unit agnostic (only numeric values allowed). Default: this.parent.srcHeight || CB_GraphicSprites.HEIGHT_SOURCE_DEFAULT.\n\t\t\t\t\t\t\t\ttop: 200, //Top (vertical) position in the destiny (inside the sprite). Unit agnostic (only numeric values allowed). Default: CB_GraphicSprites.TOP_DEFAULT.\n\t\t\t\t\t\t\t\twidth: 12, //Width of the destiny (inside the sprite). Unit agnostic (only numeric values allowed). Default: this.parent.width || CB_GraphicSprites.WIDTH_DEFAULT.\n\t\t\t\t\t\t\t\theight: 12, //Height of the destiny (inside the sprite). Unit agnostic (only numeric values allowed). Default: this.parent.height || CB_GraphicSprites.HEIGHT_DEFAULT.\n\t\t\t\t\t\t\t\tdata: { duration: null }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t]\n\t\t\t\t\t}\n\t\t\t\t ]\n\t\t\t}\n\t\t]\n\t};\n\n\t//Sets the desired options for the game engine module:\n\tCB_GEM.setOptions\n\t(\n\t\t{\n\t\t\tLOOP_REFRESH_RATE: 16, //A refresh rate of 16 is about 60 FPS (Frames Per Second) when the cycles per loop is set to 1. Default: 16.\n\t\t\tRENDERING_CYCLES_PER_LOOP: 1, //The number of rendering cycles per loop. It will affect the FPS.\n\t\t\tCANVAS_FORCED_EMULATION_METHOD: undefined, //Forces a canvas emulation mode which can be 'SILVERLIGHT', 'FLASH', 'DHTML' or 'VML' (testing purposes). Use null or undefined to disable it. Default: undefined.\n\t\t\tcanvasId: \"my_canvas\", //Identifier for the canvas element. Default: 'my_canvas'.\n\t\t\tcanvasBufferId: \"my_canvas_buffer\" //Identifier for the buffer canvas element. Default: 'my_canvas_buffer'.\n\t\t}\n\t);\n\t\n\t//Defines the callbacks for the game loop:\n\tCB_GEM.data = //Data stored in the game engine module (can be exported to save the game status):\n\t{\n\t\tpandaLeft: pandaLeftDefault,\n\t\tpandaTop: pandaTopDefault,\n\t\tpandaLeftPrevious: 0,\n\t\tpandaTopPrevious: 0,\n\t\tpandaWidth: pandaWidthDefault,\n\t\tpandaHeight: pandaHeightDefault,\n\t\tpixelsMovement: 5\n\t};\n\tvar moving = false;\n\tvar panda = null;\n\tCB_GEM.onLoopStart = function(graphicSpritesSceneObject, CB_REM_dataObject, expectedCallingTime) //When the game loop starts, before rendering the graphics (if it returns false, it will skip rendering in this loop):\n\t{\n\t\t//Moves the panda according to the input received through the keyboard (and controllers that fire keyboard events):\n\t\tif (CB_Keyboard.isKeyDown(CB_Keyboard.keys.UP)) { CB_GEM.data.pandaTop -= CB_GEM.data.pixelsMovement; }\n\t\tif (CB_Keyboard.isKeyDown(CB_Keyboard.keys.DOWN)) { CB_GEM.data.pandaTop += CB_GEM.data.pixelsMovement; }\n\t\tif (CB_Keyboard.isKeyDown(CB_Keyboard.keys.LEFT)) { CB_GEM.data.pandaLeft -= CB_GEM.data.pixelsMovement; }\n\t\tif (CB_Keyboard.isKeyDown(CB_Keyboard.keys.RIGHT)) { CB_GEM.data.pandaLeft += CB_GEM.data.pixelsMovement; }\n\t\t\n\t\tpanda = CB_GEM.graphicSpritesSceneObject.getById(\"panda_sprites\");\n\t\t\n\t\tif (CB_GEM.data.pandaLeft < 0) { CB_GEM.data.pandaLeft = 0; }\n\t\telse if (CB_GEM.data.pandaLeft > CB_GEM.CB_CanvasObject.getWidth() - panda.getCurrent().width) { CB_GEM.data.pandaLeft = CB_GEM.CB_CanvasObject.getWidth() - panda.getCurrent().width; }\n\t\tif (CB_GEM.data.pandaTop < 0) { CB_GEM.data.pandaTop = 0; }\n\t\telse if (CB_GEM.data.pandaTop > CB_GEM.CB_CanvasObject.getHeight() - panda.getCurrent().height) { CB_GEM.data.pandaTop = CB_GEM.CB_CanvasObject.getHeight() - panda.getCurrent().height; }\n\t\t\n\t\tmoving = false;\n\t\tif (CB_GEM.data.pandaLeft !== CB_GEM.data.pandaLeftPrevious) { panda.setPropertyCascade(\"left\", CB_GEM.data.pandaLeft); moving = true; }\n\t\tif (CB_GEM.data.pandaTop !== CB_GEM.data.pandaTopPrevious) { panda.setPropertyCascade(\"top\", CB_GEM.data.pandaTop); moving = true; }\n\t\t\n\t\tCB_GEM.data.pandaLeftPrevious = CB_GEM.data.pandaLeft;\n\t\tCB_GEM.data.pandaTopPrevious = CB_GEM.data.pandaTop;\n\t\t\n\t\tif (moving) { CB_GEM.data.pixelsMovement++ } //Accelerates.\n\t\telse { CB_GEM.data.pixelsMovement = 5; } //Restores normal speed.\n\t};\n\t\n\tCB_GEM.onLoopEnd = function(graphicSpritesSceneObject, CB_REM_dataObject, expectedCallingTime) //When the game loop ends, after rendering the graphics (not executed if the 'CB_GEM.onLoopStart' function returned false):\n\t{\n\t\t//Changes the panda size according to whether it is moving or not:\n\t\tif (moving)\n\t\t{\n\t\t\tCB_GEM.data.pandaWidth = panda.getCurrent().width - 1;\n\t\t\tCB_GEM.data.pandaHeight = panda.getCurrent().height - 1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tCB_GEM.data.pandaWidth = pandaWidthDefault;\n\t\t\tCB_GEM.data.pandaHeight = pandaHeightDefault;\n\t\t}\n\t\t\n\t\tpanda.setPropertyCascade(\"width\", CB_GEM.data.pandaWidth);\n\t\tpanda.setPropertyCascade(\"height\", CB_GEM.data.pandaHeight);\n\t};\n\t\n\t//Sets some keyboard events (some controllers can also fire keyboard events):\n\tCB_Keyboard.onKeyDown\n\t(\n\t\tfunction(e, keyCode)\n\t\t{\n\t\t\t//After pressing the ESC key, stops or starts the game loop (depending on its current status):\n\t\t\tif (keyCode === CB_Keyboard.keys.ESC[0]) { gameLoopStartStop(); }\n\t\t\t//...otherwise, after pressing the SPACEBAR key, it will show the current data in the console:\n\t\t\telse if (keyCode === CB_Keyboard.keys.SPACEBAR[0]) { getGameData(); } //Not stringified.\n\t\t}\n\t);\n\t\n\t//Starts the game engine module:\n\tCB_GEM.begin\n\t(\n\t\t//onStart:\n\t\tfunction(graphicSpritesSceneObject, CB_CanvasObject, CB_CanvasObjectBuffer, FPSSprites) //'FPSSprites' contains the 'CB_GraphicSprites.SPRITES_OBJECT' object used to display the FPS counter.\n\t\t{\n\t\t\tFPSSprites.setDisabled(false); //Set to true to hide FPS counter.\n\t\t\tFPSSprites.getCurrent().data.fontSize = \"18px\"; //Sets the font size for the FPS counter.\n\t\t\tFPSSprites.getCurrent().data.style = \"#ff0000\"; //Sets the font colour for the FPS counter.\n\t\t},\n\t\t\n\t\t//onError:\n\t\tfunction(error) { CB_console(\"Error: \" + error); }\n\t);\n}", "function spawnSprites() {\n\n score++;\n \n //gap between platforms :\n if(gapLength > 0 ){\n\n gapLength -=1;\n }//Create ground\n else if(platformLength > 0 ){\n\n var sheet = getSpriteSheet();\n var frame = getFrameNumber();\n\n ground.push(new Sprite(\n canvas.width + platformWidth % player.speed,\n platformBase - platformHeight * platformSpace,\n null, sheet, frame\n ));\n platformLength -=1;\n\n //add random environment sprites\n spawnEnvironmentSprites();\n\n\n //add random enemies\n spawnEnemySprites();\n\n\n }\n else{\n\n //increase gap length every speed increase of 4\n gapLength = rand(player.speed - 4,player.speed-2);\n\n //only allow a ground to increase by 1 \n platformHeight = bound(rand(0, platformHeight + rand(0, 2)), 0 , 4);\n platformLength = rand(Math.floor(player.speed/2), player.speed * 4);\n\n }\n }", "function generatePipes () {\n pipeY = game.rnd.integerInRange(-100, 100);\n pipeGroup = pipes.getFirstExists(false);\n if (!pipeGroup) {\n pipeGroup = game.add.group(pipes);\n\n topPipe = pipeGroup.create(0, 0, 'pipe');\n topPipe.frame = 0;\n\n topPipe.anchor.setTo(0.5, 0.5);\n game.physics.arcade.enableBody(topPipe);\n\n topPipe.body.allowGravity = false;\n topPipe.body.immovable = true;\n\n bottomPipe = pipeGroup.create(0, 0, 'pipe');\n bottomPipe.frame = 1;\n\n bottomPipe.anchor.setTo(0.5, 0.5);\n game.physics.arcade.enableBody(bottomPipe);\n\n bottomPipe.body.allowGravity = false;\n bottomPipe.body.immovable = true;\n\n pipeGroup.setAll('body.velocity.x', -200);\n }\n resetPipeGroup(game.width, pipeY);\n}", "createTerrain() {\n this.terraingroup = this.physics.add.group();\n\n for (let i = 0; i < terrainnumber; i++){\n const terrain = this.terraingroup.create(1000, 50, 'terrain'); //this.add.sprite this.terraingroup.create\n terrain.setImmovable(true);\n terrain.setOrigin(0, 0);\n \n \n \n this.putbarrier(terrain);\n }\n //add animation\n this.terraingroup.getChildren().forEach(function(terrain){\n terrain.anims.play('skull');\n });\n\n this.terraingroup.setVelocityX(this.terrainSpeed); // terrainSpeed\n }", "createGroups() {\n const app = this.app;\n const participants = app.session.participants;\n const gIds = app.getGroupIdsForPeriod(this);\n\n // Create groups\n var pIds = [];\n for (var p in participants) {\n pIds.push(p);\n }\n\n let numGroups = this.numGroups();\n if (gIds[0].length != null) {\n numGroups = gIds.length;\n } else {\n for (let i in gIds) {\n numGroups = Math.max(numGroups, gIds[i]);\n }\n }\n for (var g=this.groups.length; g<numGroups; g++) {\n var group = new Group.new(g+1, this);\n group.save();\n this.groups.push(group);\n\n if (gIds[g].length != null) {\n // Label format\n // [['P1', 'P2'], ['P3', 'P4'], ...]\n for (var i=0; i<gIds[g].length; i++) {\n var pId = gIds[g][i];\n var participant = participants[pId];\n var player = new Player.new(pId, participant, group, i+1);\n participant.players.push(player);\n player.save();\n participant.save();\n group.players.push(player);\n }\n group.allPlayersCreated = true;\n group.save(); \n } else {\n // Numerical format\n // [['P1', 'P2'], ['P3', 'P4'], ...]\n for (var i=0; i<gIds.length; i++) {\n if (gIds[i] == group.id) {\n var participant = participants[pIds[i]];\n var player = new Player.new(pIds[i], participant, group, group.players.length+1);\n participant.players.push(player);\n player.save();\n participant.save();\n group.players.push(player);\n }\n }\n group.allPlayersCreated = true;\n group.save(); \n }\n }\n\n }", "create() {\n\t\tinitBoxes(this, COLORS.MAIN_BOX, COLORS.MAIN_BOX_BORDER);\n\n\t\t// create map\n\t\tthis.createMap();\n\n\t\t// create player animations\n\t\tthis.createAnimations();\n\n\t\t// user input\n\t\tthis.cursors = this.input.keyboard.createCursorKeys();\n\n\t\t//animted Objects\n\t\tthis.gpu = this.add.sprite(240, 464, 1, 2, 'gpu');\n\t\tthis.gpu.play('gpu');\n\t\tthis.psu = this.add.sprite(144, 160, 'psu');\n\t\tthis.psu.play('psu');\n\t\tthis.psu.setDepth(+2);\n\n\t\t// mobile Controls\n\t\tthis.createMobileControls();\n\n\t\t// create enemies\n\t\tthis.createStations();\n\n\t\t// listen for web socket events\n\t\tthis.createMultiplayerIO();\n\t\tthis.createGameIO();\n\n\t\tthis.createAllPlayers(this.initPlayers);\n\t\tthis.events.emit('setNoTasks', this.noTasks);\n\n\t}", "function createGroups(){\n\tgroupNumber = parseInt($(this).attr('class'));\n\t\n\t// Clear groups from the DOM\n\t$(\"#groups\").empty();\n}", "fillNextSprites() {\n for (let i = 0; i < this.nextContainers.length; i++) {\n let container = this.nextContainers[i]\n let tetromino = this.queue[i]\n\n let sprite = tetromino.getSprite()\n if (sprite != null) {\n container.addChild(sprite)\n }\n }\n }", "function generateGrid() {\n const tileWidth = PHASER_CONFIG.width / SNAKE_GAME_CONFIG.gridSize.width;\n const tileHeight = PHASER_CONFIG.height / SNAKE_GAME_CONFIG.gridSize.height;\n\n this.spriteGrid = [];\n for (let x = 0; x < SNAKE_GAME_CONFIG.gridSize.width; x++) {\n for (let y = 0; y < SNAKE_GAME_CONFIG.gridSize.height; y++) {\n const sprite = this.physics.add.sprite((x + 0.5) * tileWidth, (y + 0.5) * tileHeight, 'whiteSquare64');\n sprite.displayWidth = tileWidth * 0.9;\n sprite.displayHeight = tileHeight * 0.9;\n sprite.tint = SNAKE_GAME_CONFIG.emptyTileColour;\n this.spriteGrid.push({gridPos: {x, y}, sprite});\n }\n }\n}", "createNewEnemy() {\n console.log(\"spawn!\");\n if (gameIsOver) return;\n\n if (!isPaused) {\n var xPos = Phaser.Math.RND.integerInRange(leftBound, rightBound);\n var rock = this.physics.add.sprite(xPos, 0, 'rock');\n rock.scaleX = 2;\n rock.scaleY = 2;\n enemyGroup.add(rock);\n\n }\n }", "createStars() {\n\t\tconst stars = this.physics.add.group({\n\t\t\tkey: STAR_KEY,\n\t\t\t// Create a star and add/clone 11 more + (create 1 + clone 11 = 12 stars)\n\t\t\trepeat: 11,\n\t\t\t// Place them on the X horizontal axis 14 pixels from the left\n\t\t\t// Place them on the Y vertical axis 0 pixels from the top\n\t\t\t// Distance between the stars should be 70px\n\t\t\tsetXY: { x: 14, y: 0, stepX: 70 },\n\t\t});\n\n\t\t// iterate() - apply some method to all elements in a group - (such as map())\n\t\tstars.children.iterate((child) => {\n\t\t\tchild.setBounceY(Phaser.Math.FloatBetween(0.4, 0.8)); // random Y axis bounce value between 0.4 and 0.8\n\t\t});\n\n\t\treturn stars;\n\t}", "function Groups(game) {\r\n this.game = game;\r\n this.enemies = game.add.group();\r\n this.bosses = game.add.group();\r\n}", "function createPlayerSheet()\n{\n let sheet = new PIXI.BaseTexture.from(app.loader.resources[\"human\"].url);\n let w = 80;\n let h = 80;\n \n playerSheet[\"stand\"] = [\n new PIXI.Texture(sheet, new PIXI.Rectangle(0, 0, w, h))\n ];\n\n playerSheet[\"walk\"] = [\n new PIXI.Texture(sheet, new PIXI.Rectangle(0 * w, h, w, h)),\n new PIXI.Texture(sheet, new PIXI.Rectangle(1 * w, h, w, h)),\n new PIXI.Texture(sheet, new PIXI.Rectangle(2 * w, h, w, h)),\n new PIXI.Texture(sheet, new PIXI.Rectangle(3 * w, h, w, h)),\n new PIXI.Texture(sheet, new PIXI.Rectangle(4 * w, h, w, h)),\n new PIXI.Texture(sheet, new PIXI.Rectangle(5 * w, h, w, h)),\n new PIXI.Texture(sheet, new PIXI.Rectangle(6 * w, h, w, h))\n ];\n playerSheet[\"shoot\"] = [\n new PIXI.Texture(sheet, new PIXI.Rectangle(0 * w, h * 2, w, h)),\n new PIXI.Texture(sheet, new PIXI.Rectangle(1 * w, h * 2, w, h)),\n new PIXI.Texture(sheet, new PIXI.Rectangle(2 * w, h * 2, w, h)),\n new PIXI.Texture(sheet, new PIXI.Rectangle(3 * w, h * 2, w, h)),\n new PIXI.Texture(sheet, new PIXI.Rectangle(4 * w, h * 2, w, h)),\n new PIXI.Texture(sheet, new PIXI.Rectangle(5 * w, h * 2, w, h)),\n new PIXI.Texture(sheet, new PIXI.Rectangle(6 * w, h * 2, w, h))\n ];\n playerSheet[\"jump\"] = [\n new PIXI.Texture(sheet, new PIXI.Rectangle(1 * w, h, w, h)),\n ];\n}", "function create_map(){\n createTextureMap();\n\n for (var i = 0; i < width; i++) {\n for (var k = 0; k < height; k++) {\n var sprite = u.sprite(textureMap, tile_size * k, tile_size * i);\n grid.addChild(sprite);\n }\n }\n grid.interactive = true;\n grid.buttonMode = true;\n grid.on('pointerdown', pointerDown);\n grid.on('pointermove', pointerMove);\n grid.on('pointerup', pointerRelease)\n stage.addChild(grid);\n}", "function loadSprites() {\n Loader.add(\"assets/imgs/resize1.png\")\n .add(\"assets/imgs/resize2.png\")\n .add(\"assets/imgs/colorize.png\")\n .add(\"assets/imgs/rotate.png\")\n .add(\"assets/imgs/select.png\")\n .add(\"assets/imgs/win.png\")\n .add(\"assets/imgs/logo.png\")\n .add(\"assets/imgs/logo2.png\")\n .add(\"assets/imgs/introFinal.png\")\n .add(\"assets/imgs/btPlay.png\")\n .add(\"assets/imgs/btAgain.png\")\n .load(setup);\n}", "create () {\n\n //this.add.image(400,300,'background');\n\tvar cards;\n\n cards = this.physics.add.staticGroup();\n\n cards.create(90, 110, 'as-carreau');\n cards.create(700, 110, 'as-coeur');\n cards.create(0, 0, 'as-trefle');\n\n cards.create(300, 110, 'king-coeur');\n cards.create(500, 110, 'king-trefle');\n cards.create(0, 0, 'king-carreau');\n\n cards.create(0, 0, 'coin_down_left');\n cards.create(0, 0, 'coin_down_right');\n\n\n }", "create () {\n let asteroidsGroup = this.gameObjects['asteroids-group'] = new AsteroidsGroup(this.game);\n\n this.spawnAsteroids(25);\n this.setupUI();\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 }", "function createRock(nbr, rocks) {\n\n var offset = 100;\n for (var i = 0; i < nbr; i++) {\n \n var rnd1 = game.rnd.realInRange(700, 3000);\n var rnd2 = game.rnd.realInRange(3010, 5000);\n var rnd3 = game.rnd.realInRange(5010, 7000);\n\n // DISPERSE ROCKS\n \n if (rocks.length <= 10) {\n rock = game.add.sprite((rnd1 + offset), 600, 'rock'); \n } else if(rocks.length > 10 && rocks.length <= 20){\n rock = game.add.sprite((rnd2 + offset), 600, 'rock'); \n } else{\n rock = game.add.sprite((rnd3 + offset), 600, 'rock'); \n }\n\n rock.name = 'rock';\n game.physics.enable(rock, Phaser.Physics.ARCADE);\n rock.body.collideWorldBounds = true;\n rocks.push(rock);\n } \n}", "createAsteroid(){\n\n this.asteroidGroup = this.physics.add.group({\n key:['asteroid'],\n frameQuantity: 5,\n angularVelocity: 12,\n bounceX: .5,\n bounceY: .5,\n CollideWorldBounds: true,\n setXY: { x: 9, y: 3, stepX:70 },\n setScale: { x: 0.1, y: 0.1 }\n });\n\n this.asteroidGroup1 = this.physics.add.group({\n key:['asteroid'],\n frameQuantity: 1,\n angularVelocity: 12,\n bounceX: .5,\n bounceY: .5,\n CollideWorldBounds: true,\n setXY: { x: 12, y: 3, stepX:70 },\n setScale: { x: 0.35, y: 0.35 }\n });\n\n this.asteroidGroup2 = this.physics.add.group({\n key:['asteroid'],\n frameQuantity: 3,\n angularVelocity: 20,\n bounceX: .5,\n bounceY: .5,\n CollideWorldBounds: true,\n setXY: { x: 12, y: 3, stepX:70 },\n setScale: { x: 0.25, y: 0.25 }\n });\n\n this.asteroidGroup.children.iterate(function (child) {\n var xx = Math.floor(Math.random() * 800);\n var yy = Math.floor(Math.random() * 300);\n\n child.x = xx;\n child.y = yy;\n\n child.setVelocityY(Phaser.Math.FloatBetween(80,20))\n })\n\n this.asteroidGroup1.children.iterate(function (child) {\n var xx = Math.floor(Math.random() * 800);\n var yy = Math.floor(Math.random() * 300);\n\n child.x = xx;\n child.y = yy;\n\n child.setVelocityY(Phaser.Math.FloatBetween(100,20))\n })\n\n this.asteroidGroup2.children.iterate(function (child) {\n var xx = Math.floor(Math.random() * 800);\n var yy = Math.floor(Math.random() * 300);\n\n child.x = xx;\n child.y = yy;\n\n child.setVelocityY(Phaser.Math.FloatBetween(100,20))\n })\n\n this.physics.add.collider(this.asteroidGroup);\n this.physics.add.collider(this.asteroidGroup, this.asteroidGroup1);\n this.physics.add.collider(this.asteroidGroup1, this.asteroidGroup2);\n this.physics.add.collider(this.asteroidGroup, this.asteroidGroup2);\n this.physics.add.collider(this.asteroidGroup,this.ship,this.shipHit1, null, this);\n this.physics.add.collider(this.asteroidGroup1,this.ship,this.shipHit2, null, this);\n this.physics.add.collider(this.asteroidGroup2,this.ship,this.shipHit3, null, this);\n }", "function setup() {\n\n //creating game screen\n createCanvas(1000, 600);\n\n //adding background to the screen\n bg = createSprite(580, 300);\n bg.addImage(backgroundImg)\n\n //creating ironman and adding image to it\n ironman = createSprite(100, 400, 50, 100);\n ironman.addImage(ironmanImg)\n ironman.scale = 0.3;\n //ironman.debug=true;\n ironman.setCollider(\"rectangle\", 100, 0, 200, 400)\n\n //creating groups\n stoneGroup = new Group();\n diamondGroup = new Group();\n spikeGroup = new Group();\n}", "function preload(){\nbackImage=loadImage(\"jungle.jpg\");\n \n player_running=loadAnimation(\"Monkey_01.png\",\"Monkey_02.png\",\"Monkey_03.png\",\"Monkey_04.png\",\"Monkey_05.png\",\"Monkey_06.png\",\"Monkey_07.png\",\"Monkey_08.png\",\"Monkey_09.png\",\"Monkey_10.png\");\n \n bananaImage=loadImage(\"banana.png\");\n obstacleImage=loadImage(\"stone.png\");\n \n obstacleGroup=new Group();\n foodGroup=new Group(); \n}", "generateSprites(spriteToRepeat, stageSize, gridSize) {\n\t\tlet container = new PIXI.Container()\n\n\t\t// Adjust so that sprites are only on the screen, basically by a multiple of the stage size\n\t\tconst diff = {\n\t\t\tx: Math.ceil((spriteToRepeat.x + (this.app.stage.x / this.scale)) / stageSize.x) * stageSize.x,\n\t\t\ty: Math.ceil((spriteToRepeat.y + (this.app.stage.y / this.scale)) / stageSize.y) * stageSize.y\n\t\t}\n\n\t\t// Generate the sprites\n\t\tfor (let y = 0; y < gridSize.y; ++y) {\n\t\t\tfor (let x = 0; x < gridSize.x; ++x) {\n\t\t\t\t// Duplicate the sprite for all the positions\n\t\t\t\tconst repeatOffset = {\n\t\t\t\t\tx: x * stageSize.x - diff.x,\n\t\t\t\t\ty: y * stageSize.y - diff.y\n\t\t\t\t}\n\t\t\t\tlet sprite = dupe(spriteToRepeat)\n\t\t\t\tsprite.x = spriteToRepeat.x + repeatOffset.x\n\t\t\t\tsprite.y = spriteToRepeat.y + repeatOffset.y\n\n\t\t\t\t// Add this sprite to the main rendering stage\n\t\t\t\tcontainer.addChild(sprite)\n\t\t\t}\n\t\t}\n\n\t\treturn container\n\t}", "function spawnBoard() {\n\n BOARD_COLS = Math.floor(600 / ICON_SIZE_SPACED);\n BOARD_ROWS = Math.floor(game.world.height / ICON_SIZE_SPACED);\n\n icons = game.add.group();\n\n for (var i = 0; i < BOARD_COLS; i++)\n {\n for (var j = 0; j < BOARD_ROWS; j++)\n {\n var icon = icons.create(i * ICON_SIZE_SPACED, j * ICON_SIZE_SPACED, \"ICONS\");\n icon.name = 'icon' + i.toString() + 'x' + j.toString();\n icon.inputEnabled = true;\n icon.events.onInputDown.add(selectIcon, this);\n icon.events.onInputUp.add(releaseIcon, this);\n randomizeIconColor(icon);\n setIconPos(icon, i, j); // each icon has a position on the board\n icon.kill();\n }\n }\n\n removeKilledIcons();\n\n var dropIconDuration = dropIcons();\n\n // delay board refilling until all existing icons have dropped down\n game.time.events.add(dropIconDuration * 100, refillBoard);\n\n allowInput = false;\n\n selectedIcon = null;\n tempShiftedIcon = null;\n\n // refillBoard();\n}", "add(...spritedToAdd) {\n spritesToAdd.forEach(sprite => this.addChild(sprite))\n }", "function makeSprite() {\n\t//console.log(\"making sprite\");\n\tvar shaded = [\n\t\t// 0 +10 -10 -20\n\t\t['#c1c1c1', '#dddddd', '#a6a6a6', '#8b8b8b'],\n\t\t['#25bb9b', '#4cd7b6', '#009f81', '#008568'],\n\t\t['#3397d9', '#57b1f6', '#007dbd', '#0064a2'],\n\t\t['#e67e23', '#ff993f', '#c86400', '#a94b00'],\n\t\t['#efc30f', '#ffdf3a', '#d1a800', '#b38e00'],\n\t\t['#9ccd38', '#b9e955', '#81b214', '#659700'],\n\t\t['#9c5ab8', '#b873d4', '#81409d', '#672782'],\n\t\t['#e64b3c', '#ff6853', '#c62c25', '#a70010'],\n\t\t['#898989', '#a3a3a3', '#6f6f6f', '#575757']\n\t];\n\tvar glossy = [\n\t\t//25 37 52 -21 -45\n\t\t['#ffffff', '#ffffff', '#ffffff', '#888888', '#4d4d4d'],\n\t\t['#7bffdf', '#9fffff', '#ccffff', '#008165', '#00442e'],\n\t\t['#6cdcff', '#93feff', '#c2ffff', '#00629f', '#002c60'],\n\t\t['#ffc166', '#ffe386', '#ffffb0', '#aa4800', '#650500'],\n\t\t['#ffff6a', '#ffff8c', '#ffffb8', '#b68a00', '#714f00'],\n\t\t['#efff81', '#ffffa2', '#ffffcd', '#6b9200', '#2c5600'],\n\t\t['#dc9dfe', '#ffbeff', '#ffe9ff', '#5d287e', '#210043'],\n\t\t['#ff9277', '#ffb497', '#ffe0bf', '#a7000a', '#600000'],\n\t\t['#cbcbcb', '#ededed', '#ffffff', '#545454', '#1f1f1f']\n\t];\n\tvar tgm = [\n\t\t['#7b7b7b', '#303030', '#6b6b6b', '#363636'],\n\t\t['#f08000', '#a00000', '#e86008', '#b00000'],\n\t\t['#00a8f8', '#0000b0', '#0090e8', '#0020c0'],\n\t\t['#f8a800', '#b84000', '#e89800', '#c85800'],\n\t\t['#e8e000', '#886800', '#d8c800', '#907800'],\n\t\t['#f828f8', '#780078', '#e020e0', '#880088'],\n\t\t['#00e8f0', '#0070a0', '#00d0e0', '#0080a8'],\n\t\t['#78f800', '#007800', '#58e000', '#008800'],\n\t\t['#7b7b7b', '#303030', '#6b6b6b', '#363636'],\n\t];\n\tvar world = [];\n\tworld[0] = tgm[0];\n\tworld[1] = tgm[6];\n\tworld[2] = tgm[2];\n\tworld[3] = tgm[3];\n\tworld[4] = tgm[4];\n\tworld[5] = tgm[7];\n\tworld[6] = tgm[5];\n\tworld[7] = tgm[1];\n\tworld[8] = tgm[8];\n\t\n\tspriteCanvas.width = cellSize * 9;\n\tspriteCanvas.height = cellSize;\n\tfor (var i = 0; i < 9; i++) {\n\t\tvar x = i * cellSize;\n\t\tif (settings.Block === 0) {\n\t\t\t// Shaded\n\t\t\tspriteCtx.fillStyle = shaded[i][1];\n\t\t\tspriteCtx.fillRect(x, 0, cellSize, cellSize);\n\t\t\t\n\t\t\tspriteCtx.fillStyle = shaded[i][3];\n\t\t\tspriteCtx.fillRect(x, cellSize / 2, cellSize, cellSize / 2);\n\t\t\t\n\t\t\tspriteCtx.fillStyle = shaded[i][0];\n\t\t\tspriteCtx.beginPath();\n\t\t\tspriteCtx.moveTo(x, 0);\n\t\t\tspriteCtx.lineTo(x + cellSize / 2, cellSize / 2);\n\t\t\tspriteCtx.lineTo(x, cellSize);\n\t\t\tspriteCtx.fill();\n\t\t\t\n\t\t\tspriteCtx.fillStyle = shaded[i][2];\n\t\t\tspriteCtx.beginPath();\n\t\t\tspriteCtx.moveTo(x + cellSize, 0);\n\t\t\tspriteCtx.lineTo(x + cellSize / 2, cellSize / 2);\n\t\t\tspriteCtx.lineTo(x + cellSize, cellSize);\n\t\t\tspriteCtx.fill();\n\t\t}\n\t\telse if (settings.Block === 1) {\n\t\t\t// Flat\n\t\t\tspriteCtx.fillStyle = shaded[i][0];\n\t\t\tspriteCtx.fillRect(x, 0, cellSize, cellSize);\n\t\t}\n\t\telse if (settings.Block === 2) {\n\t\t\t// Glossy\n\t\t\tvar k = Math.max(~~(cellSize * 0.083), 1);\n\t\t\t\n\t\t\tvar grad = spriteCtx.createLinearGradient(x, 0, x + cellSize, cellSize);\n\t\t\tgrad.addColorStop(0.5, glossy[i][3]);\n\t\t\tgrad.addColorStop(1, glossy[i][4]);\n\t\t\tspriteCtx.fillStyle = grad;\n\t\t\tspriteCtx.fillRect(x, 0, cellSize, cellSize);\n\t\t\t\n\t\t\tvar grad = spriteCtx.createLinearGradient(x, 0, x + cellSize, cellSize);\n\t\t\tgrad.addColorStop(0, glossy[i][2]);\n\t\t\tgrad.addColorStop(0.5, glossy[i][1]);\n\t\t\tspriteCtx.fillStyle = grad;\n\t\t\tspriteCtx.fillRect(x, 0, cellSize - k, cellSize - k);\n\t\t\t\n\t\t\tvar grad = spriteCtx.createLinearGradient(x + k, k, x + cellSize - k, cellSize - k);\n\t\t\tgrad.addColorStop(0, shaded[i][0]);\n\t\t\tgrad.addColorStop(0.5, glossy[i][0]);\n\t\t\tgrad.addColorStop(0.5, shaded[i][0]);\n\t\t\tgrad.addColorStop(1, glossy[i][0]);\n\t\t\tspriteCtx.fillStyle = grad;\n\t\t\tspriteCtx.fillRect(x + k, k, cellSize - k * 2, cellSize - k * 2);\n\t\t\t\n\t\t}\n\t\telse if (settings.Block === 3 || settings.Block === 4) {\n\t\t\t// Arika\n\t\t\tif (settings.Block === 4) tgm = world;\n\t\t\tvar k = Math.max(~~(cellSize * 0.125), 1);\n\t\t\t\n\t\t\tspriteCtx.fillStyle = tgm[i][1];\n\t\t\tspriteCtx.fillRect(x, 0, cellSize, cellSize);\n\t\t\tspriteCtx.fillStyle = tgm[i][0];\n\t\t\tspriteCtx.fillRect(x, 0, cellSize, ~~(cellSize / 2));\n\t\t\t\n\t\t\tvar grad = spriteCtx.createLinearGradient(x, k, x, cellSize - k);\n\t\t\tgrad.addColorStop(0, tgm[i][2]);\n\t\t\tgrad.addColorStop(1, tgm[i][3]);\n\t\t\tspriteCtx.fillStyle = grad;\n\t\t\tspriteCtx.fillRect(x + k, k, cellSize - k*2, cellSize - k*2);\n\t\t\t\n\t\t\tvar grad = spriteCtx.createLinearGradient(x, k, x, cellSize);\n\t\t\tgrad.addColorStop(0, tgm[i][0]);\n\t\t\tgrad.addColorStop(1, tgm[i][3]);\n\t\t\tspriteCtx.fillStyle = grad;\n\t\t\tspriteCtx.fillRect(x, k, k, cellSize - k);\n\t\t\t\n\t\t\tvar grad = spriteCtx.createLinearGradient(x, 0, x, cellSize - k);\n\t\t\tgrad.addColorStop(0, tgm[i][2]);\n\t\t\tgrad.addColorStop(1, tgm[i][1]);\n\t\t\tspriteCtx.fillStyle = grad;\n\t\t\tspriteCtx.fillRect(x + cellSize - k, 0, k, cellSize - k);\n\t\t}\n\t\telse if(settings.Block == 5){\n\t\t\t// Images\n\t\t\t//spriteCtx.fillStyle = shaded[i][0];\n\t\t\t//spriteCtx.fillRect(x, 0, cellSize, cellSize);\n\t\t\t\n\t\t\t//console.log(\"filling rect\" + x + \" \" + spriteCtx);\n\t\t\tspriteCtx.fillStyle = pattern[i];\n\t\t\tspriteCtx.fillRect(x, 0, cellSize, cellSize);\n\t\t\tspriteCtx.fill();\n\t\t\t\n\t\t}\n\t}\n}", "function initSprites(img){\n\ts_player = [\n\t\tnew Sprite(img, 977, 0, 1035-975, 100),\n\t\tnew Sprite(img, 860, 0, 918-860, 100),\n\t\tnew Sprite(img, 918, 0, 975-918, 100)\n\t];\n\ts_star = [\n\t\tnew Sprite(img, 120, 800, 160, 260),\n\t\tnew Sprite(img, 490, 800, 160, 260)\n\t];\n\ts_background = new Sprite(img, 20, 0, 814, 600);\n\t\n\ts_pumpkin = [\n\t \tnew Sprite(img, 860, 126, 120, 100),\n\t \tnew Sprite(img, 1024, 114, 140, 112),\n\t \tnew Sprite(img, 1174, 96, 142, 181),\n\t \tnew Sprite(img, 1364, 96, 239, 248)\n\t];\n\n\ts_bat = [\n\t \tnew Sprite(img, 18, 646, 150, 82),\n\t \tnew Sprite(img, 196, 614, 130, 100),\n\t \tnew Sprite(img, 342, 618, 132, 102),\n\t \tnew Sprite(img, 500, 660, 143, 78),\n\t \tnew Sprite(img, 670, 666, 97, 123),\n\t \tnew Sprite(img, 790, 666, 64, 126),\n\t \tnew Sprite(img, 854, 674, 66, 126),\n\t \tnew Sprite(img, 934, 668, 125, 107),\n\t \tnew Sprite(img, 1080, 642, 160, 70)\n\n\t];\n\n\ts_demon = [\n\t\tnew Sprite(img, 1346, 802, 125, 85),\n\t \tnew Sprite(img, 1500, 796, 130, 100),\n\t \tnew Sprite(img, 1632, 816, 118, 70),\n\t \tnew Sprite(img, 1784, 808, 128, 74),\n\t \tnew Sprite(img, 1342, 930, 126, 83),\n\t \tnew Sprite(img, 1490, 926, 108, 93),\n\t \tnew Sprite(img, 1640, 920, 130, 65),\n\t \tnew Sprite(img, 1780, 936, 123, 75),\n\t];\n}", "function splitSprites(spriteAmt, spriteLen, columns){\n\tvar pokemen = [];\n\tfor (var i = 0; i < spriteAmt; i++){\n\t\t// Math done to determine what row and column the sprite exists in\n\t\tclipX = spriteLen * (i % columns);\n\t\tclipY = spriteLen * Math.floor((i / columns));\n\t\tclipCoords = new Coordinates(clipX, clipY);\n\t\tpokemen[pokemen.length] = new Pokemon(pokeNames[i], i+1, spriteLen, clipCoords);\n\t}\n\treturn pokemen;\n}", "function createPlayer(sprite){\n player = createSprite()\n player.addImage(sprite)\n playerGroup.add(player)\n return player\n}", "create() {\n \n //--------background--------\n //first parameter is the x value, second y value and the last parament is the key to call the object.\n //setScrollFactor(x, y)- keeps the object from scrolling\n this.add.image(240, 320, 'background').setScrollFactor(1, 0);\n //setscale to 'scale' your game objects\n //tells Phaser to add 'physics' to the object\n // this.physics.add.image(240, 320, 'platform').setScale(0.5)\n //--------platforms---------\n //create the group\n \n this.platforms = this.physics.add.staticGroup()\n \n for(let i = 0; i < 5; i++) {\n const x = Phaser.Math.Between(32, 472)\n const y = 150 * i;\n\n /** @type {Phaser.Physics.Arcade.Sprite} */\n const platform = this.platforms.create (x, y, 'platform')\n platform.setScale(0.3);\n \n /** @type {Phaser.Physics.Arcade.StaticBody} */\n const body = platform.body;\n body.updateFromGameObject();\n }\n\n\n //--------player---------\n //use class property instead of local variable\n this.player = this.physics.add.sprite(240, 320, 'hero-idle').setScale(2);\n //add a collider to the sprite so itll know what to react to.\n this.physics.add.collider(this.platforms, this.player)\n //checkCollision by default are set to true.\n this.player.body.checkCollision.up = false;\n this.player.body.checkCollision.left = false;\n this.player.body.checkCollision.right = false;\n this.physics.world.setBounds( 0, 0, Phaser.width, Phaser.height )\n //camera logic\n this.cameras.main.startFollow(this.player)\n //set the horizontal dead zone to 1.5x game width\n this.cameras.main.setDeadzone(Phaser.width * 1.5)\n\n //---------star--------\n\n //const star = new Star(this, 240, 320, 'star');\n //add a physics group and pass in a config object for star\n //the physics group will create Phaser.Physics.Arcade.Sprite by default. calltype will override that.\n this.star = this.physics.add.group({\n classType: Star\n })\n //test star\n //this.star.get(240, 320, 'star')\n\n this.physics.add.collider(this.platforms, this.star)\n\n //star collections\n //add an overlap, testing for a overlap between two objects\n //when an overlap occurs it will call a method.\n this.physics.add.overlap (\n this.player,\n this.star,\n this.handleCollectStar, //called on overlap\n //argument is for the process callback that we don't need.\n undefined,\n //passed on as the context.\n this\n )\n //text(x-axis, y-axis, intial text, argument for styles)\n const style = {color: '#03fc84', fontSize: 24}\n // Phaser.starCollectedText = \n scoreText = this.add.text(240, 10, this.starCollectedText, style)\n //stop from scrolling off screen\n .setScrollFactor(0)\n //keep the text top centered. Also called a anchor or pivot point\n .setOrigin(0, 0)\n \n }", "function spawnObstaclesTop(){\n if(frameCount % 60 === 0) {\n var obstacleTop = createSprite(400,50,40,50); \n obstacleTop.y=Math.round(random(10,100)); \n //generate random obstacles\n var rand = Math.round(random(1,2));\n switch(rand) {\n case 1: obstacleTop.addImage(obsTop1);\n break;\n case 2: obstacleTop.addImage(obsTop2);\n break;\n default: break;\n }\n \n //assign scale and lifetime to the obstacle \n obstacleTop.scale = 0.1;\n obstacleTop.velocityX=-4;\n obstacleTop.lifetime = 100;\n balloon.depth = balloon.depth+1;\n topObstaclesGroup.add(obstacleTop);\n \n } \n}", "createSpriteAnimations() {\n const haloFrames = this.anims.generateFrameNames('haloHit', { \n start: 1, end: 84, zeroPad: 5,\n prefix: 'Halo_' , suffix: '.png'\n });\n\n this.anims.create({ key: 'haloHit', frames: haloFrames, frameRate: 60, repeat: 0 });\n\n const sparkFrames = this.anims.generateFrameNames('sparkHit', { \n start: 1, end: 84, zeroPad: 5,\n prefix: 'Spark_' , suffix: '.png'\n });\n\n this.anims.create({ key: 'sparkHit', frames: sparkFrames, frameRate: 60, repeat: -1 });\n }", "createBlock() {\n switch (this.blockNumber) {\n case 1: {\n for (let i = 0; i < 4; i++) {\n let sprite = Sprite.from(this.tex);\n sprite.width = sprite.height = blockSize;\n sprite.y = blockSize * i;\n this.res.addChild(sprite);\n }\n break;\n }\n case 2: {\n for (let i = 0; i < 4; i++) {\n let sprite = Sprite.from(this.tex);\n sprite.width = sprite.height = blockSize;\n if (i == 0 || i == 1) {\n sprite.x = blockSize * i;\n }\n else {\n sprite.x = blockSize * (i % 2);\n sprite.y = blockSize;\n }\n this.res.addChild(sprite);\n }\n break;\n }\n case 3: {\n for (let i = 0; i < 4; i++) {\n let sprite = Sprite.from(this.tex);\n sprite.width = sprite.height = blockSize;\n if (i < 2) {\n sprite.y = blockSize * i;\n }\n else {\n sprite.y = blockSize;\n sprite.x = blockSize * (i - 1);\n }\n this.res.addChild(sprite);\n }\n break;\n }\n case 4: {\n for (let i = 0; i < 4; i++) {\n let sprite = Sprite.from(this.tex);\n sprite.width = sprite.height = blockSize;\n if (i == 0) {\n sprite.y = blockSize;\n }\n else {\n sprite.y = (i - 1) * blockSize;\n sprite.x = blockSize;\n }\n this.res.addChild(sprite);\n }\n break;\n }\n case 5: {\n for (let i = 0; i < 4; i++) {\n let sprite = Sprite.from(this.tex);\n sprite.width = sprite.height = blockSize;\n if (i < 2) {\n sprite.x = blockSize * i;\n sprite.y = blockSize;\n }\n else {\n sprite.x = blockSize * (i - 1);\n }\n this.res.addChild(sprite);\n }\n break;\n }\n case 6: {\n for (let i = 0; i < 4; i++) {\n let sprite = Sprite.from(this.tex);\n sprite.width = sprite.height = blockSize;\n if (i < 3) {\n sprite.x = blockSize * i;\n sprite.y = blockSize;\n }\n else {\n sprite.x = blockSize * (i - 1);\n }\n this.res.addChild(sprite);\n }\n break;\n }\n case 7: {\n for (let i = 0; i < 4; i++) {\n let sprite = Sprite.from(this.tex);\n sprite.width = sprite.height = blockSize;\n if (i < 2) {\n sprite.x = blockSize * i;\n }\n else {\n sprite.x = blockSize * (i - 1);\n sprite.y = blockSize;\n }\n this.res.addChild(sprite);\n }\n break;\n }\n }\n }", "function spawnUnit(data, isCreation, row, column, team){\n chars.removeChild(spawnAnimation);\n //|| data.address == \"graphics/spritesheet/stand/ss_scarecrow_stand.png\"\n\n // if (data.address == \"graphics/spritesheet/stand/ss_rogue_stand.png\") return;\n\n var spriteSheet = new createjs.SpriteSheet({\n \"images\": [data.address],\n \"frames\": {\"regX\": 0, \"height\": 142, \"count\": 2, \"regY\": -30, \"width\": 113 },\n \"animations\": {\n \"stand\":[0,1]\n },\n framerate: 2\n });\n\n var unit = new createjs.Sprite(spriteSheet, \"stand\");\n\n //move!\n \n createjs.Ticker.timingMode = createjs.Ticker.RAF; \n createjs.Ticker.addEventListener(\"tick\", stage);\n // Configure unit coordinates\n unit.hp = data.hp;\n unit.max_hp = data.max_hp;\n unit.attack = data.attack;\n unit.base_attack = unit.attack;\n unit.luck = data.luck;\n\n\n //unit = unit.moveAnimation;\n\n\n var spawnSpriteSheet = new createjs.SpriteSheet({\n \"images\": [\"graphics/spritesheet/special_unit/ss_unit_creation.png\"],\n \"frames\": {\"width\": 142, \"height\": 142, \"count\": 4, \"regY\": 110, \"regX\": 65},\n \"animations\": {\n \"damage\":{\n frames: [0,1,2,3],\n next: false\n }\n },\n framerate: 4\n });\n\n unit.spawnSpriteSheet = spawnSpriteSheet;\n var spawnAnimation = new createjs.Sprite(spawnSpriteSheet, \"spawn\");\n\n var damageEffect = new createjs.SpriteSheet({\n \"images\": [data.damageEffect],\n \"frames\": {\"width\": 142, \"height\": 142, \"count\": 4, \"regY\": 110, \"regX\": 95},\n \"animations\": {\n \"damage\":{\n frames: [0,1,2,3],\n next: false\n }\n },\n framerate: 4\n });\n unit.damageEffect = damageEffect;\n\n var burnEffect = new createjs.SpriteSheet({\n \"images\": [that.buffEffects.burning],\n \"frames\": {\"width\": 142, \"height\": 142, \"count\": 4, \"regY\": 110, \"regX\": 95},\n \"animations\": {\n \"burn\":{\n frames: [0,1,2,3],\n next: false\n }\n },\n framerate: 4\n });\n unit.burnEffect = burnEffect;\n\n var healEffect = new createjs.SpriteSheet({\n \"images\": [that.buffEffects.heal],\n \"frames\": {\"width\": 142, \"height\": 142, \"count\": 4, \"regY\": 110, \"regX\": 95},\n \"animations\": {\n \"heal\":{\n frames: [0,1,2,3],\n next: false\n }\n },\n framerate: 4\n });\n unit.healEffect = healEffect;\n\n\n var forzenEffect = new createjs.SpriteSheet({\n \"images\": [that.buffEffects.frozen],\n \"frames\": {\"width\": 142, \"height\": 142, \"count\": 4, \"regY\": 110, \"regX\": 95},\n \"animations\": {\n \"ice\":{\n frames: [0,1,2,3],\n next: false\n }\n },\n framerate: 4\n });\n unit.forzenEffect = forzenEffect;\n\n if (isCreation) {\n unit.team = team;\n unit.row = row;\n unit.column = column;\n } else {\n unit.team = data.team;\n unit.column = data.y;\n unit.row = data.x;\n }\n\n unit.x = originX + (unit.column - unit.row) * 65;\n unit.y = unit.column * 32.5 + originY + unit.row * 32.5;\n\n\n unit.regX = 56.5;\n unit.regY = 130;\n if (unit.team == 0 && data.skill_no != -1) unit.scaleX = -0.7;\n else unit.scaleX = 0.7\n unit.scaleY = 0.7;\n unit.skill = data.skill;\n unit.address = data.address;\n unit.info = data.info;\n\n unit.spritesheet = new createjs.SpriteSheet({\n \"images\": [data.spritesheet],\n \"frames\": {\"width\": 142, \"height\": 142, \"count\": 4, \"regY\": 110, \"regX\": 95},\n \"animations\": {\n \"attack\":{\n frames: [0,1,2,3],\n next: false \n }\n },\n framerate: 4\n });\n unit.skill_no = data.skill_no;\n unit.buffs = [];\n unit.buff_icons = [];\n\n\n var moveSpriteSheet = new createjs.SpriteSheet({\n \"images\": [data.move],\n \"frames\": {\"regX\": 80, \"height\": 142, \"count\": 4, \"regY\": 100, \"width\": 142 },\n \"animations\": {\n \"walk\":[0,1,2,3]\n },\n framerate: 4\n });\n unit.moveAnimation = new createjs.Sprite(moveSpriteSheet, \"walk\");\n unit.moveAnimation.x = unit.x;\n unit.moveAnimation.y = unit.y;\n\n // Configure the hp bar of the unit\n hp_bar = new createjs.Shape();\n hp_bar.x = unit.x - 40;\n hp_bar.y = unit.y - 95;\n if (unit.team === 0){\n hp_bar.graphics.beginFill(\"#000000\").drawRect(0, 0, 82, 12);\n hp_bar.graphics.beginFill(\"#000000\").drawRect(1, 1, 80, 10);\n hp_bar.graphics.beginFill(\"#ff0000\").drawRect(1, 1, (getHealth(data)/getMaxHealth(data)) * 80, 10);\n } else {\n hp_bar.graphics.beginFill(\"#000000\").drawRect(0, 0, 82, 12);\n hp_bar.graphics.beginFill(\"#000000\").drawRect(1, 1, 80, 10);\n hp_bar.graphics.beginFill(\"#3399ff\").drawRect(1, 1, (getHealth(data)/getMaxHealth(data)) * 80, 10);\n }\n unit.hp_bar = hp_bar;\n\n\n // Configure move and attack range of the unit\n unit.moveRange = data.moveRange;\n unit.attackRange = data.attackRange;\n\n // Configure action control informations\n unit.canMove = data.canMove;\n unit.canAttack = data.canAttack;\n unit.skillCoolDown = data.skillCoolDown;\n unit.outOfMoves = data.outOfMoves;\n\n // Adding the unit to the list of units in the game\n units.push(unit);\n\n\n blockMaps[unit.row][unit.column] = 1;\n\n // Add the unit and its hp bar to the stage\n unit.moveAnimation.scaleX = 0.7;\n unit.moveAnimation.scaleY = 0.7;\n\n\n\n draggable.addChild(unit);\n // draggable.removeChild(unit.moveAnimation);\n\n\n\n draggable.addChild(hp_bar);\n chars.addChild(spawnAnimation);\n \n\n sortIndices(unit);\n\n unit.cache(0,0,150,150);\n hp_bar.cache(0,0,100,120);\n spawnAnimation.x = unit.x;\n spawnAnimation.y = unit.y;\n \n setTimeout(function() {\n chars.removeChild(spawnAnimation);\n }, 1000);\n\n\n addEventListenersToUnit(unit);\n\n if (unit.team == 1) {\n\n currentUnit = unit;\n } else {\n enemyUnit = unit;\n }\n // }); \n}", "function handleImageLoad() {\n // data about the organization of the sprite sheet\n var spriteData = {\n images: [\"/images/cakerush/cake.png\", \"/images/cakerush/fatBlue.png\", \"/images/cakerush/fatRed.png\",\n \"/images/cakerush/fatYellow.png\", \"/images/cakerush/fatGreen.png\"],\n frames: [\n //startx, starty, sizex, sizey, which file in the array, registrationx, registrationy\n //[0, 0, 80, 80, 0, 40, 0],\n //[80, 0, 80, 80, 0, 40, 0],\n //[160, 0, 80, 80, 0, 40, 0],\n //[240, 0, 80, 80, 0, 40, 0],\n //[320, 0, 80, 80, 0, 40, 0],\n\n //cake\n [0, 0, 360, 360, 0, 180, 220], //0\n //blue\n [0, 0, 69, 191, 1, 34, 191], // 1 side step 1\n [69, 0, 69, 191, 1, 34, 191], // 2 side step 2\n [138, 0, 69, 191, 1, 34, 191], // 3 side stand\n [0, 191, 69, 191, 1, 34, 191], // 4 front stand\n [69, 191, 69, 191, 1, 34, 191], // 5 front step 1\n [138, 191, 69, 191, 1, 34, 191], // 6 front step 2\n [0, 382, 69, 191, 1, 34, 191], // 7 back stand\n [69, 382, 69, 191, 1, 34, 191], // 8 back step 1\n [138, 382, 69, 191, 1, 34, 191], // 9 back step 2\n //red\n [0, 0, 69, 191, 2, 34, 191], // 10 side step 1\n [69, 0, 69, 191, 2, 34, 191], // 11 side step 2\n [138, 0, 69, 191, 2, 34, 191], // 12 side stand\n [0, 191, 69, 191, 2, 34, 191], // 13 front stand\n [69, 191, 69, 191, 2, 34, 191], // 14 front step 1\n [138, 191, 69, 191, 2, 34, 191], // 15 front step 2\n [0, 382, 69, 191, 2, 34, 191], // 16 back stand\n [69, 382, 69, 191, 2, 34, 191], // 17 back step 1\n [138, 382, 69, 191, 2, 34, 191], // 18 back step 2\n //yellow\n [0, 0, 69, 191, 3, 34, 191], // 19 side step 1\n [69, 0, 69, 191, 3, 34, 191], // 20 side step 2\n [138, 0, 69, 191, 3, 34, 191], // 21 side stand\n [0, 191, 69, 191, 3, 34, 191], // 22 front stand\n [69, 191, 69, 191, 3, 34, 191], // 23 front step 1\n [138, 191, 69, 191, 3, 34, 191], // 24 front step 2\n [0, 382, 69, 191, 3, 34, 191], // 25 back stand\n [69, 382, 69, 191, 3, 34, 191], // 26 back step 1\n [138, 382, 69, 191, 3, 34, 191], // 27 back step 2\n //green\n [0, 0, 69, 191, 4, 34, 191], // 28 side step 1\n [69, 0, 69, 191, 4, 34, 191], // 29 side step 2\n [138, 0, 69, 191, 4, 34, 191], // 30 side stand\n [0, 191, 69, 191, 4, 34, 191], // 31 front stand\n [69, 191, 69, 191, 4, 34, 191], // 32 front step 1\n [138, 191, 69, 191, 4, 34, 191], // 33 front step 2\n [0, 382, 69, 191, 4, 34, 191], // 34 back stand\n [69, 382, 69, 191, 4, 34, 191], // 35 back step 1\n [138, 382, 69, 191, 4, 34, 191] // 36 back step 2\n ],\n animations: {\n //bluestand: 0,\n //bluewalk: { frames: [1, 0, 2, 0], frequency: 6 },\n //blueattack: { frames: [0, 3, 4, 3], frequency: 6 },\n\n cake: 0,\n bluesidestand:3,\n bluefrontstand:4,\n bluebackstand:7,\n bluesidewalk: { frames: [3,1,3,2], frequency: 6},\n bluefrontwalk: { frames: [4,5,4,6], frequency: 6},\n bluebackwalk: { frames: [7,8,7,9], frequency: 6},\n redsidestand:12,\n redfrontstand:13,\n redbackstand:16,\n redsidewalk: { frames: [12,10,12,11], frequency: 6},\n redfrontwalk: { frames: [13,14,13,15], frequency: 6},\n redbackwalk: { frames: [16,17,16,18], frequency: 6},\n yellowsidestand:21,\n yellowfrontstand:22,\n yellowbackstand:25,\n yellowsidewalk: { frames: [21,19,21,20], frequency: 6},\n yellowfrontwalk: { frames: [22,23,22,24], frequency: 6},\n yellowbackwalk: { frames: [25,26,25,27], frequency: 6},\n greensidestand:30,\n greenfrontstand:31,\n greenbackstand:34,\n greensidewalk: { frames: [30,28,30,29], frequency: 6},\n greenfrontwalk: { frames: [31,32,31,33], frequency: 6},\n greenbackwalk: { frames: [34,35,34,36], frequency: 6}\n\n\n }\n };\n\n // initialize the spritesheet object\n spriteSheet = new createjs.SpriteSheet(spriteData);\n}", "function create ()\r\n\t{\r\n\t//lägger in tilemap\r\n\tvar map = this.make.tilemap({ key: 'map' });\r\n\t\r\n\t//lägger till ett tileset\r\n\tvar tileset = map.addTilesetImage('Materials');\r\n\t\r\n\t//gör mappen grafisk och interaktable men detta funkar inte för tillfället\r\n\t//var layer = map.createStaticLayer(0, ground, 0, 0);\r\n\t\r\n\t\r\n\t// skapar himlen\r\n\tthis.add.image(400,300, 'sky');\r\n\tthis.add.image(1200,300, 'sky');\r\n\tthis.add.image(2000,300, 'sky');\r\n\tthis.add.image(2800,300, 'sky');\r\n\tthis.add.image(3600,300, 'sky');\r\n\t\r\n\tvar music = this.sound.add('music1');\r\n\tmusic.play();\r\n\t\r\n\t//gör en statisk grupp med fysik till \"platforms\"\r\n\tplatforms = this.physics.add.staticGroup();\r\n\t\r\n\t//Skapar en stor platform som är spelets mark\r\n\tplatforms.create(400, 550, 'ground');\r\n\tplatforms.create(1200, 550, 'ground');\r\n\tplatforms.create(2000, 550, 'ground');\r\n\tplatforms.create(2800, 550, 'ground');\r\n\tplatforms.create(3600, 550, 'ground');\r\n\t\r\n\t//Skapar två platformar\r\n\tplatforms.create(100, 400, 'platform');\r\n\tplatforms.create(500, 300, 'platform');\r\n\r\n\t//skapar en statisk grupp med fysik till \"grassBox\"\r\n\tgrassBox = this.physics.add.staticGroup();\r\n\r\n\tgrassBox.create(1000, 488,'grassBox');\r\n\tgrassBox.create(1224, 488, 'grassBox');\r\n\r\n\t//skapar en statisk grupp med fysik till \"spikes\"\r\n\tspikes = this.physics.add.staticGroup();\r\n\r\n\t//första \"spike rown\" i spelet\r\n\tspikes.create(1032, 484, 'spikes');\r\n\tspikes.create(1064, 484, 'spikes');\r\n\tspikes.create(1096, 484, 'spikes');\r\n\tspikes.create(1128, 484, 'spikes');\r\n\tspikes.create(1160, 484, 'spikes');\r\n\tspikes.create(1192, 484, 'spikes');\r\n\r\n\t//första \"Spike rown\" i spelet efter andra lådan\r\n\tspikes.create(1254, 484, 'spikes');\r\n\tspikes.create(1286, 484, 'spikes');\r\n\tspikes.create(1318, 484, 'spikes');\r\n\tspikes.create(1350, 484, 'spikes');\r\n\tspikes.create(1382, 484, 'spikes');\r\n\tspikes.create(1414, 484, 'spikes');\r\n\t\r\n\t//flag.create(1032, 484, 'flag');\r\n\r\n\t//lägger in texten som säger hur många poäng jag har\r\n\tpointText = this.add.text(2, 2, 'points: ' + points, {fontSize: '32px', fill: '#000'});\r\n\t\r\n\t//Lägger till en ny grup som heter \"coins\" den ska ha fysik men vara \"Static\"\r\n\tcoins = this.physics.add.staticGroup();\r\n\tcoins.create(400, 450, 'coin');\r\n\tcoins.create(1110, 390, 'coin');\r\n\tcoins.create(700, 450, 'coin');\r\n\t\r\n\t//skapar spelaren och lägger till fysik \r\n\tplayer = this.physics.add.sprite(100, 350, 'player');\r\n\tplayer.body.setSize(10, 32, 50, 25);\r\n\t\r\n\t//gör så att spelaren kommer studsa på emot andra pysiska grupper\r\n player.setBounce(0.2);\r\n\t\r\n //blockar spelaren från att gå \"out of bounds\"\r\n\tplayer.setCollideWorldBounds(true);\r\n\tplayer.smoothed = false;\r\n\t\r\n\t//lägger till \"Slime\"\r\n\tslime = this.physics.add.sprite(470,265, 'slime');\r\n\t\r\n\t\r\n\t\r\n\t//gör så att spelaren koliderar med platformarna med andra ord spelaren kan inte trilla igenom dom \r\n\t//och likt spelaren så är det andra grupper som samma sak händer med nedanför\r\n\tthis.physics.add.overlap(player, slime, death, null, this);\r\n\tthis.physics.add.overlap(player, coins, collectCoins, null, this);\r\n\tthis.physics.add.overlap(player, spikes, death, null, this);\r\n\r\n\tthis.physics.add.collider(player, platforms);\r\n\tthis.physics.add.collider(coins, platforms);\r\n\tthis.physics.add.collider(slime, platforms);\r\n\tthis.physics.add.collider(player, slime);\r\n\tthis.physics.add.collider(player, spikes);\r\n\tthis.physics.add.collider(player, grassBox);\r\n\t\r\n\t //skapar en animation \"left\"\r\n this.anims.create({\r\n key: 'left',\r\n frames: this.anims.generateFrameNumbers('player', { start: 0, end: 5 }),\r\n frameRate: 10,\r\n repeat: -1\r\n });\r\n\r\n\t//skapar en animation \"idle\"\r\n this.anims.create({\r\n key: 'idle',\r\n frames: [ { key: 'player', frame: 6 } ],\r\n frameRate: 20\r\n });\r\n\t\r\n\t//skapar en animation \"right\"\r\n this.anims.create({\r\n key: 'right',\r\n frames: this.anims.generateFrameNumbers('player', { start: 7, end: 12 }),\r\n frameRate: 10,\r\n repeat: -1\r\n });\r\n\t\r\n\tthis.anims.create({\r\n key: 'slimeAni',\r\n frames: this.anims.generateFrameNumbers('slime', { start: 0, end: 4 }),\r\n frameRate: 10,\r\n repeat: -1\r\n });\r\n\t\r\n\t//lägger till tangentbords nyklar\r\n\tcursors = this.input.keyboard.createCursorKeys();\r\n\t\r\n\t//Olika kamera inställningar\r\n\tthis.cameras.main.setSize(800, 600);\r\n\tthis.cameras.main.setBounds(0, 0, 4000, 600);\r\n this.physics.world.setBounds(0, 0, 4000, 600);\r\n\tthis.cameras.main.startFollow(player);\r\n\tthis.cameras.main.setZoom(1.2);\r\n\tthis.cameras.main.roundPixels = false;\r\n\t//här lägger jag till en extra kamera för att kunna se mina poäng\r\n\tthis.cameras.add(0, 0, 210, 35);\r\n\t\r\n\tvar combo = this.input.keyboard.createCombo('krm', {resetOnMatch: true});\r\n\t\r\n\t//detta är en fusk kod\r\n\tthis.input.keyboard.on('keycombomatch', function (event) \r\n\t{\r\n\t\r\n\tpoints += 50;\r\n\t\r\n\tpointText.setText('points: ' + points);\r\n\t\r\n\tconsole.log('I see you found a cheat code');\r\n\t\r\n\t});\r\n\t\r\n\t//bara ett medelande till konsolen så jag enklare kan se vart det gick fel\r\n\tconsole.log(\"function create loaded fine\");\r\n}", "function drawSprites() {\n for (var i = 0; i < numberOfSprites; i++) {\n spritesArray[i].showSprite(); // Updates the z value\n spritesArray[i].moveSprite(); // Paints new object\n }\n}", "setImageGroup(img, data) {\n var container = new createjs.Container();\n container.addChild(img);\n var queue = new createjs.LoadQueue(true);\n queue.on(\"complete\", this.positionGroup.bind(this, container, data));\n\n for (var i = 0; i < data.children.length; i++) {\n queue.on(\"fileload\", this.handleChildLoad.bind(this, container, data.children[i], data));\n queue.loadFile({\n id:data.children[i].id,\n src:this.assetSrc + data.children[i].img[\"src\"]\n });\n }\n }", "function doneLoading(e)\n{\n // Create all sprite sheets\n createPlayerSheet();\n createEnemySheet();\n createBackgroundSheet()\n createTileSheet();\n createWaveSheet();\n createDoorSheet();\n createBulletSheet();\n\n // Place the background\n for(let i = 0; i < 8; i++)\n {\n createBackground(i * 600, 0);\n }\n\n // Load in the level\n loadLevel();\n\n\n\n // Start the game loop\n app.ticker.add(gameLoop);\n \n}", "create(){\n //setting keyboard controls\n keyLEFT = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.LEFT);\n keyRIGHT = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.RIGHT);\n keyUP = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.UP);\n keyDOWN = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.DOWN);\n keyQ = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.Q);\n keyE = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.E); //magic missile\n \n //setting background tiles\n this.background = this.add.tileSprite(\n 0, \n 0, \n config.width/2, \n config.height/2, \n 'backgroundTile'\n ).setOrigin(0, 0).setScale(4);\n \n //creating particle manager\n\n //creating sounds\n this.punchSFX = this.sound.add('punchSound');\n this.mmShotSFX = this.sound.add('magic_missile_firingSound');\n this.mmBlastSFX = this.sound.add('magic_missile_explosionSound');\n this.bossLaughSFX = this.sound.add('bossLaugh');\n\n //creating the player\n this.player = new Player(\n this, \n config.width/2, \n config.height*2/3, \n 'player',\n 'back_walk8'\n );\n\n //starting camera follow\n this.cameras.main.startFollow(this.player);\n \n //creating object groups\n this.defineGroups();\n\n //creating spawning timers\n this.defineSpawnTimers();\n \n //creating colliders\n this.defineColliders();\n\n //creating UI\n this.defineUI();\n \n //game-over flag\n this.gameOver = false;\n\n //boss-spawning variables\n this.bossLevel = 1; //should start at 1\n this.killsUntilBoss = 15; //should start at 15\n this.bossActive = false;\n this.boss;\n }", "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}", "function generateItems(){\n \n /////////////////////////////////////////ARMAS/////////////////////////////////\n for(var i = 0; i < 5; i++){\n switch(Math.floor(Math.random()*2)){\n case 0:\n var w = new WeaponItem(Math.floor(Math.random()*2800 + 200), Math.floor(Math.random()*2800 + 200), 'pistol', 1, 500, 10, 'pistola');\n break;\n case 1:\n var w = new WeaponItem(Math.floor(Math.random()*2800 + 200), Math.floor(Math.random()*2800 + 200),'ak-47', 0.25, 200, 30, 'metralleta');\n break;\n }\n while(map.tileMap.getTileWorldXY(w.sprite.x, w.sprite.y, 32, 32, map.layers[0]) === null ||\n \t\tmap.tileMap.getTileWorldXY(w.sprite.x, w.sprite.y, 32, 32, map.layers[3]) !== null ||\n \t\tmap.tileMap.getTileWorldXY(w.sprite.x, w.sprite.y, 32, 32, map.layers[4]) !== null ||\n \t\tmap.tileMap.getTileWorldXY(w.sprite.x, w.sprite.y, 32, 32, map.layers[5]) !== null){\n w.sprite.x = Math.floor(Math.random()*2800 + 200);\n w.sprite.y = Math.floor(Math.random()*2800 + 200);\n }\n itemsGroup.add(w.sprite);\n weaponItems.push(w);\n }\n \n //////////////////////////////////////////FIN ARMAS//////////////////////////////////\n \n ////////////////////////////////////////MUNICION/////////////////////////////////////\n for(var i = 0; i < 6; i++){\n switch(Math.floor(Math.random()*2)){\n case 0:\n var a = new AmmoItem(Math.floor(Math.random()*2800 + 200), Math.floor(Math.random()*2800 + 200), 'pistol_ammo',10, 'pistola');\n break;\n case 1:\n var a = new AmmoItem(Math.floor(Math.random()*2800 + 200), Math.floor(Math.random()*2800 + 200),'ak47_ammo',30, 'metralleta');\n break;\n }\n while(map.tileMap.getTileWorldXY(a.sprite.x, a.sprite.y, 32, 32, map.layers[0]) === null ||\n \t\tmap.tileMap.getTileWorldXY(a.sprite.x, a.sprite.y, 32, 32, map.layers[3]) !== null ||\n \t\tmap.tileMap.getTileWorldXY(a.sprite.x, a.sprite.y, 32, 32, map.layers[4]) !== null ||\n \t\tmap.tileMap.getTileWorldXY(a.sprite.x, a.sprite.y, 32, 32, map.layers[5]) !== null){\n a.sprite.x = Math.floor(Math.random()*2800 + 200);\n a.sprite.y = Math.floor(Math.random()*2800 + 200);\n }\n itemsGroup.add(a.sprite);\n ammoItems.push(a);\n }\n \n \n //////////////////////////////////////FIN MUNICION///////////////////////////////////////\n \n /////////////////////////////////////ESCUDO//////////////////////////////////////////////\n for(var i = 0; i < 4; i ++){\n var s = new ShieldItem(Math.floor(Math.random()*2800 + 200), Math.floor(Math.random()*2800 + 200));\n while(map.tileMap.getTileWorldXY(s.sprite.x, s.sprite.y, 32, 32, map.layers[0]) === null ||\n \t\tmap.tileMap.getTileWorldXY(s.sprite.x, s.sprite.y, 32, 32, map.layers[3]) !== null ||\n \t\tmap.tileMap.getTileWorldXY(s.sprite.x, s.sprite.y, 32, 32, map.layers[4]) !== null ||\n \t\tmap.tileMap.getTileWorldXY(s.sprite.x, s.sprite.y, 32, 32, map.layers[5]) !== null){\n s.sprite.x = Math.floor(Math.random()*2800 + 200);\n s.sprite.y = Math.floor(Math.random()*2800 + 200);\n }\n itemsGroup.add(s.sprite);\n shieldItems.push(s);\n }\n //Comida\n for(var i = 0; i < 8; i++){\n var f = new FoodItem(Math.floor(Math.random()*2800 + 200), Math.floor(Math.random()*2800 + 200),'food');\n while(map.tileMap.getTileWorldXY(f.sprite.x, f.sprite.y, 32, 32, map.layers[0]) === null ||\n \t\tmap.tileMap.getTileWorldXY(f.sprite.x, f.sprite.y, 32, 32, map.layers[3]) !== null ||\n \t\tmap.tileMap.getTileWorldXY(f.sprite.x, f.sprite.y, 32, 32, map.layers[4]) !== null ||\n \t\tmap.tileMap.getTileWorldXY(f.sprite.x, f.sprite.y, 32, 32, map.layers[5]) !== null){\n f.sprite.x = Math.floor(Math.random()*2800 + 200);\n f.sprite.y = Math.floor(Math.random()*2800 + 200);\n }\n itemsGroup.add(f.sprite);\n foodItems.push(f);\n }\n \n //Por último, mandamos la info de los items al servidor\n //Para weapon y ammo se manda u array para el tipo y otro para las posiciones. Para el resto de los items solo se mandan las posiciones\n var weaponPos = new Array();\n var weaponType = new Array();\n var ammoPos = new Array();\n var ammoType = new Array();\n var foodPos = new Array();\n var shieldPos = new Array();\n \n for (var i = 0; i < 5; i++){\n \tweaponPos[i] = new Array();\n }\n for (var i = 0; i < 6; i++){\n ammoPos[i] = new Array();\n }\n \n for (var i = 0; i < 4; i++){\n\n shieldPos[i] = new Array();\n }\n for (var i = 0; i < 8; i++){\n foodPos[i] = new Array();\n }\n for (var i = 0; i < 5; i++){\n \tweaponType[i] =weaponItems[i].type;\n \tweaponPos[i][0] = weaponItems[i].sprite.x;\n \tweaponPos[i][1] = weaponItems[i].sprite.y;\n }\n \n for(var i = 0; i < 6; i++){\n \tammoType[i] = ammoItems[i].type;\n \tammoPos[i][0] = ammoItems[i].sprite.x;\n \tammoPos[i][1] = ammoItems[i].sprite.y;\n }\n \n for(var i = 0; i < 4; i++){\n \tshieldPos[i][0] = shieldItems[i].sprite.x;\n \tshieldPos[i][1] = shieldItems[i].sprite.y;\n }\n \n for(var i = 0; i < 8; i++){\n \tfoodPos[i][0] = foodItems[i].sprite.x;\n \tfoodPos[i][1] = foodItems[i].sprite.y;\n }\n sendItemsWS(weaponType, weaponPos, ammoType, ammoPos, shieldPos, foodPos);\n\n clearItems();\n}", "function loadImages(){\n if (app)\n app.destroy(true);\n app = new PIXI.Application();\n document.getElementById(\"processContainer\").appendChild(app.view);\n \n textures = [];\n textures[0] = PIXI.Texture.from('star.png');\n\n for(let i = 0; i < imageData.length; i++){\n let image = new Image();\n image.src = imageData[i];\n textures[textures.length] = PIXI.Texture.from(new PIXI.BaseTexture(image));\n }\n reloadSprites();\n}", "activate() {\n\t\tthis.setSolidMasks(this.solidMasks); // Initializes the pfGrids\n\t\tthis.items.forEach(item => OAX6.UI.addItemSprite(item, item.x, item.y, item.z)); // Using .x instead of .chunkX, since .addItemSprite works with world coord\n\t\tthis.doors.forEach(door => {\n\t\t\tOAX6.UI.addItemSprite(door, door.x, door.y, door.z);\n\t\t\tOAX6.UI.floorLayers[door.z].objectsLayer.add(door.sprite); // Override group\n\t\t});\n\t}", "createTiles()\n {\n //add tileset to map layer\n this.mapLayer = this.tilemap.createLayer('walls');\n this.mapLayer.resizeWorld();\n\n //add p2 physics to tilemap\n this.tilemap.setCollisionByExclusion([]);\n game.physics.p2.convertTilemap(this.tilemap, this.mapLayer);\n \n this.player.setTilemapCollisionGroup(this.collisionGroup);\n \n this.tilemapBodies = game.physics.p2.convertTilemap(this.tilemap, this.mapLayer, true, false);\n \n for(let body of this.tilemapBodies)\n {\n this.configureBody(body, 16, 16);\n }\n }", "function createChickens () {\n\n for (var y = 0; y < 3; y++)\n {\n for (var x = 0; x < 8; x++)\n {\n var chicken = chickens.create(x * 70, y * 50, 'enemy1');\n chicken.anchor.setTo(0.5, 0.5);\n chicken.animations.add('flap', [ 0, 1, 2, 3,], 5, true);\n chicken.play('flap');\n chicken.body.moves = false;\n }\n }\n chickens.x = 160;\n chickens.y = 100;\n // All this does is basically start the invaders moving. Notice we're moving the Group they belong to, rather than the invaders directly.\n var tween = game.add.tween(chickens).to( { x: 200 }, 800, Phaser.Easing.Linear.None, true, 0, 1000, true);\n }", "function setup() {\n createCanvas(750, 750);\n \n bkg_img.width = 750;\n bkg_img.height = 750;\n\n man = createSprite(80, 160);\n man.addAnimation(\"man\", man_animation);\n man.scale = 0.6;\n\n man_win = createSprite(150,420);\n man_win.addImage(man_win_img);\n \n win = createSprite(375,140);\n win.addImage(win_img);\n win.scale = 2;\n \n man_lose = createSprite(150,420);\n man_lose.addImage(man_lose_img);\n man_lose.scale=1.5;\n \n lose = createSprite(375,140);\n lose.addImage(lose_img);\n lose.scale=0.3;\n \n start = createSprite(375, 685);\n start.addImage(start_img);\n start.scale = 0.3;\n\n bkg1 = createSprite(375, 375);\n bkg1.addImage(bkg_img);\n bkg2 = createSprite(1125, 375);\n bkg2.addImage(bkg_img);\n\n inv_ground1 = createSprite(375, 630, 750, 10);\n inv_ground1.visible=false;\n \n f1_grp = new Group();\n f2_grp = new Group();\n f3_grp = new Group();\n f4_grp = new Group();\n h1_grp = new Group();\n h2_grp = new Group();\n h3_grp = new Group();\n}", "createImages() {\n this.room2_e_pressed = false;\n this.room2_papers_moved = false;\n this.returnDoor = this.add.image(113, 385, 'returnDoor');\n this.room2_background = this.add.image(768, 432, 'room2_one_lesson_BG');\n this.room2_character_north = this.add.image(768, 432, 'room2_character_north');\n this.room2_character_east = this.add.image(768, 432, 'room2_character_east');\n this.room2_character_south = this.add.image(768, 432, 'room2_character_south');\n this.room2_character_west = this.add.image(768, 432, 'room2_character_west');\n this.room2_E_KeyImg = this.add.image(this.room2_character_north.x+40, this.room2_character_north.y+40, 'room2_E_KeyImg');\n this.room2_activity1A = this.add.image(768, 432, 'room2_activity1A');\n\t// this.room2_activity1B = this.add.image(768, 432, 'room2_activity1B');\n\t// this.room2_activity1C = this.add.image(768, 432, 'room2_activity1C');\n\t// this.room2_activity1D = this.add.image(768, 432, 'room2_activity1D');\n this.room2_activity2A = this.add.image(768, 432, 'room2_activity2A');\n this.room2_activity2B = this.add.image(768, 432, 'room2_activity2B');\n\t// this.room2_activity2C = this.add.image(768, 432, 'room2_activity2C');\n\t// this.room2_activity2D = this.add.image(768, 432, 'room2_activity2D');\n this.room2_activity3A = this.add.image(768, 432, 'room2_activity3A');\n this.room2_activity3B = this.add.image(768, 432, 'room2_activity3B');\n this.room2_activity4A = this.add.image(768, 432, 'room2_activity4A');\n this.room2_activity4B = this.add.image(768, 432, 'room2_activity4B');\n\t// this.room2_activity4C = this.add.image(768, 432, 'room2_activity4C');\n\t// this.room2_activity4D = this.add.image(768, 432, 'room2_activity4D');\n\t// this.room2_activity4E = this.add.image(768, 432, 'room2_activity4E');\n this.room2_activity5A = this.add.image(768, 432, 'room2_activity5A');\n this.room2_activity5B = this.add.image(768, 432, 'room2_activity5B');\n\t// this.room2_activity5C = this.add.image(768, 432, 'room2_activity5C');\n\t// this.room2_activity5D = this.add.image(768, 432, 'room2_activity5D');\n\t// this.room2_activity5E = this.add.image(768, 432, 'room2_activity5E');\n\t// this.room2_activity5F = this.add.image(768, 432, 'room2_activity5F');\n this.room2_activity6A = this.add.image(768, 432, 'room2_activity6A');\n this.room2_activity6B = this.add.image(768, 432, 'room2_activity6B');\n this.room2_activity6C = this.add.image(768, 432, 'room2_activity6C');\n this.room2_activity6D = this.add.image(768, 432, 'room2_activity6D');\n this.room2_activity6E = this.add.image(768, 432, 'room2_activity6E');\n this.room2_wall_info_1 = this.add.image(305, 75, 'room2_wall_info_1');\n this.room2_wall_info_2 = this.add.image(768, 75, 'room2_wall_info_2');\n this.room2_wall_info_3 = this.add.image(1232, 75, 'room2_wall_info_3');\n this.room2_wall_info_4 = this.add.image(305, 790, 'room2_wall_info_4');\n this.room2_wall_info_5 = this.add.image(768, 790, 'room2_wall_info_5');\n this.room2_wall_info_6 = this.add.image(1232, 790, 'room2_wall_info_6');\n this.room2_floor = this.add.image(769, 433, 'room2_floor');\n this.room2_map = this.add.image(768, 432, 'room2_map');\n this.room2_notebook = this.add.image(768, 432, 'room2_notebook');\n this.room2_activityLocked = this.add.image(768, 432, 'room2_activityLocked');\n this.room2_help_menu = this.add.image(768, 432, 'room2_help_menu');\n this.room2_hole_activity = this.add.image(350, 540, 'room2_hole_activity');\n this.room2_hole_nextRoom = this.add.image(768, 432, 'room2_hole_nextRoom');\n this.rightArrow = this.add.image(1000, 650, 'rightArrow');\n this.leftArrow = this.add.image(600, 650, 'rightArrow');\n this.countCoin = this.add.image(40, 230, 'singleCoin');\n this.profile = this.add.image(40,150,'profile');\n }", "function setupEndMonster1() {\n\n ufoDots = game.add.group();\n missiles = game.add.group();\n\n for (i = 0; i < 3; i++) {\n\n var redOlive\n\n if (i != 1) {\n redOlive = ufoDots.create(game.world.width * 0.5, game.world.height * 0.5, 'red_olive');\n } else {\n redOlive = ufoDots.create(game.world.width * 0.5, game.world.height * 0.5, 'red_olive_queen');\n }\n\n\n redOlive.animations.add('fly', [0, 1, 2, 3], 5, true);\n redOlive.animations.play('fly');\n }\n\n blocks.children.forEach(function(e) {\n e.kill()\n })\n\n platforms.children.forEach(function(e) {\n e.kill()\n })\n\n diamonds.children.forEach(function(e) {\n e.kill()\n })\n\n // reset to basic texture\n player.loadTexture('dude')\n\n music.stop()\n\n music2 = game.add.audio('music2');\n music2.volume = 0.9;\n music2.loop = true;\n\n //music2.play()\n\n}", "construct_player() {\n this.player = new Player(this);\n this.player.x = 208;\n this.player.y = 800;\n this.nubs = this.add.group();\n this.left_nub = this.physics.add.sprite(this.player.x - 17, this.player.y).setBodySize(3, 3);\n this.nubs.add(this.left_nub);\n this.right_nub = this.physics.add.sprite(this.player.x + 17, this.player.y).setBodySize(3, 3);\n this.nubs.add(this.right_nub);\n this.up_nub = this.physics.add.sprite(this.player.x, this.player.y - 17).setBodySize(3, 3);\n this.nubs.add(this.up_nub);\n this.down_nub = this.physics.add.sprite(this.player.x, this.player.y + 17).setBodySize(3, 3);\n this.nubs.add(this.down_nub);\n\n }", "fromGrid(sheetName, gridWidth, gridHeight, spriteNames, crop = {top:0,bottom:0,left:0,right:0}) {\n for(let y = 0; y < spriteNames.length; y++) {\n for(let x = 0; x < spriteNames[0].length; x++) {\n if(spriteNames[y][x] === null) {\n continue;\n }\n new Sprite(spriteNames[y][x], \n sheetName,\n x*gridWidth + crop.left,\n y*gridHeight + crop.top,\n gridWidth - crop.left - crop.right,\n gridHeight - crop.top - crop.bottom);\n }\n }\n }", "positionSprites() {\n for (var i = this.layers.length - 1; i >= 0; i--) {\n for (var j = 0; j < this.layers[i].length; j++) {\n for (var k = 0; k < this.layers[i][j].length; k++) {\n if (this.layers[i][j][k] === null) {\n continue\n }\n this.layers[i][j][k].setSpritePosition(gameSession.layout.header.numChildren)\n }\n }\n }\n }", "function spawnBGIcons(){\n\tvar bgIcon = 'bigSkull';\n\tvar topOrBot = Math.random()*2;\n\tvar top =true;\n\tif(game.backSpawn ==0){\n\tvar bgIcon = 'bigSkull';\n\tgame.backSpawn ++;\n\t}\n\telse if(game.backSpawn == 1){\n\tvar bgIcon = 'bigPlus';\n\tgame.backSpawn ++;\n\t}\n\telse if(game.mode2UnlockedAlert == true && game.backSpawn == 2){\n\tvar bgIcon = 'bigHeart';\n\tgame.backSpawn ++;\n\t}\n\telse if(game.mode3UnlockedAlert ==true && game.backSpawn == 3){\n\tvar bgIcon = 'bigStar';\n\tgame.backSpawn = 0;\n\t}\n\telse{\n\t\tgame.backSpawn =0;\n\t}\t\n\n\tif(topOrBot >1){\n\t\ttop = true;\n\t}\n\telse{\n\t\ttop = false;\n\t}\n\tvar newEnemySpeed = Math.random() * 4;\n\tnewEnemySpeed = Phaser.Math.clamp(newEnemySpeed, 2.50, 3.50);\n\n\n\n\t// spawn new background animation sprite\n\tgame.bgMenuAnimation = new BGIcons(game, bgIcon, bgIcon,.5,0, top, newEnemySpeed);\n\tgame.bgGroup.add(game.bgMenuAnimation);\n\n\tgame.world.sendToBack(game.bgGroup);\n\tgame.time.events.repeat(Phaser.Timer.SECOND , 1, spawnBGIcons, this);\n}", "function createItems(game) {\n items = game.add.group();\n\n // We will enable physics for any item created in this group\n items.enableBody = true;\n\n if (level == GRASS_LEVEL || level == FORREST_LEVEL) {\n totalItems = 50;\n for (var i = 0; i < totalItems; i++) {\n // Create a star inside of the 'items' group\n var star = items.create((game.world.width/totalItems)*i, 0, 'star');\n // Let gravity do its thing\n star.body.gravity.y = 90;\n // This just gives each star a slightly random bounce value\n star.body.bounce.y = 0.7 + Math.random() * 0.8;\n star.body.velocity.x = getRandomFromRange(400);\n }\n }\n else if (level == CAVE_LEVEL) {\n totalItems = 50;\n for (var i = 0; i < totalItems; i++) {\n // Create a star inside of the 'items' group\n var x = getRandomWorldX(game);\n var y = getRandomWorldY(game);\n var crystal = items.create(x, y, 'greenCrystal');\n }\n\n }\n else if (level == CLOUD_LEVEL || level == SPACE_LEVEL) {\n totalItems = 50;\n for (var i = 0; i < totalItems; i++) {\n // Create a star inside of the 'items' group\n var star = items.create((game.world.width/totalItems)*i, Math.random() * game.world.height, 'star');\n // Let gravity do its thing\n star.body.gravity.y = Math.round( (Math.random() * 10) - 5);\n // This just gives each star a slightly random bounce value\n star.body.bounce.y = 0.7 + Math.random() * 0.8;\n star.body.velocity.x = getRandomFromRange(30);\n }\n }\n else {\n totalItems = 50;\n for (var i = 0; i < totalItems; i++) {\n // Create a star inside of the 'items' group\n var star = items.create((game.world.width/totalItems)*i, 0, 'star');\n // Let gravity do its thing\n star.body.gravity.y = 90;\n // This just gives each star a slightly random bounce value\n star.body.bounce.y = 0.7 + Math.random() * 0.8;\n star.body.velocity.x = getRandomFromRange(400);\n }\n }\n\n\n return items;\n}", "function addRects() {\n for (var i = 0; i < rectsPerSpawn; i++) { //generates 10,000 rectangles, one at a time\n if (rectangleList.length < 10000) {\n var rec = new randomRectangle(); //create new rect object\n\n rectangleList.push(rec); //push to the list\n rec.init(); //initialize the rectangle object\n songPlayed.play(); //play the song on spawn\n } else if (rectangleList.length == 10000) { //if the list hits 10,000\n rectangleList.splice();\n rec = new randomRectangle(); //make more rectangles\n //\"never-ending feeling\"\n rectangleList.push(rec);\n rec.init();\n }\n }\n }", "function initSprites() {\n function drawBallImage(r, colorStops, label) {\n var canvas = document.createElement(\"canvas\");\n canvas.width = canvas.height = r * 2;\n var ctx = canvas.getContext(\"2d\");\n \n var grad = ctx.createRadialGradient((3/4) * r, (1/2) * r, (1/16) * r,\n r, r, r);\n for (i in colorStops) {\n grad.addColorStop.apply(grad, colorStops[i]);\n }\n ctx.fillStyle = grad;\n ctx.fillRect(0, 0, canvas.width, canvas.height);\n \n if (label) {\n ctx.textAlign = \"center\";\n ctx.textBaseline = \"middle\";\n ctx.fillText(label, r, r);\n }\n \n return canvas.toDataURL();\n }\n\n function sprite(type, role) {\n if (!role)\n role = type;\n var radius = Config.radius[type];\n var colors = Config.gradientStops[Config.color[role]];\n if (Config.reverseGradient[role])\n colors.reverse();\n var label = Config.label[role];\n var key = role.substr(0, 1).toUpperCase() + role.substr(1) + \"Sprite\";\n var map = {};\n map[key] = [ 0, 0 ];\n Crafty.sprite(radius * 2, drawBallImage(radius, colors, label), map);\n }\n \n sprite(\"rocket\");\n sprite(\"smallBall\");\n sprite(\"smallBall\", \"accelerate\");\n sprite(\"smallBall\", \"increaseMass\");\n sprite(\"smallBall\", \"thief\");\n sprite(\"smallBall\", \"thiefToolkit\");\n sprite(\"smallBall\", \"goodie\");\n sprite(\"applePolisher\");\n sprite(\"inspector\");\n sprite(\"lunatic\");\n sprite(\"bigBall\");\n sprite(\"blackHole\");\n sprite(\"magneticHole\");\n}", "function drawSprites() {\r\n for (var i = 0; i < numberOfSprites; i++) {\r\n spritesArray[i].showSprite(); // Updates the z value\r\n spritesArray[i].moveSprite(); // Paints new object\r\n }\r\n}", "function createSprites(num = 5, classRef = classes.Sprite) {\n // create array to hold all of our sprites\n let array = [];\n\n // make some sprites\n for (let i = 0; i < num; i++) {\n // determine random properties and instantiate new sprite\n let x = Math.random() * (canvasWidth - 100) + 50;\n let y = Math.random() * (canvasHeight - 100) + 50;\n let span = 15 + Math.random() * 25;\n let fwd = utils.getRandomUnitVector();\n let speed = Math.random() + 2;\n let color = utils.getRandomColor();\n let s = new classRef(x, y, span, fwd, speed, color);\n\n // add to end of array\n array.push(s);\n } // end for\n\n return array;\n}", "function createFromTiledObject(element, group) {\n var sprite = group.create(element.x, element.y, element.properties.sprite);\n\n //copy all properties to the sprite\n Object.keys(element.properties).forEach(function(key){\n sprite[key] = element.properties[key];\n });\n }", "function generateStones(){\n if (frameCount%50===0){\n // creating sprites of Stones\n var stone= createSprite(1200,120,40,10);\n // craeting the stones in random locations based on the values randomly\n stone.x=random(50,450);\n stone.addImage(stoneImg);\n stone.scale=0.5;\n stone.velocityY= 5;\n stone.lifetime=250;\n stonesGroup.add(stone);\n }}", "loadPlanetSprites() {\n for (let planet of scenes.sim.planets) {\n let sprite = new PIXI.Sprite.fromImage(planet.map_image);\n sprite.width = planet.radius / DEFAULT_MAP_ZOOM;\n sprite.height = planet.radius / DEFAULT_MAP_ZOOM;\n sprite.anchor.set(0.5, 0.5);\n\n planet.map_sprite = sprite;\n this.stage.addChild(sprite);\n }\n }", "function initTiles(){\n\n let sky = new Image();\n sky.src=\"./imgs/sky-temp.png\";\n tiles.push(sky);\n let ground = new Image();\n ground.src=\"./imgs/ground-tile.png\";\n tiles.push(ground);\n let walk1 = new Image();\n walk1.src=\"./imgs/walk1.png\";\n tiles.push(walk1);\n let walk2 = new Image();\n walk2.src=\"./imgs/walk2.png\";\n tiles.push(walk2);\n let walk3 = new Image();\n walk3.src=\"./imgs/walk3.png\";\n tiles.push(walk3);\n let walk4 = new Image();\n walk4.src=\"./imgs/walk4.png\";\n tiles.push(walk4);\n let moon = new Image();\n moon.src=\"./imgs/moon-temp.png\";\n tiles.push(moon);\n let sun = new Image();\n sun.src=\"./imgs/sun.png\";\n tiles.push(sun);\n let plpic = new Image();\n plpic.src=\"./imgs/abomination.png\";\n tiles.push(plpic);\n let back_new= new Image();\n back_new.src=\"./imgs/tree_70x128.png\";\n tiles.push(back_new);\n let back_cloud= new Image();\n back_cloud.src=\"./imgs/back_proper.png\";\n tiles.push(back_cloud);\n let speed= new Image();\n speed.src=\"./imgs/speed.png\";\n tiles.push(speed);\n\n }", "createLayers () {\n // zero out x and y, because we start building from top left corner\n const x = 0;\n const y = 0;\n\n // Connecting the Map & Layer Data\n // ---------------------------------------------------------------------------------------- //\n // Creating the level from the tilemap - first pulling the 'Tiled' json from preload\n this.tileMap = this.add.tilemap('lvl-01-map');\n // Then connecting the json map from tiled with the tile-sheet image preloaded in phaser\n this.tileSet = this.tileMap.addTilesetImage('environment-tiles', 'environment-tiles');\n \n // Building the layers\n // ---------------------------------------------------------------------------------------- //\n // Creating our Layers by assigning their keys/names from Tiled editor, starting with the background layer\n this.floorLayer = this.tileMap.createDynamicLayer('ground-walkable', this.tileSet);\n // Then adding additional layers // The X, Y here is starting from the top left corner\n this.wallLayer = this.tileMap.createStaticLayer('ground-impassable', this.tileSet, x, y);\n // placing the collectable items\n this.crateLayer = this.tileMap.createStaticLayer('item-crates', this.tileSet, x, y);\n // placing the obstacles\n this.obstacleLayer = this.tileMap.createDynamicLayer('obstacle-pond', this.tileSet, x, y);\n \n // Adding Physics to the layers\n // ---------------------------------------------------------------------------------------- //\n // Make all tiles on the wallLayer collidable\n this.wallLayer.setCollisionByExclusion([-1]);\n }", "grid(\n columns = 0, rows = 0, cellWidth = 32, cellHeight = 32,\n centerCell = false, xOffset = 0, yOffset = 0,\n makeSprite = undefined,\n extra = undefined\n ){\n\n //Create an empty group called `container`. This `container`\n //group is what the function returns back to the main program.\n //All the sprites in the grid cells will be added\n //as children to this container\n let container = new this.Container();\n\n //The `create` method plots the grid\n\n let createGrid = () => {\n\n //Figure out the number of cells in the grid\n let length = columns * rows;\n\n //Create a sprite for each cell\n for(let i = 0; i < length; i++) {\n\n //Figure out the sprite's x/y placement in the grid\n let x = (i % columns) * cellWidth,\n y = Math.floor(i / columns) * cellHeight;\n\n //Use the `makeSprite` function supplied in the constructor\n //to make a sprite for the grid cell\n let sprite = makeSprite();\n\n //Add the sprite to the `container`\n container.addChild(sprite);\n\n //Should the sprite be centered in the cell?\n\n //No, it shouldn't be centered\n if (!centerCell) {\n sprite.x = x + xOffset;\n sprite.y = y + yOffset;\n }\n\n //Yes, it should be centered\n else {\n sprite.x \n = x + (cellWidth / 2) \n - (sprite.width / 2) + xOffset;\n sprite.y \n = y + (cellHeight / 2) \n - (sprite.width / 2) + yOffset;\n }\n\n //Run any optional extra code. This calls the\n //`extra` function supplied by the constructor\n if (extra) extra(sprite);\n }\n };\n\n //Run the `createGrid` method\n createGrid();\n\n //Return the `container` group back to the main program\n return container;\n }" ]
[ "0.7431676", "0.71432704", "0.70899177", "0.67510474", "0.66869855", "0.6623713", "0.65672684", "0.63094056", "0.63021356", "0.62748915", "0.62720567", "0.6195247", "0.6189155", "0.6186244", "0.6172514", "0.61686933", "0.6164667", "0.6128131", "0.6123609", "0.61069924", "0.6096756", "0.60757446", "0.60732466", "0.60718757", "0.6036382", "0.6029254", "0.6015694", "0.5997486", "0.5994292", "0.5993804", "0.59847456", "0.5979689", "0.5979438", "0.5978465", "0.59755015", "0.5973844", "0.59507257", "0.59158164", "0.59130883", "0.5912366", "0.5879185", "0.58754873", "0.5874137", "0.58740157", "0.58731663", "0.58686733", "0.5858027", "0.58554596", "0.5850748", "0.5841802", "0.58415544", "0.5841241", "0.58319753", "0.582648", "0.5825802", "0.58247775", "0.58146435", "0.5805953", "0.580489", "0.5798827", "0.57797694", "0.5773252", "0.5772784", "0.57719743", "0.5753216", "0.574938", "0.5744136", "0.5733092", "0.5731745", "0.57310146", "0.5728381", "0.57266915", "0.57248175", "0.57210207", "0.57209677", "0.57191706", "0.5716123", "0.5715093", "0.5713004", "0.57128036", "0.5711453", "0.5708884", "0.57060593", "0.5699619", "0.5688047", "0.5683556", "0.56809527", "0.56753296", "0.5671553", "0.5669847", "0.56689566", "0.5662516", "0.56573063", "0.5655173", "0.565404", "0.565163", "0.5644029", "0.56370175", "0.56367594", "0.5630945" ]
0.84762454
0
Adds the sub gallery to the page and populates it
async function AddSubGallery() { var SubGallerySection = document.createElement("div"); SubGallerySection.setAttribute("id", "sub_gallery"); var Gallery_Header = document.createElement("div"); Gallery_Header.setAttribute("id", "gallery_header"); var GalleryHeaderText = document.createElement("span"); GalleryHeaderText.setAttribute("id", "title_subs"); GalleryHeaderText.innerHTML = "Subscriptions"; //Append the header and header text to the gallery Gallery_Header.appendChild(GalleryHeaderText); SubGallerySection.appendChild(Gallery_Header); var Gallery_Body = document.createElement("div"); Gallery_Body.setAttribute("id", "gallery_body"); SubGallerySection.appendChild(Gallery_Body); //Wait for all subs have been added to the gallery //TODO: Set a timeout to ~1s or something, to prevent infinitely trying add the sub gallery // The timeout can be implemented by racing 2 promises (a setTimeout vs the wanted functionality) // https://italonascimento.github.io/applying-a-timeout-to-your-promises/ let r = await MakeSubGallery(Gallery_Body).catch((error) => { alert(error); }); //Then add the gallery to the page primaryArea.appendChild(SubGallerySection); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setupGallery() {\n\t\t if($(\".photogallery\").length) {\n\t\t\tvar globaltitle = $(\".photogallery h2\").text();\n\t\t\t$(\".photogallery h2\").css(\"display\", \"none\");\n\t\t\t$('.photogallery ul').wrap(\"<div class=\\\"scroller\\\"/>\");\n\t\t\t$('.photogallery img').attr(\"width\", \"106\");\n\t\t\t$('.photogallery').append(\"<div class='viewer'></div>\");\n\t\t\t$(\".photogallery .scroller p\").css(\"display\", \"none\");\n\t\t\n\t\t\t$(\".photogallery .scroller img\").each(function() {\n\t\t\n\t\t\t $(this).fadeTo('fast', 0.5);\n\t\t\t\n\t\t\t $(this).click(function() {\n\t\t\t\t$(\".viewer\").html(\"<img src=\\\"\" + $(this).attr(\"src\") + \"\\\"/><p/>\");\n\t\t\t\tif($(this).parent().find(\"p\").text() != \"\") {\n\t\t\t\t $(\".viewer p\").html($(this).parent().find(\"p\").text());\n\t\t\t\t} else {\n\t\t\t\t $(\".viewer p\").html(globaltitle);\n\t\t\t\t}\n\t\t\t\t$(\".photogallery .selected\").fadeTo('slow', 0.5).removeClass(\"selected\");\n\t\t\t\t$(this).addClass(\"selected\").fadeTo('slow', 1.0);\n\t\t\t });\n\t\t\n\t\t\t $(this).hover(function() {\n\t\t\t\t$(this).fadeTo('fast', 1.0);\n\t\t\t }, function() {\n\t\t\t\tif(!$(this).hasClass(\"selected\")) {\n\t\t\t\t $(this).fadeTo('fast', 0.5);\n\t\t\t\t}\n\t\t\t });\n\t\t\n\t\t\t});\n\t\t\taddJScrollPane(\".photogallery .scroller\");\n\t\t\n\t\t\t$(\".photogallery ul li:first img\").click();\n\t\t }\n\t\t}", "buildGallery_() {\n // Build gallery\n this.gallery_ = this.win.document.createElement('div');\n this.gallery_.classList.add('i-amphtml-lbv-gallery');\n\n // Initialize thumbnails\n this.updateThumbnails_();\n\n this.vsync_.mutate(() => {\n this.container_.appendChild(this.gallery_);\n });\n }", "function updateGallery() {\n log.debug(\"[Gallery] : Updating Gallery\");\n // If gallery doesn't exist create it\n if (!galleryExists) {\n if (todoItem.get('photoCount') !== 0) {\n createGallery();\n galleryExists = true;\n }\n return\n }\n\n // If gallery does exist add the first item\n var imageView = getPictureView(1, 150, 150);\n\n $.tdg.addGridItems({\n view: imageView,\n data: {\n caption: 'Test'\n }\n });\n\n}", "function main(){\n galleries = getGalleries();\n // localStorage.setItem('g', JSON.stringify(galleries) )\n // addNavItems(galleries);\n // handleView(galleries);\n }", "function init() {\n renderGallery();\n renderSection('meme-gallery');\n}", "function setupGallery() {\n var $page = $('.write-page.active-page');\n\n $('.gallery').on('click', 'img', function(e) {\n var $imgs = $('.gallery img'),\n index = $imgs.index(this);\n showGalleryPreview(index);\n });\n var $form = $page.find('.image-search');\n $form.submit(function(e) {\n e.preventDefault();\n //console.log('submit');\n clearErrors();\n $('.gallery-back,.gallery-more').button('disable');\n $('.gallery').empty();\n var query = $page.find('input[name=query]').val();\n var emailRe = /\\b([A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,4})\\b/i;\n\t\t var useridRe = /\\b(by:[-a-zA-Z0-9_.]+)\\b/i;\n var match = query.match(emailRe) || query.match(useridRe);\n if (match) { // email or username query\n query = query.replace(match[0], '');\n $.when(getNsidFromEmailOrUserid(match[0])).then(function(nsid) {\n fetchGallery({ user_id: nsid, query: query });\n });\n } else {\n\t\t fetchGallery({ query: query });\n\t\t }\n return false;\n });\n\n $('.button', '.writing-controls').button().button('disable');\n $('.gallery-back').click(function() {\n fetchAnotherGallery(-1);\n return false;\n });\n $('.gallery-more').click(function() {\n fetchAnotherGallery(+1);\n return false;\n });\n\n $(window).resize(updateThumbnailSize); // update the thumbnails' size on window resize\n }", "function popGallery(g){\n\t//stuff the gallery DOM into the content page\n\tif(state == 'gallery'){\n\t\t$('#contentBody').html(galView);\n\n\t\t}\n}", "function galleryClick(){\r\n\t\tcallAjax(createGallery, \"gallery\", \"get\");\r\n\t}", "static displayGallery(photographer)\n {\n const gallery = GalleryFactory.create(photographer)\n document.querySelector(\".main\").appendChild(gallery)\n }", "function gallery_controls() {\r\n\r\n\t\t$(function() {\r\n\t\t$.getJSON( \"assets/db/albums.json\", function( data ) {\r\n\t\t\tvar albums = [];\r\n\r\n\t\t\tvar album_list = [];\r\n\r\n\t\t\t$.each( data, function (key, val) {\r\n\r\n\t\t\t\tif (Number.isInteger(parseInt(key)) && val[\"is_active\"]==1) {\r\n\t\t\t\t\t\r\n\t\t\t\t\talbums.push( \"<div class='col-sm-6 col-md-4 filtr-item' data-category='\" + parseInt(key) + \"'>\" );\r\n\t\t\t\t\talbums.push( \"<div class='mu-item-thumbonail'>\" );\r\n\t\t\t\t\talbums.push( \"<img class='img-responsive' src='assets/\" + val[\"slug\"] + \".jpg' alt='\" + val[\"title\"] + \"'>\" );\r\n\t\t\t\t\talbums.push( \"</div>\" );\r\n\t\t\t\t\talbums.push( \"<div class='mu-filter-item-content'>\" );\r\n\t\t\t\t\talbums.push( \"<h1 class='mu-filter-item-title'>\" + val[\"title\"] + \"</h2>\" );\r\n\t\t\t\t\talbums.push( \"<h4 class='mu-filter-item-title'>\" + val[\"sub_title\"] + \"</h4>\" );\r\n\t\t\t\t\talbums.push( \"<span class='mu-header-dot' style='background-color: white'></span>\" );\r\n\t\t\t\t\talbums.push( \"<h4 class='mu-filter-item-title'>Released: \" + album_date(val[\"release_date\"]) + \"</h5>\" );\r\n\t\t\t\t\talbums.push( \"<h4 class='mu-filter-item-title'>\" + val[\"tracks\"] + \" tracks (\" + format_album_time(val[\"total_length\"]) + \")</h5>\" );\r\n\t\t\t\t\talbums.push( \"<h5 class='mu-filter-item-title'>&copy; \" + val[\"label\"] + \"</h5>\" );\r\n\t\t\t\t\talbums.push( \"<a class='mu-filter-imglink' href='assets/\" + val[\"slug\"] + \".jpg' title='\" + val[\"title\"] + \"'\" + \"id='\" + key + \"'><i class='fa fa-info-circle'></i></a>\" );\r\n\t\t\t\t\talbums.push( \"<span class='list-track' id='\" + key + \"'><i class='fa fa-question-circle'></i></span>\" );\r\n\t\t\t\t\talbums.push( \"</div>\" );\r\n\t\t\t\t\talbums.push( \"</div>\" );\r\n\t\t\t\t\t\t\r\n\t\t\t\t\talbum_list[key] = key;\r\n\t\t\t\t}\r\n\r\n\t\t\t});\r\n\r\n\t\t\tdocument.getElementsByClassName(\"filtr-container\")[0].innerHTML = albums.join(\"\");\r\n\t\t\t\r\n\t\t\t$('.mu-filter-imglink').magnificPopup({\r\n\t\t\t\ttype: 'image',\r\n\t\t\t\tmainClass: 'mfp-fade',\r\n\t\t\t\tgallery:{\r\n\t\t\t\t enabled:true\r\n\t\t\t\t}\r\n\t\t\t });\r\n\t\t});\r\n\t});\r\n}", "function addPhotos() {\n var photoContainerTmpl = _.template($('#photoContainerTmpl').html());\n var photoTmpl = _.template($('#photoTmpl').html());\n var photoStr = \"\";\n albums.forEach(function(el) {\n photoStr += photoContainerTmpl(el);\n\n el.photos.forEach(function (item) {\n photoStr += \"<li>\"\n + \"<a href='' >\"\n + \"<div class='photo-wrapper'>\"\n + \"<img src='\" + item.url + \"' + rel='\" + item.rel + \"' />\"\n + \"<h3>\" + item.name + \"</h3>\"\n + \"</div>\"\n + \"</a>\"\n + \"</li>\";\n })\n photoStr += \"</ul>\"\n photoStr += \"</div>\"\n });\n $('.right-col').append(photoStr);\n}", "function addNavItems(galleries){\n console.log('Adding Nav Items...');\n aboutMeNav(galleries);\n for (var i = 0; i < galleries.gallery.length; i++) {\n $('#slide-out').append(`<li><a href=\"index.html?gallery=${galleries.gallery[i].filename}\">${galleries.gallery[i].title}</a></li> <li><div class=\"divider\"></div></li>`);\n }\n }", "renderGallery() {\n\t\tconst {data, container, currentPhoto} = this.props,\n\t\t\timageWrapper = this.createElement('div', 'gallery__general-image'),\n\t\t\timage = this.createElement('img', 'gallery__photo');\n\t\tcontainer.innerText = '';\n\n\t\timageWrapper.append(image);\n\t\tcontainer.append(imageWrapper, this.renderPhotoList());\n\t\tthis.changeGeneralPhoto(currentPhoto);\n\t}", "generateGallery() {\n return (\n <Gallery\n headPhoto={this.state.headPhoto}\n additionalPhotos={this.state.additionalPhotos}\n />\n )\n }", "function initWPGallery(){\n\tjQuery(\".gallery\").each(function(){\n\t\tvar rel = jQuery(this).attr('id');\n\t\tjQuery(this).find('.gallery-item').each(function(){\n\t\t\tvar link = jQuery(this).find('a');\n\t\t\tlink.attr('rel', rel);\n\t\t\tlink.colorbox({rel: rel});\n\t\t});\n\t});\n}", "function renderGallery(){\n\tretrieveLocalStorage();\n\tgetAndRenderArtworkThumb();\n\tgetAndRenderAnimationThumb();\n\tgetAndRenderArtworkInfo();\n\tgetAndRenderAnimationInfo();\n}", "function init() {\n log.info(\"[Gallery] Initializing \");\n\n setupNav();\n\n if (todoItem.get('photoCount')) {\n createGallery();\n galleryExists = true;\n }\n}", "function goToGallery() {\n resetSort();\n renderGrid();\n document.querySelector('.header2').style.display = 'flex';\n document.querySelector('main').style.display = 'block';\n document.querySelector('.my-info').style.display = 'flex';\n document.querySelector('.canvas-btn-container').style.display = 'none';\n document.querySelector('.paging').style.display = 'flex';\n onClear();\n clearMeme();\n}", "function getGallery(obj) {\r\n for (var i = 0; i < obj.length; i++) {\r\n $mainList.append('' +\r\n '<div class=\"gallery\" style=\"background-image: url(http://st.kp.yandex.net/images/film_big/' + obj[i].preview + '.jpg)\">' +\r\n '<a href=\"#\" data-gallery-item=\"http://st.kp.yandex.net/images/' + obj[i].preview + '\">' +\r\n '<img src=\"http://st.kp.yandex.net/images/' + obj[i].preview + '\" alt=\"\">' +\r\n '</a>' +\r\n '</div>' +\r\n '');\r\n }\r\n }", "function createGallery(image) {\n let gallerySection = document.getElementById('gallery-section');\n gallerySection.innerHTML = '';\n\n let gallery = document.createElement('div');\n gallery.id = 'gallery';\n gallery.className = 'section';\n gallery.innerHTML=`\n <div class=\"row overlay overlay-top\">\n <a id=\"gal-title\" class=\"btn overlay-item img-title\"></a>\n <a id=\"gal-author\" class=\"btn overlay-item img-author\"></a>\n </div>\n <img id=\"gallery-img\" src=\"\" alt=\"\">\n <div class=\"row overlay overlay-bottom\">\n <a id=\"gal-prev\" class=\"btn overlay-item btn-blue\">Previous</a>\n <a id=\"gal-delete\" class=\"btn overlay-item btn-red\">Delete</a>\n <a id=\"gal-next\" class=\"btn overlay-item btn-blue\">Next</a>\n </div>\n\n <div id=\"comments\" class=\"section section-gallery\"></div>\n <div id=\"comment-form-section\" class=\"section section-gallery section-row\"></div>\n `;\n gallerySection.append(gallery);\n updateGallery(gallery, image);\n }", "function setupGalleries() {\n\t\t\n\t\t$('.vimeo-gallery .playlist li').each(function(){\n\t\t\n\t\t\tvar video$ = $(this),\n\t\t\t\tvideo_url = video$.attr('data-video-url');\n\t\t\t\n\t\t\tif( undefined == video_url ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t$.ajax({\n\t\t\t\n\t\t\t\t'url' : 'http://vimeo.com/api/oembed.json?url=' + video_url + '&width=640&height=360&callback=addVideo',\n\t\t\t\t'dataType' : 'jsonp',\n\t\t\t\t'success' : function(video){\n\t\t\t\t\t// we have the embed info now, lets program the playlist\n\t\t\t\t\t\n\t\t\t\t\t// save all the the data for later\n\t\t\t\t\tvideo_info[video.video_id] = video;\n\t\t\t\t\t\n\t\t\t\t\tvar listItem = '<a href=\"##\" data-video-id=\"' + video.video_id + '\"><img src=\"' + video.thumbnail_url + '\" class=\"thumbnail\" width=\"33.3333333%\" />';\n\t\t\t\t\tlistItem += '<h2>' + video.title + '</h2></a><p>' + video.description + '</p>';\n\t\t\t\t\t\n\t\t\t\t\tvideo$.html(listItem);\n\t\t\t\t\t\n\t\t\t\t\tif( video$.is('li:first-child') ) {\n\t\t\t\t\t\tvideo$.find('a').click();\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t'error' : function() {\n\t\t\t\t\t// can't let the bad videos spoil all the fun\n\t\t\t\t\tvideo$.remove();\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t});\n\t}", "function initGalleries() {\n if (window.Galleria && Drupal.settings.tesla.flickr_api_key) {\n Galleria.loadTheme('/sites/all/themes/tesla/js/galleria/src/themes/classic/galleria.classic.js');\n var flickr = new Galleria.Flickr(Drupal.settings.tesla.flickr_api_key); // initialize the plugin\n\n $('#gallery-index li a').click(function() {\n $('#gallery-index li').removeClass('selected');\n $(this).parent().addClass('selected');\n var href = $(this).attr('href').split('=');\n var set_id = href[1];\n flickr.getSet(set_id, {size:'medium'}, function(data) {\n $('#galleria').galleria({\n data_source: data\n });\n });\n return false;\n });\n\n // trigger click on first gallery item\n $('#gallery-index li.first a').trigger('click');\n }\n}", "function populateGalleries(data) {\r\n document.querySelector(\"#loader\").style.display = \"none\";\r\n const list = document.querySelector(\"#galleries\");\r\n data.forEach(d => {\r\n let li = document.createElement(\"li\");\r\n li.textContent = d.GalleryName;\r\n\r\n li.addEventListener(\"click\", function () {\r\n galleryInfo(d);\r\n createMap(d);\r\n generatePaintings(d);\r\n });\r\n\r\n list.appendChild(li);\r\n });\r\n \r\n /* controls the toggle functionality of the galleryList section and makes more space for the other information */\r\n let button = document.querySelector(\"#toggleListButton\");\r\n let gList = document.querySelector(\"#galleryList\");\r\n let gInfo = document.querySelector(\"#galleryInfo\");\r\n let paintings = document.querySelector(\"#paintingsList\");\r\n let map = document.querySelector('#map')\r\n\r\n //have to double click on the button to work \r\n button.addEventListener('click', () => {\r\n if (gList.style.display == \"block\") {\r\n gList.style.display = \"none\";\r\n gInfo.style.gridColumn = \"1/2\";\r\n paintings.style.gridColumn = \"2/4\";\r\n map.style.gridColumn = \"1/5\";\r\n\r\n } else {\r\n gList.style.display = \"block\";\r\n gList.style.gridColumn = \"1/2\";\r\n gInfo.style.gridColumn = \"2/3\";\r\n paintings.style.gridColumn = \"3/5\";\r\n map.style.gridColumn = \"2/5\";\r\n }\r\n });\r\n }", "openGallery_() {\n // Build gallery div for the first time\n if (!this.gallery_) {\n this.buildGallery_();\n }\n this.container_.setAttribute('gallery-view', '');\n this.topBar_.classList.add('fullscreen');\n }", "function seeMoreButton(button) {\n if (!button) return; // Button doesn't exist, return to prevent errors.\n\n $(button).parent()\n .animate({ bottom: 1 })\n .animate({ bottom: 0 });\n\n // Event listener for click on \"See More\" button\n button.addEventListener('click', function() {\n var container = document.querySelector('.gallery');\n\n $.ajax({\n url:'/events',\n method:'GET',\n dataType: 'json'\n }).done(function(responseData){\n\n\n responseData.forEach(function(e){\n var div = document.createElement('div')\n var image = document.createElement('img')\n var a = document.createElement('a')\n\n\n image.src = e.image_url\n image.classList='gallery-image'\n\n a.href = '/events/' + e.id\n\n a.append(image)\n div.append(a)\n div.classList ='gallery-item'\n // p.innerText = e.name\n // p.style.color = 'blue'\n // div.append(p)\n container.append(div)\n\n\n });\n\n });\n\n //res\n\n $.ajax({\n url:'/restaurants',\n method:'GET',\n dataType: 'json'\n }).done(function(responseRest){\n\n responseRest.forEach(function(e){\n var div2 = document.createElement('div')\n var image2 = document.createElement('img')\n var a2 = document.createElement('a')\n\n image2.src = e.image_url\n image2.style.height = '200px'\n image2.classList='galler-image'\n\n a2.href = '/restaurants/' + e.id\n a2.append(image2)\n div2.append(a2)\n div2.classList ='gallery-item'\n\n container.append(div2)\n\n\n\n });\n\n });\n\n ////load up\n\n\n var newPosition = $(window).scrollTop() + 200;\n scrollPage(newPosition);\n }, false);\n }", "function populateGallery(){\nlet thumbnailAdd ='';\nlet container = document.querySelector('.container_thumbnails');//get object\n\n for (let i=1; i<=(captionArray.length); i++) {\n thumbnailAdd += `<a class= 'thumbnail' href=\"images/photos/${i}.jpg\" data-caption=\"${captionArray[i-1]}\">\n <img class='thumbnail' id= \"thumb${i}\" src=\"images/photos/thumbnails/${i}.jpg\" alt=\"Gallery image\">\n </a>`;\n }\ncontainer.innerHTML = thumbnailAdd;\n}", "function createGallery() {\n log.debug('[Gallery] : createGallery() : number of images = ', todoItem.get('photoCount'));\n galleryExists = true;\n\n var photoCount = todoItem.get('photoCount');\n var columns = 0;\n\n // Bail if no photos, otherwise set the number of columns based on current photo count\n if (photoCount < 1) {\n Alloy.Globals.Menu.showInfoBar({title: \"No Photos To Display\"});\n log.debug(\"[Gallery] : createGallery : photoCount === 0\");\n return false;\n } else if (photoCount == 1) {\n columns = 1;\n } else if (photoCount == 2) {\n columns = 2;\n } else {\n columns = 3;\n }\n\n if (columns == 0) {\n return;\n }\n\n $.tdg.init({\n columns: columns,\n space: 10,\n delayTime: 500,\n //gridBackgroundColor: '#e1e1e1',\n //itemBackgroundColor: '#9fcd4c',\n itemBorderColor: '#eb5d36',\n itemBorderWidth: 3,\n itemBorderRadius: 5,\n onItemClick: openLargeImage\n });\n\n displayAllPhotos(photoCount);\n}", "function buildDynamicGallery(index) {\n\tdynamicGallery.push({\n\t\timage: gallery[index].image,\n\t\ttitle: gallery[index].title,\n\t\tdescription: gallery[index].description,\n\t\ttype: gallery[index].type,\n\t\tvsrc: gallery[index].vsrc\n\t});\n}// ~end Build Dynamic Gallery", "function addBootstrapPhotoGallery(images) {\n // TODO: MODULE_ADVENTURE_DETAILS\n // 1. Add the bootstrap carousel to show the Adventure images\n\n}", "function popGallery(numImgs) {\n for (var i = 1; i <= numImgs; i++) {\n $('#gallery').append(genImg(i));\n }\n}", "function populateMainPanel(content) {\n // clear main panel\n $(\"#main-panel\").empty();\n\n // iterate over search results\n $.each(content[\"results\"], function (key, value) {\n var film = content[\"results\"][key];\n var imagePath = \"http://via.placeholder.com/185x278?text=?\";\n if (film[\"poster_path\"] != null) {\n imagePath = \"https://image.tmdb.org/t/p/w185\" + film[\"poster_path\"];\n }\n var overviewTrimmed = film[\"overview\"];\n var filmID = film[\"id\"];\n\n var thumbRendered = Mustache.render(thumbTemplate, {title: film[\"title\"], overview: overviewTrimmed, film_image: imagePath, film_id: filmID});\n $(\"#main-panel\").append(thumbRendered);\n });\n\n $(\".thumbnail-container .hide-btn\").on(\"click\", function(e) {\n e.preventDefault();\n $(this).closest(\".thumbnail-container\").remove();\n });\n\n $(\".thumbnail-container .watched-btn\").on(\"click\", function(e) {\n e.preventDefault();\n addToWatchedList($(this).attr(\"data-film-id\"));\n });\n}", "function createGallery(gallery) {\n let order = gallery.order;\n let COUNT = 3;\n $('#title').append(gallery.title);\n $('#description').append(gallery.description);\n let content = \"\";\n for (var i = gallery.start; i <= gallery.end; i++) {\n if (order) {\n content += `<div class=\"col s12 m6 l4 center-align test\"><img class=\"thumbnail card hoverable responsive-img\" data-filename=\"${gallery.filename}\" data-index=\"${i}\" id=\"i${i}\" src=\"images/${gallery.filename}/${gallery.filename}-${i}.jpg\"></div>`;\n if (i % COUNT === 0 ) {\n $('#imagesOrder').append(`<div class=\"row imageRows\"> ${content} </div>`);\n content = \"\";\n disapearingImages(i);\n\n }\n } else {\n $('#imagesNoOrder').append(`<div class=\"card hoverable\"><div class=\"card-image\"><img class=\"thumbnail\" data-filename=\"${gallery.filename}\" data-index=\"${i}\" id=\"i${i}\" src=\"images/${gallery.filename}/${gallery.filename}-${i}.jpg\"></div></div>`);\n Materialize.fadeInImage(`#i${i}`);\n }\n }\n\n\n setTimeout(function() { Materialize.showStaggeredList('#menuList');}, 1000 );\n setTimeout(function(){$('.tap-target').tapTarget('open');}, 1000000) //timer for home screen for dialog.\n\n $('img').click(function(e) {\n let indexI = parseInt(e.target.getAttribute('data-index'));\n let filename = e.target.getAttribute('data-filename');\n let galleryS = JSON.parse(localStorage.getItem('g'));\n let gallery = findGallery(galleryS, filename);\n let final = generateSlides(gallery, indexI);\n var offset = $(this).offset();\n openGalleryFromPhoto(final.slides, {showHideOpacity: true, index: indexI - 1, getThumbBoundsFn: function(i) { \n var thumbnail = $('#i'+ (i + 1))[0], // find thumbnail\n pageYScroll = window.pageYOffset || document.documentElement.scrollTop,\n rect = thumbnail.getBoundingClientRect(); \n\n return {x:rect.left, y:rect.top + pageYScroll, w:rect.width};\n }});\n });\n\n if (window.innerWidth >= 600) {\n $('.imageRows').addClass('valign-wrapper');\n }\n }", "function createGallery() {\n var selectedImages = document.querySelectorAll('.selected'),\n photo,\n photoIndex,\n out = '';\n\n for(i = 0; i < selectedImages.length; i++) {\n photoIndex = selectedImages[i].dataset.photoIndex;\n photo = window.photos[photoIndex];\n out += '<h3>' + photo.title + '</h3>';\n out += '<a class=\"owner\" data-photo-index=' + i + ' href=\"https://www.flickr.com/people/' + photo.owner + '/\">';\n getUserInfo(photo.owner, i);\n out += '</a>';\n out += '<img data-photo-index=\"' + i + '\" src=\"https://farm' + photo.farm + '.staticflickr.com/' + photo.server +'/' + photo.id + '_' + photo.secret + '.jpg\"></img>';\n }\n document.getElementById(\"galleryarea\").innerHTML = out;\n}", "function createMovieList(fullInfo) {\n const galleryListMarkup = galleryElementTemplate(fullInfo);\n homeGalleryListRef.insertAdjacentHTML('afterbegin', galleryListMarkup);\n}", "function initGallery(){\n console.trace('initGallery');\n let divGallery = document.getElementById('gallery');\n for ( let i = 1; i <= 7 ; i++){\n divGallery.innerHTML += `<img onclick=\"selectAvatar(event)\" \n class=\"avatar\" \n data-path=\"avatar${i}.png\"\n src=\"img/avatar${i}.png\">`;\n }\n}", "function initGalleries() {\n for (let slideCounter = 0; slideCounter < galleries.length; slideCounter++) {\n let gallery = document.querySelector('#div' + slideCounter);\n\n // get the prev and next slide button elements of this gallery\n let nextSlide = gallery.querySelector('.next');\n let prevSlide = gallery.querySelector('.prev');\n\n nextSlide.addEventListener('click', event => {\n const grandMotherElId = event.target.parentElement.parentElement.id;\n const position = grandMotherElId.substring(3, grandMotherElId.length);\n\n slideIndex[position] += 1;\n showSlides(slideIndex[position], grandMotherElId);\n });\n\n prevSlide.addEventListener('click', event => {\n const grandMotherElId = event.target.parentElement.parentElement.id;\n const position = grandMotherElId.substring(3, grandMotherElId.length);\n\n slideIndex[position] -= 1;\n showSlides(slideIndex[position], grandMotherElId);\n });\n }\n showSlides();\n}", "function Gallery1() {\n return (\n <div>\n <div className='gallery-container'>\n <div className='gallery-wrapper'>\n <Gallery photos={photos} />\n </div>\n </div>\n </div>\n );\n}", "function populatePageSecondPart(tripId) {\n $.ajax({\n type: \"get\", url: \"/photos?tripId=\" + tripId,\n success: function (resultTwo) {\n for (var i = 0; i < resultTwo.length; i++) {\n $('<div class=\"col-md-4 photoImage\"> <img src=\"' + resultTwo[i]['photoLink'] + '\" alt=\"photo\" class=\"img-thumbnail\"> <h3>' + resultTwo[i]['title'] + '</h3></div>').insertAfter(\".googleMap\");\n }\n },\n\n error: function (error) {\n alert(\"The photos couldn't be loaded!\");\n }\n });\n }", "displayGallery() {\n\n // Remove previous gallery.\n const oldGallery = this.galleryContentEl.querySelector('.gallery__list');\n if (oldGallery) this.galleryContentEl.removeChild(oldGallery);\n\n // Get gallery images from Local Storage.\n const galleryImagesUrls = this.lStorage.get();\n\n // Loop through images json and return list of images.\n const imageHtmlListItems = galleryImagesUrls.reduce((prev, imageUrl, i) => {\n // Replace small image url with a url to larger image.\n const largeImageUrl = imageUrl.replace(/(_m\\.jpg$)/, '.jpg');\n return `${prev}<li><img src=${largeImageUrl} alt='flickr-img-${i}' /><div class='gallery__X'>X</div></li>`;\n }, '');\n\n // Insert images list into DOM wrapped in <ul>.\n const imageHtmlList = `<ul class='gallery__list'>${imageHtmlListItems}</ul>`;\n this.galleryContentEl.insertAdjacentHTML('beforeend', imageHtmlList);\n\n // Display only first image...\n const firstImageEl = this.galleryContentEl.querySelector('.gallery__list').firstChild;\n if (firstImageEl) {\n firstImageEl.classList.add('visible');\n }\n // ...or message to user if no images in gallery.\n else {\n const noImageMessage = '<div>No images in gallery! Try searching for some...</div>';\n this.galleryContentEl.querySelector('.gallery__list').innerHTML = noImageMessage;\n }\n\n // Add click event listeners to the 'remove' icon.\n Array.from(this.galleryContentEl.querySelectorAll('.gallery__X'))\n .forEach(removeButton =>\n removeButton.addEventListener('click', (e) => this.removeImageFromGallery(e))\n );\n\n // Show gallery and blur the search results.\n this.galleryEl.classList.add('visible');\n document.querySelector('.searchresults').classList.add('clipped');\n }", "function buildThumbGallery() { \n\tdynamicGallery = [];\n\n\t// Variable used to count every 4th .col div\n\tvar fourthDiv = 0;\n\n\t// Create empty variable for DOM HTML\n\tvar HTML = \"\";\n\n\t// target #gallery\n\tvar galleryContainer = document.getElementById(\"gallery\");\n\n\t// Loop through object and build HTML\n\tfor ( var i=0 ; i < gallery.length; i++ ) {\n\t\t// Call buildDynamicGallery\n\t\tbuildDynamicGallery(i);\n\n\t\t// Add one to fourthDiv\n\t\tfourthDiv++;\n\t\t\tif ( fourthDiv === 4 ){\n\t\t\t\tHTML += '<div class=\"col live zero-right\">';\n\t\t\t\t// reset fourthDiv to zero\n\t\t\t\tfourthDiv = 0;\n\t\t\t} else {\n\t\t\t\tHTML += '<div class=\"col live\">';\n\t\t\t}\n\t\t HTML += '<a href=\"images/photos/'+ gallery[i].image +'.jpg\"';\n\t\t HTML += 'data-index=\"'+ i +'\"';\n\t\t HTML += 'class=\"image-link '+ gallery[i].type +'\">';\n\t\t HTML += '<img src=\"images/thumbs/'+ gallery[i].image +'.jpg\"';\n\t\t HTML += 'alt=\"'+ gallery[i].description +'\"';\n\t\t HTML += 'title=\"'+ gallery[i].title +'\" class=\"image\" />';\n\t\t HTML += '<span class=\"caption-info\">';\n\t\t HTML += '<span class=\"caption-style\">'+gallery[i].title+'</span>';\n\t\t HTML += '<br />'+ gallery[i].description +'</span>';\n\t\t HTML += '</a></div>';\n\n\t}\n\n\tgalleryContainer.innerHTML = HTML;\n \n} // ~end buildThumbGallery", "function _initImageGallery() {\n //init bootstrap image gallery (if found)\n $(\".image-carousel\").each(function(idx, divGallery) {\n //for big galleries, defer the loading of thumbnails that can't be seen yet\n $(divGallery).find(\".thumbnailLink[data-src]\").each(function(idx, elem){\n elem.src = $(elem).data(\"src\");\n });\n })\n\n $(\".thumbnailLink\").click(function () {\n var $this = $(this);\n $(\"#bigImage\").attr('src', $this.data('url'));\n var rights = \"\";\n if ($this.data(\"access-rights\")) {\n rights = \"This file is <em>\" + $this.data(\"access-rights\") + \"</em>, but you have rights to see it\";\n }\n $(\"#confidentialLabel\").html(rights);\n $(\"#downloadText\").html($this.attr('alt'));\n $(\".thumbnail-border-selected\").removeClass(\"thumbnail-border-selected\");\n $this.parent().addClass(\"thumbnail-border-selected\");\n });\n }", "function buildGallery( config )\n {\n Logger.log(\"ImageGalleryAdView::buildGallery() - building Image Gallery container and data\");\n m_imageContainer = engine.createContainer();\n This.widget.getDisplayNode().addChild( m_imageContainer );\n\n for(var index in config.getItems())\n {\n var image = [];\n for( var srcIndex in config.getItems()[index].getSources() )\n {\n var src = config.getItems()[index].getSources()[srcIndex];\n\n if( src.getFormat() == m_constants.galleryImageFormat )\n image.push({\n width: src.getWidth(),\n url: src.getUrl(),\n fit: config.getItems()[index].getAutoFit()\n });\n }\n\n image.sort( function(a,b){ return b.width - a.width; } );\n\n m_galleryUrls.push( {\n url: image[m_galleryQuality] ? image[m_galleryQuality].url : image[0].url,\n fit: image[m_galleryQuality] ? image[m_galleryQuality].fit : image[0].fit\n } );\n }\n }", "function initGallery() {\n let divGallery = document.getElementById(\"gallery\");\n for (let i = 1; i <= 7; i++) {\n divGallery.innerHTML += `<img onclick=\"selectAvatar(event)\" \n class=\"avatar\" \n data-path=\"img/avatar${i}.png\"\n src=\"img/avatar${i}.png\">`;\n }\n}", "function LoadSliderImages(sublist) {\n\t\t\tvar numImages = sublist.find('.item > a > .src').length;\n\t\t\tsublist.find('.item > a > .src').each(function(i) {\n\t\t\t\tvar img = new Image();\n\t\t\t\tvar imgSrc = $(this).html();\n\t\t\t\tvar imgAlt = $(this).parent().find('.alt').html();\n\t\n\t\t\t\t$(this).parent().append(img);\n\t\t\t \n\t\t\t\t// wrap our new image in jQuery, then:\n\t\t\t\t$(img).load(function () {\n\t\t\t\t\tnumImages--;\n\t\t\t\t\tif (numImages == 0) {\n\t\t\t\t\t\tSetSublist(sublist);\n\t\t\t\t\t}\n\t\t\t\t\t/*\n\t\t\t\t\tif (i == sublist.find('.item > a > .src').size() - 1) {\n\t\t\t\t\t\tSetSublist(sublist);\n\t\t\t\t\t}\n\t\t\t\t\t*/\n\t\t\t\t})\n\t\t\t\t.error(function () {\n\t\t\t\t// notify the user that the image could not be loaded\n\t\t\t\t})\n\t\t\t\t.attr('src', imgSrc).attr('alt', imgAlt);\n\t\t\t});\n\t\t}", "function populateHiddenGem(data) {\n const dataPlacement = document.getElementsByClassName(\"hidden-menu\")[0];\n\n for (let i = 0; i < data.mains.length; i++) {\n const ul = document.createElement(\"ul\");\n const li = document.createElement(\"li\");\n ul.setAttribute(\"class\", \"extBrowse-ul\");\n li.setAttribute(\"class\", \"mainTitle\");\n dataPlacement.appendChild(ul);\n ul.appendChild(li);\n\n let titles;\n\n // console.log(data.mains[i].name, data.mains[i].nourl);\n\n if (data.mains[i].nourl == true) {\n titles = document.createElement('div');\n titles.textContent = data.mains[i].name;\n } else {\n titles = document.createElement('a');\n titles.href = data.mains[i].url;\n titles.textContent = data.mains[i].name;\n }\n\n li.appendChild(titles);\n\n for (let j = 0; j < data.mains[i].subs.length; j++) {\n const liSubs = document.createElement(\"li\");\n liSubs.setAttribute(\"class\", \"subTitle\");\n ul.appendChild(liSubs);\n let subs = document.createElement(\"a\");\n\n subs.href = data.mains[i].subs[j].url;\n subs.textContent = data.mains[i].subs[j].name;\n liSubs.appendChild(subs);\n }\n }\n}", "function setgalleries(data, status) {\n console.log(\"Status: \" + status);\n\n var $container = $(\"#crGallery\");\n $container.empty();\n\n if (status === \"success\") {\n console.log(data);\n\n for (i = 0; i < data.length; i++) {\n var displayData = \"<option value=\" + data[i].Id + \">\" + data[i].Name + \"</option>\";\n\n $container.append(displayData);\n }\n }\n else {\n var div = $(\"<div></div>\");\n var h1 = $(\"<h1>Greška prilikom preuzimanja Autora!</h1>\");\n div.append(h1);\n $container.append(div);\n }\n }", "function initFancyGallery()\n\t{\n\t\tvar $slides = $('.more-views__fancy-item');\n\t\t\n\t\tif ( $slides.length > 0 )\n\t\t{\n\t\t\t$slides.fancybox({\n\t\t\t\tkeyboard: true,\n\t\t\t\tloop: true,\n\t\t\t\tarrows: true,\n\t\t\t\tinfobar: true,\n\t\t\t\tsmallBtn: \"auto\",\n\t\t\t\ttoolbar: \"auto\",\n\t\t\t\tbaseClass: \"configurator-product__gallery-fancybox\",\n\t\t\t\ttitle: \"Gaming PC Konfigurator Intel (9. Gen.) (So. 1151)\"\n\t\t\t});\n\t\t}\n\t}", "function gallery(){\n\t\t$('.gallery-bnt-1').on('click', function(){\n\t\t\t$('.small-image').removeClass('hide-html');\n\t\t});\n\t\t$('.gallery-bnt-2').on('click', function(){\n\t\t\t$('.small-image').addClass('hide-html');\n\t\t\t$('.meat').removeClass('hide-html');\n\t\t});\n\t\t$('.gallery-bnt-3').on('click', function(){\n\t\t\t$('.small-image').addClass('hide-html');\n\t\t\t$('.fish').removeClass('hide-html');\n\t\t});\n\t\t$('.gallery-bnt-4').on('click', function(){\n\t\t\t$('.small-image').addClass('hide-html');\n\t\t\t$('.dessert').removeClass('hide-html');\n\t\t});\n\t\t$('.gallery-bnt-5').on('click', function(){\n\t\t\t$('.small-image').addClass('hide-html');\n\t\t\t$('.veg').removeClass('hide-html');\n\t\t});\n\t\t// ENLARGE AND TOGGLE EACH GALLERY IMAGE\n\t\t$('.inspect-image span').on('click', function(){\n\t\t\t$(this).parent().parent().prev().removeClass('hide-html');\n\t\t\t$(this).parent().parent().prev().prev().removeClass('hide-html');\n\t\t});\n\t\t$('.remove-image').on('click', function(){\n\t\t\t$(this).next().addClass('hide-html');\n\t\t\t$(this).addClass('hide-html');\n\t\t});\t\t\n\t}", "function save_photo_story() {\n var arr = document.getElementsByClassName(\"img_story\")\n gId('story_content').style.display = 'block';\n if (arr.length > 1) {\n // gallery will be created if many pictures are in the temporary panel.\n var gallery = document.createElement(\"div\");\n gallery.className = \"gallery_container\"\n for (var i = 0; i < arr.length; i++) {\n var imageInGallery = document.createElement(\"img\")\n imageInGallery.className = \"image_story gallery\";\n imageInGallery.src = arr[i].src;\n gallery.appendChild(imageInGallery)\n }\n appendBlock(gallery, \"img\");\n } else {\n //only one picture is in temporary panel.\n oneImage = document.createElement(\"img\")\n oneImage.className = \"image_story\"\n oneImage.src = arr[0].src\n appendBlock(oneImage, \"img\");\n }\n clear();\n}", "function listaGalleriesAux() {\n $(\".foto\").remove();\n $(\".marginBottom\").remove();\n $(\".buttonRemove\").remove();\n $('#muro').append(\"<div class=\\\"marginTop foto\\\">\");\n var j;\n for (j = 0; j < listaGalleria.length; j++) {\n var html = getHtmlListaGalerias(listaGalleria[j].id, listaGalleria[j].title, j);\n\n $('#muro').append(html);\n }\n $('#muro').append(\"</div>\");\n}", "function image_gallery() {\r\n $('.gallery-popup-btn').magnificPopup({\r\n type: 'image',\r\n gallery: {\r\n enabled: true\r\n }\r\n });\r\n }", "function Gallery()\n{\n\tvar Gallery = (function() {\n\t\n\t\t//--------------------------------------\n\t\t//+ PRIVATE CONSTANTS\n\t\t//--------------------------------------\n\t\t\n\t\t/**\n\t\t*\t@private\n\t\t*/\n\t\t\n\t\t//--------------------------------------\n\t\t//+ PRIVATE VARIABLES\n\t\t//--------------------------------------\n\t\t\n\t\t/**\n\t\t*\t@private\n\t\t*/\n\t\tvar _myVariable;\n\t\t/**\n\t\t*\t@private\n\t\t*/\n\t\tvar _setter;\n\n\t\tvar feed_circles;\t\t\n\t\tvar feed_photos;\t\n\t\tvar gallery_container;\n\t\tvar current_add_layout \t= 1;\n\t\tvar currentFilterType \t= \"all\";\n\t\tvar currentLayoutPath;\n\t\t\n\t\tvar PHOTO_LAYOUT_COLUMN_NUM\t\t= 4;\n\t\tvar CIRCLE_LAYOUT_COLUMN_NUM\t= 2;\n\t\tvar DEFAULT_GALLERY_HEIGHT\t\t= 1500;\n\n\t\tvar allPhotoData;\n\t\tvar morePhotoData;\n\t\t\n\n\t\tvar circleFeed;\n\t\tvar circleFriendFeed;\n\t\tvar photoFeed;\n\t\tvar instagramFeed;\n\t\tvar twitterFeed;\n\n\t\tvar getCircleNum = 4;\n\t\tvar getPhotoNum = 12;\n\n\t\tvar oneCircle = false;\n\t\tvar morePhotoCount = 0;\n\t\tvar onePage = false;\n\t\tvar circleEnd = false;\n\n\t\tvar circleNum;\n\t\tvar photoNum;\n\t\tvar twitterNum;\n\t\tvar instagramNum;\n\n\t\tvar uploadedPhotoCount;\n\n\t\tvar galleryHeight = 0;\n\t\tvar feedEnd = false;\n\n\t\tvar photoSum;\n\t\tvar PHOTO_TOTAL = 12;\n\t\tvar PHOTO_INITIAL_TOTAL = 8;\n\t\tvar PHOTO_MORE_TOTAL = 4;\n\t\tvar notEnoughPhoto = false;\n\t\tvar restNum = 0;\n\t\tvar subRestNum = 0;\n\t\tvar restCount = 0;\n\n\t\tvar restPhotoCount = 0;\n\t\tvar restPhotoArray = new Array();\n\n\t\tvar allCircleDataStorage = new Array();\n\t\tvar circleDataStorage = new Array();\n\t\tvar allFriendsCircleFeed = new Array();\n\t\tvar friendCircleCheckEnd = false;\n\t\t\n\n\n\n\t\t//--------------------------------------\n\t\t//+ PRIVATE & PROTECTED INSTANCE METHODS\n\t\t//--------------------------------------\n\n\t\tfunction enableLazyloader(){\n\t\t\t//if($(window).width() >= 980){\n\t\t\t\t$(window).unbind('scroll').bind('scroll', lazyloader);\n\t\t\t//}\n\t\t}\n\t\tfunction lazyloader(){\n\n\t\t\t//console.log($(window).scrollTop() + $(window).height(), getDocHeight())\n\n\t\t\tconsole.log(\"HERE????\", onePage)\n\n\t\t\t\tif(onePage){\n\t\t\t\t\t$('#donate_area').fadeIn();\n\t \t\t\t\t$('#donate_area').removeClass('footer_fixed').addClass('footer_relative');\n\t \t\t\t\treturn;\n\t\t\t\t}\n\n\n\t\t\t\tif($(window).scrollTop() + $(window).height() + 22 >= getDocHeight()) {\n\n\t\t\t\t\t//unlbind scroll event until all new content loaded to screen\n\n\t\t\t\t\t//load content\n\n\t\t\t\t\tconsole.log(\"reach bottom\")\n\n\t\t\t\t\t$(window).unbind('scroll');\n\n\t\t\t\t\tif($(window).width() >= 980 ) {\n\t\t\t\t\t\tloadNextPage();\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tenableLazyloader();\n\t\t\t\t\t\tif(!feedEnd){\n\t\t\t\t\t\t\t$('#donate_area').fadeIn();\n\t\t \t\t\t\t\t$('#donate_area').addClass('footer_fixed').removeClass('footer_relative');\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$('#donate_area').fadeOut();\n\t\t \t\t\t\t\t$('#donate_area').removeClass('footer_fixed').addClass('footer_relative');\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t \t\t}else if($(window).scrollTop() > SCROLL_TO_SHOW_FOOTER){\n\n\t\t \t\t\t$('#donate_area').fadeIn();\n\t\t \t\t\t$('#donate_area').addClass('footer_fixed').removeClass('footer_relative');\n\t\t \t\t\t\n\n\t\t \t\t}else if($(window).scrollTop() <= SCROLL_TO_SHOW_FOOTER){\n\t\t \t\t\t$('#donate_area').fadeOut();\n\t\t \t\t\t$('#donate_area').removeClass('footer_fixed').addClass('footer_relative');\n\n\t\t \t\t}\n\n\t\t};\n\n\t\tfunction loadNextPage(){\n\t\t\tisMoreFeed = true;\n\t\t\tif(!circleEnd) pageNum++;\n\n\t\t\tloadLayout();\n\t\t\n\t\t\tconsole.log(\"PAGE PLUS\", pageNum)\n\n\t\t}\n\n\t\tfunction loadLayout(){\n\n\n\t\t\tif(!isMoreFeed) $('.gallery_layout').remove();\n\n\t\t\tswitch(currentFilterType){\n\t\t\t\tcase 'all':\n\n\t\t\t\t\tif(!isMoreFeed) {\n\t\t\t\t\t\tgetAllFeed();\n\t\t\t\t\t\tmorePhotoCount = 0;\n\t\t\t\t\t\tallPhotoData = [];\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif(photoLoaded){\n\t\t\t\t\t\t\tgetMoreAllFeed();\n\t\t\t\t\t\t\tphotoLoaded = false;\n\t\t\t\t\t\t\tmorePhotoCount = 0;\n\t\t\t\t\t\t\tallPhotoData = [];\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tpageNum--;\n\t\t\t\t\t\t\thandleAllPhotoData(null);\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'circle':\n\t\t\t\t\tif(!isMoreFeed){\n\t\t\t\t\t\tcreateCircleLayout();\n\t\t\t\t\t\t$.feed.get(feedmagnet.circle_feed, parseCircleData, getCircleNum);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif(checkIfLoadMore(circleFeed, getCircleNum)) $.feed.more(feedmagnet.circle_feed, parseCircleData, getCircleNum);\n\t\t\t\t\t}\n\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'friend':\n\t\t\t\t\tconsole.log(\"friends click.\");\n\t\t\t\t\tif(!isLogin){\tfacebook.login(function(){\n\t\t\t\t\t\t\t\t\t\tif(!isMoreFeed){\t\n\t\t\t\t\t\t\t\t\t\t\tcreateCircleLayout();\n\t\t\t\t\t\t\t\t\t\t\t$.feed.get(feedmagnet.circle_feed, getFriendCircleData, ored.count);\n\t\t\t\t\t\t\t\t\t\t}else{\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tif(checkIfLoadMore(circleFriendFeed, getCircleNum)) $.feed.more(feedmagnet.circle_feed, getFriendCircleData, ored.count);\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} else{\n\t\t\t\t\t\tif(!isMoreFeed){\t\n\t\t\t\t\t\t\tcreateCircleLayout();\n\t\t\t\t\t\t\t$.feed.get(feedmagnet.circle_feed, getFriendCircleData, ored.count);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\tif(checkIfLoadMore(circleFriendFeed, getCircleNum)) $.feed.more(feedmagnet.circle_feed, getFriendCircleData, ored.count);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'photo':\n\t\t\t\t\t\n\t\t\t\t\tif(!isMoreFeed){\n\t\t\t\t\t\tcreatePhotoLayout();\n\t\t\t\t\t\t$.feed.get(feedmagnet.photo_feed, parsePhotoData, getPhotoNum);\n\t\t\t\t\t}else{\n\n\t\t\t\t\t\tif(checkIfLoadMore(photoFeed, getPhotoNum)) $.feed.more(feedmagnet.photo_feed, parsePhotoData, getPhotoNum);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'instagram':\n\t\t\t\t\tif(!isMoreFeed){\n\t\t\t\t\t\tcreatePhotoLayout();\n\t\t\t\t\t\t$.feed.get(feedmagnet.instagram_feed, parseInstagramData, getPhotoNum);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif(checkIfLoadMore(instagramFeed, getPhotoNum)) $.feed.more(feedmagnet.instagram_feed, parseInstagramData, getPhotoNum);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'twitter':\n\t\t\t\t\tif(!isMoreFeed){\n\t\t\t\t\t\tcreatePhotoLayout();\n\t\t\t\t\t\t$.feed.get(feedmagnet.twitter_feed, parseTwitterData, getPhotoNum);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif(checkIfLoadMore(twitterFeed, getPhotoNum)) $.feed.more(feedmagnet.twitter_feed, parseTwitterData, getPhotoNum);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\n\t\t//This event will fire after when layout changed. Save this for later use.\n\t\t//$container.masonry( 'on', 'layoutComplete', function( msnryInstance, laidOutItems ) { });\n\n\n\t\tfunction getMoreAllFeed(){\n\n\t\t\tmorePhotoData = new Array();\n\n\t\t\tswitch(current_add_layout){\n\t\t\t\tcase 1:\n\t\t\t\t\tcircleNum \t\t= 2;\n\t\t\t\t\tphotoNum \t\t= 1;\n\t\t\t\t\ttwitterNum \t\t= 2;\n\t\t\t\t\tinstagramNum \t= 1;\n\t\t\t\tbreak;\n\n\t\t\t\tcase 2:\n\t\t\t\t\tcircleNum \t\t= 1;\n\t\t\t\t\tphotoNum \t\t= 2;\n\t\t\t\t\ttwitterNum \t\t= 1;\n\t\t\t\t\tinstagramNum \t= 1;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t if(circleEnd) {\n\t\t\t \tcircleNum = 0;\n\t\t\t \tphotoNum \t\t= 4;\n\t\t\t \ttwitterNum \t\t= 4;\n\t\t\t \tinstagramNum \t= 4;\n\t\t\t \tphotoSum\t\t= PHOTO_TOTAL;\n\t\t\t }else{\n\t\t\t \tphotoSum\t\t= PHOTO_MORE_TOTAL;\n\t\t\t }\n\n\t\t\t\n\t\t\t$.feed.more(feedmagnet.circle_feed, parseAllCircleData, circleNum);\n\n\t\t}\n\n\t\t\t//oc: prep feedmagnet array for db req\n\t\t\t\t//1. parse feedmagnet array deleting cookie if it matches\n\t\t\t\t//2. insert circle id from cookie (if its there)\n\t\t\t\t//3. req db circles with new array of circle ids\n\t\tfunction parseAllCircleData($data){\n\n\t\t\tconsole.log(\"parseAllCircleData\");\n\n\t\t\tif($data.length == 0) {\n\t\t\t\tcircleEnd = true;\n\t\t\t\t//enableLazyloader();\n\t\t\t\t//return;\n\t\t\t\t\n\t\t\t}else if($data.length > 0 && $data.length < circleNum){\n\t\t\t\toneCircle = true;\n\t\t\t\t//console.debug(\"CIRCLE LEFT ONE\", $data.length);\n\t\t\t}\n\t\t\tvar data = ored.getIdsFromFeed($data, \"circles\");\n\n\t\t\tcreateAllLayout();\n\n\t\t\tif(!circleEnd){\n\t\t\t\t$('body').unbind('ALL_LAYOUT_SINGLE_CREATED').bind('ALL_LAYOUT_SINGLE_CREATED', function(){ \n\n\t\t\t\t$.ajax({\n\t\t\t \t\ttype: 'post',\n\t\t\t \turl: baseUrl + indexPage + 'circle/fetchAllCircles',\n\t\t\t \tdataType: 'json',\n\t\t\t \tdata: {\n\t\t\t \t\tfeedIdsJSON: JSON.stringify(data)\n\t\t\t \t},\n\t\t\t \tsuccess: onFetchAllCircles\n\t\t\t \t\t});\n\n\n\t\t\t\t});//end binding complete\n\t\t\t}\n\n\t\t};\n\t\t\n\t\tfunction onFetchAllCircles($circles){\n\t\t\tconsole.info(\"onFetchAllCircles\", $circles);\n\n\t\t\t$($circles).each(function(i,v){\n\t\t\t\tvar circleContainer = (isMoreFeed) ? $($($(\".page\"+pageNum).find('.gallery_circle')).get(i)) : $($('.gallery_circle').get(i));\n\t\t\t\tgalleryItem.populateCircleContent(circleContainer, v);\n\t \n\t if(i == $circles.length - 1 )\t{\n\t \t$('body').trigger('ALL_LAYOUT_CREATED');\n\t }\n\n\t allCircleDataStorage.push(v);\n\t \n\t\t\t});\n\n\t\t\tif(!isMoreFeed){\t\t\t\t\n\t\t\t\t$.feed.get(feedmagnet.photo_feed, onPhotoFeedLoadComplete, photoNum);\n\t\t $.feed.get(feedmagnet.instagram_feed, handleAllPhotoData, instagramNum);\n\t\t $.feed.get(feedmagnet.twitter_feed, handleAllPhotoData, twitterNum);\n\t\t\t}else{\n\t\t\t\t$.feed.more(feedmagnet.photo_feed, onPhotoFeedLoadComplete, photoNum);\n\t\t\t\t$.feed.more(feedmagnet.instagram_feed, handleAllPhotoData, instagramNum);\n\t\t\t\t$.feed.more(feedmagnet.twitter_feed, handleAllPhotoData, twitterNum);\n\t\t\t}\n\t\t};\n\n\n\t\tfunction getAllFeed(){\n\t\t\tconsole.log(\"getAllFeed\");\n\t\t\tallPhotoData = new Array();\n\t\t\tcircleNum \t\t= 3;\n\t\t\tphotoNum \t\t= 2;\n\t\t\ttwitterNum \t\t= 3;\n\t\t\tinstagramNum \t= 3;\n\t\t\tphotoSum = PHOTO_INITIAL_TOTAL;\n\t\t\t$.feed.get(feedmagnet.circle_feed, parseAllCircleData, 3);\n\t\t\t\n\t\t}\n\n\t\t\n\t\t\n/* oc: \nthis function handles the onComplete of the loading the list of cirle ID's from feedmagnet upon filter click\nthen requests a list of circles \nparse the circle data from feedmagnet and calls a route on our server to ccreates the markup from the list of \n*/\n\n\n\n\t\tfunction parseCircleData($data){\n\t\t\tconsole.log(\"parseCircleData\");\n\n\t\t\tcircleFeed = $data;\n\t\t\tif($data.length == 0){\n\t\t\t\tfeedEnd = true; \n\t\t\t\t$('#donate_area').fadeIn();\n\t \t\t\t$('#donate_area').removeClass('footer_fixed').addClass('footer_relative');\n\n\t\t\t\treturn;\n\t\t\t} \n\t\t\t\n\n\t\t\tif($data.length < getCircleNum) {\n\t\t\t\tonePage = true;\n\n\t\t\t}\n\n\t\t\tvar data = ored.getIdsFromFeed($data, \"circles\");\n\n\t\t\tconsole.log(\"CIRCLE ID\", JSON.stringify(data))\n\n\t\t\t$.ajax({\n\t\t \t\ttype: 'post',\n\t\t \turl: baseUrl + indexPage + 'circle/fetchAllCircles',\n\t\t \tdataType: 'json',\n\t\t \tdata: {\n\t\t \t\tfeedIdsJSON: JSON.stringify(data)\n\t\t \t},\n\t\t \tsuccess: onFetchCircles\n\t\t \t\t});\n\n\t\t};\n\n\t\tfunction onFetchCircles($circles){\n\n\t\t\t$($circles).each(function(i,v){\n\t\t\t\tcircleDataStorage.push(v);\n\n \t\t$.ajax({\n\t \t\ttype: 'get',\n\t \turl: baseUrl + indexPage + 'layout/loadLayoutCircle',\n\t \tdataType: 'html',\n\t \tsuccess: function (layoutData){\n\t \t\tvar circleDiv = $('<div>');\n\t \t\t\tcircleDiv.append(layoutData)\n\t \t\t\t .addClass('span6 circle_container gallery_item flex_margin_bottom gallery_circle');\n\n\t \t\tvar rowTarget = (i<2) ? 0 : 1;\n\t \t\tconsole.log(\"onLoadLayoutCircle:\",i, rowTarget);\n\t \t\t//$($($('.page' + pageNum).find('.row')).get(rowTarget)).append(circleDiv);\n\t \t\t$('.page1').append(circleDiv);\n\n\t \t\t$(circleDiv).css({'float':'left','clear':'none'})\n\t \t\t\t.hide()\n\t \t\t\t.fadeIn(200);\n\n\t \t\tvar contentData = {\n\t\t\t\t\t\t\tindex:i,\n\t\t\t\t\t\t\titem:$(circleDiv),\n\t\t\t\t\t\t\ttotalNum:$circles.length*pageNum,\n\t\t\t\t\t\t\tcolNum:CIRCLE_LAYOUT_COLUMN_NUM,\n\t\t\t\t\t\t\ttype:'circle'\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tgalleryItem.populateCircleContent($(circleDiv), v);\n\t\t\t\t\t\tif(contentData.index%2 == 0) updateGalleryHeight($(circleDiv).height()+50);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(i == $circles.length - 1) {\n\t\t\t\t\t\t\t$('body').trigger('ALL_LAYOUT_CREATED');\n\t\t\t\t\t\t\tenableLazyloader();\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 \t\t});\n\n\t \t\t});//end each\n\t\t};\n\n\n\t\tfunction handleAllPhotoData(data){\n\n\t\t\t//oc: combine all 3 feeds into 1\n\n\n\t\t\t\tif(data && data.length != 0) {\n\t\t\t\t\t$(data).each(function (i, v){\n\n\t\t\t\t\t\tconsole.debug( v.data.channel + ' - ' + v.data.text );\n\t\t\t\t\t\tallPhotoData.push(v);\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\tmorePhotoCount++;\n\n\t\t\t\t\t//oc: only call when we have all 3 feeds.\n\t\t\t\t\t if(morePhotoCount == 3){\n\t\t\t\t \t\n\t\t\t\t\t \tsortByTimestamp(allPhotoData);\n\n\t\t\t\t\t \tif(allPhotoData.length >= photoSum ){\n\t\t\t\t\t \t\tnotEnoughPhoto = false;\n\t\t\t \t\t\t\tored.masterFeed = allPhotoData;\n\t\t\t\t\t\t\tgalleryItem.parseAllPhotoData(allPhotoData, false, circleEnd);\n\t\t\t\t\t\t\tenableLazyloader();\n\t\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t else{\n\n\t\t\t\t\t\t \tnotEnoughPhoto = true;\n\t\t\t\t\t\t \tmorePhotoCount--;\n\n\t\t\t\t\t\t \trestNum = photoSum - allPhotoData.length;\n\n\t\t\t\t\t\t \t$.feed.more(feedmagnet.photo_feed, onPhotoFeedLoadComplete, photoNum);\n\n\t\t\t\t\t\t }\n\t\t\t\t\t }\t\n\t\t\t\n\t\t};\n\t\t\n\n\t\t//oc: this handles response from feedmagnet and retreives the data associated with each photo\n\t\t//\t\tprior to the parse of the combining of all 3 feeds, this way, there is no asynchronous lapse.\n\t\tfunction onPhotoFeedLoadComplete($data){\n\n\t\t\tif(notEnoughPhoto) {\n\n\t\t\t\t//lookForRestPhotos();\n\n\n\t\t\t\tconsole.info(\"NOT ENOUGH everything\", $data.length, restNum);\n\n\t\t\t\tif($data.length < restNum){\n\t\t\t\t\tsubRestNum = restNum - $data.length;\n\n\t\t\t\t\tconsole.info(\"NOT ENOUGH PHOTO, instagram help!!\", subRestNum);\n\t\t\t\t\t$.feed.more(feedmagnet.instagram_feed, function(inData){\n\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(inData.length < subRestNum ){\n\n\t\t\t\t\t\t\tconsole.info(\"not enough instagram, twitter help!!\", inData.length, subRestNum);\n\t\t\t\t\t\t\t var subSubRestNum = subRestNum - inData.length;\n\t\t\t\t\t\t\t $.feed.more(feedmagnet.twitter_feed, function(twitterData){\n\n\n\t\t\t\t\t\t\t \tif(twitterData.length < subSubRestNum ) {\n\n\t\t\t\t\t\t\t \t\tconsole.info(\"not enough twitter go back to photos\", twitterData.length, subSubRestNum);\n\t\t\t\t\t\t\t \t\tonePage = true;\n\t\t\t\t\t\t\t \t\tenableLazyloader();\n\t\t\t\t\t\t\t \t}else{\n\n\t\t\t\t\t\t\t \t\thandleAllPhotoData(twitterData);\n\t\t\t\t\t\t\t \t}\n\n\t\t\t\t\t\t\t }, subSubRestNum);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\thandleAllPhotoData(inData);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}, subRestNum);\n\t\t\t\t}else{\n\n\t\t\t\t\tconsole.info(\"HANDLE ALL PHOTO DATA\", $data.length, $data)\n\t\t\t\t\thandleAllPhotoData($data);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\t\n\t\t\t\tconsole.debug('Strait from FM :', $data);\n\t\t\t\tored.photoFeed \t= $data;\n\t\t\t\tconsole.debug('ored.photoFeed :', ored.photoFeed);\n\n\t\t\t\tvar data \t\t= ored.getIdsFromFeed($data, \"photo\");\n\t\t\t\tored.photoIds \t= ored.photoIds.concat(data);\n\t\t\t\tored.photoIds = data;\n\t\t\t\tif(!isMoreFeed && !circleEnd) ored.addCookiePhotosToFeed();\n\t\t\t\tloadPhotoData(data, onPhotoDataLoadComplete);\n\n\t\t\t}\n\n\n\t\t};\n\n\t\tfunction lookForRestPhotos(){\n\t\t\trestPhotoCount = 0;\n\t\t\t//$.feed.more(feedmagnet.photo_feed, checkRestPhotos, 1);\n\t\t\t\n\t\t}\n\n\n\t\tfunction loadPhotoData($data, $onComplete){\n\t\t\tconsole.debug(\"LOAD PHOTO DATA\", $data)\n\n\t\t\t\tif($data != ''){\n\t\t\t\t\t$.ajax({\n\t\t\t \t\ttype: 'post',\n\t\t\t \turl: baseUrl + indexPage + 'photo/fetchUploadedPhotoData',\n\t\t\t \tdataType: 'json',\n\t\t\t \tdata: {\n\t\t\t \t\tfeedIdsJSON: JSON.stringify($data)\n\t\t\t \t},\n\t\t\t \tsuccess: $onComplete,\n\t\t\t \terror:function(x,e,r){\n\t\t\t \t\t//console.debug(x,e,r);\n\t\t\t \t}\n\t\t\t });\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t//console.debug('error - no more data to load');\n\n\t\t\t\t\thandleAllPhotoData([]);\n\t\t\t\t}\n\t\t};\n\n\t\tfunction onPhotoDataLoadComplete(data){\n\n\t\t\tored.photoData = ored.photoData.concat(data); \n\n\n\n\t\t\thandleAllPhotoData( ored.photoFeed);\n\n\n\t\t};\n\n\t\t\n\n\t\tfunction sortByTimestamp(dataArray){\n\t\t\t//oc: sort by timestamp\n\t\t\t\tdataArray.sort(function compare(a,b) {\n\t\t\t\t\t if (a.data.timestamp > b.data.timestamp)\n\t\t\t\t\t return -1;\n\t\t\t\t\t if (a.data.timestamp < b.data.timestamp)\n\t\t\t\t\t return 1;\n\t\t\t\t\t return 0;\n\t\t\t\t});\n\t\t}\n\n\t\tfunction parsePhotoData($data){\n\t\t\t\n\t\t\t//console.log(\"parsePhotoData\");\n\t\t\t//console.log($data);\n\t\t\tfeed = $data;\n\t\t\t\n\t\t\tvar data \t\t= ored.getIdsFromFeed($data, \"photo\");\n\t\t\tphotoFeed = data;\n\n\t\t\tconsole.log(\"PARSE PHOTO DATA LENGHT\", data.length)\n\n\t\t\tif(data.length == 0) {\n\t\t\t\tfeedEnd = true;\n\t\t\t\t$('#donate_area').fadeIn();\n\t \t\t\t$('#donate_area').removeClass('footer_fixed').addClass('footer_relative');\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconsole.log(\"PARSE PHOTO is not zero\", data.length)\n\n\t\t\tif(data.length < 12) onePage = true;\n\n\n\t\t\tloadPhotoData(data, getPhotoData);\n\n\t\t};\n\n\t\tfunction getPhotoData($data){\n\n\t\t\t//console.debug(\"GET PHOTO DATA?\", $data.length)\n\n\t\t\t$($data).each(function(i,v){\n\t\t\t\t\n \t\tvar photoIcon = baseUrl + \"img/icons/bca.png\"; \n \tvar popupData = {\n\t\t\t\t\ttype:'photo', \n\t\t\t\t\tdata:{\n\t\t\t\t\t\t\tid: v.photo_id,\n\t\t\t\t\t\t\tsource:'bca',\n\t\t\t\t\t\t\tcontent: v.description,\n\t\t\t\t\t\t\tphoto_url:baseUrl + \"uploads/\" + v.filename\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\n\t\t\t\tvar html = \"<img class='full_photo' src='\" + baseUrl + \"uploads/\" + v.filename + \"'/><img class='photo_icon' src='\" + photoIcon + \"'/>\" + photoButtonHtml;\n\n\t\t\t\tvar contentData = {\n\t\t\t\t\tindex:uploadedPhotoCount,\n\t\t\t\t\titem:photoDiv(uploadedPhotoCount),\n\t\t\t\t\ttotalNum:$data.length*pageNum,\n\t\t\t\t\ttype:'photo',\n\t\t\t\t\tcontent:html,\n\t\t\t\t\tpopupData:popupData,\n\t\t\t\t\tcolNum:PHOTO_LAYOUT_COLUMN_NUM\n\t\t\t\t}\n\n\t\t\t\tpopulatePhotoContent(contentData);\n\t\t\t\tif(i == $data.length - 1) enableLazyloader();\n\n\n\n\t\t\t});\n\n\n\t\t\t$('body').trigger(\"ALL_LAYOUT_CREATED\");\n\t\t}\n\n\n\t\tfunction parseInstagramData(data){\n\n\t\t\tinstagramFeed = data;\n\t\t\tuploadedPhotoCount = 0;\n\n\t\t\tif(data.length == 0) {\n\t\t\t\tfeedEnd = true;\n\t\t\t\t$('#donate_area').fadeIn();\n\t \t\t\t$('#donate_area').removeClass('footer_fixed').addClass('footer_relative');\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t//createPhotoLayout();\n\n\t\t\tif(data.length < 12) onePage = true;\n\n\t\t\tvar feed;\n\n\t\t\t$(data).each(function(i, v){\n\t\t\t\tfeed = v.data;\n\t\t\t\tgetInstagramData(data, feed);\n\n\t\t\t\tif(i == data.length - 1) enableLazyloader();\n\n\t\t\t})\n\t\t}\n\n\t\tfunction getInstagramData(data, feed){\n\n\t\t\tif(feed.photos[0]){\n\n\t\t\tvar popupData = {\n\t\t\t\t\t\ttype:'photo', \n\t\t\t\t\t\tdata:{\n\t\t\t\t\t\t\tid: feed.token,\n\t\t\t\t\t\t\tsource:'instagram', \n\t\t\t\t\t\t\tauthor: feed.author.alias,\n\t\t\t\t\t\t\tcontent:feed.text,\n\t\t\t\t\t\t\tphoto_url:feed.photos[0].url\n\t\t\t\t\t\t}}\n\n\t\t\t\tvar photoIcon = baseUrl + \"img/icons/instagram.png\";\n\n\t\t\t\tvar html = \"<img class='full_photo' src='\" + feed.photos[0].url + \"'/><img class='photo_icon' src='\" + photoIcon + \"'/>\" + photoButtonHtml;\n\n\t\t\t\tuploadedPhotoCount++;\n\t\t\t\tvar contentData = {\n\t\t\t\t\tindex:uploadedPhotoCount,\n\t\t\t\t\titem:photoDiv(uploadedPhotoCount),\n\t\t\t\t\ttotalNum:data.length*pageNum,\n\t\t\t\t\ttype:'instagram',\n\t\t\t\t\tcontent:html,\n\t\t\t\t\tpopupData:popupData,\n\t\t\t\t\tcolNum:PHOTO_LAYOUT_COLUMN_NUM\n\t\t\t\t}\n\n\t\t\t\tpopulatePhotoContent(contentData);\n\t\t\t}\n\n\t\t\t\t\n\t\t}\n\n\t\tfunction parseTwitterData(data){\n\n\t\t\ttwitterFeed = data;\n\t\t\tuploadedPhotoCount = 0;\n\n\t\t\tif(data.length == 0) {\n\t\t\t\tfeedEnd = true;\n\t\t\t\t$('#donate_area').fadeIn();\n\t \t\t\t$('#donate_area').removeClass('footer_fixed').addClass('footer_relative');\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t//createPhotoLayout();\n\n\t\t\tif(data.length < 12) onePage = true;\n\n\n\t\t\tvar feed;\n\n\t\t\t$(data).each(function(i, v){\n\t\t\t\tfeed = data[i].data;\n\t\t\t\t\n\t\t\t\tgetTwitterData(data, feed);\n\n\t\t\t\tif(i == data.length - 1) enableLazyloader();\n\n\t\t\t})\n\n\t\t}\n\n\t\tfunction getTwitterData(data, feed){\n\n\t\t\tvar popupData = {\n\t\t\t\t\t\t\ttype:'twitter', \n\t\t\t\t\t\t\tdata:{\n\t\t\t\t\t\t\t\tauthor:feed.author.alias, \n\t\t\t\t\t\t\t\tcontent:feed.text,\n\t\t\t\t\t\t\t\tdatetime:tsToDate(feed.timestamp),\n\t\t\t\t\t\t\t\tavatar:feed.author.avatar\n\t\t\t\t\t\t\t}}\n\n\t\t\t\tvar photoIcon = baseUrl + \"img/icons/twitter-large.png\";\n\n\t\t\t\tvar html = \"<div class='twitter_avatar'><img src='\" + feed.author.avatar + \"'/></div>\"\n\t\t\t\t\thtml\t+= \"<div class='twitter_title'><div class='twitter_author'>\"+ feed.author.alias + \"</div>\"\n\t\t\t\t\thtml\t+= \"<div class='twitter_time'>\"+ tsToDate(feed.timestamp) + \"</div></div>\"\n\t\t\t\t\thtml\t+= \"<div class='twitter_text'>\"+ feed.text + \"</div>\"\n\t\t\t\t\thtml \t+= \"<img class='photo_icon' src='\" + photoIcon + \"'/>\" + photoButtonHtml;\n\t\t\t\tuploadedPhotoCount++;\n\t\t\t\tvar contentData = {\n\t\t\t\t\tindex:uploadedPhotoCount,\n\t\t\t\t\titem:photoDiv(uploadedPhotoCount),\n\t\t\t\t\ttotalNum:data.length*pageNum,\n\t\t\t\t\ttype:'twitter',\n\t\t\t\t\tcontent:html,\n\t\t\t\t\tpopupData:popupData,\n\t\t\t\t\tcolNum:PHOTO_LAYOUT_COLUMN_NUM\n\t\t\t\t}\n\n\t\t\t\tpopulatePhotoContent(contentData);\n\t\t\t\t\n\n\t\t\t\t//enableLazyloader();\n\t\t}\n\n\t\tfunction populatePhotoContent(contentData){\n\t\t\tif(contentData.type == \"twitter\")\n\t\t\t\tcontentData.item.css('background', '#2caae1');\n\n\t\t\tcontentData.item.html(contentData.content);\n\t\t\tcontentData.item.attr('type', contentData.type);\n\t\t\tcontentData.item.hide();\n\t\t\tcontentData.item.fadeIn(200);\n\n\t\t\tif(contentData.index%4 == 1) updateGalleryHeight(contentData.item.height()+50);\n\t\t\t\n\t\t\tgalleryItem.enableItemButton(contentData.item, contentData.popupData);\n\t\t\tsetTimeout(function(){\n\t\t\t\tgalleryItem.centerRollOverContent(.55);\n\t\t\t}, 200);\n\n\t\t\ttranslator.translateSingleItem(\"view\");\n\t\t}\n\n\t\t//Helpers\n\t\tfunction getDocHeight() {\n\t\t\tvar D = document;\n\t\t\treturn Math.max(\n\t\t\t\tMath.max(D.body.scrollHeight, D.documentElement.scrollHeight),\n\t\t\t\tMath.max(D.body.offsetHeight, D.documentElement.offsetHeight),\n\t\t\t\tMath.max(D.body.clientHeight, D.documentElement.clientHeight)\n\t\t\t);\n\t\t};\n\n\t\tfunction updateGalleryHeight(height){\n\n\t\t\tgalleryHeight += height;\n\n\t\t}\n\n\t\tfunction initFilterButtons(){\n\t\t\t$(\".pink_filter_btn\").each(function(index, value){\n\t\t\n\t\t\t\t$(value).unbind(\"click\").click(function(e){\n\t\t\t\t\tfilterButtonSelected($(value));\n\t\t\t\t});\n\t\t\t})\n\n\t\t\t$('#load_more_btn').unbind(\"click\").click(function(e){\n\t\t\t\tloadNextPage();\n\t\t\t});\n\t\t};\n\n\t\tfunction createCirclesFromORedCircles(){\n\t\t\t$data = ored.friendsCircles;\t\n\t\t};\n\n\t\tfunction filterButtonSelected(btn){\n\n\t\t\tmorePhotoCount = 0;\n\n\t\t\tisMoreFeed = false;\n\t\t\tfeedEnd = false;\n\t\t\tonePage = false;\n\t\t\toneCircle = false;\n\t\t\tcircleEnd = false;\n\t\t\tnotEnoughPhoto = false;\n\t\t\tfriendCircleCheckEnd = false;\n\t\t\trestNum = 0;\n\t\t\tsubRestNum = 0;\n\t\t\trestCount = 0;\n\t\t\tpageNum = 1;\n\t\t\tcurrent_add_layout = 1;\n\t\t\tallCircleDataStorage = new Array();\n\t\t circleDataStorage = new Array();\n\t\t allFriendsCircleFeed = new Array();\n\t\t\t$.feed.reset();\n\t\t\tcurrentFilterType = btn.attr('type');\n\t\t\tif(currentFilterType == \"all\") pageNum = 2;\n\n\t\t\tenableLazyloader();\n\t\t\t$('#donate_area').show();\n\t\t\t$('#donate_area').removeClass('footer_fixed').addClass('footer_relative');\n\n\t\t\tgalleryHeight = 0;\n\t\t\t\n\t\t\tloadLayout();\n\t\t}\n\n\t\t//oc: give feedmagnet response to php to fetch only friend circles\n\t\tfunction getFriendCircleData(data){\n\n\t\t\tif(data.length == 0) {\n\t\t\t\tfeedEnd = true;\n\t\t\t\t$('#donate_area').fadeIn();\n\t \t\t\t$('#donate_area').removeClass('footer_fixed').addClass('footer_relative');\n\t\t\t\treturn\n\t\t\t}\n\n\t\t \t//console.log(\"getFriendCircleData\");\n\t\t \tvar feedMagnetIds\t\t\t= ored.getIdsFromFeed(data, \"circles\");\n\t\t \t//console.log(feedMagnetIds);\n\t\t \t//only get friend's circles if necessary.\n\n\n\t\t \tif(feedMagnetIds.length > 0){\n\t\t \t\t\n\t\t\t \tored.postVars.friendIdsJSON\t= JSON.stringify(ored.getIdsFromFriends(friendProfileList));\n\t\t\t \tored.postVars.feedIdsJSON\t= JSON.stringify(feedMagnetIds);\n\n\t\t\t \tif(feedMagnetIds.length < 50) {\n\t\t\t \t\tfriendCircleCheckEnd = true;\n\t\t\t \t\t$('#friends_circle_loader').hide();\n\t\t\t \t}else{\n\t\t\t \t\t$('#friends_circle_loader').show();\n\t\t\t \t}\n\n\n\t\t\t \tconsole.info(\"circle length\", feedMagnetIds.length, friendCircleCheckEnd);\n\t\t\t \tconsole.info(\"FRIEND CIRCLE ID\", ored.postVars.feedIdsJSON);\n\n\t\t\t \t$.ajax({\n\t \t\ttype: 'post',\n\t \turl: baseUrl + indexPage + 'circle/fetchFriendCircleData',\n\t \tdataType: 'json',\n\t \tdata: ored.postVars,\n\t \tsuccess: onFetchFriendCircleData\n\t\t\t\t});\n\t\t \t}else{\n\t\t \t\tenableLazyloader();\n\t\t \t}\n\n\t\t};//end getFriendCircleData\n\n\t\tfunction onFetchFriendCircleData($data){\n\t\t\t//console.log(\"onFetchFriendCircleData\");\n\n\t\t\t\t\t//createCircleLayout();\n\t\t\t\t\tif($data.length > 0) {\n\n\t\t\t\t\t\t$($data).each(function(i,v){\n\t\t\t\t\t\t\tallFriendsCircleFeed.push(v);\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\n\n\t\t\t\t\tif(!friendCircleCheckEnd) {\n\t\t\t\t\t\t$.feed.more(feedmagnet.circle_feed, getFriendCircleData, ored.count);\n\t\t\t\t\t}else{\n\n\t\t\t\t\t\tif(allFriendsCircleFeed.length < getCircleNum) onePage = true;\n\t\t\t\t\t\n\t\t\t\t\t\tcircleFriendFeed \t\t= allFriendsCircleFeed;\n\n\t\t\t\t\t\tvar containerCount \t\t= 0;\n\t\t\t\t\t\t//var circleFeedDataArray = new Array();\n\n\t\t\t\t\t\tconsole.info(\"friend circle data\", circleFriendFeed)\n\n\t\t\t\t\t \t$(circleFriendFeed).each(function(i, v){\t\n\t\t\t\t\t\t \t\n\t\t\t\t\t \t \tvar feed \t\t\t\t= $data[i];\n\t\t\t \t\t//circleFeedDataArray.push(feed);\n\n\t\t\t \t\t$.ajax({\n\t\t\t\t \t\ttype: 'get',\n\t\t\t\t \turl: baseUrl + 'layout/loadLayoutCircle',\n\t\t\t\t \tdataType: 'html',\n\t\t\t\t \t\n\t\t\t\t \tsuccess: function(layoutData) { \n\t\t\t\t \t\t\n\t\t\t\t \t\tvar circleDiv = $('<div>');\n\t\t\t\t \t\t\tcircleDiv.append(layoutData)\n\t\t\t\t \t\t\t .addClass('span6 circle_container gallery_item flex_margin_bottom gallery_circle');\n\t\t\t\t \t\t//var rowTarget = (containerCount<2) ? 0 : 1;\n\t\t\t\t\t\t\t \t\t$('.page1').append(circleDiv);\n\t\t\t\t \t\t$(circleDiv).css('float','left');\n\t\t\t\t \t\t$(circleDiv).css('clear','none');\n\t\t\t\t \t\t$(circleDiv).hide();\n\t\t\t\t \t\t$(circleDiv).fadeIn(200);\n\n\t\t\t\t \t\tcontainerCount++;\n\n\t\t\t\t \t\tvar contentData = {\n\t\t\t\t\t\t\t\t\t\tindex:containerCount,\n\t\t\t\t\t\t\t\t\t\titem:$(circleDiv),\n\t\t\t\t\t\t\t\t\t\ttotalNum: $data.length*pageNum,\n\t\t\t\t\t\t\t\t\t\tcolNum:CIRCLE_LAYOUT_COLUMN_NUM,\n\t\t\t\t\t\t\t\t\t\ttype:'circle'\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tgalleryItem.populateCircleContent($(circleDiv), v);\n\n\t\t\t\t\t\t\t\t\tif(contentData.index%2 == 0) updateGalleryHeight($(circleDiv).height()+50);\n\n\t\t\t\t\t\t\t\t\t//if(i == $data.length - 1) enableLazyloader();\n\n\t\t\t\t \t}\n\t\t\t \t});\n\t\t\t\t\t });\n\t\t\t\t\t} \t\n\t\t};\n\n\n\t\tfunction checkIfLoadMore(feed, getNum){\n\t\t\tvar isMore;\n\n\t\t\tif(feed.length < getNum){\n\t\t\t\tisMore = false;\n\t\t\t\tenableLazyloader();\n\t\t\t}else{\n\t\t\t\tisMore = true;\n\t\t\t}\n\n\t\t\treturn isMore;\n\t\t};\n\t\t\n\n\t\tfunction createAllLayout(data){\n\t\t\t//console.log('createAllLayout');\n\t\t\tif(!circleEnd){\n\t\t\t\t// if(oneCircle){\n\n\t\t\t\t// \t$.ajax({\n\t\t\t // \t\ttype: 'get',\n\t\t\t // \turl: baseUrl + 'layout/loadLayout3',\n\t\t\t // \tdataType: 'html',\n\t\t\t \t\n\t\t\t // \tsuccess: function(layout3data) { \n\t\t\t // \t\tcurrent_add_layout = 2;\n\t\t\t\t// \tvar layout3 = $('<div>'); \n\t\t\t\t// \tlayout3.addClass('layout3 gallery_layout row')\n\t\t // \t\t\t\t.html(layout3data); \n\n\t\t // \t\t\t$(layout3).appendTo(gallery_container);\n\n\t\t\t\t// \t\t\t\t$(layout3).addClass('page'+pageNum);\n\t\t\t\t// \t\t\t\tgalleryItem.centerRollOverContent(.55);\n\n\t \t// \t\t \t\t\t\tif(isMoreFeed) enableLazyloader();\n\t \t// \t\t \t\t\t\t$('body').trigger('ALL_LAYOUT_SINGLE_CREATED');\n\n\n\t\t\t // \t}\n\t\t\t // \t\t});\n\n\t\t\t\t// }else{\n\n\t\t\t\t\t$.ajax({\n\t \t\ttype: 'get',\n\t \turl: baseUrl + indexPage + 'layout/loadLayout' + current_add_layout,\n\t \tdataType: 'html',\n\t \t\n\t \tsuccess: function(layout1data) { \n\n\t \t\tvar layout1 = $('<div>');\n\n\t \t\tlayout1.addClass('gallery_layout row')\n\n\t \t\t\t\t.html(layout1data); \n\n\t \t\t$(layout1).appendTo(gallery_container);\n\n\t \t\t\n\t\t\t\t\t\tif(isMoreFeed){\n\t\t\t\t\t\t\t$(layout1).addClass('layout' + current_add_layout)\n\t\t\t\t\t\t\tcurrent_add_layout = (current_add_layout == 1) ? 2 : 1;\n\t\t\t\t\t\t\t$(layout1).addClass('page'+pageNum);\n\t\t\t\t\t\t\tenableLazyloader();\n\t\t\t\t\t\t\t$('body').trigger('ALL_LAYOUT_SINGLE_CREATED');\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$(layout1).addClass('layout1 page1');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$.ajax({\n\t\t\t \t\ttype: 'get',\n\t\t\t \turl: baseUrl + 'layout/loadLayout2',\n\t\t\t \tdataType: 'html',\n\t\t\t \t\n\t\t\t \tsuccess: function(layout2data) { \n\t\t\t\t \tvar layout2 = $('<div>'); \n\t\t\t\t \tlayout2.addClass('gallery_layout row layout2')\n\t\t \t\t\t\t.html(layout2data); \n\n\t\t \t\t\t$(layout2).appendTo(gallery_container);\n\n\t\t\t\t\t\t\t\t$(layout2).addClass('page2');\n\t\t\t\t\t\t\t\tgalleryItem.centerRollOverContent(.55);\n\n\t \t\t\t \t\t\t\tif(isMoreFeed) enableLazyloader();\n\t \t\t\t \t\t\t\t$('body').trigger('ALL_LAYOUT_SINGLE_CREATED');\n\n\t\t\t \t}\n\t\t\t \t\t});\n\t \t}\n\t \t\t});\n\n\t\t\t\t//}\n\n\t\t\t}else{\n\n\t\t\t\tcreatePhotoLayout();\n\t\t\t\tallPhotoData = new Array();\n\t\t\t\tmorePhotoCount = 0;\n\t\t\t\tphotoSum = PHOTO_TOTAL;\n\t\t\t\tvar eachPart = photoSum/3;\n\n\t\t\t\t$.feed.more(feedmagnet.photo_feed, onPhotoFeedLoadComplete, eachPart);\n\t\t\t\t$.feed.more(feedmagnet.instagram_feed, handleAllPhotoData, eachPart);\n\t\t\t\t$.feed.more(feedmagnet.twitter_feed, handleAllPhotoData, eachPart);\n\t\t\t}\n\n\t\t}\n\n\n\t\tfunction createCircleLayout(){\n\t\t\tvar circleLayout = $('<div>');\n\t\t\tcircleLayout.addClass('layout_circle gallery_layout page' + pageNum)\n\t\t\t\t\t\t.appendTo(gallery_container);\n\n\t\t};\n\n\t\tfunction photoDiv(index){\n\n\t\t\tvar div;\n\n\t\t\tif(currentFilterType == \"all\") {\n\t\t\t\t\n\t\t\t\tif(!circleEnd){\n\t\t\t\t\tdiv = $($('.photo_container').get(index));\n\t\t\t\t}else{\n\t\t\t\t\tdiv = $('<div>');\n\t\t\t\t\tdiv.addClass('span3 photo_container gallery_item flex_margin_bottom');\n\t\t\t\t\tdiv.appendTo('.page' + pageNum);\n\n\t\t\t\t\tdiv.hide();\n\t\t\t\t\tdiv.fadeIn(200);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tdiv = $('<div>');\n\t\t\t\tdiv.addClass('span3 photo_container gallery_item flex_margin_bottom');\n\t\t\t\tdiv.appendTo('.page1');\n\n\t\t\t\tdiv.hide();\n\t\t\t\tdiv.fadeIn(200);\n\t\t\t}\n\n\t\t\treturn div;\n\t\t\t\n\t\t};\n\n\t\tfunction createPhotoLayout(){\n\t\t\t//console.log('createPhotoLayout');\n\n\t\t\tif(restCount >= 1) return;\n\n\t\t\tvar photoLayout = $('<div>');\n\t\t\tphotoLayout.addClass('layout_photo gallery_layout page' + pageNum)\n\t\t\t\t\t\t.appendTo(gallery_container);\n\n\t\t\tif(circleEnd) restCount++;\n\n\t\t}\n\n\n\n\t\t\n\t\treturn {\n\t\t\t\n\t\t//--------------------------------------\n\t\t//+ PUBLIC CONSTANTS\n\t\t//--------------------------------------\n\t\t\t\n\t\t/**\n\t\t*\t@private\n\t\t*/\t\n\n\t\t//--------------------------------------\n\t\t//+ GETTER/SETTERS\n\t\t//--------------------------------------\n\t\t\n\n\t\t//--------------------------------------\n\t\t//+ PUBLIC METHODS\n\t\t//--------------------------------------\n\t\t\n\t\t/**\n\t\t*\t@private\n\t\t*/\n\t\t\n\t\tloadGallery: function(){\n\t\t\t$(window).scrollTop(0);\n\n\t\t\tgallery_container = $('#feed_magnet');\n\n\t\t\t//enableLazyloader();\n\t\t\t gallery_container.masonry();\n\n\t\t\t galleryItem.centerRollOverContent();\n\t\t\t $('.gallery_item').hide();\n\n\t\t\t initFilterButtons();\n\t\t\t loadLayout();\n\n\t\t\tif(currentFilterType == \"all\") {\n\t\t\t\tpageNum = 2;\n\t\t\t\t// $('#gallery').height(DEFAULT_GALLERY_HEIGHT);\n\t\t\t}\n\n\t\t\t$(window).resize(function(e){\n\t\t\t\tgalleryItem.centerRollOverContent();\n\t\t\t})\t\n\n\t\t\tif($(window).width() >= 980 )\n\t \t\t\t\t$('#donate_area').show();\n\t \t\t\telse\n\t \t\t\t\t$('#donate_area').hide();\n\n\t\t},\n\n\t\trefreshAsFakeCircleData: function(data, isUpdateFriend){\t\n\t\t\tvar fakeDiv = $('.gallery_circle').get(0);\n\t\t\tgalleryItem.populateCircleContent($(fakeDiv), data);\n\n\t\t},\n\n\t\trefreshAsFakePhotoData: function(data){\t\n//console.log(\"refreshAsFakePhotoData\");\n\t\t\tvar divPos = (currentFilterType == \"all\") ? 2 : 0;\n\t\t\tvar fakeDiv = $('.photo_container').get(divPos);\n\t\t\t\n\t\t\t$(fakeDiv).css('background-color', '#333')\n\n\t\t\tvar photoIcon = baseUrl + \"img/icons/bca.png\"; \n\n \tvar popupData = {\n\t\t\t\t\ttype:'photo', \n\t\t\t\t\tdata:{\n\t\t\t\t\t\tid: data.id,\n\t\t\t\t\t\tsource:'bca',\n\t\t\t\t\t\tcontent:data.description,\n\t\t\t\t\t\tphoto_url:baseUrl + \"uploads/\" + data.file_name\n\t\t\t\t\t}}\n \tvar html = \"<img class='full_photo' src='\" + baseUrl + \"uploads/\" + data.file_name + \"'/><img class='photo_icon' src='\" + photoIcon + \"'/>\" + photoButtonHtml;\n\n\t\t\tvar contentData = {\n\t\t\t\tindex:0,\n\t\t\t\titem:$(fakeDiv),\n\t\t\t\ttotalNum:0,\n\t\t\t\ttype:'photo',\n\t\t\t\tcontent:html,\n\t\t\t\tpopupData:popupData,\n\t\t\t\tcolNum:0\n\t\t\t}\n\n\t\t\tpopulatePhotoContent(contentData);\n\n\t\t},\n\n\t\tenableLazyloader: function(){\n\t\t\tenableLazyloader();\n\t\t},\n\n\t\tdisableLazyloader: function(){\n\t\t\t$(window).unbind('scroll');\n\t\t},\t\t\n\n\t\tshowFriendCircles: function(){\n\t\t\tif(currentFilterType == \"friend\") filterButtonSelected($('#filter_friends_btn'));\n\t\t},\n\n\t\tshowAllCircles: function(){\n\t\t\tif(currentFilterType == \"friend\") filterButtonSelected($('#filter_all_btn'));\n\t\t},\n\n\t\trefreshCircles: function(){\n\n\n\t\t\tif(currentFilterType == \"all\"){\n\t\t\t\t$(\".gallery_circle\").each(function(i,v){\n\t\t\t\t\tif(allCircleDataStorage[i]) galleryItem.populateCircleContent($(v), allCircleDataStorage[i]);\n\t\t\t\t});\n\t\t\t}else if(currentFilterType == \"circle\"){\n\t\t\t\t$(\".gallery_circle\").each(function(i,v){\n\t\t\t\t\tif(circleDataStorage[i]) galleryItem.populateCircleContent($(v), circleDataStorage[i]);\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\n\n\n\t\t/**\n\t\t*\t@private\n\t\t*/\n\t publicMethod: function() {\n \t\t\n \t},\n\n\t\tinit: function() {\n\t\t\treturn this;\n\t\t},\n\t\t\n\n\t\t\n\t\t// kill trailing commas\n\t\tEOF:null\n\t};\n\t\n\t// initialize \n\t})().init();\n\t\n\treturn Gallery;\n}", "function createMediaPage() {\n //console.log(\"$$$$ in the createMediaPage\")\n empty(filterContainer)\n empty(thumbnailContainer)\n empty(editRow1)\n\n if (getMenu) {\n buildMenuElements(mediaType)\n buildAlbumMenuElements(mediaType)\n }\n buildFilterElements(mediaType)\n\n if (editMode) {\n // Create Row and columns\n editRow1.classList.add('row')\n\n // Col 1\n let editRow1Col1 = document.createElement(\"div\")\n editRow1Col1.classList.add('col-sm-5','col-md-6')\n\n editRow1Col1.appendChild(thumbnailContainer);\n editRow1.appendChild(editRow1Col1)\n\n // Col 2\n let editRow1Col2 = document.createElement(\"div\")\n editRow1Col2.classList.add('col-sm-4','col-md-4')\n\n // GetNEW\n let getNewButton = document.createElement(\"button\")\n getNewButton.classList.add('btn','btn-success','btn-sm','float-start','shadow-none','me-2','my-2')\n getNewButton.setAttribute('type',\"button\")\n getNewButton.setAttribute('role',\"button\")\n getNewButton.textContent = \"Get NEW\"\n editRow1Col2.appendChild(getNewButton)\n getNewButton.addEventListener(\"click\", function () {\n let paramData = {\n MediaFilterMediaType: mediaType, \n getNew: true}\n queryMediaInfo(paramData);\n });\n\n // SelectALL\n let selectAllButton = document.createElement(\"button\")\n selectAllButton.classList.add('btn','btn-primary','btn-sm','float-start','shadow-none','me-2','my-2')\n selectAllButton.setAttribute('type',\"button\")\n selectAllButton.setAttribute('role',\"button\")\n selectAllButton.textContent = \"Select ALL\"\n editRow1Col2.appendChild(selectAllButton)\n selectAllButton.addEventListener(\"click\", function () {\n currIndex = 0\n if (currSelectAll == true) {\n currSelectAll = false\n } else {\n currSelectAll = true\n }\n // Loop through the current file list and set all to Selected\n for (let index in mediaInfo.fileList) {\n mediaInfo.fileList[index].Selected = currSelectAll\n } \n //displayFileDetail(currIndex) <<<<< can't select the 1st one because that will turn off the selected for all the rest\n displayCurrFileList()\n });\n\n // Prev\n let detailPrevButton = document.createElement(\"button\")\n //detailPrevButton.id = \"MediaAdminSelectAllButton\"\n detailPrevButton.classList.add('btn','btn-warning','btn-sm','float-start','shadow-none','me-2','my-2')\n detailPrevButton.setAttribute('type',\"button\")\n detailPrevButton.setAttribute('role',\"button\")\n detailPrevButton.textContent = \"Prev\"\n editRow1Col2.appendChild(detailPrevButton)\n detailPrevButton.addEventListener(\"click\", function () {\n if (currIndex > 0) {\n currIndex -= 1\n displayFileDetail(currIndex)\n } \n });\n\n // Next\n let detailNextButton = document.createElement(\"button\")\n //detailNextButton.id = \"MediaAdminGetNewButton\"\n detailNextButton.classList.add('btn','btn-info','btn-sm','float-start','shadow-none','me-2','my-2')\n detailNextButton.setAttribute('type',\"button\")\n detailNextButton.setAttribute('role',\"button\")\n detailNextButton.textContent = \"Next\"\n editRow1Col2.appendChild(detailNextButton)\n detailNextButton.addEventListener(\"click\", function () {\n if (currIndex < mediaInfo.fileList.length-1) {\n currIndex += 1\n displayFileDetail(currIndex)\n } \n });\n\n // *** Detail TAGS ***\n mediaDetailFilename = document.createElement(\"div\")\n editRow1Col2.appendChild(mediaDetailFilename)\n \n mediaDetailTitle = document.createElement(\"input\")\n mediaDetailTitle.classList.add('form-control','py-1','mb-1','shadow-none')\n mediaDetailTitle.setAttribute('type', \"text\")\n mediaDetailTitle.setAttribute('placeholder', \"Title\")\n editRow1Col2.appendChild(mediaDetailTitle)\n \n mediaDetailTaken = document.createElement(\"input\")\n mediaDetailTaken.classList.add('form-control','py-1','mb-1','shadow-none')\n mediaDetailTaken.setAttribute('type', \"text\")\n mediaDetailTaken.setAttribute('placeholder', \"Taken DateTime\")\n editRow1Col2.appendChild(mediaDetailTaken)\n \n mediaDetailImg = document.createElement(\"img\")\n mediaDetailImg.classList.add('img-fluid','rounded','mx-auto','d-block')\n //mediaDetailImg.setAttribute('onerror', \"this.onerror=null; this.remove()\")\n mediaDetailImg.setAttribute('onerror', \"this.onerror=null;this.src='https://upload.wikimedia.org/wikipedia/commons/1/14/No_Image_Available.jpg';\")\n editRow1Col2.appendChild(mediaDetailImg)\n\n editRow1.appendChild(editRow1Col2)\n\n // Col 3\n let editRow1Col3 = document.createElement(\"div\")\n editRow1Col3.classList.add('col-sm-3','col-md-2')\n // Category\n mediaCategorySelect = document.createElement(\"select\")\n mediaCategorySelect.classList.add('form-select','float-start','shadow-none','mt-2','py-1')\n for (let index in categoryList) {\n if (index == 1) {\n mediaCategorySelect.options[mediaCategorySelect.options.length] = new Option(categoryList[index], categoryList[index], true, true)\n } else {\n mediaCategorySelect.options[mediaCategorySelect.options.length] = new Option(categoryList[index], categoryList[index])\n }\n }\n editRow1Col3.appendChild(mediaCategorySelect);\n\n mediaMenuSelect = document.createElement(\"select\")\n mediaMenuSelect.classList.add('form-select','float-start','shadow-none','mt-2','py-1')\n for (let index in menuFilter) {\n let tempPos = menuFilter[index].indexOf(' - ')\n mediaMenuSelect.options[mediaMenuSelect.options.length] = new Option(menuFilter[index], menuFilter[index].substring(tempPos+3))\n }\n editRow1Col3.appendChild(mediaMenuSelect);\n\n //-------------------------------------------------------------------------------------------------------------\n // *** People list ***\n //-------------------------------------------------------------------------------------------------------------\n mediaPeopleSelect = document.createElement(\"select\")\n mediaPeopleSelect.classList.add('form-select','float-start','shadow-none','py-1')\n for (let index in peopleList) {\n mediaPeopleSelect.options[mediaPeopleSelect.options.length] = new Option(peopleList[index], index)\n }\n\n mediaPeopleInput = document.createElement(\"input\")\n mediaPeopleInput.classList.add('form-control','shadow-none','mt-2','py-1')\n mediaPeopleInput.setAttribute('type',\"text\")\n mediaPeopleInput.setAttribute('placeholder',\"People filter\")\n editRow1Col3.appendChild(mediaPeopleInput);\n // Filter the people list from entered value (checked after every key is typed)\n\n mediaPeopleInput.addEventListener(\"keyup\", function(event) {\n //console.log(\"mediaPeopleInput.value = \"+mediaPeopleInput.value);\n let peopleInputVal = \"\"\n if (mediaPeopleInput.value != null) {\n peopleInputVal = mediaPeopleInput.value\n }\n\n // Remove all options\n for (let i = (mediaPeopleSelect.options.length-1); i > -1; i--) {\n mediaPeopleSelect.options.remove(i)\n }\n\n //let searchEx = new RegExp(`//${mediaPeopleInput.value}//i`);\n //string pattern = @\"\\b[M]\\w+\";\n\n //let searchStr = '/'+mediaPeopleInput.value+'/i'\n //let re = new RegExp(`\\b${mediaPeopleInput.value}\\b`, 'i');\n //let re = new RegExp(`\\badam\\b`, 'i');\n\n // Add the ones that match the input value\n for (let index in peopleList) {\n //if (peopleList[index].search(searchEx) >= 0) {\n //if (peopleList[index].search(/adam/i) >= 0) {\n //if (peopleList[index].search(re) >= 0) {\n if (peopleInputVal != \"\") {\n if (peopleList[index].indexOf(peopleInputVal) >= 0) {\n mediaPeopleSelect.options[mediaPeopleSelect.options.length] = new Option(peopleList[index], index)\n }\n } else {\n mediaPeopleSelect.options[mediaPeopleSelect.options.length] = new Option(peopleList[index], index)\n }\n }\n });\n\n editRow1Col3.appendChild(mediaPeopleSelect);\n\n mediaPeopleList = document.createElement(\"input\")\n mediaPeopleList.classList.add('form-control','shadow-none','py-1')\n mediaPeopleList.setAttribute('type',\"text\")\n mediaPeopleList.setAttribute('placeholder',\"People list\")\n\n let replacePeopleButton = document.createElement(\"button\")\n replacePeopleButton.classList.add('btn','btn-primary','btn-sm','float-start','shadow-none','me-2','my-1')\n replacePeopleButton.setAttribute('type',\"button\")\n replacePeopleButton.setAttribute('role',\"button\")\n replacePeopleButton.textContent = \"Replace\"\n editRow1Col3.appendChild(replacePeopleButton)\n replacePeopleButton.addEventListener(\"click\", function () {\n mediaPeopleList.value = peopleList[mediaPeopleSelect.value]\n });\n\n let appendPeopleButton = document.createElement(\"button\")\n appendPeopleButton.classList.add('btn','btn-warning','btn-sm','float-start','shadow-none','me-2','my-1')\n appendPeopleButton.setAttribute('type',\"button\")\n appendPeopleButton.setAttribute('role',\"button\")\n appendPeopleButton.textContent = \"Append\"\n editRow1Col3.appendChild(appendPeopleButton)\n appendPeopleButton.addEventListener(\"click\", function () {\n if (mediaPeopleList.value) {\n mediaPeopleList.value = mediaPeopleList.value + ',' + peopleList[mediaPeopleSelect.value]\n } else {\n mediaPeopleList.value = peopleList[mediaPeopleSelect.value]\n }\n });\n\n editRow1Col3.appendChild(mediaPeopleList);\n\n // Update\n let editUpdateButton = document.createElement(\"button\")\n editUpdateButton.classList.add('btn','btn-info','btn-sm','float-start','shadow-none','mt-3','me-2')\n editUpdateButton.setAttribute('type',\"button\")\n editUpdateButton.setAttribute('role',\"button\")\n editUpdateButton.textContent = \"Update Selected\"\n editRow1Col3.appendChild(editUpdateButton)\n editUpdateButton.addEventListener(\"click\", function () {\n //console.log(\"mediaCategorySelect.value = \"+mediaCategorySelect.value)\n //console.log(\"mediaMenuSelect.value = \"+mediaMenuSelect.value)\n //console.log(\"mediaPeopleList.value = \"+mediaPeopleList.value)\n mediaAdminMessage.textContent = \"\"\n\n // update to selected objects in adminFileList\n for (let index in mediaInfo.fileList) {\n let fi = mediaInfo.fileList[index]\n if (fi.Selected) {\n fi.Title = mediaDetailTitle.value\n fi.TakenDateTime = mediaDetailTaken.value\n fi.CategoryTags = mediaCategorySelect.value\n mediaDetailCategoryTags.value = mediaCategorySelect.value\n fi.MenuTags = mediaMenuSelect.value\n mediaDetailMenuTags.value = mediaMenuSelect.value\n fi.AlbumTags = mediaDetailAlbumTags.value\n fi.People = mediaPeopleList.value\n mediaDetailPeopleList.value = mediaPeopleList.value\n fi.Description = mediaDetailDescription.value\n }\n }\n });\n \n // Save\n let editSaveButton = document.createElement(\"button\")\n //editSaveButton.id = \"MediaAdminSaveButton\"\n editSaveButton.classList.add('btn','btn-success','btn-sm','float-start','shadow-none','mt-3','me-2','mb-3')\n editSaveButton.setAttribute('type',\"button\")\n editSaveButton.setAttribute('role',\"button\")\n editSaveButton.textContent = \"Save to DB\"\n editRow1Col3.appendChild(editSaveButton)\n editSaveButton.addEventListener(\"click\", function () {\n let paramData = {MediaFilterMediaType: mediaType,\n mediaInfoFileList: mediaInfo.fileList}\n\n let url = jjkgalleryRoot + \"updateMediaInfo.php\"\n fetch(url, {\n method: 'POST',\n headers: {'Content-Type': 'application/json'},\n body: JSON.stringify(paramData)\n })\n .then(response => response.text())\n .then(returnMsg => {\n //console.log(\"returnMsg = \"+returnMsg)\n mediaAdminMessage.textContent = returnMsg\n\n // Filter out the Selected files (that were updated)\n mediaInfo.fileList = mediaInfo.fileList.filter(checkSelected);\n currIndex = 0\n displayCurrFileList()\n \n }); // End of Fetch\n });\n\n // Category Tags\n mediaDetailCategoryTags = document.createElement(\"input\")\n //mediaDetailCategoryTags.id = \"MediaDetailCategoryTags\"\n mediaDetailCategoryTags.classList.add('form-control','py-1','mb-1','shadow-none')\n mediaDetailCategoryTags.setAttribute('type', \"text\")\n mediaDetailCategoryTags.setAttribute('placeholder', \"Category tags\")\n mediaDetailCategoryTags.disabled = true\n editRow1Col3.appendChild(mediaDetailCategoryTags)\n\n // Menu Tags\n mediaDetailMenuTags = document.createElement(\"input\")\n //mediaDetailMenuTags.id = \"MediaDetailMenuTags\"\n mediaDetailMenuTags.classList.add('form-control','py-1','mb-1','shadow-none')\n mediaDetailMenuTags.setAttribute('type', \"text\")\n mediaDetailMenuTags.setAttribute('placeholder', \"Menu tags\")\n mediaDetailMenuTags.disabled = true\n editRow1Col3.appendChild(mediaDetailMenuTags)\n\n // Album Tags\n mediaDetailAlbumTags = document.createElement(\"input\")\n //mediaDetailAlbumTags.id = \"MediaDetailAlbumTags\"\n mediaDetailAlbumTags.classList.add('form-control','py-1','mb-1','shadow-none')\n mediaDetailAlbumTags.setAttribute('type', \"text\")\n mediaDetailAlbumTags.setAttribute('placeholder', \"Album tags\")\n editRow1Col3.appendChild(mediaDetailAlbumTags)\n\n // People List\n mediaDetailPeopleList = document.createElement(\"input\")\n //mediaDetailPeopleList.id = \"MediaDetailPeopleList\"\n mediaDetailPeopleList.classList.add('form-control','py-1','mb-1','shadow-none')\n mediaDetailPeopleList.setAttribute('type', \"text\")\n mediaDetailPeopleList.setAttribute('placeholder', \"People list\")\n mediaDetailPeopleList.disabled = true //<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n editRow1Col3.appendChild(mediaDetailPeopleList)\n\n // Description\n mediaDetailDescription = document.createElement(\"textarea\")\n //mediaDetailDescription.id = \"MediaDetailDescription\"\n mediaDetailDescription.classList.add('form-control','py-1','mb-1','shadow-none')\n mediaDetailDescription.setAttribute('rows', \"6\")\n mediaDetailDescription.setAttribute('placeholder', \"Description\")\n //mediaDetailDescription.value = fi.Description\n editRow1Col3.appendChild(mediaDetailDescription)\n\n // Admin Message\n mediaAdminMessage = document.createElement(\"div\")\n mediaAdminMessage.id = \"MediaAdminMessage\"\n mediaAdminMessage.classList.add('float-start')\n mediaAdminMessage.textContent = \"Number of images = \" + (mediaInfo.fileList.length)\n editRow1Col3.appendChild(mediaAdminMessage)\n editRow1.appendChild(editRow1Col3)\n\n mediaPageContainer.appendChild(editRow1);\n\n } else {\n mediaPageContainer.appendChild(filterContainer);\n mediaPageContainer.appendChild(thumbnailContainer);\n }\n\n displayCurrFileList()\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 renderGallery(arr) {\n let parentNode = document.querySelector(\".gallery\");\n arr.forEach(item => {\n let childNode = document.createElement(\"img\");\n childNode.src = item;\n childNode.classList.add(\"gallery__item\");\n parentNode.appendChild(childNode);\n // console.log(childNode);\n });\n createMasonry(parentNode);\n}", "function setUpClickListeners() {\n $(\"#content a\").live('click', function() { //If links point to galleries, make them use getContent.\n var href = $(this).attr('href');\n if(href.indexOf(\"image/tid\") > -1) {\n var id = href.split(\"/\")[3];\n getContent(id);\n return false;\n }\n });\n $('.galleria-images .galleria-image img').live('click', function() { //Make images clickable. This is to make up for the\n window.open($(this).attr('src'), '_blank'); //wrapping a-tag removed above.\n });\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}", "function createThumbnailItem (gallery) {\n\t\tvar div = thumbnail.DOM (\"div.hidden\");\n\t\tvar img = div.IMG (gallery.src);\n\t\tdiv.onclick = imgOnclickEvt (img, gallery);\n\t\tdisplay [gallery.year].push (div);\n\t}", "function renderGallery(image) {\n let gallery = document.getElementById('gallery');\n if (gallery != null)\n updateGallery(gallery, image);\n else\n createGallery(image);\n }", "function add_moreImages() {\n\t$('.js-cloning-object')\n\t\t.clone()\n\t\t.appendTo('.js-cloning-object-container');\n}", "function init() {\n // Listen for clicks on anchors within gallery\n gallery.delegate('a', 'click', function(event) {\n var trigger = $(this);\n var triggerData = trigger.data(\"gallery\");\n\n if ( triggerData === 'thumb') {\n var imgContainer = trigger.parent().siblings();\n Gallery.switch(trigger, imgContainer);\n } else {\n return;\n }\n event.preventDefault();\n });\n }", "function buildGallery (gallery) {\n imageContainer.innerHTML = ''\n bulletContainer.innerHTML = ''\n\n // this loops through each gallery in the JSON\n galleriesJSON[gallery].forEach(function (image, idx) {\n var bulletNamingConvention = 'bullet' + gallery + galleryIndex + idx\n var imgNamingConvention = 'img' + gallery + galleryIndex + idx\n var isValidImage = idx !== 0\n if (isValidImage) {\n // this builds the images\n var imageTag = document.createElement('img')\n imageTag.setAttribute('id', 'img' + idx)\n imageTag.setAttribute('class', imgNamingConvention)\n imageTag.setAttribute('src', image.imageSource)\n imageTag.setAttribute('alt', image.altTag)\n imageContainer.appendChild(imageTag)\n\n // have to do this because IE\n var currentImage = document.getElementsByClassName(imgNamingConvention)\n image.selected\n ? currentImage[currentImage.length - 1].classList.add('gallery-img', 'display-img')\n : currentImage[currentImage.length - 1].classList.add('gallery-img')\n\n // this builds the button associated with the image\n var buttonElement = document.createElement('button')\n buttonElement.setAttribute('id', 'button' + idx)\n buttonElement.setAttribute('class', bulletNamingConvention)\n buttonElement.setAttribute('aria-label', 'view image number ' + idx)\n buttonElement.onclick = function () {\n handleGalleryClick(idx, selectedGallery, bulletNamingConvention, imgNamingConvention)\n }\n bulletContainer.appendChild(buttonElement)\n\n // have to do this because IE\n var currentBullet = document.getElementsByClassName(bulletNamingConvention)\n image.selected\n ? currentBullet[currentBullet.length - 1].classList.add('bullet', 'active')\n : currentBullet[currentBullet.length - 1].classList.add('bullet')\n }\n if (image.selected) {\n activeImageBullet = document.getElementsByClassName('bullet' + gallery + galleryIndex + idx)\n displayedImage = document.getElementsByClassName('img' + gallery + galleryIndex + idx)\n }\n })\n }", "function imageEditorDocumentReadyGeneral() {\n $('#image_gallery_for_image_editor ._select_image_from_gallery').addClass('_add_image_to_image_editor');\n $body.on('click', '._add_image_to_image_editor', function() {\n var parser = document.createElement('a');\n parser.href = $('._exit_url').attr('href');\n window.location = '/images/' + $(this).data('image-id') + '/edit?from_gallery=true&back=' + encodeURIComponent(parser.pathname+parser.search+parser.hash);\n });\n}", "function add_nested_resources() {\n $('#add-nested-resources').nestedAttachmentsUploader({\n uploadsContainer: $('#nested_resources')\n });\n}", "function galleryGrid() {\n //ISOTOPE media\n var $container = $('.work1').isotope({\n itemSelector: '.thumbnail',\n masonry: {\n columnWidth: '.thumbnail.small'\n }\n });\n // filter items on button click\n $('.filters').on( 'click', 'li', function() {\n var filterValue = $(this).attr('data-filter');\n $container.isotope({ filter: filterValue });\n });\n\n // change is-checked class on buttons\n $('.filters').each( function( i, buttonGroup ) {\n var $buttonGroup = $( buttonGroup );\n $buttonGroup.on( 'click', 'li', function() {\n $buttonGroup.find('.is-checked').removeClass('is-checked');\n $( this ).addClass('is-checked');\n });\n });\n\n // load more\n $('#append').on('click', function(e) {\n var newItems = $('#more-items').appendTo('.thumbnails');\n $(\".thumbnails\").isotope('insert', newItems );\n $(this).hide();\n return false;\n });\n}", "function fillRandomSub(){\n $('.random_sub img').attr('src', imageBaseUrl + randomSub.name.image);\n $('.random_sub .label').html(randomSub.name.name);\n $('.random_bread img').attr('src', imageBaseUrl + randomSub.bread.image);\n $('.random_bread .label').html(randomSub.bread.name);\n $('.random_cheese img').attr('src', imageBaseUrl + randomSub.cheese.image);\n $('.random_cheese .label').html(randomSub.cheese.name);\n fillRandomIngredients();\n fillRandomSauces();\n }", "photosContent() {\n this.Layout.innerHTML = `<div class=\"menu-headinng\">\n <h5>Photos</h5>\n <div class=\"custom\">See a new inspiring photo each day</div>\n\n </div>\n \n \n <ul class=\"list-item-2\" style=\"margin-top:2rem;\">\n <div class=\"ramesh\" style=\"display:flex; justify-content:space-between;\">\n <div id=\"photos-div\">\n <div id=\"linkt\">My Photos</div>\n <div id=\"linkt\">Favorites</div>\n <div id=\"linkt\">History</div>\n \n </div>\n\n <div id=\"btn-photos\"><a class=\"waves-effect waves-light btn btnbackground\" style=\"border-radius:20px;text-transform:capitalize; \"><i class=\"fas fa-plus\" style=\"font-size:1rem;\"></i> Add Photos</a></div>\n\n\n \n \n \n \n \n\n \n </div>\n <div class=\"row\" style=\"margin-top:1rem;\" id=\"list\">\n \n \n \n </div>\n \n\n\n <div id=\"btn-photo\" class=\"center-align\" style=\"margin-top:2rem;margin-bottom:1rem;\"><a class=\"waves-effect waves-light btn\" style=\"border-radius:20px;text-transform:capitalize; margin-top:0px;\">Load More</a></div>\n\n\n\n</ul>\n \n \n \n \n `;\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 popGallery(numImgs) {\n\n}", "function makeGallery(imageArray){\n\n\t}", "function showAllAssets() {\n\tfor (var i=0; i <= 15; i++) {\n\t\t$(\"#gallery\").append(\n\t\t\t\"<a class='\" + Assets[i].type +\n\t\t\t\"' id= '\" + Assets[i].embed +\n\t\t\t\"'href='\" + Assets[i].href +\n\t\t \t\"'><img src='\" + Assets[i].src + \n\t\t \t\"' alt='\" + Assets[i].alt + \"'></a>\"\n\t\t );\n\t}\n}", "function initItemsUsingGallery_() {\n var gallery = common.getGallery();\n\n // Apply settings to each item in the gallery\n var items = gallery.querySelectorAll('.' + elementClass_.item);\n for (var i = 0; i < items.length; i++) {\n var item = items[i];\n initItemDisplay_(item);\n }\n }", "function renderGalleryItem(){\n fetch(`https://source.unsplash.com/collection/${collectionID}/${imageWidth}x${imageHeight}/`).then((response)=> { \n let galleryItem = document.createElement('div');\n galleryItem.classList.add('gallery-item');\n galleryItem.innerHTML = `\n <img class=\"gallery-image\" src=\"${response.url}\" alt=\"gallery image\"/>\n `\n document.body.appendChild(galleryItem);\n }) \n}", "function buildAds(){\n\t jQuery(\".gallery-ad\").attr(\"id\",\"GalleryAd\");\n\t\t jQuery(\".gallery-ad img\").hide();\n\t overlayAd(\"GalleryAd\", __GEEK.currentAds[1].adUnit, __GEEK.currentAds[1].adZdid);\n\t\t refreshAd();\n}", "function buildWithMiniGallery()\n{ \n for (photoIndex = 0; photoIndex < miniPhoto.length; photoIndex++){ \n urlmin = miniPhoto[photoIndex]; \n let urlOriginal =urls[photoIndex];\n photo = document.createElement('div');\n photo.style.backgroundImage = 'url(' + urlmin + ')';\n photo.classList.add('photo');\n\n\n photo.url = urlOriginal;\n photo.type = 'image';\n \n photo.addEventListener( 'click', function () {\n\n // Keep one panorama\n if ( panorama ) { return; }\n\n // Dynamically generate panorama\n if ( this.type === 'image' ) {\n\n panorama = new PANOLENS.ImagePanorama( this.url );\n\n } else if ( this.type === 'video' ) {\n\n panorama = new PANOLENS.VideoPanorama( this.url, { autoplay: true } );\n\n } else {\n\n return;\n\n } \n panorama.addEventListener( 'progress', function ( event ) {\n\n progress = event.progress.loaded / event.progress.total * 100;\n\n progressBar.style.width = progress + '%';\n\n if ( progress === 100 ) {\n\n progressBar.style.opacity = 0;\n\n }\n\n });\n viewer.add( panorama );\n\n panoramaContainer.classList.add( 'open' );\n\n }, false );\n\n\n galleryContainer.appendChild(photo);\n } \n}", "function generatePetGallery(baseURL, term, element) {\n const apiPromise = fetch(baseURL);\n const gallery = document.querySelector(`.${element}`);\n\n apiPromise\n .then(handleErrors)\n .then(data => data.json())\n .then(data => {\n try{\n if(!data[term]) return;\n const dataArr = data[term];\n\n dataArr.forEach((item, index) => {\n let photoObj = item;\n let galhtml = convertGalleryObjToHtml(photoObj, element, index + 1);\n gallery.innerHTML += galhtml;\n });\n\n setupModal(dataArr,element);\n } catch (e){\n throw Error('please Check the user or baseurl Information',e);\n }\n })\n .catch(err => {\n console.log(err, err.message);\n });\n }", "function Gallery(){\n \n \n\n //propiedades privadas\n let _title = \"Galeria de Fotos\";\n let _categories = [];\n let _images = [];\n let _authors = [];\n\n let _defaultCategory=\"DefaultCategory\";\n let _defaultAuthor=\"DefaultAuthor\";\n\n //patron iterador\n\n Object.defineProperty(this, 'iteratorAuthors', {\n get:function(){\n // Variable que mantiene la última posición recorrida por el array.\n let nextIndex = 0;\n // Devolvemos el objeto iterador para recorrer la lista.\n return {\n next: function(){ // Devuelve el siguiente objeto de la lista.\n return nextIndex < _authors.length ?\n {value: _authors[nextIndex++], done: false} :\n {done: true};\n }\n }\n }\n });\n\n Object.defineProperty(this, 'iteratorCategories', {\n get:function(){\n // Variable que mantiene la última posición recorrida por el array.\n let nextIndex = 0;\n // Devolvemos el objeto iterador para recorrer la lista.\n return {\n next: function(){ // Devuelve el siguiente objeto de la lista.\n return nextIndex < _categories.length ?\n {value: _categories[nextIndex++], done: false} :\n {done: true};\n }\n }\n }\n });\n\n Object.defineProperty(this, 'iteratorImages', {\n get:function(){\n // Variable que mantiene la última posición recorrida por el array.\n let nextIndex = 0;\n // Devolvemos el objeto iterador para recorrer la lista.\n return {\n next: function(){ // Devuelve el siguiente objeto de la lista.\n return nextIndex < _images.length ?\n {value: _images[nextIndex++], done: false} :\n {done: true};\n }\n }\n }\n });\n \n //getters y setters\n Object.defineProperty(this, 'title', {\n get:function(){\n return _title;\n },\n set:function(value){\n if (!value) throw new EmptyTitle(\"title\");\n _title = value;\n }\n });\n\n Object.defineProperty(this, 'categories', {\n get:function(){\n return _categories;\n }\n });\n\n Object.defineProperty(this, 'authors', {\n get:function(){\n return _authors;\n }\n });\n\n Object.defineProperty(this, 'images', {\n get:function(){\n return _images;\n }\n });\n\n //metodos publicos \n this.addCategory = function(categoria){\n if(categoria===null){\n throw nullCategory;\n }\n _categories.forEach(function(element){ //uso un foreach en vez de include para encontrar \n if(element.category===categoria){ //si ya esta la categoria porque es u array de objetos literales\n throw categoriaExistente;\n }\n });\n \n \n _categories.push({\n category: categoria,\n images: []\n });\n return _categories.length;\n };\n\n this.removeCategory = function(categoria){\n \n let aux= _categories.findIndex(function(element){//encontramos el indice de la categoria\n return (element.category===categoria) \n \n \n });\n if(aux===-1){\n throw categoriaNoRegistrada;//Si la categoria no se encuentra se lanza la excepcion\n }else{//si se encuentra se elimina\n _categories.splice(aux,1);\n }\n \n \n return _categories.length; //si se encuentra se elimina y se devuleve la longitud\n };\n\n this.addImage = function(image, category, author){\n\n if(image===null){\n throw imagenNull; //si no se introduce image se lanza la excepcion correspondiente\n }\n \n \n let index = 0;\n _images.push({ //introducimos un ojeto literal al array de imagenes\n image: image,\n author: author.nickname\n });\n \n let aux = _categories.findIndex(function(element){//comprobamos si la categoria ya se encuenta en el array y sacamos su index\n return (element.category===category);\n \n });\n \n if(aux===-1){//si no está, introducimos la nueva categoria\n _categories.push({\n category: category,\n images: [image]\n });\n }else{//si ya está introducimos la nueva imagen a la categoria existente\n _categories[aux].images.push(image);\n }\n \n if(!_authors.includes(author)){//si el autor no esta lo agregamos al array\n _authors.push(author);\n }\n return _images.length;\n };\n\n this.removeImage=function(image){\n \n\n \n \n let aux = _images.findIndex(function(element){//comprobamos si la imagen esta en el array\n return (element.image===image)\n });\n \n if(aux===-1){//si no está lanzamos la excepcion\n throw imagenInexistente;\n }else{//si estaba la eliminamos\n _images.splice(aux,1);\n }\n \n return _images.length;\n };\n\n this.getCategoryImages = function(category){\n if(category===null){ //si la categoria introducida es null lanzamos excepcion\n throw nullCategory;\n }\n \n \n let aux=_categories.findIndex(function(element){//iteramos el array de categorias hasta encontrar la que coincida y sacar su posicion\n \n return (element.category===category);//si coincide retorna true, lo que guardará su index\n \n \n });\n if(aux!=-1){ //si el indice no es -1 mostramos el array de imagenes de la categoria\n return _categories[aux].images;\n }else{\n return \"Categoria no encontrada\";\n }\n \n\n };\n\n this.addAuthor = function(autor){\n if(autor===null){ //comprobamos que elautor no sea null\n throw autorNull;\n }\n if(!_authors.includes(autor)){//si el autor no esta en el array lo metemos\n _authors.push(autor);\n }\n return _authors.length;\n };\n\n this.removeAuthor = function(autor){\n\n \n let aux=_authors.indexOf(autor)//comprobamos si el autor esta en el array obteniendo su indice\n \n if(aux!==-1){//si el indice es distinto de -1 lo eliminamos\n _authors.splice(aux,1);\n }else{//si no lanzamos excepcion\n throw autorInexistente;\n }\n\n \n return _authors.length;\n };\n\n this.getAuthorImages = function(autor){\n\n if(autor===null){ //comprobamos que el autor no sea null\n throw autorNull;\n }\n \n let aux =[]; //array para guardar las imagenes qeu correspondan\n \n _images.forEach(function(element){//recorrecmos el array de para comparar los autores\n if(element.author===autor.nickname){\n aux.push(element); //si el autor coincide guardamos la imagen en el array\n }\n });\n return aux;\n };\n\n this.getPortraits = function(){\n let aux =[]; //array para las imagenes que sean portraits\n \n _images.forEach(function(element){//recorremos el array\n if(element.image instanceof Portrait){ //si la imagen es una instancia de portrait la guardamos en el array\n aux.push(element);\n }\n });\n return aux;\n };\n\n this.getLandscapes = function(){\n let aux =[];//array para las imgenes que sean landscapes\n \n _images.forEach(function(element){ //recorremos el array\n if(element.image instanceof Landscape){//si la imagen es una instancia de landscape la guardamos en el array\n aux.push(element);\n }\n });\n return aux;\n };\n }", "function getGroupImgs(phyCatName, terCatname, makeSubUl) {\n\t\tvar imageDiv = document.createElement('div');\n\t\timageDiv.setAttribute(\"class\", \"imgDiv\");\n\t\tmakeSubUl.appendChild(imageDiv);\n\t\t// Create and add the physical image to page.\n\t\tvar newPhyImg = document.createElement('img');\n\t\tnewPhyImg.setAttribute(\"class\", \"groupImg\");\n\t\tif (phyCatName === \"An easy ride\") {\n\t\t\tvar setSrc = newPhyImg.setAttribute('id', \"one\");\n\t\t}\n\t\tif (phyCatName === \"Challenging\") {\n\t\t\tvar setSrc = newPhyImg.setAttribute('id', \"two\");\n\t\t}\n\t\tif (phyCatName === \"Technically awesome\") {\n\t\t\tvar setSrc = newPhyImg.setAttribute('id', \"three\");\n\t\t}\n\t\tif (phyCatName === \"Extreme\") {\n\t\t\tvar setSrc = newPhyImg.setAttribute('id', \"four\");\n\t\t}\n\t\tif (phyCatName === \"Unknown\") {\n\t\t\tvar setSrc = newPhyImg.setAttribute('id', \"five\");\n\t\t}\n\t\timageDiv.appendChild(newPhyImg);\n\n\t\t//Create and add the terrain image tot he page\n\t\tvar newTerImg = document.createElement('img');\n\t\tnewTerImg.setAttribute(\"class\", \"groupImg\");\n\t\tif (terCatname === \"Paved\") {\n\t\t\tvar setSrc = newTerImg.setAttribute('id', \"six\");\n\t\t}\n\t\tif (terCatname === \"Stable\") {\n\t\t\tvar setSrc = newTerImg.setAttribute('id', \"seven\");\n\t\t}\n\t\tif (terCatname === \"Varied\") {\n\t\t\tvar setSrc = newTerImg.setAttribute('id', \"eight\");\n\t\t}\n\t\tif (terCatname === \"Unpredictable\") {\n\t\t\tvar setSrc = newTerImg.setAttribute('id', \"nine\");\n\t\t}\n\t\tif (terCatname === \"Unknown\") {\n\t\t\tvar setSrc = newTerImg.setAttribute('id', \"five\");\n\t\t}\t\n\t\timageDiv.appendChild(newTerImg);\n\n\t}", "function show_pictures(galleryId, imgs, marker_coordinates) {\n var arr = galleryId\n gId('story_content').style.display = 'block';\n if (arr.length > 1) {\n // gallery will be created if many pictures are in the temporary panel.\n var gallery = document.createElement(\"div\");\n gallery.className = \"gallery_container\";\n for (var i = 0; i < arr.length; i++) {\n var imageInGallery = document.createElement(\"img\");\n imageInGallery.className = \"image_story gallery\";\n imageInGallery.src = imgs[arr[i]];\n imageInGallery.setAttribute(\"data-dbid\", arr[i]);\n gallery.appendChild(imageInGallery);\n }\n appendBlock(gallery, \"img\");\n set_block_coordinates(gallery, marker_coordinates);\n } else {\n //only one picture is in temporary panel.\n oneImage = document.createElement(\"img\");\n oneImage.className = \"image_story\";\n oneImage.src = imgs[arr[0]];\n oneImage.setAttribute(\"data-dbid\", arr[0]);\n appendBlock(oneImage, \"img\");\n set_block_coordinates(oneImage, marker_coordinates);\n }\n}", "function galleryInfo(gallery) {\r\n\r\n document.querySelector(\".info\").style.display = \"inline\";\r\n document.querySelector(\"#galleryName\").innerHTML = gallery.GalleryName + \"<br>\";;\r\n document.querySelector(\"#galleryNative\").innerHTML = gallery.GalleryNativeName + \"<br>\";;\r\n document.querySelector(\"#galleryCity\").innerHTML = gallery.GalleryCity + \"<br>\";;\r\n document.querySelector(\"#galleryAddress\").innerHTML = gallery.GalleryAddress + \"<br>\";;\r\n document.querySelector(\"#galleryCountry\").innerHTML = gallery.GalleryCountry + \"<br>\";;\r\n\r\n const a = document.querySelector(\"#website\");\r\n a.setAttribute(\"href\", gallery.GalleryWebSite);\r\n document.querySelector(\"#galleryInfo .info\").appendChild(a);\r\n }", "function Gallery(params) {\n\n //defaults\n var options = {\n rowId: 0\n , index: 1\n , pageSize: 10\n , orderBy: \"\"\n , orderDir: \"\"\n , thenBy: \"\"\n , thenDir: \"asc\"\n , animationSpeed: \"slow\"\n , pageIdx: 1\n , pageSze: 10\n , smoothScrolling: true\n , extensions: new Object()\n , action: \"filter\"\n , extensionFilter: \"module\"\n , tagFilter: \"\"\n , tagFilterName: \"\"\n , ownerFilter: \"\"\n , tags: new Object()\n , loadTags: true\n , pagedExtensions: new Object()\n , protocol: ('https:' == location.protocol ? 'https://' : 'http://')\n , host: \"catalog.dotnetnuke.com\"\n , ServiceRoot: \"/AppGalleryService.svc\"\n , DataBaseVersion: \"06.00.00\"\n , ExtensionServiceName: \"/Extensions\"\n , TagsServiceName: \"/Tags\"\n , TagCloudServiceName: \"/GetTagCloudData\"\n , CatalogServiceName: \"/Catalogs\"\n , ExtensionSearchName: \"/SearchExtensions\"\n , extensionDetailDialog: $(\"#extensionDetail\").dialog(this.DefaultDialogOptions)\n , loading: $(\"#loading\")\n , NameTextASC: \"Name: A-Z\"\n , NameTextDESC: \"Name: Z-A\"\n , PriceTextASC: \"Price: High to Low\"\n , PriceTextDESC: \"Price: Low to High\"\n , TagCount: 50\n , CacheTimeoutMinutes: 1440\n , searchFilters: $(\"#searchFilters\")\n , tagLabel: \"Tag\"\n , searchLabel: \"Search\"\n , vendorLabel: \"Vendor\"\n , typeLabel: \"Type\"\n , noneLabel: \"None\"\n , orderLabel: \"Order:\"\n , errorLabel: \"Error...\"\n , loadingLabel: \"Loading...\"\n , BaseDownLoadUrl: \"\"\n , searchText: \"\"\n };\n //extend defaults with ctor params\n if (params) {\n $.extend(options, params);\n }\n\n //load up our object with default options\n for (var i in options) {\n if (options.hasOwnProperty(i)) this[i] = options[i];\n }\n\n this.extensionList = $(\"#extensionList\");\n //setup smooth scrolling pager\n if (this.smoothScrolling) {\n var s = new Scroller(100, false, function (scroller) {\n _gallery.index++;\n _gallery.action = \"page\";\n _gallery.Search();\n }).watch();\n }\n\n //load up our urls\n this.ExtensionsUrl = this.getServiceUrl(this.ExtensionServiceName);\n this.TagCloudUrl = this.getServiceUrl(this.TagCloudServiceName);\n this.TagsUrl = this.getServiceUrl(this.TagsServiceName);\n this.CatalogsUrl = this.getServiceUrl(this.CatalogServiceName);\n this.SearchUrl = this.getServiceUrl(this.ExtensionSearchName);\n this.Cache = new Cache(\"_Gallery_\", this.CacheTimeoutMinutes);\n\n //bind to our document events\n\n \n// $(\"#typeDDL\").change(function (event) {\n// var e = event || window.event;\n// _gallery.FilterGallery(e, this);\n// return false;\n// });\n\n $(\"#tag-list\").click(function (e) {\n e = e || window.event;\n _gallery.TagFilterGallery(e, this);\n return false;\n });\n\n $(\"#search-reset\").click(function (e) {\n e = e || window.event;\n $('#searchText').val('');\n _gallery.tagFilter = '';\n _gallery.tagFilterName = '';\n _gallery.ownerFilter = '';\n _gallery.orderBy = 'Title';\n _gallery.orderDir = 'asc';\n _gallery.extensionFilter = 'module';\n $(\"#typeDDL\").val('module');\n _gallery.SearchGallery('');\n _gallery.getTags();\n return false;\n });\n\n $(\"#searchText\").change(function (e) {\n e = e || window.event;\n _gallery.SearchGallery($('#searchText').val());\n return false;\n });\n $(document).keydown(function (e) {\n e = e || window.event;\n if (e.which == 13) {\n window.stop ? window.stop() : document.execCommand(\"stop\");\n e.stopPropagation();\n e.preventDefault();\n _gallery.SearchGallery($('#searchText').val());\n }\n });\n $(\"#searchText\").keyup(function (e) {\n e = e || window.event;\n if (e.which == 27) {\n $(\"#search-reset\").click();\n }\n return false;\n });\n $(\"#search-go\").click(function (e) {\n e = e || window.event;\n _gallery.SearchGallery($('#searchText').val());\n return false;\n });\n\n $(\"#NameSorter\").click(function (e) {\n e = e || window.event;\n _gallery.SortExtensions('Title');\n return false;\n });\n\n $(\"#PriceSorter\").click(function (e) {\n e = e || window.event;\n _gallery.SortExtensions('Price');\n return false;\n });\n}", "updateThumbnails_() {\n if (this.thumbnails_) {\n // TODO: Need to update gallery if there's change with thumbnails\n return;\n }\n\n // Initialize thumbnails from lightbox manager\n this.thumbnails_ = [];\n const thumbnailList = this.manager_.getThumbnails();\n thumbnailList.forEach(thumbnail => {\n const thumbnailElement = this.createThumbnailElement_(thumbnail);\n this.thumbnails_.push(thumbnailElement);\n });\n this.vsync_.mutate(() => {\n this.thumbnails_.forEach(thumbnailElement => {\n this.gallery_.appendChild(thumbnailElement);\n });\n });\n }", "function galletyThumbs() {\r\n\r\n\t// Initialize Advanced Galleriffic Gallery\r\n var gallery = $('#thumbs').galleriffic({\r\n imageContainerSel: '#slideshow'\r\n });\r\n}", "function displayPhotos(photosArray) {\n imagesLoaded = 0;\n totalImages = photosArray.length;\n // Run function for each object in photosArray\n photosArray.forEach((photo) => {\n // Create <a> to link to Unsplash\n const item = document.createElement(\"a\");\n setAttributes(item, {\n href: photo.links.html,\n target: \"_blank\",\n });\n // Create <div> for photo\n const galleryImg = document.createElement(\"div\");\n galleryImg.classList.add(\"gallery-img\");\n galleryImg.innerHTML = `\n <div class='gallery-info'>\n <p>${photo.user.name}</p>\n <a href=${photo.urls.regular} target=\"_blank\"> Download </a>\n </div>\n `;\n const img = document.createElement(\"img\");\n setAttributes(img, {\n src: photo.urls.regular,\n });\n // Event Listener, check when each is finished loading\n img.addEventListener(\"load\", imageLoaded);\n galleryImg.appendChild(img);\n // Put <div> inside <a>, then put both inside gallery element\n item.appendChild(galleryImg);\n gallery.appendChild(item);\n });\n}", "function setEditPage(){\r\n\r\n\t\tvar hash = location.hash;\r\n\t\tvar albumId = parseInt( hash.substring( hash.indexOf('/') + 1 ) );\r\n\t\t\r\n\t\tvar albumTitle;\r\n\t\tvar footerHTML;\r\n\r\n\t\tfor(var i = 0 ; i < albums.length ; i++){\r\n\t\t\tif(albumId === albums[i].id){\r\n\t\t\t\talbumTitle = albums[i].title;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tvar headerHTML = $('#albumHeader').html();\r\n\t\theaderHTML = headerHTML.replace( '{{AlbumTitle}}' , albumTitle );\r\n\r\n\t\t$('#header').html(headerHTML);\r\n\r\n\r\n\t\t//Code to set content\r\n\t\t$(\"#content\").html('');\r\n\r\n\t\tvar photos = albums[i].photos;\r\n\r\n\r\n\t\tfor( var i = 0 ; i < photos.length ; i++ ){\r\n\t\t\tvar photoHTML = $('#photoTemplate').html();\r\n\r\n\t\t\tphotoHTML = photoHTML.replace( '{{url}}' , photos[i].url);\r\n\t\t\tphotoHTML = photoHTML.replace( '{{albumId}}' , photos[i].albumId);\r\n\t\t\tphotoHTML = photoHTML.replace( '{{id}}' , photos[i].id);\r\n\t\t\tphotoHTML = photoHTML.replace( '{{edit}}' , '#editPhoto/'+albumId +'/' +photos[i].id);\r\n\t\t\tphotoHTML = photoHTML.replace( '{{delete}}' , '#deletePhoto/'+albumId +'/' +photos[i].id);\r\n\t\t\tphotoHTML = photoHTML.replace( '{{title}}' , photos[i].title);\r\n\r\n\t\t\t$('#content').append(photoHTML);\r\n\t\t}\r\n\t\tvar $fabAdd = $('<a />').attr(\"href\", '#addPhoto/'+albumId).attr('id' , 'fabAdd').html('+');\r\n\t\t$('#content').append($fabAdd);\r\n\r\n\r\n\t\tfooterHTML = $('#footerTemplate').html();\r\n\t\tfooterHTML = footerHTML.replace( '{{saveChanges}}' , '#saveAlbum/'+albumId);\r\n\t\tfooterHTML = footerHTML.replace( '{{cancelChanges}}' , '#cancelAlbum/'+albumId);\r\n\t\t$('#footer').css({\r\n\t\t\t'position':'fixed',\r\n\t\t\t'height' : '60px',\r\n\t\t\t'width' : '100%',\r\n\t\t\t'bottom' : '0px',\r\n\t\t\t'left' : '0px',\r\n\t\t\t'visibility' : 'visible'\r\n\t\t}).html(footerHTML);\r\n\r\n\r\n\t}", "function gallery(){\r\n\r\n showName();\r\n\r\n\r\n //create the images to display in the gallery\r\n\r\n for (i = 1; i <= 60; i++){\r\n\r\n //create a string adding the images directory and looping through the filename numbers\r\n\r\n //loop through images 1-9 due to the extra character space added after the number 9\r\n if (i < 10){\r\n var mySlides = \"../static/javapic/images/pdxcg_0\" + i + \".jpg\";\r\n\r\n }\r\n\r\n //loop through all image after the number 9\r\n if(i > 9){\r\n var mySlides = \"../static/javapic/images/pdxcg_\" + i + \".jpg\";\r\n\r\n\r\n //ignore missing file 42 and keep going\r\n if( i===42){\r\n continue;\r\n }\r\n }\r\n\r\n //create an <li> in javascript\r\n var li = document.createElement(\"LI\");\r\n\r\n //create an image in javascript\r\n var img = document.createElement(\"IMG\");\r\n img.setAttribute(\"src\", mySlides);\r\n\r\n //place the image in the <li> \r\n li.appendChild(img);\r\n\r\n //place the <li> in the gallery\r\n document.getElementById(\"gallery\").appendChild(li);\r\n\r\n \r\n }\r\n\r\n}", "function update_galleries($gallery){\n if ($gallery.find('.script-feature-content a').length > 0){\n var height_feature = $gallery.find('.script-feature-content a').outerWidth() * 0.66 +'px';\n $gallery.find('.script-feature-content a').css({height: height_feature});\n $gallery.find('.__st_gallery_feature_content').css({height: height_feature });\n }\n $gallery.find('li').css({height: ($gallery.find('li').outerWidth() * 0.66) +'px'});\n // this is the best way to use these two heights to determine height\n resize_page_to_fit_gallery(($gallery.find('.script-feature-content a').outerWidth() * 0.66)+($gallery.find('li').outerWidth() * 0.66));\n }", "function generateContent(data) {\n\tif(add.textContent.trim() !== data.album.name){\n\t\tadd.style.display = 'block';\n\t\tadd.innerHTML = '<div id=\"addButton\" class=\"ui basic green button\" data=\"\" data-tooltip=\"Add this album to your collection!\" data-position=\"top center\">Add</div>';\n\t\tvar addButton = document.getElementById('addButton');\n\t\taddButton.addEventListener('click', (e) =>{\n\t\t\tadd.style.display = 'none';\n\t\t\tvar xhr = new XMLHttpRequest();\n\t\t\tvar params = {\n\t\t\t\tadded: Date.now(),\n\t\t\t\ttitle: data.album.name,\n\t\t\t\tartist: data.album.artist,\n\t\t\t\timage: data.album.image[3]['#text']\t\t\t\t\n\t\t\t};\n\t\t\txhr.open(\"POST\", \"/collection\", true); ///<----- test nothing here\n\t\t\txhr.setRequestHeader('Content-Type', 'application/json');\n\t\t\txhr.send(JSON.stringify(params));\n\t\t})\n\t}\n\tartist.innerHTML = '<a href=\"/artist/' + encodeURIComponent(data.album.artist) + '\">' + data.album.artist + '</a> - ';\n\talbum.textContent = data.album.name;\n\t\n\ttitle.textContent = artist.textContent + album.textContent;\n\tvar img = data.album.image[3]['#text'];\n\t\n\timage.innerHTML = '<img class=\"ui image\" src=\"' + img + '\">';\n\tbg.style.backgroundImage = 'url(' + img + ')';\n\tdata.album.tags.tag.forEach((i) => {\n\t\ttags.innerHTML += '<a id=\"tag\" href=\"/tag/' + encodeURIComponent(i.name) + '\" class=\"ui tag label\">' + i.name + '</a>'\n\t})\n\tif(data.album.wiki){\n\t\tsummary = data.album.wiki.summary;\n\t\treview.innerHTML = summary;\n\t}\n\tif(data.album.tracks.track.length > 0){\n\t\tdata.album.tracks.track.forEach((i) => {\n\t\t\ttracks.push(i.name)\n\t\t});\n\t\tvar html = '<tbody>'\n\t\tfor(var i=0; i<tracks.length; i++){\n\t\t\thtml += '<div class=\"ui text container\"><tr><td id=\"trackName\">' + tracks[i] + '<button id=\"yt\" class=\"ui small basic disabled button\">Listen</button>' + '</td></tr></div>'\n\t\t}\n\t\tplaylist.innerHTML = \"<a id='playButton' class='ui basic disabled button'>Play All</a>\"\n\t\thtml+='</tbody>'\n\t\ttable.innerHTML = html;\n\t\ttrackName = document.querySelectorAll('#trackName');\n\n\t\tyoutubecache();\n\n\t\tfunction youtube(i){\n\t\t\tif(i<tracks.length){\n\t\t\t\tvar search = encodeURIComponent(data.album.artist) + ' ' + encodeURIComponent(data.album.name) + ' ' + encodeURIComponent(tracks[i]);\n\n\t\t\t\tfunction youtubeListener(){\n\t\t\t\t\tgenerateYoutube(JSON.parse(this.responseText), i, false)\n\t\t\t\t}\n\t\t\t\tvar params = {\n\t\t\t\t\tyoutube: search\n\t\t\t\t}\n\t\t\t\tvar xhr = new XMLHttpRequest();\n\t\t\t\txhr.onload = youtubeListener;\n\t\t\t\txhr.open('POST', '/api');\n\t\t\t\txhr.setRequestHeader('Content-Type', 'application/json');\n\t\t\t\txhr.send(JSON.stringify(params));\n\t\t\t} else {\n\t\t\t\treturn;\n\t\t\t}\n\t\t};\n\n\t\tfunction youtubecache(){\n\t\t\ttracks.unshift(data.album.artist + ' ' + data.album.name)\n\t\t\tfunction youtubeListener(){\n\t\t\t\tif(JSON.parse(this.responseText) === 'youtube'){\n\t\t\t\t\ttracks.shift()\n\t\t\t\t\tyoutube(0)\n\t\t\t\t} else {\n\t\t\t\t\ttracks.shift()\n\t\t\t\t\tgenerateYoutubeCache(JSON.parse(this.responseText))\n\t\t\t\t}\n\t\t\t\t// generateYoutube(JSON.parse(this.responseText), i)\n\t\t\t}\n\t\t\tvar params = {\n\t\t\t\tyoutubecache: tracks\n\t\t\t}\n\t\t\tvar xhr = new XMLHttpRequest();\n\t\t\txhr.onload = youtubeListener;\n\t\t\txhr.open('POST', '/api');\n\t\t\txhr.setRequestHeader('Content-Type', 'application/json');\n\t\t\txhr.send(JSON.stringify(params));\n\t\t}\n\n\t\tfunction generateYoutubeCache(data){\n\t\t\tvar youtubeSongs = {}\n\t\t\tdata.forEach((i) => {\n\t\t\t\tvar index = tracks.indexOf(i.split('+')[0])\n\t\t\t\tvar id = i.split('+')[1]\n\t\t\t\tgenerateYoutube(id, index, true)\n\t\t\t})\n\t\t}\n\n\t\t\tvar id = [];\n\t\t\tfunction generateYoutube(data, i, cache) {\n\t\t\t\tif(data === 'notfound'){\n\t\t\t\t\ttrackName.item(i).innerHTML = tracks[i] + '<button id=\"yt\" class=\"ui small basic grey disabled button\">Listen</button>';\n\t\t\t\t\tid.push(undefined);\n\t\t\t\t} else {\n\t\t\t\t\ttrackName.item(i).innerHTML = tracks[i] + '<a target=\"_blank\" id=\"yt\" class=\"ui small basic blue button\" href=\"https://www.youtube.com/watch?v=' + data + '\">Listen</a>'\n\t\t\t\t\tid.push(data)\n\t\t\t\t}\n\t\t\t\tif(cache === false){\n\t\t\t\t\tyoutube(id.length)\n\t\t\t\t}\n\t\t\t\tif(id.length === tracks.length){\n\t\t\t\t\tvar cleanId = [];\n\t\t\t\t\tfor(var i=0; i<id.length;i++){\n\t\t\t\t\t\tif(id[i] !== undefined){\n\t\t\t\t\t\t\tcleanId.push(id[i])\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tplaylist.innerHTML = \"<a target='_blank' href='http://www.youtube.com/watch_videos?video_ids=\" + cleanId.join(',') + \"' id='playButton' class='ui basic blue button'>Play All</a>\";\n\t\t\t\t}\n\t\t\t};\n\t\t\t\n\t} else {\n\t\ttable.innerHTML = '<div class=\"ui negative message\"></i><div class=\"ui center aligned container\">Darn! We couldn\\'t find the tracklist for <strong>' + data.album.artist + '-' + data.album.name + '</strong>.</div></div>'\n\t}\n}", "function loadSubModule(){\n\n\t\t// CAPTURE MODULE SIZING ON TRANSITION\n\t\tvar contentModule = $('#content_module');\n\t\t\tcontentModule\n\t\t\t\t.height(contentModule.height())\n\t\t\t\t.width(contentModule.width());\n\n\t\t// HANDLE SELECTED STATES\n\t\t$('.navigation_item').removeClass('selected');\n\t\tel.addClass('selected');\n\n\t\t// DYNAMIC HEIGHT CALCULATIONS\n\t\tvar windowHeight = $(window).innerHeight();\n\n\t\tvar singleOffset = $('#single_stack').offset();\n\n\t\tvar infoTitle = $('.info_title');\n\t\t\tvar infoTitleHeight = infoTitle.outerHeight();\n\t\t\n\t\tvar subNavigation = $('#sub_navigation');\n\t\t\tvar subnavHeight = subNavigation.outerHeight();\n\t\t\tvar subnavPosition = subNavigation.position();\n\t\t\t\tvar innerSubNavHeight = infoTitleHeight + subnavHeight;\n\n\t\tvar contentHeight = windowHeight - singleOffset.top;\n\t\t\t\t\n\n\t\t// SET CONTENT LOCATIONS PRE ANIMATION\n\t\t$('#sub_module').show().css({visibility: 'hidden'});\n\n\t\tvar moduleNavigation = $('#module_navigation');\n\t\t\tvar moduleNavHeight = moduleNavigation.outerHeight();\n\t\t\n\t\tif(subAction == \"clip\" || subAction == \"similar\"){\n\t\t\tvar subContentHeight = windowHeight \n\t\t\t\t- (singleOffset.top \n\t\t\t\t+ innerSubNavHeight\n\t\t\t);\n\t\t\t$('#module_navigation').hide();\n\t\t\t$('#episode_inner_wrapper')\n\t\t\t\t.removeClass('list_view')\n\t\t\t\t.addClass('thumb_view');\n\t\t}else{\n\t\t\tvar subContentHeight = windowHeight \n\t\t\t\t- (singleOffset.top \n\t\t\t\t+ innerSubNavHeight \n\t\t\t\t+ moduleNavHeight\n\t\t\t);\n\t\t\t$('#module_navigation').show();\n\t\t\t$('#episode_inner_wrapper')\n\t\t\t\t.removeClass('thumb_view')\n\t\t\t\t.addClass('list_view');\n\t\t}\n\n\t\t$('#episode_outer').height(subContentHeight);\n\t\t\n\t\t// TRANSITION ANIMATIONS\n\t\t$('#action_subnav').fadeIn(500);\n\n\t\t// SUB NAV TRANSITION ANIMATIONS\n\t\tcontentModule.animate({height:contentHeight},250);\n\n\t\t$('#content_wrapper').animate({opacity:0},250,function(e){\n\t\t\t$(this).hide();\n\t\t\t$('#sub_navigation')\n\t\t\t\t.addClass('subnav_open')\n\t\t\t\t.css({top:subnavPosition.top})\n\t\t\t\t.animate({top:infoTitleHeight},350);\n\n\t\t\t// SUB MODULE LOADER\n\t\t\t\n\t\t\t$('#sub_module').css({\n\t\t\t\ttop: windowHeight,\n\t\t\t\topacity: 1,\n\t\t\t\tvisibility: 'visible'\n\t\t\t}).delay(250).animate({top: innerSubNavHeight},350);\n\n\t\t\t/* \n\t\t\t\tNOTES: redo the module to have 3 internal sections\n\t\t\t\t\t- detect which view you are on\n\t\t\t\t\t- have it move left or right based on what is currently selected\n\t\t\t*/\n\n\t\t});\n\n\t}", "function addToCarousel() {\n //TODO: Add to firestore.\n if (localStorage.getItem('galleryCall')) {\n localStorage.setItem('galleryCall', false);\n var blobKey = readBlobKeyFromURl();\n localStorage.setItem('galleryBlobKey', blobKey);\n createCarouselElement(localStorage.getItem('galleryBlobKey'), \"imageCarousel\");\n } else {\n createCarouselElement(localStorage.getItem('galleryBlobKey'), \"imageCarousel\");\n }\n \n}", "function initThumbsPanel() {\n\n\t\t//set size:\n\t\tvar objGallerySize = g_gallery.getSize();\n\n\t\tif (g_temp.isVertical == false) g_objPanel.setWidth(objGallerySize.width);else g_objPanel.setHeight(objGallerySize.height);\n\n\t\tg_objPanel.run();\n\t}", "function populateView(gridView) {\n for (let i = 0; json.content.length > i; i++) {\n if (loadedDecks.includes(json.content[i].vaultId)) {\n // load thumbnail or list-item depending on user selection\n const html = gridView ? thumbnailTemplate({ entry: json.content[i] }) : listItemTemplate({ entry: json.content[i] });\n gridView? $('.content').append(html) : $('ul.mdl-list').append(html);\n $('label#category, li#category').each(function () {\n // compare loaded slide against the json data\n const decks = $(this).data('content');\n if (decks.includes(json.content[i].vaultId)) {\n $(this).show();\n if ($(this).prop('tagName') === 'LI') {\n $(this).parents('.category-content').siblings('label').show();\n }\n }\n });\n }\n }\n }", "function initMainContainer() {\n var $nav_article = $('#nav-article');\n if ($nav_article.length) {\n items_l = $nav_article.find('li').length\n $nav_article.addClass('items-' + items_l);\n }\n\n var $figure_thmbs = $('#figure-thmbs');\n if ($figure_thmbs.length) {\n $lnks = $figure_thmbs.find('.item a');\n $wrap = $figure_thmbs.find('div.wrapper');\n if ($lnks.length) {\n $lnks.on('click', function (e) {\n e.preventDefault();\n doi = $(this).data('doi');\n ref = $(this).data('uri');\n launchModal(doi, ref, 'fig');\n });\n $fig_tog = $('<span>Hide Figures</span>').toggle(function () {\n $wrap.hide();\n $figure_thmbs.find('div.buttons').hide();\n $figure_thmbs.find('div.controls').hide();\n $fig_tog.html('Show Figures')\n .toggleClass('hide');\n },function () {\n $wrap.show();\n $figure_thmbs.find('div.buttons').show();\n $figure_thmbs.find('div.controls').show();\n $fig_tog.html('Hide Figures')\n .toggleClass('hide');\n }\n ).insertAfter($figure_thmbs)\n .wrap('<div id=\"fig-toggle\" class=\"cf\" />');\n } else {\n $figure_thmbs.addClass('collapse');\n }\n }\n\n // inline figures\n var $fig_inline = $('#article-block').find('div.figure');\n if ($fig_inline.length) {\n $lnks = $fig_inline.find('.img a');\n $lnks.on('click', function (e) {\n e.preventDefault();\n ref = $(this).data('uri');\n doi = $(this).data('doi');\n launchModal(doi, ref, 'fig');\n });\n $lnks.append('<div class=\"expand\" />');\n }\n\n // figure search results\n var $fig_results = $('#fig-search-results');\n if ($fig_results.length) {\n $fig_results.find('a.figures').on('click', function () {\n doi = $(this).data('doi');\n launchModal(doi, null, 'fig', true);\n });\n $fig_results.find('a.abstract').on('click', function () {\n doi = $(this).data('doi');\n launchModal(doi, null, 'abstract', true);\n });\n }\n\n // figure link in article floating nav\n var $nav_figs = $('#nav-figures a');\n if ($nav_figs.length) {\n $nav_figs.on('click', function () {\n var doi = $(this).data('doi');\n launchModal(doi, null, 'fig');\n });\n }\n\n // figure link in the toc\n var $toc_block_links = $('#toc-block div.links');\n if ($toc_block_links.length) {\n $toc_block_links.find('a.figures').on('click', function () {\n var doi = $(this).data('doi');\n launchModal(doi, null, 'fig', true);\n });\n\n $toc_block_links.find('a.abstract').on('click', function () {\n var doi = $(this).data('doi');\n launchModal(doi, null, 'abstract', true);\n });\n }\n\n //load article asset sizes for inline figure download links\n $('.assetSize').each(function (index, assetInput) {\n var span = $('span[id=\"' + assetInput.getAttribute('name') + '\"]');\n if (span) {\n val = assetInput.getAttribute('value');\n if (val >= 1000000) {\n val /= 1000000;\n val = Math.round(val * 100) / 100;\n val = String(val).concat(\"MB\");\n }\n else if (val < 1000000 && val >= 1000) {\n val /= 1000;\n val = Math.round(val);\n val = String(val).concat(\"KB\");\n }\n else {\n val = String(val).concat(\"Bytes\");\n }\n span.html(val);\n }\n });\n\n $(\"#nav-article li a\").on(\"click\", function(event) {\n console.log(\"pjax click \" + this.name);\n // for metrics and related content that have dynamic javascript to populate\n // the content, cache the content here when the user navigates away from that\n // page. So that this cache can be reused when the user navigates back to\n // this page later.\n if(selected_tab == \"metrics\" || selected_tab == \"related\") {\n if($.pjax.contentCache[window.location.href] !== undefined) {\n $.pjax.contentCache[window.location.href].data = $(\"#pjax-container\").outerHTML();\n $.pjax.contentCache[window.location.href].loaded = true;\n }\n }\n pjax_selected_tab = this.name;\n selected_tab = this.name;\n return true;\n });\n\n}", "function addBigAlbumPicLinks() {\r\n\t\r\n\tif (!$('#ff-bap-link')) {\r\n\t\tvar a = document.createElement('a');\r\n\t\ta.innerHTML = $l('ShowBigPictures');\r\n\t\ta.id = 'ff-bap-link';\r\n\t\t\r\n\t\t// albums\r\n\t\tif (container = $('//*[contains(@class,\"fbxPhotoSetPageHeader\")]//*[contains(@class,\"uiHeaderSubTitle\")]//div[contains(@class,\"fsm\")]', null, true)) {\r\n\t\t\tcontainer.appendChild(document.createTextNode(' נ'));\r\n\t\t\tcontainer.appendChild(a);\r\n\t\t}\r\n\t\t\r\n\t\t// photo tabs on new profiles (including timeline profiles)\r\n\t\telse if ((container = $('.uiHeaderTitle', '#pagelet_photos_of_me')) && container[0]) {\r\n\t\t\tcontainer[0].appendChild(document.createTextNode(' נ'));\r\n\t\t\tcontainer[0].appendChild(a);\r\n\t\t}\r\n\t\t\r\n\t\t// photo tabs on old profiles\r\n\t\telse if (container = $('//*[@id=\"photos_of_wrapper\"]/preceding-sibling::* //div', null, true)) {\r\n\t\t\tcontainer.appendChild(document.createTextNode(' נ'));\r\n\t\t\tcontainer.appendChild(a);\r\n\t\t}\r\n\r\n\t\ton('click', a, function(e) {\r\n\t\t\tvar tables = $('./following::table[contains(@class,\"fbPhotosGrid\")]', e.target); // new albums/profiles use this\r\n\t\t\tif (tables.snapshotLength==0) { tables = $('./following::table[contains(@class,\"UIPhotoGrid_Table\")]', e.target); } // old albums/profiles use this\r\n\t\t\tvar buf = '';\r\n\t\t\tfor (var t=0; t<tables.snapshotLength; t++) {\r\n\t\t\t\tvar cells = $('td', tables.snapshotItem(t));\r\n\t\t\t\tfor (i=0; i<cells.length; i++) {\r\n\t\t\t\t\tvar src = (cells[i].getAttribute('data-src',null) || cells[i].innerHTML).match(/(https?:\\/\\/[^\"%&]+\\.jpg)/);\r\n\t\t\t\t\tif (src) { src=src[1]; }\r\n\t\t\t\t\telse { continue; }\r\n\t\t\t\t\tvar link = $('a', cells[i])[0];\r\n\t\t\t\t\tif (link.className.indexOf('uiVideoLink')!=-1) { continue; } // skip video thumbnails\r\n\t\t\t\t\tvar title = ($('a', cells[i])[0].getAttribute('title') || '').replace('\"', '&quot;');\r\n\t\t\t\t\tbuf+=\t'<a href=\"' + link.href + '\">'+\r\n\t\t\t\t\t\t\t'<img src=\"' + src.replace(/\\/[as]([\\d_]+)\\.jpg/, '/n$1.jpg').replace(/\\/([\\d_]+)[as]\\.jpg/, '/$1n.jpg') + '\" title=\"' + title + '\" />'+\r\n\t\t\t\t\t\t\t'</a>';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\thidePopup();\r\n\t\t\tshowPopup('<div id=\"FBFBigAlbumContainer\"><div id=\"FBFBigAlbum\" class=\"fbfPopup\"><div id=\"FBFBigAlbumClose1\" class=\"FBFBigAlbumClose\">' + $l('Close') + '</div>' + buf + '<div id=\"FBFBigAlbumClose2\" class=\"FBFBigAlbumClose\">' + $l('Close') + '</div></div></div>', false);\r\n\t\t\ton('click', Array('#FBFBigAlbumClose1','#FBFBigAlbumClose2'), hidePopup);\r\n\t\t});\r\n\t}\r\n}", "function addBigAlbumPicLinks() {\r\n\t\r\n\tif (!$('#ff-bap-link')) {\r\n\t\tvar a = document.createElement('a');\r\n\t\ta.innerHTML = $l('ShowBigPictures');\r\n\t\ta.id = 'ff-bap-link';\r\n\t\t\r\n\t\t// albums\r\n\t\tif ((container = $('.uiHeaderSubTitle', '#content')) && container[0]) {\r\n\t\t\tcontainer[0].appendChild(document.createTextNode(' · '));\r\n\t\t\tcontainer[0].appendChild(a);\r\n\t\t}\r\n\t\t\r\n\t\t// photo tabs on new profiles\r\n\t\telse if ((container = $('.uiHeaderTitle', '#pagelet_photos_of_me')) && container[0]) {\r\n\t\t\tcontainer[0].appendChild(document.createTextNode(' · '));\r\n\t\t\tcontainer[0].appendChild(a);\r\n\t\t}\r\n\t\t\r\n\t\t// photo tabs on old profiles\r\n\t\telse if (container = $('//*[@id=\"photos_of_wrapper\"]/preceding-sibling::* //div', null, true)) {\r\n\t\t\tcontainer.appendChild(document.createTextNode(' · '));\r\n\t\t\tcontainer.appendChild(a);\r\n\t\t}\r\n\r\n\t\ton('click', a, function(e) {\r\n\t\t\tvar tables = $('./following::table[contains(@class,\"fbPhotosGrid\")]', e.target); // new albums/profiles use this\r\n\t\t\tif (tables.snapshotLength==0) { tables = $('./following::table[contains(@class,\"UIPhotoGrid_Table\")]', e.target); } // old albums/profiles use this\r\n\t\t\tvar buf = '';\r\n\t\t\tfor (var t=0; t<tables.snapshotLength; t++) {\r\n\t\t\t\tvar cells = $('td', tables.snapshotItem(t));\r\n\t\t\t\tfor (i=0; i<cells.length; i++) {\r\n\t\t\t\t\tvar src = (cells[i].getAttribute('data-src',null) || cells[i].innerHTML).match(/(https?:\\/\\/[^\"]+\\.jpg)[^&]/);\r\n\t\t\t\t\tif (src) { src=src[1]; }\r\n\t\t\t\t\telse { continue; }\r\n\t\t\t\t\tvar link = $('a', cells[i])[0];\r\n\t\t\t\t\tif (link.className.indexOf('uiVideoLink')!=-1) { continue; } // skip video thumbnails\r\n\t\t\t\t\tvar title = ($('a', cells[i])[0].getAttribute('title') || '').replace('\"', '&quot;');\r\n\t\t\t\t\tbuf+=\t'<a href=\"' + link.href + '\">'+\r\n\t\t\t\t\t\t\t'<img src=\"' + src.replace(/\\/[as]([\\d_]+)\\.jpg/, '/n$1.jpg').replace(/\\/([\\d_]+)[as]\\.jpg/, '/$1n.jpg') + '\" title=\"' + title + '\" />'+\r\n\t\t\t\t\t\t\t'</a>';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\thidePopup();\r\n\t\t\tshowPopup('<div id=\"FBFBigAlbumContainer\"><div id=\"FBFBigAlbum\" class=\"fbfPopup\"><div id=\"FBFBigAlbumClose1\" class=\"FBFBigAlbumClose\">' + $l('Close') + '</div>' + buf + '<div id=\"FBFBigAlbumClose2\" class=\"FBFBigAlbumClose\">' + $l('Close') + '</div></div></div>', false);\r\n\t\t\ton('click', Array('#FBFBigAlbumClose1','#FBFBigAlbumClose2'), hidePopup);\r\n\t\t});\r\n\t}\r\n}", "function showImagesEventHandler(e) {\n var app = UiApp.getActiveApplication();\n var panel = app.getElementById('panelForImages').clear();\n var info = Utilities.jsonParse(ScriptProperties.getProperty('info'));\n for (i in info) {\n if (info[i][0] == e.parameter.albumListBox) {\n var data = UrlFetchApp.fetch(URL + '/albumid/' + info[i][1], googleOAuth_()).getContentText();\n var xmlOutput = Xml.parse(data, false);\n var photos = xmlOutput.getElement().getElements('entry');\n for (j in photos) {\n panel.add(app.createImage(photos[j].getElement('content').getAttribute('src').getValue()));\n }\n }\n }\n return app;\n}", "function createPages() {\r\n newDiv = document.createElement('div');\r\n newDiv.innerHTML = myLibrary[i].pages; \r\n library.appendChild(newDiv);\r\n }", "function collage() {\n $('.gallery').collagePlus(\n {\n 'fadeSpeed' : 2000,\n 'targetHeight' : 400\n }\n );\n }", "function findAlbum() {\n var i;\n \n if ($(\"#endofpage\").length) {\n $(\"#endofpage\").remove();\n }\n\n var photocontainer = document.createElement(\"div\");\n $(photocontainer).attr('id', \"photocontainer\");\n \n photonumber = photos.length;\n albumnumber = albums.length;\n \n for(i = 0 ; i < 15 && albumnumber > 0; i++) {\n //var album = albums[photo.albumId - 1];\n //console.log('post ' + postnumber + user.name);\n var flag = true;\n var search;\n while(flag && (albumnumber > 0)){\n var photo = photos[photonumber-1];\n if(photo.albumId == albums[albumnumber-1].id){\n flag = false; \n }\n photonumber--;\n }\n var image = document.createElement(\"img\");\n $(image).addClass(\"img\");\n $(image).attr('src', photo.thumbnailUrl);\n $(image).attr('alt',photo.url);\n $(image).attr('id',photo.id);\n $(image).attr(\"onclick\", \"openModal();currentSlide(\"+preview+\")\");\n \n var photosmall = document.createElement(\"div\");\n $(photosmall).append(image);\n $(photosmall).addClass(\"photosmall\"); \n \n $(photocontainer).append(photosmall);\n \n var modalImg = document.createElement(\"img\");\n $(modalImg).addClass(\"modalImg\")\n $(modalImg).attr('src', photo.url);\n $(modalImg).attr('alt', photo.title);\n $(modalImg).attr('id', photo.albumId);\n \n var modalBig = document.createElement(\"div\");\n $(modalBig).addClass(\"mySlides\");\n $(modalBig).append(modalImg);\n $(\".modal-content\").append(modalBig);\n \n var captions = document.createElement(\"div\");\n $(captions).addClass(\"captions\");\n $(captions).append(\"<p>\"+ photo.title +\"</p>\");\n var link1 = $(\"<a>\");\n $(link1).attr(\"href\", \"photos.html?album=\" + photos.albumId); //link to album\n $(link1).text(\"From: \" + albums[albumnumber-1].title);\n var link2 = $(\"<a>\");\n $(link2).attr(\"href\", \"profiles.html?user=\" + users[parseInt(albums[albumnumber-1].userId) - 1].id);\n $(link2).text(\"By: \" + users[parseInt(albums[albumnumber-1].userId) - 1].username);\n $(captions).append(link1);\n $(captions).append(\" \");\n $(captions).append(link2);\n $(\".caption-container\").append(captions);\n \n photonumber = photos.length;\n albumnumber--;\n preview++;\n }\n \n $(\"#maincontainer\").append(photocontainer);\n \n if(albums.length == 0) {\n var nores = document.createElement(\"div\");\n $(nores).text('No search results');\n $(nores).attr(\"id\", \"noresults\");\n\n $(\"#maincontainer\").append(end);\n }\n\n if(albumnumber > 0) {\n var end = document.createElement(\"div\");\n var loadbtn = document.createElement(\"button\");\n\n $(end).attr(\"id\", \"endofpage\");\n $(loadbtn).attr(\"id\", \"loadbtn\");\n\n $(end).append(loadbtn);\n $(\"#maincontainer\").append(end);\n\n $('#loadbtn').click(function(){\n findAlbum();\n });\n } else {\n var end = document.createElement(\"div\");\n $(end).css({\n 'background-image': 'url(end.png)'\n });\n $(end).attr(\"id\", \"endofpage\");\n\n $(\"#maincontainer\").append(end);\n }\n \n}", "function displayPhotos(targetFolder) {\n\t\tfolder = targetFolder || folders[0];\n\n\t\t//reset divs\n\t\tphotoElem.innerHTML = \"\";\n\t\tlistElem.innerHTML = \"\";\n\n\t\t//add images\n\t\tvar photos = getPhotos(generateBrowserStructure);\n\t}" ]
[ "0.68302476", "0.65773296", "0.6453437", "0.6437196", "0.6399625", "0.63163126", "0.62797135", "0.6272924", "0.6259257", "0.6169252", "0.61688775", "0.6164419", "0.61253667", "0.6116688", "0.6099463", "0.6036562", "0.60344017", "0.6031933", "0.6019306", "0.60041046", "0.59522116", "0.5926225", "0.59217227", "0.5915703", "0.5914484", "0.5894741", "0.5889995", "0.58609414", "0.58404076", "0.58388764", "0.5798218", "0.57749933", "0.5767144", "0.57517326", "0.5748837", "0.5744147", "0.5729983", "0.5718252", "0.57178897", "0.57077974", "0.5688799", "0.56692004", "0.5665628", "0.5664395", "0.56516993", "0.5631624", "0.56259465", "0.562457", "0.5612692", "0.56089395", "0.56088686", "0.5607594", "0.56068397", "0.56011295", "0.5592468", "0.5590709", "0.55899", "0.55822104", "0.5560049", "0.55509233", "0.5540507", "0.5535395", "0.55217844", "0.55146897", "0.55146635", "0.55095965", "0.55088127", "0.5507584", "0.55063117", "0.5506004", "0.55035144", "0.5489174", "0.5484095", "0.54831487", "0.54791266", "0.5473739", "0.54733807", "0.54702467", "0.54690754", "0.5467901", "0.5466272", "0.54638404", "0.5463615", "0.5450187", "0.5443639", "0.54435706", "0.5431328", "0.5422118", "0.5418832", "0.541613", "0.5411723", "0.5405647", "0.5404733", "0.5403752", "0.5397824", "0.5397152", "0.5392514", "0.5390067", "0.53884184", "0.538632" ]
0.70198363
0
Ajout des logos SVG.
function createSVG(where, className) { var svg = "<svg class=\"" + className + "\" width=\"64\" height=\"64\" viewBox=\"0 0 64 64\"><path class=\"ldp-icon-color\" d=\"M3.352,48.296l28.56-28.328l28.58,28.347c0.397,0.394,0.917,0.59,1.436,0.59c0.52,0,1.04-0.196,1.436-0.59 c0.793-0.787,0.793-2.062,0-2.849l-29.98-29.735c-0.2-0.2-0.494-0.375-0.757-0.475c-0.75-0.282-1.597-0.107-2.166,0.456 L0.479,45.447c-0.793,0.787-0.793,2.062,0,2.849C1.273,49.082,2.558,49.082,3.352,48.296z\"></svg>"; // Insère directement dans l'HTML la variable ci-dessus. where.insertAdjacentHTML("afterbegin", svg); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mostra_home(){\n\tvar a = \"<svg height = '3.125em' width = 'auto'>\"+\n\t\"<text x='0' y='1.0em' font-size = '2.5em' fill='blue'>Home del sito</text>\" +\n\t \"</svg>\"+\n\"<h3>Informazioni</h3>\"+\n\"<p>Sul nostro sito puoi effettuare le seguenti operazioni:\"+\n\"-Versamento di somme di senaro\"+\n\"-Agganciare una carta di credito\"+\n\"-Pagare attivita commerciali\"+\n\"-Inviare denaro\"+\n\"-Ricevere Denaro\"+\n\"-Visualizzare il proprio profilo\"+\n\"-Gestire le richieste di denaro\"+\n\"-Ricevere comunicazioni sul canale preferito scelto\"+\n\"</p>\"+\n\"<h3>Informazioni sul canale di comunicazione</h3>\"+\n\"<p>In fase di registrazione vi verra chiesto di scegliere il vostro vale di comunicazione preferito tra:\"+\n\"-Email\"+\n\"-Telegram\"+\n\"Tutte le comunicazioni verranno inoltrate in automatico nel canale scelto\"+\n\"Nel caso in cui si sia scleto Telegram è necessario attivare tale canale di comunicazione aprendo l'app\"+\n\"e scrivendo paipal nella barra di ricerca,aprite la chat che vi compare e scrivete login:tuaemail,tuapassword\"+\n\"Da quel momento riceverete tutte le comunicazioni in quella chat.\" +\n\"</p>\";\n\tdocument.getElementById(\"contenuto\").innerHTML = a;\n}", "function insertSVG() {\t\r\n\tjQuery(document).ready(function() {\r\n\t\tjQuery('img.svg').each(function(){\r\n\t\t\tvar $img = jQuery(this);\r\n\t\t\tvar imgID = $img.attr('id');\r\n\t\t\tvar imgClass = $img.attr('class');\r\n\t\t\tvar imgURL = $img.attr('src');\r\n\t\t\t\r\n\t\t\tjQuery.get(imgURL, function(data) {\r\n\t\t\t\t// Get the SVG tag, ignore the rest\r\n\t\t\t\tvar $svg = jQuery(data).find('svg');\r\n\t\t\t\t\r\n\t\t\t\t// Add replaced image's ID to the new SVG\r\n\t\t\t\tif(typeof imgID !== 'undefined') {\r\n\t\t\t\t\t$svg = $svg.attr('id', imgID);\r\n\t\t\t\t}\r\n\t\t\t\t// Add replaced image's classes to the new SVG\r\n\t\t\t\tif(typeof imgClass !== 'undefined') {\r\n\t\t\t\t\t$svg = $svg.attr('class', imgClass + ' replaced-svg');\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// Remove any invalid XML tags as per http://validator.w3.org\r\n\t\t\t\t$svg = $svg.removeAttr('xmlns:a');\r\n\t\t\t\t\r\n\t\t\t\t// Replace image with new SVG\r\n\t\t\t\t$img.replaceWith($svg);\r\n\t\t\t}, 'xml');\r\n\t\t});\t\t\r\n\t});\t\r\n\t\r\n\t$(window).load(function() {\r\n\t\t// Update the css for the github_logo class (path)\r\n\t\tjQuery('.github_logo path').css('fill', colorSentenceBorder);\r\n\t});\r\n}", "function setSVG(nom) {\r\n var elementHtmlARemplir = window.document.getElementById(\"id_image\");\r\n elementHtmlARemplir.innerHTML = nom;\r\n}", "function logistica_categoria_crear_icono() {\n var icono = $(\"#slc-icono li[name='categoria-icono'][aria-selected='true'] > i\")[\"0\"].textContent;\n var color = $(\"#slc-color li[name='categoria-color'][aria-selected='true'] > div\").attr(\"data-color\");\n\n $.ajax({\n url: \"index.php?r=categoria/getIconoSvg\",\n data: {\n icono: icono,\n color: color\n },\n dataType: \"JSON\",\n type: \"POST\",\n success: function (respuesta) {\n if (respuesta.estado === 1) {\n var svgText = respuesta.icono_svg;\n var canvas = document.getElementById(\"canvas\");\n var ctxt = canvas.getContext(\"2d\");\n\n drawInlineSVG(ctxt, svgText, function () {\n // png\n var imagenBase64 = canvas.toDataURL();\n logistica_categoria_guardar_icono(imagenBase64, icono, color);\n });\n } else {\n mensaje(respuesta.mensaje, 10000);\n\n // cerrar formulario\n cerrarPanel(formulario_carga_panel_id);\n }\n },\n error: function () {\n mensaje(\"ERROR: AL CREAR ICONO\", 10000);\n\n // cerrar formulario\n cerrarPanel(formulario_carga_panel_id);\n }\n });\n}", "function lancerJeu() {\n document.getElementById('form').classList.add('nepaAficher');\n\n function enter() {\n event.target.setAttribute(\"fill-opacity\", \"0.7\");\n }\n function out() {\n event.target.setAttribute(\"fill-opacity\", \"1\");\n }\n\n var myRandom = (function () {\n var x0 = Math.ceil(Math.random() * 300);\n var m = Math.pow(2, 31) - 1;\n return {\n init: function (s) {\n x0 = s;\n },\n next: function () {\n x0 = (x0 * 16807) % m;\n return x0;\n },\n range: function (min, max) {\n return this.next() % (max - min + 1) + min;\n }\n }\n })();\n colors = [\"red\", \"blue\", \"green\", \"yellow\", \"grey\", \"pink\", \"brown\"];\n // La fonction qui crée l'image svg en lice\n function createLine(width, height) {\n line = document.createElementNS('http://www.w3.org/2000/svg', 'line');\n line.setAttribute(\"x1\", myRandom.range(1, width));\n line.setAttribute(\"y1\", myRandom.range(1, height));\n line.setAttribute(\"x2\", myRandom.range(1, width));\n line.setAttribute(\"x2\", myRandom.range(1, height));\n line.setAttribute(\"stroke\", colors[myRandom.range(0, colors.length - 1)]);\n line.setAttribute(\"stroke-width\", myRandom.range(1, 4));\n return line.outerHTML;\n }\n /*La fonction qui crée le cercle en svg\n */\n function createCircle(width, height) {\n circle = document.createElementNS('http://www.w3.org/2000/svg', 'circle');\n circle.setAttribute(\"cx\", myRandom.range(1, width));\n circle.setAttribute(\"cy\", myRandom.range(1, height));\n circle.setAttribute(\"r\", myRandom.range(1, 100));\n circle.setAttribute(\"fill\", colors[myRandom.range(0, colors.length - 1)]);\n circle.setAttribute(\"stroke\", colors[myRandom.range(0, colors.length - 1)]);\n circle.setAttribute(\"stroke-width\", myRandom.range(1, 4));\n return circle.outerHTML;\n }\n /*\n La fonction qui crée le rectangle en svg \n */\n function createRectangle(width, height) {\n rect=document.createElementNS('http://www.w3.org/2000/svg', 'rect');\n rect.setAttribute(\"width\", myRandom.range(1, width));\n rect.setAttribute(\"height\", myRandom.range(1, height));\n rect.setAttribute(\"fill\", colors[myRandom.range(0, colors.length-1)]);\n rect.setAttribute(\"stroke\", colors[myRandom.range(0, colors.length-1)]);\n rect.setAttribute(\"stroke-width\", myRandom.range(1, 4));\n return rect.outerHTML;\n }\n /*La fonction qui crée le polygon en svg\n */\n function createPolygon(width, height) {\n polygon=document.createElementNS('http://www.w3.org/2000/svg', 'polygon');\n polygon.setAttribute(\"width\", myRandom.range(1, width));\n polygon.setAttribute(\"height\", myRandom.range(1, height));\n polygon.setAttribute(\"points\", \"100,90 70,198 190,78 10,78 160,198\");\n polygon.setAttribute(\"fill\", colors[myRandom.range(0, colors.length-1)]);\n polygon.setAttribute(\"stroke\", colors[myRandom.range(0, colors.length-1)]);\n polygon.setAttribute(\"stroke-width\", myRandom.range(1, 4));\n return polygon.outerHTML;\n }\n\n figureCreation = [createLine, createCircle,createRectangle,createPolygon ];\n for (i = 0; i < nbFigure.value; i++) {\n monJeu.figures.push({\n forme: figureCreation[myRandom.range(0, figureCreation.length - 1)](monJeu.\n width, monJeu.height)\n });\n }\n \n obj = {}\n obj.height = \"200px\";\n obj.width = \"200px\";\n obj.nbErreurs = 1;\n obj.figures = [];\n obj.figures.push({ forme: '<circle cx=\"50\" cy=\"50\" r=\"40\" stroke=\"green\" stroke-width=\"4\" fill=\"yellow\" />' }, { forme: '<circle cx=\"50\" cy=\"50\" r=\"40\" stroke=\"green\" stroke-width=\"4\" fill=\"yellow\" />' });\n function createSVG(objetJson) {\n svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');\n svg.setAttribute('width', objetJson.width);\n svg.setAttribute('height', objetJson.height);\n for (i = 0; i < objetJson.figures.length; i++) {\n svg.innerHTML += objetJson.figures[i].forme;\n }\n document.getElementById('image').innerHTML = \"\";\n document.getElementById('image').appendChild(svg);\n clone = svg.cloneNode(true);\n fils = clone.getElementsByTagName('*');\n for (i = 0; i < fils.length; i++) {\n fils[i].erreur = false;\n fils[i].addEventListener(\"click\", test);\n fils[i].addEventListener(\"mouseenter\", enter);\n fils[i].addEventListener(\"mouseout\", out);\n }\n i = objetJson.nbErreurs;\n while (i) {\n el = myRandom.range(0, fils.length - 1);\n if (!fils[el].erreur) {\n fils[el].erreur = true;\n if (fils[el].nodeName == \"circle\") {\n r = fils[el].getAttribute(\"r\");\n r *= 1.5; //1.2\n fils[el].setAttribute(\"r\", r);\n }\n else if (fils[el].nodeName == \"line\") {\n strokeWidth = fils[el].getAttribute(\"stroke-width\");\n strokeWidth = 7;\n fils[el].setAttribute(\"stroke-width\", strokeWidth);\n }\n else\n fils[el].setAttribute(\"fill\", \"grey\");\n i--;\n }\n }\n document.getElementById('image-clone').appendChild(clone);\n }\n \n var countErreur = nbErreurs.value;\n // Cette fonction nous permet de d'effacer l'erreur si l'on clique après l'avoir detecter\n function test() {\n //alert('Bien joué');\n if (event.target.erreur) {\n event.target.parentNode.removeChild(event.target);\n event.target.erreur = false;\n countErreur--;\n if (countErreur == 0) {\n clearInterval(interval);\n alert(\"Vous avez gagnez !!!\");\n document.getElementById('image').innerHTML=\"\";\n document.getElementById('image-clone').innerHTML=\"\";\n document.getElementById('form').classList.remove('nepaAficher');\n document.getElementById('timer').classList.add('nepaAficher');\n \n }\n }\n else\n alert(\"Ceci n'est pas une erreur\");\n console.log(event.target);\n }\n createSVG(monJeu); \n \n // getJson('http://richard-ostrowski.eu/ADMS/fig1.php');\n }", "function addSVG(svgs) {\n $j.each(svgs, function(svg,opt){\n var svg = svg,\n selector = $j(opt.selector);\n\n if($j('#'+svg).length){\n if(selector.length > 0 && selector.find('.'+svg).length == 0){\n var mode = (typeof opt.mode != 'undefined' ) ? opt.mode : 'append',\n ratio = (typeof opt.ratio != 'undefined' ) ? opt.ratio : true,\n aspect = '';\n\n if(ratio === false){\n aspect = ' preserveAspectRatio=\"none\"';\n }\n\n var ready_svg = '<svg class=\"ico '+svg+'\"'+aspect+'><use xlink:href=\"#'+svg+'\" /></svg>';\n\n selector.each(function(i,el){\n if(mode === 'prepend'){\n $j(el).prepend(ready_svg);\n }else if(mode === 'html'){\n $j(el).html(ready_svg);\n }else{\n $j(el).append(ready_svg);\n }\n });\n }\n }else{\n console.error('Interface - o SVG sprite #'+svg+' não existe.');\n }\n });\n}", "function route_logo(route_id) {\n\t$img = $('<img src=\"./images/routes/' + route_id.toLowerCase() + '.svg\">')\n\t$img.click({route_id : route_id}, load_route_from_event)\n\treturn $img\n}", "function createSvg() {\n svg = d3Service.select(parentElement).append(\"svg\");\n }", "createIcon() {\n const iconUri = `file://${Me.path}/icons/icon.svg`;\n const iconFile = Gio.File.new_for_uri(iconUri);\n const gicon = new Gio.FileIcon({ file: iconFile });\n const icon = new St.Icon({\n gicon: gicon,\n style_class: 'system-status-icon'\n });\n this.add_child(icon);\n }", "function createIcon(data_Term){\n let str_tag = replaceAll(data_Term.command_data[\"patient_id\"], \" \", \"_\");\n let str_icon = \"/svg/\" + replaceAll(data_Term.command_data.icon, \" \", \"_\");\n\n let imageIcon = document.createElementNS(\"http://www.w3.org/2000/svg\", 'image');\n imageIcon.setAttributeNS('http://www.w3.org/1999/xlink', 'href', str_icon);\n imageIcon.setAttribute('id', 'icon_' + str_tag);\n imageIcon.setAttribute('width', '30');\n imageIcon.setAttribute('height', '30');\n imageIcon.setAttribute('opacity', '0');\n imageIcon.setAttribute('x', parseInt(data_Term.command_data.from_x) - 15);\n imageIcon.setAttribute('y', parseInt(data_Term.command_data.from_y) - 26);\n\n let pathLine = document.createElementNS(\"http://www.w3.org/2000/svg\", 'polygon');\n pathLine.setAttribute('points', data_Term.command_data.from_x + ', ' + data_Term.command_data.from_y + ', ' + data_Term.command_data.from_x + ', ' + data_Term.command_data.from_y + '');\n pathLine.setAttribute('id', 'path_' + str_tag);\n pathLine.setAttribute('stroke', '#455');\n pathLine.setAttribute('stroke-dasharray', '5,10');\n pathLine.setAttribute('opacity', '0');\n pathLine.setAttribute('stroke-linecap', 'round');\n pathLine.setAttribute('stroke-width', '3');\n\n El('#icon_path').appendChild(pathLine);\n El('#icon_location').appendChild(imageIcon);\n}", "function ganaste(){\n document.querySelector(\"div.imagen-juego img\").setAttribute(\"src\", \"images/win.svg\");\n inhabilitarOpcionYmostrar();\n}", "function OnDrawGizmos() {\n\tGizmos.DrawIcon(transform.position, \"Player_Icon.tif\");\n}", "function createLogo(){\n var myDiv = document.getElementById('arqsiWidgetLogo_div'); \n //myDiv.style.top = \"top\";\n var a = document.createElement(\"a\");\n var logo = document.createElement(\"img\");\n logo.src = HOST + 'images/logo_ISEP_2_transparente.png';\n logo.style.height = 50;\n logo.style.border = 0;\n a.href = 'http://dei.isep.ipp.pt';\n a.appendChild(logo);\n myDiv.appendChild(a);\n}", "function Bandeau() {\n\n \n return(\n <>\n\n <div>\n <div className=\"bandeauHeader\" id=\"navBandeau\">\n <h1 className=\"bandeauH1\"><h2 className=\"HeaderTitle\">Battle Changer ⚔️</h2></h1>\n <svg classNamme=\"bandeauSvg\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 200 100\" preserveAspectRatio=\"none\">\n <circle fill=\"#D7B899\" cx=\"0\" cy=\"100\" r=\"100\" />\n <circle fill=\"#D7B899\" cx=\"200\" cy=\"100\" r=\"100\" />\n </svg>\n </div> \n </div>\n\n </>\n )\n}", "function drawlogo (x, y, size, teamName) {\n\treturn svg.append(\"svg:image\")\n\t\t.attr(\"xlink:href\", \"../Resources/logos/logo_\" + teamName + \".png\")\n\t\t.attr(\"x\", x)\n\t\t.attr(\"y\", y)\n\t\t.attr(\"width\", size)\n\t\t.attr(\"height\", size);\n}", "function perdiste(){\n document.querySelector(\"div.imagen-juego img\").setAttribute(\"src\", \"images/lose.svg\");\n inhabilitarOpcionYmostrar();\n}", "constructor(type, width, height) {\n this.type = type;\n if (type === \"add\") {\n this.svg = `\n <svg width=\"${width ?? 18}\" class=\"icon, ${type}\" height=\"${\n height ?? 18\n }\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path class=\"filling\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M10 0C4.48 0 0 4.48 0 10C0 15.52 4.48 20 10 20C15.52 20 20 15.52 20 10C20 4.48 15.52 0 10 0ZM9 5V9H5V11H9V15H11V11H15V9H11V5H9ZM2 10C2 14.41 5.59 18 10 18C14.41 18 18 14.41 18 10C18 5.59 14.41 2 10 2C5.59 2 2 5.59 2 10Z\" />\n </svg>\n `;\n } else if (type === \"delete\") {\n this.svg = `\n <svg width=\"${width ?? 24}\" class=\"icon, ${type}\" height=\"${\n height ?? 24\n }\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path class=\"filling\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M14.5 3L15.5 4H19V6H5V4H8.5L9.5 3H14.5ZM6 19C6 20.1 6.9 21 8 21H16C17.1 21 18 20.1 18 19V7H6V19ZM8 9H16V19H8V9Z\"/>\n </svg>\n `;\n } else if (type === \"cancel\") {\n this.svg = `\n <svg width=\"${width ?? 24}\" class=\"icon, ${type}\" height=\"${\n height ?? 24\n }\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path class=\"filling\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M12 0C5.364 0 0 5.364 0 12C0 18.636 5.364 24 12 24C18.636 24 24 18.636 24 12C24 5.364 18.636 0 12 0ZM12 21.6C6.708 21.6 2.4 17.292 2.4 12C2.4 6.70799 6.708 2.39999 12 2.39999C17.292 2.39999 21.6 6.70799 21.6 12C21.6 17.292 17.292 21.6 12 21.6ZM12 10.308L16.308 6L18 7.692L13.692 12L18 16.308L16.308 18L12 13.692L7.692 18L6 16.308L10.308 12L6 7.692L7.692 6L12 10.308Z\" fill=\"#2F4B34\"/>\n </svg> \n `;\n } else if (type === \"link\") {\n this.svg = `\n <svg width=\"${width ?? 24}\" class=\"icon, ${type}\" height=\"${\n height ?? 24\n }\" viewBox=\"0 0 20 10\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path class=\"filling\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M9 8H5C3.35 8 2 6.65 2 5C2 3.35 3.35 2 5 2H9V0L5 0C2.24 0 0 2.24 0 5C0 7.76 2.24 10 5 10H9V8ZM15 0L11 0V2H15C16.65 2 18 3.35 18 5C18 6.65 16.65 8 15 8H11V10H15C17.76 10 20 7.76 20 5C20 2.24 17.76 0 15 0ZM14 4H6V6H14V4Z\"/>\n </svg>\n\n `;\n } else if (type === \"export\") {\n this.svg = `\n <svg width=\"${width ?? 24}\" class=\"icon, ${type}\" height=\"${\n height ?? 24\n }\" viewBox=\"0 0 36 36\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g id=\"check_circle_outline_24px\">\n <path class=\"filling\" id=\"icon/action/check_circle_outline_24px\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M18 3C9.72 3 3 9.72 3 18C3 26.28 9.72 33 18 33C26.28 33 33 26.28 33 18C33 9.72 26.28 3 18 3ZM18 30C11.385 30 6 24.615 6 18C6 11.385 11.385 6 18 6C24.615 6 30 11.385 30 18C30 24.615 24.615 30 18 30ZM15 21.255L24.885 11.37L27 13.5L15 25.5L9 19.5L11.115 17.385L15 21.255Z\"/>\n </g>\n </svg>\n `;\n } else if (type === \"cancelExport\") {\n this.svg = `\n <svg width=\"${width ?? 24}\"class=\"icon, ${type}\" height=\"${\n height ?? 24\n }\" viewBox=\"0 0 30 30\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" class=\"filling\" clip-rule=\"evenodd\" d=\"M15 0C6.705 0 0 6.705 0 15C0 23.295 6.705 30 15 30C23.295 30 30 23.295 30 15C30 6.705 23.295 0 15 0ZM15 27C8.385 27 3 21.615 3 15C3 8.385 8.385 3 15 3C21.615 3 27 8.385 27 15C27 21.615 21.615 27 15 27ZM15 12.885L20.385 7.5L22.5 9.615L17.115 15L22.5 20.385L20.385 22.5L15 17.115L9.615 22.5L7.5 20.385L12.885 15L7.5 9.615L9.615 7.5L15 12.885Z\" />\n </svg>\n `;\n } else if (type === \"edit\") {\n this.svg = `\n <svg class=\"icon, ${type}\" width=\"${width ?? 20}\" height=\"${\n height ?? 20\n }\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g id=\"mode_24px\">\n <path class=\"filling\" id=\"icon/editor/mode_24px\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M17.6588 3C17.4088 3 17.1487 3.10001 16.9587 3.28999L15.1288 5.12L18.8788 8.87L20.7087 7.03999C21.0988 6.64999 21.0988 6.02 20.7087 5.63L18.3687 3.28999C18.1688 3.09 17.9188 3 17.6588 3ZM14.0587 9.02L14.9788 9.94L5.91876 19H4.99875V18.08L14.0587 9.02ZM2.99875 17.25L14.0587 6.19L17.8087 9.94L6.74875 21H2.99875V17.25Z\" fill-opacity=\"0.54\"/>\n </g>\n </svg> \n `;\n } else if (type === \"help\") {\n this.svg = `\n <svg class=\"icon, ${type}\" width=\"${width ?? 24}\" height=\"${\n height ?? 24\n }\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g id=\"help_outline_24px\">\n <path class=\"filling\" id=\"icon/action/help_outline_24px\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M2 12C2 6.48 6.47998 2 12 2C17.52 2 22 6.48 22 12C22 17.52 17.52 22 12 22C6.47998 22 2 17.52 2 12ZM13 16V18H11V16H13ZM12 20C7.58997 20 4 16.41 4 12C4 7.59 7.58997 4 12 4C16.41 4 20 7.59 20 12C20 16.41 16.41 20 12 20ZM8 10C8 7.79 9.79004 6 12 6C14.21 6 16 7.79 16 10C16 11.2829 15.21 11.9733 14.4408 12.6455C13.7111 13.2833 13 13.9046 13 15H11C11 13.1787 11.9421 12.4566 12.7704 11.8217C13.4203 11.3236 14 10.8792 14 10C14 8.9 13.1 8 12 8C10.9 8 10 8.9 10 10H8Z\"/>\n </g>\n </svg>\n `;\n } else if (type === \"cog\") {\n this.svg = `\n <svg class=\"icon, ${type}\" width=\"${width ?? 24}\" height=\"${\n height ?? 24\n }\" viewBox=\"0 0 30 30\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path class=\"filling\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M26.569 15C26.569 15.51 26.5227 15.99 26.4611 16.47L29.7148 18.945C30.0078 19.17 30.0849 19.575 29.8999 19.905L26.8157 25.095C26.677 25.335 26.4148 25.47 26.1526 25.47C26.0601 25.47 25.9676 25.455 25.8751 25.425L22.0353 23.925C21.2334 24.51 20.3698 25.02 19.4292 25.395L18.8432 29.37C18.7969 29.73 18.4731 30 18.0876 30H11.9192C11.5337 30 11.2099 29.73 11.1636 29.37L10.5776 25.395C9.63697 25.02 8.7734 24.525 7.97152 23.925L4.13174 25.425C4.05464 25.455 3.96211 25.47 3.86959 25.47C3.59202 25.47 3.32986 25.335 3.19107 25.095L0.106915 19.905C-0.0781347 19.575 -0.00103071 19.17 0.291964 18.945L3.54575 16.47C3.48407 15.99 3.43781 15.495 3.43781 15C3.43781 14.505 3.48407 14.01 3.54575 13.53L0.291964 11.055C-0.00103071 10.83 -0.0935555 10.425 0.106915 10.095L3.19107 4.905C3.32986 4.665 3.59202 4.53 3.85417 4.53C3.94669 4.53 4.03922 4.545 4.13174 4.575L7.97152 6.075C8.7734 5.49 9.63697 4.98 10.5776 4.605L11.1636 0.63C11.2099 0.27 11.5337 0 11.9192 0H18.0876C18.4731 0 18.7969 0.27 18.8432 0.63L19.4292 4.605C20.3698 4.98 21.2334 5.475 22.0353 6.075L25.8751 4.575C25.9522 4.545 26.0447 4.53 26.1372 4.53C26.4148 4.53 26.677 4.665 26.8157 4.905L29.8999 10.095C30.0849 10.425 30.0078 10.83 29.7148 11.055L26.4611 13.53C26.5227 14.01 26.569 14.49 26.569 15ZM23.4849 15C23.4849 14.685 23.4694 14.37 23.4077 13.905L23.1919 12.21L24.5643 11.16L26.2143 9.88501L25.1349 8.07001L23.1764 8.83501L21.5418 9.48001L20.1385 8.43001C19.5217 7.98001 18.9049 7.63501 18.2418 7.36501L16.6072 6.72001L16.3604 5.02501L16.0674 3.00001H13.924L13.6155 5.02501L13.3688 6.72001L11.7342 7.36501C11.1019 7.62001 10.4697 7.98001 9.8066 8.46001L8.41873 9.48001L6.81497 8.85001L4.85652 8.08501L3.77707 9.90001L5.44252 11.16L6.81497 12.21L6.59908 13.905C6.55281 14.355 6.52197 14.7 6.52197 15C6.52197 15.3 6.55281 15.645 6.59908 16.11L6.81497 17.805L5.44252 18.855L3.77707 20.115L4.85652 21.93L6.81497 21.165L8.44957 20.52L9.85286 21.57C10.4697 22.02 11.0865 22.365 11.7496 22.635L13.3842 23.28L13.631 24.975L13.924 27H16.0829L16.3913 24.975L16.638 23.28L18.2726 22.635C18.9049 22.38 19.5371 22.02 20.2002 21.54L21.5881 20.52L23.1919 21.15L25.1503 21.915L26.2298 20.1L24.5643 18.84L23.1919 17.79L23.4077 16.095C23.454 15.645 23.4849 15.315 23.4849 15ZM15.0034 8.99999C11.5954 8.99999 8.83508 11.685 8.83508 15C8.83508 18.315 11.5954 21 15.0034 21C18.4114 21 21.1717 18.315 21.1717 15C21.1717 11.685 18.4114 8.99999 15.0034 8.99999ZM11.9193 15C11.9193 16.65 13.3071 18 15.0034 18C16.6997 18 18.0876 16.65 18.0876 15C18.0876 13.35 16.6997 12 15.0034 12C13.3071 12 11.9193 13.35 11.9193 15Z\" />\n </svg>\n `;\n } else throw new Error(\"Unknown AddButton type\");\n }", "function createCreateIcon() { return $('<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\"><path d=\"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z\"></path></svg>'); }", "function afficheImagePictoSvg(classOrId) {\n //Pas de modification pour la PG\n if (window.location.href.indexOf(\"/infos-trafic\") !== -1 || window.location.href.indexOf(\"/trafic-\") !== -1\n || window.location.href.indexOf(\"/travaux\") !== -1 || $(\".crise-niveau-deux\").length > 0\n || $(\".crise-niveau-trois--bg\").length > 0) {\n return false;\n }\n var pictoList = $(classOrId).find('.picto');\n $.each(pictoList, function () {\n var that = $(this),\n thatClassArray = that.attr('class').split(' '),\n thatText = that.text(),\n network = thatClassArray[1],\n name = thatClassArray.pop(),\n thatImgSrc = '',\n thatImg = new Image();\n if (that.find('img').length === 0 && (window.location.href.indexOf(\"/itineraires\") === -1 || window.location.href.indexOf(\"/itineraires\") !== -1 && classOrId === '#drupal-modal')) {\n if ('walk' === network) {\n thatImgSrc = '/sites/default/files/network/marche.svg';\n } else {\n thatImgSrc = '/sites/default/files/network/' + network + '/' + name + '.svg';\n }\n thatImg.src = thatImgSrc;\n $.get(thatImgSrc).done(function () {\n // img exist on server, display it\n thatImg.src = thatImgSrc;\n that.html(thatImg);\n }).fail(function () {\n // img doesn't exist on server, display previous line text instead\n that.html(thatText);\n });\n }\n });\n }", "drawSvg() {\n \n\t}", "function createIcon() {\r\n\tlet svg = document.createElementNS(\"http://www.w3.org/2000/svg\", \"svg\");\r\n\tlet g = document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\");\r\n\tlet path = document.createElementNS(\"http://www.w3.org/2000/svg\", \"path\");\r\n\r\n\tsvg.setAttribute('version', '1.1');\r\n\tsvg.setAttribute('xmlns', 'http://www.w3.org/2000/svg');\r\n\tsvg.setAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink');\r\n\tsvg.setAttribute('x', '0px');\r\n\tsvg.setAttribute('y', '0px');\r\n\tsvg.setAttribute('width', '40px');\r\n\tsvg.setAttribute('height', '40px');\r\n\tsvg.setAttribute('viewBox', '0 0 446.843 446.843');\r\n\tsvg.setAttribute('style', 'enable-background:new 0 0 446.843 446.843;');\r\n\tsvg.setAttribute('xml:space', 'preserve');\r\n\r\n\tpath.setAttribute('d', 'M444.09,93.103c-2.698-3.699-7.006-5.888-11.584-5.888H109.92c-0.625,0-1.249,0.038-1.85,0.119l-13.276-38.27c-1.376-3.958-4.406-7.113-8.3-8.646L19.586,14.134c-7.374-2.887-15.695,0.735-18.591,8.1c-2.891,7.369,0.73,15.695,8.1,18.591l60.768,23.872l74.381,214.399c-3.283,1.144-6.065,3.663-7.332,7.187l-21.506,59.739c-1.318,3.663-0.775,7.733,1.468,10.916c2.24,3.183,5.883,5.078,9.773,5.078h11.044c-6.844,7.616-11.044,17.646-11.044,28.675c0,23.718,19.298,43.012,43.012,43.012s43.012-19.294,43.012-43.012c0-11.029-4.2-21.059-11.044-28.675h93.776c-6.847,7.616-11.048,17.646-11.048,28.675c0,23.718,19.294,43.012,43.013,43.012c23.718,0,43.012-19.294,43.012-43.012c0-11.029-4.2-21.059-11.043-28.675h13.433c6.599,0,11.947-5.349,11.947-11.948c0-6.599-5.349-11.947-11.947-11.947H143.647l13.319-36.996c1.72,0.724,3.578,1.152,5.523,1.152h210.278c6.234,0,11.751-4.027,13.65-9.959l59.739-186.387C447.557,101.567,446.788,96.802,444.09,93.103z M169.659,409.807c-10.543,0-19.116-8.573-19.116-19.116s8.573-19.117,19.116-19.117s19.116,8.574,19.116,19.117S180.202,409.807,169.659,409.807z M327.367,409.807c-10.543,0-19.117-8.573-19.117-19.116s8.574-19.117,19.117-19.117c10.542,0,19.116,8.574,19.116,19.117S337.909,409.807,327.367,409.807z M402.52,148.149h-73.161V115.89h83.499L402.52,148.149z M381.453,213.861h-52.094v-37.038h63.967L381.453,213.861z M234.571,213.861v-37.038h66.113v37.038H234.571z M300.684,242.538v31.064h-66.113v-31.064H300.684z M139.115,176.823h66.784v37.038h-53.933L139.115,176.823z M234.571,148.149V115.89h66.113v32.259H234.571z M205.898,115.89v32.259h-76.734l-11.191-32.259H205.898z M161.916,242.538h43.982v31.064h-33.206L161.916,242.538z M329.359,273.603v-31.064h42.909l-9.955,31.064H329.359z');\r\n\r\n\tg.appendChild(path);\r\n\tsvg.appendChild(g);\r\n\r\n\tlet div = DOM.createElement('div', {\r\n\t\tid: 'cartIcon',\r\n\t});\r\n\r\n\tdiv.appendChild(svg);\r\n\r\n\treturn div;\r\n}", "function Icon(el,config){if(el&&el.tagName!='svg'){el=angular.element('<svg xmlns=\"http://www.w3.org/2000/svg\">').append(el.cloneNode(true))[0];}// Inject the namespace if not available...\n\tif(!el.getAttribute('xmlns')){el.setAttribute('xmlns',\"http://www.w3.org/2000/svg\");}this.element=el;this.config=config;this.prepare();}", "function get_svg_icon(p_icon,p_width,p_height,p_color,p_is_css_background) {\r\n var C_icon = {};\r\n var l_svg = '';\r\n\r\n p_width = p_width || 16;\r\n p_height = p_height || 16;\r\n p_color = p_color || '#000000';\r\n\r\n\r\n // Moon\r\n C_icon.moon = '<svg width=\"%%\" height=\"%%\" viewBox=\"0 0 1792 1792\"'\r\n + ' xmlns=\"http://www.w3.org/2000/svg\"><path fill=\"%%\" d=\"M1390 1303q-54 9-110 9-182'\r\n + ' 0-337-90t-245-245-90-337q0-192 104-357-201 60-328.5 229t-127.5 384q0 130 51'\r\n + ' 248.5t136.5 204 204 136.5 248.5 51q144 0 273.5-61.5t220.5-171.5zm203-85q-94'\r\n + ' 203-283.5 324.5t-413.5 121.5q-156 0-298-61t-245-164-164-245-61-298q0-153'\r\n + ' 57.5-292.5t156-241.5 235.5-164.5 290-68.5q44-2 61 39 18 41-15 72-86 78-131.5'\r\n + ' 181.5t-45.5 218.5q0 148 73 273t198 198 273 73q118 0 228-51 41-18 72 13 14 14'\r\n + ' 17.5 34t-4.5 38z\"/></svg>';\r\n\r\n // Sun\r\n C_icon.sun = '<svg width=\"%%\" height=\"%%\" viewBox=\"0 0 1792 1792\"'\r\n + ' xmlns=\"http://www.w3.org/2000/svg\"><path fill=\"%%\" d=\"M1472'\r\n + ' 896q0-117-45.5-223.5t-123-184-184-123-223.5-45.5-223.5 45.5-184 123-123 184-45.5'\r\n + ' 223.5 45.5 223.5 123 184 184 123 223.5 45.5 223.5-45.5 184-123 123-184'\r\n + ' 45.5-223.5zm276 277q-4 15-20 20l-292 96v306q0 16-13 26-15 10-29 4l-292-94-180'\r\n + ' 248q-10 13-26 13t-26-13l-180-248-292 94q-14'\r\n + ' 6-29-4-13-10-13-26v-306l-292-96q-16-5-20-20-5-17 4-29l180-248-180-248q-9-13-4-29'\r\n + ' 4-15 20-20l292-96v-306q0-16 13-26 15-10 29-4l292 94 180-248q9-12 26-12t26 12l180'\r\n + ' 248 292-94q14-6 29 4 13 10 13 26v306l292 96q16 5 20 20 5 16-4 29l-180 248 180'\r\n + ' 248q9 12 4 29z\"/></svg>';\r\n\r\n // Horizontal arrows\r\n C_icon.arrows_h\r\n = '<svg version=\"1.1\" viewBox=\"0 0 477.427 477.427\" style=\"enable-background:new 0 0 477.427 477.427;\"'\r\n + ' xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"'\r\n + ' xml:space=\"preserve\">'\r\n + '<g>'\r\n + '<polygon points=\"101.82,187.52 57.673,143.372 476.213,143.372 476.213,113.372 57.181,113.372 101.82,68.733 80.607,47.519 '\r\n + '0,128.126 80.607,208.733 \t\"/>'\r\n + '<polygon points=\"396.82,268.694 375.607,289.907 420,334.301 1.213,334.301 1.213,364.301 420,364.301 375.607,408.694 '\r\n + ' 396.82,429.907 477.427,349.301 \t\"/>'\r\n + '</g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g>'\r\n + '</svg>';\r\n\r\n // Forbidden icons\r\n C_icon.forbidden\r\n = ' <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 500 500\" width=\"%%\" height=\"%%\"> '\r\n + ' <path fill=\"#FFF\" stroke-width=\"45\" stroke=\"#F00\" d=\"M86,88a230,230 0 1,0 1-1zL412,412\"/> '\r\n + ' </svg>';\r\n\r\n // Arrow left\r\n C_icon.arrow_left\r\n = '<svg width=\"%%\" height=\"%%\" viewBox=\"0 0 792 792\"'\r\n + ' xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"1.1\"'\r\n + ' style=\"enable-background:new 0 0 792 792;\" xml:space=\"preserve\"><rect id=\"backgroundrect\" width=\"100%\" height=\"100%\" x=\"0\" y=\"0\" fill=\"none\" stroke=\"none\"/>'\r\n + '<g class=\"currentLayer\">'\r\n + '<g id=\"svg_1\" class=\"\" transform=\"rotate(90,396,396) \">'\r\n + '<g id=\"svg_2\">'\r\n + ' <path d=\"M371.671,649.763c6.019,6.849,14.499,11.316,24.29,11.316c0.081,0,0.188-0.08,0.294-0.08c0.08,0,0.187,0.08,0.294,0.08 '\r\n + ' c8.373,0,16.746-3.184,23.14-9.577l270.537-270.563c12.787-12.76,12.787-33.493,0-46.253c-12.787-12.787-33.467-12.787-46.254,0 '\r\n + ' L428.679,550.008V32.69c0-18.083-14.634-32.69-32.717-32.69c-18.084,0-32.717,14.606-32.717,32.69v516.408L147.977,334.686 '\r\n + ' c-12.814-12.787-33.52-12.573-46.28,0.134c-12.76,12.787-12.68,33.466,0.107,46.253L371.671,649.763z\" id=\"svg_3\"/>'\r\n + ' <path d=\"M667.086,726.593H124.89c-18.084,0-32.717,14.553-32.717,32.69c0,18.004,14.633,32.717,32.717,32.717h542.223 '\r\n + ' c18.084,0,32.717-14.713,32.717-32.717C699.803,741.146,685.17,726.593,667.086,726.593z\" id=\"svg_4\"/>'\r\n + '</g></g></g>'\r\n + '</svg>';\r\n\r\n\r\n\r\n // Arrow right\r\n C_icon.arrow_right = C_icon.arrow_left;\r\n C_icon.arrow_right = C_icon.arrow_right.replace('rotate(90','rotate(270');\r\n\r\n\r\n // Determine width, height & color\r\n l_svg = C_icon[p_icon] || '';\r\n l_svg = l_svg.replace('%%',p_width);\r\n l_svg = l_svg.replace('%%',p_height);\r\n l_svg = l_svg.replace('%%',p_color);\r\n\r\n if (p_is_css_background) return '{ background : url(data:image/svg+xml;base64,' + btoa(l_svg) + ') no-repeat; }';\r\n\r\n return l_svg;\r\n}", "function insertSVGWeb() {\n document.write('<script type=\"text/javascript\" '\n + 'src=\"' + svgSrcURL + '\" '\n + 'data-path=\"' + svgDataPath + '\" '\n + 'data-debug=\"' + svgDebug + '\"></script>');\n}", "function LogoSvg(props) {\n return (\n <Svg\n id=\"prefix__Layer_1\"\n data-name=\"Layer 1\"\n viewBox=\"0 0 132.32 197.94\"\n {...props}\n >\n <Defs>\n <ClipPath id=\"prefix__clip-path\" transform=\"translate(18.71 24.68)\">\n <Path\n className=\"prefix__cls-1\"\n transform=\"rotate(-45 47.5 47.535)\"\n d=\"M14.59 14.63h65.83v65.81H14.59z\"\n />\n </ClipPath>\n </Defs>\n <G id=\"prefix__Grupo_34\" data-name=\"Grupo 34\">\n <G id=\"prefix__Grupo_33\" data-name=\"Grupo 33\">\n <G clipPath=\"url(#prefix__clip-path)\">\n <G id=\"prefix__Grupo_32\" data-name=\"Grupo 32\">\n <G id=\"prefix__Grupo_27\" data-name=\"Grupo 27\">\n <G id=\"prefix__Grupo_22\" data-name=\"Grupo 22\">\n <G id=\"prefix__Grupo_19\" data-name=\"Grupo 19\">\n <Path\n id=\"prefix__Caminho_16\"\n data-name=\"Caminho 16\"\n className=\"prefix__cls-3\"\n d=\"M47.5 106.83l-65.4-65.4L47.5-24l65.4 65.4zm-59.89-65.4l59.9 59.9 59.9-59.9-59.9-59.9z\"\n transform=\"translate(18.71 24.68)\"\n />\n </G>\n <G id=\"prefix__Grupo_20\" data-name=\"Grupo 20\">\n <Path\n id=\"prefix__Caminho_17\"\n data-name=\"Caminho 17\"\n className=\"prefix__cls-3\"\n d=\"M47.5 94.3L-5.37 41.43 47.5-11.44l52.87 52.87zM.14 41.43L47.5 88.8l47.37-47.37L47.5-5.94z\"\n transform=\"translate(18.71 24.68)\"\n />\n </G>\n <G id=\"prefix__Grupo_21\" data-name=\"Grupo 21\">\n <Path\n id=\"prefix__Caminho_18\"\n data-name=\"Caminho 18\"\n className=\"prefix__cls-3\"\n d=\"M47.51 82.07L6.87 41.43 47.51.79l40.63 40.64zM12.37 41.43l35.14 35.14 35.14-35.14L47.51 6.29z\"\n transform=\"translate(18.71 24.68)\"\n />\n </G>\n </G>\n <G id=\"prefix__Grupo_26\" data-name=\"Grupo 26\">\n <G id=\"prefix__Grupo_23\" data-name=\"Grupo 23\">\n <Path\n id=\"prefix__Caminho_19\"\n data-name=\"Caminho 19\"\n className=\"prefix__cls-3\"\n d=\"M47.4 172.55l-65.4-65.4 65.4-65.4 65.4 65.4zm-59.9-65.4l59.9 59.9 59.9-59.9-59.9-59.9z\"\n transform=\"translate(18.71 24.68)\"\n />\n </G>\n <G id=\"prefix__Grupo_24\" data-name=\"Grupo 24\">\n <Path\n id=\"prefix__Caminho_20\"\n data-name=\"Caminho 20\"\n className=\"prefix__cls-3\"\n d=\"M47.4 160l-52.87-52.84L47.4 54.29l52.87 52.87zM0 107.16l47.4 47.36 47.37-47.36L47.4 59.79z\"\n transform=\"translate(18.71 24.68)\"\n />\n </G>\n <G id=\"prefix__Grupo_25\" data-name=\"Grupo 25\">\n <Path\n id=\"prefix__Caminho_21\"\n data-name=\"Caminho 21\"\n className=\"prefix__cls-3\"\n d=\"M47.4 147.79L6.76 107.15 47.4 66.52 88 107.15zm-35.14-40.64l35.14 35.14 35.14-35.14L47.4 72z\"\n transform=\"translate(18.71 24.68)\"\n />\n </G>\n </G>\n </G>\n <G id=\"prefix__Grupo_28\" data-name=\"Grupo 28\">\n <Path\n id=\"prefix__Ret\\xE2ngulo_13\"\n data-name=\"Ret\\xE2ngulo 13\"\n className=\"prefix__cls-3\"\n transform=\"rotate(-45 74.87 69.578)\"\n d=\"M33.94 61.41h3.56v36.81h-3.56z\"\n />\n </G>\n <G id=\"prefix__Grupo_29\" data-name=\"Grupo 29\">\n <Path\n id=\"prefix__Ret\\xE2ngulo_14\"\n data-name=\"Ret\\xE2ngulo 14\"\n className=\"prefix__cls-3\"\n transform=\"rotate(-45 125.44 32.061)\"\n d=\"M84.51 33.13h3.56v18.35h-3.56z\"\n />\n </G>\n <G id=\"prefix__Grupo_30\" data-name=\"Grupo 30\">\n <Path\n id=\"prefix__Ret\\xE2ngulo_15\"\n data-name=\"Ret\\xE2ngulo 15\"\n className=\"prefix__cls-3\"\n transform=\"rotate(-45 99.625 68.334)\"\n d=\"M41.24 76.8h38.47v3.56H41.24z\"\n />\n </G>\n <G id=\"prefix__Grupo_31\" data-name=\"Grupo 31\">\n <Path\n id=\"prefix__Ret\\xE2ngulo_16\"\n data-name=\"Ret\\xE2ngulo 16\"\n className=\"prefix__cls-3\"\n transform=\"rotate(-45 48.487 31.426)\"\n d=\"M.17 39.89h18.35v3.56H.17z\"\n />\n </G>\n </G>\n </G>\n <Path\n className=\"prefix__cls-1\"\n transform=\"rotate(-45 86.641 37.302)\"\n d=\"M14.59 14.63h65.83v65.81H14.59z\"\n />\n </G>\n </G>\n <Path\n id=\"prefix__Ret\\xE2ngulo_18\"\n data-name=\"Ret\\xE2ngulo 18\"\n transform=\"rotate(-45 86.551 15.6)\"\n fill=\"#04b2d9\"\n d=\"M42.22 20.65H52.6v10.38H42.22z\"\n />\n </Svg>\n )\n}", "createSmallSVG(initDiv) {\n return initDiv.append('svg')\n .attr('width', 20)\n .attr('height', 40)\n .style(\"margin\", \"5px\")\n .style(\"display\",\"table-row\")\n .style(\"background-color\", \"Blue\");\n }", "function carregar_svg(){\r\n $('img.svg').each(function(){\r\n var $img = $(this);\r\n var imgID = $img.attr('id');\r\n var imgClass = $img.attr('class');\r\n var imgURL = $img.attr('src');\r\n\r\n $.get(imgURL, function(data) {\r\n var $svg = $(data).find('svg');\r\n if (typeof imgID !== 'undefined') { $svg = $svg.attr('id', imgID); }\r\n if (typeof imgClass !== 'undefined') { $svg = $svg.attr('class', imgClass+' replaced-svg'); }\r\n $svg = $svg.removeAttr('xmlns:a');\r\n $img.replaceWith($svg);\r\n });\r\n });\r\n}", "function injectSVG() {\n\n\t\tvar ajax = new XMLHttpRequest();\n\n\t\tajax.open('GET', 'assets/img/svg.svg?v=4', true);\n\t\tajax.send();\n\t\tajax.onload = function(e) {\n\n\t\t\tvar div = document.createElement('div');\n\t\t\tdiv.id = 'svgInject';\n\t\t\tdiv.innerHTML = ajax.responseText;\n\t\t\tdocument.body.insertBefore(div, document.body.childNodes[0]);\n\n\t\t}\n\n\t}", "function inserirMapa(){\n var arq = $('input[name=arquivo]').val();\n /*Pega o nome do arquivo*/\n $(\"#game\").svg({ \n /*le o arquivo e insere na div#game*/\n onLoad: function() { \n var svg; \n svg = $(\"#game\").svg('get'); /*pega div#game e prepara para inserir o mapa*/\n svg.load('file/mapas/' + arq, { /*le o arquivo*/ \n addTo: true, \n changeSize: true \n }) \n }, \n settings: {}\n });\n\n }", "function svgPositioning(o) {\n $(o.targetImg)\n .css('top', o.target.offsetTop + o.target.offsetHeight - 6)\n .css('left', o.target.offsetLeft)\n .css('width', o.target.offsetWidth)\n .css('height', 8)\n .css('margin', 0)\n .css('display', 'block');\n $(o.img).css('display', 'none');\n // For All exept BLOG\n if (o.target !== $('.BLOG')) {\n $('.dropmenu').slideDown(200);\n $('dropmenu').toggleClass('upper');\n }\n $(o.a).toggleClass('hover');\n $('.BELOW_HEADER').find('a').not(o.a).toggleClass('hover')\n }", "function crearMarcador(x){\n for (let i = 0; i < x.length; i++) {\n let svgMarkup = '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 41.5 55.9\" height=\"50\">' +\n '<style type=\"text/css\">.st0{fill:#7BCDDB;}</style>'+\n '<g id=\"Capa_2\">'+\n '<path class=\"st0\" d=\"M21.9,2c0.4,0,1.1,0,1.5,0.4c7.1,1.1,12,4.9,15,11.3c2.2,5.6,1.9,11.3-0.7,16.5c-3,5.3-6,10.5-9,15.7 c-1.1,2.2-2.2,4.1-3.8,6.4c-1.5,2.6-5.3,3-7.1,0.7c-0.4-0.4-0.8-0.7-0.8-1.1C12.9,45.1,9.1,38,5,31.3c-1.9-3.4-3-6.8-3-10.5 c0-5.6,2.2-10.5,6.8-14.2c2.6-2.2,6-3.8,9.4-4.1c0.4,0,1.1,0,1.5-0.4C20.8,2,21.1,2,21.9,2z M14,19.6c0,3.8,3,6.8,6.8,6.8 s6.8-3,6.8-6.8s-3-6.8-6.8-6.8S14,15.9,14,19.6z\"/>'+\n '</g></svg>';\n\n // Create an icon, an object holding the latitude and longitude, and a marker:\n let icon = new H.map.Icon(svgMarkup),\n coords = {lat: x[i].lat, lng: x[i].lng},\n marker = new H.map.Marker(coords, {icon: icon}),\n bubble = new H.ui.InfoBubble(coords, {content: '<p class=\"bubble\" id=\"'+x[i].name+'\" onclick=\"openNoticia(this)\">'+x[i].name+'</p>'});\n bubble.close();\n ui.addBubble(bubble);\n // Add event\n marker.addEventListener('tap', function (evt) {\n bubble.open();\n });\n // Add the marker to the map:\n map.addObject(marker);\n }\n }", "function createSVG() {\n svg = d3.select(\"#bubble-chart\")\n .append(\"svg\")\n .attr(\"width\", width)\n .attr(\"height\", height);\n }", "function createScatterPlotSVG() {\n // make the meanu items for interactivity\n makeMenu();\n\n //build the svg element and append it to the body within the scatterPlot div\n var svg = d3.select(\"body\")\n .select(\"div#scatterPlot\")\n .append(\"svg\")\n .attr(\"width\", myNS.width)\n .attr(\"height\", myNS.height);\n\n return svg;\n} //end createScatterPlotSVG", "function makeSVG () {\n \n //Create SVG element\n NS.svg = d3.select(\".donut\")\n .append(\"svg\")\n .attr(\"width\", NS.width)\n .attr(\"height\", NS.height);\n}", "function addIcon(element){\n var image_path = \"/archibus/schema/ab-core/graphics/icons/tick-white.png\";\n var src = image_path;\n \n var img = document.createElement(\"img\");\n img.setAttribute(\"src\", src);\n img.setAttribute(\"border\", \"0\");\n \n img.setAttribute(\"align\", \"middle\");\n img.setAttribute(\"valign\", \"right\");\n \n element.appendChild(img);\n}", "function setupSVG(svg, width, height) {\n //Remove children of svg to eventually tiles from the previous image\n svg.innerHTML = '';\n\n //Give to svg the same size as the image\n svg.setAttribute('viewBox', '0 0 '+width+' '+height);\n svg.setAttribute('width', '100%');\n svg.setAttribute('height', '100%');\n}", "function initMenu() {\n\n\n const svgs= [\n {\n name :\"Welcome !\" ,\n font : \"Big John\",\n bubble: \"acceuil-welcome.png\"\n },\n {\n name :\"Big Blue Songs\",\n bubble: \"acceuil-big-blue-songs.png\"\n },\n {\n name :\"Big Blue Science\",\n font : \"Pica\",\n bubble: \"acceuil-welcome.png\"\n },\n {\n name :\"News\" ,\n bubble: \"acceuil-big-blue-science.png\"\n },\n {\n name :\"Big Blue Fingers\",\n bubble: \"acceuil-big-blue-science.png\"\n },\n {\n name :\"L'équipe\",\n bubble: \"acceuil-big-blue-songs.png\"\n },\n\n ];\n\n var mainMenu = document.getElementById(\"menu-main-menu\");\n\n mainMenu.childNodes.forEach(function (li) {\n if (li.childNodes.length) {\n var a = li.childNodes[0];\n menuData.push({\n text: a.attributes.title.value,\n url: a.attributes.href.value,\n });\n }\n })\n\n menuData.forEach(function (data) {\n let dom = document.createElement(\"div\");\n dom.onclick = function(){\n document.location.href=data.url;\n }\n dom.style.visibility = \"hidden\";\n dom.classList.add(\"bigblue-menu\");\n\n let text = document.createElement(\"div\");\n text.classList.add(\"bba-menu-text\");\n text.innerHTML = data.text;\n dom.appendChild(text);\n\n svgs.some((svg)=>{\n\n if(svg.name === data.text){\n /*\n console.log(\"svg !!\");\n const img = document.createElement(\"img\");\n img.src = BigBlueApp.assetsUrl + '/images/'+svg.svg;\n dom.appendChild(img);\n */\n\n let bg = document.createElement(\"div\");\n bg.classList.add(\"bba-menu-bg\")\n const bgIm = document.createElement(\"img\");\n bgIm.src = `${BigBlueApp.assetsUrl}/images/${svg.bubble}`;\n bgIm.style.width = \"100%\";\n bgIm.style.height = \"100%\";\n bg.appendChild(bgIm);\n if(svg.font){\n dom.style.fontFamily = svg.font;\n }\n data.bubble =bg;\n dom.appendChild(bg);\n return true;\n }\n else{\n console.log(\"svg name\",svg.name);\n console.log(\"text\",data.text);\n }\n return false;\n });\n\n const target = document.createElement(\"img\");\n target.src = BigBlueApp.assetsUrl + '/images/target.svg';\n target.classList.add(\"bba-target\");\n dom.appendChild(target);\n\n container.appendChild(dom);\n dom.data = data;\n dom.data.target = target;\n menuDoms.push(dom);\n });\n\n }", "_createSVG() {\n\t\t\treturn d3.select(this._container)\n\t\t\t\t.append('svg');\n\t\t}", "function crear_guifos_panel_function() {\r\n //container\r\n document.getElementById('crear_GIF').innerHTML = \"\";\r\n document.getElementById('crear_GIF').appendChild(document.createElement(\"div\")).className = \"confirm_crear_GIF\";\r\n //obj\r\n document.getElementsByClassName('confirm_crear_GIF')[0].appendChild(document.createElement(\"object\")).id = \"window_object\";\r\n document.getElementById('window_object').setAttribute(`data`, `./images/window img.png`);\r\n document.getElementById('window_object').setAttribute(`type`, `image/svg+xml`);\r\n //h6\r\n document.getElementsByClassName('confirm_crear_GIF')[0].appendChild(document.createElement(\"h6\")).innerHTML = \"Aqui podras crear tus propios guifos\";\r\n //title\r\n document.getElementsByClassName('confirm_crear_GIF')[0].appendChild(document.createElement(\"div\")).className = \"confirm_crear_GIF_title\";\r\n document.getElementsByClassName('confirm_crear_GIF_title')[0].appendChild(document.createElement(\"p\")).innerHTML = \"Crear Guifos\";\r\n //div\r\n document.getElementsByClassName('confirm_crear_GIF')[0].appendChild(document.createElement(\"div\")).className = \"GIF_instruc\";\r\n document.getElementsByClassName('GIF_instruc')[0].appendChild(document.createElement(\"p\")).innerHTML = \"Crear tu\" + \" <span>\" + \"guifo\" + \"</span>\" + \" es muy facil, graba cualquier imagen con tu camara y obten guifos personalizados. Los pasos para crear tu guifo son:\";\r\n document.getElementsByClassName('GIF_instruc')[0].appendChild(document.createElement(\"p\")).innerHTML = \" <span>1)</span> Dar permisos de acceso a la camara (solo por el tiempo de uso)\";\r\n document.getElementsByClassName('GIF_instruc')[0].appendChild(document.createElement(\"p\")).innerHTML = \"<span>2)</span> Capturar tu momento guifo\";\r\n document.getElementsByClassName('GIF_instruc')[0].appendChild(document.createElement(\"p\")).innerHTML = \"<span>3)</span> Revisar el momento \";\r\n document.getElementsByClassName('GIF_instruc')[0].appendChild(document.createElement(\"p\")).innerHTML = \"<span>4)</span> Listo para subir y compartir!\";\r\n document.getElementsByClassName('GIF_instruc')[0].appendChild(document.createElement(\"p\")).innerHTML = \"¿Quieres comenzar a crear tu <span>guifo</span> ahora?</span>\";\r\n //buttom\r\n document.getElementsByClassName('confirm_crear_GIF')[0].appendChild(document.createElement(\"button\")).className = \"buton_cancelar\";\r\n document.getElementsByClassName('buton_cancelar')[0].innerHTML = \"Cancelar\";\r\n document.getElementsByClassName('buton_cancelar')[0].addEventListener('click', cancel_gif_function);\r\n document.getElementsByClassName('confirm_crear_GIF')[0].appendChild(document.createElement(\"button\")).className = \"buton_comenzar\";\r\n document.getElementsByClassName('buton_comenzar')[0].innerHTML = \"Comenzar\";\r\n document.getElementsByClassName('buton_comenzar')[0].addEventListener('click', stream_video);\r\n }", "function changeLogoToRed(logoSelector) {\n $(logoSelector).attr(\"src\", \"./assets/logo-red.svg\");\n}", "function createWelcomeGraphic() {\n\n}", "function appendSVG() {\n // append svg element to body\n return d3.select(\".chart\").append(\"svg\")\n .attr(\"id\", \"svg\")\n .attr(\"width\", w + margins.left + margins.right)\n .attr(\"height\", h + margins.top + margins.bottom)\n .append(\"g\")\n .attr(\"id\", \"scatterplot\")\n .attr(\"transform\", \"translate(\" + margins.left + \",\" + margins.top + \")\");\n }", "function svg(id = null, classList) {\n let svg = document.createElementNS(Svg.svgNS, \"svg\");\n if (id != null)\n svg.id = id;\n if (classList != undefined) {\n svg.classList.add(...classList);\n }\n return svg;\n }", "init() {\n var me = this,\n svg = document.createElementNS(this.xmlns, 'svg');\n svg.setAttribute('id', this.id);\n svg.setAttribute('width', this.coorWidth);\n svg.setAttribute('height', this.coorHeight);\n svg.setAttribute('zoomAndPan', this.zoomAndPan);\n if (this.style) {\n svg.setAttribute('style', this.style);\n }\n if (this.onload) {\n svg.setAttribute('onload', this.onLoad);\n }\n me._docElementNS = svg;\n if (this.children.length > 0) {\n for (var i = 0; i < this.children.length; i++) {\n var child = this.children[i];\n child.parent = this;\n if (child.docElementNS) {\n this.docElementNS.appendChild(child.docElementNS);\n }\n }\n }\n if (me.autoBind) {\n me.bind();\n }\n }", "function drawSvg() {\n\t\t// selector can be #residential, or #commercial which should be in graph.html\n\t\tvar dataSources = [{selector: '#commercial', data: data.commGraphData}, \n\t\t\t{selector: '#residential', data: data.residGraphData}];\n\n\t\tdataSources.forEach(function(item) {\n\t\t\tvar canvas = createCanvas(item.selector, item.data);\n\t\t\tdrawHorizontalLabel(canvas);\n\t\t\tdrawVerticalLable(canvas, item.data);\n\t\t\tdrawHeatMap(canvas, item.data);\n\t\t});\n\t}", "function civilButton() {\n removeHSVG();\n // make SVG\n svg = d3.select(\"body\").append(\"svg\")\n .attr(\"width\", NS.width + NS.margin.left + NS.margin.right)\n .attr(\"height\", 900)\n .attr(\"id\", \"heatmap\")\n .append(\"g\")\n .attr(\"transform\", \"translate(\" + NS.margin.left + \",\" + NS.margin.top + \")\");\n\n heatmap_2(svg);\n\n}", "function cargarIconos(){\n // iconos para mostrar puntos\n estilosActuales[\"carga\"] = styles.marcadorCarga();\n //corregir esto\n estilosActuales[\"Taxi/Remis\"] = styles.marcadorTraslado();\n // default\n estilosActuales[\"default\"] = styles.marcadorDefault();\n }", "function cargarIconos(){\n // iconos para mostrar puntos\n estilosMarcadores[\"carga\"] = styles.marcadorCarga();\n estilosMarcadores[\"traslado\"] = styles.marcadorTraslado();\n }", "toSVG(x1, x2) {\n this.svg_element = $(document.createElementNS(\"http://www.w3.org/2000/svg\", 'path')).attr(\"d\", this.pathParameters(x1, x2)).addClass(\"parabola_svg\")\n .attr({style:this.style});\n return (this.svg_element);\n }", "function initMarcador(DOMid,imgpath,data,meseslargo){\n var svg = d3.select(DOMid);\n \n var posicionMarcador = svg.selectAll(\".marcador\").data(data);\n posicionMarcador.enter().append(\"svg:image\")\n .attr(\"xlink:href\", imgpath)\n .attr(\"width\",28)\n .attr(\"height\",28)\n .attr(\"class\",\"marcador\")\n .attr(\"transform\",function(d){\n return \"translate(\"+((meseslargo*d.mes)-14)+\",-30)\";\n });\n \n }", "function initSVG() {\n \t\tsvg = d3.select('body')\n \t\t.append('svg')\n \t\t.attr('viewBox', '0 0 600 600')\n \t\t.attr('style', 'width: 300px; height: 300px;');\n \t}", "function createSvg () {\r\n // Remove the existing one\r\n d3\r\n .select(canvasId)\r\n .selectAll('svg')\r\n .remove();\r\n // Create a new svg node\r\n svg = d3\r\n .select(canvasId)\r\n .append('svg:svg')\r\n .attr('width', 500)\r\n .attr('height', 500)\r\n .append('g') // Group all element to make alignment easier\r\n .attr('transform', function () { // Place in center of the page\r\n return 'translate(' + (500 / 2) + ', ' + (500 / 2) + ')';\r\n });\r\n }", "function append_img(div_id){\n var div = $(div_id);\n var rte = routeskey[sel_line]\n div.empty().prepend('<object data='+base+'static/image/' + rte + '.svg?1222259157.415\" type=\"image/svg+xml\" width=\"100%\" />');\n}", "_getSVGHandler(e){let root=this,temp=document.createElement(\"div\"),getID=function(element,alt){if(null===element.getAttribute(\"id\"))element.setAttribute(\"id\",alt);return element.getAttribute(\"id\")},setAriaLabelledBy=function(source,target,prefix){// adds title and desc elements to target and sets the aria-labelledby attribute\nlet svgElem=function(nodename){source=null!==source?source:root;//adds title or desc element to target\nlet attr=\"title\"===nodename?\"label\":nodename,query=source.querySelector(\"#\"+attr);var label=target.querySelector(nodename);//if the target doesn't have the element, add it\nif(null===label){label=document.createElement(nodename);target.prepend(label)}//populates the element with data from the source element\nif(null!==source.getAttribute(attr)){label.innerHTML=source.getAttribute(attr)}else if(null!==query&&\"\"!==query.innerHTML){label.innerHTML=query.innerHTML}//returns the new element's id\nreturn getID(label,prefix+\"-\"+attr)};//set aria-labelledby to the id's for title and descriptions\ntarget.setAttribute(\"aria-labelledby\",svgElem(\"desc\")+\" \"+svgElem(\"label\"))};//set up main svg and append to document\ntemp.innerHTML=e.detail.response;let svg=temp.querySelector(\"svg\"),svgid=getID(svg,\"svg-\"+Date.now()),hdata=dom(root).querySelectorAll(\"lrndesign-imagemap-hotspot\");setAriaLabelledBy(root,svg,svgid);this.shadowRoot.querySelector(\"#svg\").appendChild(svg);for(let i=0;i<hdata.length;i++){let hid=hdata[i].getAttribute(\"hotspot-id\"),hotspot=svg.querySelector(\"#\"+hid),clone=svg.cloneNode(!0);//clone svg for print versions and show hotspot as selected\nsetAriaLabelledBy(hdata[i],clone,hid);hdata[i].appendChild(clone);hdata[i].querySelector(\"#\"+hid).classList.add(\"selected\");hdata[i].setParentHeading(root.shadowRoot.querySelector(\"#heading\"));for(let j=0;j<hdata.length;j++){hdata[i].querySelector(\"#\"+hdata[j].getAttribute(\"hotspot-id\")).classList.add(\"hotspot\")}//configure hotspot on main (interactive) svg\nlet hbutton=document.createElement(\"button\");hbutton.setAttribute(\"tabindex\",0);hbutton.setAttribute(\"aria-label\",hdata[i].label);root.shadowRoot.querySelector(\"#buttons\").appendChild(hbutton);hbutton.addEventListener(\"focus\",function(){hotspot.classList.add(\"focus\")});hbutton.addEventListener(\"blur\",function(){hotspot.classList.remove(\"focus\")});hotspot.classList.add(\"hotspot\");hotspot.addEventListener(\"click\",e=>{this.openHotspot(hotspot,hdata[i])});hbutton.addEventListener(\"keyup\",e=>{if(13===e.keyCode||32===e.keyCode){if(!hotspot.classList.contains(\"selected\")){this.openHotspot(hotspot,hdata[i])}}})}}", "function putSvg(next) {\n if (next == VIEWS.DOT.hash) {\n goToDot(next + \"/\" + dot_top);\n return;\n }\n if (!next) next = dot_top;\n var root = d3.select(\"#svg_container\");\n d3.xml(\"lib/dot_svg/\" + next + \".svg\", function(error, documentFragment) {\n if (error) {console.log(error); return;}\n var svgNode = documentFragment.getElementsByTagName(\"svg\")[0];\n\n var w = $(root.node()).width();\n var h = $(root.node()).height();\n\n svgNode.setAttribute(\"viewBox\", \"0 0 \" + w + ' ' + h);\n svgNode.setAttribute(\"style\", \"width: \" + w + 'px;height:' + h + \"px;\");\n\n var d = d3.select(svgNode);\n\n if (root.node().childNodes.length > 0) {\n root.node().replaceChild(svgNode, root.node().childNodes[0]);\n } else {\n root.node().appendChild(svgNode);\n }\n var matrix = d.select(\"g\").node().transform.baseVal.consolidate().matrix;\n var X = matrix.e;\n var Y = matrix.f;\n var width = parseInt(svgNode.getAttribute(\"width\"), 10);\n var height = parseInt(svgNode.getAttribute(\"height\"), 10);\n var x_scale = w / width;\n var y_scale = h / height;\n var initial_scale = Math.min(x_scale, y_scale);\n initial_scale = Math.min(initial_scale, 1);\n\n var translate_x = ((w - width*initial_scale) / 2);\n var translate_y = ((h - height*initial_scale) / 2);\n\n // Setup event listeners for model nodes.\n root.selectAll(\"polygon\").each(function() {\n if (this.hasAttribute(\"fill\")) {\n // All model nodes should show the corresponding HDL, or the\n // corresponding DOT graph when clicked. dsdk::A_MODEL_NODEs\n // are magenta, dsdk::A_SCHEDULED_MODEL_NODEs are white, and\n // are not a direct descendant of the \"graph\" (the background\n // is also white, but is a direct descendant of the \"graph\".\n if (this.getAttribute(\"fill\") == \"magenta\" ||\n (this.getAttribute(\"fill\") == \"white\" && !this.parentNode.classList.contains(\"graph\"))) {\n var g = this.parentNode;\n var title = g.getElementsByTagName(\"title\")[0].innerHTML;\n g.addEventListener(\"click\", function(e){\n // Ctrl+Click opens source, plain click opens graph.\n var evt = window.event || e;\n if (evt.ctrlKey) {\n // TODO Eventually the filename will probably need\n // to include a kernel/component subdirectory.\n var filename = title.replace(/^\\d+_/, \"\")+\".vhd\";\n addHdlFileToEditor(\"lib/hdl/\" + filename);\n if (sideCollapsed) {\n collapseAceEditor();\n refreshAreaVisibility();\n adjustToWindowEvent();\n }\n } else {\n var new_hash = window.location.hash + \"/\" + title;\n VIEWS.DOT.hash = new_hash;\n goToDot(new_hash);\n }\n });\n }\n }\n });\n\n // Clickdown for edge highlighting.\n root.selectAll(\"g.edge path\")\n .on('click', function () {\n // TODO use parent\n if (dot_clickdown == this) {\n dot_clickdown = null;\n } else {\n dot_clickdown = this;\n }\n });\n\n // Edge/arrowhead highlighting.\n var highlightColor = \"#1d99c1\";\n root.selectAll(\"g.edge path\")\n .on('mouseover', function () {\n $(this).attr({\"stroke-width\":5, \"stroke\":highlightColor});\n $(this).siblings(\"polygon\").attr({\"fill\":highlightColor, \"stroke\":highlightColor, \"stroke-width\":3});\n })\n .on('mouseout', function () {\n if (dot_clickdown == this) return;\n $(this).attr({\"stroke-width\":1, \"stroke\":\"black\"});\n $(this).siblings(\"polygon\").attr({\"fill\":\"black\", \"stroke\":\"black\", \"stroke-width\":1});\n });\n root.selectAll(\"g.edge polygon\")\n .on('mouseover', function () {\n $(this).siblings(\"path\").attr({\"stroke-width\":5, \"stroke\":highlightColor});\n $(this).attr({\"fill\":highlightColor, \"stroke\":highlightColor, \"stroke-width\":3});\n })\n .on('mouseout', function () {\n if (dot_clickdown == this) return;\n $(this).siblings(\"path\").attr({\"stroke-width\":1, \"stroke\":\"black\"});\n $(this).attr({\"fill\":\"black\", \"stroke\":\"black\", \"stroke-width\":1});\n });\n\n\n // TODO use translateExtent() to prevent translating out of frame?\n //.translateExtent([10 - X, 10 - Y, 2 * X - 10, 2 * Y - 10])\n //.translateExtent([[0, 0], [2 * Y - 10]])\n\n var scaled_x = initial_scale * X;\n var scaled_y = initial_scale * Y;\n scaled_x += translate_x;\n scaled_y += translate_y;\n var zoom = d3.behavior.zoom()\n .scaleExtent([0, 1.5])\n .scale(initial_scale)\n .translate([scaled_x, scaled_y])\n .on(\"zoom\", zoomed);\n d.select(\"g\").attr(\"transform\",\"translate(\" + scaled_x + \",\" + scaled_y +\")scale(\" + initial_scale + \",\" + initial_scale + \")\");\n d.call(zoom);\n if (!$('#dot_edges_toggle').is(':checked')) {\n $(\"#svg_container\").find(\"g.edge\").toggle();\n }\n });\n updateDotHierarchy();\n}", "function pintarDeportes(deporte = \"\") {\n let eventos = listaDeportes(data, deporte);\n let logosDeportes = document.getElementById(\"logosDeportes\");\n if (logosDeportes) {\n logosDeportes.innerHTML = \"\";\n eventos.forEach(function (disciplina) {\n const imagen = document.createElement(\"img\");\n imagen.setAttribute(\"src\", `./assets/depOlimpicos/${disciplina}.svg`);\n const cajaDisciplina = document.createElement(\"div\");\n cajaDisciplina.classList.add(\"tipoDeporte\");\n const titulo = document.createElement(\"h3\");\n titulo.innerHTML = disciplina.replace(\"_\", \" \");\n cajaDisciplina.insertAdjacentElement(\"beforeend\", imagen);\n cajaDisciplina.insertAdjacentElement(\"beforeend\", titulo);\n logosDeportes.insertAdjacentElement(\"beforeend\", cajaDisciplina);\n });\n }\n}", "function setIcon(angle) {\n var canvas = document.getElementById(\"icon-canvas\");\n let colors = {\n inside: $(\"#service-colors option:selected\").val(),\n outside: $('#outside-color').val(),\n border: $('#border-color').val()\n };\n // call drawIcon() from /js/drawIcon.js\n drawIcon(angle, colors);\n }", "function addTCSLogo() {\n storage\n .get({\n [CHOSEN_LOGO_SECONDARY_KEY]:\n DEFAULT_SETTINGS[CHOSEN_LOGO_SECONDARY_KEY],\n })\n .then((response) => {\n const chosenLogo = response[CHOSEN_LOGO_SECONDARY_KEY];\n if (chosenLogo === 'none') {\n return;\n }\n let url =\n chosenLogo === 'alternative'\n ? ALT_TCS_LOGO_URL\n : TCS_LOGO_URL;\n let logo = $('<img/>').attr('src', url);\n let div = $('<div id=\"satoriEnhancementsTCSLogo\"/>').append(\n logo,\n );\n $('#navigationPanel').after(div);\n });\n }", "function SVGParent() {}", "loadSVG(e) {\n var svgDoc = e.currentTarget.contentDocument;\n var svgItems = svgDoc.getElementsByTagName(\"path\");\n for (var i = 0; i < 51; i++) {\n if (this.props.campus.sts.indexOf(svgItems[i].id) > -1) {\n svgItems[i].style.fill = \"#61DAFB\";\n svgItems[i].addEventListener(\"click\", (e) => {\n this.selectState(e.target.id);\n });\n } else {\n svgItems[i].style.fill = \"#525252\";\n }\n }\n e.currentTarget.style.opacity = \"1.0\";\n }", "function setTeamLogo(team){\n var logo = document.getElementById('logo');\n\n if (team){\n logo.src = '/static/img/'+team+'.svg';\n }\n else {\n logo.src = '/static/img/NFL.svg';\n }\n}", "function createIconSvg(width) {\n var eSvg = document.createElementNS(SVG_NS, \"svg\");\n if (width > 0) {\n eSvg.setAttribute(\"width\", width);\n eSvg.setAttribute(\"height\", width);\n }\n else {\n eSvg.setAttribute(\"width\", \"10\");\n eSvg.setAttribute(\"height\", \"10\");\n }\n return eSvg;\n}", "function svgIcon(iconName, classes, isAriaHidden) {\n if (!classes) classes = '';\n classes += ' svgIcon';\n var output = '<svg class=\"' + classes + '\" role=\"img\"';\n if (isAriaHidden) output += ' aria-hidden=\"true\"';\n output += '><use href=\"img/fontawesome/fontawesome-free-5.9.0-web-solid-sprite_';\n output += iconName.charAt(0);\n output += '.svg#';\n output += iconName;\n output += '\"></use></svg>';\n return output;\n}", "function svgChangeRace() {\n for (r of races) {\n if (racesSelection.value == r) { \n raceIcon.setAttribute(\"src\", `./img/races/${r}.svg`);\n }\n }\n }", "init() {\n let svg = '<path' +\n ' id=\"' + this.id +'\"';\n\n if (this.stroke) {\n svg += ' stroke=\"' + this.stroke + '\"';\n }\n if (this.strokeWidth) {\n svg += ' stroke-width=\"' + this.strokeWidth + '\"';\n }\n if (this.opacity) {\n svg += ' opacity=\"' + this.opacity + '\"';\n }\n if (this.data) {\n svg += ' d=\"' + this.data + '\"';\n }\n svg+= '></path>'\n this.innerHTML = svg;\n }", "function creditCardSvg() {\n\t\tlet svgElement = document.createElementNS(\"http://www.w3.org/2000/svg\", 'svg');\n\t\tsvgElement.setAttribute('class','align-middle creditCardSvg');\n \tsvgElement.setAttribute('x','0px');\n \tsvgElement.setAttribute('y','0px');\n \tsvgElement.setAttribute('width','30');\n \tsvgElement.setAttribute('height','30');\n \tsvgElement.setAttribute('viewBox','0 0 80 80');\n \tsvgElement.setAttribute('fill','#000000');\n \t\n \tlet pathElement = document.createElementNS(\"http://www.w3.org/2000/svg\", 'path');\n \tpathElement.setAttribute('class','creditCardPath');\n \tpathElement.setAttribute('d','M 11 16 C 8.2504839 16 6 18.250484 6 21 L 6 59 C 6 61.749516 8.2504839 64 11 64 L 69 64 C 71.749516 64 74 61.749516 74 59 L 74 21 C 74 18.250484 71.749516 16 69 16 L 11 16 z M 11 18 L 69 18 C 70.668484 18 72 19.331516 72 21 L 72 26 L 8 26 L 8 21 C 8 19.331516 9.3315161 18 11 18 z M 8 30 L 72 30 L 72 59 C 72 60.668484 70.668484 62 69 62 L 11 62 C 9.3315161 62 8 60.668484 8 59 L 8 30 z M 12 35 A 1 1 0 0 0 11 36 A 1 1 0 0 0 12 37 A 1 1 0 0 0 13 36 A 1 1 0 0 0 12 35 z M 16 35 A 1 1 0 0 0 15 36 A 1 1 0 0 0 16 37 A 1 1 0 0 0 17 36 A 1 1 0 0 0 16 35 z M 20 35 A 1 1 0 0 0 19 36 A 1 1 0 0 0 20 37 A 1 1 0 0 0 21 36 A 1 1 0 0 0 20 35 z M 24 35 A 1 1 0 0 0 23 36 A 1 1 0 0 0 24 37 A 1 1 0 0 0 25 36 A 1 1 0 0 0 24 35 z M 28 35 A 1 1 0 0 0 27 36 A 1 1 0 0 0 28 37 A 1 1 0 0 0 29 36 A 1 1 0 0 0 28 35 z M 32 35 A 1 1 0 0 0 31 36 A 1 1 0 0 0 32 37 A 1 1 0 0 0 33 36 A 1 1 0 0 0 32 35 z M 36 35 A 1 1 0 0 0 35 36 A 1 1 0 0 0 36 37 A 1 1 0 0 0 37 36 A 1 1 0 0 0 36 35 z M 52 43 C 48.145666 43 45 46.145666 45 50 C 45 53.854334 48.145666 57 52 57 C 53.485878 57 54.862958 56.523344 55.996094 55.730469 A 7 7 0 0 0 60 57 A 7 7 0 0 0 67 50 A 7 7 0 0 0 60 43 A 7 7 0 0 0 55.990234 44.265625 C 54.858181 43.47519 53.483355 43 52 43 z M 52 45 C 52.915102 45 53.75982 45.253037 54.494141 45.681641 A 7 7 0 0 0 53 50 A 7 7 0 0 0 54.498047 54.314453 C 53.762696 54.74469 52.916979 55 52 55 C 49.226334 55 47 52.773666 47 50 C 47 47.226334 49.226334 45 52 45 z');\n \t\n \tsvgElement.appendChild(pathElement);\n \t\n \treturn svgElement;\n\t\t\n\t}", "serialize() {\n var svg = document.getElementsByTagName(\"svg\")\n var editor = atom.workspace.getActiveTextEditor()\n if(editor && (svg.length == 0)){\n this.createGraph(editor);\n }\n }", "function init_svg(){\n\n if(document.getElementById('world-map-svg')){\n \n // set svg fill to default\n reset_svg_fill();\n\n // generate the dropdwon with custom rank names\n makeDDM();\n\n // add tooltip event on all countries and info button\n add_tooltip_event_countries();\n add_tooltip_event_info();\n hideDDM2_extraOptions();\n\n // remove the next 3 lines once implemented\n document.getElementById('rank-attribute').selectedIndex = 0;\n document.getElementById('rank-type').selectedIndex = 0;\n var svg = d3.select('#world-map-svg')\n fill_csv(svg, global_rank_function + '_' + global_rank_type, global_is_mono, global_isAscending);\n\n }\n else{\n setTimeout(init_svg, 100); \n }\n \n}", "function addService(serv, index) {\n var group = createSVGElement(\"g\");\n group.setAttribute(\"class\", \"service serv-\" + index);\n // =================================================================\n\n\n\n\n\n\n /* This group is needed to apply animations in\n the icon and its background at the same time */\n // var icon_group = createSVGElement(\"g\");\n // icon_group.setAttribute(\"class\", \"icon-wrapper\");\n\n // var circle = createSVGElement(\"circle\");\n // setAttributes(circle, {\n // r: circle_radius,\n // cx: center.x,\n // cy: center.y\n // });\n // var circle_shadow = circle.cloneNode();\n // setAttributes(circle, {\n // class: 'shadow'\n // });\n // icon_group.appendChild(circle_shadow);\n // icon_group.appendChild(circle);\n\n // var symbol = createSVGElement(\"use\");\n // setAttributes(symbol, {\n // 'x': center.x - icon_size / 2,\n // 'y': center.y - icon_size / 2,\n // 'width': icon_size,\n // 'height': icon_size\n // });\n // symbol.setAttributeNS(\"http://www.w3.org/1999/xlink\", \"xlink:href\", \"#\" + serv.icon);\n // icon_group.appendChild(symbol);\n\n // group.appendChild(icon_group);\n\n // var text = createSVGElement(\"text\");\n // setAttributes(text, {\n // x: center.x,\n // y: center.y + circle_radius + text_top_margin\n // });\n\n // var tspan = createSVGElement(\"tspan\");\n // if (serv.name.indexOf('\\n') >= 0) {\n\n // var tspan2 = tspan.cloneNode();\n // var name = serv.name.split('\\n');\n // jQuery(tspan).text(name[0]);\n // jQuery(tspan2).text(name[1]);\n\n // setAttributes(tspan2, {\n // x: center.x,\n // dy: tspan_delta\n // });\n\n // text.appendChild(tspan);\n // text.appendChild(tspan2);\n // } else {\n // jQuery(tspan).text(serv.name);\n // text.appendChild(tspan);\n // }\n\n // group.appendChild(text);\n // services.appendChild(group);\n\n // var service_bubble = jQuery(\".serv-\" + index);\n\n //Uses tween to look for right position\n twn_pivot_path.seek(index);\n TweenLite.set(service_bubble, {\n x: pivot_path.x,\n y: pivot_path.y,\n transformOrigin: \"center center\"\n });\n\n service_bubble.click(serviceClick);\n}", "function SVGWrap() {}", "function Bouton4_Image(svgFile) {\r\n var file = chargerHttpXML(svgFile);\r\n var s = new XMLSerializer();\r\n var str = s.serializeToString(file);\r\n setSVG(str);\r\n}", "function printIcons(icons, contenitoreIcone) {\r\n icons.forEach((icon)=>{\r\n const {family, prefix, name, color} = icon;\r\n const html =//parte di html\r\n `<div class=\"icon\">\r\n <i class=\"${family} ${prefix}${name}\"\r\n style=\"color: ${color}\"></i>\r\n <div class=\"nomeIcona\">${name}</div>\r\n </div>\r\n `\r\n contenitoreIcone.append(html);\r\n return\r\n });\r\n\r\n\r\n}", "function setImageColor(color) {\n const icon = document.querySelector('.modal--img');\n icon.innerHTML = carSVG(color);\n \n}", "function insertLogo(xSize,ySize) {\n\t\tvar s=\"\";\n\t\tvar\tsrc = locParams.imgDir + \"logo.gif\";\n\t\tif (locParams.insWSC)\n\t\t\tsrc=\"/servlet/CMGetDyn/logo_name?foo=\" + Math.random();\n\t\telse if (typeof(theTemplate.hasCustomLogo) != 'undefined' && theTemplate.hasCustomLogo == 'true') {\n\t\t\tsrc = locParams.stdImgDir + \"logo.gif\";\n\t\t}\n\n\t\ts+=\"<IMG border='0' src='\" + src+\"'\";\n\t\tif (xSize) s += \" width='\"+xSize+\"'\";\n\t\tif (ySize) s += \" height='\"+ySize+\"'\";\n\t\ts+=\">\";\n\t\tdocument.write(s);\n\t}", "updateSVG(ind) {\n this.svg_element.attr(\"d\", this.pathParameters(this.edge_left, this.edge_right));\n\n //Get parabola left and right IDs\n let pl = this.parab.left ? this.parab.left._ID : \"n/a\";\n let pr = this.parab.right ? this.parab.right._ID : \"n/a\";\n\n $(\"#parab-list #par\" + this._ID).text(\"Parabola ID: \" + this._ID + \", domain: [\" + Math.round(this.edge_left) + \", \" + Math.round(this.edge_right) + \"], index: \" + ind + \" -- L: \"+pl+\" R: \"+ pr);\n }", "function getIconSvg(name, width, height) {\n if (width === void 0) { width = DEFAULT_ICON_WIDTH; }\n if (height === void 0) { height = DEFAULT_ICON_HEIGHT; }\n var path = icons[name] || '<path></path>';\n return \"\\n <svg\\n xmlns=\\\"http://www.w3.org/2000/svg\\\"\\n viewBox=\\\"0 0 24 24\\\"\\n fill=\\\"black\\\"\\n height=\" + height + \"\\n width=\" + width + \"\\n >\\n \" + path + \"\\n </svg>\\n \";\n }", "function afficherTableau(){\n\tdocument.getElementById(\"statistiques\").innerHTML=\"<img src='Ressources/Logo.png'/>\";\n}", "function gCreate(tag) { return document.createElementNS('http://www.w3.org/2000/svg', tag); }", "function getIconSvg(name, width = DEFAULT_ICON_WIDTH, height = DEFAULT_ICON_HEIGHT) {\n const path = icons[name] || '<path></path>';\n return `\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"black\"\n height=${height}\n width=${width}\n >\n ${path}\n </svg>\n `;\n}", "function drawSVG(svg){\n \"use strict\";\n var svgs = Array.prototype.slice.call( svg.find('svg') ),\n svgArr = [],\n resizeTimeout;\n // the svgs already shown...\n svgs.forEach( function( el, i ) {\n var svg = new SVGEl( el );\n svgArr[i] = svg;\n setTimeout(function( el ) {\n return function() {\n svg.render();\n };\n }( el ), 0 );//0ms pause before drawing\n } );\n}", "function menu(){\n background(img,0);\n //retangulo para selecionar a tela\n fill(255, 204, 0)\n rect(imgpont,xrectmenu,yrectmenu,larguramenu,alturamenu,20)\n image(imgpont,xrectmenu,yrectmenu,larguramenu,alturamenu,20)\n fill(233,495,67);\n textSize(26);\n text('JOGAR ', 250, 100)\n //detalhes do texto abaixo\n fill(233,495,67);\n textSize(26);\n text('INSTRUÇÕES', 230, 200);\n text('CREDITOS', 230, 300);\n }", "function createElements() {\n var svg = d3.select(document.getElementById('svgChartRight'));\n\n svg.selectAll('*').remove();\n\n connectorsSvg = svg.append('g').attr('class', 'connectors');\n arcsSvg = svg.append('g').attr('class', 'arcs');\n bubblesSvg = svg.append('g').attr('class', 'bubbles');\n bubbleLabelsSvg = svg.append('g').attr('class', 'bubbleLabels');\n}", "replaceImgTag (el, params) {\n let img = el.getElementsByClassName('svg')[0]\n img.style.fill = params.fill\n let w = params.width - params.padding * 2\n let h = params.height - params.padding * 2\n this.replaceWithSVG(img, w, h)\n }", "function exibirLogoColorida(){\n let logo = $('#logo-dute.branca');\n if ( logo.length > 0 ){\n logo.removeClass('branca').addClass('colorida');\n }\n}", "function displayTeamLogo() {\n var teamLogoImgElement = document.createElement('img');\n teamLogoImgElement.setAttribute('src', game.imgUrl);\n\n teamLogoElement.appendChild(teamLogoImgElement);\n}", "function logoOn() {\r\n\tif (document.getElementById(\"logo\").src == \"https://storage.googleapis.com/risemedialibrary-7fa5ee92-7deb-450b-a8d5-e5ed648c575f/YourLogo.png\") {\r\n\t\tdocument.getElementById(\"logo\").src = \"https://s3.amazonaws.com/Rise-Images/UI/logo.svg\";\r\n\t} \r\n}", "generateSVGDownloadLinks() {\n\n var svg_header = '<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>';\n\n document.getElementById('map-download').href = \"data:image/svg+xml;base64,\" + window.btoa(svg_header + document.getElementById('map-area').innerHTML);\n document.getElementById('map-download').download = \"map.svg\";\n\n document.getElementById('cartogram-download').href = \"data:image/svg+xml;base64,\" + window.btoa(svg_header + document.getElementById('cartogram-area').innerHTML);\n document.getElementById('cartogram-download').download = \"cartogram.svg\";\n \n }", "function restaurantLogo() {\n \n const homePage = document.getElementById(\"home-page\");\n\n const titleContainer = document.createElement(\"div\");\n titleContainer.id = \"title-container\";\n\n const restaurant = document.createElement(\"h2\");\n restaurant.id = \"header\";\n restaurant.innerHTML = 'Restaurant';\n\n const name = document.createElement(\"h3\");\n name.id = (\"restaurant-name\");\n name.innerHTML = \"THE LATERN\";\n \n const hr = document.createElement(\"hr\");\n hr.id = \"restaurant-underline\";\n name.appendChild(hr);\n\n restaurant.appendChild(name);\n titleContainer.appendChild(restaurant);\n homePage.appendChild(titleContainer);\n}", "appendToSVG(val) {\n //Parabola.svg_context = val;\n this.svg_element = this.toSVG(this.fx, this.fy).appendTo(Parabola.svg_context);\n\n $(\"#parab-list\").append($(document.createElement(\"p\")).attr(\"id\", \"par\" + this._ID));\n this.updateSVG();\n }", "function saveSVG(){\n\tsvg = \"<svg>\\n\\t\" + main.innerHTML + \"\\n</svg>\";\n\tvar link = document.createElement('a');\n\tmimeType = 'image/svg+xml' || 'text/plain';\n\tvar today = new Date();\n\tvar date = today.getFullYear()+'-'+(today.getMonth()+1)+'-'+today.getDate() + '_' + today.getHours() + \":\" + today.getMinutes() + \":\" + today.getSeconds();\n\tvar base = document.getElementsByName('base')[0].value;\n\tvar armWidth = document.getElementsByName('armWidth')[0].value;\n\tvar vertexExtrusion = document.getElementsByName('vertexExtrusion')[0].value;\n\tvar vertexDiameter = document.getElementsByName('vertexDiameter')[0].value;\n\tvar sideRadius = document.getElementsByName('sideRadius')[0].value;\n\tvar filename = 'Triangle_' + date + '_Base' + base + '_ArmWidth' + armWidth + \n\t\t'_VertexExtrusion' + vertexExtrusion + '_VertexDiameter' + vertexDiameter +\n\t\t'_SideRadius' + sideRadius + '.svg';\n\tlink.setAttribute('download', filename);\n\tlink.setAttribute('href', 'data:image/svg+xml; charset=utf-8,' + encodeURIComponent(svg));\n\tdocument.body.append(link);\n\tlink.click();\n\tdocument.body.removeChild(link);\n\tconsole.log(link);\n}", "function addSVGFile(shapeName){\n\t\t\tconsole.log('adding shape', shapeName); \n\t\t\tfabric.loadSVGFromURL( shapeName, function(objects, options) {\n\t\t\t\tvar loadedObject = fabric.util.groupSVGElements(objects, options);\n\t\t\t\tloadedObject.set({\n\t\t\t\t\tleft: 100,\n\t\t\t\t\ttop: 100\n\t\t\t\t})\n\t\t\t\t.setCoords();\n\t\t\t\tcanvas.add(loadedObject).setActiveObject(loadedObject);\n\t\t\t\tselectObjParam();\n\t\t\t\tcanvas.renderAll();\t \n\t\t\t});\t\t\n\t\t}", "function changeLogoToWhite(logoSelector) {\n $(logoSelector).attr(\"src\", \"./assets/logo.svg\");\n}", "function addCITALogo() {\n\n var citaLogoTemplate = document.getElementsByTagName(\"template\")[0];\n var citaLogoTemplateContent = document.importNode(citaLogoTemplate.content,true);\n document.getElementById(\"logo-template-container\").appendChild(citaLogoTemplateContent);\n\n}", "function renderIcons() {\r\n\t\te.renderIcon('#logo', 'logo');\r\n\t\t//e.renderIcon('#loading_msglogo','logo');\r\n\t\te.renderIcon('.menu_icon', 'user_management');\r\n\t\te.renderIcon('.menu_click', 'user_management');\r\n\t\te.renderIcon('.notification', 'notification');\r\n\t\te.renderIcon('header .analysis_status .analysis_icon', 'analysis');\r\n\t\te.renderFontIcon('.input_clear_icon', 'ic-close-sm');\r\n\t\te.renderFontIcon('.search_icon', 'ic-search');\r\n\t\te.renderIcon('#add_bookmark', 'bookmarks');\r\n\t\te.renderIcon('#add_bookmark1', 'bookmarks');\r\n\t\te.renderFontIcon('.tag_icon', 'ic-tags');\r\n\t\t$(document).foundation();\r\n\t\tg.init();\r\n\t}", "function setupLogoAnimation() {\n logo.style.cssText = \"display:inline-block;\";\n i = 0;\n for (const path of svgDrawingPaths) {\n i++;\n var strokeOffset = path.getTotalLength();\n path.style.cssText =\n \"stroke-dashoffset: \" +\n strokeOffset +\n \"px; stroke-dasharray: \" +\n strokeOffset +\n \"px; transition-delay:\" +\n i * 0 +\n \"ms;\";\n }\n svgVerve.style.cssText = \"transform:translateX(50px);\";\n setTimeout(runLogoAnimation, 100);\n}", "function setUpImageLogout(obj){\r\n\t//create a div to hold image\r\n\tvar div = document.createElement(\"div\");\r\n\tdiv.id = obj.id;\r\n\tdocument.body.appendChild(div);\r\n\r\n\t//add image for this light\r\n\tobj.image.src = imageBack;\r\n\tobj.image.id = \"image\";\r\n\tobj.image.onclick = function(){goLogin(obj);};\r\n\tdocument.getElementById(obj.id).appendChild(obj.image);\r\n\t\r\n\t//add title to image\r\n\tvar p = document.createElement(\"p\");\r\n\tp.innerHTML = obj.name;\r\n\tp.id = \"title\";\r\n\tdocument.getElementById(obj.id).appendChild(p);\r\n}", "function addAuditMark(e, r) {\n var t = document.createElement(\"img\");\n if (r) {\n t.src = \"/green.svg\";\n } else {\n t.src = \"/red.svg\";\n }\n e.appendChild(t);\n }", "_saveContextSVG(){\n this.getGraphicsContext().saveSVG();\n }", "function setIcon () {\n if ( oauth.hasToken() ) {\n chrome.browserAction.setIcon( { 'path': 'img/icon-19-on.png' } );\n } else {\n chrome.browserAction.setIcon( { 'path': 'img/icon-19-off.png' } );\n }\n}", "function iconFill(element, percent)\n{\n\tfileName = element + \".svg\";\n\ticonId = element + \"Icon\";\n\tlayer = iconId + \"Layer\";\n\tshape = iconId + \"Shape\";\n\taccent = iconId + \"AccentCresent\";\n\tdocument.getElementById(iconId). g g .getElementById('accentCresent'\n\n\tvar icon : fileName;\n\t//var icon : svg;\n\n// http://docs.unity3d.com/Documentation/ScriptReference/GameObject.GetComponent.html\n/*\n\tfunction Start () {\n\t\tvar curTransform : Transform;\n\t\t\n\t\tcurTransform = gameObject.GetComponent(Transform);\n\t\t// This is equivalent to:\n\t\tcurTransform = gameObject.transform;\n\t}\n\n\tfunction Update () {\n\t\t// To access public variables and functions \n\t\t// in another script attached to the same game object.\n\t\t// (ScriptName is the name of the javascript file)\n\t\tvar other : ScriptName = gameObject.GetComponent(ScriptName);\n\t\t// Call the function DoSomething on the script\n\t\tother.DoSomething ();\n\t\t// set another variable in the other script instance\n\t\tother.someVariable = 5;\n\t}\n\n\t// OR\n\n\tfunction Update () {\n\t\t// To access public variables and functions \n\t\t// in another script attached to the same game object.\n\t\t// (ScriptName is the name of the javascript file)\n\t\tvar other : ScriptName;\n\t\tother = gameObject.GetComponent(\"ScriptName\");\n\t\t// Call the function DoSomething on the script\n\t\tother.DoSomething ();\n\t\t// set another variable in the other script instance\n\t\tother.someVariable = 5;\n\t}\n*/\n\n\n// http://wiki.unity3d.com/index.php?title=SVG&action=edit\n\n// http://virtualplayground.d2.pl/?p=241\n\n}" ]
[ "0.6382193", "0.620573", "0.6199003", "0.60123366", "0.6010524", "0.5950502", "0.59124583", "0.59076923", "0.5895215", "0.58555305", "0.57687503", "0.5733721", "0.5699193", "0.5681278", "0.5652285", "0.5629113", "0.56253165", "0.56233585", "0.5622724", "0.5611103", "0.55942327", "0.55937576", "0.5575563", "0.55708504", "0.55646396", "0.55544806", "0.55457497", "0.55204296", "0.5512381", "0.5501434", "0.55008566", "0.5468334", "0.5465453", "0.5465212", "0.5450567", "0.54503065", "0.5449516", "0.5440349", "0.5428552", "0.54058206", "0.5397384", "0.5389857", "0.5374814", "0.5367301", "0.53639275", "0.5362701", "0.53613013", "0.536054", "0.5348841", "0.53118217", "0.5305485", "0.53010106", "0.5288021", "0.5285894", "0.52715397", "0.5266853", "0.525851", "0.52413535", "0.5241095", "0.52397454", "0.5237745", "0.5236012", "0.52273077", "0.52232575", "0.5213879", "0.51887244", "0.51882285", "0.51880944", "0.51776445", "0.5173736", "0.51732475", "0.51698995", "0.5169352", "0.5164764", "0.51617223", "0.51607704", "0.5157183", "0.5156027", "0.51523346", "0.514691", "0.51429844", "0.51411295", "0.5131053", "0.51300174", "0.5127342", "0.5122433", "0.5122422", "0.51187843", "0.5116005", "0.51138115", "0.51122224", "0.51087815", "0.51065886", "0.51041883", "0.510313", "0.5100398", "0.5094997", "0.50918776", "0.508932", "0.5088224" ]
0.6220469
1
To append the datas which user targets on current operand
static appendc(data) { // To ensure that user does'nt input multiple decimal points if (curr_o.includes(".") && data === ".") return; // To ensure that user does'nt input any operators at the begining if (curr_o === "" && operators.includes(data)) return; // Convert to proper decimal '0.' if user starts with decimal accidentally if (curr_o.indexOf(".") === 0) { curr_o = "0."; } curr_o += data; return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pushOp( node, btc,target) {\n var reg1 = uniquegen()\n expnode(node.operand1, reg1, btc)\n var reg2 = uniquegen()\n expnode(node.operand2, reg2, btc)\n btc.push({\"type\":node.type,\"operand1\":reg1,\"operand2\":reg2,\"target\":target})\n }", "function addTargetsToLineItem(){\r\n\tif (validateAddTargets()) {\r\n\t\tvar valueToPrint = \"\";\r\n\t\tvar selectedElements = [];\r\n\t\tvar level = \"--\";\r\n\t\tvar not= \"--\";\r\n\t\tvar operation = \"--\";\r\n\t\tvar previousRowId = $(\"#geoTargetsummary\" , \"#lineItemTargeting\").find(\"tr:last\").attr(\"id\");\r\n\t\tvar rowBeforeLastRowId = $(\"#geoTargetsummary\" , \"#lineItemTargeting\").find(\"tr:last\").prev('tr').attr(\"id\");\r\n\t\tvar rowName = \"geoTargetsummary\";\r\n\t\tif($('#geoTargetsummary tr').length == 1){\r\n\t\t\tvar rowCount = 1;\r\n\t\t}else{\r\n\t\t\tvar rowCount = Number(previousRowId.substring(rowName.length)) + 1;\r\n\t\t\tvar prevRowCount = Number(rowBeforeLastRowId.substring(rowName.length)) + 1;\r\n\t\t\tif(prevRowCount > rowCount){\r\n\t\t\t\trowCount = prevRowCount;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\t\r\n\t\tvar rowId = \"geoTargetsummary\" + rowCount;\r\n\t\t\t\r\n\t\tif(\"Frequency Cap\" == $('#' + previousRowId + \" td:nth-child(2)\").html()){\r\n\t\t\toperation = \"<select onChange='setPlacementNameAndTargetingString();' id='targetAction_\" + rowId + \"'><option value='and'>And</option> <option value='or'>Or</option></select>\";\r\n\t\t\t$('#targetAction_' +rowId).val(\"and\");\r\n\t\t}else{\r\n\t\t\tvar prevRowOperation = \"<select id='targetAction_\" + previousRowId + \"'><option value='and'>And</option> <option value='or'>Or</option></select>\";\r\n\t\t\t$('#targetAction_' +previousRowId).val(\"and\");\r\n\t\t\t$('#' + previousRowId + \" td:nth-child(7)\").html(prevRowOperation);\r\n\t\t}\r\n\t\t\t\r\n\t\tif (\"Frequency Cap\" != $(\"#sosTarTypeId option:selected\").text()) {\r\n\t\t\tnot = \"<input type='checkbox' id='not_\" + rowId + \"' >\";\t\r\n\t\t}\r\n\t\t\t\r\n\t\tif(\"Behavioral\" == $(\"#sosTarTypeId option:selected\").text()){\r\n\t\t\tvar level = \"<select id='revenueScienceSegId_\" + rowId + \"' size='1'><option value='LEVEL1'>1</option> <option value='LEVEL2'>2</option></select>\"\r\n\t\t\t$('#revenueScienceSegId_' +rowId).val(\"LEVEL1\");\r\n\t\t}\r\n\t\t\t\r\n\t\t$(\"#sosTarTypeElement :selected\").each(function(){\r\n\t\t\tselectedElements.push($(this).text());\r\n\t\t});\r\n\t\t\t\r\n\t\tvalueToPrint = \"<tr id='\" + rowId + \"'><td width='12%'>\" + not + \"</td><td width='18%'>\" + $(\"#sosTarTypeId option:selected\").text() + \"</td><td style='display : none'>\" + $(\"#sosTarTypeId\").val();\r\n\t\tif (\"Zip Codes\" == $(\"#sosTarTypeId option:selected\").text() || \"Behavioral\" == $(\"#sosTarTypeId option:selected\").text()) {\r\n\t\t\tvalueToPrint = valueToPrint + \"</td><td width='50%' title='\" + $(\"#tarTypeElementText\").val() + \"' style=' white-space: nowrap; overflow: hidden; text-overflow: ellipsis;'>\" + $(\"#tarTypeElementText\").val() + \"</td><td style='display : none'>\" + $(\"#tarTypeElementText\").val() + \"</td>\";\r\n\t\t}else {\r\n\t\t\tvalueToPrint = valueToPrint + \"</td><td width='50%' title='\" + selectedElements.join(\", \") + \"' style=' white-space: nowrap; overflow: hidden; text-overflow: ellipsis;'>\" + selectedElements.join(\", \") + \"</td><td style='display : none'>\" + $(\"#sosTarTypeElement\").val() + \"</td>\";\r\n\t\t}\r\n\t\t\t\r\n\t\tvalueToPrint = valueToPrint + \"<td width='10%'>\" + level + \"</td>\" + \"</td><td width='10%'>\" + operation +\"</td>\" + \"<td width='10%'>\" + \"<a style='float:left;margin-left:5px' title='Edit' onClick=\\\"editLineItemTarget('\" + rowId + \"')\\\"> <span class='ui-icon ui-icon-pencil' style='cursor:pointer;'/></a> <a style='float:left;margin-left:5px' title='Delete' onClick=\\\"deleteLineItemTarget('\" + rowId + \"')\\\"> <span class='ui-icon ui-icon-trash' style='cursor:pointer;'/></a></td></tr>\";\r\n\t\t\t\r\n\t\tif(\"Frequency Cap\" == $('#' + previousRowId + \" td:nth-child(2)\").html()){\r\n\t\t\t$(\"#geoTargetsummary\" , \"#lineItemTargeting\").find(\"tr:last\").before(valueToPrint);\r\n\t\t}else{\r\n\t\t\t$('#geoTargetsummary').append(valueToPrint);\r\n\t\t}\r\n\t\t\t\r\n\t\tresetTargetingFields();\r\n\t\t$(\"#not_\" + rowId).bind(\"change\", function () {\r\n\t\t\tsetPlacementNameAndTargetingString();\r\n\t\t});\r\n\t\t\r\n\t\t$(\"#targetAction_\" + previousRowId).bind(\"change\", function () {\r\n\t\t\tsetPlacementNameAndTargetingString();\r\n\t\t});\r\n\t\t\r\n\t\tif(level != \"--\"){\r\n\t\t\t$(\"#revenueScienceSegId_\" + rowId).bind(\"change\", function () {\r\n\t\t\t\t $(\"#rateCardPrice\").val(\"\");\r\n\t\t\t\t $(\"#offImpressionLink\", \"#lineItemFinancialFieldsContainer\").hide();\r\n\t\t\t});\r\n\t\t}\r\n\t\tsetBasePrice();\r\n\t\tsetPlacementNameAndTargetingString();\r\n\t\tif ($(\"#lineItemType_r\", \"#lineItemTargeting\").is(':checked') || $(\"#lineItemType_e\", \"#lineItemTargeting\").is(':checked')) {\r\n\t\t\t$('#geoTargetsummary tbody tr').each(function(){\r\n\t\t\t\t$('td:eq(0),td:eq(5),td:eq(6)', this).hide();\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n}", "function pressOperators(){\n getNum();\n var printOperator = $(this).text();\n calc.push(printOperator);\n console.log(calc);\n\n}", "function appendOperator() {\n operator = el;\n calcDisplay.append(`\n <span id=\"operator-text\">\n ${operator}\n </span>`)\n }", "function addData(data) {\n // Add data to array\n let allInstructionsLength = allInstuctions.length;\n //add correct answers to array\n let answers = [];\n for(let i=0;i<4;i++){\n if(data.answer[i].trim()!==\"\"){\n let answer = {\n id: i+1,\n option: data.answer[i].replace(/^\\s+|\\s+$/g, ''),\n isCorrect: data.select[i],\n question: {}\n };\n answers.push(answer)\n }\n }\n allInstuctions[allInstructionsLength - 1].questions[allInstuctions[allInstructionsLength - 1].questions.length] = {\n id: data.question_id,\n title: data.question.replace(/^\\s+|\\s+$/g, ''),//remove line of space\n instruction: {\n id: 0,\n title: data.question,\n quiz: {},\n questions: []\n },\n answers: answers\n };\n //Show total count of instruction\n if (allInstuctions[allInstructionsLength - 1].questions.length >= 1) {\n $(\"#totalInstruction\").text(allInstuctions.length);\n }\n}", "function storeInput () {\n document.querySelectorAll('.operator').forEach(operand => {operand.onclick = function () {\n calculation[\"numbers\"].push(display);\n calculation[\"operators\"].push(operand.innerText);\n currentTotal(calculation[\"numbers\"], calculation[\"operators\"])\n reenterDisplay();\n }\n }\n )\n //getDisplayValue();\n }", "function dataMerge(target,additional)\n{\n for(var add in additional) {\n\tif(target.hasOwnProperty(add)) {\n\t target[add].push(additional[add]);\n\t} else {\n\t target[add] = [additional[add]];\n\t}\n }\n\n return(target);\n}", "function addData2(data, target) {\n let htmlString = data;\n document.querySelector(target).innerHTML = htmlString;\n}", "function addSelectedData(data) {\n\n for (var i = 0; i < data.length; i++) {\n selectedData[selectedDataIndex] = data[i];\n selectedDataIndex += 1;\n }\n}", "function addOper(someOper) {\r\r\n if (currentNum.length === 0 && calcNum.length === 0) {\r\r\n return;\r\r\n } else {\r\r\n if (lastButton === \"oper\") {\r\r\n calcNum[calcNum.length - 1] = someOper;\r\r\n } else {\r\r\n if (lastButton === \"num\") {\r\r\n calcNum.push(currentNum);\r\r\n calcNum.push(someOper);\r\r\n currentNum = \"\";\r\r\n } else {\r\r\n calcNum.push(someOper);\r\r\n }\r\r\n }\r\r\n isPercentage = false;\r\r\n isDecimal = false;\r\r\n lastButton = \"oper\";\r\r\n lastOper = someOper;\r\r\n }\r\r\n}", "function storeOperator(inputOperator){\r\n arrayNumberOpt.push(inputOperator);\r\n \r\n}", "function displayData(target, data) {\n $(target).append(data);\n}", "append(number) {\n //if number already has \".\" or if it equals \".\" then do nothing \n if (currentOperand.innerText.includes('.') && number === '.') {\n return;\n }\n\n //convert number passed plus current number to string so that they go next to each other (instead of replacing each other) when buttons are pressed \n this.currentOperand.innerText = this.currentOperand.innerText.toString() + number.toString();\n\n }", "function pushData() {\r\n for (let j = 1; j < questions.length + 1; j++) {\r\n var data = $(\"input[name=inlineRadioOptions\" + [j] + \"]:checked\").val();\r\n userInput.data.push(data);\r\n }\r\n }", "function updateOutputData() {\n outputData = unformatNum(getOutput());\n // Lines to remove initial emoji etc\n if(isNaN(outputData)) {\n setOutput(this.id);\n setCalculation(\"\");\n }\n //Clear rather than append if last button was =\n else if (sumDone == true) {\n outputData = this.id;\n setOutput(outputData);\n sumDone = false;\n }\n //Append\n else {\n outputData = outputData + this.id;\n setOutput(outputData);\n }\n}", "function appendData() {\n allButtonData.push(buttonData);\n buttonData = [];\n}", "function expStartDataSave() {\n var d = new Date();\n var startTime = d.getTime();\n data.push(revealOrderCondition, dissonanceCondition, valueCondition, targetSource, startTime);\n}", "function appendEquation(data) {\n console.log('Append Equation');\n $('#historyList').empty();\n for ( const equations of data) {\n $('#historyList').append(`\n <li class=\"previousEquations\">\n ${equations.firstNumber}\n ${equations.operator}\n ${equations.secondNumber} \n = ${equations.answer}\n </li>\n `)\n }\n}// end append Equation", "appendData(newType, newID, X, Y) {\n\t\tvar functionList = this.state.functionList;\n\t\tvar Op = \"\", vT = \"\";\n\t\tif(newType === funcOp) { Op = \"+\"; vT = \"int\"; }\n const newData = {type: newType, id: newID, x: X, y: Y, needInteract: true, input: {}, input2: {}, output: {}, op: Op, full: false, hasParent: false, name: \"\", valueType: vT};\n\t\t\n\t\tthis.setState({\n\t\t\tfunctionList: functionList.concat([newData]),\n\t\t});\n\t}", "function onClickadd() {\n if (operandoType == 1 || operandoType == 4) { opHiddenIndex++; }\n operandoType = 2;\n strDisplay += \"+\";\n insertOpHidden(\"+\");\n refreshDisplay();\n}", "addOperation(value) {\n if (isNaN(this.getLastOperation())) {\n\n if (this.isOperator(value)) {\n this.setLastOperation(value);\n } else {\n this.pushOperation(value);\n this.setLastNumberToDisplay();\n }\n\n } else {\n if (this.isOperator(value)) {\n this.pushOperation(value);\n } else {\n let newValue = this.getLastOperation().toString() + value.toString();\n this.setLastOperation(newValue);\n this.setLastNumberToDisplay();\n }\n }\n }", "static appendp(data) {\n // To ensure that user does'nt input multiple decimal points\n if (prev_o.includes(\".\") && data === \".\") return;\n // To ensure that user does'nt input any further operators when there is one\n if (operators.includes(prev_o[prev_o.length - 1])) {\n if (operators.includes(data)) return;\n }\n prev_o += data;\n return;\n }", "function dw() { addSpaceSeparatedAttr(toAdd, \"data-what\", REST); }", "addGenes() {\n this.getOnDemandVariables().forEach((variable) => {\n this.props.variableManagerStore.addVariableToBeDisplayed(variable);\n this.props.variableManagerStore.toggleSelected(variable.id);\n });\n this.geneListString = '';\n this.showAvailableData = false;\n }", "addOperation(value) {\n if (isNaN(this.getLastOperator())) {\n if (this.isOperator(value)) {\n if (this.operation == '') {\n this.operation = [0, value];\n } else {\n this.setLastOperator(value);\n }\n } else {\n if (value == 0) return;\n this.pushOperator(value);\n this.updateDisplay();\n }\n } else {\n if (this.isOperator(value)) {\n this.pushOperator(value);\n } else {\n let numConcat = this.getLastOperator() + value.toString();\n this.setLastOperator(numConcat);\n this.updateDisplay();\n }\n }\n\n //validation to enter in the calc method\n if (this.operation.length > 3 || this.getLastPosition() == 'x²' || this.getLastPosition() == '√') this.calc();\n //update the of display\n this.updateDisplay();\n\n console.log(\"Operation\", this.operation);\n }", "function addInstruction()\n {\n console.log(\"Add instruction currently being worked on...\");\n }", "function appendForm(target,value){\n setFormObjects({\n ...FormObjects,\n [target]: value\n })\n setChanges(true)\n }", "function wr(e,t,a){xr(e,t,a),ir(e,e.sel,e.cm?e.cm.curOp.id:NaN,a)}", "function addOperand(key){\n let newOperand = key\n switch(newOperand){\n case \"+\":\n toggleOperandDisplay(\"plus\");\n break;\n case \"-\":\n toggleOperandDisplay(\"minus\");\n break;\n case \"*\":\n toggleOperandDisplay(\"multiply\");\n break;\n case \"/\":\n toggleOperandDisplay(\"divide\");\n break;\n default:\n toggleOperandDisplay(\"\");\n break;\n };\n calculate(false);\n operand = newOperand;\n} // addOperand(key)", "function LOG_OPERAND(pcWord) {\n \"use strict\";\n if (log.limit) {\n log.ring[log.ring.length - 1].push(pcWord);\n }\n}", "function historicalData(n1, op, n2, result) {\n let fullOp = '';\n\n if (op === 'add') {\n fullOp = (n1 + \" + \" + n2 + \" = \" + result);\n } else if (op === 'subtract') {\n fullOp = (n1 + \" - \" + n2 + \" = \" + result);\n } else if (op === 'multiply') {\n fullOp = (n1 + \" x \" + n2 + \" = \" + result);\n } else if (op === 'divide') {\n fullOp = (n1 + \" ÷ \" + n2 + \" = \" + result);\n }\n\n return fullOp;\n}", "function addto(which, zero, one, two, three) {;\n which[0] = zero;\n which[1] = one;\n which[2] = two;\n which[3] = three;\n }", "function appendData(handX, handY, cursorX, cursorY) {\n data.trialNum.push(state.numTrials);\n data.trialPhase.push(state.taskState);\n data.trialType.push(state.trialType);\n let d = new Date();\n data.time.push(d.getTime() - state.trialStart);\n data.cursorX.push(cursorX);\n data.cursorY.push(cursorY);\n data.handX.push(handX);\n data.handY.push(handY);\n}", "function operator(op) {\n var val = parseFloat(display.innerHTML);\n if(val) {\n array.push(val);\n array.push(op);\n display.innerHTML = '';\n } else if (typeof array[array.length -1] !== 'number' && array.length !== 0) { // change previous operator to current operator\n array.pop();\n array.push(op);\n }\n }", "function clickedOp(op) {\n if (state.result !== undefined) {\n state = {\n operandOne: state.result,\n operandTwo: \"\",\n operation: op,\n result: undefined\n };\n } else if (state.operandTwo !== undefined && state.operandTwo.length) {\n result = getResult();\n if (op === \"add-equals\") {\n state.result = result;\n panel.textContent = result;\n } else {\n result = getResult();\n state = {\n operandOne: result,\n operandTwo: \"\",\n operation: op,\n result: undefined\n };\n panel.textContent = result;\n }\n } else if (state.operandTwo === undefined) {\n state.operandTwo = \"\";\n state.operation = op;\n } else {\n state.operation = op;\n }\n }", "function expressionAddOperators(num, target){\n let result = [];\n\n function helper(num ,target, temp, curResult, prevNum){\n if(curResult === target && num.length === 0){\n result.push(temp);\n return;\n }\n\n for(let i=1; i<=num.length; i++) {\n let curStr = num.substring(0, i);\n\n if(curStr.length > 0 && curStr.charAt(0) === '0') {\n continue;\n }\n\n let curNum = parseInt(curStr);\n let next = num.substring(i);\n\n if(temp.length != 0){\n helper(next, target, temp + '*' + curNum, (curResult - prevNum) + prevNum * curNum, prevNum * curNum);\n helper(next, target, temp + '+' + curNum, curResult + curNum, curNum);\n helper(next, target, temp + '-' + curNum, curResult - curNum, -curNum);\n }else{\n helper(next, target, curStr, curNum, curNum);\n }\n }\n \n }\n\n helper(num, target, '', 0, 0);\n\n return result;\n}", "function add() {\r\n const enteredNumber = getUserInputValue();\r\n const initialValue = currentResult ;\r\n const calcDescription = `${enteredNumber} + ${initialValue}`\r\n currentResult = enteredNumber + initialValue;\r\n getOperator('+', initialValue ,enteredNumber)\r\n}", "function addData1(data, key, target) { \n let htmlArr = [];\n let text;\n data.forEach(function(x) {\n if (key) {\n text = `<p>${x[key]}</p>\\n`;\n } else {\n text = `<p>${x}</p>\\n`;\n }\n htmlArr.push(text);\n })\n let htmlString = htmlArr.join('');\n document.querySelector(target).innerHTML = htmlString;\n}", "append(target) {\n var args = Array.prototype.slice.call(arguments);\n if (!Array.isArray(target)) {\n target = [target];\n }\n return target.concat.apply(target, args);\n }", "function addToList(target) {\n let goal = target.getAttribute('value');\n socket.emit('addGoal', {list: typeOfList, id: selectedList, goal: goal});\n }", "function addAntInfo(numId,flag){\n if(flag!=0){\n var antId=\"id\"+numId;\n var panel1_line_add=$(\".panel1-line\").eq(2).clone();\n $(\".panel1\").append(panel1_line_add);\n ant={id:antId,speed:1,dirt:2,distX:1,pos:ant_postfix};\n ants[antId]=ant;\n }\n else{\n var antId=\"id\"+numId;\n ant={id:antId,speed:1,dirt:2,distX:1,pos:0};\n ants[antId]=ant;\n }\n }", "function op(name) {\n return operators[name] || that.missingOperator(name);\n /*\n if (operators[name]) {\n operators[name].targetData = target;\n return operators[name];\n } else {\n return that.missingOperator(name);\n }\n */\n }", "function _addResult( pData ) {\n var lSelectionValues;\n gWizardSelection$.append( pData.entries );\n gWizardSelection$.iconList( \"refresh\" );\n gWizardSelection$.iconList( \"setSelection\", gWizardSelection$.children().first() );\n lSelectionValues = gWizardSelection$.iconList( \"getSelectionValues\" );\n gWizardSelectionHidden$\n .val( lSelectionValues[ 0 ] )\n .trigger( \"change\" );\n } // _addResult", "function mPlus() {\n other_memory = eval(other_memory) + eval(current_input);\n console.log(\"memory is \" + other_memory);\n}", "_receiveOperand(value) {\n let currentValue = +value;\n\n if (this.lastInputType === 'operand' && this.operands.size() > 0) {\n const previousValue = this.operands.pop();\n currentValue = (previousValue * 10 + currentValue);\n }\n\n this.operands.push(currentValue);\n this.lastInputType = 'operand';\n this._displayResult();\n }", "function getAns(op){\n\tuserAns[0] = op;\n\topSelected = true;\n\treturn userAns;\n\t/*userAns.push(op)\n\treturn console.log(userAns);*/\n}", "function getDataForTargetingToSave(){\r\n\tvar lineItemTargetings = new Array();\r\n\tvar objId =\"\";\r\n\tvar action = \"\";\r\n\tvar not = \"\";\r\n\tvar rowId = $(\"#geoTargetsummary\" , \"#lineItemTargeting\").find(\"tr:last\").attr(\"id\");\r\n\t\r\n\t$(\"#lineItemTargetingData\").val(\"\");\r\n $(\"#geoTargetsummary tr\").each(function(){\r\n\t\tobjId = $(this).attr(\"id\");\r\n if (objId != \"geoTargetsummaryHeader\") {\r\n\t\t\t var object = new Object();\r\n\t\t\t var level=\"\";\r\n\t\t\t if(rowId != objId){\r\n\t\t\t\t action = $('#targetAction_' +objId + \" option:selected\").val();\r\n\t\t\t }else{\r\n\t\t\t\t action = \"\";\r\n\t\t\t }\r\n\t\t\t object.action = action;\r\n\t\t object.targetTypeId = $(\"#\" + objId + \" td:nth-child(3)\").html();\r\n\t\t object.targetTypeElement = $(\"#\" + objId + \" td:nth-child(5)\").html();\r\n\t\t if ($('#not_' +objId).is(':checked')) {\r\n\t\t\t\t\tnot = \"Not\";\r\n\t\t }else{\r\n\t\t \tnot = \"\";\r\n\t\t }\r\n\t\t \r\n\t\t object.not = not;\r\n\t\t if(\"Behavioral\" == $(\"#\" + objId + \" td:nth-child(2)\").html()){\r\n\t\t \t level = $('#revenueScienceSegId_' +objId + \" option:selected\").val();\r\n\t\t }\r\n\t\t object.segmentLevel = level;\r\n\t\t lineItemTargetings.push(object);\r\n $(\"#lineItemTargetingData\").val(JSON.stringify(lineItemTargetings));\r\n }\r\n });\r\n}", "function makeData(md,x) {nextData.push({md});}", "function showAllData(heroes) {\n heroes.forEach(xmen=> {\n let input = document.getElementById('hero-id').value\n\n\n\n let templateNode = document.getElementById('tpl-hero').content.cloneNode(true);\n //comparing id to input to make sure the correct one is shown\n if (xmen.id==input){\n templateNode.querySelector('.name').innerText = xmen.name;\n templateNode.querySelector('.alter-ego').innerText = xmen.alterEgo;\n templateNode.querySelector(\".powers\").innerText=xmen.abilities;\n //won't be visible without appending it to target\n document.getElementById(\"target\").appendChild(templateNode);\n }\n\n })\n\n\n\n }", "function addData(newValue, data) {\n // Extract the values we need from the data and format them properly\n convertData(newValue);\n\n data.push(newValue);\n}", "function appendListOperands(ops, args) {\n let first = true;\n for (const op of ops) {\n if (first) first = false;\n else appendSql(\",\", args);\n args.push(op.value);\n args[0].push(\"\");\n }\n}", "function makeData(md,x) {nextData.push({md:md});}", "function appendData(data) {\r\n\r\n number.innerHTML = `Number : ${data.number}`\r\n sect_tamil.innerHTML = `Section : ${data.sect_tam}`\r\n chapgrp_tam.innerHTML = `Chapter : ${data.chapgrp_tam}`\r\n chap_tam.innerHTML = `Adhigaram : ${data.chap_tam}`\r\n line1.innerHTML = data.line1\r\n line2.innerHTML = data.line2\r\n tam_exp.innerHTML = `Tamil Explanation : ${data.tam_exp}`\r\n}", "addOperation(classId, operationId, data) {\n console.log(\"NEW DATA\", data)\n this.operations[operationId] = new OperationData(data);\n console.log(\"NEW DATA2\", this.operations[operationId])\n console.log(\"NEW DATA3\" ,new OperationData(data))\n this.classes[classId].addOperation(operationId);\n }", "function storeOperator(op) {\n if (op.indexOf(\"*\") > -1) { operator = 1; }; //codes for *\n if (op.indexOf(\"/\") > -1) { operator = 2; }; // slash (divide)\n if (op.indexOf(\"+\") > -1) { operator = 3; }; // sum\n if (op.indexOf(\"-\") > -1) { operator = 4; }; // difference\n\n memory = currentInput; //store value\n currentInput = \"0\";\n displayCurrentInput();\n}", "function appendScreen() {\n var input = $(event.target).text();\n if ($(event.target).hasClass('operator')) {\n a = $('#screen').text();\n $('#screen').text(\"\");\n $('#screen').append(input);\n symbol = $(event.target).text();\n } else {\n if (a === null) {\n $('#screen').append(input);\n } else {\n $('#screen').append(input);\n b = $(event.target).text();\n }\n }\n return input;\n}", "pushOperandToLast(operand) {\n this.setState({lastOperand: operand});\n this.updateUpperDisplay(operand);\n }", "function putData(target, index, obj) {\n var alt = JSON.stringify(obj);\n target.children[5].children[0].setAttribute('data-alt' + index, '[' + alt + ']');\n target.children[5].children[1].setAttribute('data-alt' + index, '[' + alt + ']');\n if (index == 5) {\n showButton(\n target.children[5].children[0], // Button Detail\n target.children[5].children[1], // Button Edit\n target.children[5].children[2] // Button Delete\n );\n }\n}", "function pushDataArray(data, kata) {\n console.log(data)\n data.push(1, 20, 16)\n kata(data)\n return console.log(data)\n}", "function gen_op_vfp_adds()\n{\n gen_opc_ptr.push({func:op_vfp_adds});\n}", "function addTargetToXML(target) {\n var targetXMLContent = \"\";\n targetXMLContent += \"<target\";\n targetXMLContent += \" type='\" + target.targetType + \"'\";\n targetXMLContent += \" targetQuery='\" + target.targetQuery + \"'\"\n targetXMLContent += \">\\n\";\n if (target.extractArray.length > 0) {\n target.extractArray.map(function (extract) {\n targetXMLContent += addExtractToXML(extract);\n });\n }\n targetXMLContent += \"</target>\\n\";\n return targetXMLContent;\n}", "function addToArray(){\n\tconsole.log(document.getElementById(1000+1).value);\n\tvar objProduct=new Object();\n\tvar ids;\n\tif(qu.length==0)\n\t\tids=1;\n\telse\n\t\tids=qu[qu.length-1].id+1;\n\tobjProduct.id=ids;\n\tobjProduct.score=document.getElementById(\"name1\").value;\n\tobjProduct.negative=document.getElementById(\"ngtv\").value;\n\tobjProduct.title=document.getElementById(\"title\").value;\n\tobjProduct.quest=document.getElementById(\"quest\").value;\n\t\n\tvar child=newdv.childNodes;\n\tconsole.log(child.length);\n\tfor(var i=0;i<child.length;i++){\n\t\tvar ob=new Object();\n\t\tob.Qid=ids;\n\t\tvar uid;\n\t\tif(opt.length==0)\n\t\t\tuid=1;\n\t\telse\n\t\t\tuid=opt[opt.length-1].uid+1;\n\t\tob.uid=uid;\n\t\tconsole.log(document.getElementById(1000+i).value);\n\t\tob.optnz=document.getElementById(1000+i).value;\n\t\topt.push(ob);\n\t\tstoreOp(opt);\n\t}\n\tqu.push(objProduct); //push values stored in object in array\n\tstore(qu); //save array in browser local storage\n \t\t\n}", "append(name, value) {\n return this.clone({\n name,\n value,\n op: 'a'\n });\n }", "function calculator(button){\r\n if(button.type == \"operator\"){\r\n data.operation.push(button.symbol);\r\n data.result.push(button.formula);\r\n }\r\n else if (button.type == \"number\"){\r\n data.operation.push(button.symbol);\r\n data.result.push(button.formula);\r\n }\r\n else if(button.type == \"key\"){\r\n if(button.name == \"delete\"){\r\n data.operation.pop();\r\n data.result.pop();\r\n }\r\n else if (button.name == \"clear\"){\r\n data.result = [];\r\n data.operation = [];\r\n output_result_element.innerHTML = 0;\r\n }\r\n else if(button.name == \"rad\"){\r\n RADIAN = true;\r\n angleToggler();\r\n }\r\n else if (button.name == \"deg\"){\r\n RADIAN = false;\r\n angleToggler();\r\n }\r\n }\r\n \r\n else if (button.type == \"math_function\") {\r\n\r\n if (button.name == \"factorial\") {\r\n data.operation.push(\"!\");\r\n data.result.push(button.formula);\r\n } else if (button.name == \"square\") {\r\n data.operation.push(\"^(\");\r\n data.result.push(button.formula);\r\n data.operation.push(\"2)\");\r\n data.result.push(\"2)\");\r\n }\r\n else if (button.name == \"power\")\r\n {\r\n data.operation.push(\"^(\");\r\n data.result.push(button.formula);\r\n\r\n }\r\n else {\r\n data.operation.push(button.symbol + \"(\");\r\n data.result.push(button.formula + \"(\");\r\n }\r\n }\r\n else if (button.type == \"trigo_function\") {\r\n data.operation.push(button.symbol + \"(\");\r\n data.result.push(button.formula);\r\n }\r\n \r\n else if (button.type == \"calculate\"){\r\n let result_tot = data.result.join(\"\");\r\n \r\n let final_result;\r\n \r\n let power_search = searcher(data.result,POWER);\r\n\r\n let factorial_search = searcher(data.result,FACTORIAL);\r\n\r\n const power_base = power_base_search(data.result,power_search);\r\n power_base.forEach( ele => {\r\n let toReplace = ele + POWER;\r\n let replacement = \"Math.pow(\" + ele + \",\";\r\n result_tot = result_tot.replace(toReplace,replacement);\r\n })\r\n\r\n const facto_base = fact_base_search(data.result,factorial_search);\r\n\r\n facto_base.forEach(ele => {\r\n result_tot = result_tot.replace(ele.toReplace, ele.replacement);\r\n })\r\n \r\n //CHECKING SYNTAX-ERROR\r\n try {\r\n final_result = eval(result_tot);\r\n } catch (error) {\r\n if( error instanceof SyntaxError){\r\n final_result = \"Error!\";\r\n output_result_element.innerHTML = final_result;\r\n return;\r\n }\r\n }\r\n\r\n final_result = calculate(final_result);\r\n ans = final_result;\r\n data.operation.push(final_result);\r\n data.result.push(final_result);\r\n output_result_element.innerHTML = final_result;\r\n return;\r\n }\r\n updateOutputOperation( data.operation.join('') );\r\n}", "function addOperator(){\n console.log(inputValue); // puts console message that '+' was clicked\n memory =Number(inputValue.value); // stores Number into memory\n //console.log(memory);\n operator = add; // for 'add' call back function\n inputValue.value = \"\"; // for display\n}", "function gen_op_addl_T0_T1_setq()\n{\n gen_opc_ptr.push({func:op_addl_T0_T1_setq});\n}", "update() {\n this.currTextViewer.innerHTML =\n this.getDisplay(this.currentOperand);\n if (this.operation != null) {\n this.prevTextViewer.innerHTML =\n `${this.getDisplay(this.previousOperand)} ${this.symbol}`;\n } else {\n this.prevTextViewer.innerHTML = `${this.currentOperand}`;\n this.total = `${this.currentOperand}`;\n }\n }", "function appendToStatementManager(){\n statementManager.push(nt)\n }", "function addOp(prev, maxOps) {\n if (maxOps < 1) {\n finalResults.push(prev);\n } else {\n for (let op of ops) {\n for (let i = 0; i < MAX_VAL; i++) {\n addOp([...prev, op, i + 1], maxOps - 1);\n }\n }\n }\n}", "function action_Data() {\n let list_memory = [];\n\n function useClickEvent_by_Class(data_list) {\n let len_i = data_list.length;\n for (let i = 0; i < len_i; i++) {\n let elems_i = document.getElementsByClassName([data_list[i].class]);\n for (let j = 0, len_j = elems_i.length; j < len_j; j++) { //loop the elems by clasname \n elems_i[j].addEventListener(data_list[i].action, data_list[i].method);\n }\n }\n if (data_list.saveOrNot) {\n list_memory.push(data_list);\n }\n }\n useClickEvent_by_Class([{\n class: \"edit\",\n action: \"click\",\n method: detailData_toFormEfiling,\n seveOrNot: false,\n }, {\n class: \"detail\",\n action: \"click\",\n method: detailData_toFormEfiling,\n seveOrNot: false,\n }, {\n class: \"verifikasi\",\n action: \"click\",\n method: detailData_toFormEfiling,\n seveOrNot: false,\n }, {\n class: \"duplikat\",\n action: \"click\",\n method: duplikat,\n seveOrNot: false,\n }]);\n}", "function gen_op_addl_T0_T1_usaturate()\n{\n gen_opc_ptr.push({func:op_addl_T0_T1_usaturate});\n}", "addOperation(value){\n //console.log(this.getLastOperation());\n //aqui utilizamos a função isNaN(\"a\") == true / isNaN(\"4\") == false;\n //essa função verifica se o argumento passado não é um número\n\n //se o \"ultimo\" valor do vetor _operation não for um número ou se \n //o vetor estiver vazio \n if(isNaN(this.getLastOperation())){\n //String\n if(this.isOperation(value)){//verificando se o valor é alguma operação aritimética\n //caso já exista algum sinal, quer dizer que o usuário quer modificar o operador\n //então exclui a ultima opção\n //e add novamente o novo operador\n this._operation.pop();\n this.pushOperation(value);\n //this.showConsole();\n\n }else{\n //se o vetor estiver vazio e não for ponto ou operações \n // e sim um numero que foi digitado ou seja...\n //para a primeira vez que o valor numérico for digitado\n this.pushOperation(value);\n this.setLastNumberToDisplay();\n //this.showConsole();\n }\n }else{//se a ultima posição do vetor for um número no vetor\n //verificar o que vai ser adicionado no vetor\n //se é a nova entrada é um novo número ou algum sinal\n if(this.isOperation(value)){\n \n this.pushOperation(value);//adicionando na ultima posição.\n //this.showConsole();\n }else{\n //Number\n let newValue = this.getLastOperation().toString() + value.toString();\n this.setLastOperation(newValue);\n //this.showConsole();\n //Add no display\n this.setLastNumberToDisplay();\n\n } \n }\n \n }", "appendNum(number){\n if (number === \".\" && this.currentOp.includes(\".\")) return //if type . and . exists, stop/ do not append\n this.currentOp = this.currentOp.toString() + number.toString() //converts to string\n }", "chooseOperation(operation){\n if (this.currentOperand === '') return\n //to get a displaying figure or answer to continue another computation\n if (this.previousOperand !== '') {\n this.compute()\n }\n //to get the actual operation clicked\n this.operation = operation\n // the previous operand now equals current operand for new input\n this.previousOperand = this.currentOperand\n this.currentOperand = ''\n }", "function addExample() {\n\n samplesP.html('samples: '+sample++); //see amount of samples collected. \n\n let inputs = getInputs();\n // Get frequency\n let target = classifierLabel;\n // Add data\n brain.addData(inputs, [target]);\n\n}", "function handleData(target) {\n const dataValue = target.getAttribute('data-value');\n displayData(`const ${dataValue} = ${JSON.stringify(data[dataValue], null, 10)}`);\n // function highlighting the selected button\n handleActive(target);\n}", "function addToWikidataArray(wikidataId) {\n var selected = whatsSelected();\n //console.log(selected);\n //console.log(wikidataIds.length);\n //console.log(\"Das ist die Wikidata ID: \"+wikidataId);\n wikidataIds[selected].push(wikidataId);\n //console.log(wikidataIds);\n createOutput();\n}", "function extractOperationSet(inputChangeset, instructionList){\n var index;\n var operators = \":><$=+-\";\n\n for(index = 0; index < inputChangeset.length; index++){\n if(operators.includes(inputChangeset[index])){\n instructionList.push(extractOperation(index,inputChangeset));\n }\n }\n }", "function duplicateTargets()\n{\n var temp = GC.selected_targets;\n // addTab draws and draw removes all selections\n // so gotta save them first\n addTab(); \n GC.selected_targets = temp;\n for (let target of GC.selected_targets)\n {\n var cloned = JSON.parse(JSON.stringify(target));\n let id = GC.target_counter++;\n cloned.name = \"Target \" + id;\n GC.tabs[GC.selected_tab].push(cloned);\n draw();\n } \n}", "function getValue(input){\n //if our dot array operators2 includes(includes basically check a value)..if value u r checking is within operators2, it will return true, if not, it will return false..last value=inputs.length-1\n if(operators2.includes(inputs[inputs.length-1]===true && input===\".\")){\n console.log(\"Duplicat '.' \");\n }\n //if very first number is exactly = 1\n else if(inputs.length===1 && operators1.includes(input)===false){\n //add value to inputs array..inputs=array..input=this.id that we will be adding..so basically is checking if it is a number\n inputs.push(input); \n }\n //if last thing was not an operator, go ahead and add that input to the array\n //if last character was not an operator, add operator to the array\n else if(operators1.includes(inputs[inputs.length-1])===false){\n inputs.push(input);\n }\n //check to add a number..convert string to number\n //if input includes,of how we r getting id, convert string to number..if it includes that input..if that is true..\n else if(nums.includes(Number(input))){\n //push input to end of array?\n inputs.push(input);\n }\n //update function will update value at end of our list\n update();\n }", "pushOperator(value) {\n this.operation.push(value);\n }", "function recordHistoryMulti (op, id_list) {\r\n let action;\r\n if (op == \"move\") action = HNACTION_BKMKMOVE;\r\n else if (op == \"remove\") action = HNACTION_BKMKREMOVE;\r\n else if (op == \"remove_tt\") action = HNACTION_BKMKREMOVETOTRASH;\r\n// else if (op == \"create\") action = HNACTION_BKMKCREATE;\r\n historyListAdd(curHNList, action, true, id_list);\r\n}", "function push(source,target) {\n target.appendChild(source);\n }", "function onSelectDataElementOperand($item, $model, $label, $event, indicatorId){\n\t\t\t\n\t\t\tvm.selectedDataElementOperand[indicatorId][\"id\"] = $item[\"id\"];\n\t\t\t//console.log(vm.selectedDataElementOperand);\n\t\t\t \n\t\t\t\n\t\t\tvm.selectedIndicatorObj[\"numerator\"] = \"#{\" + vm.selectedDataElementOperand[indicatorId][\"id\"] + \"}\";\n\t\t\tvm.indicatorMap[indicatorId][\"numerator\"] = \"#{\" + vm.selectedDataElementOperand[indicatorId][\"id\"] + \"}\";\n\t\t\tvm.indicatorsChanged.push(indicatorId);\n\t\t} // end of onChangeDataElement", "function appendTags() {\n \n $.each(availableTags, function(k, tag) {\n $('#DataTags').append(\n '<a href=\"#\" class=\"label\" onclick=\"Tags.toggleTag(this, \\''+tag+'\\')\">'+tag+'</a> '\n );\n });\n \n }", "function operatorPressed(operator) {\n // if remaining minus, do nothing\n if (display.textContent === '-'){\n return;\n }\n const button = document.querySelector(`.${getOperatorName(operator)}`);\n button.classList.add(\"clicked\");\n display.dataset.numbers += \",\"+display.textContent; // save number\n display.dataset.operators += \",\"+operator; // save operator\n display.classList.add(\"clear\");\n}", "append(param, value) {\n return this.clone({\n param,\n value,\n op: 'a'\n });\n }", "function add_result( value ) {\n r.push(value.data);\n next_question();\n}", "function history(){\n if(num === \"NaN\") {\n answer = \"error\";\n } else {\n answer = operators[opr](firstInputs, num);\n }\n $(\"ul\").append(\"<li><span class='delete'><i class='fa fa-trash' aria-hidden='true'></i></span><span class='entry'>\" + historyInput+ num +\" = \" + answer + \"</span> </li>\");\n historyInput = \"\";\n }", "function addPlannedAction(node, plan, action, prop, oper, value) {\n var planAction = document.getElementById(action).value;\n var dsProp = document.getElementById(prop).value;\n console.log('#' + prop)\n var dsOper = document.getElementById(oper).value;\n if (value == 'annoSelector') {\n var propValue = Q(jQuery('#' + value)).find('select').val();\n } else {\n var propValue = document.getElementById(value).value;\n }\n var planVal = '';\n planVal = planVal.concat('[', \"action:\", '\"', planAction, '\",', \"operator:\", '\"', dsOper, '\",', \"property:\", '\"', dsProp, '\",', \"value:\", '\"', propValue, '\"', ']');\n console.log('queryPlanValue:' + planVal)\n document.getElementById(plan).value = document.getElementById(plan).value.concat(planVal);\n parentId = document.getElementById(plan).parentNode.id\n jQuery('#' + parentId).trigger('change')\n /* add checkbox option to document node */\n addAnnotationCheckBox(node, planAction, dsProp, dsOper, propValue, planVal)\n}", "function addDataToViewDataButton() {\n // loops through each match selected_team was in\n for (let match_id in stand_data[selected_team]) {\n // match is an object\n let match = stand_data[selected_team][match_id];\n // traverses through each question in match and adds result to View Data Button\n traverseScoutKitJSON(match, function(json, page, page_index, question, question_index) {\n // adds data to the View Data Button\n addButtonData(\"view\" + match_id, question_index + \"-\" + page_index, [\n // returns the question\n function() {\n return question;\n },\n // returns the answer to the question\n function() {\n let answer = match[page][question];\n // instead of returning scout number, return scout name\n if (match[page][question] == \"Login\") {\n answer = scouts[answer];\n }\n return answer;\n }\n ]);\n });\n }\n}", "function addData(data) {\n console.log(` Adding: ${data.building} audit data`);\n Data.insert(data);\n}", "function dataLog() {\n fs.appendFile(\"./log.txt\", \", \" + arguTwo)}", "addManipulateConfig(type) {\n const { value } = this.props // form value\n const { index } = this.props // other value\n const { changeTargetConfig } = this.props // function\n\n if (!value.hasOwnProperty(type)) {\n return\n }\n\n const manipulates = value[type]\n\n changeTargetConfig(index, Object.assign({}, value, {\n [type]: manipulates.concat({\n id: uniqueId(),\n filter: \"\",\n query: \"\",\n actions: [\n {\n id: uniqueId(),\n type: \"\",\n action: \"\",\n args: [\"\"],\n }\n ]\n })\n })) \n }", "data(y_quad) {\n results.push(y_quad)\n }", "function buildDataAtti() {\n\tdata_attiInfo = require(file_data_attiInfo);\n\tdata_attiTerms = require(file_data_attiTerms);\n\t\n\tattiDataMerger(data_attiInfo, data_attiTerms, path_tmp);\n}", "function addViareduce(value, currentItem){\n\treturn value + currentItem;\n\n}", "function addEdgeOnto(src,tgt){\n if(src>=0 && src<node_dataOnto.length){\n if(tgt>=0 && tgt<node_dataOnto.length){\n if(-1==indexOfLinkOnto(src,tgt)){\n link_dataOnto.push({source: node_dataOnto[src],target: node_dataOnto[tgt]});\n refreshGraphOnto(node_dataOnto,link_dataOnto);\n }\n }\n }\n}", "function addData(datatype, dataset, data)\n{\n\tvar variableIndex=findVariable (datatype, dataset.toLowerCase());\n \tfor(var person in people)\n\t{\n\t\tvar fipcode=people[person].fip;\n\t\tif(datatype=='super')\n\t\t{\n\t\t\tvar distribution=data[fipcode];\n\t\t\tvar key=Math.random();\n\t\t\tvar index=0;\n\t\t\twhile(key>distribution[index])\n\t\t\t{\n\t\t\t\tindex++;\n\t\t\t}\n\t\t\tpeople[person][dataset]=superUsage['dependancies'][variableIndex][index];\n\t\t}\n\t\telse\n\t\t{\n\t\t\tpeople[person][dataset]=data[fipcode];\n\t\t}\n\t\t\n\t} \n}", "addToArray(data){\n\t\tthis.userData.push(data);\n\t\tconsole.log(this.userData)\n\t}", "recordOperation(operator) {\n if (this.currOperand === \"\") {\n return;\n }\n if (this.lastOperand !== \"\") {\n this.compute();\n }\n this.operator = operator;\n this.lastOperand = this.currOperand;\n this.currOperand = \"\";\n }" ]
[ "0.59933394", "0.54315037", "0.5428083", "0.54070413", "0.5333663", "0.52508116", "0.5235776", "0.5218469", "0.5158101", "0.51533484", "0.5138131", "0.51328987", "0.51048094", "0.51021886", "0.5094715", "0.50831187", "0.50570714", "0.50561976", "0.5053642", "0.5045771", "0.5042116", "0.5023485", "0.5011594", "0.5004822", "0.5002531", "0.49849886", "0.49741125", "0.4972829", "0.49621215", "0.49593595", "0.49523515", "0.49432918", "0.49402744", "0.49402422", "0.49345374", "0.4931554", "0.49301195", "0.49238306", "0.49221584", "0.49217725", "0.49071208", "0.4906233", "0.49034882", "0.48925647", "0.48822683", "0.48796716", "0.48563248", "0.4832454", "0.48309344", "0.48247722", "0.48225787", "0.48215336", "0.48132637", "0.48114675", "0.4810813", "0.4788745", "0.47877786", "0.47834438", "0.47799233", "0.4774377", "0.47702643", "0.4768831", "0.47682554", "0.475982", "0.47486737", "0.47405165", "0.47402605", "0.4738872", "0.47372946", "0.472962", "0.47285777", "0.47207993", "0.47126094", "0.47019878", "0.46996927", "0.46888345", "0.46849248", "0.46832666", "0.46771938", "0.467626", "0.4672181", "0.46690607", "0.46634245", "0.46590802", "0.46501458", "0.4649151", "0.46456742", "0.46387264", "0.46385753", "0.4632987", "0.46292418", "0.46286935", "0.46250877", "0.46234673", "0.462165", "0.46179497", "0.46169436", "0.46165222", "0.46126074", "0.46095198", "0.46044698" ]
0.0
-1
To append the datas which user targets on previous operand
static appendp(data) { // To ensure that user does'nt input multiple decimal points if (prev_o.includes(".") && data === ".") return; // To ensure that user does'nt input any further operators when there is one if (operators.includes(prev_o[prev_o.length - 1])) { if (operators.includes(data)) return; } prev_o += data; return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pushOp( node, btc,target) {\n var reg1 = uniquegen()\n expnode(node.operand1, reg1, btc)\n var reg2 = uniquegen()\n expnode(node.operand2, reg2, btc)\n btc.push({\"type\":node.type,\"operand1\":reg1,\"operand2\":reg2,\"target\":target})\n }", "function addOper(someOper) {\r\r\n if (currentNum.length === 0 && calcNum.length === 0) {\r\r\n return;\r\r\n } else {\r\r\n if (lastButton === \"oper\") {\r\r\n calcNum[calcNum.length - 1] = someOper;\r\r\n } else {\r\r\n if (lastButton === \"num\") {\r\r\n calcNum.push(currentNum);\r\r\n calcNum.push(someOper);\r\r\n currentNum = \"\";\r\r\n } else {\r\r\n calcNum.push(someOper);\r\r\n }\r\r\n }\r\r\n isPercentage = false;\r\r\n isDecimal = false;\r\r\n lastButton = \"oper\";\r\r\n lastOper = someOper;\r\r\n }\r\r\n}", "function pressOperators(){\n getNum();\n var printOperator = $(this).text();\n calc.push(printOperator);\n console.log(calc);\n\n}", "function nonMutatingPush(original, newItem) {\n // Add your code below this line\n return original.concat(newItem);\n console.log(original)\n\n\n // Add your code above this line\n}", "function addOp(prev, maxOps) {\n if (maxOps < 1) {\n finalResults.push(prev);\n } else {\n for (let op of ops) {\n for (let i = 0; i < MAX_VAL; i++) {\n addOp([...prev, op, i + 1], maxOps - 1);\n }\n }\n }\n}", "function updateOutputData() {\n outputData = unformatNum(getOutput());\n // Lines to remove initial emoji etc\n if(isNaN(outputData)) {\n setOutput(this.id);\n setCalculation(\"\");\n }\n //Clear rather than append if last button was =\n else if (sumDone == true) {\n outputData = this.id;\n setOutput(outputData);\n sumDone = false;\n }\n //Append\n else {\n outputData = outputData + this.id;\n setOutput(outputData);\n }\n}", "function appendEquation(data) {\n console.log('Append Equation');\n $('#historyList').empty();\n for ( const equations of data) {\n $('#historyList').append(`\n <li class=\"previousEquations\">\n ${equations.firstNumber}\n ${equations.operator}\n ${equations.secondNumber} \n = ${equations.answer}\n </li>\n `)\n }\n}// end append Equation", "function operator(op) {\n var val = parseFloat(display.innerHTML);\n if(val) {\n array.push(val);\n array.push(op);\n display.innerHTML = '';\n } else if (typeof array[array.length -1] !== 'number' && array.length !== 0) { // change previous operator to current operator\n array.pop();\n array.push(op);\n }\n }", "function appendData() {\n allButtonData.push(buttonData);\n buttonData = [];\n}", "function storeInput () {\n document.querySelectorAll('.operator').forEach(operand => {operand.onclick = function () {\n calculation[\"numbers\"].push(display);\n calculation[\"operators\"].push(operand.innerText);\n currentTotal(calculation[\"numbers\"], calculation[\"operators\"])\n reenterDisplay();\n }\n }\n )\n //getDisplayValue();\n }", "function historicalData(n1, op, n2, result) {\n let fullOp = '';\n\n if (op === 'add') {\n fullOp = (n1 + \" + \" + n2 + \" = \" + result);\n } else if (op === 'subtract') {\n fullOp = (n1 + \" - \" + n2 + \" = \" + result);\n } else if (op === 'multiply') {\n fullOp = (n1 + \" x \" + n2 + \" = \" + result);\n } else if (op === 'divide') {\n fullOp = (n1 + \" ÷ \" + n2 + \" = \" + result);\n }\n\n return fullOp;\n}", "savePrevious(data){\r\n this.previous.push(data.val());\r\n }", "appendData(newType, newID, X, Y) {\n\t\tvar functionList = this.state.functionList;\n\t\tvar Op = \"\", vT = \"\";\n\t\tif(newType === funcOp) { Op = \"+\"; vT = \"int\"; }\n const newData = {type: newType, id: newID, x: X, y: Y, needInteract: true, input: {}, input2: {}, output: {}, op: Op, full: false, hasParent: false, name: \"\", valueType: vT};\n\t\t\n\t\tthis.setState({\n\t\t\tfunctionList: functionList.concat([newData]),\n\t\t});\n\t}", "pushOperandToLast(operand) {\n this.setState({lastOperand: operand});\n this.updateUpperDisplay(operand);\n }", "append(number) {\n //if number already has \".\" or if it equals \".\" then do nothing \n if (currentOperand.innerText.includes('.') && number === '.') {\n return;\n }\n\n //convert number passed plus current number to string so that they go next to each other (instead of replacing each other) when buttons are pressed \n this.currentOperand.innerText = this.currentOperand.innerText.toString() + number.toString();\n\n }", "function nonMutatingConcat(original, attach) {\n // Add your code below this line\n\n\n // Add your code above this line\n}", "function dataMerge(target,additional)\n{\n for(var add in additional) {\n\tif(target.hasOwnProperty(add)) {\n\t target[add].push(additional[add]);\n\t} else {\n\t target[add] = [additional[add]];\n\t}\n }\n\n return(target);\n}", "function expStartDataSave() {\n var d = new Date();\n var startTime = d.getTime();\n data.push(revealOrderCondition, dissonanceCondition, valueCondition, targetSource, startTime);\n}", "function history(){\n if(num === \"NaN\") {\n answer = \"error\";\n } else {\n answer = operators[opr](firstInputs, num);\n }\n $(\"ul\").append(\"<li><span class='delete'><i class='fa fa-trash' aria-hidden='true'></i></span><span class='entry'>\" + historyInput+ num +\" = \" + answer + \"</span> </li>\");\n historyInput = \"\";\n }", "function addData(data) {\n // Add data to array\n let allInstructionsLength = allInstuctions.length;\n //add correct answers to array\n let answers = [];\n for(let i=0;i<4;i++){\n if(data.answer[i].trim()!==\"\"){\n let answer = {\n id: i+1,\n option: data.answer[i].replace(/^\\s+|\\s+$/g, ''),\n isCorrect: data.select[i],\n question: {}\n };\n answers.push(answer)\n }\n }\n allInstuctions[allInstructionsLength - 1].questions[allInstuctions[allInstructionsLength - 1].questions.length] = {\n id: data.question_id,\n title: data.question.replace(/^\\s+|\\s+$/g, ''),//remove line of space\n instruction: {\n id: 0,\n title: data.question,\n quiz: {},\n questions: []\n },\n answers: answers\n };\n //Show total count of instruction\n if (allInstuctions[allInstructionsLength - 1].questions.length >= 1) {\n $(\"#totalInstruction\").text(allInstuctions.length);\n }\n}", "addOperation(value) {\n if (isNaN(this.getLastOperation())) {\n\n if (this.isOperator(value)) {\n this.setLastOperation(value);\n } else {\n this.pushOperation(value);\n this.setLastNumberToDisplay();\n }\n\n } else {\n if (this.isOperator(value)) {\n this.pushOperation(value);\n } else {\n let newValue = this.getLastOperation().toString() + value.toString();\n this.setLastOperation(newValue);\n this.setLastNumberToDisplay();\n }\n }\n }", "function addSelectedData(data) {\n\n for (var i = 0; i < data.length; i++) {\n selectedData[selectedDataIndex] = data[i];\n selectedDataIndex += 1;\n }\n}", "function nonMutatingPush(original, newItem) {\n // Add your code below this line\n return original.concat(newItem);\n \n // Add your code above this line\n }", "function pushDataArray(data, kata) {\n console.log(data)\n data.push(1, 20, 16)\n kata(data)\n return console.log(data)\n}", "setLastOperator(value) {\n this.operation[this.operation.length - 1] = value;\n }", "function makeData(md,x) {nextData.push({md});}", "function addToHistory(value){\n calcHistory += value;\n inputHistory.textContent = calcHistory;\n}", "function makeData(md,x) {nextData.push({md:md});}", "function mPlus() {\n other_memory = eval(other_memory) + eval(current_input);\n console.log(\"memory is \" + other_memory);\n}", "function nonMutatingPush(original, newItem) {\n // Add your code below this line\n return original.concat(newItem);\n // Add your code above this line\n}", "addOperation(value) {\n if (isNaN(this.getLastOperator())) {\n if (this.isOperator(value)) {\n if (this.operation == '') {\n this.operation = [0, value];\n } else {\n this.setLastOperator(value);\n }\n } else {\n if (value == 0) return;\n this.pushOperator(value);\n this.updateDisplay();\n }\n } else {\n if (this.isOperator(value)) {\n this.pushOperator(value);\n } else {\n let numConcat = this.getLastOperator() + value.toString();\n this.setLastOperator(numConcat);\n this.updateDisplay();\n }\n }\n\n //validation to enter in the calc method\n if (this.operation.length > 3 || this.getLastPosition() == 'x²' || this.getLastPosition() == '√') this.calc();\n //update the of display\n this.updateDisplay();\n\n console.log(\"Operation\", this.operation);\n }", "function _addResult( pData ) {\n var lSelectionValues;\n gWizardSelection$.append( pData.entries );\n gWizardSelection$.iconList( \"refresh\" );\n gWizardSelection$.iconList( \"setSelection\", gWizardSelection$.children().first() );\n lSelectionValues = gWizardSelection$.iconList( \"getSelectionValues\" );\n gWizardSelectionHidden$\n .val( lSelectionValues[ 0 ] )\n .trigger( \"change\" );\n } // _addResult", "function onClickadd() {\n if (operandoType == 1 || operandoType == 4) { opHiddenIndex++; }\n operandoType = 2;\n strDisplay += \"+\";\n insertOpHidden(\"+\");\n refreshDisplay();\n}", "addToInputsLogic(input) {\n const lastIndex = (this.inputs.length - 1);\n\n\n // you can't add operation before digit\n if (\n this.operations.indexOf(this.inputs[lastIndex]) !== -1 &&\n this.operations.indexOf(input) !== -1\n ) {\n return;\n }\n\n if (this.operations.indexOf(input) !== -1) {\n // operation\n if (this.inputs[0] === '') {\n return;\n }\n this.addInput(input);\n } else if (this.operations.indexOf(this.inputs[lastIndex]) !== -1) {\n // first digit after operation\n this.floatNumber.resetInput();\n this.floatNumber.inputAction(input);\n this.addInput(this.floatNumber.getFloat());\n } else {\n // digits\n this.floatNumber.inputAction(input);\n this.inputs.splice(lastIndex, 1, this.floatNumber.getFloat());\n }\n }", "function storePreviousMeasurements(){\r\n previousMeasurements = airmeasurements.slice();\r\n}", "function chainOperation(input) {\n opChain.push(input);\n}", "function nonMutatingPush(original, newItem) {\n // Add your code below this line\n return original.concat(newItem);\n\n // Add your code above this line\n}", "function expressionAddOperators(num, target){\n let result = [];\n\n function helper(num ,target, temp, curResult, prevNum){\n if(curResult === target && num.length === 0){\n result.push(temp);\n return;\n }\n\n for(let i=1; i<=num.length; i++) {\n let curStr = num.substring(0, i);\n\n if(curStr.length > 0 && curStr.charAt(0) === '0') {\n continue;\n }\n\n let curNum = parseInt(curStr);\n let next = num.substring(i);\n\n if(temp.length != 0){\n helper(next, target, temp + '*' + curNum, (curResult - prevNum) + prevNum * curNum, prevNum * curNum);\n helper(next, target, temp + '+' + curNum, curResult + curNum, curNum);\n helper(next, target, temp + '-' + curNum, curResult - curNum, -curNum);\n }else{\n helper(next, target, curStr, curNum, curNum);\n }\n }\n \n }\n\n helper(num, target, '', 0, 0);\n\n return result;\n}", "function storeOperator(inputOperator){\r\n arrayNumberOpt.push(inputOperator);\r\n \r\n}", "static setAddQV(qv, qq) {\n//--------\nqv[0] += qq[0];\nqv[1] += qq[1];\nqv[2] += qq[2];\nqv[3] += qq[3];\nreturn qv;\n}", "function postAdd(newData, n0, n1) {\n\t indexListeners.forEach(function(l) { l(newValues, newIndex, n0, n1); });\n\t newValues = newIndex = null;\n\t }", "calc() {\n let last = '';\n\n this._lastOperator = this.getLastItem();\n\n\n if (this._operation.length < 3) {\n let firstItem = this._operation[0];\n this._operation = [firstItem, this._lastOperator, this._lastNumber];\n }\n\n if (this._operation.length > 3) {\n\n last = this._operation.pop();\n this._lastNumber = this.getResult();\n\n } else if (this._operation.length == 3) {\n this._lastNumber = this.getLastItem(false);\n }\n\n console.log(\"operador\", this._lastOperator);\n console.log(\"numero\", this._lastNumber);\n\n let result = this.getResult();\n\n if (last == \"%\") {\n result /= 100;\n this._operation = [result];\n } else {\n this._operation = [result];\n\n if (last) this._operation.push(last);\n }\n\n this.lastNumberToDisplay();\n\n }", "function appendData(handX, handY, cursorX, cursorY) {\n data.trialNum.push(state.numTrials);\n data.trialPhase.push(state.taskState);\n data.trialType.push(state.trialType);\n let d = new Date();\n data.time.push(d.getTime() - state.trialStart);\n data.cursorX.push(cursorX);\n data.cursorY.push(cursorY);\n data.handX.push(handX);\n data.handY.push(handY);\n}", "appendHistory() {\n if (!this.state.changed) return;\n\n const history = this.state.history.slice(0, this.state.stepNumber + 1);\n const current = this.state.current;\n\n if (current !== history[history.length - 1].squares) {\n this.setState({\n history: history.concat([\n {\n squares: current,\n }\n ]),\n stepNumber: history.length,\n changed: false,\n });\n }\n\n this.setState({\n currentHints: this.getHintNumbers(this.state.current),\n lMouseDown: false,\n rMouseDown: false,\n initialSquare: SquareValue.EMPTY,\n currentAction: SquareValue.EMPTY,\n });\n }", "_receiveOperand(value) {\n let currentValue = +value;\n\n if (this.lastInputType === 'operand' && this.operands.size() > 0) {\n const previousValue = this.operands.pop();\n currentValue = (previousValue * 10 + currentValue);\n }\n\n this.operands.push(currentValue);\n this.lastInputType = 'operand';\n this._displayResult();\n }", "function pushData() {\r\n for (let j = 1; j < questions.length + 1; j++) {\r\n var data = $(\"input[name=inlineRadioOptions\" + [j] + \"]:checked\").val();\r\n userInput.data.push(data);\r\n }\r\n }", "function appendOperator() {\n operator = el;\n calcDisplay.append(`\n <span id=\"operator-text\">\n ${operator}\n </span>`)\n }", "function appendListOperands(ops, args) {\n let first = true;\n for (const op of ops) {\n if (first) first = false;\n else appendSql(\",\", args);\n args.push(op.value);\n args[0].push(\"\");\n }\n}", "function addto(which, zero, one, two, three) {;\n which[0] = zero;\n which[1] = one;\n which[2] = two;\n which[3] = three;\n }", "recordOperation(operator) {\n if (this.currOperand === \"\") {\n return;\n }\n if (this.lastOperand !== \"\") {\n this.compute();\n }\n this.operator = operator;\n this.lastOperand = this.currOperand;\n this.currOperand = \"\";\n }", "function concResult(newInput){\n result += newInput;\n setResult(result);\n \n }", "function addViareduce(value, currentItem){\n\treturn value + currentItem;\n\n}", "function postAdd(newData, n0, n1) {\n indexListeners.forEach(function(l) { l(newValues, newIndex, n0, n1); });\n newValues = newIndex = null;\n }", "function addData(newValue, data) {\n // Extract the values we need from the data and format them properly\n convertData(newValue);\n\n data.push(newValue);\n}", "function oldAns() {\n numInputs = [];\n opInputs = [];\n currentNumber = document.getElementById('fullHist').innerHTML;\n document.getElementById('fullHist').value = '';\n document.getElementById('calc').value = currentNumber;\n numInputs.push(currentNumber);\n createHist();\n clearOp();\n}", "function add_history() {\n let text = JSON.stringify(Y);\n if (text == y_states[y_index])\n return;\n y_index ++;\n y_states[y_index] = text;\n y_states.length = y_index + 1;\n if (y_states.length > MAX_HISTORY)\n y_states.shift();\n}", "function nonMutatingConcat(original, attach) {\n // Add your code below this line - done\n return original.concat(attach);\n \n // Add your code above this line\n}", "function add() {\r\n const enteredNumber = getUserInputValue();\r\n const initialValue = currentResult ;\r\n const calcDescription = `${enteredNumber} + ${initialValue}`\r\n currentResult = enteredNumber + initialValue;\r\n getOperator('+', initialValue ,enteredNumber)\r\n}", "function operator(clicked) {\n //store number in array\n arr.push(parseInt(document.getElementById(\"answer\").value)); \n console.log(arr);\n //store operator\n operations.push(clicked.value);\n console.log(operations);\n //if operator pressed again, operate with the first two values and then delete the last operator using pop \n if (operations.length>1){\n \n operate(); \n }\n}", "function redo() {\n circles.value = clone(history[++index.value]);\n }", "function add_result( value ) {\n r.push(value.data);\n next_question();\n}", "function reEnterData (){\n //get the li index\n let clickedIndex = $( this ).data( 'index' );\n //get the objects instead of the array\n let anObject = arrayOfEquations[0];\n //get clicked on equation \n let desiredEquation = anObject[clickedIndex];\n \n if (desiredEquation.numOne === 'empty'){\n desiredEquation.numOne = 0;\n } \n\n\n // parse out individual data of equation\n reInputOne = Number(desiredEquation.numOne);\n reInputTwo = Number(desiredEquation.numTwo);\n operator = desiredEquation.operator;\n\n // sanity check\n console.log(reInputOne, reInputTwo, operator);\n \n // reset the values of inputs and operator buttons to match parsed equation data\n $('#firstValue').val(reInputOne);\n $('#secondValue').val(reInputTwo);\n\n \n // repress operator button, COOL!\n if (operator === '+') {\n $('#plusOperator').trigger('click');\n } else if (operator === '-') {\n $('#minusOperator').trigger('click');\n } else if (operator === '*') {\n $('#multiplyOperator').trigger('click');\n } else if (operator === '/') {\n $('#divideOperator').trigger('click');\n } else if (operator === '√') {\n $('#squareRoot').trigger('click');\n } \n\n \n}", "function concatResult() {\n var checkBut = document.getElementById('sumResult');\n if (checkBut.checked) {\n console.log('clear data array ');\n } else {\n window.dataStFull = [];\n console.log('not cheked, do not clear array with result');\n }\n}", "getAllPreviousInstructions() {\r\n return this.getAllInstructions().map(c => c.previousInstruction).filter(c => c);\r\n }", "function wr(e,t,a){xr(e,t,a),ir(e,e.sel,e.cm?e.cm.curOp.id:NaN,a)}", "function LOG_OPERAND(pcWord) {\n \"use strict\";\n if (log.limit) {\n log.ring[log.ring.length - 1].push(pcWord);\n }\n}", "@action addUndoStep(value) {\n let that = this;\n let undoHistory = that.undoHistory;\n\n undoHistory.pushObject(value);\n\n that.undoHistory = undoHistory;\n }", "function nonMutatingPush(original, newItem) {\n // Add your code below this line\n //return original.push(newItem);\n return original.concat(newItem);\n // Add your code above this line\n }", "function append_referer(arr, elm) {\n\tfor (var x=0;x<arr.length;x++) {\n\t\tconsole.log(\"compare\", arr[x], elm);\n\t\tif (arr[x].comb_id == elm.comb_id) {\n\t\t\tconsole.log(\"EQUAL\");\n\t\t\treturn;\n\t\t}\n\t}\n\tconsole.log(\"not equal, pushing\");\n\tarr.push(elm);\n}", "delete() {\n this.currentOperand = this.currentOperand.toString().slice(0, -1);\n // for the log pad \n this.curr = this.currentOperand;\n }", "handleAddition(val){\n let a = this.state.arr.slice();\n a.push({\n id:this.generateID(),\n text: val,\n done: false\n });\n this.setState({arr: a});\n }", "function add(newData, n0) {\n\t var i;\n\n\t if (resetNeeded) return;\n\n\t // Add the added values.\n\t for (i = n0; i < n; ++i) {\n\t if (!filters[i]) {\n\t reduceValue = reduceAdd(reduceValue, data[i]);\n\t }\n\t }\n\t }", "function collect(value, previous) {\n\treturn previous.concat([value]);\n}", "function clickedOp(op) {\n if (state.result !== undefined) {\n state = {\n operandOne: state.result,\n operandTwo: \"\",\n operation: op,\n result: undefined\n };\n } else if (state.operandTwo !== undefined && state.operandTwo.length) {\n result = getResult();\n if (op === \"add-equals\") {\n state.result = result;\n panel.textContent = result;\n } else {\n result = getResult();\n state = {\n operandOne: result,\n operandTwo: \"\",\n operation: op,\n result: undefined\n };\n panel.textContent = result;\n }\n } else if (state.operandTwo === undefined) {\n state.operandTwo = \"\";\n state.operation = op;\n } else {\n state.operation = op;\n }\n }", "function nonMutatingConcat(original, attach) {\n // Add your code below this line\n return original.concat(attach);\n // Add your code above this line\n}", "addOperation(classId, operationId, data) {\n console.log(\"NEW DATA\", data)\n this.operations[operationId] = new OperationData(data);\n console.log(\"NEW DATA2\", this.operations[operationId])\n console.log(\"NEW DATA3\" ,new OperationData(data))\n this.classes[classId].addOperation(operationId);\n }", "function plus(){\n\tprevious = current;\n\tcurrent = \"\";\n\tdocument.getElementById('screen').value = \" \";\n\toperation = \"add\";\n}", "append(target) {\n var args = Array.prototype.slice.call(arguments);\n if (!Array.isArray(target)) {\n target = [target];\n }\n return target.concat.apply(target, args);\n }", "function concHistory(newInput){\n history += newInput;\n setHistory(history);\n }", "addDataToFront(data) {}", "addOperation(value){\n //console.log(this.getLastOperation());\n //aqui utilizamos a função isNaN(\"a\") == true / isNaN(\"4\") == false;\n //essa função verifica se o argumento passado não é um número\n\n //se o \"ultimo\" valor do vetor _operation não for um número ou se \n //o vetor estiver vazio \n if(isNaN(this.getLastOperation())){\n //String\n if(this.isOperation(value)){//verificando se o valor é alguma operação aritimética\n //caso já exista algum sinal, quer dizer que o usuário quer modificar o operador\n //então exclui a ultima opção\n //e add novamente o novo operador\n this._operation.pop();\n this.pushOperation(value);\n //this.showConsole();\n\n }else{\n //se o vetor estiver vazio e não for ponto ou operações \n // e sim um numero que foi digitado ou seja...\n //para a primeira vez que o valor numérico for digitado\n this.pushOperation(value);\n this.setLastNumberToDisplay();\n //this.showConsole();\n }\n }else{//se a ultima posição do vetor for um número no vetor\n //verificar o que vai ser adicionado no vetor\n //se é a nova entrada é um novo número ou algum sinal\n if(this.isOperation(value)){\n \n this.pushOperation(value);//adicionando na ultima posição.\n //this.showConsole();\n }else{\n //Number\n let newValue = this.getLastOperation().toString() + value.toString();\n this.setLastOperation(newValue);\n //this.showConsole();\n //Add no display\n this.setLastNumberToDisplay();\n\n } \n }\n \n }", "function handleUndoClick() {\r\n const lastEntry = calculationArr[calculationArr.length - 1];\r\n if (isOperator(lastEntry) || lastEntry === '(' || lastEntry === ')') {\r\n calculationArr.pop();\r\n } else if (lastEntry === '.') {\r\n const secondLastEntry = calculationArr[calculationArr.length - 2];\r\n if (secondLastEntry === '0') {\r\n calculationArr.splice(calculationArr.length - 2, 2);\r\n } else if (typeof secondLastEntry === 'number') {\r\n calculationArr.splice(calculationArr.length - 1, 1);\r\n }\r\n } else {\r\n const lastItem = calculationArr.pop() + '';\r\n const lastItemSubstr = lastItem.slice(0, lastItem.length - 1);\r\n // Only push back item if not empty string.\r\n if (lastItemSubstr) {\r\n calculationArr.push(lastItemSubstr);\r\n }\r\n }\r\n }", "update() {\n this.currTextViewer.innerHTML =\n this.getDisplay(this.currentOperand);\n if (this.operation != null) {\n this.prevTextViewer.innerHTML =\n `${this.getDisplay(this.previousOperand)} ${this.symbol}`;\n } else {\n this.prevTextViewer.innerHTML = `${this.currentOperand}`;\n this.total = `${this.currentOperand}`;\n }\n }", "function addOperator(){\n console.log(inputValue); // puts console message that '+' was clicked\n memory =Number(inputValue.value); // stores Number into memory\n //console.log(memory);\n operator = add; // for 'add' call back function\n inputValue.value = \"\"; // for display\n}", "append(name, value) {\n return this.clone({\n name,\n value,\n op: 'a'\n });\n }", "appendNum(number){\n if (number === \".\" && this.currentOp.includes(\".\")) return //if type . and . exists, stop/ do not append\n this.currentOp = this.currentOp.toString() + number.toString() //converts to string\n }", "function insertBackwardsAttenuation(data) {\n for (var i = 0, n = nodes.length; i < n; i++) {\n for (var j = 0, m = data.length; j < m; j++) {\n if (nodes[i]['dbId'] == data[j]['idNo']) {\n nodes[i]['componentsAttenuation'] = data[j]['aComponentes'];\n nodes[i]['linkDistance'] = data[j]['cLigacao'];\n }\n }\n }\n}", "function nonMutatingConcat(original, attach) {\n // Add your code below this line\n return original.concat(attach);\n\n // Add your code above this line\n}", "function getValue(input){\n //if our dot array operators2 includes(includes basically check a value)..if value u r checking is within operators2, it will return true, if not, it will return false..last value=inputs.length-1\n if(operators2.includes(inputs[inputs.length-1]===true && input===\".\")){\n console.log(\"Duplicat '.' \");\n }\n //if very first number is exactly = 1\n else if(inputs.length===1 && operators1.includes(input)===false){\n //add value to inputs array..inputs=array..input=this.id that we will be adding..so basically is checking if it is a number\n inputs.push(input); \n }\n //if last thing was not an operator, go ahead and add that input to the array\n //if last character was not an operator, add operator to the array\n else if(operators1.includes(inputs[inputs.length-1])===false){\n inputs.push(input);\n }\n //check to add a number..convert string to number\n //if input includes,of how we r getting id, convert string to number..if it includes that input..if that is true..\n else if(nums.includes(Number(input))){\n //push input to end of array?\n inputs.push(input);\n }\n //update function will update value at end of our list\n update();\n }", "function addComma() {\n if (!isDirty) {\n setNum1Array('.');\n } else {\n setNum2Array('.');\n }\n setOutput(',');\n }", "function addTargetsToLineItem(){\r\n\tif (validateAddTargets()) {\r\n\t\tvar valueToPrint = \"\";\r\n\t\tvar selectedElements = [];\r\n\t\tvar level = \"--\";\r\n\t\tvar not= \"--\";\r\n\t\tvar operation = \"--\";\r\n\t\tvar previousRowId = $(\"#geoTargetsummary\" , \"#lineItemTargeting\").find(\"tr:last\").attr(\"id\");\r\n\t\tvar rowBeforeLastRowId = $(\"#geoTargetsummary\" , \"#lineItemTargeting\").find(\"tr:last\").prev('tr').attr(\"id\");\r\n\t\tvar rowName = \"geoTargetsummary\";\r\n\t\tif($('#geoTargetsummary tr').length == 1){\r\n\t\t\tvar rowCount = 1;\r\n\t\t}else{\r\n\t\t\tvar rowCount = Number(previousRowId.substring(rowName.length)) + 1;\r\n\t\t\tvar prevRowCount = Number(rowBeforeLastRowId.substring(rowName.length)) + 1;\r\n\t\t\tif(prevRowCount > rowCount){\r\n\t\t\t\trowCount = prevRowCount;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\t\r\n\t\tvar rowId = \"geoTargetsummary\" + rowCount;\r\n\t\t\t\r\n\t\tif(\"Frequency Cap\" == $('#' + previousRowId + \" td:nth-child(2)\").html()){\r\n\t\t\toperation = \"<select onChange='setPlacementNameAndTargetingString();' id='targetAction_\" + rowId + \"'><option value='and'>And</option> <option value='or'>Or</option></select>\";\r\n\t\t\t$('#targetAction_' +rowId).val(\"and\");\r\n\t\t}else{\r\n\t\t\tvar prevRowOperation = \"<select id='targetAction_\" + previousRowId + \"'><option value='and'>And</option> <option value='or'>Or</option></select>\";\r\n\t\t\t$('#targetAction_' +previousRowId).val(\"and\");\r\n\t\t\t$('#' + previousRowId + \" td:nth-child(7)\").html(prevRowOperation);\r\n\t\t}\r\n\t\t\t\r\n\t\tif (\"Frequency Cap\" != $(\"#sosTarTypeId option:selected\").text()) {\r\n\t\t\tnot = \"<input type='checkbox' id='not_\" + rowId + \"' >\";\t\r\n\t\t}\r\n\t\t\t\r\n\t\tif(\"Behavioral\" == $(\"#sosTarTypeId option:selected\").text()){\r\n\t\t\tvar level = \"<select id='revenueScienceSegId_\" + rowId + \"' size='1'><option value='LEVEL1'>1</option> <option value='LEVEL2'>2</option></select>\"\r\n\t\t\t$('#revenueScienceSegId_' +rowId).val(\"LEVEL1\");\r\n\t\t}\r\n\t\t\t\r\n\t\t$(\"#sosTarTypeElement :selected\").each(function(){\r\n\t\t\tselectedElements.push($(this).text());\r\n\t\t});\r\n\t\t\t\r\n\t\tvalueToPrint = \"<tr id='\" + rowId + \"'><td width='12%'>\" + not + \"</td><td width='18%'>\" + $(\"#sosTarTypeId option:selected\").text() + \"</td><td style='display : none'>\" + $(\"#sosTarTypeId\").val();\r\n\t\tif (\"Zip Codes\" == $(\"#sosTarTypeId option:selected\").text() || \"Behavioral\" == $(\"#sosTarTypeId option:selected\").text()) {\r\n\t\t\tvalueToPrint = valueToPrint + \"</td><td width='50%' title='\" + $(\"#tarTypeElementText\").val() + \"' style=' white-space: nowrap; overflow: hidden; text-overflow: ellipsis;'>\" + $(\"#tarTypeElementText\").val() + \"</td><td style='display : none'>\" + $(\"#tarTypeElementText\").val() + \"</td>\";\r\n\t\t}else {\r\n\t\t\tvalueToPrint = valueToPrint + \"</td><td width='50%' title='\" + selectedElements.join(\", \") + \"' style=' white-space: nowrap; overflow: hidden; text-overflow: ellipsis;'>\" + selectedElements.join(\", \") + \"</td><td style='display : none'>\" + $(\"#sosTarTypeElement\").val() + \"</td>\";\r\n\t\t}\r\n\t\t\t\r\n\t\tvalueToPrint = valueToPrint + \"<td width='10%'>\" + level + \"</td>\" + \"</td><td width='10%'>\" + operation +\"</td>\" + \"<td width='10%'>\" + \"<a style='float:left;margin-left:5px' title='Edit' onClick=\\\"editLineItemTarget('\" + rowId + \"')\\\"> <span class='ui-icon ui-icon-pencil' style='cursor:pointer;'/></a> <a style='float:left;margin-left:5px' title='Delete' onClick=\\\"deleteLineItemTarget('\" + rowId + \"')\\\"> <span class='ui-icon ui-icon-trash' style='cursor:pointer;'/></a></td></tr>\";\r\n\t\t\t\r\n\t\tif(\"Frequency Cap\" == $('#' + previousRowId + \" td:nth-child(2)\").html()){\r\n\t\t\t$(\"#geoTargetsummary\" , \"#lineItemTargeting\").find(\"tr:last\").before(valueToPrint);\r\n\t\t}else{\r\n\t\t\t$('#geoTargetsummary').append(valueToPrint);\r\n\t\t}\r\n\t\t\t\r\n\t\tresetTargetingFields();\r\n\t\t$(\"#not_\" + rowId).bind(\"change\", function () {\r\n\t\t\tsetPlacementNameAndTargetingString();\r\n\t\t});\r\n\t\t\r\n\t\t$(\"#targetAction_\" + previousRowId).bind(\"change\", function () {\r\n\t\t\tsetPlacementNameAndTargetingString();\r\n\t\t});\r\n\t\t\r\n\t\tif(level != \"--\"){\r\n\t\t\t$(\"#revenueScienceSegId_\" + rowId).bind(\"change\", function () {\r\n\t\t\t\t $(\"#rateCardPrice\").val(\"\");\r\n\t\t\t\t $(\"#offImpressionLink\", \"#lineItemFinancialFieldsContainer\").hide();\r\n\t\t\t});\r\n\t\t}\r\n\t\tsetBasePrice();\r\n\t\tsetPlacementNameAndTargetingString();\r\n\t\tif ($(\"#lineItemType_r\", \"#lineItemTargeting\").is(':checked') || $(\"#lineItemType_e\", \"#lineItemTargeting\").is(':checked')) {\r\n\t\t\t$('#geoTargetsummary tbody tr').each(function(){\r\n\t\t\t\t$('td:eq(0),td:eq(5),td:eq(6)', this).hide();\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n}", "function addInstruction()\n {\n console.log(\"Add instruction currently being worked on...\");\n }", "function mov(ori, des) { \n des.push(ori.pop()); \n}", "checkAndCompute( operation ) {\n if(this.currentOperand === '' ) return \n if(this.previousOperand !== '') { //check the previous operand is not empty\n this.compute() ;\n }\n this.operation = operation ;\n this.previousOperand = this.currentOperand ; //append the value in previousOperand\n this.currentOperand = '' ;\n \n }", "chooseOperation(operation){\n if (this.currentOperand === '') return\n //to get a displaying figure or answer to continue another computation\n if (this.previousOperand !== '') {\n this.compute()\n }\n //to get the actual operation clicked\n this.operation = operation\n // the previous operand now equals current operand for new input\n this.previousOperand = this.currentOperand\n this.currentOperand = ''\n }", "function AC() {\n decimal_clicked = false;\n digit_click_num = 0;\n $(\"#display_input\").val(\"\");\n display_val = \"\";\n equation_array = [];\n new_operand = \"\";\n console.log(\"All Cleared\", equation_array)\n //should I add a condition to delete history?\n}", "addPre(...steps) {\n this.pre.push(...steps);\n }", "function gen_op_addl_T0_T1_setq()\n{\n gen_opc_ptr.push({func:op_addl_T0_T1_setq});\n}", "function result() {\r\n\r\n \tlet entry1 = '';\r\n \t\r\n\r\n \tswitch (operation) {\r\n \t\tcase 1 : \r\n \t\tentry1 = `${operande} + ${output.value} = `\r\n \t\toutput.value = parseFloat(operande) + parseFloat(output.value);\r\n \t\tentry1 += output.value\r\n \t\tbreak;\r\n\r\n \t\tcase 2 : \r\n \t\tentry1 = `${operande} - ${output.value} = `\r\n \t\toutput.value = operande - output.value;\r\n \t\tentry1 += output.value\r\n \t\tbreak;\r\n\r\n \t\tcase 3 :\r\n \t\tentry1 = `${operande} * ${output.value} = ` \r\n \t\toutput.value = operande * output.value;\r\n \t\tentry1 += output.value\r\n \t\tbreak;\r\n\r\n \t\tcase 4 : \r\n \t\tentry1 = `${operande} / ${output.value} = `\r\n \t\toutput.value = operande / output.value;\r\n \t\tentry1 += output.value\r\n \t\tbreak;\r\n\r\n \t}\r\n\t\r\n\toutput_history.innerHTML = `<li>${history}</li>`;\r\n\thistory.push(entry1);\r\n \tdisplayHistory(history);\r\n\r\n \toutput.value = 0;\r\n \toperande = 0;\r\n\r\n }", "function recordHistoryMulti (op, id_list) {\r\n let action;\r\n if (op == \"move\") action = HNACTION_BKMKMOVE;\r\n else if (op == \"remove\") action = HNACTION_BKMKREMOVE;\r\n else if (op == \"remove_tt\") action = HNACTION_BKMKREMOVETOTRASH;\r\n// else if (op == \"create\") action = HNACTION_BKMKCREATE;\r\n historyListAdd(curHNList, action, true, id_list);\r\n}" ]
[ "0.5753061", "0.5468519", "0.5438667", "0.5438431", "0.5436923", "0.5434635", "0.53866976", "0.5374656", "0.5373852", "0.53490996", "0.5337552", "0.5325287", "0.53213465", "0.531767", "0.5314726", "0.53021276", "0.529382", "0.5292804", "0.5255077", "0.5247281", "0.5245845", "0.52262187", "0.521986", "0.5210952", "0.52076584", "0.51915383", "0.51826155", "0.5168161", "0.51675", "0.5163154", "0.5160733", "0.51603204", "0.5160266", "0.51588947", "0.5124382", "0.510923", "0.51063406", "0.5104268", "0.5088242", "0.5085709", "0.50851643", "0.50705206", "0.50654185", "0.50601786", "0.50565195", "0.5049836", "0.50432295", "0.50407267", "0.50401825", "0.5038962", "0.50379485", "0.5034081", "0.5030446", "0.5025842", "0.50222594", "0.50215", "0.5021223", "0.5016781", "0.5016455", "0.50088114", "0.50079244", "0.4982554", "0.49794936", "0.4977648", "0.497707", "0.49769133", "0.49740008", "0.49671265", "0.49619988", "0.49574795", "0.4955611", "0.49500147", "0.49473646", "0.49470946", "0.4944769", "0.49360886", "0.49294263", "0.49292278", "0.49263144", "0.49256876", "0.49254432", "0.4921997", "0.49166363", "0.4915895", "0.49106354", "0.49079803", "0.4904048", "0.49019662", "0.4899575", "0.4893761", "0.48935658", "0.48916417", "0.48907456", "0.48902932", "0.48896936", "0.48635525", "0.4863155", "0.48462257", "0.48448285", "0.48419327" ]
0.5555597
1
To display the datas on the current screen
static dispcurr(data) { current.innerText = data; return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayToScreen() {\n\n\n\t}", "function display() {\n lcd.clear();\n lcd.cursor(0, 0).print(displayDate());\n lcd.cursor(1, 0).print(displayMeasure());\n }", "renderScreenContent(){}", "function _display(){\n\t\t\t$(levelID).html(level);\n\t\t\t$(pointsID).html(points);\n\t\t\t$(linesID).html(lines);\n\t\t}", "display() {\n // ˅\n console.log(this.displayData);\n // ˄\n }", "function screenData() {\n console.log(`${this.screen} `)\n}", "presentation() {\n\t\tconsole.log('Le personnage s\\'appelle : ' + this.NAME);\n\t\tconsole.log('current ID : ' + this.ID);\n\t\tconsole.log('IMG : ' + this.IMG);\n\t\tconsole.log('DESC : ' + this.DESC);\n\t\tconsole.log(\"-----------\");\n\t}", "function showData(data) {\n\n _waiting = true;\n\n _currentData = data;\n _shownData = new Array(data.length);\n\n body_container[0].scrollTop = 0;\n\n body[0].innerHTML = '';\n\n self.resize();\n\n resetViewPorts();\n newViewPort();\n\n //setTimeout(function() {\n _showData();\n _waiting = false;\n //}, 1000);\n }", "function display(){\r\n\r\n \r\n}", "function display() {\n\t\t\t\t\t\t$(\"#uListPos\").html(\"Number: \" + (i+1) + \"/\" + (userList.length));\n\t\t\t\t\t\t$(\"#uListName\").html(\"User: \" + userList[i][1]);\n\t\t\t\t\t\t$(\"#uListFact\").html(\"Fact:<br>\" + userList[i][2]);\n\t\t\t\t\t}", "function display() {\n\tlet ref = localStorage.getItem(\"Todo List\");\n\t// if reference exists\n\tif (ref) {\n\t\ttodoArr = JSON.parse(ref);\n\t\taddHTMLTodos(todoArr);\n\t}\n\tdisplay_comp();\n}", "function showInfo() {\n $('#user-name').text(curUser.first_name + ' ' + curUser.last_name);\n $('#first-name').text(curUser.first_name);\n $('#last-name').text(curUser.last_name);\n $('#email').text(curUser.email);\n $('#phone').text(curUser.phone_number);\n }", "function showPerson() {\n $('body').find('.name').text(\"Name: \" + muArray[number].name);\n $('body').find('.git').text(\"github: \" + muArray[number].git_username);\n $('body').find('.shoutout').text(\"Shoutout: \" + muArray[number].shoutout);\n }", "function show() {\n\t/*$(this) = celui-ci en particulier, .data() sur ce data en particulier*/\n\t\t// stocke dans i la valeur de l'attribut data-index de this (contact cliqué)\n\tvar i = $(this).data('index');\n\n\t/*stock les données du localStorage dans la variable*/\n\tvar addressBook = loadAddressBook();\n\n\tconsole.log(addressBook[i].firstName);\n\t/*Remplace, dans le h3 de l'Id contact-details, le texte par la valeur de firstName*/\n\t$(\"#contact-details h3\").text(addressBook[i].firstName\n\t\t+ ' ' + addressBook[i].lastName);\n\n\t/*Remplace dans le p de l'Id contact-details le texte par la valeur de phone*/\n\t$(\"#contact-details p\").text(addressBook[i].phone);\n}", "display() {\n\t\tif (sessionStorage.getItem(\"station\")) {\n\t\t\t$('#station_booked').text(`${sessionStorage.getItem(\"station\")}`);\n\t\t\t$('#station_booked').text(`${sessionStorage.getItem(\"station\")}`);\n\t\t\t$('#name_booker').text(`${localStorage.getItem(\"lastname\")} ${localStorage.getItem(\"firstName\")}`);\n\t\t\t$(\"#booking-details\").show();\n\t\t}\n\t}", "function display() {\n let windowSize = `Window size is ${window.innerWidth} pixels wide by ${window.innerHeight} tall`\n let windowOffset = `Window offset is ${window.screenX} from the left and ${window.screenY} from the top.`\n let pageURL = `Page URL is ${window.location}`\n\n let pageInfo = document.getElementById(\"pageInfo\").innerText = `${windowSize} \\n ${windowOffset} \\n ${pageURL}`\n}", "function displayData(flag){\n $(\"#addQstDiv\").hide();\n $(\".qstDiv\").hide();\n addToPage(questionArray, flag);\n }", "function showData(){\n\tdocument.getElementById('view').innerHTML = JSON.stringify(jsonLM);\n}", "function show(){\n\t\n\tdataEmpresa = { 'nombre': args[0][0].nombre,\n\t\t\t\t\t'direccion': args[0][0].direccion,\n\t\t\t\t\t'latitud': args[0][0].latitud,\n\t\t\t\t\t'longitud': args[0][0].longitud };\n\t\t\t\t\t\t \n\tif (Ti.Platform.osname == \"iphone\")\n\t{\t\t\t\n\t\tcreateMapModule();\n\t}\n\telse\n\t{\n\t\tvar rc = MapModule.isGooglePlayServicesAvailable();\n\t\tswitch (rc) {\n\t\t case MapModule.SUCCESS:\n\t\t Ti.API.info('Google Play services is installed.');\n\t\t createMapModule();\n\t\t break;\n\t\t case MapModule.SERVICE_MISSING:\n\t\t managment_View.OpenInfoWindow( L('text_7'));\n\t\t Ti.App.fireEvent('closeLoading');\n\t\t break;\n\t\t case MapModule.SERVICE_VERSION_UPDATE_REQUIRED:\n\t\t managment_View.OpenInfoWindow( L('text_8'));\n\t\t Ti.App.fireEvent('closeLoading');\n\t\t break;\n\t\t case MapModule.SERVICE_DISABLED:\n\t\t managment_View.OpenInfoWindow( L('text_9'));\n\t\t Ti.App.fireEvent('closeLoading');\n\t\t break;\n\t\t case MapModule.SERVICE_INVALID:\n\t\t managment_View.OpenInfoWindow( L('text_10'));\n\t\t Ti.App.fireEvent('closeLoading');\n\t\t break;\n\t\t default:\n\t\t managment_View.OpenInfoWindow( L('text_6'));\n\t\t Ti.App.fireEvent('closeLoading');\n\t\t break;\n\t\t}\n\t}\n\t\t\n\n\t//Añado el container actual al objeto de navegación\n\tAlloy.Globals.ActualContainer = $.viewDirectorioDetailMap;\n\t\n\t//Título de la sección\n\t//$.textTitle.text = L('text_2');\n\t\n\t\n}", "function updateDisplay(info) {\n\n display.innerHTML = info;\n\n }", "function show(data) {\n // DATE\n document.getElementById('date').innerHTML = data.forecast.forecastday[0].date\n\n // TIME\n let time = (data.location.localtime).split('')\n document.getElementById('temperature-time').innerHTML = 'Updated' + ' ' + (time.slice(11,25).join(''))\n\n // DELHI\n document.getElementById('delhiTemp').innerHTML = data.current.temp_c\n document.getElementById('temperature-comment').innerHTML = data.current.condition.text\n\n // VISIBILITY\n document.getElementById('precipitation-value').innerHTML = (data.current.vis_km) + ' ' + 'km'\n document.getElementById('wind-value').innerHTML = (data.current.wind_kph) + ' ' + 'kph'\n document.getElementById('humidity-value').innerHTML = (data.current.humidity) + ' ' + '%'\n document.getElementById('pressure-value').innerHTML = (data.current.pressure_mb) + ' ' + 'mb'\n \n console.log(data)\n }", "function displayPresentation() {\n ajax(\"GET\", \"/rooms\", fillRoomListDisplay);\n home.css(\"margin-top\", \"5%\");\n home.find(\"span\").css(\"cursor\", \"pointer\");\n homebtn.hide();\n roomList.hide();\n roomListLater.hide();\n roomListEdit.hide();\n roomListDisplay.show();\n}", "function setDataDisplay() {\n var display = createElement(\"table\", {\n id: \"data_display\",\n className: \"display\",\n style: {\n width: (gamescreen.right + 14) + \"px\"\n }}),\n elems = [\"score\", \"coins\", \"world\", \"time\", \"lives\"];\n body.appendChild(display);\n data.display = display;\n for(var i in elems) {\n display.appendChild(data[elems[i]].element);\n updateDataElement(data[elems[i]]);\n }\n body.appendChild(data.display);\n}", "display(){\n this.htmlBuilder.build();\n this.displayCityName();\n this.displayTodayWeather();\n this.displayWeekWeather();\n this.displayTimeSlots();\n }", "function displayData(i){\n\t\t$('#data').html('Name : ' + stationInfo[i].name + '<br> Total Stands : ' + stationInfo[i].totalStands + '<br>Free Stands : ' + stationInfo[i].freeStands + '<br>Free Bikes : ' + stationInfo[i].freeBikes );\n\t\t// $('#data').append('Total Stands : ' + stationInfo[i].totalStands + '<br>');\n\t\t// $('#data').append('Free Stands : ' + stationInfo[i].freeStands + '<br>');\n\t\t// $('#data').append('Free Bikes : ' + stationInfo[i].freeBikes );\n\t}", "function Display(screen) {\n\t\t\n\t\t//Log the current screen Ai can keep track of where we are: \t\t\n\t\tcurrentScreen = screen; \n\n\t\tif (screen == 'Starting') {\n\n\t\t\t//Hide previous screens if existing: \n\t\t\t$('.screen').hide(); \t\t\n\n\t\t\t//Welcome user: \n\t\t\tconsole.log(\"Welcome to DICE.\");\t\t\t\n\t\t\t$('#startScreen').show(); \n\n\t\t\t//Animate UI elements: \n\t\t\t$(\"#rollBtn \").addClass(\"animated bounceInUp\"); \n\t\t\t$(\"#logo\").addClass('animated bounceIn'); \n\t\t}\n\n\t\tif (screen == 'Rolling') {\n\t\t\t//Hide start screen and show the gameplay screens: \n\t\t\t$('#startScreen').hide(); \n\t\t\t$('#dieScreen').show();\n\t\t\t$('#gameplayUI').show();\n\t\t\t//Make the roll button say 'ROLLING': \n\t\t\tupdateRollButton(); \t\t\t\n\t\t}\n\t}", "display() {\n let currentTheme = this.gameOrchestrator.getCurrentTheme();\n currentTheme.displayScene();\n this.displayGameboard(currentTheme);\n }", "function showALL(data){\n\t*autistic screeching*\n\tconsole.log(data);\n}", "function displayData() {\n displayUserInfo();\n displayRecipes();\n console.log(\"before\", chosenPantry)\n}", "function display() {\n\tfor (let key in this.dataStore) {\n\t\tconsole.log(`${key} ${this.dataStore[key]}`);\n\t}\n}", "show() {\r\n console.table(this.data);\r\n }", "function displayInterface(){\n\t$('.user-info').css('display', 'block');\n\t$('.user-tracks').css('display', 'block');\n\t$('.current-user').css('display', 'block');\n\t$('.data-display').css('visibility', 'visible');\n\tsetTimeout(() => {\n\t\t$('.user-info').css('opacity', '1');\n\t\t$('.user-tracks').css('opacity', '1');\n\t\t$('.current-user').css('opacity', '1');\n\t\t$('.data-display').css('opacity', '1');\n\t\tif(g_cache.user_history.length > 1){\n\t\t\t$('.back-button').css('transform', 'translate3d(0px, 0px, 0px)');\n\t\t\t$('.back-button').css('opacity', '1');\n\t\t}else{\n\t\t\t$('.back-button').css('transform', 'translate3d(-50px, 0px, 0px)');\n\t\t\t$('.back-button').css('opacity', '0');\n\t\t}\n\t}, 100);\n}", "function showData() {\n GetUser().then((res) => {\n for (const key in res) {\n addModalBox(res[key]);\n }\n });\n}", "function appendAndRefresh(arg) {\n screenContent = screenContent+arg;\n document.getElementById('display').innerHTML = screenContent;\n }", "function display(data) {\n \n // create a new plot and\n // display it\n plot = scrollVis();\n d3.select('#vis')\n .datum(data)\n .call(plot);\n\n // setup scroll functionality\n var scroll = scroller().container(d3.select('#graphic'));\n scroll(d3.selectAll('.step'));\n \n // setup event handling\n scroll.on('active', function (index) {\n\n if( tjb.isReloaded==true ){\n index = 0;\n tjb.isReloaded=false;\n }\n else{\n index = index;\n }\n \n onScrolling(index);\n });\n}", "DisplayData(){\n \n return( \n <>\n <ShowData tittel='Hastighet [m/s]'data={this.state.dataHastighet[this.state.value]} />\n <ShowData tittel='Akselerasjon [m/s/s]' data={this.state.dataAks[this.state.value]} />\n <ShowData tittel='Spinn [..]' data={this.state.dataSpinn[this.state.value]} />\n </>\n )\n }", "function showOnScreen(input){\n output.html(input);\n }", "function viewDataNew() {\n cleanScreenOfChampions();\n showChampions(dataChampions);\n}", "function show(){\n loadData();\n console.log(listContact);\n}", "function displayResults() {\n\n $('.btn').focus();\n $('#top-result').fadeIn();\n $('.container__outside--output').fadeIn();\n $('#map').html('<img src=' + mapUrl + '>');\n $('#result').text(venue.name);\n $('#location').text(venue.address);\n $('#url').html('<a href=\"' + venue.url + '\" target=\"_blank\">Vist website</a>');\n $('#category').html('<img src=\"' + venue.icon + '64.png\">');\n \n }", "function display_toys() {\n \n }// displays toys in the interface", "async showActive() {\n await this.model.read({ completed: false }, (data) => {\n this.view.render('showEntries', data);\n });\n }", "function updateUI(data) {\n\tdocument.getElementById('date').innerHTML = 'Date : ' + data['date'];\n\tdocument.getElementById('temp').innerHTML = 'Temprature : ' + data['temp'];\n\tdocument.getElementById('content').innerHTML = 'Feelings : ' + data['content'];\n}", "function displayActivity() {\n // get activity-data (panel 2)\n const activities = today.local;\n const cals = util.zeroPad(activities.calories, 5).toString().split('');\n const floors = util.zeroPad(activities.elevationGain, 4).toString().split('');\n const steps = util.zeroPad(today.adjusted.steps, 5).toString().split('');\n \n // get stats-data (panel 3) (apart from heartRate)\n const hourSteps = util.zeroPad(stepsThisHour, 3).toString().split('');\n const bat = util.zeroPad(Math.floor(battery.chargeLevel), 2).toString().split(''); // cannot be called battery\n const distanceInMeters = activities.distance;\n const distance = util.zeroPad(Math.floor(distanceInMeters / 100), 3).toString().split('');\n \n // display activity-data (panel 2)\n addDigits(CAL, cals);\n addDigits(FLOOR, floors);\n addDigits(STEP, steps);\n // display stats-data (panel 3)\n addDigits(HOUR_STEPS, hourSteps);\n addDigits(BATTERY, bat);\n addDigits(DISTANCE, distance);\n}", "function detailPage(ind){\n displayDetails(formatDetails('detail', json.list[ind]));\n // console.log(json.list[ind]);\n document.getElementById(\"homepage\").style.display = \"none\";\n document.getElementById(\"detailpage\").style.display = \"block\";\n }", "function displayData(data) {\n var params = { data: data[\"list\"], inviter: userId, isMember: true }; \n \n // @todo Find a way to dynamically pass the soy function\n //$container.find(selector).html(soyTemplate(params));\n $j('#inviter-places-reco').find(\".ispaces\").each(function() {\n $j(this).html(soyTemplate(params));\n } );\n }", "function show(data) {\n document.getElementByClassName(\"location-timezone\").innerHTML = data.name;\n document.getElementByClassName(\"temperature-degree\").innerHTML = data.main.temp;\n document.getElementByClassName(\"temperature-description\").innerHTML = data.weather.description;\n}", "function updateDisplay() { \n setBoundaries();\n showFinish();\n\n //Set tracking display\n setText(\"tracking\", index + 1 + \"of\" + list.length);\n setText(\"text\", list[index]);\n\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 displayData(data) {\n document.getElementById('image').setAttribute('src',data.imageURL);\n document.getElementById('loc').textContent=`${data.location}, ${data.country}`;\n document.getElementById('weather').textContent=`The weather condition by then will be ${data.description}`;\n document.getElementById('temp').textContent=`Max Temperature: ${data.maxTemp} & Min Temperature ${data.minTemp}`;\n document.getElementById('days').textContent=`${Math.round(data.daysToTravel)} days to go`;\n document.getElementById('dates').textContent=`Start Date: ${data.travelStartDate} & Return Date: ${data.travelEndDate}`;\n document.getElementById('tripDuration').textContent=`Trip Duration: ${data.tripDuration} days`\n}", "async show() {\n // Anzuzeigenden Seiteninhalt nachladen\n let html = await fetch(\"page-overview/page-overview.html\");\n let css = await fetch(\"page-overview/page-overview.css\");\n\n if (html.ok && css.ok) {\n html = await html.text();\n css = await css.text();\n } else {\n console.error(\"Fehler beim Laden des HTML/CSS-Inhalts\");\n return;\n }\n\n // Seite zur Anzeige bringen\n let pageDom = document.createElement(\"div\");\n pageDom.innerHTML = html;\n\n this._renderBoatTiles(pageDom);\n\n this._app.setPageTitle(\"Startseite\");\n this._app.setPageCss(css);\n this._app.setPageHeader(pageDom.querySelector(\"header\"));\n this._app.setPageContent(pageDom.querySelector(\"main\"));\n }", "function characterDisplay() {\n //display the first character on the page\n characterSelect(characters[0].name, 1, characters[0].class, characters[0].portrait, characters[0].colors.dark, characters[0].colors.light, characters[0].stats);\n //loop through array and append all of the sprite version\n for (var i = 0; i < characters.length; i++) {\n var chibiContainer = $(\"<div>\").addClass(\"character-container\").attr({\n \"data-class\": characters[i].class,\n \"data-key\": i + 1\n });\n var characterImage = $(\"<img>\").attr(\"src\", characters[i].chibi);\n chibiContainer.append(characterImage);\n $(\".character-list\").append(chibiContainer);\n }\n }", "function renderInfo() {\n /** Get state */\n if (!wave.getState()) {\n return;\n }\n var state = wave.getState();\n \n /** Retrieve topics */\n var topics = toObject(state.get('topics','[]'));\n var votes = toObject(state.get('votes','[]'));\n \n /** Add topics to the canvas */\n var html = \"\";\n for (var i = 0; i < topics.length; i++){\n var id = \"topic\"+i;\n html += '<div class=\"topic\"><h4> ' + topics[i] + '</h4></div>';\n }\n document.getElementById('body').innerHTML = html;\n \n /** Create \"Add topic\" button to the footer */\n html += '<input type=\"text\" id=\"textBox\" value=\"\"/><button id=\"addInput\" onclick=\"addInput()\">Add Topic</button>';\n document.getElementById('footer').innerHTML = html;\n \n /** Adjust window size dynamically */\n gadgets.window.adjustHeight();\n}", "function showResults() {\n\t\t\t\tconsole.clear();\n\t\t\t\tconsole.log(data);\n\t\t\t}", "function displayInScreen(dispStr){\r\n document.querySelector(\"#screen_value\").innerHTML=dispStr;\r\n}", "function displayActivity(intel){\n\t$( \"#positionData\" ).text( activityString + \" \" + intel );\n}", "function show(data)\n {\n let td = data['data']['current']['weather'];\n let newData = [td.ts, td.tp, td.pr, td.hu, td.ws, td.wd];\n\n let tableRef = document.getElementById('environment');\n let newRow = tableRef.insertRow(1);\n\n for (let step = 0; step < 6; step++)\n {\n let newCell = newRow.insertCell(step);\n let newText = document.createTextNode(newData[step]);\n newCell.appendChild(newText);\n }\n }", "function displayQuestion() {\n $(\".questions\").text(currentQuestionData.question);\n $(\".answer-1\").text(currentQuestionData.otherAnswers[0]);\n $(\".answer-2\").text(currentQuestionData.otherAnswers[1]);\n $(\".answer-3\").text(currentQuestionData.otherAnswers[2]);\n $(\".answer-4\").text(currentQuestionData.otherAnswers[3]);\n }", "function initialDisplay() {\n \tcountLinks();\n \tgetDropDowns();\n \tgetList(\"id\");\n }", "function display(data){\n\teditlayer=document.getElementById('edit_layer');\n\tbaselayer=document.getElementById('menu');\n\teditlayer.innerHTML=data;\n\tbaselayer.style.visibility='hidden';\n\teditlayer.style.visibility='visible';\n}", "display() {\n // game title\n this.canvas[1].font = \"30px Arial\";\n this.canvas[1].fillText('Classic Arcade Game',10,40);\n this.canvas[1].font = \"20px Arial\";\n this.canvas[1].fillText('- build with ECMAScript 6',10,65);\n this.canvas[1].fillText('- Game Engine by Raghavendra Mani',220,this.canvas[0].height-10);\n // game status\n this.canvas[1].font = \"20px Arial\";\n this.canvas[1].fillText('Active Monsters: '+this.activeEnemies.length,this.canvas[0].width*0.6,25);\n this.canvas[1].fillText('Game status: '+this.status(),this.canvas[0].width*0.6,50);\n this.canvas[1].fillText('Moves: '+this.score,this.canvas[0].width*0.6,75);\n this.canvas[1].fillText('Tries: '+this.tries,this.canvas[0].width*0.8,75);\n // game instructions\n this.instructions();\n // warning messages\n this.warning();\n }", "function updateDisplay() {\n UserService.getUserInfo().then(function(response) {\n displayLogs();\n })\n }", "displayInfo() {\n\t\t\tlet info = super.displayInfo() + ', менеджер: ' + this.manager.name ;\n\t\t\tconsole.log( info );\n\t\t\treturn info\n\t\t\t}", "function showRuns(){\n //get runs object\n \n var runs = getRunsObject();\n \n //Check if empty\n if(runs != '' && runs !=null){\n for(var i=0; i<runs.length;i++){\n $('#stats').append('<li class=\"ui-body-inherit ui-li-static\"><strong>Date: </strong> '+runs[i].date+'<br/><strong>Distance: </strong>'+runs[i].miles+'m<div class=\"controls\"><a href=\"#edit\" id=\"editLink\" data-miles=\"'+runs[i].miles+'\" data-date=\"'+runs[i].date+'\">Edit</a> | <a href=\"#delete\">Delete</a> </div> </li>');\n \n }\n \n $('#home').bind('pageinit',function(){\n $('#stats').listview('refresh');\n \n });\n \n }\n \n }", "_onUpdateDisplay() {}", "showOnDom(data) {\n\t\tthis.location.textContent = data.name;\n\t\tthis.description.textContent = data.main.temp_min;\n\t\tthis.string.textContent = data.weather[0].main;\n\t\tthis.icon.setAttribute(\n\t\t\t\"src\",\n\t\t\t`http://openweathermap.org/img/w/${data.weather[0].icon}.png`\n\t\t);\n\t\tthis.humidity.innerHTML = `<span class=\"badge badge-sm badge-secondary\">Relative Humidity</span> ${data.main.humidity}`;\n\t\tthis.dewpoint.innerHTML = `<span class=\"badge badge-sm badge-secondary\">Pressure</span> ${data.main.pressure}`;\n\t\tthis.feels.innerHTML = `<span class=\"badge badge-sm badge-secondary\">Feels_like</span> ${data.main.feels_like} `;\n\t\tthis.wind.innerHTML = `<span class=\"badge badge-sm badge-secondary\">Wind: Speed</span> ${data.wind.speed} <span class=\"badge badge-sm badge-secondary\">Degree</span> ${data.wind.deg}`;\n\n\t}", "function displayActivities() {\n activities = JSON.parse(localStorage.getItem(\"activities\")) || {};\n if (activities) {\n for (var key in activities) {\n $(`[data-description=${key}]`).text(activities[key]);\n }\n }\n}", "function displayScene() {\n var para = document.querySelector (\"#descrip\");\n para.textContent = \"You are in the \" + player.currLoc.name + \"-\" + \"\\n\" + \n player.currLoc.description + \".\" + \"\\n\" +\n \"The items you can take are: \" + player.currLoc.items \n}", "function renderShowResortAdmin(data,stats){\n $('#resorts_info_admin').html(\"<h3 id=admin_resort>\"+ \"ID: \" +data.id+ \" Name: \"+ data.name + \" Vertical: \" + data.vertical +\" Acres: \"+ data.acres + \" Station: \" + data.location + \" Users: \"+ stats +\"</h3>\");\n }", "function show2(data, ioargs) {\r\n dojo.byId(\"preview2\").style.paddingTop = \r\n data.previewPaddingTop + 'px';\r\n dojo.byId(\"statusImg\").style.marginBottom =\r\n data.statusImgMarginBottom + 'px';\r\n dojo.byId(\"preview\").appendChild(previewBoard.node);\r\n dojo.byId(\"interactive\").appendChild(interactiveBoard.node);\r\n dojo.byId(\"previewAndInteractive\").style.visibility = \r\n 'visible';\r\n dojo.byId(\"topPlayersStatus\").style.visibility = \r\n 'visible';\r\n interactiveBoard.show();\r\n previewBoard.show();\r\n that.topPlayers.show();\r\n }", "displayInfo() {\n this.getTime();\n $('#modalTitle').html(`${this.name}`);\n $('#modalInfo').html(\n `<li>Current Time: &nbsp; ${this.time}</li><li>Latitude: &nbsp; ${this.latitude}</li><li>Longitude: &nbsp; ${this.longitude}</li><li>Distance from your location: &nbsp; ${this.distance}km</li>`\n );\n $('#wikiInfo').removeClass('show');\n $('#forecastInfo').removeClass('show');\n $('#weatherInfo').removeClass('show');\n $('#generalInfo').addClass('show');\n $('#infoModal').modal();\n }", "function showMarvelData(data) {\n marvelData(data);\n}", "function showUserInformation(user){\n setSideBar(user)\n setLists(user)\n}", "function initiatedDisplay(){\n $('header').addClass('position-top');\n $('.form-section').html('');\n $('.options').delay(1000).fadeIn(1000);\n $('header p, .description-prompt, footer').fadeOut();\n $('header h1').html(`<span style=\"font-size:.7em;\">${state.ajax.near}</span><br /><span class=\"js-search\">Search New Location</span>`);\n $('header h1').addClass('point');\n }", "async show() {\n \n }", "function show(data) {\n return (\n \"<h4>Current Weather for \" +\n data.name +\n \", \" +\n data.sys.country +\n \"</h4>\" +\n \"<h5><strong>Weather</strong>: \" +\n data.weather[0].main +\n \"</h5>\" +\n \"<h5><strong>Temperature</strong>: \" +\n data.main.temp +\n \" &deg;F</h5>\" +\n \"<h5><strong>Pressure</strong>: \" +\n data.main.pressure +\n \"</h5>\" +\n \"<h5><strong>Humidity</strong>: \" +\n data.main.humidity +\n \"</h5>\" +\n \"<h5><strong>Min Temperature</strong>: \" +\n data.main.temp_min +\n \" &deg;F</h5>\" +\n \"<h5><strong>Max Temperature</strong>: \" +\n data.main.temp_max +\n \" &deg;F</h5>\" +\n \"<h5><strong>Wind speed</strong>: \" +\n data.wind.speed +\n \" mph</h5>\"\n );\n }", "async show() {\n // Anzuzeigenden Seiteninhalt nachladen\n let html = await fetch(\"page-start/page-start.html\");\n let css = await fetch(\"page-start/page-start.css\");\n\n if (html.ok && css.ok) {\n html = await html.text();\n css = await css.text();\n } else {\n console.error(\"Fehler beim Laden des HTML/CSS-Inhalts\");\n return;\n }\n\n // Seite zur Anzeige bringen\n this._pageDom = document.createElement(\"div\");\n this._pageDom.innerHTML = html;\n\n await this._renderReciepts(this._pageDom);\n\n this._app.setPageTitle(\"Startseite\", {isSubPage: true});\n this._app.setPageCss(css);\n this._app.setPageHeader(this._pageDom.querySelector(\"header\"));\n this._app.setPageContent(this._pageDom.querySelector(\"main\"));\n\n this._countDown();\n }", "function showDatosFacturacion() {\n fillSelect();\n showInfoClient();\n}", "function showData()\n {\n console.log('hello world');\n }", "display() {\n\t\tthis.scene.pushMatrix();\n\t\tthis.scene.pushMaterial(this.spritesheetAppearance);\n\t\tthis.scene.pushTexture(this.texture);\n\n\t\tthis.scene.setActiveShaderSimple(this.shader);\n\t\tthis.spritesheetAppearance.setTexture(this.texture);\n\t\tthis.spritesheetAppearance.apply();\n\n\t\tlet position = 0;\n\n\t\tfor (let i = 0; i < this.text.length; i++) {\n\t\t\tposition = this.text[i].charCodeAt(0);\n\t\t\tthis.activateCellP(position);\n\t\t\tsuper.display();\n\t\t\tthis.scene.translate(1, 0, 0);\n\t\t}\n\n\n\t\tthis.scene.popTexture();\n\t\tthis.scene.popMaterial();\n\t\tthis.scene.popMatrix();\n\t\tthis.scene.setActiveShaderSimple(this.scene.defaultShader);\n\t}", "function display_comp() {\n\tlet g = localStorage.getItem(\"Comp List\");\n\tif (g) {\n\t\tcompArr = JSON.parse(g);\n\t\taddHTMLcomp(compArr);\n\t}\n}", "function tiro1() {\n displays();\n}", "function displayMyInfo() {\r\n let personal = JSON.parse(localStorage.getItem(\"personal\"));\r\n $(\"header\").html(\"Solar System, Assignment #2, \");\r\n for (let p in personal) {\r\n $(\"header\").append(`${personal[p]} |`);\r\n }\r\n $(\"footer\").html(`${personal.myCampus} | ${personal.myLoginName}`);\r\n}", "function Display () {\n\tthis.board = new five.Board({io: new Raspi()});\n\tthis.led = null;\n\n\tthis.board.on('ready', function () {\n\t\t// Create HT16K33 controller.\n\t\tthis.led = new five.Led.Digits({controller: 'HT16K33', digits: 5});\n\t\t// Set time, if provided.\n\t\tif (this.moment) this.set(this.moment);\n\t}.bind(this));\n}", "function displayAll(assistant) {\n const username = req.body.result.parameters[USERNAME_PARAM].toLowerCase();\n const name = req.body.result.parameters[FIRST_NAME_PARAM];\n const displayBool = req.body.result.parameters[DISPLAY_BOOL_PARAM];\n const user = dbRoot.child(username);\n const displayUpdates = {};\n displayUpdates['/news/settings/active'] = stringBoolMap[displayBool];\n displayUpdates['/time/settings/active'] = stringBoolMap[displayBool];\n displayUpdates['/weather/settings/active'] = stringBoolMap[displayBool];\n displayUpdates['/pet/settings/active'] = stringBoolMap[displayBool];\n user.update(displayUpdates);\n const status = stringBoolMap[displayBool] ? 'Enjoy your Myao mirror display.' : 'Enjoy your boring mirror.';\n const speech = `Here you go ${name}! ${status}`;\n assistant.ask(speech);\n }", "function showInfo(data) {\n\t$(\"#qrContent p\").text(data);\n}", "function updateDisplay () {\n\n showValue('.held-value',heldValue);\n showValue('.next-Value',nextValue);\n}", "function display()\n{\n nameDisp.textContent= name;\n scoreDisp.textContent= score;\n lifeDisp.textContent= life;\n missileDisp.textContent= missile;\n levelDisp.textContent= level;\n}", "function show(){\n\n\n\t//Añado el container actual al objeto de navegación\n\tAlloy.Globals.ActualContainer = $.viewHome;\n\t\n\t//Inicio de las notificaciones Push\n\tvar managment_Push = require('managment_Push');\n\t\n\tTi.App.fireEvent('closeLoading');\n\t\n\t//var callbackPush = {\"type\":\"callback\",\"source\":{\"pushType\":\"gcm\"},\"payload\":\"{\\\"android\\\"}:{\\\"icon\\\":}\"};\n\t//var callbackPush = {\"aps\":{\"alert\":{\"action-loc-key\":\"open\",\"body\":\"Hallo\",\"loc-args\":{\"url\":\"thisIsTheURL\"}},\"sound\":\"soundeffects\\/push.aiff\",\"badge\":0}};\n\t//managment_View.OpenInfoWindow( 'OnReceive: ' + JSON.stringify(callbackPush));\n\t//managment_View.OpenInfoWindow( 'OnReceive: ' + JSON.parse(callbackPush));\n\t\n\t\n\t\n\n\n}", "function fullDisplay() {\n query = \"SELECT * FROM products\";\n\n // Make the db query\n connection.query(query, function (err, data) {\n if (err) throw err;\n\n console.log(\"Existing Inventory: \");\n console.log(\"-------------------\\n\");\n\n let info = \"\";\n\n for (var i = 0; i < data.length; i++) {\n info = \"\";\n info += \"Item: \" + data[i].ID + \", \";\n info += \"Product Name: \" + data[i].product_name + \", \";\n info += \"Department: \" + data[i].department_name + \", \";\n info += \"Price: $\" + data[i].price + \"\\n\";\n console.log(info);\n }\n console.log(\"-------------------------------------------------\\n\");\n // start the sale!\n startGame();\n });\n\n}", "function displayWeatherData() {\r\n if(weatherData.name && weatherData.sys.country) {\r\n currentLocation.innerHTML = weatherData.name + ', ' + weatherData.sys.country;\r\n };\r\n humidity.innerHTML = 'Humidity: ' + weatherData.main.humidity + ' %';\r\n pressure.innerHTML = 'Pressure: ' + transformFromHpaToMmHg() + ' mm Hg';\r\n temperature.innerHTML = transformFromKelvinToCelsius() + '°';\r\n\r\n var imgUrl = 'http://openweathermap.org/img/wn/' + weatherData.weather[0].icon + '@4x.png';\r\n weatherIcon.innerHTML = '<img src=' + imgUrl + '>';\r\n windDeg = weatherData.wind.deg;\r\n windInfo.innerHTML = 'Wind: ' + transformWindDeg() + ', ' + transformFromKnotsToMeters() + ' m/s';\r\n weatherSummary.innerHTML = weatherData.weather[0].main;\r\n words.value = \"\";\r\n}", "function mostrar()\n\t\t{\n\t\t\t\n\n\t\t\tvar latitud=sessionStorage.getItem(\"latitud\");\n\t\t\tvar longitud=sessionStorage.getItem(\"longitud\");\n \t\t\tvar precision = sessionStorage.getItem(\"precision\");\n \t\t\tvar direccion= sessionStorage.getItem(\"direccion\");\n\t\t\t\n \t\n\t\t\t$(\"#estado\").html(\"<p id='l1' style='font-size:24px'>\"+direccion+\"<br> <span id='data-coords'>Latitud: \"+latitud+\" &nbsp;&nbsp;/&nbsp;&nbsp;Longitud: \"+longitud+\"</span><br><span class='precision'>Preciso en \"+precision+\" metros</span>&nbsp;&nbsp;<span id='open-ubication' class='precision'>No es tu ubicación?</span>\");\n\n\t\t\tvar elemento=$(\"#eventos\");\n\t\t var datos=\"latitud=\"+latitud+'&longitud='+longitud;\n\t\t ajax(elemento,datos,'Modelos/Eventos.php');\n\t\t $('#le').hide();\n\t\t latitud0=latitud;\n\t\t longitud0=longitud;\n\t\t \n\n\n\t\t}", "displayInfo() {\n\t\t\tlet info = super.displayInfo() + ', разработчики: ' + this.getDevelopers() ;\n\t\t\tconsole.log( info );\n\t\t\treturn info\n\t\t\t}", "function showData () {\n\t\ttoggleControls(\"on\");\n\t\tif(localStorage.length === 0) {\n\t\t\talert(\"There are no games in your library so the default games have been added.\");\n\t\t\tautoFillGames();\n\t\t}\n\t\t//Write data from local storage to the browser\n\t\tvar makeDiv = document.createElement('div');\n\t\tmakeDiv.setAttribute(\"id\", \"items\");\n\t\tvar makeList = document.createElement('ul');\n\t\tmakeDiv.appendChild(makeList);\n\t\tdocument.body.appendChild(makeDiv);\n\t\t$('items').style.display = \"block\";\n\t\tfor(var i=0, len=localStorage.length; i<len;i++) {\n\t\t\tvar makeLi = document.createElement('ol');\n\t\t\tvar linksLi = document.createElement('li');\n\t\t\tmakeList.appendChild(makeLi);\n\t\t\tvar key = localStorage.key(i);\n\t\t\tvar value = localStorage.getItem(key);\n\t\t\t//Convert the string from local storage value back to an object\n\t\t\tvar obj = JSON.parse(value);\n\t\t\tvar makeSubList = document.createElement('ul');\n\t\t\tmakeLi.appendChild(makeSubList);\n\t\t\tgetImage(obj.platforms[1], makeSubList);\n\t\t\tfor(var n in obj) {\n\t\t\t\tvar makeSubli = document.createElement('li');\n\t\t\t\tmakeSubList.appendChild(makeSubli);\n\t\t\t\tvar optSubText = obj[n][0]+\" \"+obj[n][1];\n\t\t\t\tmakeSubli.innerHTML = optSubText;\n\t\t\t\tmakeSubList.appendChild(linksLi);\n\t\t\t}\n\t\t\tmakeItemLinks(localStorage.key(i), linksLi); //Create our edit and delete buttons/link for each item in local storage.\n\t\t}\n\t}", "function showData(m) {\n try {\n let html = 'accel';\n html += '<table><tr><td>' + m.accel.x.toFixed(3) + '</td><td>' + m.accel.y.toFixed(3) + '</td><td>' + m.accel.z.toFixed(3) + '</tr></table>';\n html += '</table>';\n\n html += 'rot';\n html += '<table><tr><td>' + m.rot.alpha.toFixed(3) + '</td><td>' + m.rot.beta.toFixed(3) + '</td><td>' + m.rot.gamma.toFixed(3) + '</tr></table>';\n\n html += 'rotMotion';\n html += '<table><tr><td>' + m.rotMotion.alpha.toFixed(3) + '</td><td>' + m.rotMotion.beta.toFixed(3) + '</td><td>' + m.rotMotion.gamma.toFixed(3) + '</tr></table>';\n\n html += 'accelGrav';\n html += '<table><tr><td>' + m.accelGrav.x.toFixed(3) + '</td><td>' + m.accelGrav.y.toFixed(3) + '</td><td>' + m.accelGrav.z.toFixed(3) + '</tr></table>';\n html += '</table>';\n document.getElementById('last').innerHTML = html;\n } catch (err) {\n logError(err);\n }\n}", "function display(input){\r\n dispStr=dispStr+input;\r\n displayInScreen(dispStr);\r\n}", "show(data){\n this.isCalculated = true;\n var stringData = data.toString();\n\n if(stringData.length > 8){\n stringData = stringData.slice(0, 8)\n }\n\n if(this.isCalculated && this.onlyOne){\n this.onlyOne = false;\n this.paraSecuencia = this.agregados;\n }\n\n this.agregados = \"\";\n this.toAdd = stringData;\n this.resultado = stringData;\n this.display.innerHTML = stringData;\n\n }", "function displayInfo(){\n \n\n fill(255);\n var lifeExpValue = lifeExp[int(inp.value())];\n var countryNameValue = countryNames[int(inp.value())];\n \n push();\n \n textSize(76);\n textAlign(CENTER);\n fill(255);\n stroke(0);\n strokeWeight(3);\n \n text(`${lifeExpValue}`, width/4 + 75, height/2 + 150);\n text(`${countryNameValue}`, width/4 + 75, height/2 + 250);\n \n pop();\n \n}", "function _dispPLMScreen(navinfo)\r\n{\r\n\t_plmNav(navinfo);\r\n}", "function displayData() {\n // get the data\n let vehicle = loadData();\n if (typeof vehicle === null) return;\n\n // populate markup\n let html = `<div style=\"position:fixed;width:100%;max-width:300px;display:block;background:#FFFFFF;top:55%;right:0;z-index:999999;padding:20px;border:solid 1px #ccc;\">\n <h4>You recently viewed the following vehicle:</h4><ul style=\"margin:10px 0;padding:0;list-style:none;\">`;\n for (let k in vehicle) {\n html += `<li style=\"color:#8a8a8a;text-transform:capitalize;\"><span style=\"color:#343434;\">${k}:</span> ${vehicle[k]}</li>`\n }\n html += `</ul><a style=\"border:1px solid #c3002f;background:#c3002f;color:#fff;font-family:'Nissan Regular','Nissan Regular';\n text-transform:uppercase;padding:10px;text-decoration:none;text-align:center;display:block;\"\n href=\"https://www.nissanusa.com/vehicles/cars/versa-sedan/build-price.html#configure/Ak5Jc/exterior-colour\">Resume price builder</a></div>`;\n\n // create wrapper div and append to body or refresh if exists\n const newDiv = document.body.contains(document.getElementById('jsdkWrapper')) ? document.getElementById('jsdkWrapper') : document.body.appendChild(document.createElement(\"div\"));\n newDiv.id=\"jsdkWrapper\";\n newDiv.innerHTML = html;\n}", "function printMovieDetail() {\n if (movie.bkgimage != null) {\n bkgImageElt.css('background-image', `url(${movie.bkgimage})`);\n }\n else {\n bkgImageElt.css('background-image', `linear-gradient(rgb(81, 85, 115), rgb(21, 47, 123))`);\n }\n\n titleElt.text(movie.title);\n modalTitle.text(movie.title);\n originaltitleElt.text(movie.originaltitle);\n resumeElt.text(movie.resume);\n dateElt.text(printDateFr(movie.date));\n durationElt.text(printDuration(movie.duration));\n imgElt.attr('src', movie.image);\n iframe.attr('src', movie.traileryt + \"?version=3&enablejsapi=1\");\n // Afficher la liste des acteurs\n var actorsStr = '';\n for (var actor of movie.actors) {\n actorsStr += actor + ' | ';\n }\n actorsElt.text(actorsStr);\n // afficher le réalisteur\n directorElt.text(movie.director);\n}" ]
[ "0.72951066", "0.69376045", "0.6763091", "0.6742459", "0.6726904", "0.65684867", "0.6566253", "0.65434", "0.646144", "0.64559853", "0.64172024", "0.64154035", "0.64042187", "0.63075227", "0.6293393", "0.62826455", "0.6269951", "0.62629807", "0.62561005", "0.6244766", "0.6234256", "0.6222429", "0.62078375", "0.61943305", "0.6178243", "0.616882", "0.6165042", "0.61547387", "0.61407316", "0.6140717", "0.61402506", "0.6136859", "0.61342376", "0.6130894", "0.610309", "0.6102025", "0.60994834", "0.6095615", "0.6095211", "0.60951424", "0.6086621", "0.60674655", "0.60643053", "0.60555667", "0.6044928", "0.6041445", "0.6018142", "0.600704", "0.60048664", "0.5989543", "0.5985713", "0.59850603", "0.59827954", "0.59801793", "0.5977304", "0.5976893", "0.59738886", "0.59727305", "0.5971481", "0.59645736", "0.59581906", "0.59581244", "0.5953795", "0.5949531", "0.5946588", "0.59403384", "0.5933318", "0.5933234", "0.5926125", "0.5923844", "0.5923212", "0.5917341", "0.59128565", "0.58948255", "0.58947855", "0.589066", "0.58904195", "0.58879673", "0.588734", "0.5886901", "0.5881395", "0.58785504", "0.5877813", "0.5876871", "0.58742255", "0.5873823", "0.58732784", "0.5872757", "0.5868022", "0.58634174", "0.58580095", "0.5857583", "0.58520937", "0.5851268", "0.58463895", "0.58461803", "0.5841597", "0.58397156", "0.5839663", "0.58394873", "0.5834864" ]
0.0
-1
To display the datas on the previous screen
static dispprev(data) { previous.innerText = data; return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onProductDetailsBack(){\n hideDownArrow();\n ProductDetailsScreen.LblTotalReviews.text = \"\";\n reviewarr = [];\n ProductDetailsScreen.SegmentReview.setData(reviewarr);\n reviewsMoveDown();\n ProductListScreen.show();\n}", "back()\n{\n this.selectedDate='';\n this.selectedSlot='';\n this.showPage1=true;\n this.showPage2=false;\n}", "function atras() {\n history.back();\n}", "function previous(){\n scope.model.currentIndex--;\n scope.model.data = scope.model.results[scope.model.currentIndex];\n scope.model.currentStart = scope.model.currentStart - scope.model.results[scope.model.currentIndex].length;\n $rootScope.$emit('setMarkers',{data:scope.model.data});\n }", "function Previous() {\n currentIndex = (currentIndex <= 0) ? currentIndex : (currentIndex - 1);\n // Call function to display the beer informations\n displayBeers();\n}", "function prev() {\n pageNumber--;\n getEmployeeDetails(myArr);\n }", "function backToScreenDtl(){\n\tupdateAccountListInfo(); \n\tnavController.initWithRootView('corp/account/list_info/acc_list_account_info_dtl', true, 'xsl');\n}", "goToPreviousView() {\n const poppedData = this.previousItems.pop();\n this.breadCrumbs.pop();\n this.handleStructs(this.supportedKeys);\n this.setState({\n properties: poppedData,\n });\n }", "function goBack(){\n // update the master page number setting and fetch the previous page of data\n // master page number is not updated when at page 1\n if (page > 1){\n page -= 1\n getMonsters()\n } \n}", "function goPrevious() {\n //console.log(\"goPrevious: \" + options.currentPage);\n if (options.currentPage != 1) {\n var p = options.currentPage - 1;\n loadData(p);\n setCurrentPage(p);\n options.currentPage = p;\n pageInfo();\n }\n }", "function displayData(flag){\n $(\"#addQstDiv\").hide();\n $(\".qstDiv\").hide();\n addToPage(questionArray, flag);\n }", "function goBack()\n\t{\n\t\n\t\t window.location = \"input.html?lang=\" + lang +\"&dist=\" + dist +\"&diam=\" + diam + \"&trag=\" + traj + \"&velo=\" + velo + \"&pjd=\" + pjd + \"&tjd=\" + tgd + \"&wlvl=\" + wlvl + \"&planet=\" + planet;\n\t}//=========================================================================================", "function onNavBack() {\n _currentTilesType = \"variables\";\n _selectedVariable = null;\n _$searchControl.val(_savedSearchQuery);\n\n _datasourceInfoPanel.hide();\n _$datasourcesList.hide();\n _$datasourcesListContent.empty();\n _$variablesList.show();\n _$navBackBtn.hide();\n _$sortControl.show();\n\n _$navPath.text(_currentSortMode == \"byName\" ?\n FC.Settings.LAYERS_BY_NAME_MESSAGE : FC.Settings.LAYERS_BY_CATEGORY_MESSAGE);\n\n if(_noCategoriesFound)\n _$sectionHeader.css(\"display\", \"none\");\n }", "function viewDataNew() {\n cleanScreenOfChampions();\n showChampions(dataChampions);\n}", "function prevMovie() {\n if (index === 0) {\n index = movies.length - 1;\n } else {\n index--;\n }\n\n removeData();\n showData(index);\n}", "function onGoBack() {\n setFormDataEdit(null);\n setStep('Menu');\n }", "function onClickBackBtn() {\n var lCurrentForm = kony.application.getCurrentForm();\n var lBreadcrumbData = gAppData.breadcrumbsArr;\n var lData = gAppData.prodSubCategoriesData;\n if (lCurrentForm == frmHome) {\n var lBreadcrumbText = \"\";\n lBreadcrumbData.pop();\n lData.pop();\n for (var i = 0; i < lBreadcrumbData.length; i++) {\n if (lBreadcrumbText != \"\") {\n lBreadcrumbText = lBreadcrumbText + \"->\" + lBreadcrumbData[i];\n } else {\n lBreadcrumbText = lBreadcrumbData[i];\n }\n }\n frmHome.lblBreadCrumb.text = lBreadcrumbText;\n frmHome.segCategories.removeAll();\n frmHome.segCategories.setData(lData[lData.length - 1]);\n if (lData.length == 1) {\n hbxHeader.btnBack.isVisible = false;\n }\n gAppData.prodSubCategoriesData = lData;\n gAppData.breadcrumbsArr = lBreadcrumbData;\n } else if (lCurrentForm == frmProductsList) {\n frmHome.tbxSearch.text = \"\";\n frmHome.lstSearchFilter.selectedKey = frmHome.lstSearchFilter.masterData[0][0];\n gAppData.isSearchInitiated = false;\n frmHome.show();\n frmProductsList.segProducts.removeAll();\n frmProductsList.cmbPagination.masterData = [];\n } else if (lCurrentForm == frmProductDetail) {\n frmProductsList.show();\n } else if (lCurrentForm == frmProductImages) {\n frmProductDetail.show();\n }\n}", "function goBack() {\n\t\ttogglePage();\n\t\tdisposeThrownShurikens();\n\t\tupdateThrownShurikenCount();\n\t\tcleanBelt();\n\t}", "function back(data) {\n console.log(\"back button\", data);\n clearInterval(a); //clear game-check\n var idS = data.idS;\n var gameID = data.gameID;\n var name = data.name;\n console.log(idS,\" \",win);\n var d = {idS,gameID, name, win,loss}\n drawPage(d)\n //socket.emit('gameHello', {id,name,gameID, win,loss});\n}", "function prev() {\n if (currentItemNumber - 1 < 0) {\n currentItemNumber = data.length - 1;\n showPic(currentItemNumber);\n } else {\n currentItemNumber--;\n showPic(currentItemNumber);\n }\n}", "back() {\n this.page = 0;\n }", "function goToBack(){\n //location.reload();\n Itineraries_list=[];\n Itineraries_Ad=[];\n Tour_List=[];\n Category_prop=[];\n types_prop=[];\n res_list_google = {};\n res_list_server= {};\n res_list_direction= {};\n document.getElementById('Itinerary').innerHTML=\"\";\n document.getElementById(\"MyTripList\").innerHTML=\"\";\n detail_Id = '';\n Save_id=\"0\";\n process=\"\";\n $('#homepage').show();\n $('#mapCanvas').hide();\n $('#nearByPlace').hide();\n $('#CatagoryPage').hide();\n $('#Detail').hide();\n $('#NotificationUi').hide();\n $(\"#starting_location\").val(\"\");\n $('#itinerary_Ui').hide();\n $('#ListDetail').hide();\n $('#Save_Ui').hide();\n $('#MyTrips').hide();\n $('#BuildSearchUi').hide();\n }", "function goBack() {\n\n var queries = JSON.parse(sessionStorage.getItem(\"queries\")); //load previous queries out of sessionStorage\n\n if (queries.length >= 2) {\n queries.pop();//the Query shown now. first query stays in the list\n }\n var lastquery = queries.pop();//get the last search query\n\n while (lastquery === \"error\") { //errors are skipped and not shown again\n lastquery = queries.pop();\n }\n\n sessionStorage.queries = JSON.stringify(queries); //save previous queries out of sessionStorage\n\n if (lastquery !== undefined) {\n getResults(lastquery);\n }\n}", "function goBack() {\r\n \t\t$state.go('main.afiliado.edit.examen.list', {afiliadoId: $stateParams.afiliadoId});\r\n \t}", "function goBack() {\n id('data').innerHTML = \"\";\n id(\"find-btn\").disabled = false;\n }", "function navBack(prevState) {\n $state.go(prevState, {}, {reload: true}); // reload to get reslove data again\n }", "back() {\n const { index, showTooltip } = this.state;\n const { steps } = this.props;\n const previousIndex = index - 1;\n\n const shouldDisplay = Boolean(steps[previousIndex]) && showTooltip;\n\n this.logger('joyride:back', ['new index:', previousIndex]);\n this.toggleTooltip(shouldDisplay, previousIndex, 'next');\n }", "function displayData() {\n\n if (localStorage.getItem(\"formData\") != null){\n\n let values = JSON.parse(localStorage.getItem(\"formData\"));\n \n nameInput.value = values[values.length-1].inpName;\n emailInput.value = values[values.length-1].inpEmail;\n phoneInput.value = values[values.length-1].inpPhone;\n messageInput.value = values[values.length-1].inpText;\n }\n \n}", "showBackToDataButton() {\n return showPictureWithOverlay(\n this.state.renderTree,\n \"Back\",\n () =>\n this.setState({\n renderTree: false,\n showFirstPage: true\n }),\n Back\n );\n }", "function back(){\n\tvar container = $(\"container\");\n\tvar buttons = [\"Play\",\"Ranking\", \"Logout\"];\n\tvar button;\n\n\t//rimuovo i bottoni\n\tremoveButtons();\n\n\t//mostro i bottoni iniziali\n\tfor (var i = 0; i < buttons.length; i++) {\n\t\tbutton=createButton(buttons[i]);\n\t\tcontainer.appendChild(button);\n\t}\n\n\t//riaggiungo i listener\n\taddListener();\n}", "function goBack() {\n $state.go('tribes.list');\n }", "function backClicked() {\n document.getElementById('data').style.display = null; // sets the data container back to 'display: flex'\n document.getElementById('confirmation').style.display = 'none';\n document.getElementById('song-name').readOnly = false;\n document.getElementById('header').innerHTML = \"Choose playlist:\";\n}", "function goBack() {\n\tloadElements();\n}", "function showPrev() {\r\n if (index <= 0) index = songs.length;\r\n index--;\r\n index %= songs.length;\r\n localStorage.setItem(\"song\", JSON.stringify(songs[index]));\r\n slide(index);\r\n document.querySelector('meta[name=\"theme-color\"]').setAttribute('content', `${songs[index].bgColor}`);\r\n}", "back()\n {\n\n\n history.back();\n\n\n }", "function voltarHistory()\n\t{\n\t\twindow.history.back();\n\t}", "function get_prev_screen(){\n button_disable_and_reenable();\n var new_page = (curr_page + page_arr.length - 1) % page_arr.length;\n update_page(new_page);\n}", "previous() {\n this._previous();\n }", "function back() {\n\tif (!alternativeRatingViewFlag) {\n\t\thideView(schritteTeilnehmen[currentView]);\n\t\tdisableNavElement(schritteNavTeilnehmen[currentView]);\n\t\tif (currentView > 0) {\n\t\t\tcurrentView -= 1;\n\t\t} else {\n\t\t\tcurrentView = schritteTeilnehmen.length - 1;\n\t\t}\n\t\tdocument.getElementById(schritteTeilnehmen[currentView]).style.visibility = \"visible\";\n\t\tdocument.getElementById(schritteNavTeilnehmen[currentView]).style.backgroundColor = navActiveTeilnehmenColor;\n\t\tspecificViewChanges(currentView);\n\t\tif (currentView >= 2) { // reached the alternative ratings view where we will \"fake\" move next, but stay at current view\n alternativeRatingViewFlag = true;\n\t\t}\n\t} else {\n\t\trateHint = document.getElementById(\"rateHint\");\n\t\thideHints(rateHint);\n\t\tif (currentAlternative <= 0) {\n //alternativeRatingViewFlag = false;\n\t\t\t//back();\n\t\t} else {\n\t\t\tbackAlternative();\n }\n }\n}", "function goback(){\n $('#hiddenkey').val(masterkey);\n $( '#work-place' ).load( 'detalle_presupuesto.html' );\n}", "function _showPreviousPage() {\n var listDoneConnectors = DataSourcesHelper.getDoneConnectors(graphInfo.connectorType);\n if (listDoneConnectors.length > 0)\n RightMenu.showRightMenu(Pages.addSerieConnectorsStep, listDoneConnectors);\n }", "function previousQuestion() {\n //Hij gaat door tot de laatste (eerste) vraag en als die bij 0 is gaat die terug naar de homepagina\n if (statementOrder !== 0) {\n //Hier roep ik de functie removeColor op en hierdoor word de kleur van het antwoord verwijderd\n removeBorder(subjects[statementOrder].myAnswer);\n statementOrder--;\n //Nieuwe stelling word geladen\n title.innerHTML = subjects[statementOrder].title;\n description.innerHTML = subjects[statementOrder].statement;\n //Hier roep ik showAnswer op en hierdoor laat die zien welk antwoord je hebt gegeven bij de vorige vraag\n showAnswer(subjects[statementOrder].myAnswer);\n //Als je weer terug bent bij de eerste vraag (0) dan gaat die weer terug naar de home pagina\n } else {\n statements.style.display = \"none\";\n home.style.display = \"block\";\n }\n}", "function back_liste_prod(){\n $('#liste').css('display','block');\n $('#newProd').css('display','none');\n }", "function PreviousPage() {\n\tif (CurrentPage-1 >= 1){\n\t\tDisplayPage( CurrentPage - 1 )\n\t}\n\telse{\n\t\tPreviousSCO();\n\t}\n}", "function showPrev()\n{\n\tcurPage--;\n\tshowContacts();\n}", "function voltar(){\n history.back();\n}", "function back() {\n if (history.length > 1) {\n setHistory(prev => prev.slice(0, prev.length - 1));\n }\n }", "previousHandler() {\n if (this.page > 1) {\n this.page = this.page - 1; //decrease page by 1\n this.displayRecordPerPage(this.page);\n }\n }", "function displayData() {\n if (i < data.length) {\n if (i == 0) {\n img = document.createElement(\"img\");\n img.src = data[i].image;\n output1.appendChild(img);\n name = document.createElement(\"h2\");\n name.innerHTML = correctCase(i);\n output1.appendChild(name);\n email = document.createElement(\"a\");\n email.href = \"mailto:\" + data[i].email;\n email.innerText = data[i].email;\n output1.appendChild(email); \n } else {\n document.getElementById(\"output1\").removeChild(document.getElementById(\"output1\").lastChild);\n document.getElementById(\"output1\").removeChild(document.getElementById(\"output1\").lastChild);\n document.getElementById(\"output1\").removeChild(document.getElementById(\"output1\").lastChild);\n img = document.createElement(\"img\");\n img.src = data[i].image;\n document.getElementById(\"output1\").appendChild(img);\n name = document.createElement(\"h2\");\n name.innerHTML = correctCase(i);\n document.getElementById(\"output1\").appendChild(name);\n email = document.createElement(\"a\");\n email.href = \"mailto:\" + data[i].email;\n email.innerText = data[i].email;\n output1.appendChild(email);\n }\n document.querySelector(showBtn.innerHTML = \"ShowNext\"); \n i++;\n history();\n }\n }", "function load(department)// button to back\n{\n document.getElementById(\"backButton\").style.visibility = \"visible\";\n console.log(\"clicked arg:\",department);\n loadData(department);\n}", "function previous() {\n\n if (hasPrevious()) {\n\n currentVideo--;\n changeSource(currentVideo);\n tableUIUpdate();\n\n }\n\n }", "function previousPage(){\n if (page > 1)\n {\n setPage(page - 1);\n }\n else {\n // do nothing\n }\n }", "function back () {\n\t\n\t window.history.back();\n\t \n}", "function goBack(){\n // *Navigating back:\n window.history.back();\n }", "function carBack(){\n\t\tvar available ;\n\t\tvar carSrc;\n\t\tvar carNum;\n\t\tvar theTable=\"\";\n\t\tvar x=\tcarArray();\t\t// wicth cell in the car[x] Array;\t\n\t\tif(x!==\"\"){\t\n\t\tavailable=car[x].available;\n\t\tcarSrc = car[x].imgSrc;\t\n\t\tcarNum=car[x].carNum;\n\t\t}\n\t\t\tvar carBackInfo={\"car\":$(\":selected\").val(),\"carNum\":carNum,\"carSrc\":carSrc,\"available\":available};\n\t\t\tif($(\"#carBackByNum\").val()==carNum && available==false){ // if the car avable is false and the num is correct than:;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\ttheTable=\"<tr><td>Car name</td><td>car available</td></tr> <tr><td>\"+carNum+\"</td><td>\"+available+\"</td</tr>\";\t\t\n\t\t\t\t$(\"#carBackTable\").html(theTable);\n\t\t\t\t$(\"#carBackDiv\").html(\"<button id='carAvailableToTrue' >retrive the car</button>\")\t\n\t\t\t}else{\n\t\t\t\t$(\"#carBackTable\").html(\" מצטערים קרתה טעות, אנא הכנס את המספר רכב שהושכר.\");\n\t\t\t\t$(\"#carBackDiv\").html(\"\");\n\t\t\t\t}\n\t\t\t\n\t\t\t\n\t}", "function goBack() {\n\t\t\t$window.history.back();\n\t\t}", "function back() {\n if (res.length > 1) {\n player.textContent = !is_x_next ? \"X\" : \"O\";\n is_x_next = !is_x_next;\n\n res.pop();\n updateUi();\n }\n}", "function back() {\n if (history.length > 1) {\n\n setMode(history[history.length - 2]);\n setHistory(prev => [...prev.slice(0, -1)]);\n }\n }", "function bringBackContent() {\n bringBack2.hidden = true;\n bringBack.hidden = false;\n livesFinished.hidden = false;\n bringBack.addEventListener(\"click\", function(){\n window.location.reload(false)\n });\n}", "function onPrevPage() {\n if (GridCurrentPageNumber > 0) {\n GridCurrentPageNumber--;\n }\n\tIsFromBackButton = true;\n loadRecordsDelayed();\n}", "function previousPage(){\n if(current_page>1) {\n current_page-=1;\n restoreTable();\n // getpage(current_page,page_size)\n query()\n document.getElementById(\"pagespan\").innerHTML = \" صفحة \"+current_page + \" من \" +pages \n }\n}", "function backBtn() {\n\tsel('.show').style.display = 'block';\n\tsel('.operate').style.display = 'flex';\n\tsel('.edit').style.display = 'block';\n\tsel('.add').style.display = 'none';\n}", "function showBack() {\n // return all words that are not on the front of the card and that have a value for their key\n const backWords = ['english', 'kana', 'kanji']\n .map(k => k !== CURRENT_CARD.front && CURRENT_CARD[k])\n .filter(j => !!j);\n const innerText = `<p style=\"font-size:28px\" align=\"center\">${backWords.join('<br><br>')}</p>`;\n\n CURRENT_CARD.showingFront = false;\n document.getElementById('flashcard').innerHTML = innerText;\n\n}", "function backAction() {\n switch (navigation[navigation.length-1]) {\n case \"list\":\n listAvailableQuizzes();\n break;\n case \"question\":\n showMore(quizNumber);\n break;\n case \"leaderboard\":\n showMore(quizNumber);\n break;\n\n }\n navigation.pop();\n if (navigation.length <= 0) {\n backButton.style.display = \"none\";\n }\n}", "function _previousStep() {\n if(this._currentStep == 0)\n return;\n\n _showElement.call(this, this._introItems[--this._currentStep].element);\n }", "function goBack() {\n populate();\n}", "prev() {\n if (this.showingIndex > 1) {\n this.showingIndex--;\n this.reset();\n this.update();\n }\n }", "previousPage(){\n var prev = parseInt(this.state.page)-1; \n this.loadData(prev, 'prev', ''); \n }", "function back() {\n 'use strict';\n\n welcomeScreen.style.display = 'block';\n gameScreen.style.display = 'none';\n endScreen.style.display = 'none';\n reset();\n}", "function refreshPage() {\n setShowModal(false);\n getInfoList();\n }", "function previous() {\n if (currentContactIndex > 0) {\n currentContactIndex--;\n }\n currentContact = contactArray[currentContactIndex];\n viewCurrentContact();\n\n // Todo: Disable previous button when currentContactIndex equal to 0.\n // PJB: I implemented this in the viewCurrentContact() function 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 onClick() {\n setShowData(false);\n }", "function viewtheirstuff(userselected) { \n viewwhichuser(userselected);\n backtotop();\n }", "function goBack() {\n let text = qs(\"textarea\");\n $(\"sport-btn\").classList.remove(\"hidden\");\n text.classList.remove(\"hidden\");\n $(\"player-btn\").classList.remove(\"hidden\");\n $(\"back-btn\").classList.add(\"hidden\");\n text.value = \"\";\n $(\"display-area\").innerHTML = \"\";\n }", "function goBack() {\n $(\"#content\").show();\n $(\"#top-part\").show();\n $(\"#movie-show\").hide();\n cleanMovie();\n}", "function back(){\r\n window.history.back();\r\n}", "function renderLastItem() {\n var yourScore = localStorage.getItem(\"HighScores\");\n var yourInitial = localStorage.getItem(\"Initial\");\n if (yourScore && yourInitial === \"\") {\n return\n }\n finishDiv.textContent = \"\";\n var finaPageEl = document.querySelector(\".final-page\");\n finaPageEl.style.visibility = \"visible\";\n var initialAndScore = document.querySelector(\"#staticEmail\");\n initialAndScore.value = yourInitial + \":\" + \" \" + yourScore;\n\n}", "function showData(data) {\n\n _waiting = true;\n\n _currentData = data;\n _shownData = new Array(data.length);\n\n body_container[0].scrollTop = 0;\n\n body[0].innerHTML = '';\n\n self.resize();\n\n resetViewPorts();\n newViewPort();\n\n //setTimeout(function() {\n _showData();\n _waiting = false;\n //}, 1000);\n }", "_previous() {\n if (this._page === 1) return;\n\n this._page--;\n this._loadCurrentPage();\n }", "function viewBackFromOther() {\n\tlogInfo('Back send info user approve');\n}", "onBackClick() {\n\t\t\tthis.props.uiState.isAlignmentDetailVisible = false;\n\t\t}", "function backState(){\n //clearing field\n ui.clearFiled();\n //getting task\n getTasks();\n}", "prevPage() {\n if (!this.isFirstPage) {\n this.currentPageNumber--;\n }\n this.updateData();\n }", "function viewBackFromOther() {\n\tlogInfo('Back change pasword');\n}", "function viewBackFromOther() {\n\tlogInfo('Back change pasword');\n}", "function savedData() {\n var i1 = localStorage.getItem('inputText1');\n inOutText1.text(i1);\n var i2 = localStorage.getItem('inputText2');\n inOutText2.text(i2);\n var i3 = localStorage.getItem('inputText3');\n inOutText3.text(i3);\n var i4 = localStorage.getItem('inputText4');\n inOutText4.text(i4);\n var i5 = localStorage.getItem('inputText5');\n inOutText5.text(i5);\n var i6 = localStorage.getItem('inputText6');\n inOutText6.text(i6);\n var i7 = localStorage.getItem('inputText7');\n inOutText7.text(i7);\n var i8 = localStorage.getItem('inputText8');\n inOutText8.text(i8);\n var i9 = localStorage.getItem('inputText9');\n inOutText9.text(i9);\n $('#clear').on(\"click\", function () {\n localStorage.clear();\n });\n\n }", "function goPrevious() {\n if (pageNum <= 1)\n return;\n pageNum--;\n renderPage(pageNum);\n }", "function fpPOSH_go_back(){\n\t\t$('#fpPOSH_back').click(function(){\n\t\t\t$(this).animate({'left':'-20px'},'fast');\n\n\t\t\t$('h3.notifications').removeClass('back');\n\n\t\t\t$('.fpPOSH_inner').animate({'margin-left':'0px'}).find('.step2_in').fadeOut();\n\n\n\t\t\t// hide step 2\n\t\t\t$(this).closest('#fpPOSH_outter').find('.step2').fadeOut();\n\n\t\t\t// clear varianles\n\t\t\tshortcode_vars=[];\n\t\t\tshortcode_vars.length=0;\n\n\t\t\tvar code_to_show = $('#fpPOSH_code').data('defsc');\n\t\t\t$('#fpPOSH_code')\n\t\t\t\t.html('['+code_to_show+']')\n\t\t\t\t.attr({'data-curcode':code_to_show});\n\n\t\t\t// change subtitle\n\t\t\t$('h3.notifications span').html( $('h3.notifications span').data('bf') );\n\t\t});\n\t}", "function back() {\n window.history.back();\n //director.navigateTo({ path: 'customer-service-dashboard' });\n }", "function rippleback()\n{\n kony.print(\"\\n**********in rippleback*******\\n\");\n frmHome.show();\n}", "function previousPage() {\n\t\tsetCurrentPage((page) => page - 1);\n\t}", "goPrevious () {\n if(this.state.previous.length > 1){\n let num = this.state.previous.length - 1;\n let newPre = this.state.previous;\n // Removes the item from previous array when you go back to it\n newPre.splice(num,1);\n // Resets info and coordinates to the info and coordinates of the previous resturaunt\n this.props.onChange(this.props.info[this.state.previous[num - 1]][\"coordinates\"][\"latitude\"], this.props.info[this.state.previous[num - 1]][\"coordinates\"][\"longitude\"])\n this.setState ({\n businessName: this.props.info[this.state.previous[num - 1]][\"name\"],\n businessPrice: this.props.info[this.state.previous[num - 1]][\"price\"],\n businessAddress: this.props.info[this.state.previous[num - 1]][\"location\"][\"display_address\"],\n businessRating: this.props.info[this.state.previous[num - 1]][\"rating\"],\n businessPhone: this.props.info[this.state.previous[num - 1]][\"phone\"],\n yelpBusinessURL: this.props.info[this.state.previous[num -1]][\"url\"],\n previous: newPre,\n })\n }\n }", "function goBackToStart() {\n const quizPage = document.getElementById(\"quiz-page\");\n const startPage = document.getElementById(\"start-page\");\n const resultPage = document.getElementById(\"result-page\");\n let resultContainer = document.getElementById(\"resultContainer\");\n quizPage.style.display = \"none\";\n startPage.style.display = \"block\";\n resultPage.style.display = \"none\";\n resultContainer.innerHTML = \"\";\n}", "back(){\n viewport.replace( _history.pop(), _options.pop() );\n }", "previousPage() {\n if (!this.msg) throw new Error(\"Tried to go to previous page but embed pages havn't been created yet.\");\n this.currentPageNumber--;\n if (this.currentPageNumber < 0) this.currentPageNumber = this.pages.length - 1;\n const embed = this.pages[this.currentPageNumber];\n if (this.pageFooter) embed.setFooter(`Page: ${this.currentPageNumber + 1}/${this.pages.length}`);\n this.msg.edit({ embed: embed }).catch(() => null);\n }", "function previousStatement(){\n if(statementNumber !== 0){\n statementNumber--;\n displayStatement(statementNumber);\n checkStatement(subjects[statementNumber].myOpinion);\n }else{\n document.getElementById(\"homePage\").style.display = \"block\";\n document.getElementById(\"stellingPage\").style.display = \"none\";\n }\n}", "function goBack() {\n if (currentDoctorIndex == 0) {\n currentDoctorIndex = 4;\n document.getElementById(\"profile-\" + 0).style.display = \"none\";\n document.getElementById(\"profile-\" + 1).style.display = \"none\";\n document.getElementById(\"profile-\" + 2).style.display = \"none\";\n document.getElementById(\"profile-\" + 3).style.display = \"none\";\n //document.getElementById(\"profile-\" + currentDoctorIndex).style.display = \"flex\";\n }\n currentDoctor = docsList[currentDoctorIndex];\n document.getElementById(\"profile-\" + currentDoctorIndex).style.display = \"flex\";\n --currentDoctorIndex;\n console.log(currentDoctor);\n console.log(currentDoctorIndex);\n}", "function backStreamPage() {\n\n}", "function goBack() {\n history.go(-1);\n }", "function previousImage(event)\n\t\t{\n\t\t\tif(x == 0)\n\t\t\t{\n\t\t\t\tx = (data.images.length - 1);\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\tx--;\n\t\t\t}\n\t\t\tvar info = '';\n\t\t\tinfo += '<p><img src = \"' + currentImage[x] + '\"alt=\"' + currentDescription[x] + '\"></p>';\n\t\t\tinfo += '<h3>' + currentTitle[x] + '</h3>';\n\t\t\tinfo += '<p>' + currentDescription[x] + '</p>';\n\t\t\tdocument.querySelector('#gallery article').innerHTML = info;\n\t\t}" ]
[ "0.66777146", "0.66404724", "0.6378126", "0.63713676", "0.6370584", "0.6362762", "0.63521254", "0.6326518", "0.6323591", "0.6299277", "0.6235751", "0.62192", "0.61922556", "0.61868465", "0.61750406", "0.61692476", "0.6147598", "0.61275655", "0.6127148", "0.6109295", "0.60894185", "0.6087143", "0.60789174", "0.6064548", "0.60555077", "0.6045829", "0.6041963", "0.6027563", "0.6024256", "0.60216933", "0.60190964", "0.5994441", "0.5993964", "0.5988405", "0.5987533", "0.5986443", "0.598609", "0.5979392", "0.59626585", "0.5955508", "0.5952028", "0.5951996", "0.5946992", "0.59323686", "0.5932095", "0.59288746", "0.5915113", "0.59088284", "0.5906846", "0.590056", "0.5885342", "0.5870505", "0.586751", "0.5867452", "0.5861689", "0.5861417", "0.58543247", "0.5848526", "0.5822729", "0.5820129", "0.58113414", "0.5809401", "0.5807939", "0.58067185", "0.58033204", "0.58029485", "0.57981217", "0.578658", "0.5785802", "0.5781947", "0.5779066", "0.5776228", "0.57585627", "0.57474214", "0.574209", "0.57394445", "0.5737172", "0.5732201", "0.5724941", "0.5715002", "0.57142043", "0.57116127", "0.5709552", "0.5709049", "0.5709049", "0.5703242", "0.5702253", "0.57003534", "0.5673688", "0.5673557", "0.5672498", "0.567232", "0.5671575", "0.5667656", "0.56602883", "0.5657894", "0.56576264", "0.5654825", "0.56535417", "0.5652766" ]
0.5794649
67
To restore all datas and output on the screens to their original values
static clear() { curr_o = ""; prev_o = ""; oppr = ""; res = 0; check = 0; return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function reset(){\n clearCanvas();\n outputPad.fromData([]);\n }", "restoreOriginalState() {\n\n\t\tconst originalValueOffset = this.valueSize * 3;\n\t\tthis.binding.setValue( this.buffer, originalValueOffset );\n\n\t}", "function restoreDefault(){\n restoreDefaultScores();\n lizardLizard();\n $(\"#outcome\").empty();\n $(\"#reset-button\").empty().hide();\n $(\".btn-primary\").bind();\n $(\".btn-primary\").show();\n bindControls();\n}", "restoreState() {\n const rawData = document.getElementById('rawState').value;\n localStorage.setItem('data', rawData);\n _.assign(this.$data, JSON.parse(rawData));\n this.updateNbAvailableFragsPerStage();\n }", "function resetScreen() {\n currentOperationScreen.textContent = '0';\n lastOperationScreen.textContent = 'xxx';\n holdOne = '';\n holdTwo = '';\n currentOperation = null;\n}", "function restore_history () {\n\tvar text = edit_history [edit_history_index];\n\tvar ds = HalfedgeDS.fromJSON (JSON.parse(text));\n\tannotateHdsPolygonSides(ds);\n\thdsDraw (ds);\n\tconfigureButtons();\n}", "function restore_inputs () {\n\n\t\t\t\tparse_variables();\n\n\t\t\t\t$('.form-w').val(W);\n\t\t\t\t$('.form-b').val(B);\n\t\t\t\t$('.form-mf').val(Mf);\n\t\t\t\t$('.form-mt').val(Mt);\n\n\t\t\t}", "function clearScreen() {\n\tlocs = [];\n\tnames = [];\n\tparentBonds = [];\n\tchildBonds = [];\n\tlastAction = [];\n\tundo();\n\tclearXY();\n}", "function resetAll(){\n\t\t lastNumber = 0;\n\t\t screenNum=\"\";\n\t\t cont = true;\n\t\t numbers = [];\n\t\t symbols = [];\n\t\t mixArray = [];\n\t\t i = 0;\n\t\t tmp = \"\";\n\t\t dotCounter = 0;\n\t}", "function reset() {\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n restore_array = [];\n index = -1;\n }", "function updateOnscreenVariables() {\n $('.input').html(input);\n $('.calculation').html(calculation);\n $('.onscreen').html(onscreen);\n $('.active').html(active);\n $('.operatorActive').html(operatorActive);\n $('.activeOperator').html(activeOperator);\n $('.decimalActive').html(decimalActive);\n $('.decimalPoints').html(decimalPoints);\n $('.digitPoints').html(digitPoints);\n $('.clearText').html(clearText);\n}", "function restoreStudy(){\n $('[data-save]').each(function(){\n $(this).val(localStorage.getItem(prefix+'/'+currentTopic+'-'+$(this).attr('data-save')));\n });\n }", "resetMatrix() {\n this.activator();\n const conf = { stft: {}, startTime: 0 };\n this.stftHandler.setConfig(conf);\n this.transformationMatrix = this.savedMatrix;\n this.emitUpdateEvent();\n }", "function restoreState() {\n\t\tvar cookieData;\n\t\tif (!elToPaste) {\n\t\t\tcookieData = getCookie(save_file_cookie);\n\t\t\tif (cookieData != null) {\n\t\t\t\tcookieData = cookieData.split(',');\n\t\t\t\telToPaste = {type: unescape(unescape(cookieData[0])), name: unescape(unescape(cookieData[1])), cmd: unescape(unescape(cookieData[2]))};\n\t\t\t}\n\t\t}\n\t\tcookieData = getCookie(save_inf_cookie);\n\t\tif (cookieData != null) {\n\t\t\tcookieData = cookieData.split(',');\n\t\t\tif ((cookieData[0] != '') || (cookieData[0] != '/')) {\n\t\t\t\tcur_path = unescape(cookieData[0]);\n\t\t\t}\n\t\t\tview_type = cookieData[1];\n\t\t}\n\t}", "function reset() {\n frc = false;\n load(DEFAULT_POSITION);\n }", "function savedData() {\n var i1 = localStorage.getItem('inputText1');\n inOutText1.text(i1);\n var i2 = localStorage.getItem('inputText2');\n inOutText2.text(i2);\n var i3 = localStorage.getItem('inputText3');\n inOutText3.text(i3);\n var i4 = localStorage.getItem('inputText4');\n inOutText4.text(i4);\n var i5 = localStorage.getItem('inputText5');\n inOutText5.text(i5);\n var i6 = localStorage.getItem('inputText6');\n inOutText6.text(i6);\n var i7 = localStorage.getItem('inputText7');\n inOutText7.text(i7);\n var i8 = localStorage.getItem('inputText8');\n inOutText8.text(i8);\n var i9 = localStorage.getItem('inputText9');\n inOutText9.text(i9);\n $('#clear').on(\"click\", function () {\n localStorage.clear();\n });\n\n }", "resetData() {\n // Start out with no souls\n this.souls = 0;\n // Start at stage 0\n this.stage = 0;\n // Starting upgrade levels\n this.levels = {\n sword: 0,\n thunder: 0,\n fire: 0\n }\n // Save the reset values\n this.saveData();\n }", "function resetData() {\n // Make sure there's no data display already\n var check;\n if(check = document.getElementById(\"data_display\"))\n body.removeChild(check);\n \n if(!window.data) {\n window.data = new Data();\n // setDataDisplay();\n }\n}", "function ResetFrontEnd({ includingData }) {\n elPauseBtn.value = \"Pause\";\n elPauseBtn.disabled = true;\n elStartBtn.value = \"Start\";\n elStartBtn.disabled = false;\n memoryBlocks[oldMemPointer].classList.remove(\"highlight\");\n marker ? marker.clear() : void(0);\n editor.setOption(\"readOnly\", false);\n editor.getWrapperElement().classList.remove(\"cm-readonly\");\n if (includingData) {\n memoryBlocks.forEach((m) => {\n m.innerText = \"0\";\n });\n out = [];\n elOut.innerText = \"\";\n }\n}", "_programRestored() {\n if(this.target) {\n // reset its render target if needed\n this.setRenderTarget(this.renderer.renderTargets[this.target.index]);\n }\n\n this._initMatrices();\n\n // set our initial perspective matrix\n this.setPerspective(this.camera.fov, this.camera.near, this.camera.far);\n\n this._setWorldSizes();\n this._applyWorldPositions();\n\n // add the plane to our draw stack again as it have been emptied\n this.renderer.scene.addPlane(this);\n\n // reset textures\n for(let i = 0; i < this.textures.length; i++) {\n this.textures[i]._parent = this;\n this.textures[i]._restoreContext();\n }\n\n this._canDraw = true;\n }", "function resetValues () {\n Preferences.set('visualCascade', false);\n Preferences.set('browsers', Preferences.defaults.browsers);\n\n init();\n }", "Reset() {\n this.translation = this.originalTranslation.Clone();\n this.rotationInRadians = this.originalRotationInRadians;\n this.scale = this.originalScale.Clone();\n this.origin = this.originalOrigin.Clone();\n this.dimensions = this.originalDimensions.Clone();\n this.isDirty = true;\n }", "function reset() {\n let originalInpput = document.getElementById('originalInpput')\n originalInpput.value = '';\n\n let convertedOutput = document.getElementById('convertedOutput')\n convertedOutput.value = '';\n\n}", "function reset () {\n shuffledArray = visualizer.getRandomArray();\n visualizer.drawArray(shuffledArray);\n}", "function reset() {\n\t\tdrawSimpleBoard(board = new Board());\n}", "function dataReset() {\n apiUrl = originalApiUrl;\n timeToScreen = \"\";\n city = \"\";\n currentCondition = \"\";\n iconUrl = originalIconUrl;\n humidity = \"\";\n windSpeed = \"\";\n speedFormat = \"\";\n clouds = \"\";\n }", "restore() {\r\n this.native.restore();\r\n }", "reset () {\n this.displayPlot(null)\n this.displayStatistics(null, null)\n this.displayLog(null)\n this.displayError(null)\n this.results = new Map()\n }", "function clearScreen() {\n buffer = \"0\";\n total = 0;\n operator = null;\n}", "function reset() {\n attachSource(null);\n attachView(null);\n protectionData = null;\n protectionController = null;\n }", "function restoreData() {\n myLibrary = []\n retrieveDataFromStorage(myLibrary)\n}", "reset() {\n this.life = 3;\n this.collected = 0;\n this.level = 0;\n this.score = 0;\n this.scoreWater = 0;\n this.collectedFly = 0;\n this.collectedDragonfly = 0;\n this.collectedButterfly = 0;\n levels.textContent = \"EGG\";\n lives.innerHTML = this.life;\n collectedItems.innerHTML = this.collected;\n collectedFlies.innerHTML = this.collectedFly;\n collectedDragonflies.innerHTML = this.collectedDragonfly;\n collectedButterflies.innerHTML = this.collectedButterfly;\n scoreboard.innerHTML = this.score;\n scoreboardWater.innerHTML = this.scoreWater;\n this.modalShow(startModal, startBtn);\n }", "function clearScreens() {\n\n numericString = '';\n display.innerHTML = '';\n units.innerHTML = '';\n document.getElementById('results').innerHTML = 'Results will appear here...';\n document.getElementById('planet').className = \"\";\n\n enablePlaceholder();\n enableDisabled();\n\n }", "function save() {\n // clear the redo stack\n redo = [];\n $('#redo').prop('disabled', true);\n // initial call won't have a state\n if (state) {\n undo.push(state);\n $('#undo').prop('disabled', false);\n }\n state = JSON.stringify(canvas);\n }", "restart_values() {\n this.initialize_values();\n this.model.restart();\n this.view.restart();\n this.client.restart();\n this.deselectCurrentPiece();\n this.view.marker.indicatorFlag = true;\n this.scene.reset = false;\n }", "function undo(){\n canvas.clear();\n canvas.loadFromJSON(tempDesign);\n canva.renderAll();\n }", "function reinitialize() {\r\n \toutput.value = 0;\r\n \toperande = 0;\r\n \thistory = [];\r\n\r\n \toutput_history.innerHTML = `<li>No history!</li>`;\r\n }", "function restoreOptions() {\n var i, len, elements, elem, setting, set;\n\n elements = mainview.querySelectorAll('#skinSection input');\n for (i = 0, len = elements.length ; i < len ; i += 1) {\n elem = elements[i];\n if (elem.value === localStorage[elem.name]) {\n elem.checked = true;\n }\n else {\n elem.checked = false;\n }\n }\n\n elements = mainview.querySelectorAll('#dictSection select');\n for (i = 0, len = elements.length ; i < len ; i += 1) {\n elem = elements[i];\n elem.querySelector('option[value=' + localStorage[elem.name] + ']').selected = true;\n }\n\n\n elements = mainview.querySelectorAll('#captureSection tbody tr');\n setting = JSON.parse(localStorage.capture);\n for (i = 0, len = elements.length ; i < len ; i += 1) {\n elem = elements[i];\n set = setting[i];\n elem.querySelector('input').checked = set.status;\n elem.querySelector('select').value = set.assistKey;\n }\n }", "function resetData()\n{\n // intialize data\n dx = mag;\n dy = 0;\n score = 0;\n recent = 0;\n hScore = 0;\n paused = false;\n doWrap = false;\n\n // generate the apple\n regenApple();\n\n // generate the snake\n regenSnake();\n}", "function restoreDefault(array){\n array[0] = 0;\n array[1] = 1;\n constructHTML(array);\n}", "function reset() {\n pointer.transform(\"t0,0\");\n submit.transform(\"t0,-25\");\n frame.transform(\"s0.85, 0.56, \" + phonebox.cx + \", \" + phonebox.y + \" t0,19\");\n screenbg.transform(\"s1, 0.75, \" + phonebox.cx + \", \" + phonebox.y );\n button.transform(\"s0,0\");\n speaker.transform(\"s0,0\");\n }", "function refreshGui() {\n gui.__controllers.forEach(controller => controller.setValue(controller.initialValue));\n }", "function restoreSettings() {\n \n $(\"#quality_input\").val(settings.quality).slider(\"refresh\");\n $(\"#width_input\").val(settings.targetWidth).slider(\"refresh\");\n $(\"#height_input\").val(settings.targetHeight).slider(\"refresh\");\n \n if (settings.allowEdit) {\n $(\"#edit_input\").attr(\"checked\", true).checkboxradio(\"refresh\");\n } else {\n $(\"#edit_input\").removeAttr(\"checked\").checkboxradio(\"refresh\");\n }\n \n if (settings.correctOrientation) {\n $(\"#orient_input\").attr(\"checked\", true).checkboxradio(\"refresh\");\n } else {\n $(\"#orient_input\").removeAttr(\"checked\").checkboxradio(\"refresh\"); \n }\n \n var saveSwitch = $(\"#save_input\");\n saveSwitch[0].selectedIndex = ((settings.saveToPhotoAlbum === true) ? 1 : 0);\n saveSwitch.slider(\"refresh\");\n \n $(\"#encod_input\").val(settings.encodingType).selectmenu(\"refresh\");\n $(\"#media_input\").val(settings.mediaType).selectmenu(\"refresh\");\n}", "_restoreState() {\n this.bold(this._state.bold);\n this.italic(this._state.italic);\n this.underline(this._state.underline);\n this.invert(this._state.invert);\n\n this._queue([\n 0x1b, 0x74, this._state.codepage,\n ]);\n }", "restoreDefault() {\n this.resetCCSetting();\n }", "function reset() {\n calculatorData.isAtSecondValue = false;\n calculatorData.displayValue = '';\n calculatorData.result = '';\n calculatorData.isValueDecimal = false;\n updateDisplay();\n}", "function partialClear() {\n calcInput = \"\";\n screenContents = [];\n}", "function resetView()\n{\n xOffset = 0;\n yOffset = 0;\n inputX = 0;\n inputY = 0;\n fillCanvas();\n updateCoordinates();\n}", "function resetBoard() {\n [app.hasFlippedCard, app.lockBoard] = [false, false];\n [app.firstCard, app.secondCard] = [null, null];\n}", "function resetVars() {\n hasFlipped = false,\n stopEvents = false,\n firstCard = null,\n secondCard = null;\n}", "function saveXYValues () {\r\n demo = true;\r\n savedOldPositionY = oldPositionY;\r\n savedOldPositionX = oldPositionX;\r\n savedNewPositionY = newPositionY;\r\n savedNewPositionX = newPositionX;\r\n }", "function restoreSession(){\n /* restore objects Timers, default settings */\n Timers = JSON.parse(sessionStorage.getItem('timers'));\n settingsDefaults = JSON.parse(sessionStorage.getItem('settings'));\n /* Stat and Loop Resetup */\n loadStats();\n initQueue();\n /* fill default form */\n fillDefault();\n // switch button labels\n for(i = 0; i < 3; i++){\n updateBtnDisplay(i);\n updateDefaultLoop(i);\n }\n if(Timers[3].on){\n customSelected = 3;\n updateBtnDisplay(3);\n updateDefaultLoop(3);\n }\n if(Timers[4].on){\n updateBtnDisplay(4);\n updateDefaultLoop(4);\n }\n \n}", "function save() {\n // clear the redo stack\n redo = [];\n if (!reDo.classList.contains('disabled')) {\n reDo.classList.add('disabled');\n }\n // initial call won't have a state\n if (state) {\n undo.push(state);\n unDo.classList.remove(\"disabled\");\n }\n state = JSON.stringify(canvas);\n}", "function resetVars() {\n\t\tidArrays = [];\n\t\t_3DArrays = [];\n\t\t$scope.dataSetName = \"\";\n\t\tdataName = null;\n\t\tdragZone = {'left':-1, 'top':-1, 'right':-1, 'bottom':-1, 'name':\"\", 'ID':\"\"};\n\t\tsources = 0;\n\t\tNs = [];\n\t\tunique = 0;\n\t\tlocalSelections = [];\n\t}", "function clearScreen() {\n activeNumber = '';\n activeOperator = '';\n storedNumber = '';\n result = '';\n updateScreen();\n}", "function resetValues() {\n\t\tsetValues( Defaults );\n\t\t\n\t\tpreferences.save();\n\t}", "function resetValOrden() {\n entra = false;\n sale = false;\n tray = false;\n trayLin = false;\n initIn = false;\n initMul = false;\n idLineTray = -1;\n idTray = -1;\n valTLF = false;\n valMovTF = false;\n elimEF = false;\n elimSI = false;\n elimSF = false;\n elimTR = false;\n elimTLF = false;\n elimTLI = false;\n elimTM = false;\n}", "function reset() {\n save(null);\n }", "function reset() {\n AIRWin = 0;\n HURWin = 0;\n NORWin = 0;\n window.location.reload(false);\n}", "function restoreDefaultScores(){\n RPS.gameState.userScore = 0;\n RPS.gameState.computerScore = 0;\n RPS.gameState.ties = 0;\n RPS.gameState.roundCount = 0;\n $(\"#userScore\").html(RPS.gameState.userScore);\n $(\"#computerScore\").html(RPS.gameState.computerScore);\n $(\"#ties\").html(RPS.gameState.ties);\n $(\"#roundNumber\").html(RPS.gameState.roundCount);\n}", "restart() {\n this.reset();\n this.movie = false;\n this.displayMovie = false;\n this.movieArray = [];\n this.lastMovie = 0;\n }", "resetOutputs() {\n this.noop = 0;\n this.move = 0;\n this.loadi = 0;\n this.add = 0;\n this.addi = 0;\n this.sub = 0;\n this.subi = 0;\n this.load = 0;\n this.loadf = 0;\n this.store = 0;\n this.storef = 0;\n this.cmp = 0;\n this.jump = 0;\n this.inputc = 0;\n this.inputcf = 0;\n this.inputd = 0;\n this.inputdf = 0;\n this.shiftl = 0;\n this.shiftr = 0;\n this.bre = 0;\n this.brne = 0;\n this.brg = 0;\n this.brge = 0;\n this.rx = 0;\n this.ry = 0;\n }", "function resetDisplay() {\n\t\tctx.clearRect(0,0,610,550);\n\t\tctx.strokeRect(40, 10, 530, 539);\n\t\t$(\"#controls button\").button(\"disable\");\n\t\t$(\"#seeker\").slider(\"disable\");\n\t\t$(\"#display-options input\").attr(\"disabled\",\"disabled\");\n\t\t$(\".game-status .p1, .game-status .p2, .game-status .message\").empty();\n\t\t$(\".game-status .message\").removeClass(\"neutral-text p1-text p2-text\").css(\"visibility\",\"hidden\");\n\t\t$(\".display .p1-text, .display .p2-text\").html(1000);\n\t\t$(\".names-time .time\").html(0);\n\t\t$(\"#canvas-alt\").remove();\n\t}", "function reset(){\n displayInput = [''];\n uniqueNumber = '';\n // clean the screen\n calcLine.textContent = '';\n resultLine.textContent = '';\n}", "function resetme(){\n\tinitiateBoard();\n\tmode=0;\n\tdisplay(0);\n}", "reset(){\n this.pattern = new ACNLFormat();\n this.pixels_buffer = new ArrayBuffer(4096);\n this.pixels = new Uint8Array(this.pixels_buffer);\n this.drawHandler = basicDrawing;\n this.drawHandlerAlt = basicDrawing;\n this.currentColor = 0;\n this.undoHistory = [];\n this.redoHistory = [];\n this.onLoad();\n }", "restore () {\n\t\tthis.$element.removeClass('screenlayer-minimized');\n\t\tthis.show();\n\t}", "function offAll() {\n let newArr = [];\n for (let i = 0; i < dispSize; i++) {\n newArr.push(\"00\");\n }\n mySwitcher(newArr);\n}", "function restoreDefaults() {\n console.log('[PROTOCOL restoreDefaults()]', arguments);\n var newGame = angular.copy(club.defaultGame);\n newGame.metadata = vm.game.metadata;\n handleLoadedGame(vm.game, club.defaultGame);\n }", "function reset(){\n\tcanvas.removeAttribute(\"style\");\n\tfor(var i=0; i< arrayDefault.length; i++){\n\t\tdocument.getElementsByTagName('input')[i+1].value = arrayDefault[i];\n\t}\n\tdefaultValues();\n\tctx.putImageData(imageDataBkp,0,0);\n}", "function refreshMatrixView() {\n $window.nx.widgets.nexMatrixLayer3.matrix = matrixData[selectedSequencerBank][0];\n $window.nx.widgets.nexMatrixLayer3.init();\n $window.nx.widgets.nexMatrixLayer2.matrix = matrixData[selectedSequencerBank][1];\n $window.nx.widgets.nexMatrixLayer2.init();\n $window.nx.widgets.nexMatrixLayer1.matrix = matrixData[selectedSequencerBank][2];\n $window.nx.widgets.nexMatrixLayer1.init();\n\n console.log(JSON.stringify(matrixData[selectedSequencerBank]));\n }", "function reset() {\n Caman(\"#canvas\", img, function () {\n this.revert();\n })\n brillo = 0;\n contraste = 0;\n saturacion = 0;\n exposicion = 0;\n ruido = 0;\n difuminacion = 0; \n resetearbotones();\n}", "function resetScreen() {\n robot.moveMouse(rightScreen.x, rightScreen.y);\n robot.mouseClick();\n robot.keyTap(\"alt\");\n robot.keyTap(\"w\");\n robot.keyTap(\"1\");\n}", "restore(): void {\n this.context.restore();\n }", "restore() {\n if(this.saved.caret)\n this.set(this.saved.startNodeIndex, this.saved.startOffset);\n else\n this.set(this.saved.startNodeIndex, this.saved.startOffset,\n this.saved.endNodeIndex, this.saved.endOffset);\n }", "function revert() {\n inputNo.value = \"\"\n length.textContent = \"\"\n volume.textContent = \"\"\n mass.textContent = \"\" \n}", "function undoLogReset() {\n\tresetBoardToText(resetBoards.pop());\n}", "function restoreView(viewToRestore){contextLView=viewToRestore;}", "reset() {\n // All changes are not saved to the internal embed.code, rather they are stored in the this.tabs->element.item\n // So we can savely replace the current code with the embed.code\n this.fromInitialData(this.projectData.embed, true);\n this.runner = null;\n }", "resetSavedData () {\n this.objects = {}\n\n this.electData = {\n ComponentParts: [],\n ComponentToParts: [],\n PartToPart: [],\n PartToPartNames: [],\n need: {},\n pass: {}\n }\n\n this.gridSize = 100\n this.data.routing_data = []\n this.nets = []\n this.data.assets = []\n this.data.compSize = [20,20]\n }", "function revertChanges() {\n if (typeof db.getItem(savedData) !== 'undefined' && db.getItem(savedData) !== 'undefined' && db.getItem(savedData) !== 'null' && db.getItem(savedData) != null && db.getItem(savedData) !== \"\") {\n mainP.innerHTML = db.getItem(savedData);\n //makeEditable();\n sanitizeItems();\n };\n }", "function backupInput() {\n lastInput = ELEMENTS.UPDATE_TEXTAREA.val();\n }", "function restore(newcontent = content) {\n controls.html(old_controls)\n content_holder.html(newcontent.replace(/\\n/g, '<br>'))\n\n if (has_pretty_content_holder)\n {\n pretty_content_holder.show()\n content_holder.hide()\n }\n }", "function reset_all(){\n input = \"\";\n result = \"0\";\n history = \"0\";\n answer = \"\";\n setResult(\"0\");\n setHistory(\"0\");\n }", "async restoreState() {\n // Restore UI alignment.\n if (this.isBrowserUIEnabled) {\n const leftAlignmentEnabled = Services.prefs.getBoolPref(\n \"devtools.responsive.leftAlignViewport.enabled\",\n false\n );\n\n this.updateUIAlignment(leftAlignmentEnabled);\n }\n\n const deviceState = await asyncStorage.getItem(\n \"devtools.responsive.deviceState\"\n );\n if (deviceState) {\n // Return if there is a device state to restore, this will be done when the\n // device list is loaded after the post-init.\n return;\n }\n\n const height = Services.prefs.getIntPref(\n \"devtools.responsive.viewport.height\",\n 0\n );\n const pixelRatio = Services.prefs.getIntPref(\n \"devtools.responsive.viewport.pixelRatio\",\n 0\n );\n const touchSimulationEnabled = Services.prefs.getBoolPref(\n \"devtools.responsive.touchSimulation.enabled\",\n false\n );\n const userAgent = Services.prefs.getCharPref(\n \"devtools.responsive.userAgent\",\n \"\"\n );\n const width = Services.prefs.getIntPref(\n \"devtools.responsive.viewport.width\",\n 0\n );\n\n let reloadNeeded = false;\n const { type, angle } = this.getInitialViewportOrientation({\n width,\n height,\n });\n\n this.updateViewportSize(width, height);\n await this.updateDPPX(pixelRatio);\n await this.updateScreenOrientation(type, angle);\n\n if (touchSimulationEnabled) {\n reloadNeeded |=\n (await this.updateTouchSimulation(touchSimulationEnabled)) &&\n this.reloadOnChange(\"touchSimulation\");\n }\n if (userAgent) {\n reloadNeeded |=\n (await this.updateUserAgent(userAgent)) &&\n this.reloadOnChange(\"userAgent\");\n }\n if (reloadNeeded) {\n this.getViewportBrowser().reload();\n }\n }", "function restoreOptions() {\n chrome.storage.sync.get(['master', 'slave'], function(items) {\n document.getElementById('master').value = items.master || '';\n document.getElementById('slave').value = items.slave || '';\n });\n }", "function restore_prev_settings() {\n tagpro.group.socket.emit(\"setting\", {\"name\": \"map\", \"value\": settings.get('map')});\n tagpro.group.socket.emit(\"setting\", {\"name\": \"time\", \"value\": settings.get('time')});\n tagpro.group.socket.emit(\"setting\", {\"name\": \"caps\", \"value\": settings.get('caps')});\n\n /* var settings = GM_getValue('ELTP_settings');\n for(var i = 0; i < settings.length; i++) {\n tagpro.group.socket.emit(\"setting\", {\"name\": settings[i].name, \"value\": GM_getValue('ELTP_' + settings[i])});\n }*/\n}", "function doLogReset() {\n\tvar text = saveBoardToText();\n\tresetBoards.push(text);\n\tresetBoardToText(initialBoard);\n}", "restoreCards(){\n this._cards = this.buildCardSet();\n }", "function resetMemory(){\n\tRawMemory.set('{}');\n\tMemory.creeps = {};\n\tMemory.rooms = {};\n\tMemory.flags = {};\n\tMemory.spawns = {};\n}", "function switchSettings2Back() {\n /* Reset Focus */\n Draw.resetFocus();\n }", "function restore_options() {\n\tchrome.storage.sync.get({\n\t\tunicornImage: 'https://i.imgur.com/XeEii4X.png',\n\t\tunicornAdd: 'u',\n\t\tunicornClear: 'c'\n\t}, function(settings) {\n\t\tdocument.getElementById('unicorn-img-setting').value = settings.unicornImage;\n\t\tdocument.getElementById('unicorn-add-setting').value = settings.unicornAdd;\n\t\tdocument.getElementById('unicorn-clear-setting').value = settings.unicornClear;\n\t});\n}", "function resetDefault(){\n fillDefault();\n}", "restoreValue() {\n this.textInputNode.value = this.originalValue;\n }", "reset() {\n var _a, _b;\n /**\n * Since _setup handles a full terminal creation, we have to carry forward\n * a few things that should not reset.\n */\n this.options.rows = this.rows;\n this.options.cols = this.cols;\n const customKeyEventHandler = this._customKeyEventHandler;\n this._setup();\n super.reset();\n (_a = this._selectionService) === null || _a === void 0 ? void 0 : _a.reset();\n // reattach\n this._customKeyEventHandler = customKeyEventHandler;\n // do a full screen refresh\n this.refresh(0, this.rows - 1);\n (_b = this.viewport) === null || _b === void 0 ? void 0 : _b.syncScrollArea();\n }", "function resetBoard() {\n resetState()\n renderBoard()\n}", "function resetState(){\n Oclasses = {}; // known classes\n arrayOfClassVals = null; // cached array of class values\n arrayOfClassKeys = null; // cached array of class keys\n objectProperties = {}; // known object properties\n arrayOfObjectPropVals = null; // array of object property values\n arrayOfObjectPropKeys = null; // array of object property keys\n dataTypeProperties = {}; // known data properties\n arrayOfDataPropsVals = null; // array of data properties values\n\n classColorGetter = kiv.colorHelper();\n svg = null;\n zoomer = null;\n renderParams = null;\n mainRoot = null;\n panel = null;\n }", "function clearDisplay() {\n\tTi.API.info('called clearDisplay');\n // set the display to empty string\n $.lbl_display.text = '';\n $.lbl_mstore.text = '';\n $.lbl_arabic.text = '';//(0).toString(); //(current_num.arabic).toString();\n // reset the characters pressed variables to empty string\n last0_char = '',\n last1_char = '',\n last2_char = '',\n last_3_chars = '';\n dimChars(null);\n}", "function restoreOptions() {\n // retrieves data saved, if not found then set these to default parameters\n chrome.storage.sync.get({\n color: \"FFEB3B\",\n opac: .5,\n rad: 50,\n trigger: \"F2\",\n\t\ttoggle: true,\n activePage: false\n }, function(items) {\n \t// sets value of the sliders and settings to saved settings\n document.getElementById('trigger').value = items.trigger;\n\n // draws the circle and text preview to loaded preferences\n\t\topacity = items.opac;\n\t\tradius = items.rad;\n\t\thighlight = items.color;\n\t\tcheck = items.toggle;\n\t\t$('#toggle').prop('checked', check);\n\t\tdrawCircle(opacity, radius, highlight);\n });\n}", "static restore(data) {\n return new GameScene({\n game: GameManager.activeGame,\n backgroundColor: Color.restore(data.backgroundColor),\n camera: Camera2D.restore(data.camera),\n gameObjects: Objectify.restoreArray(data.gameObjects)\n });\n }", "function clearScreen () {\n $('.output').html('');\n inputArray = [];\n buttonClick = null;\n operatorClick = null;\n equateClick = null;\n decimalClick = null;\n operand = '';\n console.log('clear');\n}" ]
[ "0.67376155", "0.6591362", "0.65084296", "0.63358605", "0.62794125", "0.6271271", "0.62353593", "0.6158511", "0.60702324", "0.6069507", "0.603432", "0.60128284", "0.60108113", "0.60071677", "0.5997313", "0.59836876", "0.5953426", "0.5945969", "0.59354866", "0.5929513", "0.5896091", "0.58711725", "0.5870214", "0.5869741", "0.5866685", "0.58440465", "0.58427775", "0.58165526", "0.58082736", "0.5785359", "0.57716286", "0.5770268", "0.57696223", "0.5768568", "0.57671356", "0.57622486", "0.5760773", "0.57572156", "0.57569486", "0.5748365", "0.57450217", "0.5743548", "0.5738809", "0.57276154", "0.5726609", "0.57202697", "0.5718516", "0.5713133", "0.56957614", "0.56944746", "0.56919324", "0.5686555", "0.5675444", "0.56695825", "0.56694347", "0.5669378", "0.56621164", "0.5659357", "0.5655032", "0.5644634", "0.5642319", "0.5638585", "0.5630226", "0.56184185", "0.5613806", "0.5611164", "0.56071866", "0.56065524", "0.5603735", "0.559926", "0.55930996", "0.5591976", "0.55895036", "0.5589298", "0.5583596", "0.5578352", "0.5569548", "0.5569103", "0.5568857", "0.5566641", "0.55646", "0.5561986", "0.55614996", "0.5561408", "0.55594194", "0.5556851", "0.55520594", "0.5548377", "0.5547447", "0.5545754", "0.55399877", "0.55394405", "0.5538645", "0.553452", "0.55332786", "0.5532255", "0.5527507", "0.55234784", "0.55192107", "0.5514705", "0.551445" ]
0.0
-1
To pop the last character out from either screens
static delete() { // Ensuring that the current screen is NOT empty if (curr_o !== "") { // By chance if the last character is an operator, oppr is assigned none if (operators.includes(curr_o[curr_o.length - 1])) { oppr = ""; } curr_o = curr_o.substr(0, curr_o.length - 1); Calc.dispcurr(curr_o); } // Pop the last character from previous screen if the current screen is empty else { // By chance if the last character is an operator if (operators.includes(prev_o[prev_o.length - 1])) { oppr = ""; } prev_o = prev_o.substr(0, prev_o.length - 1); Calc.dispprev(prev_o); } return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function back(){\n const x = document.getElementById('screen').value.slice(0,-1);\n document.getElementById('screen').value = x;\n}", "function endScreen() {\n push();\n textSize(30);\n fill(255, 0, 0);\n stroke(0);\n strokeWeight(5);\n textAlign(CENTER, CENTER);\n text(`You lost!`, width / 2, height / 2);\n pop();\n}", "function endScreen() {\n push();\n textSize(30);\n fill(197, 26, 219);\n stroke(0);\n strokeWeight(5);\n textAlign(CENTER, CENTER);\n text(`You intoxicated yourself!`, width / 2, height / 2);\n pop();\n}", "function back() {\n\tdisp.textContent = disp.textContent.substr(0, disp.textContent.length - 1);\n\tif (disp.textContent.length == 0) {\n\t\tdisp.textContent = '0';\n\t\tdecPressed = 0;\n\t}\n}", "function back() {\r\n\tif (num2 != \"\"){\r\n\t\tdisplay.value = num2 = num2.substring(0, num2.length-1);\r\n\t} else if (num1 != \"\" && result == \"\"){\r\n\t\tdisplay.value = num1 = num1.substring(0, num1.length-1);\r\n\t\t}\r\n\t}", "function back() {\n if (res.length > 1) {\n player.textContent = !is_x_next ? \"X\" : \"O\";\n is_x_next = !is_x_next;\n\n res.pop();\n updateUi();\n }\n}", "function endScreen(){\n push();\n textSize(32);\n textAlign(CENTER);\n fill(255);\n text(txtEnd, width/2, height/2);\n pop();\n }", "function backSpace()\n{\n\t number = number.slice(0,-1);\n\t displayF(number);\n}", "function deleteLastDigit() {\n activeNumber = activeNumber.slice(0, -1);\n updateScreen();\n}", "function backSpace() {\n var displayValue = getCurrentValue();\n showNumberInDisplay(displayValue.substring(0, displayValue.length - 1))\n}", "function clearEntryPressed(){\n inputs[inputs.length-1] = \"\";\n if(inputs.length-1 == 0){\n $(\"#displayScreen p\").text(0);\n }\n $(\"#displayScreen p\").text(inputs[inputs.length-2]);\n}", "clearLastChar() {\r\n const { displayValue } = this.state\r\n\r\n this.setState({\r\n displayValue: displayValue.substring(0, displayValue.length - 1) || ''\r\n })\r\n }", "function backspace() {\n if (userInput.value.length > 0) {\n userInput.value = userInput.value.slice(0, userInput.value.length - 1);\n let tileObj = usedTiles[usedTiles.length - 1];\n tileObj.tile.classList.remove(\"used\");\n tileObj, (used = false);\n usedTiles.pop();\n }\n }", "function deleteCharAtPos(){\n if (promptText != ''){\n promptText =\n promptText.substring(0,column) +\n promptText.substring(column+1);\n restoreText = promptText;\n return true;\n } else return false;\n }", "function getLastMove(){\n return chess.pgn().substr( chess.pgn().lastIndexOf(' ')+1, chess.pgn().length );\n}", "backspace() {\n if (isNaN(this.getLastOperator())) return;\n let lastNumber = this.getLastPosition(false).toString().split(\"\");\n lastNumber.pop()\n let NewNumber = lastNumber.join('');\n this.setLastOperator(NewNumber);\n this.updateDisplay();\n }", "function checkLastChar(display) {\n const stringDisplay = display;\n const stringLength = stringDisplay.length;\n const lastChar = stringDisplay.charAt(stringLength - 1);\n return lastChar;\n }", "moveToPreviousCharacter() {\n this.handleLeftKey();\n }", "checkForWin() {\r\n const activeLetters = this.activePhrase.phrase.split('');\r\n const selectedLetter = document.querySelectorAll(`li.show.letter`);\r\n\r\n for (let i = 0; i < activeLetters.length; i++) {\r\n if (activeLetters[i] === ' ') {\r\n activeLetters.pop(activeLetters[i]);\r\n }\r\n }\r\n\r\n for (let i = 0; i < activeLetters.length; i++) {\r\n if (selectedLetter.length === activeLetters.length) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n }", "function back() {\n history.pop();\n if (history.length >= 1) { setMode(history[history.length - 1]) }\n }", "moveBackwardOneChar() {\n this.simulateKeyPress_(SAConstants.KeyCode.LEFT_ARROW, {});\n }", "function backspace() {\n //\n console.log(output.innerText)\n \n if(output.innerText !== 'Infinity' && output.innerText !== 'Invalid Input' && output.innerText.length > 1){\n output.innerText = output.innerText.substring(0, output.innerText.length - 1)\n }else clearScreen()\n}", "function showBack() {\n // return all words that are not on the front of the card and that have a value for their key\n const backWords = ['english', 'kana', 'kanji']\n .map(k => k !== CURRENT_CARD.front && CURRENT_CARD[k])\n .filter(j => !!j);\n const innerText = `<p style=\"font-size:28px\" align=\"center\">${backWords.join('<br><br>')}</p>`;\n\n CURRENT_CARD.showingFront = false;\n document.getElementById('flashcard').innerHTML = innerText;\n\n}", "function back() {\n var resultado = document.getElementById(\"input\").innerHTML;\n document.getElementById(\"input\").innerHTML = resultado.substring(\n 0,\n resultado.length - 1\n );\n}", "function Delete(){\n\tcurrent = document.getElementById('screen').value = current.slice(0, -1);\n}", "endPress () {\n if (this.focusIndex === -1) return;\n this.members[this.length - 1].focus();\n }", "function back() {\n 'use strict';\n\n welcomeScreen.style.display = 'block';\n gameScreen.style.display = 'none';\n endScreen.style.display = 'none';\n reset();\n}", "function goBack() {\n let text = qs(\"textarea\");\n $(\"sport-btn\").classList.remove(\"hidden\");\n text.classList.remove(\"hidden\");\n $(\"player-btn\").classList.remove(\"hidden\");\n $(\"back-btn\").classList.add(\"hidden\");\n text.value = \"\";\n $(\"display-area\").innerHTML = \"\";\n }", "function deletesingle() {\r\n backspaceValue = form.display.value;\r\n form.display.value = backspaceValue.substr(0, backspaceValue.length - 1);\r\n}", "backspace() {\n\t\t\tthis.mutate(this.value.slice(0, this.value.length - 1));\n\t\t}", "function handleBackBtn() {\n if (calcDisplay.length === 1) {\n calcDisplay = '0';\n } else {\n calcDisplay = calcDisplay.substring(0, calcDisplay.length - 1);\n }\n}", "function keypress(e) {\n if (e.key == 'z' && e.metaKey) {\n focused.back();\n }else if (e.key == ' ') {\n\t\tfocused.clear();\n\t}\n}", "function back() {\n if (history.length > 1) {\n\n setMode(history[history.length - 2]);\n setHistory(prev => [...prev.slice(0, -1)]);\n }\n }", "function back() {\n var value = document.getElementById(\"result\").value;\n document.getElementById(\"result\").value = value.substr(0, value.length - 1);\n displayVal = value.substr(0, value.length - 1);\n}", "function clearDisplay() {\n\tTi.API.info('called clearDisplay');\n // set the display to empty string\n $.lbl_display.text = '';\n $.lbl_mstore.text = '';\n $.lbl_arabic.text = '';//(0).toString(); //(current_num.arabic).toString();\n // reset the characters pressed variables to empty string\n last0_char = '',\n last1_char = '',\n last2_char = '',\n last_3_chars = '';\n dimChars(null);\n}", "back() {\n if (!(this.notes === undefined || this.length == 0)) {\n return this.notes[this.length() - 1];\n }\n }", "function cappingChar(){\n\t// defining limit of characters to be displayed\n\tvar maxCharDisplay = 16;\n\tvar displayString = document.getElementById('display').innerHTML;\n\n\t// check to see if the display exceeds max character display limit. If so, the function removes the characters exceeding the limit\n\tif(displayString.length > maxCharDisplay){\n\t\tdisplayString = displayString.substring(0,maxCharDisplay);\n\t\tdocument.getElementById('display').innerHTML = displayString;\n\t}\n}", "function backSlide() {\n var data = 'up';\n console.log(data);\n if (data && keys.includes(data)) {\n try {\n keySender.sendKey(data);\n slide--;\n } catch (error) {\n console.log(error);\n }\n }\n}", "back() {\n this._platformStrategy.back();\n }", "back() {\n this._platformStrategy.back();\n }", "back() {\n this._platformStrategy.back();\n }", "back() {\n this._platformStrategy.back();\n }", "back() {\n this._platformStrategy.back();\n }", "function deleteLast() {\n tempNumber = tempNumber.slice(0, -1);\n displayNum = displayNum.slice(0, -1);\n display.textContent = tempNumber;\n}", "back() {\n this._platformStrategy.back();\n }", "popLastComponent() {\n\t\tthis._popLastComponent(TransitionConstants.OUT);\n\t}", "function nextScreen() {\n p1.setTextBounds(100, 240, 700, 220);\n p2.destroy();\n \t\tselection.destroy();\n if (returnPressed) {\n selectedControl = 0;\n mouse.destroy();\n keyboard.destroy();\n p1.setText('Great! Your control is the return key. Press the enter/return key to continue.', true);\n returnKey = game.add.sprite(300, 400, 'return');\n returnKey.animations.add('press', [0, 0, 0, 0, 1]);\n returnKey.animations.play('press', 5, true);\n }\n if (spacePressed) {\n selectedControl = 1;\n mouse.destroy();\n keyboard.destroy();\n p1.setText('Great! Your control is the space bar. Press the space bar to continue.', true);\n spaceBarSprite = game.add.sprite(25, 430, 'spaceBar');\n spaceBarSprite.animations.add('press', [0, 0, 0, 0, 1]);\n spaceBarSprite.animations.play('press', 5, true);\n }\n \t\tif (mousePressed) {\n \t\t\tselectedControl = 2;\n \t\t\tkeyboard.destroy();\n \t\t\tp1.setText('Great! Your control is the mouse. Click the mouse to continue.', true);\n \t\t\tmouse.x = 360;\n \t\t\tmouse.y = 350;\n \t\t\tmouse.animations.add('click', [0, 0, 0, 0, 1]);\n \t\t\tmouse.animations.play('click', 5, true);\n \t\t} \n if (tabPressed) {\n selectedControl = 3;\n keyboard.destroy();\n mouse.destroy();\n p1.setText('Great! Use the tab key to scan and the enter key to select.', true);\n twoSwitchSprite = game.add.sprite(240, 400, 'twoSwitch');\n }\n \t\tcontrolSelected = true;\n black.bringToTop();\n \t}", "function reconsumeCurrentCharacter() {\n charIdx--;\n }", "prop_back(editor) {\n editor.el.back = new Components.button.Basic({\n label: '&LeftArrow; Return',\n parent: editor,\n onclick: () => {\n this.command(null);\n this.drawer.hide();\n this.on('return');\n }\n })\n }", "prop_back(editor) {\n editor.el.back = new Components.button.Basic({\n label: '&LeftArrow; Return',\n parent: editor,\n onclick: () => {\n this.command(null);\n this.drawer.hide();\n this.on('return');\n }\n })\n }", "function back() {\n if (history.length > 1) {\n setHistory(prev => prev.slice(0, prev.length - 1));\n }\n }", "function goBack() {\n PathStore.pop();\n}", "buttonOperation(good) {\n if (good === 'Space') {\n this.setState({ tts_tmp: this.state.tts_tmp + \" \" })\n }\n else {\n let a = this.state.tts_tmp.split('')\n a.pop()\n this.setState({\n tts_tmp: a.join('')\n })\n }\n }", "function backCient() {\n var resultadoCient = document.getElementById(\"inputCient\").innerHTML;\n document.getElementById(\"inputCient\").innerHTML = resultadoCient.substring(\n 0,\n resultadoCient.length - 1\n );\n}", "function clearScreen() {\n activeNumber = '';\n activeOperator = '';\n storedNumber = '';\n result = '';\n updateScreen();\n}", "function back() {\n if (history.length > 1) {\n const historyCopy = [...history];\n historyCopy.pop();\n setHistory(historyCopy);\n setMode(historyCopy[historyCopy.length - 1]); \n // remove end of array\n }\n }", "moveBackwardOneWord() {\n this.simulateKeyPress_(SAConstants.KeyCode.LEFT_ARROW, {ctrl: true});\n }", "function back() {\n if (history.length > 1) {\n setHistory(prev => {\n const newHistory = [...prev];\n newHistory.pop();\n setMode(newHistory[newHistory.length - 1]);\n return newHistory\n });\n }\n }", "function backKeyAccountMatch() {\n\t\t\tvar length = $scope.accountMatch.value.length;\n\t\t\tvar value = $scope.accountMatch.value;\n\t\t\tconsole.log('Value:' + value);\n\t\t\tconsole.log('Length:' + length);\n\t\t\t$scope.accountMatch.value = value.substring(0, length - 1);\n\t\t}", "function backKeyAccountMatch() {\n\t\t\tvar length = $scope.accountMatch.value.length;\n\t\t\tvar value = $scope.accountMatch.value;\n\t\t\tconsole.log('Value:' + value);\n\t\t\tconsole.log('Length:' + length);\n\t\t\t$scope.accountMatch.value = value.substring(0, length - 1);\n\t\t}", "function reconsumeCurrentCharacter() {\n charIdx--;\n }", "function back() {\n if (history.length > 1) {\n let update = [...history];\n update.pop();\n const newMode = update[update.length - 1]\n setMode(prev => prev = newMode)\n setHistory(prev =>prev =[...update])\n }\n }", "_prevScreenApp() {\n\t\tthis.props.navigation.goBack(null);\n }", "function end() {\n focusInput();\n updateInput = true;\n move(); up();\n }", "function end() {\n focusInput();\n updateInput = true;\n move(); up();\n }", "function viewBackFromOther() {\n\tlogInfo('Back change pasword');\n}", "function viewBackFromOther() {\n\tlogInfo('Back change pasword');\n}", "function delChar() {\n let code = $(\"code1\").innerText;\n console.log(`|${code}|`);\n if(code.length != 0) {\n $(\"code1\").innerText = code.substring(0, code.length-1);\n code = $(\"code1\").innerText;\n }\n }", "function switchSettings2Back() {\n /* Reset Focus */\n Draw.resetFocus();\n }", "function clearScreen() {\n\tletterString = \"\";\n\t$(\"#lettersGuessed\").html(\"<h3>Guesses Remaining: \" + guessesRemaining + \"</h3>\");\n\t$(\"#lettersGuessed\").append(\"<div>Letters Guessed Already</div>\");\n\t$(\"#lettersString\").text(letterString);\n}", "function backlistener() {\r\n\tdispball.visible = true;\r\n\tdispchar.visible = true;\r\n\r\n\tfor (var s = 0; s < allballs.length; s++) {\r\n\t\tallballs[s].visible = false;\r\n\t}\r\n\tfor (var s = 0; s < allchars.length; s++) {\r\n\t\tallchars[s].visible = false;\r\n\t}\r\n\tbackbutton.visible = false;\r\n\tmainbutton.visible = true;\r\n}", "back() {\n var val = '';\n if (this._history.length > 0) {\n val = this._history[this._index];\n if (this._index > 0) {\n this._index--;\n }\n }\n return val;\n }", "function backspace() {\n if (text.length > 0) {\n if (text[text.length - 1] === \" \") {text = text.slice(0, -1)}\n text = text.slice(0, -1)\n setInnerHTML(text)\n }\n}", "function resetScreen() {\n robot.moveMouse(rightScreen.x, rightScreen.y);\n robot.mouseClick();\n robot.keyTap(\"alt\");\n robot.keyTap(\"w\");\n robot.keyTap(\"1\");\n}", "function backAction() {\n switch (navigation[navigation.length-1]) {\n case \"list\":\n listAvailableQuizzes();\n break;\n case \"question\":\n showMore(quizNumber);\n break;\n case \"leaderboard\":\n showMore(quizNumber);\n break;\n\n }\n navigation.pop();\n if (navigation.length <= 0) {\n backButton.style.display = \"none\";\n }\n}", "handleExit() {\n const newKey = this.state.jumpKey;\n this.props.goBack(newKey);\n }", "function backspace() {\n // Make sure it is a string\n display = display + \"\";\n\n if (display.length == 1) { // If it is just one number set it to 0\n display = 0;\n } else { // If it longer than one number, remove the last one\n let temporary_display = display.substring(0, display.length - 1);\n display = temporary_display;\n }\n document.getElementById(\"display\").value = display;\n}", "function displayEndScreen() {\n //display image\n image(imgEndScreen, 0, 0, windowWidth, windowWidth * 0.4);\n //Set text size in push-pop\n push();\n textSize(19);\n //If player hits zero kids, display this\n if (player.sentence === 0) {\n text(\"It took you only \" + player.timeSpent + \" hours and you did it \\nwithout bumping into children! \\nAmazing job, Hieronymous! Back to \\nloitering!\", 0 + windowWidth / 20, windowWidth / 5);\n //If player hits less than three kids, display this\n } else if (player.sentence < 107) {\n text(\"It took you only \" + player.timeSpent + \" hours \\nand you only added \" + player.sentence + \" days \\n to your community service!\", 0 + windowWidth / 20, windowWidth / 5);\n } else {\n //otherwise, display this message\n text(\"It took you \" + player.timeSpent + \" hours... \\n...but holy crap Hieronymous you added \" + player.sentence + \" days \\nto your community service. Embarrassing.\", 0 + windowWidth / 20, windowWidth / 5);\n }\n pop();\n\n}", "function renderEndGameText() {\n gameBackground.zIndex = 45;\n sortZindex(gameScreen);\n longBoard.visible = true;\n endText.visible = true;\n endText.speed = END_TEXT_SPEED;\n endGameSelected = true;\n}", "function back() {\n setMode(history.pop());\n setHistory(history);\n }", "moveToNextCharacter() {\n this.handleRightKey();\n }", "function LastChar (stringname){\n\treturn stringname.slice(-1);\n}", "function takeBackMostRecentMove() {\n // switch player\n currPlayer = (currPlayer === 1) ? 2 : 1;\n\n // use recent move to remove from board \n let [row, col] = recentMove;\n board[row][col] = null;\n\n // remove from HTML the piece\n let cell = document.getElementById(`${row}-${col}`);\n cell.children[0].remove();\n}", "function popWord() {\n return popByte() + (popByte() << 8);\n}", "function goback() {\n document.getElementById(\"pokemon-container\").innerHTML = last_inner_HTML;\n }", "function removeLast() {\n\tlet displayText = document.getElementById('displayText')\n\tlet textContent = displayText.textContent;\n\tlet textContentLength = textContent.length;\n\tlet previousChar = textContent.charAt(textContentLength - 1);\n\tlet last2Chars = textContent.charAt(textContentLength - 2) + previousChar;\n\tif (textContent) {\n\t\t//removes both parts of the square root upon button click\n\t\tif (last2Chars === '√(') {\n\t\t\ttextContent = textContent.slice(0,(textContentLength - 2));\n\t\t\tdisplayText.textContent = textContent;\n\t\t}\n\t\t\n\t\ttextContent = textContent.slice(0,(textContentLength - 1));\n\t\tif (textContent) {\n\t\t\tdisplayText.textContent = textContent;\n\t\t} else if (!textContent) {\n\t\t\ttextContent = '0';\n\t\t\tdisplayText.textContent = '0';\n\t\t}\n\t}\n\t\n}", "function removeRight(){\n\t// kill all marios on the right half\n\t$(\"#characters\").children().each(function(index) {\n\t\tif($(this).attr(\"srcPos\") >= 5)\n\t\t{\n\t\t\t//if(isCompatible() == true)\n\t\t\t{\n\t\t\t\t$(this).addClass(\"character-removed\");\n\t\t\t\t$(this).bind(\"webkitTransitionEnd\", removeDiv);\n\t\t\t\t$(this).bind(\"oTransitionEnd\", removeDiv);\n\t\t\t\t$(this).bind(\"otransitionend\", removeDiv);\n\t\t\t\t$(this).bind(\"transitionend\", removeDiv);\n\t\t\t\t$(this).bind(\"msTransitionEnd\", removeDiv);\n\t\t\t}\n\t\t\t/*else\n\t\t\t{\n\t\t\t\t$(this).empty();\n\t\t\t\t$(this).remove();\n\t\t\t}*/\n\t\t}\n\t});\n}", "function backspace(){\n var temp1 = \"\";\n var temp2 = \"\";\n if(equalTo === true){\n clearButton();\n }\n if(flag === false){\n temp1 = num1.substring(0, num1.length-1);\n num1 = temp1;\n display.innerHTML = num1;\n }\n else if(flag === true){\n display.innerHTML = num1;\n flag = false;\n }\n if(num2 !== \"\"){\n temp2 = num2.substring(0, num2.length-1);\n num2 = temp2;\n flag = true;\n opSetString(operator);\n }\n}", "function resetScreen() {\n currentOperationScreen.textContent = '0';\n lastOperationScreen.textContent = 'xxx';\n holdOne = '';\n holdTwo = '';\n currentOperation = null;\n}", "function lastNonWhitespace () {\n var p = chars.length - 1;\n\n while (p >= 0) {\n var pp = chars[p];\n if (pp !== ' ' && pp !== '\\n' && pp !== '\\r' && pp !== '\\t') { // non whitespace\n return pp;\n }\n p--;\n }\n\n return '';\n }", "function trimBackStack() {\n WinJS.Navigation.history.backStack = WinJS.Navigation.history.backStack.filter(function (item) {\n if (item.location !== 'noConnection') {\n return true;\n }\n return false;\n });\n var stackLength = WinJS.Navigation.history.backStack.length;\n if(stackLength > backMax) {\n var newStack = WinJS.Navigation.history.backStack.slice(length - backMax);\n newStack.unshift({ location:'home', state: false});\n WinJS.Navigation.history.backStack = newStack;\n }\n }", "function C012_AfterClass_Amanda_EndChat() {\n\tif (ActorGetValue(ActorPose) == \"Kneel\") ActorSetPose(\"Shy\");\n\tLeaveIcon = \"Leave\";\n}", "function onBackKeyDown() {\n goBack();\n}", "function astroConsoleHistoryPrev() {}", "function backward() \n{\n const data=document.form.text.value;\n document.form.text.value=data.substring(0,data.length-1);\n}", "function prevSnip() {\n if (mixSplits != null && mixSplits != undefined) {\n splitPointer--;\n if ((splitPointer < mixSplits.length) && (splitPointer >= 0)) {\n preview(mixSplits[splitPointer], mixSplits[splitPointer] + snipWin, function () {\n });\n } else {\n splitPointer++;\n }\n }\n}", "function deleteOldLetter(){\n if(letters[0].y > 410){\n letters.shift()\n \n }\n }", "function backspace(){\n\t\n\tlet stringed = calculation['operand'].toString()\n\tcalculation['operand'] = stringed.substr(0, stringed.length-1)\n\tdisplay.textContent = calculation['operand']\n}", "function eraseLastInput()\n {\n $colorCode.css(\"background-color\", \"lightgray\");\n setTimeout(function(){\n $colorCode.html(\"\").css(\"background-color\", \"black\");\n setTimeout(startPrintingToScreen, 750);\n }, 500); \n }", "function backSpace() {\n calculation.textContent = calculation.textContent.slice(0, -1);\n return;\n}" ]
[ "0.64838797", "0.6233625", "0.6125296", "0.6124654", "0.610153", "0.6020568", "0.6008827", "0.5905893", "0.5893261", "0.5810154", "0.57862633", "0.57749254", "0.57467604", "0.5738636", "0.57350886", "0.5732955", "0.5726936", "0.57004523", "0.5688792", "0.5676933", "0.5663937", "0.5649053", "0.5567749", "0.5561379", "0.5559139", "0.5551085", "0.55494916", "0.55370873", "0.55281943", "0.550434", "0.54869777", "0.5478276", "0.5472962", "0.5442183", "0.5428628", "0.5385172", "0.53815764", "0.5375364", "0.5365478", "0.5365478", "0.5365478", "0.5365478", "0.5365478", "0.5363647", "0.5353453", "0.53445166", "0.5342388", "0.5331446", "0.5326861", "0.5326861", "0.5321321", "0.53131473", "0.5292511", "0.5283895", "0.5280024", "0.5278432", "0.52609146", "0.52594113", "0.52481943", "0.52481943", "0.52479887", "0.5243997", "0.52368844", "0.5233625", "0.5233625", "0.52332884", "0.52332884", "0.5213001", "0.52080685", "0.519557", "0.5195392", "0.51857805", "0.51711583", "0.51663464", "0.5164635", "0.5160574", "0.5159959", "0.5159404", "0.5159156", "0.51513314", "0.5149459", "0.5148824", "0.5145779", "0.51414025", "0.51403445", "0.51368374", "0.5135015", "0.5134597", "0.5128126", "0.51226324", "0.5121011", "0.5117908", "0.51171225", "0.51134115", "0.5111706", "0.5103048", "0.5085544", "0.5085303", "0.50842786", "0.5078924" ]
0.5970382
7
To perform any arithmetic operations on both operands Arguments: a & b => both operands : data => any operator : n => new operator (if any) : f => depends on e.target("result" or "operation") within which it is called. : "result" will pass '1'; otherwise none, since default value = 0;
static operation(a, b, data, n, f = "0") { // Ensures that the current screen is NOT empty if (curr_o != "") { // Performs the operation through switch function switch (data) { case "+": res = b + a; check = 1; break; case "x": res = b * a; check = 1; break; case "/": res = b / a; check = 1; break; case "-": res = b - a; check = 1; break; case "%": res = (b * a) / 100; check = 1; break; case "^": res = Math.pow(b, a); check = 1; } } // If this function was called from "result" target, display the final result on the current screen if (f === "1") { prev_o = res.toString(); curr_o = prev_o; prev_o = ""; Calc.dispprev(prev_o); Calc.dispcurr(curr_o); } // If not then retain the current result on the previous screen followed by any new operator else { // Ensures that some operation is performed successfully if (check === 1) { prev_o = res.toString(); check = 0; } // Calls this function to append the new operator on previous screen Calc.appendp(n); Calc.dispprev(prev_o); // Makes the current screen empty curr_o = ""; Calc.dispcurr(curr_o); // Asigns the value of oppr to none oppr = ""; } return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function operate(operator, a, b) {\n a = Number(a);\n b = Number(b);\n switch (operator) {\n case \"+\":\n return add(a, b);\n case \"-\":\n return subtract(a, b);\n case \"*\":\n return mult(a, b);\n case \"÷\":\n if (b === 0) return null;\n else return divide(a, b);\n case \"%\":\n return percent(a);\n default:\n return null;\n}\n}", "function operate(a, b, operator) {\n switch(operator) {\n case \"+\":\n return add(a, b);\n break;\n case \"-\":\n return subtract(a, b);\n break;\n case \"x\":\n return multiply(a, b);\n break;\n case \"÷\":\n return division(a, b);\n break;\n };\n}", "function operation(number1, number2, operator) {\n\n\n\n let res // result container\n // basic math operation\n switch(operator){\n case '+':\n res = parseFloat(number1) + parseFloat(number2)\n break\n case '-':\n res = parseFloat(number1) - parseFloat(number2)\n break\n case '/':\n res = parseFloat(number1) / parseFloat(number2)\n break\n case '*':\n res = parseFloat(number1) * parseFloat(number2)\n break\n default:\n return 0\n }\n\n // some scientific calculation\n\n\n return res\n}", "function calc(op, n1, n2) {\n var result = 0;\n switch (op) {\n case \"+\":\n result = n1 + n2;\n break;\n case \"-\":\n result = n1 - n2;\n break;\n case \"x\":\n result = n1 * n2;\n break;\n case \"/\":\n result = n1 / n2;\n break;\n }\n return result;\n}", "function operate(num1, num2, operator)\n{\n let ans;\n if(operator == '+')\n ans = add(num1,num2);\n else if (operator == '-')\n ans = sub(num1,num2);\n else if ( operator == \"/\")\n ans = div(num1,num2);\n else \n ans = mul(num1,num2);\n return ans;\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 operate(operator, number1, number2) {\n let result;\n switch (operator) {\n case \"+\":\n result = add(number1, number2);\n break;\n case \"-\":\n result = subtract(number1, number2);\n break;\n case \"X\":\n result = multiply(number1, number2);\n break;\n case \"/\":\n result = divide(number1, number2);\n break;\n default:\n break;\n }\n return result;\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 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 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 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 mathOperation(a, b, operation) {\n\tswitch (operation) {\n\t\tcase \"+\":\n\t\t\treturn summation(a, b);\n\t\tcase \"-\":\n\t\t\treturn substraction(a, b);\n\t\tcase \"*\":\n\t\t\treturn multiplication(a, b);\n\t\tcase \"/\":\n\t\t\treturn division(a, b);\n\t\tdefault:\n\t\t\talert(\"Введите в operation: [+, -, *, /]\");\n\t\t\treturn NaN;\n\t}\n}", "function arithmetic(a, b, operator) {\n switch (operator) {\n case \"add\":\n return a + b;\n case \"subtract\":\n return a - b;\n case \"multiply\":\n return a * b;\n case \"divide\":\n return a / b;\n return null;\n }\n}", "function operate(operator, a, b) {\n switch (operator) {\n case add:\n return add(a, b);\n break;\n\n case subtract:\n return subtract(a, b);\n break;\n\n case multiply:\n return multiply(a, b);\n break;\n\n case divide:\n return divide(a, b);\n break;\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 applyOperation(b, a = 0, op) {\n switch (op) {\n case \"+\":\n return a + b;\n case \"-\":\n return a - b;\n case \"*\":\n return a * b;\n case \"/\":\n if (b == 0) {\n throw new Error(\"Cannot divide by zero\");\n }\n return a / b;\n }\n return 0;\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 calculate(n1, op, n2) {\n switch (op) {\n case '+':\n return n1 + n2;\n case '-':\n return n1 - n2;\n case '/':\n return n2 !== 0 ? n1 / n2 : null;\n case '*':\n return n1 * n2;\n default:\n return null;\n }\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 operate(num1, num2, operator) {\n if (operator == \"+\") {\n return add(num1, num2);\n } else if (operator == \"-\") {\n return subtract(num1, num2);\n } else if (operator == \"÷\") {\n return divide(num1, num2);\n } else if (operator == \"×\") {\n return multiply(num1, num2);\n }\n}", "function operate(num1, operator, num2) {\n switch(operator) {\n case '+':\n return add(num1, num2);\n case '-':\n return subtract(num1, num2);\n case '*':\n return multiple(num1, num2);\n case '/':\n return divide(num1, num2);\n }\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}", "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 operate(operator, num1, num2) {\n switch (operator) {\n case \"+\":\n return add(num1, num2);\n case \"-\":\n return subs(num1, num2);\n case \"*\":\n return mult(num1, num2);\n case \"/\":\n return div(num1, num2);\n case \"%\":\n return module(num1,num2);\n case \"sqr\":\n return square(num1, num2);\n } \n}", "function operate(a, operation, b) {\n a = parseFloat(a)\n b = parseFloat(b)\n \n switch(operation) {\n case \"+\":\n return a+b\n case \"-\":\n return a-b\n case \"x\":\n return a*b\n case \"÷\":\n return a/b\n }\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 return \"wrong operator\";\n}", "function calculate(a, b, operator){\n if (operator === \"+\"){\n return a+b\n }else if (operator === \"-\"){\n return a-b\n }else if (operator === \"*\"){\n return a*b\n }else if (operator === \"/\"){\n return a/b\n }\n}", "function operate(operator, num1,num2){\n num1 = parseFloat(num1)\n num2 = parseFloat(num2)\n switch(operator){\n case '*':\n return multiply(num1,num2);\n break;\n \n case '-':\n return minus(num1,num2);\n break;\n\n case '/':\n return divide(num1,num2);\n break;\n\n case '+':\n return add(num1,num2);\n break;\n }\n}", "function operate(operator, num1, num2) {\n num1 = parseFloat(prevNum, 10);\n num2 = parseFloat(currentNum, 10);\n if (operator == 'add') {\n return add(num1, num2);\n } if (operator == 'subtract') {\n return subtract(num1, num2);\n } if (operator == 'multiply') {\n return multiply(num1, num2);\n } if (operator == 'divide') {\n return divide(num1, num2);\n } if (operator == '') {\n displayNum.textContent = '';\n }\n}", "function getResult(val1, val2, operation) {\n\t\tif (operation === '+') {\n\t\t\treturn val1 + val2;\n\t\t} else if (operation === '-') {\n\t\t\treturn val1 - val2;\n\t\t} else if (operation === '*') {\n\t\t\treturn val1 * val2;\n\t\t} else {\n\t\t\treturn val1 / val2;\t\n\t\t} \n\t}", "function math (numberOne, numberTwo, operation){\n\n if (operation === 'add'){\n return (numberOne + numberTwo);\n }\n if (operation === 'subtract'){\n return (numberOne - numberTwo);\n }\n if (operation === 'multiply'){\n return (numberOne * numberTwo);\n }\n if (operation === 'divide'){\n return (numberOne / numberTwo);\n }\n\n return (NaN);\n\n}", "function operate(operator, operand1, operand2) {\n return operator(operand1, operand2);\n}", "function operate(operator, operand1, operand2) {\n return operator(operand1, operand2);\n}", "function calculate(operand1, operand2, operator) {\n if (operator == \"+\") {\n return operand1 + operand2;\n } else if (operator == \"-\") {\n return operand1 - operand2;\n } else if (operator == \"*\") {\n return operand1 * operand2;\n } else if (operator == \"/\") {\n return operand1 / operand2;\n }\n}", "function operate(operator, operand1, operand2) {\n return operator(operand1, operand2);\n}", "function getResult(val1, val2, operation) {\r\n\tif(operation === '+') {\r\n\t\treturn val1 + val2;\r\n\t} else if(operation === '-') {\r\n\t\treturn val1 - val2;\r\n\t} else if(operation === '*') {\r\n\t\treturn val1 * val2;\r\n\t} else if(operation === '/') {\r\n\t\treturn val1 / val2;\r\n\t}\r\n\t}", "function Calc(a,b,operator) {\n\n switch (operator) {\n \n case '+':\n return a + b\n break;\n case '-':\n return a - b\n break;\n case '*':\n return a * b\n break;\n // case '%':\n // return a % b\n case '/':\n return a / b\n break;\n \n }\n \n }", "function calculate(first, second, operator) {\n switch (operator) {\n case '+':\n return Number(first) + Number(second);\n break;\n case '-':\n return Number(first) - Number(second);\n break;\n case '*':\n return Number(first) * Number(second);\n break;\n case '/':\n return Number(first) / Number(second);\n break;\n }\n}", "function operate(operator, operand1, operand2) {\n\treturn operator(operand1, operand2);\n}", "function operate(operator, operand1, operand2) {\n\treturn operator(operand1, operand2);\n}", "function doMath(operator, a, b) {\n var answer = operator(a, b);\n return answer;\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 operate(operator, x, y) {\n x = Number(x);\n y = Number(y);\n \n switch (operator) {\n case '+':\n return add(x, y);\n case '-':\n return subtract(x, y);\n case '*':\n return multiply(x, y);\n case '/':\n return divide(x, y);\n case '^':\n return exponent(x, y);\n default:\n return null;\n }\n}", "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 getCalculation(num1, num2, oparetor) {\n switch (oparetor) {\n case '+':\n return num1 + num2;\n case '-':\n return num1 - num2;\n case '*':\n return num1 * num2;\n case '/':\n return num1 / num2;\n default:\n return num1 % num2;\n }\n\n}", "function calculate(num1, num2, operation) {\n return operation(num1, num2);\n}", "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 answer(val1, val2){\n\n if(operation === '+'){return val1 + val2;}\n if(operation === '-'){return val1 - val2;}\n if(operation === 'X'){return val1 * val2;}\n if(operation === '/'){return (val1 / val2);}\n if(operation === '%'){return val1 % val2;}\n }", "function doMath(operator, a, b) {\n return operator;\n}", "function compute(operand1, operand2, operator){\n\toperand1 = Number(operand1);\n\toperand2 = Number(operand2);\n\t//console.log(operand1);\n\t//console.log(operand2);\n\tswitch (operator){\n\t\tcase '^': return Math.pow(operand1, operand2);\n\t\tcase '+': return operand1 + operand2;\n\t\tcase '-': return operand1 - operand2;\n\t\tcase '*': return operand1 * operand2;\n\t\tcase '/': return operand1 / operand2;\n\t}\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}", "function calculator (value1, value2, operation) {\n var result=0\n\n if (operation== 'addition') {\n\n result = value1 + value2 \n\n } else if (operation== 'subtraction') {\n result= value1 - value2\n } else if (operation== 'multiplication') {\n result= value1 * value2\n \n } else if (operation== 'division') {\n result= value1 / value2\n\n } else {\n result='Please insert a correct operation'\n }\n return result\n}", "function calculate(firstNum, secondNum, operator) {\n\tswitch(operator) {\n\t\tcase \"+\":\n\t\t\treturn firstNum + secondNum;\n\t\tcase \"-\":\n\t\t\treturn firstNum - secondNum;\n\t\tcase \"*\":\n\t\t\treturn firstNum * secondNum;\n\t\tcase \"/\":\n\t\t\treturn firstNum / secondNum;\n\t\tdefault:\n\t\t\tthrow \"Incorrect Operator\";\n\t}\n}", "function operate(operator, x, y) {\n\n if (operator == \"+\") {\n return add(x, y);\n\n } else if (operator == \"-\") {\n return subtract(x, y);\n\n } else if (operator == \"x\") {\n return multiply(x, y);\n\n } else if (operator == \"÷\") {\n return divide(x, y);\n }\n}", "function doOp(op, v1, v2) {\n switch (op) {\n case '+': return v1 + v2;\n case '-': return v1 - v2;\n case '*': return v1 * v2;\n case '/': return v1 / v2;\n case '^': return Math.pow(v1, v2);\n default: throw new Error('Unknown operator: ' + op);\n }\n }", "function evalPair(num1, num2, op) {\nvar eval = 0;\nswitch(op) {\n case '+': \n eval = num1+num2;\n break;\n case '-':\n eval = num1-num2;\n break;\n case '*':\n eval = num1*num2;\n break;\n case '/':\n eval = num1/num2;\n break;\n }\n return eval;\n}", "function operate(operator, a, b){\n if(operator == \"divide\" && b == 0){\n alert(\"You cannot divide by 0!\");\n operationChosen = true;\n return 'Err';\n }\n\n if(operator == \"add\") return add(a,b);\n else if(operator == \"subtract\") return subtract(a,b);\n else if(operator == \"multiply\") return multiply(a,b);\n else if(operator == \"divide\") return divide(a,b);\n}", "function calculateResult(operation, left, right) {\n let result;\n\n switch (operation) {\n case 'addition':\n result = left + right;\n break;\n case 'subtraction':\n result = left - right;\n break;\n case 'multiplication':\n result = left * right;\n break;\n case 'division':\n result = left / right;\n break;\n case 'remainder':\n result = left % right;\n break;\n default:\n result = 0;\n }\n return result;\n}", "function calculator(a, op, b) {\nif (op == '/' && b === 0) return \"Can't divide by 0!\"\nif (op == '+') return a + b;\nif (op == '*') return a * b;\nif (op == '-') return a - b;\nif (op == '/') return a / b; \n}", "function doMath(operation, number1, number2) {\n\treturn operation(number1,number2);\n}", "function calculator(num1,operator,num2) {\r\n\r\n let result;\r\nswitch (operator) {\r\n \r\n case \"+\": result = num1+num2; break;\r\n case \"-\": result = num1-num2; break;\r\n case \"*\": result = num1*num2; break;\r\n case \"/\": result = num1/num2; break;\r\n case \"%\": result = num1%num2; break;\r\n case \"^\": result = Math.pow(num1,num2) ; break;\r\n case \"sin\": result = Math.sin(num1,num2) ; break;\r\n case \"cos\": result = Math.cos(num1,num2) ; break;\r\n case \"tan\": result = Math.tan(num1,num2) ; break;\r\n default: result = \"invalid operator\"; break;\r\n}\r\n return result;\r\n}", "function elementArithmetic(id1,id2,out_id,operator) {\n var value1 = +document.getElementById(id1).value;\n if (value1 != value1) {add_class('invalid-field',id1)}\n var value2 = +document.getElementById(id2).value;\n if (value2 != value2) {add_class('invalid-field',id2)}\n var out_elm = document.getElementById(out_id);\n //\n if (operator == '+') {\n out_elm.value = value1 + value2\n }\n else if (operator == '-') {\n out_elm.value = value1 - value2\n }\n else if (operator == '*') {\n out_elm.value = value1 * value2\n }\n else if (operator == '/') {\n out_elm.value = value1 / value2\n }\n else {\n console.log('Unknown operator: '+operator);\n }\n}", "function operate(opp, a, b) {\n a = Number(a);\n b = Number(b);\n\n switch(opperator) {\n case '+':\n answer = add(a, b);\n display.textContent = answer;\n break;\n case '-':\n answer = subtract(a, b);\n display.textContent = answer;\n break;\n case '/':\n answer = divide(a, b);\n display.textContent = answer;\n break;\n case '*':\n answer = multiply(a, b);\n display.textContent = answer;\n break;\n }\n}", "function calculator(num1, operator, num2) {\n if (num2 === 0) { return \"Can't divide by 0!\"; }\n else {\n switch (operator) {\n case \"+\":\n return num1 + num2;\n case \"-\":\n return num1 - num2;\n case \"*\":\n return num1 * num2;\n case \"/\":\n return num1 / num2;\n }\n }\n}", "function operation(inputOperator, num1, num2) {\n var result;\n if (inputOperator == \"add\") {\n let add = num1 + num2;\n result = `${num1} + ${num2} = ${add}`;\n console.log(result);\n } else if (inputOperator == \"substract\") {\n let subtract = num1 - num2;\n result = `${num1} - ${num2} = ${subtract}`;\n console.log(result);\n } else if (inputOperator == \"multiply\") {\n let multiply = num1 * num2;\n result = `${num1} * ${num2} = ${multiply}`;\n console.log(result);\n } else if (inputOperator == \"divide\") {\n let divide = num1 / num2;\n result = `${num1} / ${num2} = ${divide}`;\n console.log(result);\n }\n}", "function calculator(number1, operator, number2) {\n switch (operator) {\n case \"+\": return number1 + number2;\n case \"-\": return number1 - number2;\n case \"*\": return number1 * number2;\n case \"/\":\n if (number2 == 0) return \"Can't divide by 0!\"\n return number1 / number2;\n }\n}", "function operation(operator, value){\n\tif(operator == '+'){\n\t\treturn result + value;\n\t} else if (operator == '-'){\n\t\treturn result - value;\n\t} else if (operator == '*'){\n\t\treturn result * value;\n\t} else if (operator == '/'){\n\t\tif (value == 0){\n\t\t\tconsole.log(\"Cannot divide by zero try again\");\n\t\t\treturn result;\n\t\t} else {\n\t\t\treturn result / value;\n\t\t}\n\t} else {\n\t\tconsole.log(\"Not a valid operator\");\n\t}\n}", "function calculator(number1, number2, operator) {\n switch (operator) {\n case \"+\":\n value = number1 + number2;\n break;\n case \"-\":\n value = number1 - number2;\n break;\n case \"*\":\n value = number1 * number2;\n break;\n case \"/\":\n value = number1 / number2;\n break;\n case \"%\":\n value = number1 % number2;\n }\n return `${number1} ${operator} ${number2} = ${value}.`; //return result\n}", "function calculator(num1,num2,operator){\n var res =parseInt(num1)+parseInt(num2);\n document.write(res);\n}", "function calculator(calc, a, b) {\n const result = calc(a, b)\n return result;\n }", "function calculate(command, a, b) {\n switch (command) {\n case \"add\":\n return a + b;\n case \"substract\":\n return a - b;\n case \"divide\":\n return a / b;\n case \"multiply\":\n return a * b;\n case \"remainder\":\n return a % b;\n default:\n throw Error(\"unknown command\");\n }\n}", "function calculator(a, b){\n\n}", "function cal(num1,num2,op){\n let y ;\n if(op == \"*\"){\n return duplicate(num1,num2);\n }\n else if(op == \"/\"){\n return division(num1,num2);\n }\n else if(op == \"-\"){\n y = num1.valueOf() - num2.valueOf(); \n return y.toString();\n }\n else if(op == \"+\"){\n num1 = parseFloat(num1);\n num2 = parseFloat(num2);\n y = num1+ num2;\n return y.toString();\n }\n\n }", "function calculated (operator, a, b) {\n if (operator === '+') {\n return Math.round((a + b) * 1000000) / 1000000\n } else if (operator === '-') {\n return Math.round((a - b) * 1000000) / 1000000\n } else if (operator === '*') {\n return Math.round((a * b) * 1000000) / 1000000\n } else if (operator === '/') {\n return Math.round((a / b) * 1000000) / 1000000\n }\n }", "function calculate(command, a, b) {\n switch (command) {\n case 'add':\n return a + b;\n case 'substract':\n return a - b;\n case 'devide':\n return a / b;\n case 'multiply':\n return a * b;\n case 'remainder':\n return a % b;\n default:\n throw Error('Unknown command')\n }\n}", "function calculator (firstnumber, operator, secondnumber) {\n switch (operator) {\n case '+':\n return parseInt(firstnumber + secondnumber);\n break;\n case '-':\n return parseInt(firstnumber - secondnumber);\n break;\n case '*':\n return parseInt(firstnumber * secondnumber);\n break;\n case '/':\n if (secondnumber === 0) {\n return Infinity;\n break;\n } else {\n return parseInt(firstnumber / secondnumber);\n break;\n }\n default:\n console.log('Sorry, the arguments are not numbers');\n }\n}", "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}", "function operate2(operation, operand1, operand2) {\n if (typeof operators[operation] === \"function\")\n return operators[operation](operand1, operand2);\n else throw \"unknown operator\";\n}", "function op_and(x, y)\n{\n return x & y;\n}", "function operation(operator){\n let numberOne = parseInt(document.getElementById(\"numberOne\").value);\n let numberTwo = parseInt(document.getElementById(\"numberTwo\").value);\n let resultOp;\n if (operator === \"plus\"){\n resultOp = numberOne+numberTwo;\n }\n else if (operator === \"minus\"){\n resultOp = numberOne-numberTwo;\n }\n else if (operator === \"multiplier\"){\n resultOp = numberOne*numberTwo;\n }\n else if (operator===\"divider\"){\n resultOp = numberOne/numberTwo;\n }\n else {\n console.log(\"trace: problem\");\n }\n document.getElementById(\"result\").value = resultOp;\n}", "function calculator(numOne, numTwo, operator) {\n switch (operator) {\n case \"+\":\n return numOne + numTwo;\n break;\n case \"-\":\n return numOne - numTwo;\n break;\n case \"/\":\n return numOne / numTwo;\n break;\n case \"*\":\n return numOne * numTwo;\n break;\n default:\n return \"Error! Something went wrong\";\n }\n}", "function a(num1, num2) { // what if I do 'a' num1 & num2\n return num1 + num2 // if I do return num1 + num2\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 historicalData(n1, op, n2, result) {\n let fullOp = '';\n\n if (op === 'add') {\n fullOp = (n1 + \" + \" + n2 + \" = \" + result);\n } else if (op === 'subtract') {\n fullOp = (n1 + \" - \" + n2 + \" = \" + result);\n } else if (op === 'multiply') {\n fullOp = (n1 + \" x \" + n2 + \" = \" + result);\n } else if (op === 'divide') {\n fullOp = (n1 + \" ÷ \" + n2 + \" = \" + result);\n }\n\n return fullOp;\n}", "function arithmetic(node) {\n if (!Node.Type.isOperator(node)) {\n return Node.Status.noChange(node);\n }\n if (!node.args.every(child => Node.Type.isConstant(child, true))) {\n return Node.Status.noChange(node);\n }\n\n // we want to eval each arg so unary minuses around constant nodes become\n // constant nodes with negative values\n node.args.forEach((arg, i) => {\n node.args[i] = Node.Creator.constant(evaluate(arg));\n });\n\n // Only resolve division of integers if we get an integer result.\n // Note that a fraction of decimals will be divided out.\n if (Node.Type.isIntegerFraction(node)) {\n const numeratorValue = parseInt(node.args[0]);\n const denominatorValue = parseInt(node.args[1]);\n if (numeratorValue % denominatorValue === 0) {\n const newNode = Node.Creator.constant(numeratorValue/denominatorValue);\n return Node.Status.nodeChanged(\n ChangeTypes.SIMPLIFY_ARITHMETIC, node, newNode);\n }\n else {\n return Node.Status.noChange(node);\n }\n }\n else {\n const evaluatedValue = evaluateAndRound(node);\n const newNode = Node.Creator.constant(evaluatedValue);\n return Node.Status.nodeChanged(ChangeTypes.SIMPLIFY_ARITHMETIC, node, newNode);\n }\n}", "function operate2(operation, operand1, operand2) {\n\tif (typeof operators[operation] === \"function\")\n\t\treturn operators[operation](operand1, operand2);\n\telse throw \"unknown operator\";\n}", "function calculator(a,b){\n this.result=0;\n this.add=function(a,b){\n this.result=a+b;\n return this.result;\n \n }\n this.subtract=function(a,b){\n this.result=a-b;\n return this.result;\n }\n this.multiplication=function(a,b){\n this.result=a*b;\n return this.result;\n }\n this.division=function(a,b){\n this.result=a/b;\n return this.result;\n }\n}", "function doMath(num1 ,num2 , operator) {\n if (num2 == null) {\n if(totalInt2 == null){\n totalInt2 = parseFloat(num1);\n }\n num2 = totalInt2;\n storeNum2 = parseFloat(num2);\n\n }\n if (operator == \"+\") {\n num1 = parseFloat(num1) + parseFloat(num2);\n }\n else if (operator == \"-\") {\n num1 = parseFloat(num1) - parseFloat(num2);\n }\n else if (operator == \"/\") {\n if(num2 == 0){\n $(\"#displayScreen p\").text(\"Error\");\n totalInt2 = null;\n return;\n }\n num1 = parseFloat(num1) / parseFloat(num2);\n }\n else if (operator == \"X\") {\n num1 = parseFloat(num1) * parseFloat(num2);\n }\n return num1.toFixed(3);\n}", "calculate(){\r\n \r\n switch(this.operator){//evaluate the operator \r\n case \"^\"://if the operator is ^, then use the power formula\r\n return Math.pow(this.num1,this.num2); \r\n case \"*\"://if the operator is *, multiple the two numbers\r\n return this.num1*this.num2;\r\n case \"/\"://if the operator is ^,divide the two numbers\r\n return this.num1/this.num2; \r\n case \"+\"://if the operator is ^, add the two numbers\r\n return this.num1+this.num2;\r\n case \"-\"://if the operator is ^, subtract the two numbers\r\n return this.num1-this.num2; \r\n default://else error\r\n return \"ERROR\" \r\n }\r\n }", "function op_and(x,y) { return x&y; }", "function op_and(x,y) { return x&y; }", "function op_and(x,y) { return x&y; }", "function op_and(x,y) { return x&y; }", "function op_and(x,y) { return x&y; }", "function op_and(x,y) { return x&y; }", "function op_and(x,y) { return x&y; }", "function op_and(x,y) { return x&y; }", "function op_and(x,y) { return x&y; }", "function op_and(x,y) { return x&y; }", "function op_and(x,y) { return x&y; }" ]
[ "0.7363224", "0.7347489", "0.72949564", "0.7289821", "0.72420293", "0.7233502", "0.72312033", "0.7179186", "0.7168168", "0.7165991", "0.7155161", "0.7138982", "0.71343684", "0.7123653", "0.7105101", "0.70822686", "0.7078338", "0.7069497", "0.70669675", "0.7044465", "0.70408624", "0.7025718", "0.6997607", "0.69880867", "0.69795334", "0.69712967", "0.6955643", "0.6939077", "0.6933178", "0.6873165", "0.6871508", "0.68640023", "0.68640023", "0.68628836", "0.6818922", "0.67992747", "0.677331", "0.6772277", "0.6766867", "0.6766867", "0.67307454", "0.67233014", "0.67226285", "0.67050004", "0.6687626", "0.6683748", "0.6683434", "0.6679648", "0.6674323", "0.66674197", "0.6659959", "0.6587722", "0.6586643", "0.6569866", "0.6560714", "0.6560399", "0.6559598", "0.6550155", "0.65440774", "0.65393597", "0.6533541", "0.6516476", "0.6515482", "0.6438819", "0.6433895", "0.6405501", "0.63839304", "0.63824606", "0.6381333", "0.6376425", "0.637399", "0.6371309", "0.6352466", "0.63490385", "0.63431543", "0.6341873", "0.6338114", "0.6332203", "0.6330564", "0.6328298", "0.6324711", "0.63169724", "0.631167", "0.63057065", "0.62911296", "0.62872326", "0.6284525", "0.628451", "0.6270362", "0.62700385", "0.62700385", "0.62700385", "0.62700385", "0.62700385", "0.62700385", "0.62700385", "0.62700385", "0.62700385", "0.62700385", "0.62700385" ]
0.72916645
3
calculates the quad key for a given point. The point is not(!) in lat/lng format.
function pointToQuadKey(x, y, zoom) { return zoom + "_" + x + "_" + y;; // var quadkey = []; // for(var c = zoom; c > 0; c--) { // // +-------+ quadrants are probably ordered like this // // | 0 | 1 | // // |---|---| // // | 2 | 3 | // // |---|---| // var quadrant = 0; // var e = 1 << c - 1; // (x & e) != 0 && quadrant++; // push right // (y & e) != 0 && (quadrant++, quadrant++); // push down // quadkey.push(quadrant); // } // return quadkey.join(""); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pointToKey(x, y) {\n return `${x},${y}`;\n}", "function tileXYToQuadKey( tx,ty,zoom )\n {\n var quadKey = '';\n for ( var i = zoom; i > 0; i-- )\n {\n var digit = 0;\n var mask = 1 << ( i - 1 );\n if( ( tx & mask ) != 0 )\n {\n digit++;\n }\n if( ( ty & mask ) != 0 )\n {\n digit++;\n digit++;\n }\n quadKey += digit;\n }\n return quadKey;\n }", "function tileXYToQuadKey( tx,ty,zoom )\n {\n var quadKey = '';\n for ( var i = zoom; i > 0; i-- )\n {\n var digit = 0;\n var mask = 1 << ( i - 1 );\n if( ( tx & mask ) != 0 )\n {\n digit++;\n }\n if( ( ty & mask ) != 0 )\n {\n digit++;\n digit++;\n }\n quadKey += digit;\n }\n return quadKey;\n }", "function getTileKey(coord) {\n const latHemisphere = coord[1] < 0 ? 'S' : 'N';\n const lat = zeroPad(Math.abs(Math.floor(coord[1])), 2);\n const lngHemisphere = coord[0] < 0 ? 'W' : 'E';\n const lng = zeroPad(Math.abs(Math.floor(coord[0])), 3);\n\n return `${latHemisphere}${lat}${lngHemisphere}${lng}`;\n}", "roundFunc(p, subkey) {\n const tl = ((p >>> 16) & 0x3ff) | (((p >>> 14) | (p << 18)) & 0xffc00);\n const tr = (p & 0x3ff) | ((p << 2) & 0xffc00);\n let al = subkey[2] & (tl ^ tr);\n let ar = al ^ tr;\n al ^= tl;\n al ^= subkey[0];\n ar ^= subkey[1];\n return (IceKey.spBox[0][al >>> 10] |\n IceKey.spBox[1][al & 0x3ff] |\n IceKey.spBox[2][ar >>> 10] |\n IceKey.spBox[3][ar & 0x3ff]);\n }", "_hash(pt) {\n return (15485867 + pt.X) * 15485867 + pt.Y;\n }", "getKey(){\n\t\treturn this.x + \"|\" + this.y + \"|\" + this.z;\n\t}", "function getKey_(position) \n{\n return \"key-\"+ OsmMaps.position.coords.latitude.toFixed(4) + \"-\" + OsmMaps.position.coords.longitude.toFixed(4);\n}", "function quadKeyToTileXY( quadKeyString )\n {\n var tileX = 0;\n var tileY = 0;\n var quadKey = quadKeyString.split( '' );\n var levelOfDetail = quadKey.length;\n\n for( var i = levelOfDetail; i > 0; i--)\n {\n var mask = 1 << ( i - 1 );\n switch( quadKey[ levelOfDetail - i ] )\n {\n case '0':\n break;\n\n case '1':\n tileX |= mask;\n break;\n\n case '2':\n tileY |= mask;\n break;\n\n case '3':\n tileX |= mask;\n tileY |= mask;\n break;\n\n default:\n return null;\n }\n }\n return { tx:tileX, ty:tileY, zoom:levelOfDetail };\n }", "function quadKeyToTileXY( quadKeyString )\n {\n var tileX = 0;\n var tileY = 0;\n var quadKey = quadKeyString.split( '' );\n var levelOfDetail = quadKey.length;\n\n for( var i = levelOfDetail; i > 0; i--)\n {\n var mask = 1 << ( i - 1 );\n switch( quadKey[ levelOfDetail - i ] )\n {\n case '0':\n break;\n\n case '1':\n tileX |= mask;\n break;\n\n case '2':\n tileY |= mask;\n break;\n\n case '3':\n tileX |= mask;\n tileY |= mask;\n break;\n\n default:\n return null;\n }\n }\n return { tx:tileX, ty:tileY, zoom:levelOfDetail };\n }", "function map_point(p, q, a, b, x)\r\n{\r\n\tif (p.length != q.length || q.length != x.length)\r\n\t\talert(\"inconsistent dimensions for p, q and x\");\r\n\telse if (a.length != b.length)\r\n\t\talert(\"inconsistent dimensions for a and b\");\r\n\t\r\n\tif (typeof p == \"number\"){\r\n\t\tif (q!=p)\r\n\t\t\tvar alpha = (x-p)/(q-p);\t\t//for scalar values\r\n\t\telse\r\n\t\t\talert(\"Point X is invalid\");\t\t\r\n\t}\r\n\telse\r\n\t\tvar alpha = (x[0] - p[0])/(q[0] - p[0]); \r\n\t\r\n\tif (typeof a == \"number\"){\r\n\t\tvar temp = mix([a,0], [b,0], alpha);\t//for scalar values\r\n\t\treturn temp[0];\r\n\t}\r\n\telse\r\n\t\treturn mix(a, b, alpha); //for vectors\r\n}", "function createkey(x, y) {\n\treturn x + y * 10000000;\n}", "function getLocationKey(block){\n var loc = block.getLocation();\n loc = utils.locationToJSON( loc );\n return loc.world+\".\"+loc.x+\".\"+loc.y+\".\"+loc.z;\n}", "pointLocation(point) {\n let location = 0b0\n\n if (point.x < -this.sizeX) {\n location += 0b1000\n } else if (point.x > this.sizeX) {\n location += 0b0100\n }\n\n if (point.y < -this.sizeY) {\n location += 0b0001\n } else if (point.y > this.sizeY) {\n location += 0b0010\n }\n\n return location\n }", "ishash(x, y) {\n var key = x*this.smul1 + y*this.smul2;\n \n return key;\n }", "function quad(vertices, points, vertex, v1, v2, v3, v4, coordinate){\n if(coordinate == 0)\n {\n\t vertex.push(vec2(0,0));\n\t vertex.push(vec2(1,0));\n\t vertex.push(vec2(1,1));\n\t vertex.push(vec2(0,0));\n\t vertex.push(vec2(1,1));\n\t vertex.push(vec2(0,1));\n\t}\n\telse\n\t{\n\t vertex.push(vec2(0.5-coordinate,0.5-coordinate));\n\t vertex.push(vec2(1.5+coordinate,0.5-coordinate));\n\t vertex.push(vec2(1.5+coordinate,1.5+coordinate));\n\t vertex.push(vec2(0.5-coordinate,0.5-coordinate));\n\t vertex.push(vec2(1.5+coordinate,1.5+coordinate));\n\t vertex.push(vec2(0.5-coordinate,1.5+coordinate));\n\t}\n\t\n\t// push points\n points.push(vertices[v1]);\n points.push(vertices[v3]);\n points.push(vertices[v4]);\n points.push(vertices[v1]);\n points.push(vertices[v4]);\n points.push(vertices[v2]);\n}", "nearestFieldId (point) {\n if (config.optimizedCollisions) {\n // O(1), less accurate:\n return this.voronoiSphere.getNearestId(point)\n }\n // O(logn), accurate:\n return this.kdTree.nearest(point, 1)[0][0].id\n }", "function pointToMapArrIndex(point)\n\t{\t\n\t\tvar size = Math.floor(Math.sqrt(mapArr.length));\n\t\t//size*newY+newX\n\t\treturn (point[1] * size + point[0]);\n\t}", "function mapyst_pointToLatLng(point) {\n\treturn new google.maps.LatLng(point.lat / MILLION, point.lng / MILLION);\n}", "function key (a, b) {\n let cantor = ((a + b) * (a + b + 1) / 2) + a;\n return parseInt(cantor);\n}", "function mapper_make_key(feature) {\n\tvar key = feature[\"lat\"] + \":\" + feature[\"lon\"] + \":\" + feature[\"title\"];\n\treturn key;\n}", "function quadraticCurveTo(point, controlPoint) {\n return \" Q\" + _utils_Math__WEBPACK_IMPORTED_MODULE_0__[\"round\"](controlPoint.x, 4)\n + \",\" + _utils_Math__WEBPACK_IMPORTED_MODULE_0__[\"round\"](controlPoint.y, 4) + \" \" + _utils_Math__WEBPACK_IMPORTED_MODULE_0__[\"round\"](point.x, 4)\n + \",\" + _utils_Math__WEBPACK_IMPORTED_MODULE_0__[\"round\"](point.y, 4);\n}", "function getProjectionPointOnSurface(point) {\n var radius = canvas.width/3; // Jari-jari virtual trackball kita tentukan sebesar 1/3 lebar kanvas\n var center = glMatrix.vec3.fromValues(canvas.width/2, canvas.height/2, 0); // Titik tengah virtual trackball\n var pointVector = glMatrix.vec3.subtract(glMatrix.vec3.create(), point, center);\n pointVector[1] = pointVector[1] * (-1); // Flip nilai y, karena koordinat piksel makin ke bawah makin besar\n var radius2 = radius * radius;\n var length2 = pointVector[0] * pointVector[0] + pointVector[1] * pointVector[1];\n if (length2 <= radius2) pointVector[2] = Math.sqrt(radius2 - length2); // Dapatkan nilai z melalui rumus Pytagoras\n else { // Atur nilai z sebagai 0, lalu x dan y sebagai paduan Pytagoras yang membentuk sisi miring sepanjang radius\n pointVector[0] *= radius / Math.sqrt(length2);\n pointVector[1] *= radius / Math.sqrt(length2);\n pointVector[2] = 0;\n }\n return glMatrix.vec3.normalize(glMatrix.vec3.create(), pointVector);\n }", "function fromMapProjToGps(point) {\n var c = (1E3 * point).toString();\n return c = 0 > point ? \"000\" : 1 > point ? \"00\" + c.substr(0, 1) : 10 > point ? \"0\" + c.substr(0, 2) : c.substr(0, 3)\n}", "round(coord) {\n const node = this.tree.add(coord)\n\n const prevNode = this.tree.prev(node)\n if (prevNode !== null && cmp(node.key, prevNode.key) === 0) {\n this.tree.remove(coord)\n return prevNode.key\n }\n\n const nextNode = this.tree.next(node)\n if (nextNode !== null && cmp(node.key, nextNode.key) === 0) {\n this.tree.remove(coord)\n return nextNode.key\n }\n\n return coord\n }", "async function getVertex(selectedPoint) {\n var url = `${geoserverUrl}/wfs?service=WFS&version=1.0.0&request=GetFeature&typeName=routing:nearest_vertex&outputformat=application/json&viewparams=x:${selectedPoint.lng};y:${selectedPoint.lat};`;\n const response = await fetch(url);\n var data = await response.json();\n var features = await data.features;\n return await features[0].properties.id;\n}", "locationKey(locationKey) {\n return `${locationKey.x},${locationKey.y}`;\n }", "function pointLocation(point, size_x, size_y) {\n var location = 0b0;\n if (point.x < -size_x) {\n location += 0b1000;\n } else if (point.x > size_x) {\n location += 0b0100;\n }\n\n if (point.y < -size_y) {\n location += 0b0001;\n } else if (point.y > size_y) {\n location += 0b0010;\n }\n\n return location;\n}", "putQuadratic(key, value) {\n let hashedIndex = this.hash(key);\n if (this.count > this.MAX) return \"Array Full\";\n\n if (!this.keys[hashedIndex]) {\n this.keys[hashedIndex] = key;\n this.values[hashedIndex] = value;\n } else {\n hashedIndex = this.quadraticProbing(key);\n this.keys[hashedIndex] = key;\n this.values[hashedIndex] = value;\n }\n this.count++;\n }", "function polygonSQL(poly){\n let queryString = 'CREATE TEMPORARY FUNCTION pointInPolygon(latitude FLOAT64, longitude FLOAT64) ';\n queryString += 'RETURNS BOOL LANGUAGE js AS \"\"\" ';\n queryString += 'var polygon=' + JSON.stringify(poly) + ';';\n queryString += 'var vertx = [];';\n queryString += 'var verty = [];';\n queryString += 'var nvert = 0;';\n queryString += 'var testx = longitude;';\n queryString += 'var testy = latitude;';\n queryString += 'for(coord in polygon){';\n queryString += ' vertx[nvert] = polygon[coord][0];';\n queryString += ' verty[nvert] = polygon[coord][1];';\n queryString += ' nvert ++;';\n queryString += '}';\n queryString += 'var i, j, c = 0;';\n queryString += 'for (i = 0, j = nvert-1; i < nvert; j = i++) {';\n queryString += ' if ( ((verty[i]>testy) != (verty[j]>testy)) &&(testx < (vertx[j]-vertx[i]) * (testy-verty[i]) / (verty[j]-verty[i]) + vertx[i]) ){';\n queryString += ' c = !c;';\n queryString += ' }';\n queryString += '}';\n queryString += 'return c;';\n queryString += '\"\"\"; ';\n queryString += 'SELECT latitude, longitude, timestamp ';\n queryString += 'FROM `' + bigQueryProjectId + '.' + datasetId + '.' + tableName + '` ';\n queryString += 'WHERE pointInPolygon(latitude, longitude) = TRUE ';\n queryString += 'LIMIT ' + recordLimit;\n return queryString;\n }", "function findCoordinatesKey(document, customKey) {\r\n var error;\r\n var key;\r\n if (document && typeof document === 'object') {\r\n if (customKey && customKey in document) {\r\n key = customKey;\r\n }\r\n else if ('coordinates' in document) {\r\n key = 'coordinates';\r\n }\r\n else {\r\n error = 'no valid key exists';\r\n }\r\n }\r\n else {\r\n error = 'document not an object';\r\n }\r\n if (key && !validateLocation(document[key], true)) {\r\n error = key + ' is not a valid GeoPoint';\r\n }\r\n if (error) {\r\n throw new Error('Invalid GeoFirestore document: ' + error);\r\n }\r\n return key;\r\n}", "function kPoint(lat, lng) {\n this.lat = parseFloat(lat);\n this.lng = parseFloat(lng);\n\n this.getLat = function () {\n return this.lat;\n }\n this.getLng = function () {\n return this.lng;\n }\n}", "function key(x, y) {\n return x + ',' + y;\n}", "function Get_AngleFromPoint(point)\n{\n\t//calculate angle\n\tvar angle = Math.ceil(Math.atan(Math.abs(point.y) / Math.abs(point.x)) * (180 / Math.PI));\n\t//quad 1 or 4\n\tif (point.x > 0)\n\t{\n\t\t//quad 1 if negative y\n\t\tangle = point.y < 0 ? 90 - angle : 90 + angle;\n\t}\n\telse\n\t{\n\t\t//quad 2 if negative y\n\t\tangle = point.y < 0 ? 270 + angle : 270 - angle;\n\t}\n\t//finally ignore 360\n\tangle = angle % 360;\n\t//return angle\n\treturn angle;\n}", "function mapPoint(P, Q, X, A, B){\n var alpha = (((Q-P)*(Q-P) > 0 ) ? (X - P)/(Q - P) : 0);\n var result;\n if (typeof P == \"number\" && typeof A == \"number\"){\n result = alpha*B + (1 - alpha)*A;\n }\n else{\n result = [];\n for (let i = 0; i < A.length; i++){\n result.push(alpha*B[i] + (1 - alpha)*A[i])\n }\n }\n return result\n}", "function getKey(p) {\n const arr = [\n {\n key: '180',\n distance: 180 - p[1]\n },\n {\n key: '-180',\n distance: Math.abs(-180 - p[1])\n },\n {\n key: '0',\n distance: Math.abs(p[1])\n }\n ];\n return arr.sort(comparator)[0].key;\n}", "get point() {}", "function getQuad(x, y) {\r\n var quad;\r\n if ((x > 0 && x < 450) && (y > 0 && y < 300)) {\r\n quad = 2;\r\n } else if ((x > 0 && x < 450) && (y > 300 && y < 600)) {\r\n quad = 3;\r\n } else if ((x > 450 && x < 898) && (y > 300 && y < 598)) {\r\n quad = 4;\r\n } else {\r\n quad = 1;\r\n }\r\n return quad;\r\n}", "function encodeGeohash(location, precision) {\r\n if (precision === void 0) { precision = GEOHASH_PRECISION; }\r\n validateLocation(location);\r\n if (typeof precision === 'number' && !isNaN(precision)) {\r\n if (precision <= 0) {\r\n throw new Error('precision must be greater than 0');\r\n }\r\n else if (precision > 22) {\r\n throw new Error('precision cannot be greater than 22');\r\n }\r\n else if (Math.round(precision) !== precision) {\r\n throw new Error('precision must be an integer');\r\n }\r\n }\r\n else {\r\n throw new Error('precision must be a number');\r\n }\r\n var latitudeRange = {\r\n min: -90,\r\n max: 90\r\n };\r\n var longitudeRange = {\r\n min: -180,\r\n max: 180\r\n };\r\n var hash = '';\r\n var hashVal = 0;\r\n var bits = 0;\r\n var even = 1;\r\n while (hash.length < precision) {\r\n var val = even ? location.longitude : location.latitude;\r\n var range = even ? longitudeRange : latitudeRange;\r\n var mid = (range.min + range.max) / 2;\r\n if (val > mid) {\r\n hashVal = (hashVal << 1) + 1;\r\n range.min = mid;\r\n }\r\n else {\r\n hashVal = (hashVal << 1) + 0;\r\n range.max = mid;\r\n }\r\n even = !even;\r\n if (bits < 4) {\r\n bits++;\r\n }\r\n else {\r\n bits = 0;\r\n hash += BASE32[hashVal];\r\n hashVal = 0;\r\n }\r\n }\r\n return hash;\r\n}", "function eccEncodeCompressedPoint(keyLength) {\n return function encode(publicKey) {\n /* Precondition: publicKey must be the right length.\n * The format for the public key is [type, ...keyLength, ...keyLength]\n */\n needs_1.needs(publicKey.byteLength === 1 + keyLength * 2, 'Malformed public key.');\n // const type = publicKey[0]\n const x = publicKey.slice(1, keyLength + 1);\n const y = publicKey.slice(keyLength + 1, keyLength * 2 + 1);\n const yOrder = new bn_js_1.default([...y]).mod(new bn_js_1.default(2)).toNumber() + 2;\n const compressPoint = new Uint8Array(1 + x.length);\n compressPoint.set([yOrder], 0);\n compressPoint.set(x, 1);\n return compressPoint;\n };\n}", "function indexAt(point) {\n var row = Math.ceil(Math.floor(point.y/0.75)/2);\n var col = Math.ceil(Math.floor(2*point.x/rt3 - row)/2);\n col = (col % w + w) % w;\n if(row < 0 || row >= h){return undefined}\n return w * row + col;\n }", "function updatePoint(event) {\r\n\r\n ctx.clearRect(0, 0, canvas.width, canvas.height);\r\n //redraw\r\n drawMap();\r\n drawCoord(coord[0], coord[1], \"red\");\r\n\r\n var rect = canvas.getBoundingClientRect();\r\n var xB = event.clientX - rect.left;\r\n var yB = event.clientY - rect.top;\r\n\r\n var inside = inPoly(xB, yB, map);\r\n if (inside == true) {\r\n drawCoord(xB, yB, \"blue\");\r\n\r\n blueCoord[0] = unscaleX(xB);\r\n blueCoord[1] = unscaleY(yB);\r\n\r\n document.getElementById(\"pXY\").innerHTML = \"x = \" + Math.round(blueCoord[0]) + \" y = \" + Math.round(blueCoord[1]);\r\n document.getElementById(\"pXY\").style.color = \"white\";\r\n } else {\r\n drawCoord(xB, yB, \"green\");\r\n document.getElementById(\"pXY\").innerHTML = \"out of bounds\";\r\n document.getElementById(\"pXY\").style.color = \"red\";\r\n }\r\n}", "function pointLatLng( point ) {\n\treturn new GLatLng( point[0], point[1] );\n}", "function key(location, bearing) {\n return location + '@' + bearing;\n }", "prim_lat_dec(s, h, k) {\n\t\t\tif(s) {\n\t\t\t\tlet s_lat = s;\n\t\t\t\tlet s_lng = h.prim_long_dec;\n\t\t\t\tlet p_geom_iri = `${P_GEOM_URI}/point/gnisf.${h.feature_id}`;\n\t\t\t\tlet s_point_wkt = `POINT(${s_lng} ${s_lat})`;\n\t\t\t\tds_geoms.write(`${p_geom_iri}\\tSRID=4326;${s_point_wkt}\\n`);\n\n\t\t\t\t// add wkt literal to geometry node\n\t\t\t\tk.write({\n\t\t\t\t\ttype: 'c3',\n\t\t\t\t\tvalue: {\n\t\t\t\t\t\t[`>${p_geom_iri}`]: {\n\t\t\t\t\t\t\t'geosparql:asWKT': [`^geosparql:wktLiteral\"<http://www.opengis.net/def/crs/OGC/1.3/CRS84>${s_point_wkt}`],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t});\n\n\t\t\t\t// geometry uri\n\t\t\t\treturn {\n\t\t\t\t\t'ago:geometry': [`>${p_geom_iri}`],\n\t\t\t\t};\n\t\t\t}\n\t\t}", "function getmid(tileid,pointidx){\n\tvar x1 = points[ tiles[tileid].pointindexes[(pointidx+tiles[tileid].pointindexes.length-tiles[tileid].offset-1)%tiles[tileid].pointindexes.length] ].coords[0],\n\t\tx2 = points[ tiles[tileid].pointindexes[(pointidx+tiles[tileid].pointindexes.length-tiles[tileid].offset)%tiles[tileid].pointindexes.length] ].coords[0],\n\t\ty1 = points[ tiles[tileid].pointindexes[(pointidx+tiles[tileid].pointindexes.length-tiles[tileid].offset-1)%tiles[tileid].pointindexes.length] ].coords[1],\n\t\ty2 = points[ tiles[tileid].pointindexes[(pointidx+tiles[tileid].pointindexes.length-tiles[tileid].offset)%tiles[tileid].pointindexes.length] ].coords[1];\n\tvar alf = Math.atan2((x2-x1),(y2-y1)), bet = (Math.PI/2-alf) + (Math.PI*54/180), gam = (Math.PI/2-alf) + (Math.PI*126/180);\n\treturn {x:(x2+x1)/2, y:(y2+y1)/2, alfa:alf, beta:bet, gamma:gam};\n}", "function getQuadrant(){\n var ns = \"S\";\n var ew = \"W\";\n var concat;\n\n if(pos.lat > 45.523063){\n ns = \"N\";\n }\n if(pos.lng > -122.667677){\n ew = \"E\";\n }\n concat = ns + ew;\n return concat;\n}", "function DencryptCoords() {}", "function clueMapKey(x, y) {\n return x + '_' + y;\n}", "function getCoords(point) {\n return [Number(point.lat.toFixed(4)), Number(point.lng.toFixed(4))];\n }", "function buildPointInfoString(point) {\n\t\t\tvar infoString = '',\n\t\t\t\thasSpecialKey = false;\n\n\t\t\tfor (var i = 0; i < specialKeys.length; ++i) {\n\t\t\t\tif (point[specialKeys[i]] !== undefined) {\n\t\t\t\t\thasSpecialKey = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If the point has one of the less common properties defined, display all that are defined\n\t\t\tif (hasSpecialKey) {\n\t\t\t\tH.each(commonKeys.concat(specialKeys), function (key) {\n\t\t\t\t\tvar value = point[key];\n\t\t\t\t\tif (value !== undefined) {\n\t\t\t\t\t\tinfoString += (infoString ? '. ' : '') + key + ', ' + value;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\t// Pick and choose properties for a succint label\n\t\t\t\tinfoString = (point.name || point.category || point.id || 'x, ' + point.x) + ', ' +\n\t\t\t\t\t(point.value !== undefined ? point.value : point.y);\n\t\t\t}\n\n\t\t\treturn (point.index + 1) + '. ' + (point.description ? point.description + '. ' : '') + infoString + '.';\n\t\t}", "static keyFor(addr, field) {\n if (!addr || !field) {\n throw new Error('Must provide both addr and field');\n }\n\n return `${addr}-${field}`.replace(/[^a-zA-Z0-9]/g, ''); \n }", "function getSegmentKey(geojsonLinestring) {\n\tvar properties = geojsonLinestring.properties;\n\treturn {\n\t\t\"priority\": properties.priority,\n\t\t\"stress\": properties.stress,\n\t\t\"oneway\": properties.oneway === undefined ? 'no' : properties.oneway,\n\t\t\"unpaved\": properties.unpaved === undefined ? 'no' : properties.unpaved,\n\t\t\"steep\": properties.steep === undefined ? 'no' : properties.steep\n\t};\n}", "static getBarycoord( point, a, b, c, target ) {\n\n\t\t\t_v0$1.subVectors( c, a );\n\t\t\t_v1$3.subVectors( b, a );\n\t\t\t_v2$2.subVectors( point, a );\n\n\t\t\tconst dot00 = _v0$1.dot( _v0$1 );\n\t\t\tconst dot01 = _v0$1.dot( _v1$3 );\n\t\t\tconst dot02 = _v0$1.dot( _v2$2 );\n\t\t\tconst dot11 = _v1$3.dot( _v1$3 );\n\t\t\tconst dot12 = _v1$3.dot( _v2$2 );\n\n\t\t\tconst denom = ( dot00 * dot11 - dot01 * dot01 );\n\n\t\t\t// collinear or singular triangle\n\t\t\tif ( denom === 0 ) {\n\n\t\t\t\t// arbitrary location outside of triangle?\n\t\t\t\t// not sure if this is the best idea, maybe should be returning undefined\n\t\t\t\treturn target.set( - 2, - 1, - 1 );\n\n\t\t\t}\n\n\t\t\tconst invDenom = 1 / denom;\n\t\t\tconst u = ( dot11 * dot02 - dot01 * dot12 ) * invDenom;\n\t\t\tconst v = ( dot00 * dot12 - dot01 * dot02 ) * invDenom;\n\n\t\t\t// barycentric coordinates must always sum to 1\n\t\t\treturn target.set( 1 - u - v, v, u );\n\n\t\t}", "function vertex(point) {\n var lambda = (point[0] * Math.PI) / 180,\n phi = (point[1] * Math.PI) / 180,\n cosPhi = Math.cos(phi);\n return new THREE.Vector3(\n radius * cosPhi * Math.cos(lambda),\n radius * cosPhi * Math.sin(lambda),\n radius * Math.sin(phi)\n );\n }", "function formatPoint(point) {\n var val = Math.round(point * 1000) / 1000;\n return (val < 10) ? \"0\" + val : val;\n}", "static encode(path) {\n let lastLat = 0;\n let lastLng = 0;\n let result = \"\";\n path.forEach(point => {\n const lat = round(point[\"lat\"] * 1e5);\n const lng = round(point[\"lng\"] * 1e5);\n\n const dLat = lat - lastLat;\n const dLng = lng - lastLng;\n result = result + enc(dLat);\n result = result + enc(dLng);\n lastLat = lat;\n lastLng = lng;\n });\n return result;\n }", "contains (point)\n\t{\n\t\tvar halfEdge = this._edge / 2;\n\n\t\t/* Point exceeds the cube in any axis:\n\t\t * ~> |X-Xc| > h\n\t\t * ~> |Y-Yc| > h\n\t\t * ~> |Z-Zc| > h\n\t\t */\n\t\tif ( (point.x < this.center.x - halfEdge) || (point.x > this.center.x + halfEdge) ) return Primitives.VERTEX_OUT;\n\t\tif ( (point.y < this.center.y - halfEdge) || (point.y > this.center.y + halfEdge) ) return Primitives.VERTEX_OUT;\n\t\tif ( (point.z < this.center.z - halfEdge) || (point.z > this.center.z + halfEdge) ) return Primitives.VERTEX_OUT;\n\t\t\n\t\treturn Primitives.VERTEX_ON;\n\t}", "getSumKey(date) {\n if (!this.onBoundary(date)) {\n throw \"Not on proper boundary!\";\n }\n\n return this.aggregateKey + date.toISOString().substr(0, this.strLength);\n }", "function getPoint(x, gf) { return { 'x': x, 'y': gf(x)*-1 }; }", "function showPosition(position){\n document.getElementById(\"requestAddress1\").lat.value = position.coords.latitude;\n document.getElementById(\"requestAddress1\").longi.value = position.coords.longitude;\n ion.sound.play(\"button_click\");\n if (gju.pointInPolygon({\"type\":\"Point\",\"coordinates\":[position.coords.longitude,position.coords.latitude]},\n { \"type\": \"Polygon\", \"coordinates\": [ [ [ -123.1002188, 44.0776585, 0.0 ], [ -123.1005192, 44.0701663, 0.0 ], \n [ -123.10433860000002, 44.0701971, 0.0 ], [ -123.1060553, 44.0709988, 0.0 ], [ -123.112363799999983, 44.0712146, 0.0 ], \n [ -123.1124496, 44.0639374, 0.0 ], [ -123.117299100000011, 44.0639991, 0.0 ], [ -123.117384900000019, 44.0570603, 0.0 ], \n [ -123.118457800000016, 44.0555491, 0.0 ], [ -123.118457800000016, 44.0521255, 0.0 ], [ -123.122792200000021, 44.0522181, 0.0 ], \n [ -123.122921, 44.0478381, 0.0 ], [ -123.127856300000019, 44.047869, 0.0 ], [ -123.1278133, 44.0308088, 0.0 ], \n [ -123.128242500000013, 44.0302225, 0.0 ], [ -123.1299591, 44.0296671, 0.0 ], [ -123.1315899, 44.0296671, 0.0 ], \n [ -123.1321478, 44.0293895, 0.0 ], [ -123.132576900000018, 44.0296054, 0.0 ], [ -123.133993100000012, 44.0296054, 0.0 ], [ -123.134594, 44.0292969, 0.0 ], \n [ -123.134851500000011, 44.0286798, 0.0 ], [ -123.133950199999987, 44.0284638, 0.0 ], [ -123.131504099999987, 44.0289266, 0.0 ], \n [ -123.126268399999987, 44.0285563, 0.0 ], [ -123.1246376, 44.0273221, 0.0 ], [ -123.1178999, 44.0270752, 0.0 ], [ -123.1178999, 44.0236809, 0.0 ], \n [ -123.1172132, 44.021922, 0.0 ], [ -123.1171703, 44.0210888, 0.0 ], [ -123.117857, 44.0201938, 0.0 ], [ -123.1179428, 44.0149165, 0.0 ], \n [ -123.114960199999985, 44.0148085, 0.0 ], [ -123.107686, 44.0157652, 0.0 ], [ -123.1075788, 44.0176787, 0.0 ], [ -123.09257980000001, 44.0177867, 0.0 ], \n [ -123.0926657, 44.0114289, 0.0 ], [ -123.082602, 44.0113209, 0.0 ], [ -123.0749846, 44.0113671, 0.0 ], [ -123.074383699999984, 44.0121079, 0.0 ], \n [ -123.0734396, 44.0122314, 0.0 ], [ -123.0723238, 44.0130647, 0.0 ], [ -123.0724096, 44.014361, 0.0 ], [ -123.071808800000014, 44.0147313, 0.0 ], \n [ -123.072624200000021, 44.0169226, 0.0 ], [ -123.072753, 44.0216442, 0.0 ], [ -123.072238, 44.0216134, 0.0 ], [ -123.0721951, 44.0241129, 0.0 ], \n [ -123.0628395, 44.0240821, 0.0 ], [ -123.059792500000015, 44.0286181, 0.0 ], [ -123.060565, 44.0288649, 0.0 ], [ -123.060865400000012, 44.030346, 0.0 ], \n [ -123.0598783, 44.0311482, 0.0 ], [ -123.0561018, 44.0311173, 0.0 ], [ -123.056016, 44.0285563, 0.0 ], [ -123.0542564, 44.0284329, 0.0 ], \n [ -123.052067799999989, 44.0290809, 0.0 ], [ -123.0519819, 44.031179, 0.0 ], [ -123.0505657, 44.031179, 0.0 ], [ -123.050050700000014, 44.0412059, 0.0 ], \n [ -123.048977900000011, 44.0633515, 0.0 ], [ -123.0482054, 44.0696113, 0.0 ], [ -123.044986699999981, 44.0698271, 0.0 ], [ -123.042154300000021, 44.0706905, 0.0 ], \n [ -123.0421114, 44.0768569, 0.0 ], [ -123.0475187, 44.0768877, 0.0 ], [ -123.04842, 44.0696729, 0.0 ], [ -123.051939, 44.0697963, 0.0 ], \n [ -123.0639982, 44.0695804, 0.0 ], [ -123.0652857, 44.0691796, 0.0 ], [ -123.069577200000012, 44.0697346, 0.0 ], [ -123.0694485, 44.0774735, 0.0 ], [ -123.1002188, 44.0776585, 0.0 ] ] ]}))\n {\n $.getJSON('/_find_address', {\n the_lat: position.coords.latitude,\n the_longi: position.coords.longitude,\n }, function(data) {\n document.getElementById('pickup').value = data.result;\n });\n\n }\n else\n {alert(\"Out of SafeRide Boundary\");}\n}", "function findCoordination(input) {\n\t\t// easy calculation, no need to write code \n}", "static getBarycoord( point, a, b, c, target ) {\n\n\t\t_v0$1.subVectors( c, a );\n\t\t_v1$3.subVectors( b, a );\n\t\t_v2$2.subVectors( point, a );\n\n\t\tconst dot00 = _v0$1.dot( _v0$1 );\n\t\tconst dot01 = _v0$1.dot( _v1$3 );\n\t\tconst dot02 = _v0$1.dot( _v2$2 );\n\t\tconst dot11 = _v1$3.dot( _v1$3 );\n\t\tconst dot12 = _v1$3.dot( _v2$2 );\n\n\t\tconst denom = ( dot00 * dot11 - dot01 * dot01 );\n\n\t\t// collinear or singular triangle\n\t\tif ( denom === 0 ) {\n\n\t\t\t// arbitrary location outside of triangle?\n\t\t\t// not sure if this is the best idea, maybe should be returning undefined\n\t\t\treturn target.set( - 2, - 1, - 1 );\n\n\t\t}\n\n\t\tconst invDenom = 1 / denom;\n\t\tconst u = ( dot11 * dot02 - dot01 * dot12 ) * invDenom;\n\t\tconst v = ( dot00 * dot12 - dot01 * dot02 ) * invDenom;\n\n\t\t// barycentric coordinates must always sum to 1\n\t\treturn target.set( 1 - u - v, v, u );\n\n\t}", "function findQuad(latDD, lonDD)\n{\n\tfor(i = 0; i < dat.data.length; i++)\n\t{\n\t\tif(latDD <= dat.data[i][1] && latDD >= dat.data[i][3] && lonDD <= dat.data[i][2] && lonDD >= dat.data[i][4])\n\t\t{\n\t\t\treturn dat.data[i][0];\n\t\t}\n\t}\n\t\n\treturn \"Location outside the defined area.\";\n\n}", "function buildPointInfoString(point) {\n var commonKeys = ['name', 'id', 'category', 'x', 'value', 'y'],\n specialKeys = ['z', 'open', 'high', 'q3', 'median', 'q1', 'low', 'close'],\n infoString,\n hasSpecialKey = false;\n\n for (var i = 0; i < specialKeys.length; ++i) {\n if (point[specialKeys[i]] !== undefined) {\n hasSpecialKey = true;\n break;\n }\n }\n\n // If the point has one of the less common properties defined, display all that are defined\n if (hasSpecialKey) {\n H.each(commonKeys.concat(specialKeys), function (key) {\n var value = point[key];\n if (value !== undefined) {\n infoString += '. ' + key + ', ' + value;\n }\n });\n } else {\n // Pick and choose properties for a succint label\n infoString = (point.name || point.category || point.id || 'x, ' + point.x) + ', ' +\n (point.value !== undefined ? point.value : point.y);\n }\n\n return (point.index + 1) + '. ' + infoString + (point.description ? '. ' + point.description : '');\n }", "putSign(lat, lon, type, typeName) {\n\n // Get bucket keys for the observation\n var baseLat = Math.floor(lat);\n var baseLon = Math.floor(lon);\n\n // get list of corresponding lat\n if(!latMap.has(baseLat))\n {\n latMap.set(baseLat, new HashMap());\n }\n var lonMap = latMap.get(baseLat);\n\n // get list of corresponding signs\n if(!lonMap.has(baseLon))\n {\n lonMap.set(baseLon, new Array());\n }\n var signList = lonMap.get(baseLon);\n\n // add to sign list if this sign has not yet been observed\n if(!this._checkForDuplicate(lat, lon, type, signList))\n {\n signList.push(new sign(lat, lon, type, typeName));\n this._signCount++;\n }\n\n //console.log(\" ADDED? \", baseLat, baseLon);\n //console.log(latMap.get(baseLat).get(baseLon)[signList.length-1]);\n }", "function findPointByCoords(point)\n{\n for (var i=0; i < points.length; i++)\n if (points[i].getRealX() == point.getRealX() && points[i].getRealY() == point.getRealY())\n return points[i];\n\n return null;\n}", "function pointFpMultiply(k) {\n if(this.isInfinity()) return this;\n if(k.signum() == 0) return this.curve.getInfinity();\n\n // initialize for multiply\n var e = k; // e = k\n var h = e.multiply(new BigInteger(\"3\"));\n var neg = this.negate();\n var R = this;\n\n // initialize for dummy to mitigate timing attack\n var e2 = this.curve.q.subtract(k); // e2 = q - k\n var h2 = e2.multiply(new BigInteger(\"3\"));\n var R2 = new ECPointFp(this.curve, this.x, this.y);\n var neg2 = R2.negate();\n\n // calculate multiply\n var i;\n for(i = h.bitLength() - 2; i > 0; --i) {\n\tR = R.twice();\n\n\tvar hBit = h.testBit(i);\n\tvar eBit = e.testBit(i);\n\n\tif (hBit != eBit) {\n\t R = R.add(hBit ? this : neg);\n\t}\n }\n\n // calculate dummy to mitigate timing attack\n for(i = h2.bitLength() - 2; i > 0; --i) {\n\tR2 = R2.twice();\n\n\tvar h2Bit = h2.testBit(i);\n\tvar e2Bit = e2.testBit(i);\n\n\tif (h2Bit != e2Bit) {\n\t R2 = R2.add(h2Bit ? R2 : neg2);\n\t}\n }\n\n return R;\n}", "function quadIn(t) {\n return t * t;\n}", "function quadIn(t) {\n return t * t;\n}", "function quadIn(t) {\n return t * t;\n}", "function quadIn(t) {\n return t * t;\n}", "function quadIn(t) {\n return t * t;\n}", "function quadIn(t) {\n return t * t;\n}", "function quadIn(t) {\n return t * t;\n}", "function quadIn(t) {\n return t * t;\n}", "function quadIn(t) {\n return t * t;\n}", "function compute_floor_geometry(){quad( 1, 0, 3, 2 );}", "function key(event)\n {\n // Copy the current location\n pathX[1][0] = states[1].x;\n pathY[1][0] = states[1].y;\n current[1] = 0;\n // Change the path to a single point at the current location\n pathX[1].length = 1;\n pathY[1].length = 1;\n // KeyCode = 37 left, 38 up, 39 right, 40 down\n // KeyCode = 65 a, 67 c, 68 d, 69 e, 81 q, 83 s, 87 w, 88 x, 90 z\n let k = event.keyCode;\n // Prevent up, down, left, right keys from move the whole page up, down, left, right\n if ((k > 36 && k < 41) || (k > 64 && k < 91)) event.preventDefault();\n // Move the QuadCopter up, down, left, right according to the key\n if (k == 37 || k == 81 || k == 65 || k == 90) pathX[1][0] -= frontSpeed;\n if (k == 38 || k == 81 || k == 87 || k == 69) pathY[1][0] -= frontSpeed;\n if (k == 39 || k == 69 || k == 68 || k == 67) pathX[1][0] += frontSpeed;\n if (k == 40 || k == 83 || k == 90 || k == 88 || k == 67) pathY[1][0] += frontSpeed;\n // Change the QuadCopter angle according to the key\n if (k == 37 || k == 65 || k == 39 || k == 68) changeAngle[1] = states[1].r - Math.PI;\n else if (k == 38 || k == 87 || k == 40 || k == 83 || k == 88) changeAngle[1] = states[1].r - 0.5 * Math.PI;\n else if (k == 81 || k == 67) changeAngle[1] = states[1].r - 0.25 * Math.PI;\n else if (k == 69 || k == 90) changeAngle[1] = states[1].r - 0.75 * Math.PI;\n changeAngle[1] = angle(changeAngle[1]);\n }", "function search(panoId, param) {\n if (panoId in _pointClouds && getPointCloud(panoId)){\n var pc = getPointCloud(panoId);\n\n // kd-tree. It's slooooooow. I'll try Three.js later.\n // https://github.com/ubilabs/kd-tree-javascript\n //var point = pc.tree.nearest({x: param.x, y: param.y, z: param.z}, 1, 100);\n var point = pc.tree.nearest({x: param.x, y: param.y, z: param.z}, 1, 40);\n if (point && point[0]) {\n var idx = point[0][0].id;\n return idx;\n //var ix = idx / 3 % w;\n //var iy = (idx / 3 - ix) / w;\n //return {ix: ix, iy: iy};\n }\n }\n return null;\n }", "function distsq(x, y) {\n var dx = tv4.x - x;\n var dy = tv4.y - y;\n return dx*dx + dy*dy;\n }", "function Contains(polygon, point) { \n var j=0; \n var oddNodes = false; \n var x = point.lng(); \n var y = point.lat(); \n for (var i=0; i < polygon.getPath().getLength(); i++) { \n j++; \n if (j == polygon.getPath().getLength()) {j = 0;} \n if (((polygon.getPath().getAt(i).lat() < y) && (polygon.getPath().getAt(j).lat() >= y)) || ((polygon.getPath().getAt(j).lat() < y) && (polygon.getPath().getAt(i).lat() >= y))) { \n if ( polygon.getPath().getAt(i).lng() + (y - polygon.getPath().getAt(i).lat()) / (polygon.getPath().getAt(j).lat()-polygon.getPath().getAt(i).lat()) * (polygon.getPath().getAt(j).lng() - polygon.getPath().getAt(i).lng())<x ) { \n oddNodes = !oddNodes; \n } \n } \n } \n return oddNodes; \n }", "static getBarycoord(point, a, b, c, target) {\n _v0.subVectors(c, a);\n _v1.subVectors(b, a);\n _v2.subVectors(point, a);\n\n const dot00 = _v0.dot(_v0);\n const dot01 = _v0.dot(_v1);\n const dot02 = _v0.dot(_v2);\n const dot11 = _v1.dot(_v1);\n const dot12 = _v1.dot(_v2);\n\n const denom = dot00 * dot11 - dot01 * dot01;\n\n if (target === undefined) {\n console.warn('THREE.Triangle: .getBarycoord() target is now required');\n target = new Vector3();\n }\n\n // collinear or singular triangle\n if (denom === 0) {\n // arbitrary location outside of triangle?\n // not sure if this is the best idea, maybe should be returning undefined\n return target.set(-2, -1, -1);\n }\n\n const invDenom = 1 / denom;\n const u = (dot11 * dot02 - dot01 * dot12) * invDenom;\n const v = (dot00 * dot12 - dot01 * dot02) * invDenom;\n\n // barycentric coordinates must always sum to 1\n return target.set(1 - u - v, v, u);\n }", "function mulMatrixPoint(matrix, point)\n{\n return new THREE.Vector3(\n matrix.elements[0]*point.x + matrix.elements[4]*point.y + matrix.elements[8]*point.z + matrix.elements[12],\n matrix.elements[1]*point.x + matrix.elements[5]*point.y + matrix.elements[9]*point.z + matrix.elements[13],\n matrix.elements[2]*point.x + matrix.elements[6]*point.y + matrix.elements[10]*point.z + matrix.elements[14]\n );\n}", "function getCountryPointBelongsTo(point){\n var countries=$scope.countriesJSON[\"countries\"];\n for (var countryIndex=0; countryIndex<countries.length; countryIndex++){\n var country = countries[countryIndex];\n \n if (countryContainsPoint(point, country)){\n return country;\n }\n }\n return null;\n }", "function findPixelPoint(scale, originLonglat, pointInPexel, rotationAngle) {\r\n console.log({pointInPexel})\r\n var pointInPexelToLongLat = [originLonglat[0]+(Number(pointInPexel[0])*scale[0]),originLonglat[1]+(Number(pointInPexel[1])*scale[1])]\r\n var newPoint = rotate(originLonglat[0], originLonglat[1], pointInPexelToLongLat[0], pointInPexelToLongLat[1], rotationAngle)\r\n console.log({newPoint})\r\n return [newPoint[0], newPoint[1]]\r\n }", "function drawPoint(canvasContext,point,dp){var i,x,y,a,b;i=point*2;x=meanShape[i/2][0];y=meanShape[i/2][1];for(var j=0;j<numParameters;j++){x+=model.shapeModel.eigenVectors[i][j]*dp[j+4];y+=model.shapeModel.eigenVectors[i+1][j]*dp[j+4];}a=dp[0]*x-dp[1]*y+dp[2];b=dp[0]*y+dp[1]*x+dp[3];x+=a;y+=b;canvasContext.beginPath();canvasContext.arc(x,y,1,0,Math.PI*2,true);canvasContext.closePath();canvasContext.fill();}", "function countryContainsPoint(point, country){\n var areas=country[\"areas\"];\n var into = 0;\n for (var areaIndex=0; areaIndex < areas.length; areaIndex++){\n var area=areas[areaIndex];\n var points = area[\"points\"];\n var belongs = canvasService.pointBelongsTo(point, points);\n \n if (belongs == 1){\n if (area[\"substract\"] == 1){\n into = 0;\n break;\n }else{\n into = 1;\n }\n }\n }\n return into;\n }", "function distanceTwoPoints(point){\n var origin = new google.maps.LatLng(roomCoordinates.lat, roomCoordinates.lng);\n return (google.maps.geometry.spherical.computeDistanceBetween(origin, point) / 1000); //dividing by 1000 to get Kilometers\n }", "function samePoint(p, q) {\n return p.x === q.x && p.y === q.y;\n}", "function quadrante(y,x){\n // by Salvatore Ruiu Irgoli-Sardegna (Italy) dicembre 2009\n // funzione per l'individuazione del quadrante corretto della tangente.\n // y e x variabili numeriche.\n // Math.abs restituisce il valore assoluto di un numero.\n\n var alfa=Math.abs(Math.atan(y/x));\n\n alfa=alfa*180/Math.PI;\n\n\n if (x>0 && y>0){ alfa=alfa;}\n else if (x<0 && y>0){ alfa=180-alfa;}\n else if (x<0 && y<0){ alfa=180+alfa;}\n else if (x>0 && y<0){ alfa=360-alfa;}\n\n return alfa; // valore angolo in gradi sessadecimali.\n\n}", "function buildVertexObj(vertexObj, pt, polyrank){\n let ptstrng = pt[0].toString()+\",\"+pt[1].toString();\n if (ptstrng in vertexObj){\n vertexObj[ptstrng]+= polyrank;\n \n }\n else{\n vertexObj[ptstrng] = polyrank;\n }\n }", "function quad(a, b, c, d) \n{\n\n\n var indices = [ a, b, c, a, c, d ];\n\n for ( var i = 0; i < indices.length; ++i ) {\n points.push( vertices[indices[i] + v0] );\n // for solid colored faces use\n colors.push(vertexColors[a + v0]); //** CORRECTED\n }\n\n numPoints += indices.length;\n //console.log(\" \");\n //console.log(numPoints);\n //console.log(points.length);\n}", "function sortQuadPoints(points) {\n const center = quadCenter(points);\n points.sort((p1, p2) => {\n const v1 = vectorDiff(p1, center);\n const v2 = vectorDiff(p2, center);\n const a1 = vectorRotationAngle({ x: -1, y: 0 }, v1);\n const a2 = vectorRotationAngle({ x: -1, y: 0 }, v2);\n return a1 - a2;\n });\n return points;\n}", "function lineTo(point) {\n return \" L\" + _utils_Math__WEBPACK_IMPORTED_MODULE_0__[\"round\"](point.x, 4) + \",\" + _utils_Math__WEBPACK_IMPORTED_MODULE_0__[\"round\"](point.y, 4) + \" \";\n}", "function mapClick(event)\n{\n if(drawMode == pointMode)\n {\n if(marker != null)\n marker.setMap(null);\n marker = new google.maps.Marker({position:event.latLng, map:map});\n marker.setMap(map);\n $('#property-latlon').val(event.latLng.lat() + ' ' + event.latLng.lng());\n $('#lat').val(event.latLng.lat());\n $('#lon').val(event.latLng.lng());\n }\n else //Assume boundMode\n {\n if(polygon == null)\n makeBoundPolygon();\n\n polygon.getPath().push(event.latLng);\n\n //Form data value\n var val = $('#property-bound').val();\n if(val != '')\n val = val + ',';\n val = val + event.latLng.lat() + ' ' + event.latLng.lng();\n $('#property-bound').val(val);\n }\n}", "function pointFromCompressedBn(curve, x, sy ) {\n let X, Y, alpha, beta, modulus_div_four;\n let modulus = curve.field.modulus;\n if ( ! ( modulus.limbs[0] & 1 ) ) {\n // the math is different for F_p v. F_(2^M)\n throw \"Points on Curves over F_(2^M) not implemented\";\n }\n\n X = x;\n alpha = X.mul(curve.a.add(X.square())).addM(curve.b).mod(modulus);\n modulus_div_four = modulus.add( 1 ).normalize().halveM().halveM();\n\n beta = alpha.powermod( modulus_div_four, modulus );\n\n let sbeta = beta.limbs[0] & 1;\n\n if ( sbeta == sy ) {\n Y = beta;\n } else {\n Y = modulus.sub( beta ).normalize();\n }\n\n let p = new sjcl.ecc.point(curve, X, Y);\n if (!p.isValid()) {\n throw new sjcl.exception.corrupt(\"not on the curve!\");\n }\n return p;\n}", "function hashPartKey(key) {\n\n if (typeof (key) === 'undefined' || (!typeof (key) === 'string' && !typeof (key) === 'number')) {\n return;\n }\n key = key.toString();\n\n if (key === '') {\n return;\n }\n\n let firstDigit = key[0];\n let lastDigit = key[key.length - 1];\n\n return firstDigit + 'xxxxx' + lastDigit;\n}", "function ge_add(P, Q) {\n var uP = [gf(), gf(), gf(), gf()],\n uQ = [gf(), gf(), gf(), gf()],\n res = new Uint8Array(32);\n ge_neg(P);\n ge_neg(Q);\n if (unpackneg(uP, P) !== 0) throw \"non-0 error on point decode\";\n if (unpackneg(uQ, Q) !== 0) throw \"non-0 error on point decode\";\n add(uP, uQ);\n pack(res, uP);\n return res;\n}", "function geoFirestoreGetKey(snapshot) {\r\n var id;\r\n if (typeof snapshot.id === 'string' || snapshot.id === null) {\r\n id = snapshot.id;\r\n }\r\n return id;\r\n}" ]
[ "0.5835798", "0.57781154", "0.57781154", "0.56111366", "0.55796146", "0.5552593", "0.5474579", "0.54660785", "0.52860177", "0.52860177", "0.5278514", "0.51965135", "0.51932204", "0.51521134", "0.51271904", "0.5105125", "0.50668883", "0.5062905", "0.50373286", "0.5035259", "0.50227815", "0.500864", "0.5003037", "0.49855283", "0.4983495", "0.4966507", "0.4960469", "0.49526805", "0.49349433", "0.4930972", "0.49180102", "0.49097267", "0.49011788", "0.48947263", "0.48903105", "0.4864575", "0.48559618", "0.48525563", "0.48319018", "0.48145705", "0.4811526", "0.4801402", "0.47905833", "0.47788748", "0.47642565", "0.47594222", "0.47356075", "0.47235733", "0.47003543", "0.46985042", "0.46831298", "0.46818656", "0.46771863", "0.46740282", "0.4673429", "0.467022", "0.46626046", "0.4656874", "0.46529603", "0.46494293", "0.46418577", "0.46380723", "0.46339932", "0.46152037", "0.46098372", "0.4608282", "0.46072578", "0.45935556", "0.45924258", "0.45924258", "0.45924258", "0.45924258", "0.45924258", "0.45924258", "0.45924258", "0.45924258", "0.45924258", "0.45867696", "0.45796615", "0.4578464", "0.45761842", "0.45752987", "0.45656544", "0.45347807", "0.45320636", "0.45286116", "0.45255044", "0.4516525", "0.4504997", "0.45007277", "0.44984952", "0.44929442", "0.4490199", "0.44852442", "0.44825846", "0.44683737", "0.44631532", "0.44619948", "0.44619027", "0.4459333" ]
0.76186514
0
given quadkey and bounds, returns the format as required by the Ingress API to request map data.
function generateBoundsParams(quadkey, bounds) { return { id: quadkey, qk: quadkey, minLatE6: Math.round(bounds.sw.lat * 1E6), minLngE6: Math.round(bounds.sw.lng * 1E6), maxLatE6: Math.round(bounds.ne.lat * 1E6), maxLngE6: Math.round(bounds.ne.lng * 1E6) }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function encodeBounds(bounds) {\n\tconst southwest = bounds.southwest;\n\tconst northeast = bounds.northeast;\n\treturn `${encodeURIComponent(southwest.lat)},${encodeURIComponent(southwest.lng)}|${encodeURIComponent(northeast.lat)},${encodeURIComponent(northeast.lng)}`;\n}", "function serializeBounds (bounds) {\n var\n sw = bounds.getSouthWest(),\n ne = bounds.getNorthEast();\n return [sw.lat(), sw.lng(), ne.lat(), ne.lng()].join(',');\n }", "function getBoundParams(){\n var bounds = map.getBounds(),\n padding = .00;\n console.log(bounds);\n return { neLat: (bounds._northEast.lat + padding).toFixed(6),\n neLon: (bounds._northEast.lng + padding).toFixed(6),\n swLat: (bounds._southWest.lat - padding).toFixed(6),\n swLon: (bounds._southWest.lng - padding).toFixed(6)\n }\n }", "function boundForTwitter(mapBounds) {\n var bounds = mapBounds.toUrlValue().split(',');\n return [bounds[1], bounds[0], bounds[3], bounds[2]].join(',');\n }", "function quadKeyToTileXY( quadKeyString )\n {\n var tileX = 0;\n var tileY = 0;\n var quadKey = quadKeyString.split( '' );\n var levelOfDetail = quadKey.length;\n\n for( var i = levelOfDetail; i > 0; i--)\n {\n var mask = 1 << ( i - 1 );\n switch( quadKey[ levelOfDetail - i ] )\n {\n case '0':\n break;\n\n case '1':\n tileX |= mask;\n break;\n\n case '2':\n tileY |= mask;\n break;\n\n case '3':\n tileX |= mask;\n tileY |= mask;\n break;\n\n default:\n return null;\n }\n }\n return { tx:tileX, ty:tileY, zoom:levelOfDetail };\n }", "function quadKeyToTileXY( quadKeyString )\n {\n var tileX = 0;\n var tileY = 0;\n var quadKey = quadKeyString.split( '' );\n var levelOfDetail = quadKey.length;\n\n for( var i = levelOfDetail; i > 0; i--)\n {\n var mask = 1 << ( i - 1 );\n switch( quadKey[ levelOfDetail - i ] )\n {\n case '0':\n break;\n\n case '1':\n tileX |= mask;\n break;\n\n case '2':\n tileY |= mask;\n break;\n\n case '3':\n tileX |= mask;\n tileY |= mask;\n break;\n\n default:\n return null;\n }\n }\n return { tx:tileX, ty:tileY, zoom:levelOfDetail };\n }", "get boundsValue() {}", "function sendBoundsMessage() {\n var bounds = twitter_geomap.map.map.getBounds();\n var sw = {}\n var ne = {}\n sw.lat = bounds.getSouthWest().lat();\n sw.lon = bounds.getSouthWest().lng();\n ne.lat = bounds.getNorthEast().lat();\n ne.lon = bounds.getNorthEast().lng();\n var msg = {}\n msg.bounds = {\"southWest\": sw, \"northEast\": ne}\n // put in a placeholder value just to pass parsing and keep the message format the same\n msg.tile = {\"level\":10,\"xIndex\":321,\"yIndex\":541}\n console.log(\"bounds to send: \",msg)\n OWF.Eventing.publish(\"map.view.center.bounds\",JSON.stringify(msg))\n}", "function createQuad(bounds) {\n const positions = new Float64Array(12);\n // [[minX, minY], [minX, maxY], [maxX, maxY], [maxX, minY]]\n for (let i = 0; i < bounds.length; i++) {\n positions[i * 3 + 0] = bounds[i][0];\n positions[i * 3 + 1] = bounds[i][1];\n positions[i * 3 + 2] = bounds[i][2] || 0;\n }\n\n return {\n vertexCount: 6,\n positions,\n indices: DEFAULT_INDICES,\n texCoords: DEFAULT_TEX_COORDS,\n };\n}", "function get_bounds(){\n\t\t\t\t\n\t\t\t\treturn {\n\t\t\t\t\t\n\t\t\t\t\tsw_lat : map.getBounds().getSouthWest().lat(),\n\t\t\t\t\t\n\t\t\t\t\tsw_lng : map.getBounds().getSouthWest().lng(),\n\t\t\t\t\t\n\t\t\t\t\tne_lat : map.getBounds().getNorthEast().lat(),\n\t\t\t\t\t\n\t\t\t\t\tne_lng : map.getBounds().getNorthEast().lng()\n\t\t\t\t\n\t\t\t\t};\n\t\t\t\n\t\t\t}", "function boundsToExtent (bounds) {\n bounds = leaflet.latLngBounds(bounds);\n return {\n 'xmin': bounds.getSouthWest().lng,\n 'ymin': bounds.getSouthWest().lat,\n 'xmax': bounds.getNorthEast().lng,\n 'ymax': bounds.getNorthEast().lat,\n 'spatialReference': {\n 'wkid': 4326\n }\n };\n}", "function fitBounds(width, height, _bounds, options) {\n var bounds = new _mapboxGl.LngLatBounds([_bounds[0].reverse(), _bounds[1].reverse()]);\n options = options || {};\n var padding = typeof options.padding === 'undefined' ? 0 : options.padding;\n var offset = _mapboxGl.Point.convert([0, 0]);\n var tr = new _transform2.default();\n tr.width = width;\n tr.height = height;\n var nw = tr.project(bounds.getNorthWest());\n var se = tr.project(bounds.getSouthEast());\n var size = se.sub(nw);\n var scaleX = (tr.width - padding * 2 - Math.abs(offset.x) * 2) / size.x;\n var scaleY = (tr.height - padding * 2 - Math.abs(offset.y) * 2) / size.y;\n\n var center = tr.unproject(nw.add(se).div(2));\n var zoom = tr.scaleZoom(tr.scale * Math.min(scaleX, scaleY));\n return {\n latitude: center.lat,\n longitude: center.lng,\n zoom: zoom\n };\n}", "function boundsToExtent (bounds) {\r\n bounds = Object(leaflet__WEBPACK_IMPORTED_MODULE_0__[\"latLngBounds\"])(bounds);\r\n return {\r\n 'xmin': bounds.getSouthWest().lng,\r\n 'ymin': bounds.getSouthWest().lat,\r\n 'xmax': bounds.getNorthEast().lng,\r\n 'ymax': bounds.getNorthEast().lat,\r\n 'spatialReference': {\r\n 'wkid': 4326\r\n }\r\n };\r\n}", "function pointToQuadKey(x, y, zoom) {\n\treturn zoom + \"_\" + x + \"_\" + y;;\n//\tvar quadkey = [];\n//\tfor(var c = zoom; c > 0; c--) {\n//\t\t// +-------+ quadrants are probably ordered like this\n//\t\t// | 0 | 1 |\n//\t\t// |---|---|\n//\t\t// | 2 | 3 |\n//\t\t// |---|---|\n//\t\tvar quadrant = 0;\n//\t\tvar e = 1 << c - 1;\n//\t\t(x & e) != 0 && quadrant++; // push right\n//\t\t(y & e) != 0 && (quadrant++, quadrant++); // push down\n//\t\tquadkey.push(quadrant);\n//\t}\n//\treturn quadkey.join(\"\");\n}", "function queryFloodMap(bounds) {\n\n floodZoneService.query()\n .intersects(bounds)\n .fields(['OBJECTID', 'FLD_ZONE', 'SFHA_TF'])\n .where(\"SHAPE.AREA >= '.000001'\")\n .where(\"NOT ZONE_SUBTY = 'AREA OF MINIMAL FLOOD HAZARD'\")\n .precision(4)\n .simplify(map, 0.25)\n .run(function (error, featureCollection, response) {\n\n makeMap(featureCollection);\n })\n }", "function rectangleQuery(layer) {\n let rectangle = layer.getLatLngs();\n let maxLon = rectangle[0][0].lng;\n let maxLat = rectangle[0][0].lat;\n let minLon = rectangle[0][2].lng;\n let minLat = rectangle[0][2].lat;\n // Creates a request URL for the API\n reqURL = '/api/byrectangle';\n if (rectangle) {\n reqURL += '?minLon=' + minLon + '&minLat=' + minLat + '&maxLon=' + maxLon + '&maxLat=' + maxLat;\n }\n return reqURL;\n }", "get bounds() {}", "function getBounds(bounds){\n\t var bbox = [];\n\t\n\t bbox.push(parseFloat(bounds.attrib[\"minlon\"]));\n\t bbox.push(parseFloat(bounds.attrib[\"minlat\"]));\n\t bbox.push(parseFloat(bounds.attrib[\"maxlon\"]));\n\t bbox.push(parseFloat(bounds.attrib[\"maxlat\"]));\n\t\n\t return bbox;\n\t}", "function getLngBoundsForSingleCoordinate(a){var b=a[0]-PADDING<GEO_BOUNDS.LNG_MIN?GEO_BOUNDS.LNG_MIN:a[0]-PADDING,c=a[1]+PADDING>GEO_BOUNDS.LNG_MAX?GEO_BOUNDS.LNG_MAX:a[1]+PADDING;return[b,c]}", "function getLngBoundsForSingleCoordinate(a){var b=a[0]-PADDING<GEO_BOUNDS.LNG_MIN?GEO_BOUNDS.LNG_MIN:a[0]-PADDING,c=a[1]+PADDING>GEO_BOUNDS.LNG_MAX?GEO_BOUNDS.LNG_MAX:a[1]+PADDING;return[b,c]}", "function plotMapWeight(r_bounds, data) {\n\tvar color = ratioToRGB(data[\"counts\"]);\n\tvar rectangleOptions = {\n\t\tstrokeColor: color,\n\t\tstrokeOpacity: 0.35,\n\t\tstrokeWeight: 2,\n\t\tfillColor: color,\n\t\tfillOpacity: 0.35,\n\t\tmap: map,\n\t\tbounds: r_bounds\n\t};\n\tvar rectangle = new google.maps.Rectangle(rectangleOptions);\n\treturn rectangle;\n}", "function rectangleQuery(latLngBounds){\n let queryString = rectangleSQL(latLngBounds.getNorthEast(), latLngBounds.getSouthWest());\n sendQuery(queryString);\n }", "function xyz_getTileURL(bounds) {\n\tvar res = this.map.getResolution();\n\tvar x = Math.round((bounds.left - this.maxExtent.left) / (res * this.tileSize.w));\n\tvar y = Math.round((this.maxExtent.top - bounds.top) / (res * this.tileSize.h));\n\tvar z = this.map.getZoom();\n\t\n\tif (this.map.baseLayer.name == 'Bing Roads' || this.map.baseLayer.name == 'Bing Aerial' || this.map.baseLayer.name == 'Bing Aerial With Labels') {\n\t z = z + 1;\n\t}\n\t\n\tvar limit = Math.pow(2, z);\n\tconsole.log(\"xyz: \"+ this.url + z + \"/\" + x + \"/\" + y + \".\" + this.type);\n\t x = ((x % limit) + limit) % limit;\n\t y = Math.pow(2,z) - y - 1;\n\t return this.url + z + \"/\" + x + \"/\" + y + \".\" + this.type;\n}", "function getLocations(bounds) {\n\n const url = \"/api/v1/stores?lat1=\" + bounds.getNorthEast().lat() + \"&lat2=\"\n + bounds.getSouthWest().lat() + \"&lng1=\" + bounds.getNorthEast().lng()\n + \"&lng2=\" + bounds.getSouthWest().lng();\n\n // Query the backend to refresh results.\n $.getJSON(url, updateView);\n}", "function tileXYToQuadKey( tx,ty,zoom )\n {\n var quadKey = '';\n for ( var i = zoom; i > 0; i-- )\n {\n var digit = 0;\n var mask = 1 << ( i - 1 );\n if( ( tx & mask ) != 0 )\n {\n digit++;\n }\n if( ( ty & mask ) != 0 )\n {\n digit++;\n digit++;\n }\n quadKey += digit;\n }\n return quadKey;\n }", "function tileXYToQuadKey( tx,ty,zoom )\n {\n var quadKey = '';\n for ( var i = zoom; i > 0; i-- )\n {\n var digit = 0;\n var mask = 1 << ( i - 1 );\n if( ( tx & mask ) != 0 )\n {\n digit++;\n }\n if( ( ty & mask ) != 0 )\n {\n digit++;\n digit++;\n }\n quadKey += digit;\n }\n return quadKey;\n }", "function drawBounds(bounds) {\n var boundsGroup = doc.groupItems.add();\n boundsGroup.name = \"BOUNDS\";\n var topLeft = drawBoundMark([\n [bounds[0], bounds[1] - 10],\n [bounds[0], bounds[1]],\n [bounds[0] + 10, bounds[1]],\n ]);\n topLeft.moveToEnd(boundsGroup);\n var topRight = drawBoundMark([\n [bounds[2], bounds[1] - 10],\n [bounds[2], bounds[1]],\n [bounds[2] - 10, bounds[1]],\n ]);\n topRight.moveToEnd(boundsGroup);\n var bottomLeft = drawBoundMark([\n [bounds[0], bounds[3] + 10],\n [bounds[0], bounds[3]],\n [bounds[0] + 10, bounds[3]],\n ]);\n bottomLeft.moveToEnd(boundsGroup);\n var bottomRight = drawBoundMark([\n [bounds[2], bounds[3] + 10],\n [bounds[2], bounds[3]],\n [bounds[2] - 10, bounds[3]],\n ]);\n bottomRight.moveToEnd(boundsGroup);\n}", "function getScale(bounds) {\n\t return Math.min(\n\t scale0 * geoWidth / (bounds[1][0] - bounds[0][0]),\n\t scale0 * geoHeight / (bounds[1][1] - bounds[0][1])\n\t );\n\t }", "function getScale(bounds) {\n\t return Math.min(\n\t scale0 * geoWidth / (bounds[1][0] - bounds[0][0]),\n\t scale0 * geoHeight / (bounds[1][1] - bounds[0][1])\n\t );\n\t }", "_tileBoundsFromWGS84(boundsWGS84) {\n var sw = this._layer._world.latLonToPoint(LatLon(boundsWGS84[1], boundsWGS84[0]));\n var ne = this._layer._world.latLonToPoint(LatLon(boundsWGS84[3], boundsWGS84[2]));\n\n return [sw.x, sw.y, ne.x, ne.y];\n }", "function toLatLngBounds(mixed) {\n var ne, sw;\n if (!mixed || mixed instanceof gm.LatLngBounds) {\n return mixed || null;\n }\n if (isArray(mixed)) {\n if (mixed.length === 2) {\n ne = toLatLng(mixed[0]);\n sw = toLatLng(mixed[1]);\n } else if (mixed.length === 4) {\n ne = toLatLng([mixed[0], mixed[1]]);\n sw = toLatLng([mixed[2], mixed[3]]);\n }\n } else {\n if ((\"ne\" in mixed) && (\"sw\" in mixed)) {\n ne = toLatLng(mixed.ne);\n sw = toLatLng(mixed.sw);\n } else if ((\"n\" in mixed) && (\"e\" in mixed) && (\"s\" in mixed) && (\"w\" in mixed)) {\n ne = toLatLng([mixed.n, mixed.e]);\n sw = toLatLng([mixed.s, mixed.w]);\n }\n }\n if (ne && sw) {\n return new gm.LatLngBounds(sw, ne);\n }\n return null;\n}", "function toLatLngBounds(mixed) {\n var ne, sw;\n if (!mixed || mixed instanceof gm.LatLngBounds) {\n return mixed || null;\n }\n if (isArray(mixed)) {\n if (mixed.length === 2) {\n ne = toLatLng(mixed[0]);\n sw = toLatLng(mixed[1]);\n } else if (mixed.length === 4) {\n ne = toLatLng([mixed[0], mixed[1]]);\n sw = toLatLng([mixed[2], mixed[3]]);\n }\n } else {\n if ((\"ne\" in mixed) && (\"sw\" in mixed)) {\n ne = toLatLng(mixed.ne);\n sw = toLatLng(mixed.sw);\n } else if ((\"n\" in mixed) && (\"e\" in mixed) && (\"s\" in mixed) && (\"w\" in mixed)) {\n ne = toLatLng([mixed.n, mixed.e]);\n sw = toLatLng([mixed.s, mixed.w]);\n }\n }\n if (ne && sw) {\n return new gm.LatLngBounds(sw, ne);\n }\n return null;\n}", "function toLatLngBounds(mixed) {\n var ne, sw;\n if (!mixed || mixed instanceof gm.LatLngBounds) {\n return mixed || null;\n }\n if (isArray(mixed)) {\n if (mixed.length === 2) {\n ne = toLatLng(mixed[0]);\n sw = toLatLng(mixed[1]);\n } else if (mixed.length === 4) {\n ne = toLatLng([mixed[0], mixed[1]]);\n sw = toLatLng([mixed[2], mixed[3]]);\n }\n } else {\n if ((\"ne\" in mixed) && (\"sw\" in mixed)) {\n ne = toLatLng(mixed.ne);\n sw = toLatLng(mixed.sw);\n } else if ((\"n\" in mixed) && (\"e\" in mixed) && (\"s\" in mixed) && (\"w\" in mixed)) {\n ne = toLatLng([mixed.n, mixed.e]);\n sw = toLatLng([mixed.s, mixed.w]);\n }\n }\n if (ne && sw) {\n return new gm.LatLngBounds(sw, ne);\n }\n return null;\n}", "static serializeQuad(quad) {\n return NQuads.serializeQuadComponents(quad.subject, quad.predicate, quad.object, quad.graph);\n }", "set bounds(value) {}", "function boundsFiltering(val,bounds){\n return bounds.contains([val.lat,val.lng]);\n }", "function getTweetsSearchQueryParameters(bounds) {\n\n // get keyword and time range\n var reqParamsUi = this.getSearchObj(),\n keyword;\n\n if (reqParamsUi.searchText.length === 0){\n keyword = '*';\n } else {\n keyword = reqParamsUi.searchText;\n }\n\n var params = {\n \"q.text\": keyword,\n \"q.time\": '[' + this.getFormattedDateString(reqParamsUi.minDate) + ' TO ' + this.getFormattedDateString(reqParamsUi.maxDate) + ']',\n \"q.geo\": '[' + bounds.minX + ',' + bounds.minY + ' TO ' + bounds.maxX + ',' + bounds.maxY + ']',\n \"a.hm.limit\": 1000\n };\n\n return params;\n }", "function validateMapQuery(mapReq){\n\t//check query_layers\n\tif(mapReq.query_layers[0] == ''){\n\t\treturn 'EmptyQueryLayers';\n\t}\n\tfor(var layer in mapReq.query_layers){\n\t\tif(mapReq.layers.indexOf(mapReq.query_layers[layer]) == -1){\n\t\t\treturn 'InvalidQueryLayers';\n\t\t}\n\t}\n\n\t//check info_format\n\tif(mapReq.info_format == ''){\n\t\treturn 'EmptyInfoFormat';\n\t}\n\tif(config.supportedInfoFormats.indexOf(mapReq.info_format) == -1){\n\t\treturn 'InvalidInfoFormat';\n\t}\n\n\t//check i, j coordinates\n\tif(mapReq.i < 0 || mapReq.i < 0 || mapReq.i > mapReq.width || mapReq.j > mapReq.height)\n\t{\n\t\treturn 'InvalidImageCoordinates';\n\t}\n\n\treturn null;\n}", "function getMapData() {\n return {\n bounds: map.getBounds().toArray(),\n center: [map.getCenter().lng, map.getCenter().lat],\n zoom: map.getZoom(),\n }\n }", "function getMapBounds(){\n\tvar bounds = myMap.getBounds();\n\tvar nWlat = bounds.getNorthWest().lat;\n\tvar nWlon = bounds.getNorthWest().lng;\n\tvar sElat = bounds.getSouthEast().lat;\n\tvar sElon = bounds.getSouthEast().lng;\n\tvar boundArray = [nWlat,nWlon, sElat, sElon];\n\treturn boundArray\n}", "function lonLatBounds(bottomLeft, topRight) {\n \n return {bottomLeft: bottomLeft, \n topRight: topRight, \n espg900913: new OpenLayers.Bounds(bottomLeft.lon, bottomLeft.lat, topRight.lon, topRight.lat)\n .transform(ESPG_4326_PROJECTION, ESPG_900913_PROJECTION),\n\n lonLatString: \"bottomLeft: (\" + bottomLeft.lon + \", \" + bottomLeft.lat + \") \" \n + \"topRight: (\" + topRight.lon + \", \" + topRight.lat + \")\"\n + \" [\" + ESPG_4326_PROJECTION + \"]\"\n };\n}", "function getMapBounds(region) {\n b = {};\n b.no = {}; b.ne = {};\n b.so = {}; b.se = {};\n \n b.no.lat = parseFloat(region.latitude) + \n parseFloat(region.latitudeDelta) / 2.0;\n b.no.lng = parseFloat(region.longitude) - \n parseFloat(region.longitudeDelta) / 2.0;\n \n b.so.lat = parseFloat(region.latitude) - \n parseFloat(region.latitudeDelta) / 2.0;\n b.so.lng = parseFloat(region.longitude) - \n parseFloat(region.longitudeDelta) / 2.0;\n \n b.ne.lat = parseFloat(region.latitude) + \n parseFloat(region.latitudeDelta) / 2.0;\n b.ne.lng = parseFloat(region.longitude) + \n parseFloat(region.longitudeDelta) / 2.0;\n \n b.se.lat = parseFloat(region.latitude) - \n parseFloat(region.latitudeDelta) / 2.0;\n b.se.lng = parseFloat(region.longitude) + \n parseFloat(region.longitudeDelta) / 2.0;\n \n return b;\n}", "function cloudBounds(bounds, d) {\n var b0 = bounds[0],\n b1 = bounds[1];\n if (d.x + d.x0 < b0.x) b0.x = d.x + d.x0;\n if (d.y + d.y0 < b0.y) b0.y = d.y + d.y0;\n if (d.x + d.x1 > b1.x) b1.x = d.x + d.x1;\n if (d.y + d.y1 > b1.y) b1.y = d.y + d.y1;\n }", "function getBounds(projection, rangeBox) {\n\t return d3.geo.path().projection(projection).bounds(rangeBox);\n\t}", "function getBounds(projection, rangeBox) {\n\t return d3.geo.path().projection(projection).bounds(rangeBox);\n\t}", "function getIntersectionBBOX()\n{\n var mapBounds = map.getExtent();\n var mapBboxEls = mapBounds.toBBOX().split(',');\n // bbox is the bounding box of the currently-visible layer\n var layerBboxEls = bbox.split(',');\n var newBBOX = Math.max(parseFloat(mapBboxEls[0]), parseFloat(layerBboxEls[0])) + ',';\n newBBOX += Math.max(parseFloat(mapBboxEls[1]), parseFloat(layerBboxEls[1])) + ',';\n newBBOX += Math.min(parseFloat(mapBboxEls[2]), parseFloat(layerBboxEls[2])) + ',';\n newBBOX += Math.min(parseFloat(mapBboxEls[3]), parseFloat(layerBboxEls[3]));\n return newBBOX;\n}", "get bounds() { return this._bounds; }", "function getDataBounds(tileBuffer) {\n\n var bounds = map.getBounds();\n\n var zoom = map.getZoom();\n\n var north = bounds.getNorth();\n var south = bounds.getSouth();\n var east = bounds.getEast();\n var west = bounds.getWest();\n\n var pixelXYTopLeft = LatLongToPixelXY(north, west, zoom);\n var pixelXYBottomRight = LatLongToPixelXY(south, east, zoom);\n\n var tileXTopLeft = Math.floor(pixelXYTopLeft.x / 256) - tileBuffer;\n var tileYTopLeft = Math.floor(pixelXYTopLeft.y / 256) - tileBuffer;\n\n var tileXBottomRight = Math.floor(pixelXYBottomRight.x / 256) + 1 + tileBuffer;\n var tileYBottomRight = Math.floor(pixelXYBottomRight.y / 256) + 1 + tileBuffer;\n\n pixelXYTopLeft.x = tileXTopLeft * 256;\n pixelXYTopLeft.y = tileYTopLeft * 256;\n\n pixelXYBottomRight.x = tileXBottomRight * 256;\n pixelXYBottomRight.y = tileYBottomRight * 256;\n\n var latLongTopLeft = PixelXYToLatLong(pixelXYTopLeft.x, pixelXYTopLeft.y, zoom);\n var latLongBottomRight = PixelXYToLatLong(pixelXYBottomRight.x, pixelXYBottomRight.y, zoom);\n\n return {\n north: latLongTopLeft.latitude,\n west: latLongTopLeft.longitude,\n south: latLongBottomRight.latitude,\n east: latLongBottomRight.longitude\n };\n }", "function bounds() {\n return {\n start: conductor.displayStart(),\n end: conductor.displayEnd(),\n domain: conductor.domain().key\n };\n }", "function fitGeoInside(featureBounds, width, height) {\n var bbox = getFeaturesBox(featureBounds);\n var scale = 1 / Math.max(bbox.width / width, bbox.height / height);\n var trans = [-(bbox.x + bbox.width / 2) * scale + width / 2, -(bbox.y + bbox.height / 2) * scale + height / 2];\n\n return { scale: scale, trans: trans };\n }", "function getBoundingBox () {\n let boundingBox = map.getBounds()\n xmin = parseFloat(boundingBox._sw.lng)\n ymin = parseFloat(boundingBox._sw.lat)\n xmax = parseFloat(boundingBox._ne.lng)\n ymax = parseFloat(boundingBox._ne.lat)\n\n //console.log(`${xmin}, ${ymin}, ${xmax}, ${ymax}`)\n}", "function makeAnnotationFromQuad(){\n\n var arry = new Array();\n\n //reference\n // arry[0] = [407.77801513671875,458.2439880371094,504.6159973144531,458.2439880371094,407.77801513671875,425.3399963378906,504.6159973144531,425.3399963378906];\n \n //javascript\n // arry[1] = [122.69999694824219,458.2439880371094,\n // 214.45199584960938,458.2439880371094,\n // 122.69999694824219,425.3399963378906,\n // 214.45199584960938,425.3399963378906];\n\n //for\n arry[0] = [72,721.1661376953125,109.518310546875,721.1661376953125,72,705.84375,109.518310546875,705.84375];\n\n // var annot = this.addAnnot({\n // page: 0,\n // type: \"Highlight\",\n // quads: arry,\n // author: \"Kevin-Testing\",\n // contents: \"2 quads within 1 annotation\"\n // });\n\n var annot = this.addAnnot({\n page: 0,\n type: \"Highlight\",\n quads: arry,\n author: \"Tester\",\n contents: \"firstAnnot-Council Highlighted\"\n });\n}", "function getBounds(firstIndex, lastIndex)\n{\nvar maxlat = 0;\n\tvar\tmaxlng = 0;\n\tvar\tminlat = 10000;\n\tvar\tminlng = 10000;\n\tvar bounds;\n\t\n\tfor (var i = firstIndex; i < lastIndex; i++)\n\t{\n\t\tvar lat = pointarray[i].LatLng.lat();\n\t\tvar lng = pointarray[i].LatLng.lng();\n\t\tif (lat > maxlat)\n\t\t{\n\t\t\tmaxlat = lat;\n\t\t} \n\t\tif (lat < minlat)\n\t\t{\n\t\t\tminlat = lat;\n\t\t}\n\t\tif (lng > maxlng)\n\t\t{\n\t\t\tmaxlng = lng;\n\t\t}\n\t\tif (lng < minlng)\n\t\t{\n\t\t\tminlng = lng;\n\t\t}\n\t}\n\t\n\tbounds = new google.maps.LatLngBounds(new google.maps.LatLng(minlat, minlng), \n\t\t\t\t\t\t\t\t\t\t new google.maps.LatLng(maxlat, maxlng));\t\n\t\n\treturn bounds;}", "_getQueryGeocode(data, params) {\n return {\n text: data,\n outFields: params.outFields || '*',\n maxLocations: params.maxLocations || 10,\n };\n }", "function formRequestRect() {\n var startDate = document.getElementById('fromDate').value;\n var endDate = document.getElementById('toDate').value;\n var dataType = document.getElementById('dataType').value;\n //var operation = document.getElementById('operation').value;\n var interval = document.getElementById('interval').value;\n\n requestRect = \n {\n \"TimeInterval\": {\n \"From\": startDate,\n \"To\": endDate\n },\n \"Region\": {\n \"Type\": \"RectRegion\",\n \"NorthEast\": {\n \t\"Longitude\": northEastLon,\n \t\"Latitude\": northEastLat\n },\n \"SouthWest\": {\n \t\"Longitude\": southWestLon,\n \t\"Latitude\": southWestLat\n },\n \"Resolution\": 100\n },\n \"Dataset\": dataType,\n \"Statistics\": {\n \"Operation\": \"cNone\",\n \"Interval\": interval,\n \"GetAccuracies\": false\n }\n }\n\n console.log(requestRect);\n getRectReg(requestRect);\n}", "function get_boundaries(lat, lng) {\n var table_html = '<h3>This location is within:</h3><table id=\"boundaries\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">';\n var query_url = '/1.0/boundary/?limit=100&contains=' + lat + ',' + lng + '';\n\n displayed_kind = null;\n for_display = null;\n\n if (displayed_polygon != null) {\n // Hide old polygon\n displayed_kind = boundaries[displayed_slug].kind;\n map.removeLayer(displayed_polygon);\n displayed_polygon = null;\n displayed_slug = null;\n }\n\n // Clear old boundaries\n boundaries.length = 0;\n\n $.getJSON(query_url, function(data) {\n $.each(data.objects, function(i, obj) {\n boundaries[obj.slug] = obj;\n table_html += '<tr id=\"' + obj.slug + '\"><td>' + obj.kind + '</td><td><strong><a href=\"javascript:display_boundary(\\'' + obj.slug + '\\');\">' + obj.name + '</a></strong></td></td>';\n\n // Try to display a new polygon of the same kind as the last shown\n if (displayed_kind != null && obj.kind == displayed_kind) {\n for_display = obj; \n }\n });\n table_html += '</table>';\n $('#area-lookup').html(table_html);\n\n if (for_display != null) {\n display_boundary(for_display.slug, true);\n }\n });\n}", "function getConicParams(bbox, decimals) {\n var cx = (bbox[0] + bbox[2]) / 2;\n var h = bbox[3] - bbox[1];\n var sp1 = bbox[1] + 1/6 * h;\n var sp2 = bbox[1] + 5/6 * h;\n return `+lon_0=${ cx.toFixed(decimals) } +lat_1=${ sp1.toFixed(decimals) } +lat_2=${ sp2.toFixed(decimals) }`;\n }", "function parse_map_query (rpg, map) {\n\tif (map === undefined) {\n\t\treturn new rpg.MapJsonParam ();\n\t} else {\n\t\treturn new rpg.MapJsonParam ({\n\t\t\twith_filename : (map.filename === '' || map.filename == 1),\n\t\t\twith_orientation : (map.orientation === '' || map.orientation == 1),\n\t\t\twith_version : (map.version === '' || map.version == 1),\n\t\t\twith_size : (map.size === '' || map.size == 1),\n\t\t\twith_tilesize : (map.tilesize === '' || map.tilesize == 1),\n\t\t\twith_property : (map.property === '' || map.property == 1),\n\t\t\tlayer_under_pixbuf : (map.layer_under_pixbuf === '' || map.layer_under_pixbuf == 1),\n\t\t\tlayer_over_pixbuf : (map.layer_over_pixbuf === '' || map.layer_over_pixbuf == 1),\n\t\t\tmap_layer_params : parse_map_layer_query(rpg, map.layer)\n\t\t});\n\t}\n}", "function tightFitBounds(myMap, bounds) {\n myMap.fitBounds(bounds); // calling fitBounds() here to center the map for the bounds\n\n var overlayHelper = new google.maps.OverlayView();\n overlayHelper.draw = function () {\n if (!this.ready) {\n var extraZoom = getExtraZoom(this.getProjection(), bounds, myMap.getBounds());\n if (extraZoom > 0) {\n myMap.setZoom(myMap.getZoom() + extraZoom);\n }\n this.ready = true;\n google.maps.event.trigger(this, 'ready');\n }\n };\n overlayHelper.setMap(myMap);\n}", "function createProjection(key, bbox, viewport) {\n var dataCenter = [ (bbox[0] + bbox[2]) / 2, (bbox[1] + bbox[3]) / 2 ];\n var dataWidth = bbox[2] - bbox[0];\n var dataHeight = bbox[3] - bbox[1];\n\n var baseScale = Math.min(viewport[0] / dataWidth, viewport[1] / dataHeight);\n\n var projection;\n var ignoreCenterLongitude = false;\n var ignoreCenterLatitude = false;\n\n // Construction (unique to each projection)\n switch (key) {\n case 'equirectangular':\n projection = d3.geo.equirectangular();\n break;\n case 'mercator':\n projection = d3.geo.mercator();\n break;\n case 'lambert-conformal-conic':\n projection = d3.geo.conicConformal()\n .parallels([ 49, 77 ])\n .rotate([ -dataCenter[0], 0 ]);\n ignoreCenterLongitude = true;\n break;\n case 'albers':\n projection = d3.geo.albers()\n .parallels([ 49, 77 ])\n .rotate([ -dataCenter[0], 0 ]);\n ignoreCenterLongitude = true;\n break;\n case 'orthographic':\n projection = d3.geo.orthographic()\n .clipAngle(90)\n .rotate([ -dataCenter[0], -dataCenter[1] ]);\n ignoreCenterLongitude = true;\n ignoreCenterLatitude = true;\n break;\n }\n\n // Center and scale such that the viewport contains the bounding box\n var DummyScale = 150;\n projection = projection.scale(DummyScale);\n var xy1 = projection([ bbox[0], bbox[3] ]); // northwest, (0,0) in graphic\n var xy2 = projection([ bbox[2], bbox[1] ]); // southeast, (1,1)\n var xyCenter = [ (xy1[0] + xy2[0]) / 2, (xy1[1] + xy2[1]) / 2 ];\n // Lambert and Orthographic don't turn this into a rectangle. We need to\n // include all points in the bounding box just to maintain symmetry. Then\n // we need the mid-south point, too.\n var xy3 = projection([ bbox[0], bbox[1] ]); // southwest, (0,1)\n var xy4 = projection([ bbox[2], bbox[3] ]); // northeast, (1,0)\n var xy5 = projection([ (bbox[0] + bbox[2]) / 2, bbox[1] ]); // (0.5,1)\n\n var xMin = Math.min(xy1[0], xy2[0], xy3[0], xy4[0], xy5[0]);\n var xMax = Math.max(xy1[0], xy2[0], xy3[0], xy4[0], xy5[0]);\n var yMin = Math.min(xy1[1], xy2[1], xy3[1], xy4[1], xy5[1]);\n var yMax = Math.max(xy1[1], xy2[1], xy3[1], xy4[1], xy5[1]);\n\n var xySize = [ xMax - xMin, yMax - yMin ];\n var center = projection.invert(xyCenter);\n var scale = Math.min(viewport[0] / xySize[0], viewport[1] / xySize[1]) * DummyScale;\n\n scale *= ZoomFactor;\n\n return projection\n .center([ ignoreCenterLongitude ? 0 : center[0], ignoreCenterLatitude ? 0 : center[1] ])\n .scale(scale)\n .translate([ viewport[0] / 2, viewport[1] / 2])\n .precision(0.2);\n}", "set boundsValue(value) {}", "function compute_floor_geometry(){quad( 1, 0, 3, 2 );}", "function updateBounds() {\n\n var crsNamesToLabels = new Object(); // It is not an array!\n crsNamesToLabels[\"EPSG:4326\"] = \"WGS84\";\n crsNamesToLabels[\"CRS:84\"] = \"WGS84\";\n crsNamesToLabels[\"EPSG:3035\"] = \"ETRS-LAEA\";\n crsNamesToLabels[\"EPSG:3034\"] = \"ETRS-LCC\";\n crsNamesToLabels[\"EPSG:4258\"] = \"ETRS89\";\n\n var proj = Ext.getCmp(\"lblProjection\");\n if (proj != undefined) {\n var curProj = map.getProjection();\n if (crsNamesToLabels[curProj] != undefined) {\n curProj = crsNamesToLabels[curProj];\n }\n proj.setText(curProj);\n }\n try {\n var digits = 3;\n if (useProjection == \"Lambert\")\n digits = 0;\n if (useProjection == \"WGS84\")\n digits = 5;\n cX.setValue(mapPanel.map.center.lon.toFixed(digits));\n cY.setValue(mapPanel.map.center.lat.toFixed(digits));\n }catch(ex)\n {\n }\n}", "function mapBoundaries(data){\n boundaries = L.geoJSON(data, {\n style: {\n color: 'blue', // base layers can change that\n weight: 2\n }\n });\n\n styleBound()\n\n return boundaries\n\n}", "static setZoomBounds(allBounds) {\n let bounds = allBounds;\n const boundParams = {\n top: bounds.getTop(),\n left: bounds.getLeft(),\n bottom: bounds.getBottom(),\n right: bounds.getRight()\n };\n if ((Math.abs(Math.abs(boundParams.top) - Math.abs(boundParams.bottom) <= 0.0001))) {\n smallFactor = 0.01;\n }\n boundParams.top += ((Math.abs(Math.abs(boundParams.top) - Math.abs(boundParams.bottom))\n + smallFactor) * offsetFactor);\n boundParams.left -= ((Math.abs(Math.abs(boundParams.left) - Math.abs(boundParams.right))\n + smallFactor) * offsetFactor);\n // not needed since bottom pin fits\n // boundParams.bottom -= (Math.abs(Math.abs(boundParams.top) - Math.abs(boundParams.bottom))\n // * offsetFactor);\n boundParams.right += ((Math.abs(Math.abs(boundParams.left) - Math.abs(boundParams.right))\n + smallFactor) * offsetFactor);\n this.boundingBoxDistance = Math.sqrt((((boundParams.top - boundParams.bottom) ** 2))\n + (((boundParams.left - boundParams.right) ** 2)));\n bounds = new H.geo.Rect(boundParams.top, boundParams.left, boundParams.bottom,\n boundParams.right);\n\n return bounds;\n }", "function generateExportParameters(bounds, w, h) {\n bounds = ee.Geometry(bounds).bounds()\n w = ee.Number(w)\n h = ee.Number(h)\n \n // get width / height\n var coords = ee.List(bounds.coordinates().get(0))\n var ymin = ee.Number(ee.List(coords.get(0)).get(1))\n var ymax = ee.Number(ee.List(coords.get(2)).get(1))\n var xmin = ee.Number(ee.List(coords.get(0)).get(0))\n var xmax = ee.Number(ee.List(coords.get(1)).get(0))\n var width = xmax.subtract(xmin)\n var height = ymax.subtract(ymin)\n\n // compute new height, ymin, ymax and bounds\n var ratio = w.divide(h)\n var ycenter = ymin.add(height.divide(2.0))\n\n height = width.divide(ratio)\n ymin = ycenter.subtract(height.divide(2.0))\n ymax = ycenter.add(height.divide(2.0))\n \n bounds = ee.Geometry.Rectangle(xmin, ymin, xmax, ymax)\n \n var scale = bounds.projection().nominalScale().multiply(width.divide(w))\n\n return {scale: scale, bounds: bounds} \n}", "function generateExportParameters(bounds, w, h) {\n bounds = ee.Geometry(bounds).bounds()\n w = ee.Number(w)\n h = ee.Number(h)\n \n // get width / height\n var coords = ee.List(bounds.coordinates().get(0))\n var ymin = ee.Number(ee.List(coords.get(0)).get(1))\n var ymax = ee.Number(ee.List(coords.get(2)).get(1))\n var xmin = ee.Number(ee.List(coords.get(0)).get(0))\n var xmax = ee.Number(ee.List(coords.get(1)).get(0))\n var width = xmax.subtract(xmin)\n var height = ymax.subtract(ymin)\n\n // compute new height, ymin, ymax and bounds\n var ratio = w.divide(h)\n var ycenter = ymin.add(height.divide(2.0))\n\n height = width.divide(ratio)\n ymin = ycenter.subtract(height.divide(2.0))\n ymax = ycenter.add(height.divide(2.0))\n \n bounds = ee.Geometry.Rectangle(xmin, ymin, xmax, ymax)\n \n var scale = bounds.projection().nominalScale().multiply(width.divide(w))\n\n return {scale: scale, bounds: bounds} \n}", "function generateExportParameters(bounds, w, h) {\n bounds = ee.Geometry(bounds).bounds()\n w = ee.Number(w)\n h = ee.Number(h)\n \n // get width / height\n var coords = ee.List(bounds.coordinates().get(0))\n var ymin = ee.Number(ee.List(coords.get(0)).get(1))\n var ymax = ee.Number(ee.List(coords.get(2)).get(1))\n var xmin = ee.Number(ee.List(coords.get(0)).get(0))\n var xmax = ee.Number(ee.List(coords.get(1)).get(0))\n var width = xmax.subtract(xmin)\n var height = ymax.subtract(ymin)\n\n // compute new height, ymin, ymax and bounds\n var ratio = w.divide(h)\n var ycenter = ymin.add(height.divide(2.0))\n\n height = width.divide(ratio)\n ymin = ycenter.subtract(height.divide(2.0))\n ymax = ycenter.add(height.divide(2.0))\n \n bounds = ee.Geometry.Rectangle(xmin, ymin, xmax, ymax)\n \n var scale = bounds.projection().nominalScale().multiply(width.divide(w))\n\n return {scale: scale, bounds: bounds} \n}", "function BoundingBox() {\n var bounds = map.getBounds().getSouthWest().lng + \",\" + map.getBounds().getSouthWest().lat + \",\" + map.getBounds().getNorthEast().lng + \",\" + map.getBounds().getNorthEast().lat;\n return bounds;\n}", "function convertBigQuery() {\n\tvar bqstring = document.getElementById(\"bigquery\").textContent;\n\t// get rid of the unimportant BigQuery syntax parts\n\tbqstring = bqstring.replace('POLYGON','').replace('((','').replace('))','');\n\tvar points = bqstring.split(',');\n\tvar coords = [];\n\tfor (var i=0; i < points.length; i++) {\n\t\tvar pair = points[i];\n\t\t// trim any trailing whitespace\n\t\tpair = pair.trim();\n\t\t// separate lon and lat via regexp\n\t\t// split on one (or more) space characters\n\t\tpair = pair.split(/\\s+/);\n\t\tconsole.log()\n\t\tvar lon = parseFloat(pair[0]);\n\t\tvar lat = parseFloat(pair[1]);\n\t\tconsole.log(lon, lat)\n\t\tcoords.push([lon,lat]);\n\t}\n\tvar geojson = {\n\t\t\"type\": \"FeatureCollection\",\n\t\t\"features\": [\n\t\t {\n\t\t\t\t\"type\": \"Feature\",\n\t\t\t\t\"properties\": {},\n\t\t\t\t\"geometry\": {\n\t\t\t\t\t\"type\": \"Polygon\",\n\t\t\t\t\t\"coordinates\": [ coords ]\n\t\t\t\t}\n\t\t }\n\t\t]\n\t};\n\tgeoJsonToOutput(geojson);\n}", "fitMapBounds() {\n const { map } = this.refs;\n if (!map) {\n return;\n }\n const leaflet = this.refs.map.leafletElement;\n\n const values = this.props.type.values.filter(isValidLatLng);\n\n let bounds = L.latLngBounds();\n\n if (values.length === 1) {\n bounds = L.latLng(+values[0][1], +values[0][0]).toBounds(800);\n } else {\n values.forEach(v => {\n bounds.extend(L.latLng(+v[1], +v[0]));\n });\n }\n // If the bounds are equal, we need to extend them otherwise leaflet will error.\n if (bounds._northEast.lat === bounds._southWest.lat &&\n bounds._northEast.lng === bounds._southWest.lng) {\n bounds._northEast.lat = bounds._northEast.lat + 0.1;\n bounds._southWest.lng = bounds._southWest.lng - 0.1;\n }\n leaflet.fitBounds(bounds);\n }", "function getMapBounds() {\r\n\t\t//return app.location.bounds;\r\n\t\treturn app.map.map.getBounds();\r\n\t}", "addMap() {\n const {createMap} = this.props;\n\n let bounds = {\n north: this.state.bounds.north === '' ? undefined : parseFloat(this.state.bounds.north),\n south: this.state.bounds.south === '' ? undefined : parseFloat(this.state.bounds.south),\n east: this.state.bounds.east === '' ? undefined : parseFloat(this.state.bounds.east),\n west: this.state.bounds.west === '' ? undefined : parseFloat(this.state.bounds.west),\n centerLat: this.state.bounds.centerLat === '' ? undefined : parseFloat(this.state.bounds.centerLat),\n centerLon: this.state.bounds.centerLon === '' ? undefined : parseFloat(this.state.bounds.centerLon),\n range: this.state.bounds.range === '' ? undefined : parseFloat(this.state.bounds.range),\n scale: this.state.bounds.scale === '' ? undefined : parseFloat(this.state.bounds.scale)\n };\n\n let blankBounds = true;\n for (let prop in bounds) {\n if (typeof bounds[prop] !== 'undefined') {\n blankBounds = false;\n break;\n }\n }\n if (blankBounds) {\n bounds = undefined;\n }\n\n createMap(bounds, this.state.engineId === '' ? undefined : this.state.engineId,\n false, this.state.recorder, parseInt(this.state.brightness), parseInt(this.state.midDistanceThreshold),\n parseInt(this.state.farDistanceThreshold));\n }", "function getBounds(feature) {\n var bounds = { min: [999, 999], max: [-999, -999] };\n\n _.each(feature, function(path) {\n _.each(path, function(point) {\n point = map.latLngToLayerPoint(new L.LatLng(point.x, point.y));\n\n bounds.min[0] = Math.min(bounds.min[0], point.x);\n bounds.min[1] = Math.min(bounds.min[1], point.y);\n bounds.max[0] = Math.max(bounds.max[0], point.x);\n bounds.max[1] = Math.max(bounds.max[1], point.y);\n });\n });\n\n return bounds;\n }", "async function getIso(coords) {\n\n var lon = coords[0];\n var lat = coords[1];\n\n\n const query = await fetch(\n `${urlBase}${profile}/${lon},${lat}?contours_minutes=${minutes}&polygons=true&access_token=${mapboxgl.accessToken}`,\n { method: 'GET' }\n );\n const data = await query.json();\n console.log(data);\n\n\n\n if(map.getLayer('iso')) {\n map.removeLayer('iso');\n map.removeLayer('iso')\n }\n\n\n map.addSource('iso', {\n type: 'geojson',\n data: {\n 'type': 'FeatureCollection',\n 'features': []\n }\n });\n \n map.addLayer(\n {\n 'id': 'iso',\n 'type': 'fill',\n 'source': 'iso',\n 'layout': {},\n 'paint': {\n 'fill-color': '#5a3fc0',\n 'fill-opacity': 0.7\n }\n },\n 'poi-label'\n );\n\n map.getSource('iso').setData(data);\n\n console.log(turf.bbox(data))\n\n\n map.fitBounds(turf.bbox(data), {\n linear: true,\n padding: 100\n })\n\n\n\n}", "function setBoundary(zoomLevel) {\n switch (zoomLevel) {\n case 1:\n case 2:\n case 3:\n case 4:\n return \"ste\"; //States\n case 5:\n case 6:\n case 7:\n return \"sd\"; //Statistical Divisions\n case 8:\n case 9:\n return \"ssd\"; //Statistical Sub-Divisions\n case 10:\n case 11:\n return \"lga\"; //ABS Local Government Areas (i.e. council areas)\n case 12:\n case 13:\n return \"poa\"; //ABS Postcodes\n case 14:\n case 15:\n return \"ssc\"; //ABS Suburbs\n case 16:\n case 17:\n case 18:\n return \"cd\"; //Census Collection Districts (aka CCDs)\n }\n}", "function m(e, r) {\n var n = e.geometry,\n o = e.toJSON(),\n s = o;\n\n if (Object(_core_maybe_js__WEBPACK_IMPORTED_MODULE_0__[\"isSome\"])(n) && (s.geometry = JSON.stringify(n), s.geometryType = Object(_geometry_support_jsonUtils_js__WEBPACK_IMPORTED_MODULE_3__[\"getJsonType\"])(n), s.inSR = n.spatialReference.wkid || JSON.stringify(n.spatialReference)), o.groupByFieldsForStatistics && (s.groupByFieldsForStatistics = o.groupByFieldsForStatistics.join(\",\")), o.objectIds && (s.objectIds = o.objectIds.join(\",\")), o.orderByFields && (s.orderByFields = o.orderByFields.join(\",\")), !o.outFields || !o.returnDistinctValues && (null != r && r.returnCountOnly || null != r && r.returnExtentOnly || null != r && r.returnIdsOnly) ? delete s.outFields : -1 !== o.outFields.indexOf(\"*\") ? s.outFields = \"*\" : s.outFields = o.outFields.join(\",\"), o.outSR ? s.outSR = o.outSR.wkid || JSON.stringify(o.outSR) : n && (o.returnGeometry || o.returnCentroid) && (s.outSR = s.inSR), o.returnGeometry && delete o.returnGeometry, o.outStatistics && (s.outStatistics = JSON.stringify(o.outStatistics)), o.pixelSize && (s.pixelSize = JSON.stringify(o.pixelSize)), o.quantizationParameters && (s.quantizationParameters = JSON.stringify(o.quantizationParameters)), o.parameterValues && (s.parameterValues = JSON.stringify(o.parameterValues)), o.rangeValues && (s.rangeValues = JSON.stringify(o.rangeValues)), o.dynamicDataSource && (s.layer = JSON.stringify({\n source: o.dynamicDataSource\n }), delete o.dynamicDataSource), o.timeExtent) {\n var _t131 = o.timeExtent,\n _e134 = _t131.start,\n _r60 = _t131.end;\n null == _e134 && null == _r60 || (s.time = _e134 === _r60 ? _e134 : \"\".concat(null == _e134 ? \"null\" : _e134, \",\").concat(null == _r60 ? \"null\" : _r60)), delete o.timeExtent;\n }\n\n return s;\n }", "function fit_markers_to_map(){ \n map.fitBounds(bounds);\n }", "set_bounds(data){\n console.log(\"invoked set bounds\");\n if(data.length>0){\n let points = [];\n for(let i=0;i<data.length-1;i++)\n if(data[i].attributes.priority>=0)\n points = _.union(points, polyline.decode(data[i].attributes.polyline));\n points = points.map(function(point){ return {lat: point[0], lng: point[1]}; });\n this.setState({bounds: points});\n }\n }", "function handleMapEvent(event) {\n thisCheckbox = document.getElementById('mapbounds');\n if (thisCheckbox.checked) {\n removeAllGeometryFromVectorLayer(\"OpenLayers.Geometry.Polygon\");\n environment.added_bounds = getMapActiveBounds();\t// draw bounds\n saveQueryParamsToDB();\n //thisCheckbox.checked = false;\n }\n\t}", "function boundsChanged(){\r\n config.currentZoomLevel = config.mapObj.getZoom();\r\n\r\n //hide any visible marker overlays\r\n $('#marker-overlay').remove();\r\n \r\n var styleType = config.zoomLevelStyles[config.currentZoomLevel];\r\n \r\n $.logEvent('[$.boundsChanged]: style required for zoom level (' + config.currentZoomLevel + ') = ' + NI.map.themeDefinitions[config.currentZoomLevel]);\r\n\r\n //update the style\r\n config.styledMapType = new google.maps.StyledMapType(NI.map.themeDefinitions[styleType],{map:config.mapObj,name:styleType});\r\n config.mapObj.mapTypes.set(styleType,config.styledMapType);\r\n config.mapObj.setMapTypeId(styleType);\r\n\r\n updateInformation({\r\n styleType:styleType,\r\n zoomLevel:config.currentZoomLevel\r\n });\r\n \r\n var boundsObj = config.mapObj.getBounds();\r\n config.boundsCoOrdinatesObj = {\r\n neLatitude:boundsObj.getNorthEast().lat(),\r\n neLongitude:boundsObj.getNorthEast().lng(),\r\n nwLatitude:boundsObj.getSouthWest().lat(),\r\n nwLongitude:boundsObj.getNorthEast().lng(),\r\n swLongitude:boundsObj.getSouthWest().lng(),\r\n swLatitude:boundsObj.getSouthWest().lat()\r\n }\r\n nwPixelCoordinate = latLngToPixel({\r\n map:config.mapObj,\r\n latLng:new google.maps.LatLng(config.boundsCoOrdinatesObj.nwLatitude,config.boundsCoOrdinatesObj.nwLongitude),\r\n zoomLevel:config.currentZoomLevel\r\n });\r\n var nePixelCoordinate = latLngToPixel({\r\n map:config.mapObj,\r\n latLng:new google.maps.LatLng(config.boundsCoOrdinatesObj.neLatitude,config.boundsCoOrdinatesObj.neLongitude),\r\n zoomLevel:config.currentZoomLevel\r\n });\r\n var neTileCoordinate = new google.maps.Point(\r\n Math.floor(nePixelCoordinate.x/config.tileSize),\r\n Math.floor(nePixelCoordinate.y/config.tileSize)\r\n );\r\n var swPixelCoordinate = latLngToPixel({\r\n map:config.mapObj,\r\n latLng:new google.maps.LatLng(config.boundsCoOrdinatesObj.swLatitude,config.boundsCoOrdinatesObj.swLongitude),\r\n zoomLevel:config.currentZoomLevel\r\n });\r\n var swTileCoordinate = new google.maps.Point(\r\n Math.floor(swPixelCoordinate.x/config.tileSize),\r\n Math.floor(swPixelCoordinate.y/config.tileSize)\r\n ); \r\n var tilesBetween = getTilesBetween({\r\n bottomLeftTile:swTileCoordinate,\r\n topRightTile:neTileCoordinate\r\n });\r\n \r\n $.logEvent('[$.boundsChanged]: neTileCoordinate=' + neTileCoordinate + ', swTileCoordinate=' + swTileCoordinate);\r\n $.logEvent('[$.boundsChanged]: total tiles between (' + tilesBetween.length + '), tiles between=' + tilesBetween); \r\n $.logEvent('[$.boundsChanged]: current zoom level: ' + config.currentZoomLevel + ', topRight: (' + neTileCoordinate.x + ',' + neTileCoordinate.y + '), bottomLeft: (' + swTileCoordinate.x + ',' + swTileCoordinate.y + ')');\r\n\r\n //loop through the visible tiles to get the location data\r\n tileCoordinateToTileId(tilesBetween);\r\n }", "constructor() {\n /**\n * These are the bounds for the service areas so we can try to obtain more precise geocoding on addresses\n */\n this.AREAS = [ /* eslint no-multi-spaces: off */\n {id: 'TEST', bounds: {sw: {lat: 59.65330271, lng: -151.8705092}, ne: {lat: 61.25310536, lng: -149.8731469}}},\n {id: 'APFSA', bounds: {sw: {lat: 59.70365140, lng: -151.8705092}, ne: {lat: 59.95370723, lng: -151.5705850}}},\n {id: 'CES', bounds: {sw: {lat: 60.21213251, lng: -151.4253571}, ne: {lat: 60.81998024, lng: -149.8731469}}},\n {id: 'KESA', bounds: {sw: {lat: 59.65330271, lng: -151.7881408}, ne: {lat: 59.93944592, lng: -150.8635843}}},\n {id: 'KFD', bounds: {sw: {lat: 60.51649993, lng: -151.3357507}, ne: {lat: 60.60361148, lng: -151.0731701}}},\n {id: 'NFSA', bounds: {sw: {lat: 60.58171538, lng: -151.4264242}, ne: {lat: 61.25310536, lng: -150.0042887}}},\n ];\n }", "function formatRange(viewSize) {\n var tmpViewSize = viewSize / 1000,\n fprefix = formatPrefix(Math.max(1, tmpViewSize)),\n unit = fprefix.symbol + \"bp\",\n // bp, kbp, Mbp, Gbp\n prefix = Math.round(fprefix.scale(viewSize)).toLocaleString();\n return { prefix: prefix, unit: unit };\n}", "function findQuad(latDD, lonDD)\n{\n\tfor(i = 0; i < dat.data.length; i++)\n\t{\n\t\tif(latDD <= dat.data[i][1] && latDD >= dat.data[i][3] && lonDD <= dat.data[i][2] && lonDD >= dat.data[i][4])\n\t\t{\n\t\t\treturn dat.data[i][0];\n\t\t}\n\t}\n\t\n\treturn \"Location outside the defined area.\";\n\n}", "function getImages(bounds) {\n var start = '2000-01-01'\n var stop = '2019-01-01'\n \n //var bounds = catchments.geometry().dissolve(10000).buffer(10000).simplify(50000)\n //print(bounds)\n //Map.addLayer(bounds)\n \n var images = assets.getImages(bounds, { \n resample: true,\n missions: [\n 'L5', \n 'L4', \n 'L8', \n 'S2', \n 'L7'\n ],\n filter: ee.Filter.date(start, stop)\n })\n\n return images \n}", "function _getBounds ( collection, bounds ) {\n var clipGroupElems, i, j;\n\n if ( collection.typename != 'GroupItem' ) { // ����� ��������� ������� �����������\n return collection.geometricBounds;\n }\n if ( collection.clipped ) { // ������ � ������ => ���� �����\n clipGroupElems = collection.pathItems;\n\n for ( i = 0; i < clipGroupElems.length; i++ ) {\n if ( clipGroupElems[ i ].clipping ) {\n if ( bounds == '' ) {\n bounds = clipGroupElems[ i ].geometricBounds;\n continue;\n }\n bounds = _compareBounds ( clipGroupElems[ i ], bounds );\n }\n }\n return bounds;\n }\n\n // ������ ��� ����������� ����� => ���� �� ��������� ������\n for ( j = 0; j < collection.pageItems.length; j++ ) {\n\n var el = collection.pageItems [ j ];\n\n if ( el.typename != 'GroupItem' ) { // ����� pageItem ����� ������\n if ( bounds == '' ) {\n bounds = el.geometricBounds;\n continue;\n }\n bounds = _compareBounds ( el, bounds );\n }\n\n if ( el.typename == 'GroupItem' && el.clipped ) { // ������ � ������ => ���� �����\n clipGroupElems = el.pathItems;\n for ( i = 0; i < clipGroupElems.length; i++ ) {\n if ( clipGroupElems[ i ].clipping ) {\n if ( bounds == '' ) {\n bounds = clipGroupElems[ i ].geometricBounds;\n continue;\n }\n bounds = _compareBounds ( clipGroupElems[ i ], bounds );\n }\n }\n continue;\n }\n\n if ( el.typename == 'GroupItem' && !el.groupItems && !el.clipped ) { // ������ ��� ����� � ��� �����\n if ( bounds == '' ) {\n bounds = el.geometricBounds;\n// bounds = getBoundsExtend ( el.pageItems, bounds );\n continue;\n }\n bounds = _compareBounds ( el.geometricBounds, bounds );\n continue;\n }\n\n if ( el.typename == 'GroupItem' && el.groupItems ) { // ������ ��� �����, �� � �������� => ��������\n for ( var l = 0; l < el.pageItems.length; l++ ) {\n /* if ( bounds == '' ) {\n bounds = getBoundsExtend ( el.pageItems[l], '' );\n }*/\n bounds = getBoundsExtend ( el.pageItems[ l ], bounds );\n }\n continue;\n }\n }\n return bounds;\n\n // �������� � ������� ����� ������� geometricBounds ��������\n function _compareBounds ( elem, boundsToCompare ) {\n var elemBounds = elem.geometricBounds;\n elemBounds[ 0 ] < boundsToCompare[ 0 ] ? boundsToCompare[ 0 ] = elemBounds[ 0 ] : '';\n elemBounds[ 1 ] > boundsToCompare[ 1 ] ? boundsToCompare[ 1 ] = elemBounds[ 1 ] : '';\n elemBounds[ 2 ] > boundsToCompare[ 2 ] ? boundsToCompare[ 2 ] = elemBounds[ 2 ] : '';\n elemBounds[ 3 ] < boundsToCompare[ 3 ] ? boundsToCompare[ 3 ] = elemBounds[ 3 ] : '';\n return boundsToCompare;\n }\n }", "calculateBoundIndex(subMappings, boundIndex) {\n const k = boundIndex;\n if (subMappings[k] === 'X') {\n if (subMappings.length < this.MAX_SUB_FRAME_LENGTH &&\n (!subMappings[k + this.SINGLE_STRIKE] || (!subMappings[k + this.DOUBLE_STRIKE] && subMappings[k + this.SINGLE_STRIKE] === 'X'))) {\n boundIndex += this.OUT_OF_BOUND;\n }\n if (subMappings[k + this.SINGLE_STRIKE] === 'X') {\n boundIndex += this.SINGLE_STRIKE;\n if (subMappings[k + this.DOUBLE_STRIKE] === 'X') {\n boundIndex += this.SINGLE_STRIKE;\n }\n } else {\n boundIndex += this.ONE;\n }\n } else if (subMappings[k] === '/') {\n if (subMappings[k + this.ONE] === '-') {\n boundIndex += this.SINGLE_STRIKE;\n } else {\n boundIndex += this.ONE;\n }\n }\n return boundIndex;\n }", "function sendMapChangedMessage() {\n var bounds = twitter_geomap.map.map.getBounds();\n var sw = {}\n var ne = {}\n sw.lat = bounds.getSouthWest().lat();\n sw.lon = bounds.getSouthWest().lng();\n ne.lat = bounds.getNorthEast().lat();\n ne.lon = bounds.getNorthEast().lng();\n var msg = {}\n msg.bounds = {\"southWest\": sw, \"northEast\": ne}\n // put in a placeholder value just to pass parsing and keep the message format the same\n //msg.tile = {\"level\":10,\"xIndex\":321,\"yIndex\":541}\n console.log(\"bounds to send: \",msg)\n OWF.Eventing.publish(twitter_geomap.config.boundsChangeChannel,JSON.stringify(msg))\n}", "function fitMapLayer(geodata) {\r\n var coordinates = geodata.features[0].geometry.geometries ? geodata.features[0].geometry.geometries[0].coordinates[0] : geodata.features[0].geometry.coordinates[0];\r\n\r\n var bounds = coordinates.reduce(function (bounds, coord) {\r\n return bounds.extend(coord);\r\n }, new mapboxgl.LngLatBounds(coordinates[0], coordinates[0]));\r\n\r\n map.fitBounds(bounds, {\r\n padding: 20\r\n });\r\n}", "function osm_getTileURL(bounds) {\n var res = this.map.getResolution();\n var x = Math.round((bounds.left - this.maxExtent.left) / (res * this.tileSize.w));\n var y = Math.round((this.maxExtent.top - bounds.top) / (res * this.tileSize.h));\n var z = this.map.getZoom();\n var limit = Math.pow(2, z);\n //\n if (y < 0 || y >= limit) {\n return OpenLayers.Util.getImagesLocation() + \"404.png\";\n } else {\n x = ((x % limit) + limit) % limit;\n return this.url + z + \"/\" + x + \"/\" + y + \".\" + this.type;\n }\n }", "function gRangeValuesForRangeId(req, res) {\n getRangeValuesForRangeId(req.params.rangeId).then(function(result) {\n if (typeof result != 'undefined') {\n\n res.send(result);\n }\n }).catch(function(error) {\n if(typeof error.sqlMessage!='undefined')\n res.status(400).send({ 'Error': error.sqlMessage });\n else \n res.status(400).send(error);\n })\n}", "function linkMap() {\n var csvBounds = '';\n var first = true;\n for (f in STACK.figures) {\n var figure = STACK.figures[f];\n if (figure.url != '') {\n var bounds = figure.getBounds();\n if (first) {\n first = false;\n }\n else {\n csvBounds += \"\\n\";\n }\n\n csvBounds += bounds[0] + ',' + bounds[1] + ',' + bounds[2] + ',' + bounds[3] + ',' + figure.url;\n }\n }\n Log.info(\"editor.php->linkMap()->csv bounds: \" + csvBounds);\n\n return csvBounds;\n}", "defineMapBounds() {\n \n const coordinates = this.state.options.map(i => i.coordinates);\n\n let maxX = 0,\n minX = 0,\n maxY = 0,\n minY = 0;\n\n coordinates.forEach(coord => {\n if (coord[0] > maxY) {\n maxY = coord[0];\n }\n \n if (coord[0] < minY) {\n minY = coord[0];\n }\n\n if (coord[1] > maxX) {\n maxX = coord[1];\n }\n \n if (coord[1] < minX) {\n minX = coord[1];\n }\n })\n\n // Bounds are defined by two coordinates:\n // position1: the most W and N\n // position2: the most E and S\n this.setState({\n bounds: [[maxY, minX], [minY, maxX]],\n center: [(maxY - minY) / 2, (maxX - minX) / 2]\n })\n }", "function mapFitBounds() {\n\t// bounds\n\tvar b = {\n\t north: 0,\n\t south: 0,\n\t east: 0,\n\t west: 0\n\t};\n\t\n\t// is bound came?\n\tvar c = {\n\t\t north: false,\n\t\t south: false,\n\t\t east: false,\n\t\t west: false\t\t\t\n\t};\n\t\n\t// get bounds if any\n\tfor (key in participants) {\n\t\tx = participants[key].geox;\n\t\ty = participants[key].geoy;\n\t\t\n\t\tif (x == 0 || y == 0) continue;\n\t\t\n\t\t// north\n\t\tif (c.north == false) {\n\t\t\tc.north = true; b.north = y;\n\t\t} else {\n\t\t\tb.north = Math.max(b.north,y);\n\t\t}\n\t\t\n\t\t// south\n\t\tif (c.south == false) {\n\t\t\tc.south = true; b.south = y;\n\t\t} else {\n\t\t\tb.south = Math.min(b.south,y);\n\t\t}\n\n\t\t// east\n\t\tif (c.east == false) {\n\t\t\tc.east = true; b.east = x;\n\t\t} else {\n\t\t\tb.east = Math.max(b.east,x);\n\t\t}\n\t\t\n\t\t// west\n\t\tif (c.west == false) {\n\t\t\tc.west = true; b.west = x;\n\t\t} else {\n\t\t\tb.west = Math.min(b.west,x);\n\t\t}\t\t\n\t}\n\t\n\tif (b.east == b.west && b.north == b.south) {\n\t\t// only one point\n\t\tmapObject.setZoom(5);\n\t\tmapObject.setCenter(new google.maps.LatLng(b.south, b.east));\n\t\treturn;\n\t} \n\n\tif (c.east && c.west && c.north && c.south) {\n\t\tmapObject.fitBounds(b);\n\t\t//mapObject.panToBounds(b);\n\t}\n}", "buildQuery(options, target) {\n const query = this.templateSrv.replace(target.target, options.scopedVars, 'regex');\n\n let path = this.metricsURL + '/query_range';\n const start = options.range.from._d.valueOf() / 1000;\n const end = options.range.to._d.valueOf() / 1000;\n\n // Calculate step size to maximize data points without going over 11,000 (prometheus limit)\n const totalSeconds = Math.floor(end - start);\n const stepSize = Math.max(1, Math.ceil(totalSeconds/11000));\n\n return path\n + '?query=' + encodeURIComponent(query)\n + '&start=' + start\n + '&end=' + end\n + '&step=' + stepSize + 's';\n }", "function linkMap() {\n var csvBounds = '';\n var first = true;\n for (var f in STACK.figures) {\n var figure = STACK.figures[f];\n if (figure.url != '') {\n var bounds = figure.getBounds();\n if (first) {\n first = false;\n }\n else {\n csvBounds += \"\\n\";\n }\n\n csvBounds += bounds[0] + ',' + bounds[1] + ',' + bounds[2] + ',' + bounds[3] + ',' + figure.url;\n }\n }\n Log.info(\"editor.php->linkMap()->csv bounds: \" + csvBounds);\n\n return csvBounds;\n}", "static remapUsingBounds(value, sourceBounds, targetBounds) {\n\t\tlet remapped = null;\n\t\tif (sourceBounds.isInBounds(value))\n\t\t\tremapped = targetBounds.remap(sourceBounds.normalize(value));\n\n\t\treturn remapped;\n\t}", "function toLatLngBounds(a, b) {\r\n \tif (a instanceof LatLngBounds) {\r\n \t\treturn a;\r\n \t}\r\n \treturn new LatLngBounds(a, b);\r\n }", "updateBounds(response) {\n if (response != undefined) {\n var bounds = new google.maps.LatLngBounds();\n\n response = response.split(\"[\");\n for (var i = 0; i < response.length; i++) {\n\n if (response[i] != \"\") {\n response[i] = response[i].replace(\"],\", \"\");\n response[i] = response[i].replace(\"]]]]\", \"\");\n response[i] = response[i].split(\",\");\n\n bounds.extend({\n lat: parseFloat(response[i][1]),\n lng: parseFloat(response[i][0]),\n });\n }\n }\n const center = findCenter(bounds);\n this.setState({\n center: center,\n });\n this._mapComponent.fitBounds(bounds);\n } else {\n this.setState({\n zoom: 8,\n center: {\n lat: 8.460555,\n lng: -11.779889,\n },\n });\n\n if (sierraBounds == undefined) {\n sierraBounds = this._mapComponent.getBounds();\n }\n\n this._mapComponent.fitBounds(sierraBounds);\n }\n }", "function getGeoBulk(qry){\n var apiAdd = `http://www.mapquestapi.com/geocoding/v1/batch?key=${key['mapQuest']}`;\n \n // Basic get request pulled from Node.js documentation \n http.get(apiAdd += qry, function(res) {\n var statusCode = res.statusCode;\n var contentType = res.headers['content-type'];\n\n let error;\n if (statusCode !== 200) {\n error = new Error(`Request Failed.\\n` + `Status Code: ${statusCode}`);\n } else if (!/^application\\/json/.test(contentType)) {\n error = new Error(`Invalid content-type.\\n` + `Expected application/json but received ${contentType}`);\n }\n if (error) {\n console.log(error.message);\n // consume response data to free up memory\n res.resume();\n return;\n }\n\n res.setEncoding('utf8');\n let rawData = '';\n res.on('data', function(chunk) {rawData += chunk});\n res.on('end', function(){\n try {\n // Parse JSON to object\n var locData = JSON.parse(rawData);\n // Generate array of City/Location objects\n var cityArr = geoCity(locData);\n // Get object containing cities with the shortest distance\n var shortObj = shortestDist(cityArr);\n // Return result of shortestDist function\n return console.log(\n \"\\n\" + shortObj[\"cityA\"] + \n \"\\n\" + shortObj[\"cityB\"] \n );\n\n } catch (e) {\n console.log(e.message);\n }\n });\n }).on('error', function(e) {\n console.log(`Got error: ${e.message}`);\n });\n }" ]
[ "0.6350161", "0.6110648", "0.571756", "0.5590648", "0.5467104", "0.5467104", "0.5390251", "0.5374224", "0.5359655", "0.5318514", "0.5254317", "0.52510005", "0.5219175", "0.51373595", "0.5121585", "0.511986", "0.5104239", "0.50820076", "0.5062027", "0.5062027", "0.5045888", "0.50439656", "0.49910063", "0.49903488", "0.49524552", "0.49524552", "0.49214315", "0.4910658", "0.4910658", "0.4906838", "0.48879552", "0.48879552", "0.48879552", "0.4881435", "0.4856467", "0.48348612", "0.48310852", "0.4810398", "0.4792694", "0.47813332", "0.47796398", "0.47747722", "0.4758238", "0.47516704", "0.47516704", "0.47373778", "0.4732506", "0.47210735", "0.4716873", "0.47023728", "0.4696859", "0.4683704", "0.4682352", "0.46801397", "0.4678462", "0.46762696", "0.46694857", "0.4656534", "0.46527186", "0.46319044", "0.4620604", "0.46178526", "0.4616749", "0.46141785", "0.46083757", "0.46066868", "0.46066868", "0.46066868", "0.46045014", "0.4602445", "0.45969412", "0.45853677", "0.45594153", "0.45560637", "0.4550728", "0.45298827", "0.4527618", "0.45221004", "0.4517652", "0.4516869", "0.4511573", "0.45104796", "0.45011586", "0.44926572", "0.4492435", "0.44903085", "0.44896534", "0.44891047", "0.44822177", "0.44762522", "0.44727018", "0.44652808", "0.44597137", "0.44585013", "0.44564533", "0.44502178", "0.44421333", "0.44352788", "0.44336373", "0.4433169" ]
0.7414753
0
UI Helper functions / Given the result of a GET against a namespace, this function displays any child namespaces and tags. path: the path of the namespace that is currently being displayed data: the results from FluidDB containing the contents of the namespace context: the Sammy context
function update_tags(path, data, context){ var obj = JSON.parse(data); // empty the helpful text message element $('#tag_content').empty(); // Populate some of the items $('textarea#namespace_description_textarea').val(obj.description); $('#namespace_description').html(obj.description); $('#path').html(path); $('#namespace_path').html(path); // cache the two jQuery objects $namespace_list = $('#namespace_list'); $tag_list = $('#tag_list'); // add namespace $.each(obj.namespaceNames, function(n, namespace) { var item = { "name": namespace, "path": path}; context.partial('templates/namespace.template', { item: item}, function(rendered) { $namespace_list.append(rendered)}); }); // add tags $.each(obj.tagNames, function(t, tag) { var item = { "name": tag, "path": path}; context.partial('templates/tag.template', { item: item}, function(rendered) { $tag_list.append(rendered)}); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "viewNestedArea (baseUrl,username,spacename,area,child,query){\n browser.get(baseUrl + username + \"/\" + spacename +\"/areas/\" + area + \"/\" + child + \"/q=\" +query);\n }", "function getDirContent(path) {\n\t\tshowLoading();\n\t\tcontext_element = {};\n\t\tpath = HTMLDecode(path || cur_path);\n\t\tsendXMLHttpReq(req_url, {\n\t\t\tmode: 'POST',\n\t\t\tparameters: 'cmd=list&src=' + encodeURIComponent(path),\n\t\t\tonsuccess: function (req) {\n\t\t\t\tupdate(req.responseXML);\n\t\t\t\thideLoading();\n\t\t\t}\n\t\t});\n\t}", "function getNamespaces() {\n // Signals the namespaces are to be fetched => loader will be shown\n setLoader(true, 'Refreshing namespaces', 'Normally this is a fast operation but it may take longer if a bigger repository needs to be initialised first.');\n RDF4JRepositoriesRestService.getRepositoryNamespaces()\n .success(function (data) {\n const usedPrefixes = {};\n data.results.bindings.forEach(function (e) {\n usedPrefixes[e.prefix.value] = e.namespace.value;\n });\n $scope.namespaces = usedPrefixes;\n })\n .error(function (data) {\n $scope.repositoryError = getError(data);\n })\n .finally(function () {\n // Signals namespaces were fetched => loader will be hidden\n setLoader(false);\n loadTab();\n });\n }", "function getCollections( resourceKid='' ) {\r\n if( resourceKid == '' ) {\r\n var currentResource = $('.selectedCurrentResource').find('img');\r\n\r\n if( currentResource.length == 0 ){//This mean we are on the search page..just stop here\r\n return;\r\n }\r\n var resource_kid = currentResource.attr('id').replace('identifier-', '');\r\n }else{\r\n var resource_kid = resourceKid;\r\n }\r\n\r\n var ctab = $(\"#collections_tab\");\r\n ctab[0].innerHTML = \"COLLECTIONS (\" + 0 + \")\";\r\n $(\"#collections_table\").html('');\r\n $.ajax({\r\n url: arcs.baseURL + \"collections/memberships\",\r\n type: \"get\",\r\n data: {\r\n id: resource_kid\r\n },\r\n success: function (data) {\r\n var numCollections = 0;\r\n if (typeof(data.collections) !== 'undefined'){\r\n numCollections = data.collections.length;\r\n }\r\n if (typeof (data.collections) !== 'undefined' && data.collections.length > 0) {\r\n var populateCollections = \"<table><tbody>\" +\r\n \"<tr><td colspan='2'>This resource is a part of the following \" + numCollections + \" collections...</td></tr>\";\r\n for (var i = numCollections - 1; i >= 0; i--) {\r\n var collection = data.collections[i];\r\n populateCollections += \"<tr><td style='width:50%'>\" + collection.title + \"</td><td>\" + collection.user_name + \"</td></tr>\";\r\n }\r\n populateCollections += \"</tbody></table>\";\r\n } else {\r\n var populateCollections = \"<table><tbody>\" +\r\n \"<tr><td colspan='2'>This resource isn't part of any collections...</td></tr>\";\r\n }\r\n ctab[0].innerHTML = \"COLLECTIONS (\" + numCollections + \")\";\r\n $(\"#collections_table\").html(populateCollections);\r\n }\r\n })\r\n}", "viewchildIteration (baseUrl,username,spacename,iterationname,children){\n browser.get(baseUrl + username + \"/\" + spacename +\"/iterations/\" + iterationname +\"/\" +children);\n }", "path() {\n this.displayFolderStructure();\n }", "function showItems(path) {\n path = path.replace(/.id./g, '.[^.]+.') + '.[^.]+.'\n $('div').filter(function () {\n return this.id.match(path + 'link')\n }).show()\n $('div').filter(function () {\n return this.id.match(path + 'view')\n }).show()\n}", "function linkToTreeView() {\n var answer = null;\n if ($scope.contextId) {\n var node = null;\n var tab = null;\n if ($scope.endpointPath) {\n tab = \"browseEndpoint\";\n node = workspace.findMBeanWithProperties(Camel.jmxDomain, {\n context: $scope.contextId,\n type: \"endpoints\",\n name: $scope.endpointPath\n });\n }\n else if ($scope.routeId) {\n tab = \"routes\";\n node = workspace.findMBeanWithProperties(Camel.jmxDomain, {\n context: $scope.contextId,\n type: \"routes\",\n name: $scope.routeId\n });\n }\n var key = node ? node[\"key\"] : null;\n if (key && tab) {\n answer = \"#/camel/\" + tab + \"?tab=camel&nid=\" + key;\n }\n }\n return answer;\n }", "function showCurrentPath(d) {\n if (d == tmRoot)\n $('#path_label').text(getPath(d));\n else\n $('#path_label').text($('#path_label').text() + \"/\" + getPath(d));\n}", "function displayContents() {\n\tif (contentsRequest.readyState === XMLHttpRequest.DONE) {\n\t\tif (contentsRequest.status === 200) {\n\t\t\tdocument.getElementById('tree').textContent = properties.showtree();\n\t\t\tdocument.getElementById('display').innerHTML = formatDirContents(contentsRequest.responseText);\n\t\t} else {\n\t\t\talert('There was a problem with the request.');\n\t\t}\n\t}\n}", "function displayCategory() {\n displayHeading();\n displayList();\n}", "function printRootGenerically(path) {\n\t return genericPrint(path, options, printWithComments);\n\t }", "function printRootGenerically(path) {\n\t return genericPrint(path, options, printWithComments);\n\t }", "function displayTempInInspectorID(templateNamespace) {\r\n const namespaceContainer = document.getElementById(\"namespaceContainer\"); \r\n for(let i = 0; i < templateNamespace.length; i++) {\r\n //Create elements to display\r\n const label = document.createElement(\"label\");\r\n const namespaceBtn = document.createElement(\"button\");\r\n const namespaceDiv = document.createElement(\"div\");\r\n\r\n //separate prefix name from url\r\n const templateNamespaceArr = templateNamespace[i].split(' ');\r\n const prefixValue = templateNamespaceArr[0];\r\n const url = templateNamespaceArr[1];\r\n\r\n label.innerHTML = prefixValue;\r\n namespaceBtn.innerHTML = \"X\";\r\n namespaceBtn.className = \"btn btn-danger\" //namespaceBtn\r\n namespaceBtn.style = \"margin:1px\";\r\n namespaceDiv.id = prefixValue;\r\n namespaceDiv.style = \"overflow-y: auto\";\r\n namespaceDiv.appendChild(label);\r\n namespaceDiv.appendChild(namespaceBtn);\r\n\r\n namespaceContainer.appendChild(namespaceDiv);\r\n namespaceArray.prefix[prefixValue] = url;\r\n\r\n displayNamespaceInspecID(prefixValue);\r\n\r\n namespaceBtn.addEventListener(\"click\", function() {\r\n deleteNameSpace(prefixValue);\r\n });\r\n displayNamespaceInspecAttr(prefixValue + \":\");\r\n }\r\n}", "function displayFolders(content){\n\n var parent = document.getElementById(\"folders\");\n\n // Main\n var folderDIV = setDOMAttributes(\"div\", \"root\");\n var folderDOM = setDOMAttributes(\"p\", undefined, \"Main\", \"\");\n\n folderDIV.appendChild(folderDOM);\n parent.appendChild(folderDIV);\n\n // Other folders\n function recursionFunction(passedContent, dir){\n var content = passedContent;\n\n var folderDIV = setDOMAttributes(\"div\", \"subdir\");\n\n var folderDOM;\n for(var i = 0; i < content.length; i++){\n\n if(content[i].type == \"folder\"){\n\n if(dir == 0){\n folderDIV = setDOMAttributes(\"div\", \"root\");\n }\n\n folderDOM = setDOMAttributes(\"p\", undefined, content[i].name, content[i].path);\n\n folderDIV.appendChild(folderDOM);\n\n if(content[i].contents.length != 0){\n var subdirDIV = recursionFunction(content[i].contents, dir + 1);\n if(subdirDIV.children.length != 0){\n folderDIV.appendChild(subdirDIV);\n }\n }\n\n if(dir == 0){\n parent.appendChild(folderDIV);\n }\n\n }\n\n }\n\n return folderDIV;\n\n }\n recursionFunction(content, 0);\n}", "function getNamespacesFromAddress() {\r\n let adr = address.value;\r\n let sanitizedAdr = adr.toUpperCase().replace(/-|\\s/g, \"\");\r\n if (adr == \"\") {\r\n address.focus();\r\n return false;\r\n }\r\n _doGet('/account/namespace/page?address=' + sanitizedAdr);\r\n }", "function relHandler(req, reply) {\n var rel = internals.namespaces[req.params.namespace] && internals.namespaces[req.params.namespace][req.params.rel];\n if (rel) {\n reply.view('rel', rel);\n } else {\n reply('Not found').code(404);\n }\n }", "build_paths() {\n return {\n items: {\n list: { // Returns a list of items\n method: \"GET\",\n path: \"items\", \n }, \n item: { // Returns a single item with ID %%\n method: \"GET\",\n path: \"items/%%\"\n }, \n item_metadata: { // Returns metadata for item %%\n method: \"GET\",\n path: \"items/%%/metadata\", \n }, \n item_bitstreams: { // Returns available bitstreams for item %%\n method: \"GET\",\n path: \"items/%%/bitstreams\" \n },\n find_by_metadata: { // Returns items based on specified metadata value\n method: \"POST\",\n path: \"items/find-by-metadata-field\"\n } \n },\n query: { \n filtered_items: { // Returns items based on chosen filters\n method: \"GET\",\n path: \"filtered-items\", \n }, \n filtered_collections: { // Returns collections based on chosen filters\n method: \"GET\",\n path: \"filtered-collections\",\n }, \n collection: { // Returns collection with ID %%\n method: \"GET\",\n path: \"filtered-collections/%%\",\n } \n },\n bitstreams: { \n list: { // Returns all bitstreams in DSpace\n method: \"GET\",\n path: \"bitsreams\"\n },\n item: { // Returns an item with bitstream ID %%\n method: \"GET\",\n path: \"bitstreams/{%%}\"\n },\n item_policy: { // Returns the policy for a bitstream with ID %%\n method: \"GET\",\n path: \"bitstreams/%%/policy\"\n },\n content: { // Retrieve content for a bitstream with ID %%\n method: \"GET\",\n path: \"bitstreams/%%/retrieve\"\n }\n },\n schemas: {\n list: { // Returns a list of all schemas\n method: \"GET\",\n path: \"registries/schema\"\n },\n item: { // Returns a metadata schema with schema prefix %%\n method: \"GET\",\n path: \"registries/schema/%%\"\n },\n field: { // Returns a metadata schema with field ID %%\n method: \"GET\",\n path: \"registries/metadata-fields/%%\"\n }\n }\n };\n }", "function getChildren(dataRef){\n $.getJSON(dataRef + \"?format=json&callback=?\", function(childData){\n var childList = childData.EntityDirectory.entry;\n var html = \"<ul id=\\\"level1\\\" >\";\n for (var i in childList) {\n var name = childList[i].knownEntityDescription[0].designation;\n var ref = childList[i].knownEntityDescription[0].href;\n var icon = \"<span>\" +\n \"<i class=\\\"glyphicon glyphicon-plus-sign\\\"></i></span>\";\n html = html +\"<li>\" +\n \"<a id=\\\"level1\\\" data-index='\" + i + \"' data-cts2ref='\" + ref +\n \"' label-default=\\\"\\\" class=\\\"tree-toggle nav-header\\\" >\" + icon\n + name + \"</a></li>\";\n }\n $(\"li#root\").append(html + \"</ul>\");\n\n });\n}", "function showContent(path, query){\r\n\t\t\tpageRootPath = pageRootPath || path; // first time-set\r\n\t\t\tvar urlState = jQuery.parseQuery(query);\r\n\t\t\turlState.content = urlState.content || 'simulations';\r\n\t\t\tvar controllerUri = contentRegister[urlState.content];\t\t\t\r\n\t\t\tif(!controllerUri){\r\n\t\t\t\tthrow new Error('This content-name is not registered, '+urlState.content);\r\n\t\t\t}\r\n\t\t\trequire([controllerUri], function(Controller){\t\t\r\n\t\t\t\tvar formerContentController = currentContentController;\r\n\t\t\t\tcurrentContentController = new Controller(urlState);\r\n\t\t\t\tcurrentContentController\r\n\t\t\t\t .on(BaseContentController.READY, function(){\r\n\t\t\t\t \tasync.series([view.createHideContentTask(formerContentController),\r\n\t\t\t\t \t view.createShowContentTask(currentContentController)]);\t\t\t\t\t\r\n\t\t\t\t\t })\r\n\t\t\t\t\t.init();\r\n\t\t\t});\r\n\t\t}", "function domdomdom() {\n //Gets the current user\"s subcategories and displays them\n var User = Parse.Object.extend(\"User\"),\n user = new Parse.Query(User),\n current = Parse.User.current();\n\n user.equalTo(\"objectId\", current.id);\n user.find().then(function (results) {\n var d, output, e, element;\n for (d = 0; d < results.length; d += 1) {\n output = results[d].get(\"subcategories\");\n //pass the subcategories to the next then\n for (e = 0; e < output.length; e += 1) {\n element = $(\"<div id='\" + output[e] + \"' \" + \"class='well'><button id='remove\" + output[e] + \"'\" + \" class='rem glyphicon glyphicon-remove'></button></div>\");\n $(\"#here\").append(element);\n $(\"#remove\" + output[e] + \" \").on(\"click\", func0(this));\n nomenclature(output[e]);\n }//End of second for loop\n }\n }).then(function () {\n console.info(\"domdomdom complete\");\n }, function () {\n console.log(\"ERROR in domdomdom()\");\n });\n }//End of domdomdom", "function getMosaicsFromNamespace() {\r\n let spc = namespace.value;\r\n if (spc == \"\") {\r\n namespace.focus();\r\n return false;\r\n }\r\n _doGet('/namespace/mosaic/definition/page?namespace=' + spc);\r\n }", "function lookup(connection, path, callback) {\n\tpath = paths.resolve(path);\n\tvar comps = paths.resolve(path).split('/');\n\twhile (comps[0] === '') comps.shift();\n\tvar currentNode = fileTree[\"/\"];\n\twhile (currentName = comps.shift()) {\n\t\tcurrentNode = currentNode.children[currentName];\n\t}\n\tconsole.log(currentNode);\n\treturn callback(currentNode);\n\tif (comps.length === 0) {\n\t\treturn callback({ \"type\":\"folder\", \"id\":0, \"name\":'/' });\n\t}\n\tgfi({'id':0,'type':'folder'}, comps, callback);\n}", "function processResponse(){\n if ((xmlObj.status ==200) && (xmlObj.readyState == 4)){\n \n allNamespaces = JSON.parse(xmlObj.responseText)\n const nsSelect = document.getElementById(\"namespaces\")\n for (var i=0; i<allNamespaces.length; i++){\n var anOption = document.createElement(\"option\")\n anOption.innerHTML=allNamespaces[i].metadata.name\n nsSelect.appendChild(anOption)\n }\n }\n}", "function showAllConcepts(tag){\n\t\tnew Ajax.Updater('disambiOntologyContainer', 'ajax/personalMapping.php?tag='+tag);\n\t}", "function fetchStructure() {\n return $mmaModScorm.getOrganizations(scorm.id).then(function(organizations) {\n $scope.organizations = organizations;\n\n if (!$scope.currentOrganization.identifier) {\n // Load first organization (if any).\n if (organizations.length) {\n $scope.currentOrganization.identifier = organizations[0].identifier;\n } else {\n $scope.currentOrganization.identifier = '';\n }\n }\n\n return loadOrganizationToc($scope.currentOrganization.identifier);\n });\n }", "render3(url) {\n var rootNode = this.rootNode;\n //document.getElementById(rootNode.id + \"_childs\").innerHTML = \"\";\n rootNode.visible = true;\n\n //getItems();\n var xhttp = new XMLHttpRequest();\n xhttp.onreadystatechange = function () {\n if (this.readyState == 4 && this.status == 200) {\n var jsTxt = xhttp.responseText;\n var items = eval(\"(\" + jsTxt + \")\");\n for (var i in items) {\n var lectItem = items[i];\n this.addLectItem(rootNode, lectItem);\n }\n }\n };\n xhttp.open('GET', url, true);\n xhttp.send();\n }", "function dispatch(path) {\n\t\treq.setDispatched(true);\n\t\t\n\t// 2.1. try to find the package from the request\n\t\tfindPackage(res, path, function(err, path) {\n\t// 2.2. require the specified module from the found package\n\t\t\tvar result = null; // vm....\t\n\t\t\t\n\t// 2.3. If still not dispatched, validate that the next iteration\n\t// will dispatch to a different package and/or module\n\t\t\tif (!req.isDispatched()) {\n\t\t\t\tdispatch(res.path);\n\t\t\t} else {\n\t// 2.4. Render view from req.path\n\t\t\t\tres.writeHead(200, {'Content-Type': 'text/plain'});\n\n\t\t\t\tres.write('Dispatching to : ' + path + \"\\n\");\n\t\t\t\tres.end();\n\t\t\t}\n\t\t});\n\t}", "function doSomethingWithDataTree(root){\n\tvar length = root.children.length;\n\tcurrentSeason = root.children[length-1].name.toLowerCase();\n\t//console.log(currentSeason);\n\tif (currentSeason == \"spring\") {showSpring();}\n\tif (currentSeason == \"fall\") {showFall();}\n\tif (currentSeason == \"winter\") {showWinter();}\n}", "function index() {\n\n return $http.get(treeBase)\n .then(function(data){ return data; });\n }", "function getNamespace(subtree, path) {\n if (path.length === 1) return subtree\n\n const namespace = path.shift()\n subtree[namespace] = {\n ...subtree[namespace],\n }\n return getNamespace(subtree[namespace], path)\n}", "function getNamespace(subtree, path) {\n if (path.length === 1) return subtree\n\n const namespace = path.shift()\n subtree.modules[namespace] = {\n modules: {},\n namespaced: true,\n ...subtree.modules[namespace],\n }\n return getNamespace(subtree.modules[namespace], path)\n}", "function getNamespace(subtree, path) {\n if (path.length === 1) return subtree\n\n const namespace = path.shift()\n subtree.modules[namespace] = {\n modules: {},\n namespaced: true,\n ...subtree.modules[namespace],\n }\n return getNamespace(subtree.modules[namespace], path)\n}", "function displayTree(node){\n\tvar\tstr = \"\";\n\tfunction createTreeHTML(node){\n\t\tstr = str + \"<div><p class='status-\" + node.status+ \"'>\" + node.value + \"</p>\";\n\t\tfor(var child in node.children){\n\t\t\tcreateTreeHTML(node.children[child]);\t\n\t\t}\n\t\tstr = str + \"</div>\";\n\t}\n\tcreateTreeHTML(node);\n\t$('#tree-container').html(str);\n}", "getUserAccessAllNamespaces(variables) {\n return client.query({ query: Query.userAccessAnyNamespaces, variables })\n }", "function getPageNS() {\r\n\tvar id = $.mosaikRuntime.path;\r\n\tid = id.replace(/\\//g, \".\");\r\n\tid = \"page\" + id;\r\n\treturn id;\r\n}", "function showMenuContentsFor(menuNamePassback) {\n\n var data = menuDataBlocks[menuNamePassback]; // load the prefetched data\n var firstKey; // a catch to jump to the first subtopic elements\n menuitems = Object.size(data); // determine how many elements are in the subtopic dataset\n menuName = menuNamePassback; // rename the passback variable\n\n\n $(\"#awbs-navbar-\" + menuName + \"-selections ul\").empty(); // empty out the selection list\n $(\"#awbs-navbar-\" + menuName + \"-contents\").empty(); // empty out the contents panel\n\n for (var key in data) { // loop through the data set\n if (typeof firstKey == 'undefined') { // set the first key, as for mentioned above.\n firstKey = _.snakeCase(key).toLowerCase(); // set that first key\n }\n keyname = _.snakeCase(key).toLowerCase(); // set the keyname for the next step\n contentItems[keyname] = ''; // empty the template set.\n //\tconsole.log('path', data[key].path);\n $(\"#awbs-navbar-\" + menuName + \"-selections ul\").append(\n \"<li class='animated fadeInLeft'><a href='/\" +\n data[key].path +\n \"' class='menu-select-section' id='\" + keyname +\n \"'>\" +\n key + \"</a></li>\"); // populate the selection list with subtopics\n\n contentItemsCount = Object.size(data[key].items); // how many boxes are there to display\n\n void 0;\n for (var i = 0; i < contentItemsCount; i++) { // for each item in the item count\n template = _.template(\n '<div class=\"col-xs-12 col-md-3 content-item-container animated fadeInRight\"> <div class=\"row\"><div class=\"col-xs-12 content-item\"><div class=\"row\"><a href=\"<%- href %>\"><div class=\"col-xs-12 content-item-image\" style=\"background-image:url(<%- image %>);\"></div><div class=\"col-xs-12 content-item-title\"><%- title %></div></a></div></div></div></div>'\n ); // generate a template string\n void 0;\n contentItems[keyname] += template({\n 'href': \"/\" + data[key].items[i].href,\n 'image': data[key].items[i].image.src,\n 'title': data[key].items[i].title\n }); // and compile it with the pertinent data\n void 0;\n }\n }\n\n\n $(\"#awbs-navbar-\" + menuName + \"-contents\").append(contentItems[firstKey]); // append the item set for the first subtopic to the content panel\n $(\"#awbs-navbar-\" + menuName + \"-selections ul li a\").eq(0).addClass(\n 'active'); // mark the first item in the subtopic selection list as 'active'\n }", "function initNameSpace() {\r\n getTopStories();\r\n }", "displayFolderStructure() {\n // Set the app to loading\n this.isLoading = true;\n\n // Create an empty object\n const structure = {\n\tfolders: [],\n\tfiles: []\n }\n \n // Get the structure\n this.getFolderStructure(this.path).then(data => {\n\n\tfor (let entry of data) {\n\t // Check \".tag\" prop for type\n\t if(entry['.tag'] == 'folder') {\n\t structure.folders.push(entry);\n\t } else {\n\t structure.files.push(entry);\n\t }\n\t}\n\n\t// Update the data object\n\tthis.structure = structure;\n\tthis.isLoading = false;\n });\n }", "function resolvePath(path, namespace) {\n let ret = {\n pathHead: \"\", // pathname leading to namespace\n namespace: namespace,\n name: '', // single character name of content in that namespace\n item: namespace,\n pathTail: \"\" // remaining path\n };\n let cont;\n let i = 0;\n for (let c of path) {\n ret.pathHead += ret.name;\n ret.namespace = ret.item;\n ret.name = c;\n ret.item = ret.namespace.content[c];\n i++;\n if (!ret.item) {\n // this namespace doesn't have that element, so make a blank namespace\n ret.namespace.content[c] = resNamespaceItem({});\n ret.item = ret.namespace.content[c];\n }\n if (ret.item.type != ResType.NAMESPACE) {\n ret.pathTail = path.slice(i);\n return ret;\n }\n }\n return ret;\n}", "viewAllAreas (baseUrl,username,spacename){\n browser.get(baseUrl + username + \"/\" + spacename +\"/areas\");\n }", "function renderDomain () {\n renderSites();\n renderEvents();\n renderNarratives();\n }", "function render6(){\n\n\tvar context = {\n\t\tchildren: [{\n\t\t\tname:'Europe',\n\t\t\tchildren:[{\n\t\t\t\tname:'Belgium', \n\t\t\t\tchildren:[{\n\t\t\t\t\tname:'Brussels'},{\n\t\t\t\t\tname:'Namur'},{\n\t\t\t\t\tname:'Antwerpen'}]},{\n\t\t\t\tname:'Germany'},{\n\t\t\t\tname:'UK'}\n\t\t\t]},{\n\t\t\tname:'America',\n\t\t\tchildren:[{\n\t\t\t\tname:'US',\n\t\t\t\tchildren:[{\n\t\t\t\t\tname:'Alabama'},{\n\t\t\t\t\tname:'Georgia'}\n\t\t\t\t]},{\n\t\t\t\t\tname:'Canada'},{\n\t\t\t\t\tname:'Argentina'}]},{\n\t\t\tname:'Asia'},{\n\t\t\tname:'Africa'},{\n\t\t\tname:'Antartica'}]};\n\tvar directive = {\n\t\t'li+':function(arg){\n\t\t\tif(arg.item.children){\n\t\t\t\treturn $p.compiledFunctions.tree.compiled(arg.item);}}};\n\n\t$('ul.treeItem').compile('tree', directive, context);\n\t$('ul.treeItem').render(context, 'tree');}", "function viewTree(dirPath , indent ){\n // dirPath -> file/ folder \n\n let isFile = isFileChecker(dirPath); // check the file or not \n\n // \n if(isFile == true){\n console.log(indent, path.basename(dirPath + \"*\"));\n }\n \n else{\n // directory \n // console.log\n //print path \n console.log(indent ,path.basename(dirPath)); // base name means return the last value from the whole line \n // get Childrens\n\n let Childrens = readContent(dirPath); // returns array of folder name\n\n // call from view flat \n for(let i =0;i<Childrens.length;i++){\n viewTree( path.join( dirPath , Childrens[i]) , indent +\"\\t\" );\n }\n // console.log(\"children : \" , childrens[i]);\n }\n\n \n}", "function getAllCategories() {\n $.get(\"FAQ/GetEveryCategories\", function (output) {\n allCategories = output; \n printAllCategories(output);\n });\n}", "function printSummary(oNode)\n{\n\t/*\n\tvar sLabel = Sarissa.getText(oNode.selectSingleNode(\"@label\"));\n\tvar sNamespace = Sarissa.getText(oNode.selectSingleNode(\"@namespace\"));\n\tvar sChr = Sarissa.getText(oNode.selectSingleNode(\"@chr\"));\n\tvar sStart = Sarissa.getText(oNode.selectSingleNode(\"@start\"));\n\tvar sEnd = Sarissa.getText(oNode.selectSingleNode(\"@end\"));\n\tvar sClass = Sarissa.getText(oNode.selectSingleNode(\"@class\"));\n\tvar sStatus = Sarissa.getText(oNode.selectSingleNode(\"status\"));\n\t*/\n\tvar sLabel = oNode.selectSingleNode(\"@label\").nodeValue;\n\tvar sNamespace = oNode.selectSingleNode(\"@namespace\").nodeValue;\n\tvar sChr = oNode.selectSingleNode(\"@chr\").nodeValue;\n\tvar sStart = oNode.selectSingleNode(\"@start\").nodeValue;\n\tvar sEnd = oNode.selectSingleNode(\"@end\").nodeValue;\n\tvar sClass = oNode.selectSingleNode(\"class\").textContent;\n\tvar sStatus = oNode.selectSingleNode(\"status\").textContent;\t\n\n\t// Get the type of namespace\n\tvar sQueryId = sLabel;\n\tvar sQueryNamespace = sNamespace;\n\tvar sTypeLabel = getNamespaceLabel(sNamespace);\n\n\t// Add DBLinks\n\tvar sDBLinkResponse = '';\n\tvar sExternalId = '';\n\tvar oNodeListDBLink = oNode.selectNodes(\"dblink\");\n\tif (oNodeListDBLink.length > 0) {\n\t\tfor (var i = 0; i < oNodeListDBLink.length; i++) {\n\t\t\t/*\n\t\t\tvar sIdDBLink = Sarissa.getText(oNodeListDBLink[i].selectSingleNode(\"@id\"));\n\t\t\tvar sNamespaceDBLink = Sarissa.getText(oNodeListDBLink[i].selectSingleNode(\"@namespace\"));\n\t\t\t*/\n\t\t\tvar sIdDBLink = oNodeListDBLink[i].selectSingleNode(\"@id\").nodeValue;\n\t\t\tvar sNamespaceDBLink = oNodeListDBLink[i].selectSingleNode(\"@namespace\").nodeValue;\t\t\t\n\t\t\tvar sLabelDBLink = getNamespaceLabel(sNamespaceDBLink);\n\t\t\tif (sIdDBLink && sNamespaceDBLink && sLabelDBLink) {\n\n\t\t\t\tif (sNamespaceDBLink == \"External_Id\") {\n\t\t\t\t\tsExternalId += sIdDBLink;\n\t\t\t\t} else {\n\t\t\t\t\tif (sNamespaceDBLink == \"Ensembl_Gene_Id\") {\n\t\t\t\t\t\tvar sReportLink = \"javascript: window.location='report.html?queryId=\"+sIdDBLink+\"&namespace=\"+sNamespaceDBLink+\"'\";\n\t\t\t\t\t\tsDBLinkResponse += \"<span class='subtitle'>\"+sLabelDBLink+\": <a onclick=\\\"\"+sReportLink+\"\\\">\"+sIdDBLink+\"</a></span>\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Add input info\n\tvar sResponse = \"<div class='title'>\"+sTypeLabel+\": \" +sLabel+ \" (\"+sExternalId+\")\"+\"</div>\";\t\n\tif(sChr && sStart && sEnd) {\n\t\tsResponse += \"<span class='subtitle'>Location:</span> \"+\"chr\"+sChr+\":\"+sStart+\"-\"+sEnd+\"<br/>\";\n\t}\n\tif(sClass) {\n\t\tsResponse += \"<span class='subtitle'>Class:</span> \"+sClass+\"<br/>\";\n\t}\t\t\t\t\t\t\n\tif(sStatus) {\n\t\tsResponse += \"<span class='subtitle'>Status:</span> \"+sStatus;\n\t}\n\tsResponse += \"<br/>\"+sDBLinkResponse;\n\t\n\treturn sResponse;\n}", "function populateRoot(rootName){\n var iconizedRoot = \"<span><i class=\\\"glyphicon glyphicon-plus-sign\\\"></i></span>\" + rootName;\n $(\"a#label-root\").html(iconizedRoot);\n}", "function details(term) {\n $.get(\"/search/\" + term, function (d) {\n return d.nodes;\n });\n }", "function renderPath(path) {\n var data = path.split('/');\n var chosePathComponent = document.getElementById('chosePathComponent');\n var componentHtmlData = '';\n data.forEach(function (element, index) {\n componentHtmlData += '<a href=\"#!\" id=\"' + index + '\"' + 'class=\"breadcrumb\" onclick=\"newPathLevel(this.id)\">' + element + '</a>';\n }, this);\n chosePathComponent.innerHTML = componentHtmlData;\n}", "function fetchNamespaces() {\n return services_k8s.getNamespaces().done(function (namespaceDataArray) {\n src_reactor[\"a\" /* default */].dispatch(SITE_RECEIVE_NAMESPACES, namespaceDataArray);\n });\n}", "function NamTree(div){ //div is the <div> DOM element where this tree is to be displayed\n\t//standard/default iamges\n\tthis.imagesDir\t\t= '/egi/resources/erp2/images/';\n\tthis.collapsedGif\t= this.imagesDir + 'plus.gif';\n\tthis.expandedGif\t= this.imagesDir + 'minus.gif';\n\tthis.spaceGif\t\t= this.imagesDir + 'space.gif';\n\tthis.leafGif\t\t= this.imagesDir + 'page.gif';\n\tthis.folderGif\t\t= this.imagesDir + 'folder.gif';\n\tthis.folderOpenGif\t= this.imagesDir + 'folderopen.gif';\n\tthis.styleToShow= ''; //style.disply attribute\n\tthis.styleToHide\t= 'none';\n\n\t// configurable parameters. These can be modified with the <parameter> in XML\n\tthis.indent\t\t\t= 20; //each indent shifted by 20 pixels\n\tthis.normalBackgroundColor\t \t= 'white';\n\tthis.highlightedbackgroundColor = 'blue';\n\tthis.normalColor \t= 'navy';\n\tthis.highlightedColor= 'white';\n\tthis.fontFamily\t\t= 'arial';\n\tthis.fontSize\t\t= '9pt';\n\tthis.searchIsRequired= 'false';//making it a boolean had issues with loading from XML\n\t\n\tdiv.setAttribute('namTree', this); //link the div and tree so that we can get one from the other\n\tthis.div\t\t= div;\n\n\tthis.images\t\t= new Object(); //stores images for different types of nodes\t\n\tthis.nodeCount\t= 0;\n\tthis.nodes\t\t= new Object(); //contains all node objects as properties\n\tthis.sortedNodes= null; //sorted on a need basis and kept.\n\n\tthis.selectedNode= null;//points to the node user has clicked\n\tthis.searchString =\t\"\"; //last search string\n/* creates a new node.\n * id has to be unique. it is typically an internal code used by the system. id is not displayed. \n * name is diaplyed. need not be unique, even for a parent. \n * paentid id is optional. It is possible to first create nodes, and then 'link' them to create the tree\n * alternately, the parent id can be specified at the time of creating the node, even if the\n * parent id is not created yet.\n * This feature allows a server to just dump the rows of its table without worrying about the order\n * \n */\n\nthis.createNode = function (type, id, name, parentid){\n\tif(!id || !name) return (false);\n\t\n\tvar node\t\t= this.nodes[id];\n\tif (node){ //node exists. design is not to generate error, but just modify it\n\t\tnode.name\t= name;\n\t}else{ //create a new node\n\t\tnode\t\t= new NamNode(this, type, id, name);\n\t\tnode.tree\t= this;\n\t\tthis.nodes[id] = node;\n\t\tthis.nodeCount ++;\t\t\n\t}\n\t\n\tif (parentid)\n\t\tif ( parentid.toUpperCase() == 'NULL' || parentid == 0 || parentid == '') parentid = null;\n\tif(parentid) this.link(id,parentid);\n\treturn (node);\n}\n\n/* \n * link is used to creat/remove parent-child relationship between nodes\n * existing link is removed if the new link can be created or parent id is null\n * parent node is created if required before linking\n */\n\nthis.link = function (childid, parentid){ \n\tvar child = this.nodes[childid];\n\tif (!child) return(false);\n\t\n\tvar added\t= false;\n\tvar removed = false;\n\tvar oldparent\t= child.parent;\n\n\tif (parentid){\n\t\tvar\tparent\t\t\t= this.nodes[parentid];\n\t\tif (!parent) parent = this.createNode('node', parentid,'new',null); //create in anticipation. Name will be attached later\n\t\tif(!child.canAttachTo(parent)) return(false); //wrong connection tried :-) \n\t\tparent.children[childid] = child;\n\t\tparent.childCount++;\n\t\tchild.parent = parent;\n\t\tadded\t= true;\n\t}\n\t\n\tif(oldparent){ //old link exists\n\t\toldparent.children[childid] = null;\n\t\toldparent.childCount--;\n\t\tif(!added) child.parent = null; //this case was to just remove the link\n\t\tremoved = true;\n\t}\n\t\n\treturn (added || removed); //returns true if something was done\n}\n\n/* Creates all the HTML DOM elements to display the tree. \n * Initially, only the root nodes are visible, while the rest are all hidden\n * All the rows are created. Root nodes are set with display attribute as blocked while the rest with 'none'\n */\n\nthis.display = function (){\t\n\n\tvar div = this.div;\n\tdiv.innerHTML = ''; //zap existing content\n\tdiv.style.backgroundColor = this.normalBackgroundColor;\n\tdiv.style.color\t\t\t= this.normalColor;\n\tdiv.style.fontFamily\t= this.fontFamily;\n\tdiv.style.fontSize\t\t= this.fontSize;\n\tdiv.onclick\t\t\t\t= NamTreeClick;\n\tdiv.ondblclick\t\t\t= NamTreeDblClick;\n\tdiv.onmouseover\t\t\t= NamTreeMouseOver;\n\tdiv.onmouseout\t\t\t= NamTreeMouseOut;\n/*\n\tif (this.searchIsRequired && this.searchIsRequired.toString().toUpperCase() != 'FALSE' ){\n\t\tvar divform = document.createElement('DIV'); //for search fields and buttons\n\t\tdiv.appendChild(divform);\n\t\t\n\t\tvar ele = document.createElement('INPUT');\n\t\tele.divId = div.id;\n\t\tele.id = 'searchField';\n\t\tele.width = 15;\n\t\tele.onchange = NamTreeSearchEvent;\n\t\tdivform.appendChild(ele);\n\t\t\n\t\tele = document.createElement('INPUT');\n\t\tele.type = 'button';\n\t\tele.value = 'Search';\n\t\tele.divId = div.id;\n\t\tele.id = 'searchButton';\n\t\tele.onclick = NamTreeSearchEvent;\n\t\tdivform.appendChild(ele);\n\n\t\tele = document.createElement('INPUT');\n\t\tele.type = 'button';\n\t\tele.value = ' ++ ';\n\t\tele.title = 'Expand All';\n\t\tele.divId = div.id;\n\t\tele.id = 'expandAll';\n\t\tele.onclick = NamTreeSearchEvent;\n\t\tdivform.appendChild(ele);\n\t\t\n\t\tele = document.createElement('INPUT');\n\t\tele.type = 'button';\n\t\tele.value = ' - - ';\n\t\tele.title = 'Collapse All';\n\t\tele.divId = div.id;\n\t\tele.id = 'collapseAll';\n\t\tele.onclick = NamTreeSearchEvent;\n\t\tdivform.appendChild(ele);\n\t\t\n\t\tvar ihtm = '<input width=\"15\" onchange=\"NamTreeSearchEvent(1,\" \n\t\t\t +\"'\" +div.id +\"','\" +this.value +')\">&nbsp;';\n\t\tihtm += '<input type=\"button\" value=\"Search\" name=\"searchNode\" id=\"searchNode\" onclick=\"NamTreeSearchEvent(2,\"'\n\t\t\t +\"'\" +div.id +\"'\" +')\">&nbsp;';\n\t\tihtm += '<input type=\"button\" value=\" - - \" name=\"collapseAll\" id=\"collapseAll\" onclick=\"NamTreeSearchEvent(3,\"'\n\t\t\t +\"'\" +div.id +\"'\" +')\">&nbsp;';\n\t\tihtm += '<input type=\"button\" value=\" ++ \" name=\"expandAll\" id=\"expandAll\" onclick=\"NamTreeSearchEvent(4,\"'\n\t\t\t +\"'\" +div.id +\"'\" +')\">&nbsp;';\n\t\tdivform.innerHTML = ihtm;\n\n\t}\n\n*/\n\t\n\tvar tbl\t\t= document.createElement('TABLE');\n\ttbl.setAttribute('border','0');\n\ttbl.setAttribute('cellSpacing','0');\n\tdiv.appendChild(tbl);\n\t\n\tvar tbody = document.createElement('TBODY');\n\ttbl.appendChild(tbody);\t\n\t\n\tvar node = null;\n\tfor (var a in this.nodes){\n\t\tnode\t= this.nodes[a];\n\t\tif (node && node.parent == null)node.display(tbody, 0); //display only the root nodes. They in turn will display the branches below them\n\t}\n}\n\n/*\n * If a selected node is hidden (when one of its ancestors collapses :-)\n * the selection is shifted to the first ancestor that is visible.\n */\n\nthis.shiftSelection = function (){\n\tif (!this.selectedNode ) return true;\n\tif (this.selectedNode.displayed) return true;\n\tvar p = this.selectedNode.parent;\n\twhile (p && !p.displayed) p = p.parent; //root parent is guaranteed to be displayed always\n\tp.select(false); //false -> selected node should not be expanded,\n}\n\n/*\n * Expands or collpases the entire tree\n * expand = true means expand, else collapse\n */\n\nthis.expandCollapse = function (expand){\n\tvar n = null;\n\tfor (var a in this.nodes){\n\t\tn = this.nodes[a];\n\t\tif (!n.parent) n.expandCollapse(expand, true); //root nodes are expanded/collpased with cascade effect\n\t}\n}\n/*\n * Method to load tree from an XML file\n * This tree is designed specifically for a server that stores tree in a relational DB\n * Hence, we do not use an XML tree. The XML simply contains just one level of nodes. \n * XML can have a <confiure> tag that can set various attributes of the tree\n *\t\t an <images> section that can supply gif file names for different types of tree nodes\n *\t <tree> that contains all the nodes of the tree as is children. \n * <TO DO> write DTD for the XML\n */\n\nthis.loadFromXML = function (xmlFile){\n\tvar xmlDoc = null;\n\tvar attrib, obj, img;\n\tif( document.implementation && document.implementation.createDocument) { //W3C spec implemented\n\t\txmlDoc = document.implementation.createDocument(\"\",\"\",null);\n\t\txmlDoc.load(xmlFile);\nbootbox.alert('XML Loaded but not sure whether it completed or not. hence this alert. Press Ok after few seconds..');\n\t\t//TO DO: How to check ready state and errors???\n\t}else if ((typeof ActiveXObject) != \"undefined\"){ //IE \n\t\txmlDoc = new ActiveXObject(\"msxml2.DOMDocument.4.0\");\n\t\txmlDoc.async = false;\n\t\txmlDoc.load(xmlFile);\n\t\tif (xmlDoc.parseError && xmlDoc.parseError.errorCode != 0){\n\t\t\tbootbox.alert('Error loading XML file ' +xmlFile +'. Reason is: ' + xmlDoc.parseError.reason);\n\t\t\treturn false;\n\t\t}\n\t}else{\n\t\tbootbox.alert('Sorry, your browser doses not support XML Load.');\n\t\treturn false;\n\t}\n\tvar namtree = xmlDoc.documentElement;\n\tvar len = namtree.childNodes.length;\n//bootbox.alert('XML Loaded to namtree namtree = ' + namtree + 'namTree has ' + namtree.childNodes.length + ' children');\n\tfor(i=0; i<len; i++){\n\t\tvar node = namtree.childNodes[i];\n\t/*\n\t * XML should contain three elements at the top.\n\t * 1. <parameters .....> this element should set paramaters\n\t * 2. <types> with <type> as its children. each <type> element describes a type of node\n\t * 3. <nodes> with <node> as its children.\n\t * This rotine has hard coded this sequence of elements\n\t */\n\t\tswitch (node.nodeName){\n\t\tcase 'paramaters':\n\t\t\tobj = node.attributes;\n\t\t\tfor( var j=0; j<obj.length; j++){\n\t\t\t\tattrib = obj[j].name;\n\t\t\t\tif (this[attrib]) this[attrib] = obj[j].value;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'types':\n\t\t\tobj = node.childNodes;\n\t\t\tfor (var j=0; j<obj.length; j++){\n\t\t\t\tattrib = obj[i].getAttribute('img');\n\t\t\t\tif (attrib){\n\t\t\t\t\timg = document.createElement('IMG');\n\t\t\t\t\timg.src = this.imagesDir +attrib;\n\t\t\t\t\tthis.images[obj[j].getAttribute('value')] = img;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'nodes':\n\t\t\tobj = node.childNodes;\n\t\t\tfor (var j=0; j < obj.length; j++){\n\t\t\t\tthis.createNode(obj[j].getAttribute('type'), obj[j].getAttribute('id'), obj[j].getAttribute('name'), obj[j].getAttribute('pid'));\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}\n}\n/*\n * Sorting order used is 'depth-first'. It would be the order in which nodes are displayed\n *\t\twhen every node is expanded.\n */\n\nthis.sort = function (){\n\tif (this.sortedNodes)return(true);\n\t\n\tthis.sortedNodes = new Array(this.nodeCount);\n\tvar idx = 0;\n\tvar p = null;\n\tfor(var a in this.nodes){ //for each root nodes\n\t\tp = this.nodes[a];\n\t\tif (p.parent == null){\n\t\t\tthis.sortedNodes[idx] = p;\n\t\t\tp.sortedIndex = idx;\n\t\t\tidx++;\n\t\t\tthis.sortBranch(p,idx);\n\t\t}\n\t}\n}\n/*\n * Sorting order used is 'depth-first'. It would be the order in which nodes are displayed\n *\t\twhen every node is expanded.\n */\n\nthis.sortBranch = function (parent,idx){\n\tvar node = null;\n\tfor(var a in parent.children){ //for each root nodes\n\t\tnode = parent.children[a];\n\t\tthis.sortedNodes[idx] = node;\n\t\tnode.sortedIndex = idx;\n\t\tidx++;\n//if (idx == 73) bootbox.alert(\"I am in 73\");\n\t\tif (node.childCount > 0) idx = this.sortBranch(node,idx);\n\t}\n\treturn(idx);\n}\n\n/*\n * Searches for a string in the name of nodes, starting from the selected node.\n * if no match is found till end of tree, user is warned that the search will restart from beginning\n * if no match is found in the entire doc, user is informed\n */\n\nthis.search = function (strin){\n\n\tif (strin) this.searchString = strin;\n\telse strin = this.searchString;\n\t\n\tif (strin == ''){\n\t\tbootbox.alert('No search string specified');\n\t\treturn(false);\n\t}\n\t\n\tstr = new String(strin);\n\tstr = str.toUpperCase();\n\t\n\tif (!this.sortedNodes) this.sort();\n\tvar node = null;\n\tvar idx = (this.selectedNode)? this.selectedNode.sortedIndex + 1 : 0;\n\tvar restarted = false;\n\twhile (true){ //will come out based on user input\n\t\twhile (idx < this.nodeCount){\n\t\t\tnode = this.sortedNodes[idx];\n\t\t\tif (node.name.toString().toUpperCase().indexOf(str) >= 0){\n\t\t\t\tnode.select(false);\n\t\t\t\treturn(true);\n\t\t\t}\n\t\t\tidx++;\n\t\t}\n\t\t//if we reach here, we have reached the end\n\t\tif (restarted){\n\t\t\tbootbox.alert('No match found');\n\t\t\treturn(false);\n\t\t}\n\t\talert ('Reached end of tree. Going to start from beginning of tree');\n\t\trestarted = true;\n\t\tidx = 0;\n\t}\n\treturn(false);\n}\n\nthis.addImg = function (typ,img){\n\tvar imgobj = document.createElement('IMG');\n\timgobj.src = this.imagesDir+img;\n\tthis.images[typ] = imgobj;\n}\n}", "static get localizeNamespaces() {}", "function show(id) {\n\n return $http.get(treeBase + id)\n .then(function(data){ return data.data; });\n }", "function displayValues(directorySelected,callback)\n{ \n var n = new admiral.AsyncComputation(); \n n.eval(function(directorySelected,callback)\n { \n jQuery(\"#datDir\").val(directorySelected);\n jQuery(\"#user\").val(admiral.databanksilo);\n // Get the persisted informaton from the server to display for \n // the selected directory\n admiral.getDatasetMetadata(directorySelected,callback); \n });\n // Populate the other form fields with the value received\n n.eval(function(formValues,callback)\n { \n //Populate the values for hidden input fields \n jQuery(\"#datId\").val(formValues[\"identifier\"]);\n jQuery(\"#title\").val(formValues[\"title\"]);\n jQuery(\"#user\").val(formValues[\"creator\"]);\n jQuery(\"#description\").val(formValues[\"description\"]);\n \n //Populate the values for visible span display fields \n var displayTextnames = [\"datasetDir\", \"datasetId\", \"datasetTitle\", \"datasetDescription\"];\n var inputValues = [\"datDir\", \"datId\", \"title\", \"description\"];\n for( i=0; i< inputValues.length; i++)\n { \n value = jQuery(\"#\"+inputValues[i]).val(); \n jQuery(\"#\"+displayTextnames[i]).text(value);\n } \n });\n n.exec(directorySelected, admiral.noop); \n \n var m = new admiral.AsyncComputation(); \n m.eval(function(value,callback)\n { \n // Execute the dataset listing logic\n admiral.directoryContentsListing(directorySelected,callback); \n });\n m.eval(function(value,callback)\n { \n var baseUri = \"\";\n var seglists = admiral.segmentPaths(value.sort());\n var segtree = admiral.segmentTreeBuilder(seglists);\n var seghtml = admiral.nestedListBuilder(baseUri, segtree);\n jQuery(\"#dirtreecontents\").text(\"\");\n jQuery(\"#dirtreecontents\").append(seghtml); \n seghtml.children(\"li\").addClass(\"open\");\n seghtml.treeview({ collapsed: true });\n jQuery(\".links\").click( function()\n { \n // Display all the form fields associated with the directory selected from the list \n //displayValues(jQuery(this).attr(\"href\"), jQuery(this).text());\n return false; \n });\n callback(value);\n }); \n m.exec(directorySelected, admiral.noop); \n}", "display() {\n let o = {\n data: {},\n rawData: ''\n };\n this.getAllTrie(this.head, '', o, true);\n }", "function fullpath(d, idx) {\n idx = idx || 0;\n curPath.push(d);\n return (d.parent ? fullpath(d.parent, curPath.length) : '') +\n '/<span class=\"nodepath'+(d.name === root.name ? ' highlight' : '')+\n '\" data-sel=\"'+ idx +'\" title=\"Set Root to '+ d.name +'\">' +\n d.name + '</span>';\n }", "function GetCategoryViews() {\n $(\"#createFormPartialWrapper\").html('<div class=\"\" id=\"ajax-Accounts-loader1\" style=\"text-align: center;\"><div class=\"\" style=\"display: inline-block;\"><i class=\"fa fa-spinner fa-spin fa-3x fa-fw\"></i></div></div>');\n $(\"#dataListPartialWrapper\").html('<div class=\"\" id=\"ajax-Accounts-loader1\" style=\"text-align: center;\"><div class=\"\" style=\"display: inline-block;\"><i class=\"fa fa-spinner fa-spin fa-3x fa-fw\"></i></div></div>');\n GetAddCategoryPartial();\n GetHouseholdCategoriesPartial();\n}", "itemHeader(postItem) {\n // check to see if parent exists and render that\n var parentText = '';\n postItem.categories.map((catItem) => {\n //console.log(\"catItem in recent for item header\", catItem);\n var parentId = catItem.parent;\n //console.log(\"parent id \", parentId);\n if (parentId != 0) {\n var parent = realm.objects('Category').filtered('id == $0', parentId)[0];\n var text = parent.name.toUpperCase();\n //console.log(\"catItem filtered parent\", text);\n parentText = parentText + text + ' | ';\n }\n });\n //console.log(\"parentCat\", parentText);\n // map over item tags and render comma delimited values\n // tag ids available and need to print name of each with comma between\n var tagText = '';\n var tagLen = postItem.tags.length;\n postItem.tags.map((_tagItem, i) => {\n var name = _tagItem.name.toUpperCase();\n tagText = tagText + name;\n if (i > 1 && i !== tagLen) { //if more than 1 but not the last item\n tagText = tagText + ', ';\n }\n })\n var headerText = \"\";\n //console.log(\"tag listing per item\", tagText);\n if (parentText !== '') {\n headerText = parentText + tagText;\n } else {\n headerText = tagText;\n }\n //console.log(\"return for itemHeader\", headerText );\n return headerText\n }", "function updateDotHierarchy() {\n var hash = window.location.hash;\n var hash_split = hash.split(\"/\");\n var hierarchy = \"\";\n if (view == VIEWS.DOT) {\n for (var i = 1; i < hash_split.length; i++) {\n hierarchy += \"|\" + hash_split[i].replace(/\\d+_/, '');\n }\n }\n $(\"#dot_hierarchy_text\").html(hierarchy);\n}", "function manageRequest(content){\n folderStructure = content;\n\n displayFolders(content);\n}", "function listAssociations(itemMirror, groupingItemURI){\n var displayText;\n var cap = MAXFOLDERS;\n var length;\n console.log(itemMirror);\n $('a#upOneLvl').remove();\n $('#modalDialog div.modal-body ul').empty();\n $('div#modalDialog div.modal-footer p').remove();\n $('div#modalDialog div.modal-footer').prepend($('<p>',{text: groupingItemURI}).css('float', 'left'));\n itemMirror.listAssociations(function (error, GUIDs){\n itemMirror.getParent(function(error, parent){\n if (parent) {\n upOneLevel(parent);\n }\n });\n if (GUIDs.length >= cap) {\n length = cap\n }else {\n length = GUIDs.length\n }\n for (var i=0;i<length;i++){\n itemMirror.getAssociationDisplayText(GUIDs[i], function(error, text){\n displayText = text;\n });\n prntAssoc(error, displayText, GUIDs[i], itemMirror);\n }\n if (error) {\n console.log(error);\n }\n });\n }", "function PathSearchResultCollector() {\n\n}", "getNamespace(namespaceId) {\n return this.getNetworkTypeObservable().pipe(operators_1.mergeMap((networkType) => rxjs_1.from(this.namespaceRoutesApi.getNamespace(namespaceId.toHex())).pipe(operators_1.map(response => {\n const namespaceInfoDTO = response.body;\n return new NamespaceInfo_1.NamespaceInfo(namespaceInfoDTO.meta.active, namespaceInfoDTO.meta.index, namespaceInfoDTO.meta.id, namespaceInfoDTO.namespace.type, namespaceInfoDTO.namespace.depth, this.extractLevels(namespaceInfoDTO.namespace), new NamespaceId_1.NamespaceId(namespaceInfoDTO.namespace.parentId), PublicAccount_1.PublicAccount.createFromPublicKey(namespaceInfoDTO.namespace.owner, networkType), new UInt64_1.UInt64(namespaceInfoDTO.namespace.startHeight), new UInt64_1.UInt64(namespaceInfoDTO.namespace.endHeight), this.extractAlias(namespaceInfoDTO.namespace));\n }))));\n }", "function getDirectoryList() {\n var htmlString = '';\n htmlString += '<ul class=\"tree\"><li name=\"groups\" id=\"' + root.id + '\" class=\"selected\" onclick=\"phonebook.app.getContactsList(' + root.id + ')\" >' + root.name + '</li>';\n getAllGroups(root);\n htmlString += '</ul>';\n document.getElementById('directoryTree').innerHTML = htmlString;\n\n function getAllGroups(cGroup) {\n htmlString += '<ul class=\"tree\">';\n for (var i = 0; i < cGroup.childrenCount; i++) {\n if (cGroup.items[i].type == 'Group') {\n htmlString += '<li name=\"groups\" id=\"' + cGroup.items[i].id + '\" onclick=\"phonebook.app.getContactsList(' + cGroup.items[i].id + ')\">' + cGroup.items[i].name + '<span id=\"cGroup.items[i].id\" onclick=\"phonebook.app.deleteGroup(' + cGroup.items[i].id + ' )\">X</span></li>';\n getAllGroups(cGroup.items[i], htmlString);\n }\n }\n\n htmlString += '</ul>';\n }\n }", "function generateBreadcrumbs (path){\n\t\t$(\"#perc-chart-breadcrumb-list\").html(\"\");\n\t\tbreadcrumbItems = [];\n\t\tbreadcrumbItems = path.split(\"/\");\n\t\tvar siteName = prefs.getString(SITE_NAME);\n\t\tif (siteName == \"@all\"){\n $(\"#perc-chart-breadcrumb-list\").append(' <li atitle = \"\" ><span id = \"perc-breadcrumb-items\" atitle = \"\">All Sites</span></li><span class = \"perc-breadcrumb-separator\" >&nbsp;>&nbsp;</span>');\t\t\t \t\n\t\t}\n\t\tvar pathValue = breadcrumbItems[0];\n\t\t\n\t\t$(\"#perc-yaxis-label\").html(\"\");\n\t\tif(breadcrumbItems[0] == \"\"){\n\t\t\t$(\".perc-breadcrumb-separator\").hide();\n\t\t\t$(\"#perc-yaxis-label\").append(\"Sites\");\n\t\t}\n\t\telse{\n\t\t\t$(\"#perc-yaxis-label\").append(\"Sections\");\n\t\t}\n\n\n\t\t$(\"#perc-chart-breadcrumb-list\").append('<li atitle = \"'+ breadcrumbItems[0] + '\" ><span id = \"perc-breadcrumb-items\" atitle = \"'+ breadcrumbItems[0] +'\">' +breadcrumbItems[0]+'</span></li>');\n\t\t\n\t\tfor (i=1; i< breadcrumbItems.length; i++)\n\t\t{\n\t\t\t pathValue += '/' + breadcrumbItems[i];\n\t\t\t$(\"#perc-chart-breadcrumb-list\").append(' <span>>&nbsp;</span><li atitle = \"'+ pathValue + '\" ><span id = \"perc-breadcrumb-items\" atitle = \"'+ pathValue +'\">' +breadcrumbItems[i]+'</span></li>');\t\n\t\t}\n\t}", "function fetchOrgChartTree(){ \n UserService.getOrgChartTree(\n function(res) {\n if(res.type){\n buildOrgChart(res.data);\n }\n \n }, function(res) {\n $scope.message = res.message; \n $('#errorModel').modal('show');\n });\n }", "function fillReportPageAclInheritanceBreak(baseUrl, loadingLabel){\n ajaxindicatorstart();\n $.ajax($('#contextPath').val() +'/modules/graphql',{\n type:\"POST\",\n data: JSON.stringify(getAceAndAclInheritanceBreakRequest()),\n contentType:\"application/json\",\n dataType:\"json\",\n success: function(response){\n var table = $('#pageAclInheritanceBreakTable').DataTable();\n\n table.clear().draw();\n\n let result = response.data.jcr.acl.nodes.map(node => node.parent);\n result = result.concat(response.data.jcr.ace.nodes.map(node => node.parent.parent));\n\n\n // Distinct all entries\n result.filter((node, index, list) => {\n return node.isDisplayableNode && list.map(nodeToMap => nodeToMap.path).indexOf(node.path) === index;\n }).forEach(value => table.row.add([value.displayName, \"<a target=\\\"_blank\\\" href=\\\"\"+$('#baseEdit').val()+value.path+\".html\\\">\"+value.path+\"</a>\"]).draw());\n\n ajaxindicatorstop();\n }\n });\n}", "function getData(uri) {\n $.ajax({\n type: \"GET\",\n dataType: \"json\",\n beforeSend: function(request) {\n request.setRequestHeader(\"X-ArchivesSpace-Session\", token);\n },\n url: baseURL + uri,\n success: function(data) {\n if (data[\"jsonmodel_type\"] == \"resource\") {\n\t\t\t\t$('#dm_item_resource').val(data[\"title\"] + ' (' + data[\"id_0\"] + ')');\n } else if (data[\"jsonmodel_type\"] == \"archival_object\") {\n\t\t\t\t$('#dm_item_display_title').val(data['display_string'])\n getData(data[\"resource\"][\"ref\"]);\n }\n }\n });\n}", "function loadDoc() {\n if (treeName === undefined) {\n // get the value of the last button clicked, OR the value of the last project saved\n chrome.storage.local.get(projectName, function (data) {\n treeName = Object.entries(result)[0][1];\n });\n }\n chrome.storage.sync.get(treeName, function (data) {\n // get the data tree of the desired search\n var responseText = Object.values(data); // values are urls\n var keys = Object.keys(data); // keys are the names of the projects\n\n if (treeName !== \"z\") {\n // z is a variable in storage, but not a tree\n var xhttp = new XMLHttpRequest();\n xhttp.onreadystatechange = function () {\n if (this.readyState == 4 && this.status == 0) {\n // if the page is ready\n $(\"#search_page_title\").html(treeName.toUpperCase());\n var arrayOfChildren = []; // used so that if the data structure contains multiple urls that are the same, only add them once\n for (i in keys) {\n for (j in responseText[i]) {\n if (responseText[i][j].value !== \"\") {\n var treeHead = responseText[i][j].value; // head node of the tree\n if (!arrayOfChildren.includes(treeHead)) {\n arrayOfChildren.push(treeHead);\n var desc = responseText[i][j].descendants;\n // create head elements to go in page\n var treeStruct = document.createElement(\"ul\");\n var listStruct = document.createElement(\"li\");\n var carrot = document.createElement(\"span\");\n // save attributes to head elements\n treeStruct.className = \"myUL\";\n carrot.className = \"caret\";\n carrot.id = treeHead;\n carrot.innerHTML =\n '<a href=\"' + treeHead + '\">' + treeHead + \"</a>\";\n // add head elements to page\n listStruct.appendChild(carrot);\n treeStruct.appendChild(listStruct);\n document.getElementById(\"demo\").appendChild(treeStruct);\n // for all descendants of the head node:\n\n console.log(desc + \" : \" + desc.length);\n if (Array.isArray(desc)) {\n //// test that desc is array\n console.log(Array.isArray(desc));\n for (var d in desc) {\n if (!arrayOfChildren.includes(desc[d])) {\n // create child elements\n var treeStructIn = document.createElement(\"ul\");\n var listStructIn = document.createElement(\"li\");\n var carrotIn = document.createElement(\"span\");\n // add attributes to child elements\n treeStructIn.className = \"nested\";\n carrotIn.className = \"caret\";\n carrotIn.id = desc[d];\n carrotIn.innerHTML =\n '<a href=\"' + desc[d] + '\">' + desc[d] + \"</a>\";\n // add child element to the head element\n listStructIn.appendChild(carrotIn);\n treeStructIn.appendChild(listStructIn);\n listStruct.appendChild(treeStructIn);\n // add child to array so we don't add it to the page twice!\n if (desc[d].length === 1) {\n var temp = desc[d][0]; // TODO: this is not perfect, and needs fixing :(\n arrayOfChildren.push(temp);\n } else {\n arrayOfChildren.push(desc[d]);\n }\n\n console.log(arrayOfChildren);\n }\n console.log(arrayOfChildren.includes(desc[d]));\n }\n } else {\n for (var d in desc) {\n for (var e in desc[d]) {\n // arrays of arrays are saved so we need 2-d array iteration\n if (!arrayOfChildren.includes(desc[d][e])) {\n // create child elements\n var treeStructIn = document.createElement(\"ul\");\n var listStructIn = document.createElement(\"li\");\n var carrotIn = document.createElement(\"span\");\n // add attributes to child elements\n treeStructIn.className = \"nested\";\n carrotIn.className = \"caret\";\n carrotIn.id = desc[d][e];\n console.log(desc[d]);\n carrotIn.innerHTML =\n '<a href=\"' +\n desc[d][e] +\n '\">' +\n desc[d][e] +\n \"</a>\";\n // add child element to the head element\n listStructIn.appendChild(carrotIn);\n treeStructIn.appendChild(listStructIn);\n listStruct.appendChild(treeStructIn);\n // add child to array so we don't add it to the page twice!\n arrayOfChildren.push(desc[d][e]);\n console.log(arrayOfChildren);\n }\n }\n }\n }\n }\n }\n }\n }\n // this for loop add an action listener to each span element\n var toggler = document.getElementsByClassName(\"caret\");\n for (var k = 0; k < toggler.length; k++) {\n // listen\n toggler[k].addEventListener(\"click\", function (toggler) {\n // toggler is a mouse event\n var t = toggler;\n\n if(t){\n var thisCaretID = t.toElement.id;\n var thisCaret = document.getElementById(thisCaretID); // gets the ele from the page!\n // if it doesn't have a parent element, just make it toggle down to show an action happened\n if (thisCaret.parentElement.querySelector(\".nested\") === null) {\n thisCaret.classList.toggle(\"caret-down\");\n } else {\n /* if it does have a parent element, get all the elements in the parent and set the .toggle to active so they are added to the page */\n for (var z in thisCaret.parentElement.getElementsByClassName(\n \"nested\"\n )) {\n console.log(\n thisCaret.parentElement.getElementsByClassName(\"nested\")\n .length\n );\n var nestedCaret = thisCaret.parentElement.getElementsByClassName(\n \"nested\"\n )[z];\n console.log(nestedCaret);\n nestedCaret.classList.toggle(\"active\");\n }\n thisCaret.classList.toggle(\"caret-down\");\n }\n }\n });\n }\n }\n };\n xhttp.open(\"GET\", \"ajax_info.txt\", true);\n xhttp.send(); // TODO: this is giving errors. Do we need to remove xhttp all together?\n }\n });\n}", "function getCatalogs(){\n\n}", "function JSXNamespacedName(node, print) {\n\t print.plain(node.namespace);\n\t this.push(\":\");\n\t print.plain(node.name);\n\t}", "function JSXNamespacedName(node, print) {\n\t print.plain(node.namespace);\n\t this.push(\":\");\n\t print.plain(node.name);\n\t}", "function nomenclature(output) {\n var Subcategory = Parse.Object.extend(\"Subcategory\"),\n query = new Parse.Query(Subcategory);\n\n query.equalTo(\"objectId\", output);\n query.find().then(function (results) {\n var r,\n name,\n objectId;\n for (r = 0; r < results.length; r += 1) {\n name = results[r].get(\"name\");\n objectId = results[r].id;\n $(\"#\" + objectId + \" \").append(name);\n }\n }, function () {\n console.log(\"ERROR in nomenclature()\");\n });\n }//end of nomenclature", "function JSXNamespacedName(node, print) {\n print.plain(node.namespace);\n this.push(\":\");\n print.plain(node.name);\n}", "function displayOrgs(data){\n var orgs = data;\n // console.log(data);\n _.each(orgs, function(org){\n var url = org.url;\n $.ajax(url).then(function(data){\n var org = data;\n var $orgContainer = $('.org-container');\n\n var source = $('#org-template').html();\n var template = Handlebars.compile(source);\n\n $orgContainer.append(template(org));\n })\n\n })\n}", "function showRecords(node, query) {\n var rank = node.attr('rank');\n if (rank == 'kingdoms') return;\n var name = node.attr('id');\n // url for records list\n var recordsUrl = urlConcat(biocacheWebappUrl, \"/occurrences/search?q=\") + query +\n \"&fq=\" + rank + \":\" + name;\n document.location.href = recordsUrl;\n}", "function package_view(dir) {\n\n $('#loadingview').show();\n $('#installed-packages').empty();\n $('#to-install').empty();\n\n api.get_info(dir, function (info) {\n var data = info.packages;\n\n var output = views.installed(data);\n $('#installed-packages').append(output);\n\n output = views.to_install(data);\n $('#to-install').append(output);\n if ($(output).children().length === 0) {\n $('#to-install-main').css(\"display\", \"none\");\n }\n\n var selectedPackages = [];\n views.select_installed(selectedPackages);\n\n var toInstall = [];\n views.select_to_install(toInstall);\n\n $('#packageview').show();\n $('#loadingview').hide();\n }, function () {\n common.display_msg(\"Server Error\", \"The project configuration could not be retrived. Please try again.\");\n $('#loadingtext').text(\"Server Error\");\n });\n}", "function UseLoadData(result){\n\tif(result.length > 0){\n\t\tdid = result[result.length - 1][\"id\"]; \n\t}\n\t\n\tfor(var i = 0; i < result.length; i++){\n\t\tif(result[i][\"level\"] == 0){\n\t\t\tAddTextContainer(result[i][\"content\"], lvl0, result[i][\"id\"], result[i][\"firstname\"] + \" \" + result[i][\"lastname\"]);\n\t\t}\n\t\telse if(result[i][\"level\"] == 1){\n\t\t\tvar container = \"#rtext\" + result[i][\"parent\"];\n\t\t\tAddTextContainer2(result[i][\"content\"], $(container), result[i][\"id\"], \n\t\t\t\tresult[i][\"firstname\"] + \" \" + result[i][\"lastname\"]);\n\t\t}\n\t}\n}", "function showallterms() {\r\n $(\"#ulTerm\").empty();\r\n $('#trseeterm').html('<img src=\"../Content/Images/loading.gif\">');\r\n $.ajax({\r\n url: vApiBaseSiteUrl +'/api/accounts/' + localStorage.AccountID + '/terms/contract?contractid=' + getParameterByName('ContractID'),\r\n type: 'GET',\r\n dataType: 'json',\r\n headers: { 'eContracts-ApiKey': localStorage.APIKey },\r\n \"Content-Type\": \"application/json\",\r\n cache: false,\r\n success: function (contactsJsonPayload) {\r\n var count = 0;\r\n $(contactsJsonPayload).each(function (i, item) {\r\n count++\r\n\r\n var vText = item.TermText;\r\n if (vText == null || vText == '') {\r\n vText = '';\r\n }\r\n\r\n $(\"#ulTerm\").append('<li><label id=\"TermID\" style=\"display:none;\">' + item.RowKey + '</label><label id=\"TermTitle\" style=\"display:none;\">' + item.TermTitle\r\n + '</label><span class=\"milestone\"><b>' + item.TermTitle\r\n + vText + '</b><img src=\"../Content/Images/context_Menu.png\" alt=\"Open Menu\" title=\"Open Menu\" class=\"openmenuTerm\"/></span></li>');\r\n\r\n });\r\n\r\n $(\"#lblTermsCount\").text('(' + count + ')');\r\n if (!$(\"#lblTermsCount\").text().trim()) {\r\n $(\"#ulTerm\").append('<li class=\"cont_Doc_Mess\">No Term Available</li>');\r\n }\r\n $(\".openmenuTerm\").contextMenu({ menu: 'dropdownMenu', leftButton: true }, function (action, el, pos) { contextMenuTerm(action, el.parent(\"span\").parent(\"li\"), pos); });\r\n $('#trseeterm').css('display', 'none');\r\n ApplyPermissionToMenu($(\"#hdnPermission\").val());\r\n },\r\n error: function () {\r\n if (!$(\"#lblTermsCount\").text().trim()) {\r\n $(\"#ulTerm\").append('<li class=\"cont_Doc_Mess\">No Term Available</li>');\r\n }\r\n }\r\n });\r\n}", "function loadInfoModal(tree) { \n var results = '';\n \n //Loops through each node in the tree\n tree.visit(function(node){\n if(node.isSelected() ) {\n results += '<div class=\"panel panel-default\"><div class=\"panel-heading\" id=\"ph' + node.key +'\"><h4 class=\"panel-title\"><a data-toggle=\"collapse\" data-parent=\"#infoAccordion\" href=\"#collapse' + node.key + '\">' + node.title + '</a></h4></div>'; \n \n $.get(\"/node/\" + node.key, function( data ) {\n var mainDiv = $(\"div.node div.content\", data); \n $('<div id=\"collapse' + node.key + '\" class=\"panel-collapse collapse\"><div class=\"panel-body\">' + mainDiv[0].innerHTML + '</div></div></div>').appendTo('#ph'+node.key);\n });\n }\n });\n\n $(\"#infoAccordion\").html(results);\n}", "function getYearFolders(id) {\n getActivities(id);\n user_id = id;\n var request = new XMLHttpRequest();\n var obj = \"obj=\" + id.toString();\n var url = \"year_folder_view.php\";\n request.open(\"POST\", url, true);\n request.setRequestHeader(\"Content-type\", \"application/x-www-form-urlencoded\");\n request.onreadystatechange = function() {\n if (request.readyState == 4 && request.status == 200) {\n var return_data = request.responseText;\n document.getElementById(\"files\").innerHTML = return_data;\n }\n }\n request.send(obj);\n}", "function display(path) {\n\tredirect('/api' + path);\n}", "function list_all_items_with_hierarchy( req, res ) {\n console.log( `Finding all ITEMS for ${ req.params.itemId }...` );\n models.item.findAll( {\n hierarchy: true,\n where: {\n teamId: req.params.teamId,\n parentId: req.pararms.productId,\n },\n } )\n .then( ( items ) => {\n console.log( \"ITEMS found...\" );\n res.json( items );\n } )\n .catch( ( e ) => {\n console.log( e ); // \"oh, no!\"\n } );\n}", "get namespace() {\n return this.collection;\n }", "function viewFlat(dirPath){\n // dirPath -> file/ folder \n\n let isFile = isFileChecker(dirPath); // check the file or not \n\n // \n if(isFile == true){\n console.log(dirPath +\"*\");\n }\n \n else{\n // directory \n // console.log\n //print path \n console.log(dirPath);\n // get Childrens\n\n let Childrens = readContent(dirPath); // returns array of folder name\n\n // call from view flat \n for(let i =0;i<Childrens.length;i++){\n viewFlat(dirPath + \"/\" + Childrens[i]);\n }\n // console.log(\"children : \" , childrens[i]);\n }\n\n \n}", "function displayBurstTree(selectedHref, selectedProjectID, baseURL) {\n\t\n\t_clearAllTimeouts();\n\treturnToSessionPortletConfiguration();\n\t\n\tupdatePortletsToolbar(0);\n\t$(\"#section-portlets-ul li\").each(function (listItem) {\n\t\t\t$(this).removeClass('active');\n\t\t});\n\tprev_class = selectedHref.parentElement.className;\n\tselectedHref.parentElement.className = prev_class + ' active';\n\t// Also update selected tab on cherryPy session.\n\t$.ajax({ \ttype: \"POST\",\n\t\t\t\tasync: false, \n\t\t\t\turl: '/burst/change_selected_tab/-1',\n\t success: function(r) {} ,\n\t error: function(r) {}\n \t});\n\tvar filterValue = {'type' : 'from_burst', 'value' : sessionStoredBurst.id};\n\tif (filterValue == '') {\n\t\tfilterValue = {'type' : 'from_burst', 'value' : \"0\"};\n\t}\n updateTree(selectedProjectID, baseURL, JSON.stringify(filterValue));\n $(\"#portlets-display\").hide();\n $(\"#portlets-configure\").hide();\n $(\"#portlet-param-config\").hide();\n $(\"#div-burst-tree\").show();\n}", "function querySchemeDetailSuccess(tx, scheme) {\n var popularDiv = '';\n var len = scheme.rows.length;\n if (len > 0) {\n for (var i = 0; i < len; i++) {\n var keywords = getKeyWords(scheme.rows.item(i).Keywords);\n var schemeName = scheme.rows.item(i).SchemeName;\n var SID = scheme.rows.item(i).ID;\n if (schemeName != null && schemeName != undefined && schemeName.length > 45) {\n schemeName = schemeName.substring(0, 45) + \"...\";\n }\n popularDiv += ' <div class=\"width60 items news-item-box\" onclick=ShowScheme(' + scheme.rows.item(i).ID + ')>';\n popularDiv += '<div class=\"news-item1\">';\n popularDiv += '<div class=\"news-item2\">' + scheme.rows.item(i).SchemeName + '</div>';\n popularDiv += '<div class=\"tags news-item3\"><span>';\n popularDiv += keywords + '</span></div> </div> </div>';\n \n //Analytics\n try {\n var track = {\n Category: 'SchemeDetails', Action: 'Scheme', Label: { 'Id': schemeId }, Value: {'SchemeName' : scheme.rows.item(i).SchemeName}\n };\n utils.Analytics.trackEvent(track);\n }\n catch (e) {\n console.log(JSON.stringify(e));\n }\n\n\n //=== GET SCHEME DETAILS ====//\n\n //call favorite\n GetFavorite(SID, tx);\n var keywords = getKeyWords(scheme.rows.item(i).Keywords);\n $(\"#divObjectiveHeader\").html(keywords);\n\n $(\"#divObjective\").html(scheme.rows.item(i).Objective);\n\n if (scheme.rows.item(i).SchemeStartDate != null && scheme.rows.item(i).SchemeStartDate != '' && scheme.rows.item(i).SchemeStartDate != 'null') {\n $(\"#divStartDate\").html(getDateInFormat(scheme.rows.item(i).SchemeStartDate));\n }\n else {\n $(\"#mainStartDate\").hide();\n }\n\n if (scheme.rows.item(i).SchemeEndDate != null && scheme.rows.item(i).SchemeEndDate != '' && scheme.rows.item(i).SchemeEndDate != 'null') {\n $(\"#divEndDate\").html(getDateInFormat(scheme.rows.item(i).SchemeEndDate));\n }\n else {\n $(\"#mainEndDate\").hide();\n }\n\n if (scheme.rows.item(i).IsSchemeActive) {\n $(\"#divIsActive\").html(\"Yes\");\n }\n else {\n $(\"#divIsActive\").html(\"No\");\n }\n\n $(\"#divSchemeName\").html(scheme.rows.item(i).SchemeName);\n\n if (scheme.rows.item(i).LastAmendmentDate != null && scheme.rows.item(i).LastAmendmentDate != '' && scheme.rows.item(i).LastAmendmentDate != 'null') {\n $(\"#divAmendDate\").html(getDateInFormat(scheme.rows.item(i).LastAmendmentDate));\n }\n else {\n $(\"#mainAmendDate\").hide();\n }\n\n if (scheme.rows.item(i).OriginatorNames != null && scheme.rows.item(i).OriginatorNames != '' && scheme.rows.item(i).OriginatorNames != 'null') {\n $(\"#divOriginatedBy\").html(scheme.rows.item(i).OriginatorNames);\n }\n else {\n $(\"#mainOriginatedBy\").hide();\n }\n if (scheme.rows.item(i).SpecialBasicDetailsAddon != null && scheme.rows.item(i).SpecialBasicDetailsAddon != '' && scheme.rows.item(i).SpecialBasicDetailsAddon != 'null') {\n $(\"#DivSpecialBasicDetailsAddon\").html(scheme.rows.item(i).SpecialBasicDetailsAddon);\n }\n else {\n $(\"#mainSpecialBasicDetailsAddon\").hide();\n }\n // \n\n //===================== Eligibility Start =================//\n var EligibilityCnt = 0;\n\n if (scheme.rows.item(i).DistrictNames != null && scheme.rows.item(i).DistrictNames != '' && scheme.rows.item(i).DistrictNames != 'null') {\n $(\"#divStates\").html(scheme.rows.item(i).StateNames);\n EligibilityCnt++;\n }\n else {\n $(\"#mainStates\").hide();\n }\n\n if (scheme.rows.item(i).DistrictNames != null && scheme.rows.item(i).DistrictNames != '' && scheme.rows.item(i).DistrictNames != 'null') {\n $(\"#divDistrict\").html(scheme.rows.item(i).DistrictNames);\n EligibilityCnt++;\n }\n else {\n $(\"#mainDistrict\").hide();\n }\n\n if (scheme.rows.item(i).DepartmentNames != null && scheme.rows.item(i).DepartmentNames != '' && scheme.rows.item(i).DepartmentNames != 'null') {\n $(\"#divDepartment\").html(scheme.rows.item(i).DepartmentNames);\n EligibilityCnt++;\n }\n else {\n $(\"#mainDepartment\").hide();\n }\n\n if (scheme.rows.item(i).DomainNames != null && scheme.rows.item(i).DomainNames != '' && scheme.rows.item(i).DomainNames != 'null') {\n $(\"#divDomain\").html(scheme.rows.item(i).DomainNames);\n EligibilityCnt++;\n }\n else {\n $(\"#mainDomain\").hide();\n }\n if (scheme.rows.item(i).SchemeURL != null && scheme.rows.item(i).SchemeURL != '' && scheme.rows.item(i).SchemeURL != 'null') {\n $('#aSchemeURL').attr('href', scheme.rows.item(i).SchemeURL);\n $('#aSchemeURL').text(scheme.rows.item(i).SchemeURL);\n EligibilityCnt++;\n }\n else {\n $(\"#mainSchemeURL\").hide();\n }\n if (scheme.rows.item(i).SchemeTypeName != null && scheme.rows.item(i).SchemeTypeName != '' && scheme.rows.item(i).SchemeTypeName != 'null') {\n $(\"#DivSchemeType\").html(scheme.rows.item(i).SchemeTypeName);\n EligibilityCnt++;\n }\n else {\n $(\"#mainSchemeType\").hide();\n }\n if (scheme.rows.item(i).ProcessingFee != null && scheme.rows.item(i).ProcessingFee != '' && scheme.rows.item(i).ProcessingFee != 'null') {\n $(\"#DivProcessingFee\").html(scheme.rows.item(i).ProcessingFee);\n EligibilityCnt++;\n }\n else {\n $(\"#mainProcessingFee\").hide();\n }\n if (scheme.rows.item(i).MinAge != null && scheme.rows.item(i).MinAge != '' && scheme.rows.item(i).MinAge != 'null') {\n $(\"#divMinAge\").html(scheme.rows.item(i).MinAge);\n EligibilityCnt++;\n }\n else {\n $(\"#mainMinAge\").hide();\n }\n\n if (scheme.rows.item(i).MaxAge != null && scheme.rows.item(i).MaxAge != '' && scheme.rows.item(i).MaxAge != 'null') {\n $(\"#divMaxAge\").html(scheme.rows.item(i).MaxAge);\n EligibilityCnt++;\n }\n else {\n $(\"#mainMaxAge\").hide();\n }\n\n if (scheme.rows.item(i).Sex != null && scheme.rows.item(i).Sex != '' && scheme.rows.item(i).Sex != 'null') {\n $(\"#divSex\").html(scheme.rows.item(i).Sex);\n EligibilityCnt++;\n }\n else {\n $(\"#mainSex\").hide();\n }\n\n if (scheme.rows.item(i).QualificationNames != null && scheme.rows.item(i).QualificationNames != '' && scheme.rows.item(i).QualificationNames != 'null') {\n $(\"#divQualifaction\").html(scheme.rows.item(i).QualificationNames);\n EligibilityCnt++;\n }\n else {\n $(\"#mainQualifaction\").hide();\n }\n\n if (scheme.rows.item(i).MaritalStatusNames != null && scheme.rows.item(i).MaritalStatusNames != '' && scheme.rows.item(i).MaritalStatusNames != 'null') {\n $(\"#divMaritalStatus\").html(scheme.rows.item(i).MaritalStatusNames);\n EligibilityCnt++;\n }\n else {\n $(\"#mainMaritalStatus\").hide();\n }\n\n if (scheme.rows.item(i).OccupationNames != null && scheme.rows.item(i).OccupationNames != '' && scheme.rows.item(i).OccupationNames != 'null') {\n $(\"#divOccupation\").html(scheme.rows.item(i).OccupationNames);\n EligibilityCnt++;\n }\n else {\n $(\"#mainOccupation\").hide();\n }\n\n if (scheme.rows.item(i).ReligonNames != null && scheme.rows.item(i).ReligonNames != '' && scheme.rows.item(i).ReligonNames != 'null') {\n $(\"#divReligion\").html(scheme.rows.item(i).ReligonNames);\n EligibilityCnt++;\n }\n else {\n $(\"#mainReligion\").hide();\n }\n\n if (scheme.rows.item(i).CasteNames != null && scheme.rows.item(i).CasteNames != '' && scheme.rows.item(i).CasteNames != 'null') {\n $(\"#divCasteNames\").html(scheme.rows.item(i).CasteNames);\n EligibilityCnt++;\n }\n else {\n $(\"#mainCasteNames\").hide();\n }\n\n if (scheme.rows.item(i).EmpStatusNames != null && scheme.rows.item(i).EmpStatusNames != '' && scheme.rows.item(i).EmpStatusNames != 'null') {\n $(\"#divEmploymentStatus\").html(scheme.rows.item(i).EmpStatusNames);\n EligibilityCnt++;\n }\n else {\n $(\"#mainEmploymentStatus\").hide();\n }\n\n if (scheme.rows.item(i).SpecialStatusNames != null && scheme.rows.item(i).SpecialStatusNames != '' && scheme.rows.item(i).SpecialStatusNames != 'null') {\n $(\"#divSpecialStatus\").html(scheme.rows.item(i).SpecialStatusNames);\n EligibilityCnt++;\n }\n else {\n $(\"#mainSpecialStatus\").hide();\n }\n\n if (scheme.rows.item(i).IncomeLevelNames != null && scheme.rows.item(i).IncomeLevelNames != '' && scheme.rows.item(i).IncomeLevelNames != 'null') {\n $(\"#divIncomeLevel\").html(scheme.rows.item(i).IncomeLevelNames);\n EligibilityCnt++;\n }\n else {\n $(\"#mainIncomeLevel\").hide();\n }\n\n if (scheme.rows.item(i).AnnualFamilyIncome != null && scheme.rows.item(i).AnnualFamilyIncome != '' && scheme.rows.item(i).AnnualFamilyIncome != 'null') {\n $(\"#divAnnualFamilyIncome\").html(scheme.rows.item(i).AnnualFamilyIncome);\n EligibilityCnt++;\n }\n else {\n $(\"#mainAnnualFamilyIncome\").hide();\n }\n\n if (scheme.rows.item(i).DisablityNames != null && scheme.rows.item(i).DisablityNames != '' && scheme.rows.item(i).DisablityNames != 'null') {\n $(\"#divTypeOfDisability\").html(scheme.rows.item(i).DisablityNames);\n EligibilityCnt++;\n }\n else {\n $(\"#mainTypeOfDisability\").hide();\n }\n\n if (scheme.rows.item(i).DisabilityPercent != null && scheme.rows.item(i).DisabilityPercent != '' && scheme.rows.item(i).DisabilityPercent != 'null') {\n $(\"#divPercentageOfDisablity\").html(scheme.rows.item(i).DisabilityPercent);\n EligibilityCnt++;\n }\n else {\n $(\"#mainPercentageOfDisablity\").hide();\n }\n\n if (scheme.rows.item(i).SicknessNames != null && scheme.rows.item(i).SicknessNames != '' && scheme.rows.item(i).SicknessNames != 'null') {\n $(\"#divSickness\").html(scheme.rows.item(i).SicknessNames);\n EligibilityCnt++;\n }\n else {\n $(\"#mainSickness\").hide();\n }\n\n if (scheme.rows.item(i).SpecialEligibilityAddon != null && scheme.rows.item(i).SpecialEligibilityAddon != '' && scheme.rows.item(i).SpecialEligibilityAddon != 'null') {\n $(\"#divAddEligibilityCriteria\").html(scheme.rows.item(i).SpecialEligibilityAddon);\n EligibilityCnt++;\n }\n else {\n $(\"#mainAddEligibilityCriteria\").hide();\n }\n\n\n if (EligibilityCnt == 0) {\n $(\"#btnEligibility\").hide();\n $(\"#mainEligibility\").hide();\n }\n\n //===================== Eligibility End =================//\n\n //===================== Benefit Start ==================//\n //if (response.Benefits.length != undefined && response.Benefits.length > 0) {\n // $(\"#divSchemeDtls\").html(response.Benefits[0].Details);\n //}\n //else {\n // $(\"#mainSchemeDtls\").hide();\n // $(\"#btnBenefits\").hide();\n //}\n //===================== Benefit End =================//\n\n //===================== Application Details Start =================//\n\n var ApplicationDetailsCnt = 0;\n\n if ((scheme.rows.item(i).IDProofDocumentsNames != null && scheme.rows.item(i).IDProofDocumentsNames != '' && scheme.rows.item(i).IDProofDocumentsNames != 'null') || (scheme.rows.item(i).AddressProofDocumentsNames != null && scheme.rows.item(i).AddressProofDocumentsNames != '' && scheme.rows.item(i).AddressProofDocumentsNames != 'null')) {\n $(\"#divDocumentSubmitted\").html(scheme.rows.item(i).IDProofDocumentsNames + ',' + scheme.rows.item(i).AddressProofDocumentsNames);\n ApplicationDetailsCnt++;\n }\n else {\n $(\"#mainDocumentSubmitted\").hide();\n }\n\n if ((scheme.rows.item(i).IDProofComments != null && scheme.rows.item(i).IDProofComments != '' && scheme.rows.item(i).IDProofComments != 'null')) {\n $(\"#divIdProofComments\").html(scheme.rows.item(i).IDProofComments);\n ApplicationDetailsCnt++;\n }\n else {\n $(\"#mainIdProofComments\").hide();\n }\n\n if ((scheme.rows.item(i).AddressProofComments != null && scheme.rows.item(i).AddressProofComments != '' && scheme.rows.item(i).AddressProofComments != 'null')) {\n $(\"#divAddressProofComments\").html(scheme.rows.item(i).AddressProofComments);\n ApplicationDetailsCnt++;\n }\n else {\n $(\"#mainAddressProofComments\").hide();\n }\n\n if (scheme.rows.item(i).WhereDocumentSubmission != null && scheme.rows.item(i).WhereDocumentSubmission != '' && scheme.rows.item(i).WhereDocumentSubmission != 'null') {\n $(\"#divWhomWhereTSubDoc\").html(scheme.rows.item(i).WhereDocumentSubmission);\n ApplicationDetailsCnt++;\n }\n else {\n $(\"#mainWhomWhereTSubDoc\").hide();\n }\n\n if (scheme.rows.item(i).ApplicationFormAvailableDate != null && scheme.rows.item(i).ApplicationFormAvailableDate != '' && scheme.rows.item(i).ApplicationFormAvailableDate != 'null') {\n $(\"#divAppAvalDate\").html(getDateInFormat(scheme.rows.item(i).ApplicationFormAvailableDate));\n ApplicationDetailsCnt++;\n }\n else {\n $(\"#mainAppAvalDate\").hide();\n }\n\n if (scheme.rows.item(i).LastDateToGetApplicationForm != null && scheme.rows.item(i).LastDateToGetApplicationForm != '' && scheme.rows.item(i).LastDateToGetApplicationForm != 'null') {\n $(\"#divLastAppDate\").html(getDateInFormat(scheme.rows.item(i).LastDateToGetApplicationForm));\n ApplicationDetailsCnt++;\n }\n else {\n $(\"#mainLastAppDate\").hide();\n }\n\n if (scheme.rows.item(i).LastDateOfFormSubmission != null && scheme.rows.item(i).LastDateOfFormSubmission != '' && scheme.rows.item(i).LastDateOfFormSubmission != 'null') {\n $(\"#divLastDateSubmit\").html(getDateInFormat(scheme.rows.item(i).LastDateOfFormSubmission));\n ApplicationDetailsCnt++;\n }\n else {\n $(\"#mainLastDateSubmit\").hide();\n }\n\n if (scheme.rows.item(i).BeneficiarySelectionAnnouncementDate != null && scheme.rows.item(i).BeneficiarySelectionAnnouncementDate != '' && scheme.rows.item(i).BeneficiarySelectionAnnouncementDate != 'null') {\n $(\"#divBeneficiaryAnnounmentDate\").html(getDateInFormat(scheme.rows.item(i).BeneficiarySelectionAnnouncementDate));\n ApplicationDetailsCnt++;\n }\n else {\n $(\"#mainBeneficiaryAnnounmentDate\").hide();\n }\n if (scheme.rows.item(i).SpecialApplicationAddon != null && scheme.rows.item(i).SpecialApplicationAddon != '' && scheme.rows.item(i).SpecialApplicationAddon != 'null') {\n $(\"#divSpecialApplicationAddon\").html(scheme.rows.item(i).SpecialApplicationAddon);\n ApplicationDetailsCnt++;\n }\n else {\n $(\"#mainSpecialApplicationAddon\").hide();\n }\n\n if (ApplicationDetailsCnt == 0) {\n $(\"#btnApplicationDetails\").hide();\n $(\"#mainApplicationDetails\").hide();\n }\n\n\n //===================== Application Details End =================//\n\n\n //===================== Fund reimbursement Start =================//\n\n var FundreimbursementCnt = 0;\n\n if (scheme.rows.item(i).PaymentModeNames != null && scheme.rows.item(i).PaymentModeNames != '' && scheme.rows.item(i).PaymentModeNames != 'null') {\n $(\"#divModeOfPayment\").html(scheme.rows.item(i).PaymentModeNames);\n FundreimbursementCnt++;\n }\n else {\n $(\"#mainModeOfPayment\").hide();\n }\n\n if (scheme.rows.item(i).PaymentLocationNames != null && scheme.rows.item(i).PaymentLocationNames != '' && scheme.rows.item(i).PaymentLocationNames != 'null') {\n $(\"#divPaymentLocation\").html(scheme.rows.item(i).PaymentLocationNames);\n FundreimbursementCnt++;\n }\n else {\n $(\"#mainPaymentLocation\").hide();\n }\n\n if (scheme.rows.item(i).FundDisbursementTimeNames != null && scheme.rows.item(i).FundDisbursementTimeNames != '' && scheme.rows.item(i).FundDisbursementTimeNames != 'null') {\n $(\"#divTimeOfPayment\").html(scheme.rows.item(i).FundDisbursementTimeNames);\n FundreimbursementCnt++;\n }\n else {\n $(\"#mainTimeOfPayment\").hide();\n }\n\n if (scheme.rows.item(i).BenefitFrequencyNames != null && scheme.rows.item(i).BenefitFrequencyNames != '' && scheme.rows.item(i).BenefitFrequencyNames != 'null') {\n $(\"#divFrequency\").html(scheme.rows.item(i).BenefitFrequencyNames);\n FundreimbursementCnt++;\n }\n else {\n $(\"#mainFrequency\").hide();\n }\n\n if (FundreimbursementCnt == 0) {\n $(\"#btnFundreimbursement\").hide();\n $(\"#mainFundreimbursement\").hide();\n }\n\n //===================== Fund reimbursement End =================//\n\n\n //===================== Contact Details Start =================//\n\n var ContactDetailsCnt = 0;\n\n if (scheme.rows.item(i).ContactPerson != null && scheme.rows.item(i).ContactPerson != '' && scheme.rows.item(i).ContactPerson != 'null') {\n $(\"#divContactPerson\").html(scheme.rows.item(i).ContactPerson);\n ContactDetailsCnt++;\n }\n else {\n $(\"#mainContactPerson\").hide();\n }\n\n if (scheme.rows.item(i).ContactNumber != null && scheme.rows.item(i).ContactNumber != '' && scheme.rows.item(i).ContactNumber != 'null') {\n $(\"#divContactNumber\").html(scheme.rows.item(i).ContactNumber);\n ContactDetailsCnt++;\n }\n else {\n $(\"#mainContactNumber\").hide();\n }\n\n if (scheme.rows.item(i).ContactEmailId != null && scheme.rows.item(i).ContactEmailId != '' && scheme.rows.item(i).ContactEmailId != 'null') {\n $(\"#divContactEmail\").html(scheme.rows.item(i).ContactEmailId);\n ContactDetailsCnt++;\n }\n else {\n $(\"#mainContactEmail\").hide();\n }\n\n if (ContactDetailsCnt == 0) {\n $(\"#btnContactDetails\").hide();\n $(\"#mainContactDetails\").hide();\n }\n\n //===================== Contact Details End =================//\n\n\n //===================== Additional Details Start =================//\n\n\n\n //if (scheme.rows.item(i).Keywords != null && scheme.rows.item(i).Keywords != '') {\n // $(\"#divKeywords\").html(scheme.rows.item(i).Keywords);\n // AdditionalDetailsCnt++;\n //}\n //else {\n $(\"#mainKeywords\").hide();\n //}\n\n if (scheme.rows.item(i).OperatorRemark != null && scheme.rows.item(i).OperatorRemark != '' && scheme.rows.item(i).OperatorRemark != 'null') {\n $(\"#divRemarks\").html(scheme.rows.item(i).OperatorRemark);\n AdditionalDetailsCnt++;\n }\n else {\n $(\"#mainRemarks\").hide();\n }\n\n //if (response.Details.length != undefined && response.Details.length > 0) {\n\n // for (var i = 0; i < response.Details.length; i++) {\n // if (response.Details[i].FieldValue != \"\" || response.Details[i].KeyField != \"\") {\n // $(\"#divQueAns\").append(\"<div><div class=\\\"floatl upper-case anchor3 width35\\\">\" + response.Details[i].KeyField + \"</div>\");\n // $(\"#divQueAns\").append(\"<div class=\\\"floatl width63\\\">\" + response.Details[i].FieldValue + \"</div>\");\n // $(\"#divQueAns\").append(\"<div class=\\\"clearboth\\\"></div></div>\");\n // AdditionalDetailsCnt++;\n // }\n // }\n\n //}\n //else {\n // $(\"#divQueAns\").hide();\n //}\n\n\n\n //===================== Additional Details End =================//\n\n\n //var schemeId = utils.localStorage().get('SchemeId');\n //if (response.UploadDocuments != null && response.UploadDocuments.length > 0) {\n // var docCnt = 0;\n // var mediaCnt = 0;\n // for (var i = 0; i < response.UploadDocuments.length; i++) {\n\n // var desc = response.UploadDocuments[i].Description.replace(' ', '');\n // desc = desc.toLowerCase();\n\n // if (desc != \"poster\" && desc != \"audio\" && desc != \"video\") {\n // docCnt++;\n // $(\"#schemeDocDownloadFiles\").append(\"<div>\");\n // $(\"#schemeDocDownloadFiles\").append(\"<div class=\\\"clearboth\\\"></div>\");\n // $(\"#schemeDocDownloadFiles\").append(\"<div class=\\\"width100 floatl\\\">\");\n // $(\"#schemeDocDownloadFiles\").append(\"<div class=\\\"width20 floatl\\\"><a target=\\\"_blank\\\" href=\\\"\" + response.UploadDocuments[i].UploadPath + \"\\\"><img class=\\\"max-width50\\\" src=\\\"images/download-btn.png\\\" /></a></div>\");\n // $(\"#schemeDocDownloadFiles\").append(\"<div class=\\\"text-align-l width80 floatl\\\">\" + response.UploadDocuments[i].Description + \"</div>\");\n // $(\"#schemeDocDownloadFiles\").append(\"</div>\");\n // $(\"#schemeDocDownloadFiles\").append(\"</div>\");\n // }\n // else {\n // if (desc == \"poster\") {\n // mediaCnt++;\n // $(\"#divSchemeMedia\").append(\"<div>\");\n // $(\"#divSchemeMedia\").append(\"<img class=\\\"max-width90\\\" src=\\\"\" + response.UploadDocuments[i].UploadPath + \"\\\" alt=\\\"\" + response.UploadDocuments[i].Description + \"\\\" style=\\\"\\\" />\");\n // $(\"#divSchemeMedia\").append(\"</div>\");\n // }\n\n // }\n\n // }\n //}\n //else {\n // $(\"#schemeDocDownloadFiles\").html(\"<div><div class=\\\"clearboth\\\"></div><div class=\\\"upper-case\\\">No Document Available</div></div>\");\n //}\n\n //if (docCnt == 0) {\n // $(\"#schemeDocDownloadFiles\").html(\"<div><div class=\\\"clearboth\\\"></div><div class=\\\"upper-case\\\">No Document Available</div></div>\");\n //}\n //if ((mediaCnt == 0) && schemeId != null && schemeId != 184 && schemeId != 196) {\n // $(\"#divSchemeMedia\").html(\"<div><div class=\\\"clearboth\\\"></div><div class=\\\"upper-case\\\">No posters/videos Available</div></div>\");\n //}\n\n\n //=== END GET SCHEME DETAILS ====//\n\n\n\n\n }\n $(\"#divRecent\").append(popularDiv);\n // $('#myModal').modal('hide');\n\n }\n\n }", "function getOrgChildren() {\n\n $.ajax({\n url: getOrgChildUrl,\n method: \"GET\",\n contentType: \"application/json; charset=urf-8\",\n dataType: \"json\",\n })\n .done(function (responseResult) {\n if (responseResult.isSuccess) {\n let children = responseResult.data;\n\n $.each(children,\n function (i, data) {\n if (data.firstName || data.lastName) {\n data.childName = data.firstName + \" \" + data.lastName;\n } else {\n data.childName = null;\n }\n });\n let roomData;\n $.ajax({\n url: \"/Classroom/GetClassrooms\",\n method: \"GET\",\n contentType: \"application/json; charset=utf-8\",\n dataType: \"json\"\n }).done((res) => {\n if (res.isSuccess) {\n let roomList = [];\n roomData = res.data;\n roomData.forEach(function (entity) {\n roomList.push({\n name: entity.name,\n value: entity.id,\n text: entity.name\n });\n });\n $('#modal-select-room-dropdown').dropdown({\n placeholder: \"Select an room\",\n values: roomList,\n onChange: function (value, text) {\n if (value && childrenDetail) {\n console.log(value);\n $(this).attr(\"data-classId\", value);\n childrenDetail.classroomId = value;\n childrenDetail.classroom = text;\n }\n\n }\n });\n }\n\n });\n\n // init search component\n $('#classroom-child-name-search').search({\n source: children,\n searchFields: ['firstName', 'lastName'],\n fields: {\n title: \"childName\",\n },\n onSelect: function (result, response) {\n $(this).attr(\"orgChildId\", result.id);\n\n $(\"#modal-select-room-dropdown\").attr(\"data-classId\", result.classroomId);\n $(\"#modal-select-room-dropdown\").dropdown('set text', result.classroom);\n $(\"#modal-select-room-dropdown\").dropdown('set value', result.classroomId);\n $(\"#modal-select-room-dropdown\").dropdown('set selected', result.classroomId);\n childrenDetail = result;\n }\n\n });\n\n\n }\n });\n\n }", "function getLastNamespaces() {\r\n let ps = 25;\r\n if (pagesize.value==\"\") {\r\n pagesize.focus();\r\n return false;\r\n } \r\n try {\r\n ps = parseInt(pagesize.value);\r\n } catch (e) {}\r\n\r\n if (pagesize.value!=\"\")\r\n _doGet('/namespace/root/page?pageSize='+ps);\r\n }", "function content() \n\t{\n\t\t// init render\n\t\tvar forms = document.forms;\n\t\tvar links = document.querySelectorAll(\"a:not(.\"+Flink.settings.namespace+\")\");\n\t\tvar data = {\n\t\t\tForms: {\n\t\t\t\ttext: Say(\"Forms\")\n\t\t\t\t, value: \"<span class=\\\"count\\\">\" + forms.length + \"</span>\"\n\t\t\t}\n\t\t\t, Links: {\n\t\t\t\ttext: Say(\"Links\")\n\t\t\t\t, value: \"<span class=\\\"count\\\">\" + links.length + \"</span>\"\n\t\t\t}\n\t\t};\n\t\tvar template = {\n\t\t\trow: \"<tr>\"\n\t\t\t\t+ \"<td>\"\n\t\t\t\t\t+ \"<a class=\\\"%style%\\\"\"\n\t\t\t\t\t+ ' onclick=\"Flink[\\'%key%\\'].call()\">%text%</a>'\n\t\t\t\t\t+ \" <span style=\\\"float:right\\\">%value%</span>\"\n\t\t\t\t\t+ \"</td>\"\n\t\t\t\t+ \"</tr>\"\n\t\t}\n\t\t\n\t\tvar r = [];\t\t\n\t\tr.push( \"<h2 class=\\\"\" + namespace + \"\\\">\" + Say(moduleKEY) + \"</h2>\" );\n\t\tr.push( \"<table class=\\\"\" + namespace + \"\\\">\" );\t\t\n\t\tfor (var key in data) {\n\t\t\tvar obj = data[key];\n\t\t\tobj.key = key\n\t\t\tobj.style = Flink.settings.namespace\n\t\t\tr.push(Render(obj, template.row))\n\t\t}\n\n\t\t// end render\n\t\tr.push( \"</table>\" );\t\t\n\n\t\t// return\n\t\treturn r.join(\"\\n\");\t\t\n\t}", "async function getNamespaces(usertoken) {\n const options = {\n url: `${config.get('API_SERVER_URL')}/apis/project.openshift.io/v1/projects`,\n headers: {\n 'Content-Type': 'application/json',\n Accept: 'application/json',\n Authorization: `Bearer ${usertoken}`,\n },\n json: true,\n fullResponse: false,\n };\n if (process.env.NODE_ENV === 'test') {\n const mockReq = createMockIAMHTTP();\n return mockReq(options);\n }\n const nsResponse = await request(options);\n return Array.isArray(nsResponse.items) ? nsResponse.items.map((ns) => ns.metadata.name) : [];\n}", "function getBucket(path, name, parent){\n\n\t\t// Does it already exist?\n\t\tvar id = prefix + path.replace(/\\W/g,''),\n\t\t\ttab = doc.getElementById(id),\n\t\t\tlabel = doc.getElementById(\"label\"+id);\n\n\t\t// Network\n\t\tvar network = path.replace(/\\:.*/, '');\n\n\t\t// Set current path\n\t\tif(!label&&name){\n\t\t\tlabel = doc.createElement('a');\n\t\t\tlabel.innerHTML = name;\n\t\t\tlabel.id = \"label\"+id;\n\t\t\tif(parent){\n\t\t\t\tlabel.setAttribute('data-parent', parent);\n\t\t\t}\n\t\t\tlabel.onclick = function(){\n\t\t\t\tgetBucket(path, name, parent);\n\t\t\t};\n\t\t\tpath_el.appendChild(label);\n\t\t}\n\n\n\t\tif(!tab){\n\n\t\t\t// create a new tab\n\t\t\ttab = doc.createElement('ul');\n\t\t\ttab.id = id;\n\t\t\ttab.innerHTML = \"<span class='\"+prefix+\"loading' data-message='Waiting for signin'><span></span></span>\";\n\t\t\tbody_el.appendChild(tab);\n\n\t\t\t// Remove loading\n\t\t\tvar span = tab.getElementsByTagName('span')[0];\n\n\t\t\t// Login\n\t\t\thello.login(network, function(auth){\n\n\t\t\t\tif(!auth||auth.error){\n\t\t\t\t\tspan.setAttribute('data-message', \"Signin failed, try again\");\n\t\t\t\t\tspan.setAttribute('data-animate', false);\n\t\t\t\t\tspan.onclick = function(){\n\t\t\t\t\t\ttab.parentNode.removeChild(tab);\n\t\t\t\t\t\tgetBucket(path, name, parent);\n\t\t\t\t\t};\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tspan.setAttribute('data-message', \"Loading files\");\n\n\t\t\t\t// API\n\t\t\t\thello.api(path, function(r){\n\t\t\t\t\tspan.parentNode.removeChild(span);\n\n\t\t\t\t\t// Add files to the tab\n\t\t\t\t\tfor(var i=0;i<r.data.length;i++){\n\t\t\t\t\t\tref.push( new fileRef(r.data[i], network, tab) );\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\n\t\t}\n\n\n\t\t// Hide the others\n\t\t// LISTS\n\t\tvar a = body_el.children;\n\t\tfor(var i=0;i<a.length;i++){\n\t\t\ta[i].style.display = \"none\";\n\t\t}\n\n\t\t// LABELS\n\t\ta = path_el.getElementsByTagName('a');\n\t\tfor(i=a.length-1;i>=0;--i){\n\t\t\tif(parent&&a[i].id === \"label\"+parent){\n\t\t\t\t//parent = a[i].getAttribute('data-parent');\n\t\t\t\ta[i].style.display = \"inline-block\";\n\t\t\t}\n\t\t\telse if(a[i].id === \"label\"+id){\n\t\t\t\ta[i].style.display = \"inline-block\";\n\t\t\t}\n\t\t\telse{\n\t\t\t\ta[i].style.display = \"none\";\n\t\t\t}\n\t\t}\n\n\n\t\t// Update global\n\t\tcurrent_folder = path;\n\n\t\tcurrent_bucket = tab;\n\n\t\tcurrent_network = network;\n\n\t\t// show this\n\t\ttab.style.display = 'block';\n\n\t\t// Update the upload btn\n\t\tupload_btn.innerHTML = name?\"Upload to \" + name.replace(/^[a-z]/,function(r){return r.toUpperCase();}):'Upload';\n\t}", "function GetBudgetViews() {\n GetAddBudgetPartial();\n GetActiveBudgetsPartial();\n}", "function show3(fuly2) {\n firebase.database().ref('Year/' + fuly2).on('value', function (snapshot) {\n viewdatacontent.html(\" \");\n if (snapshot.exists()) {\n\n var t = fuly2.split(\"-\")[2];\n var div = document.createElement('div');\n div.id = 'container3';\n div.className = fuly2;\n snapshot.forEach(function (ChildSnapshot) {\n var data = ChildSnapshot.val().Description;\n var tit = ChildSnapshot.val().Title;\n var fro = ChildSnapshot.val().From;\n var to = ChildSnapshot.val().To;\n var d = `Title:${tit}\\n Description:${data}\\n From:${fro}\\n To:${to}`;\n\n var div1 = document.createElement(\"div\");\n div1.className = \"childdiv3\";\n div1.id = `${ChildSnapshot.key}`;\n div1.append(d);\n div.append(div1);\n viewdatacontent.append(div);\n });\n }\n });\n}", "function renderDirectory() {\n var reg = $('input[name=\"endpoint\"]:checked').val()\n , pkg = $package.val()\n , ver = $version.val()\n , out = 'jspm/registry/package-overrides/' + reg + '/' + pkg;\n out += '@' + ver + '.json';\n out = syntaxHighlight(out);\n $directory_out.html(out);\n}", "function fetchChildren(entirePath){\n\t//entirePath includes the leaf\n\t$(\"#loading\").show();\n\tvar respo;\n\t$.ajax({\n \t\ttype: \"POST\",\n \t\tdata: {classterm : entirePath},\n \t\t url: './php/fetchAndCheckChildren.php',\n \t\t success: function(r,mode){\n respo = r;\n $(\"#loading\").hide();\n buildTree(r,entirePath); \n },\n error: function(r,mode){\n \t$(\"#loading\").hide();\n }\n });\n\n}", "function displayNodeDetails(entity_gid, entityType, backPage, excludeTabs) {\n\tcloseOverlay(); // If there was overlay opened, just close it\n if (entity_gid == undefined || entity_gid == \"firstOperation\" || entity_gid == \"fakeRootNode\" || TVB_skipDisplayOverlay) {\n return;\n }\n var url = '';\n\tif (entityType == TVB_NODE_OPERATION_TYPE) {\n\t\turl = '/project/get_operation_details/' + entity_gid + \"/0\";\n\t} else if (entityType == TVB_NODE_OPERATION_GROUP_TYPE) {\n\t\turl = '/project/get_operation_details/' + entity_gid + \"/1\";\n\t} else {\n\t\turl = '/project/get_datatype_details/' + entity_gid;\n\t}\n\n if (backPage == undefined || backPage == '') {\n backPage = get_URL_param('back_page');\n }\n\tif (backPage) {\n\t\turl = url + \"/\" + backPage;\n\t}\n\tif (excludeTabs) {\n\t\turl = url + \"?exclude_tabs=\" + excludeTabs\n\t}\n showOverlay(url, true);\n}", "function resourceAmbassador(resrces){\r\n\tvar x = resrces.getAttribute(\"data-dash-rsrctitle\");\r\n\tconsole.log(x);\r\n\t/*get std ambassador information*/\r\n\tmyXHR('get',{'path':'/resources/'+x},'none').done(function(json){\r\n\t\tvar ambasdr = \"<div class='rsrcPopup'><div><p class='closeP'><i class='popupContent_close fa fa-times fa-2x'></i></p></div><div><h1 style='color: #F2A7C4;text-align:center'>\"+json.studentAmbassadors.title+\"</h1>\";\r\n\t\tambasdr += \"<hr style='width:30%'><ul>\";\r\n\t\t\r\n\t\t$.each(json.studentAmbassadors.subSectionContent, function(i,item){\r\n\t\t\tambasdr += \"<li><p class='coopP'>\"+item.title+\"</p>\";\r\n\t\t\tambasdr += \"<p>\"+item.description+\"</li>\";\r\n\t\t});\r\n\r\n\t\tambasdr += \"</ul></div></div>\";\r\n\t\t$(\"#popupContent\").html(ambasdr);\r\n\t});\r\n}", "function resourceStdServices(resrces){\r\n\tvar x = resrces.getAttribute(\"data-dash-rsrctitle\");\r\n\tconsole.log(x);\r\n\t/*get std services information*/\r\n\tmyXHR('get',{'path':'/resources/'+x},'none').done(function(json){\r\n\t\tvar stdservices = \"<div class='rsrcPopup'><div><p class='closeP'><i class='popupContent_close fa fa-times fa-2x'></i></p></div><div><h1 style='color: #F2A7C4;text-align:center'>\"+json.studentServices.title+\"</h1>\";\r\n\t\tstdservices += \"<hr style='width:7%'><p class='coopP'>\"+json.studentServices.academicAdvisors.title+\"</p>\";\r\n\t\tstdservices += \"<p>\"+json.studentServices.academicAdvisors.description+\"</p>\";\r\n\t\tstdservices += \"<p class='coopP'>\"+json.studentServices.facultyAdvisors.title+\"</p>\";\r\n\t\tstdservices += \"<p>\"+json.studentServices.facultyAdvisors.description+\"</p>\";\r\n\t\t\r\n\t\tstdservices += \"<p class='coopP'>\"+json.studentServices.professonalAdvisors.title+\"</p><ul>\";\r\n\t\t$.each(json.studentServices.professonalAdvisors.advisorInformation, function(i,item){\r\n\t\t\tstdservices += \"<li>\"+item.department+\" - \"+item.name+\" (\"+item.email+\")</li>\";\r\n\t\t});\r\n\r\n\t\tstdservices += \"</ul><p class='coopP'>\"+json.studentServices.istMinorAdvising.title+\"</p><ul>\";\r\n\t\t$.each(json.studentServices.istMinorAdvising.minorAdvisorInformation, function(i,item){\r\n\t\t\tstdservices += \"<li>\"+item.title+\" - \"+item.advisor+\" (\"+item.email+\")</li>\";\r\n\t\t});\r\n\r\n\t\tstdservices += \"</ul></div></div>\";\r\n\t\t$(\"#popupContent\").html(stdservices);\r\n\t});\r\n}", "function getDataBySystem(jdata) {\n viewport.clear(); // reset viewport\n $('ul.variables').html(\"\"); // reset variables\n // reset entity objects\n mRoot.infoEntities = new Collection();\n mRoot.objEntities = new Collection();\n\n // reset connection objects\n mRoot.infoConnections = new Collection();\n mRoot.objConnections = new Collection();\n\n // reset variable objects\n mRoot.infoVariables = new Collection();\n\n var root = jdata.WorkflowService[\"ftwa:StartWorkflow\"][\"ftwa:StartWorkflow.Activities\"][\"p:Flowchart\"], // get from service to start workflow -> flowchart\n managers = jdata.WorkflowService[\"sap2010:WorkflowViewState.ViewStateManager\"][\"sap2010:ViewStateManager\"][\"sap2010:ViewStateData\"], // get from service\n variables = root[\"p:Flowchart.Variables\"]; // \n\n // get start\n var root_start = root[\"@StartNode\"] !== undefined ? root[\"@StartNode\"] : root[\"p:Flowchart.StartNode\"],\n start = new Entity();\n start.label = \"Start\";\n start.annotation = root[\"@sap2010:Annotation.AnnotationText\"] !== undefined ? root[\"@sap2010:Annotation.AnnotationText\"] : \"\";\n start.type = typeEntity.t_start;\n start.alias = root[\"@sap2010:WorkflowViewState.IdRef\"] === undefined ? root[\"sap2010:WorkflowViewState.IdRef\"] : root[\"@sap2010:WorkflowViewState.IdRef\"];\n mRoot.infoEntities.add(start);\n\n // get variables \n getVariables(variables);\n // get decisions and switchs\n getEntities(root);\n\n // get position info and connection\n mRoot.infoEntities.forEach(function (entity) {\n for (var i = 0; i < managers.length; i++) {\n var node = managers[i];\n if (node[\"@Id\"] === entity.alias) {\n var points = node[\"sap:WorkflowViewStateService.ViewState\"][\"scg:Dictionary\"][\"av:Point\"][\"#text\"].split(\",\");\n var sizes = node[\"sap:WorkflowViewStateService.ViewState\"][\"scg:Dictionary\"][\"av:Size\"][\"#text\"].split(\",\");\n entity.x = parseFloat(points[0]);\n entity.y = parseFloat(points[1]);\n entity.width = parseFloat(sizes[0]);\n entity.height = parseFloat(sizes[1]);\n\n if (entity.type !== typeEntity.t_approve && entity.type !== typeEntity.t_generic) {\n mRoot.objEntities.add(drawEntity(viewport, entity));\n } else {\n mRoot.objEntities.add(drawEntityFlow(viewport, entity));\n }\n\n if (entity.type === typeEntity.t_start) { // size of flowchart belong to start\n // resize viewport\n var size = node[\"@sap:VirtualizedContainerService.HintSize\"].split(\",\"); // hash size w/h\n mViewport = {\n width: parseFloat(size[0]) < defaultValue.viewport.width ? defaultValue.viewport.width : parseFloat(size[0]),\n height: parseFloat(size[1]) < defaultValue.viewport.height ? defaultValue.viewport.height : parseFloat(size[1])\n };\n $('#viewport').width(mViewport.width);\n $('#viewport').height(mViewport.height);\n viewport.setSize(mViewport.width, mViewport.height); // set new size of viewport from data\n\n // reset scroll\n if (scrollbar !== null) {\n scrollbar.destroy();\n }\n scrollbar = $('#chart').jScrollPane().data().jsp;\n }\n }\n }\n });\n\n mRoot.infoEntities.forEach(function (entity) {\n for (var i = 0; i < managers.length; i++) {\n var node = managers[i];\n if (node[\"@Id\"] === entity.alias) {\n // get connections\n if (node[\"sap:WorkflowViewStateService.ViewState\"][\"scg:Dictionary\"][\"av:PointCollection\"] !== undefined) {\n var info = node[\"sap:WorkflowViewStateService.ViewState\"][\"scg:Dictionary\"][\"av:PointCollection\"];\n if (node[\"sap:WorkflowViewStateService.ViewState\"][\"scg:Dictionary\"][\"x:String\"] !== undefined) {\n labelDefault = node[\"sap:WorkflowViewStateService.ViewState\"][\"scg:Dictionary\"][\"x:String\"][\"#text\"];\n getConnections(entity, info, labelDefault);\n } else {\n getConnections(entity, info);\n }\n }\n }\n }\n });\n mRoot.infoConnections.forEach(function (obj) {\n var connection = createConnection(obj);\n // can't draw label connnection begin/end is start\n if (mRoot.infoEntities.itemByID(obj.from).type !== typeEntity.t_start &&\n mRoot.infoEntities.itemByID(obj.to).type !== typeEntity.t_start) {\n // it's decision => set connection is true or false\n if (mRoot.infoEntities.itemByID(obj.from).type === typeEntity.t_decision) {\n if (obj.fromHolder == 2) {\n obj.label = 'False';\n } else {\n obj.label = 'True';\n }\n }\n // description of connection from switch\n obj.description = obj.label;\n\n // connection from generic/approve, it not labels\n if (mRoot.infoEntities.itemByID(obj.from).type !== typeEntity.t_generic &&\n mRoot.infoEntities.itemByID(obj.from).type !== typeEntity.t_approve) {\n // draw temp a label for get width/height.\n var temp = viewport.text(-100, -100, obj.label).attr({ \"font-size\": \"10px\" });\n connection.label = drawLabel(connection.posLabel.x, connection.posLabel.y, temp.getBBox().width, temp.getBBox().height, obj.label, viewport);\n connection.label.mask.parent = connection;\n temp.remove();\n }\n }\n\n mRoot.objConnections.add(connection);\n });\n}" ]
[ "0.5499581", "0.54704106", "0.5433094", "0.5021069", "0.50201297", "0.49823117", "0.49371448", "0.48635447", "0.48339528", "0.48253956", "0.4808618", "0.48020738", "0.48020738", "0.47845978", "0.47799504", "0.47679135", "0.47676986", "0.47321117", "0.4727076", "0.47170094", "0.47129908", "0.47112364", "0.4686092", "0.46517414", "0.46480045", "0.46388906", "0.46331394", "0.46214405", "0.46202266", "0.46146378", "0.46062356", "0.4603015", "0.4603015", "0.4602184", "0.45975474", "0.45713693", "0.45693764", "0.45673335", "0.4564248", "0.45347765", "0.4534006", "0.4529448", "0.4515142", "0.45143434", "0.45104116", "0.45091993", "0.45069483", "0.45006678", "0.44875434", "0.44870514", "0.4481137", "0.44788697", "0.44706362", "0.4442115", "0.4436664", "0.44330928", "0.44242528", "0.4417385", "0.441644", "0.44119895", "0.4407046", "0.4403257", "0.43811923", "0.43798426", "0.4376519", "0.4375819", "0.43730435", "0.43729156", "0.43650797", "0.4362819", "0.43622878", "0.43622878", "0.43543923", "0.43488705", "0.43455645", "0.4344666", "0.4343601", "0.43429452", "0.4341488", "0.4332186", "0.43309718", "0.43292984", "0.43276373", "0.43272728", "0.43270305", "0.43258744", "0.4321176", "0.43186995", "0.43177664", "0.43163466", "0.43103263", "0.43094528", "0.43091366", "0.4308027", "0.4307287", "0.42957386", "0.42949083", "0.42937294", "0.42934388", "0.4292505" ]
0.57480055
0
Displays the results of a search of FluidDB
function search_results(data, context){ var obj = JSON.parse(data); // cache the jQuery object var $search_results = $('#search_results'); // empty the element $search_results.empty(); // add the results $search_results.append('<h2>Results</h2><p>Objects with the following ids match your query:</p><ul>'); if (obj.ids.length>0) { $.each(obj.ids, function(o, object_id) { context.partial('templates/result.template', { obj: object_id}, function(rendered) { $search_results.append(rendered)}); }); } else { $search_results.append('<li>None found. Please try again...</li>'); } $search_results.append('</ul>'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "executeSearch(term) {\n var results;\n try {\n results = this.search.fuse.search(term); // the actual query being run using fuse.js\n } catch (err) {\n if (err instanceof TypeError) {\n console.log(\"hugo-fuse-search: search failed because Fuse.js was not instantiated properly.\")\n } else {\n console.log(\"hugo-fuse-search: search failed: \" + err)\n }\n return;\n }\n let searchitems = '';\n\n if (results.length === 0) { // no results based on what was typed into the input box\n this.resultsAvailable = false;\n searchitems = '';\n } else { // we got results, show 5\n for (let item in results.slice(0,5)) {\n let result = results[item];\n if ('item' in result) {\n let item = result.item;\n searchitems += this.itemHtml(item);\n }\n }\n this.resultsAvailable = true;\n }\n\n this.element_results.innerHTML = searchitems;\n if (results.length > 0) {\n this.top_result = this.element_results.firstChild;\n this.bottom_result = this.element_results.lastChild;\n }\n }", "function search(){\r\n if (!searchField.value)\r\n return;\r\n\r\n let results = searchEngine.search(searchField.value,{\r\n fields: {\r\n tags: { boost: 3 },\r\n title: { boost: 2 },\r\n body: { boost: 1 }\r\n }\r\n }); \r\n\r\n searchResults.classList.add('header-searchResults--show')\r\n\r\n let resultsHtml = '';\r\n if (results.length){\r\n \r\n resultsHtml = `Found ${results.length} post(s).`;\r\n for(let result of results){\r\n let doc = searchEngine.documentStore.getDoc(result.ref);\r\n resultsHtml += `\r\n <div class=\"header-searchResult\">\r\n <a href=\"${doc.id}\">${doc.title}</a>\r\n </div>`;\r\n\r\n }\r\n } else{\r\n resultsHtml = `<div class=\"header-searchResult\">\r\n No results found for ${searchField.value}\r\n </div>`;\r\n }\r\n\r\n searchResults.innerHTML = resultsHtml;\r\n}", "function displaySearchResults (query, results) {\n\n // We're using data-attributes to govern CSS properties of the search form/results panel\n _root.setAttribute('data-displayresults','true');\n _root.removeAttribute('data-searchinit');\n _results.removeAttribute('aria-hidden');\n _results.removeAttribute('hidden');\n\n // Display number of results found above the results list\n _results\n .querySelector('div>h2')\n .textContent = results.length +\n (results.length === 1 ? ' result' : ' results') +\n ' found for \"' + query + '\"';\n\n if (results.length < 1) { return; }\n _results.querySelector('div').insertAdjacentHTML('beforeend',\n // The fun part:\n generateMarkup(results)\n );\n }", "function showSearchResults(searchQuery) {\n searchData(searchQuery).then(results => {\n const html = results.map(movie => `\n <li>\n <span class=\"title\">${movie.title}</span>\n <span class=\"rating\">${movie.rating}</span>\n </li>\n `);\n\n resultsElement.innerHTML = html.join('');\n });\n }", "function showResults () {\n const value = this.value\n const results = index.search(value, 8)\n // console.log('results: \\n')\n // console.log(results)\n let suggestion\n let childs = suggestions.childNodes\n let i = 0\n const len = results.length\n\n for (; i < len; i++) {\n suggestion = childs[i]\n\n if (!suggestion) {\n suggestion = document.createElement('div')\n suggestions.appendChild(suggestion)\n }\n suggestion.innerHTML = `<b>${results[i].tablecode}</>: ${results[i].label}`\n // `<a href = '${results[i].tablecode}'> ${results[i]['section-name']} ${results[i].title}</a>`\n\n // console.log(results[i])\n }\n\n while (childs.length > len) {\n suggestions.removeChild(childs[i])\n }\n //\n // // const firstResult = results[0].content\n // // const match = firstResult && firstResult.toLowerCase().indexOf(value.toLowerCase())\n // //\n // // if (firstResult && (match !== -1)) {\n // // autocomplete.value = value + firstResult.substring(match + value.length)\n // // autocomplete.current = firstResult\n // // } else {\n // // autocomplete.value = autocomplete.current = value\n // // }\n }", "function displaySearchResults(query){\n\t// create the complete url\n\tvar wiki_url = base_url + query;\n\tconsole.log(wiki_url);\n\t$.getJSON(wiki_url, function(json){\n\t\tvar result = json[\"query\"][\"search\"];\n\t\tfor(var i=0; i<result.length; i++){\n\t\t\tconsole.log(result[i]);\n\t\t\turl_link = base_redirect + result[i].title.replace(\" \", \"%20\");\n\t\t\t$(\"#content\").append(\"<a href='\" + url_link + \"' class='list-group-item' target='_blank'><h3>\"\n\t\t\t+ result[i].title + \"</h3><br>\" + result[i].snippet + \"<br></a>\");\n\t\t}\n\t});\n\t\n}", "function getResults() {\n var searchText = document.getElementById('search').value;\n var searchData = control.query(\n 'femaleClients',\n 'client_id = ?',\n [searchText]);\n if(searchData.getCount() > 0) {\n // open filtered list view if client found\n control.openTableToListView(\n 'femaleClients',\n 'client_id = ?',\n [searchText],\n '/tables/FemaleClients/html/femaleClients_list.html');\n } else {\n // open 'client not found' page\n control.openTableToListView(\n 'femaleClients',\n null,\n null,\n 'assets/clients_not_found_list.html');\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 displaySearch(data) {\n var result = data.query.search;\n $(\".search-result\").html(\"\");\n for (var i = 0; i < result.length; i++) {\n var tmp =\n '<div class=\"row result\" id=\"result-' +\n (i + 1) +\n '\">' +\n '<h5 class=\"title\" id=\"title' +\n (i + 1) +\n '\">' +\n '<a href=\"https://en.wikipedia.org/wiki/' +\n result[i].title +\n '\"> ' +\n result[i].title +\n \"</a></h5><br>\" +\n '<p class=\"snippet\" id=\"snippet' +\n (i + 1) +\n '\">' +\n result[i].snippet +\n \"...</p></div>\";\n $(\".search-result\").html($(\".search-result\").html() + tmp);\n }\n $(\".result\").css({\n background: \"rgba(244, 244, 244)\",\n margin: \"15px\",\n padding: \"15px\",\n width: \"100%\"\n });\n}", "function search(query, startRecord, maximumRecords, layout) {\n var navhtml = document.getElementById(\"searchnavigation\");\n var resulthtml = document.getElementById(\"searchresults\");\n if (navhtml != null) navhtml.innerHTML = \"<p>loading...</p>\";\n if (maximumRecords == \"\") maximumRecords = 10;\n if (startRecord == \"\") startRecord = 0;\n if (query == null) query == \"\";\n\n var siteModel = new ModifierModel({key:'site',query:query});\n var filetypeModel = new ModifierModel({key:'filetype',query:query});\n var ext = filetypeModel.attributes.value;\n var hl = (layout==\"paragraph\") ? 'true' : 'false';\n\n searchResult = new SearchModel({hl:hl,query:query,start:startRecord,rows:maximumRecords,servlet:\"index.html\",layout:layout}); \n searchResult.fetch({\n success:function(searchResult) {\n navhtml.innerHTML = \"<p>parsing result...</p>\";\n rowCollection = new RowCollection({servlet:searchResult.attributes.servlet});\n rowCollection.add(searchResult.attributes.items);\n var totalResults = searchResult.attributes.totalResults.replace(/[,.]/,\"\");\n var navigation = searchResult.navigationCollection();\n \n // update navigation\n var topics = navigation.facet(\"topics\");\n var sitefacet = navigation.facet(\"domains\");\n var site = sitefacet ? sitefacet.facetElements() : {};\n for (var key in site) {if (query.indexOf(\"site:\" + key) >= 0) delete site[key];}\n var filetypefacet = navigation.facet(\"filetypes\");\n var filetypes = filetypefacet ? filetypefacet.facetElements() : {};\n for (var key in filetypes) {if (query.indexOf(\"filetype:\" + key) >= 0) delete filetypes[key];}\n\n if (ext == \"png\" || ext == \"gif\" || ext == \"jpg\" || ext == \"PNG\" || ext == \"GIF\" || ext == \"JPG\") {\n document.getElementById(\"searchnavigation\").innerHTML = \"<p>found \" + this.length + \" images, preparing...</p>\";\n resulthtml.innerHTML = rowCollection.resultImages();\n hideDownloadScript();\n navhtml.innerHTML = searchResult.fullPageNavigation(\"Image Matrix Size\");\n } else if (layout==\"paragraph\") {\n document.getElementById(\"searchnavigation\").innerHTML = \"<p>found \" + this.length + \" images, preparing result list...</p>\";\n resulthtml.innerHTML = rowCollection.resultList();\n hideScriptButton();\n navhtml.innerHTML = searchResult.fullPageNavigation(\"Result List Size\");\n } else {\n document.getElementById(\"searchnavigation\").innerHTML = \"<p>found \" + this.length + \" documents, preparing table...</p>\";\n resulthtml.innerHTML = rowCollection.resultTable();\n hideDownloadScript();\n navhtml.innerHTML = searchResult.fullPageNavigation(\"Result Table Size\");\n }\n navhtml.innerHTML += searchResult.renderNavigation(\"Result Layout\");\n if (filetypefacet) navhtml.innerHTML += filetypefacet.facetBox(searchResult.attributes.servlet, filetypeModel.attributes.key, filetypeModel.attributes.value, 8, searchResult);\n if (sitefacet) navhtml.innerHTML += sitefacet.facetBox(searchResult.attributes.servlet, siteModel.attributes.key, siteModel.attributes.value, 16, searchResult);\n }\n });\n}", "function showResults(results){\n\t\n}", "function displayQueryResults() {\n\t\t\t$scope.resultsAvailable = true;\n\t\t\tresultsOffset = 0;\n\t\t\t$scope.getNextResultsPage();\n\n\t\t}", "function search() {\n var currentForms = session.forms;\n\n\n var SearchProductListsResult = new Pipelet('SearchProductLists', {\n PublicOnly: true\n }).execute({\n EventType: currentForms.giftregistry.search.simple.eventType.value,\n EventCity: currentForms.giftregistry.search.advanced.eventCity.value,\n EventState: currentForms.giftregistry.search.advanced.eventAddress.states.state.value,\n EventCountry: currentForms.giftregistry.search.advanced.eventAddress.country.value,\n RegistrantFirstName: currentForms.giftregistry.search.simple.registrantFirstName.value,\n RegistrantLastName: currentForms.giftregistry.search.simple.registrantLastName.value,\n Type: ProductList.TYPE_GIFT_REGISTRY,\n EventMonth: currentForms.giftregistry.search.advanced.eventMonth.value,\n EventYear: currentForms.giftregistry.search.advanced.eventYear.value,\n EventName: currentForms.giftregistry.search.advanced.eventName.value\n });\n var ProductLists = SearchProductListsResult.ProductLists;\n/**\n * TODO\n */\n showSearch({\n ProductLists: ProductLists\n });\n}", "function getResults() {\n var searchText = document.getElementById('search').value;\n \n odkData.query('pediatria', 'regdate = ?', [searchText], null, null, \n \t\tnull, null, null, null, true, cbSRSuccess, cbSRFailure);\n}", "function displaySearchResults(results, store) {\n\t\tvar searchResults = document.getElementById('search-results');\n\t\tif (results.length) { // Are there any results?\n\t\t\tvar appendString = '';\n\n\t\t\tfor (var i = 0; i < results.length; i++) { // Iterate over the results\n\t\t\t\tvar item = store[results[i].ref];\n\t\t\t\tappendString += '<h3><a href=\".' + item.url + '\">' + item.title + ' <div class=\"fa fa-arrow-right\" aria-hidden=\"true\"></div></a></h3>';\n\t\t\t\tappendString += '<p>' + item.content.substring(0, 150) + '...</p></li>';\n\t\t\t}\n\t\t\tsearchResults.innerHTML = appendString;\n\t\t} else {\n\t\t\tdisplayFailureMessage('No results found for \"' + searchTerm);\n\t\t}\n\n\n\t}", "function display_results() {\n}", "function output_table(res,results) {\n\tres.render('query.jade',\n\t\t { results: results }\n\t );\n}", "function displaySearchResults(query, results, data) {\n\t$('.content').empty();\n\t\n\t// Hides OR shows and sets results summary\n\tif (query == \"\") {\n\t\t$('.summary-wrapper').hide();\n\t}\n\telse {\n\t\t$('.summary-wrapper').show();\n\t\t$('#numresults').text(results.length);\n\t\tif (results.length == 1) {\n\t\t\t$('#results-plural').text('');\n\t\t}\n\t\telse {\n\t\t\t$('#results-plural').text('s');\n\t\t}\n\t}\n\n\tif (results.length) {\n\t\tfor (var i = 0; i < results.length; i++) {\n\t\t\tif (query == \"\")\n\t\t\t\titem = data[i]; // empty query --> show all results\n\t\t\telse\n\t\t\t\titem = data[results[i].ref]; // show query results\n\n\t\t\tvar rockList, hhList, electronicList, otherList;\n\t\t\trockList = \"\";\n\t\t\thhList = \"\";\n\t\t\telectronicList = \"\";\n\t\t\totherList = \"\";\n\n\t\t\titem['rock-artists'].forEach(function(artist) {\n\t\t\t\trockList += \"<li>\" + artist + \"</li>\";\n\t\t\t});\n\t\t\titem['hh-artists'].forEach(function(artist) {\n\t\t\t\thhList += \"<li>\" + artist + \"</li>\";\n\t\t\t});\n\t\t\titem['electronic-artists'].forEach(function(artist) {\n\t\t\t\telectronicList += \"<li>\" + artist + \"</li>\";\n\t\t\t});\n\t\t\titem['other-artists'].forEach(function(artist) {\n\t\t\t\totherList += \"<li>\" + artist + \"</li>\";\n\t\t\t});\n\n\t\t\tvar image = '<div class=\"image\"><img src=\"images/' + item.image.url + '\" alt=\"' + item.title + '\"></div>';\n\t\t\tvar title = '<div class=\"title\"><a href=\"' + item.url + '\">' + item.title + '</a></div>';\n\t\t\tvar date = '<div class=\"date\">' + item.date + '</div>';\n\t\t\tvar location = '<div class=\"location\">' + item.location + '</div>';\n\t\t\tvar artistGroup = '<div class=\"artists-container\">';\n\n\t\t\tif (rockList !== \"\")\n\t\t\t\tartistGroup += '<div class=\"artists col1\"><p class=\"heading\">Rock</p><ul class=\"list rock-artists\">' + rockList + '</ul></div>';\n\t\t\tif (hhList !== \"\")\n\t\t\t\tartistGroup += '<div class=\"artists col2\"><p class=\"heading\">Hip-Hop</p><ul class=\"list hh-artists\">' + hhList + '</ul></div>';\n\t\t\tif (electronicList !== \"\")\n\t\t\t\tartistGroup += '<div class=\"artists col3\"><p class=\"heading\">Electronic</p><ul class=\"list electronic-artists\">' + electronicList + '</ul></div>';\n\t\t\tif (otherList !== \"\")\n\t\t\t\tartistGroup += '<div class=\"artists col4\"><p class=\"heading\">Everything Else</p><ul class=\"list other-artists\">' + otherList + '</ul></div>'\n\t\t\tartistGroup += '</div><div class=\"toggle\">+ Show More</div>';\n\t\t\tartistGroup += '<a class=\"attribution\" target=\"_blank\" href=\"' + item.image.source + '\">' + item.image.author + '</a>';\n\n\t\t\tvar container = '<section>' + image + '<div class=\"card\">' + title + date + location + artistGroup + '</div></section>';\n\t\t\t$('.content').append(container);\n\t\t}\n\t}\n\n\t// Use mark.js to add span.higlight around search terms\n\t$(\".artists-container\").mark(query, {\n\t \"element\": \"span\",\n\t \"className\": \"highlight\",\n\t \"accuracy\": \"exactly\"\n\t});\n}", "function renderResults(results) {\n\n}", "function searchDocuments(searchTerm, res){\r\n var results;\r\n var searchResults = \"No results found\"\r\n MongoClient.connect(url, function(err, client){\r\n if (err) throw err;\r\n var collection = client.db('info30005').collection('info30005');\r\n \r\n collection.find( { $text: { $search: searchTerm } }).toArray(function(err, results){\r\n //console.log(results);\r\n client.close();\r\n var searchResults = generateSearchTable(results);\r\n res.render('pages/search', { myVar : searchTerm , searchResults : searchResults});\r\n });\r\n\r\n })\r\n}", "function renderResults(){\n console.log(results)\n}", "function basicsearch() {\n searchString = document.basicForm.basicText.value;\n searchTerms = searchString.split(/\\s/);\n\n putHeader();\n\n findResults();\n putResults();\n\n putFooter();\n\n writeResultsPage();\n}", "function employeesSearch() {\n connection.query(\"SELECT * FROM employeeTracker_db.employee\",\n function(err, res) {\n if (err) throw err\n console.table(res)\n runSearch()\n })\n}", "function search(value){\n\t// console.log(\"search: \" + value);\n\tshowSection(null, '#section-searchresults');\n\t$('#section-searchresults h1').html(\"Results for: '\" + value + \"'\");\n\tcontroller.search(value);\n}", "function _showResults(response){\r\n\t\r\n\t\r\n\t$('#sql-query').text(response.data.qberesult.query);\r\n\tvar resultColumns = response.data.qberesult.values;\r\n\r\n\tif(resultColumns.length > 1){\r\n\t\tvar htmlString = '<table class=\"table table-bordered caption-bottom\"><thead><tr>';\r\n\t\tfor(var i in resultColumns[0]){\r\n\t\t\thtmlString += '<th>'+resultColumns[0][i] + '</th>';\r\n\t\t}\r\n\t\thtmlString += '</thead><tbody>';\r\n\t\tfor(i=1;i<resultColumns.length;i++){\r\n\t\t\thtmlString += '<tr>';\r\n\t\t\tfor(var j in resultColumns[i]){\r\n\t\t\t\thtmlString += '<td>' + resultColumns[i][j] + '</td>';\r\n\t\t\t}\r\n\t\t\thtmlString += '</tr>';\r\n\t\t}\r\n\t\thtmlString += '</tbody></table>';\r\n\t\t$('#results').html(htmlString);\r\n\t}\r\n\telse{\r\n\t\t$('#results').html(\"No results found.\");\r\n\t}\r\n\t\r\n\t\r\n\t$('#qbe-result').show();\r\n\t\r\n $('html, body').animate({\r\n scrollTop: $(\"#qbe-result\").offset().top\r\n }, 2000);\r\n\r\n\r\n}", "function show_results(data, tsearch) \n { sout = '<table id=\"search_table\">';\n sout += result_content (data.nct);\n\n // page navigation\n sout += '<tr><td colspan=\"3\"><p id=\"nav_search\">'\n first = parseInt(data.nct[0][1]);\n last = parseInt(data.nct[data.nct.length-1][1]);\n np = parseInt(data.npag);\n // previous\n if (np > 1)\n sout += '<span id=\"rprev\" class=\"nav_page\"> Previous Page (' + (first-20) + ' - ' + (last-20) + ')</span>';\n else\n sout += '<span> Previous Page </span>'\n // current\n sout += '<span id=\"rshow\"> Showing (' + first + ' - ' + last + ')</span>'\n // next\n pmax = Math.ceil(parseInt(data.n.replace(',',''))/20);\n if (np+1 <= pmax)\n sout += '<span id=\"rnext\" class=\"nav_page\"> Next Page (' + (first+20) + ' - ' + (last+20) + ')</span>'\n else\n sout += '<span> Next Page </span>'\n sout += '</p></td></tr></table>';\n $(\"#results\").html(sout); \n \n // navigation clicks\n $('#rprev').bind('click', function() \n { if (tsearch == 'advanced')\n advanced_search(parseInt(data.npag)-1);\n else\n search(parseInt(data.npag)-1);\n\t$(document).scrollTop(0);\n });\n\n $('#rnext').bind('click', function() \n { if (tsearch == 'advanced')\n advanced_search(parseInt(data.npag)+1);\n else\n search(parseInt(data.npag)+1);\n\t$(document).scrollTop(0);\n });\n\n $('.filter_link').bind('click', function() \n { tag_cloud_filtering (tsearch); });\n }", "function newSearch(req,res){\n // console.log(req.query );\n res.render('pages/index');\n}", "function showResults(results){\n var result = \"\";\n // got through each array and get the value of the Title only\n $.each(results, function(index,value){\n result += '<p>' + value.Title + '</p>';\n });\n // append the information into search-results div.\n $('#search-results').append(result);\n }", "function showRecords(node, query) {\n var rank = node.attr('rank');\n if (rank == 'kingdoms') return;\n var name = node.attr('id');\n // url for records list\n var recordsUrl = urlConcat(biocacheWebappUrl, \"/occurrences/search?q=\") + query +\n \"&fq=\" + rank + \":\" + name;\n document.location.href = recordsUrl;\n}", "function displaySearchResult(search) {\n window.location.replace(\"?=\" + food + \"\");\n }", "function displayResults (data) {\n displayList(data);\n initMap(data);\n unhideHtml();\n}", "function displayResults() {\n\n $('.btn').focus();\n $('#top-result').fadeIn();\n $('.container__outside--output').fadeIn();\n $('#map').html('<img src=' + mapUrl + '>');\n $('#result').text(venue.name);\n $('#location').text(venue.address);\n $('#url').html('<a href=\"' + venue.url + '\" target=\"_blank\">Vist website</a>');\n $('#category').html('<img src=\"' + venue.icon + '64.png\">');\n \n }", "function displaySearchResults(data) {\n const list = data.data.results;\n\n if (list.length === 0) {\n $('.unknown-section').html(`\n <div class='unknown'>\n <h2>No character found by that name.</h2>\n </div>\n `);\n\n $('.main-unknown-section').prop('hidden', false);\n $('.search-results-section').prop('hidden', true);\n\n return;\n }\n\n $('.main-unknown-section').prop('hidden', true);\n $('.search-results-section').prop('hidden', false);\n\n for (let i = 0; i < list.length; i++) {\n $('.search-results').append(`\n <div class=\"search-result\">\n <a href=\"#\" class=\"result-name\">${list[i].name}</a>\n </div>\n `);\n }\n}", "function resultsPage (req,res){\n console.log('inside ',searchResults[0].name);\n res.render('pages/results.ejs', { data: searchResults})\n \n}", "function renderResults(result) {\n\t\tif(result && result.searchHits && result.searchHits.length) {\t\n\t\t\tlistOfMyListItems = result.searchHits;\n\t\t\tdisplayMyList(result.searchHits);\n\t\t\tpagingControl.updatePaging(result);\n\t\t}\n\t}", "function breakfastSearch(req, res) {\n let url = `https://api.spoonacular.com/recipes/complexSearch?number=12&type=breakfast&apiKey=${apiKey}`;\n\n superagent.get(url)\n .then(searchResults => searchResults.body.results.map(result => new Result(result)))\n .then(results => {\n let cookie = req.cookies.userID ? req.cookies.userID : '';\n res.render('searchPages/breakfast', {searchResults: results, 'cookie': cookie});\n })\n .catch(error => handleError(error, res));\n}", "function onShowSearchResultPanel() {\n mediator.getView('searchResult');\n }", "function displayResults(data){\r\n // remove all past results\r\n $(\".results\").remove();\r\n // lift WikiSearch title to top of page\r\n $(\".titleClass\").css(\"padding-top\",\"0px\");\r\n // show results\r\n \r\n const result = data[\"query\"][\"search\"][0][\"title\"];\r\n // create div for all search results\r\n $(\".searchMenu\").append(\"<div class = 'searchResults results'></div>\");\r\n // main search result title\r\n $(\".searchResults\").append(\"<div class='searchTitle'></div>\");\r\n $(\".searchTitle\").html(\"Search Results for <a target=\\\"_blank\\\" href = \\'https://en.wikipedia.org/wiki/\"+result+\"\\'>\"+result+\"</a>\"); // push titleClass to top of page\r\n \r\n // results\r\n for (var ii =1; ii < data[\"query\"][\"search\"].length -1; ii++){\r\n // create div for each result\r\n $(\".searchResults\").append(\"<div class='key\" + ii + \" result'></div>\");\r\n // append to div\r\n var searchResult = data[\"query\"][\"search\"][ii][\"title\"];\r\n $(\".key\" + ii).append(\"<p class = 'resultTitle'><a target=\\\"_blank\\\" href = \\'https://en.wikipedia.org/wiki/\"+searchResult+\"\\'>\"+searchResult+\"</a></p>\");\r\n $(\".key\"+ii).append(\"<p class = 'resultText'>\" + data[\"query\"][\"search\"][ii][\"snippet\"]+\"...\" + \"</p>\");\r\n }\r\n}", "index(req, res) {\n res.render('search');\n }", "function displayResults(objectarray) {\n\t$(\"#search-documents\").empty();\n\t$(\"#chaplain-docs\").empty();\n\tif (objectarray.length == 0) {\n\t\t$(\"#search-documents\").append(\"<p>No results found</p>\");\n\t\t$(\"#chaplain-docs\").append(\"<p>No Documents found</p>\");\n\t}\n\tobjectarray.forEach(function(e) {\n\t\t$(\"#search-documents\").append('<hr><article class=\"search-result\"> ' +\n\t\t\t'<h3><a href=\"' + e.link + '\" target=\"_blank\">' + e.title + '</a></h3>' +\n\t\t\t'<h5>' + e.location + '</h5>' +\n\t\t\t'<h5>' + e.date + '</h5>' +\n\t\t\t'</article>')\n\n\t\t$(\"#chaplain-docs\").append('<a href=\"' + e.link + '\" target=\"_blank\">' + e.title + '</a> <br>');\n\t})\n}", "function showResults(search) {\n\t//show loading icon in btn\n\tvar btn = $('#search');\n\t\tbtn.addClass('searching');\n\t$.ajax(\n\t{\n\t\turl: 'php_scripts/actions.php',\n\t\ttype: 'POST',\n\t\tdata: 'action=search&search='+search,\n\t\tdataType: 'JSON',\n\t\tsuccess: function(data) {\n\t\t\t// console.log(data.length);\n\t\t\t// console.log(typeof data[0] !== 'object');\n\t\t\t// var result = JSON.parse(data);\n\t\t\tappendResultToDom(data);\n\t\t\t//remove loading from search btn\n\t\t\tbtn.removeClass('searching');\n\t\t},\n\t\terror: function(response) {\n\t\t\t//log js errors\n\t\t\tshortTimeMesg('Alert! Search failed!', 'short-time-msg-failure');\n\t\t\t//remove loading from search btn\n\t\t\tbtn.removeClass('searching');\n\t\t}\n\t}\n\t);\n}", "function spainSearch(req, res) {\n let url = `https://api.spoonacular.com/recipes/complexSearch?number=12&cuisine=Spanish&apiKey=${apiKey}`;\n\n superagent.get(url)\n .then(searchResults => searchResults.body.results.map(result => new Result(result)))\n .then(results => {\n let cookie = req.cookies.userID ? req.cookies.userID : '';\n res.render('searchPages/spain_food', {searchResults: results, 'cookie': cookie});\n })\n .catch(error => handleError(error, res));\n}", "function displayResults(data) {\n console.log('Results that will be displayed in HTML looks like this first:', data);\n $('#results').append(resultsHTML(data));\n }", "function getSearchResults(request) {\n return \"Search Results.\";\n}", "function displayMatches() {\n hide(infoElement);\n hide(matchesList);\n matchesList.textContent = '';\n hide(queryInfoElement);\n hide(textDiv);\n const filteredMatches = getFilteredMatches();\n if (filteredMatches.length > 0) {\n const query = queryInput.value;\n history.pushState({type: 'results', query}, null,\n `${window.location.origin}#${query}`);\n document.title = `Shakespeare: ${query}`;\n show(infoElement);\n show(matchesList);\n show(queryInfoElement);\n // const exactPhrase = new RegExp(`\\b${query}\\b`, 'i');\n // keep exact matches only\n // matches = matches.filter(function(match) {\n // return exactPhrase.test(match.doc.t);\n // });\n //\n for (const match of filteredMatches) {\n addMatch(match.doc);\n }\n } else {\n displayInfo('No matches :^\\\\');\n queryInfoElement.textContent = '';\n }\n}", "function displayResults(response){\n $('.searched').show();\n console.log(response.data[1].fullName);\n response.data.forEach(function(found){\n \n $('.searched').append(`\n <div class=\"result\">\n <h2>${found.fullName}</h2>\n <p>${found.description}</p>\n <a href=\"${found.url}\" target=\"_blank\">Checkout the park!</a>\n </div>\n `);\n\n });\n \n}", "function results(data) {\n $(\"#movie_results\").html(data.results.length+\" Results for search '\"+$(\"#movieQuery\").val()+\"'\");\n data.results.forEach(function(item){$(\"#movie_results\").append(\"<hr><ul>\").append(\"<li>Title: \"+item.title+\"</li>\").append(\"<li><img src=\"+img_base_url+item.poster_path+\"></img></li>\").append(\"<li>Popularity: \"+item.popularity+\"</li>\").append(\"</ul><hr>\")});\n}", "function search() {\n\tvar query = $(\".searchfield\").val();\n\tif (query == \"\") {\n\t\tdisplaySearchResults(\"\", data, data);\n\t}\n\telse {\n\t\tvar results = idx.search(query);\n\t\tdisplaySearchResults(query, results, data);\n\t\tga('send', 'event', 'Search', 'submit', query);\n\t}\n}", "function displaySearchResults(results) {\n // Hide the spinner.\n spinner.style.display = \"none\";\n\n if (results.length) {\n // Group the results by category.\n var categoryMap = {};\n for (var i = 0; i < results.length; i++) {\n var result = results[i];\n var categoryName = getCategoryName(result.url);\n var category = categoryMap[categoryName] = categoryMap[categoryName] || [];\n prepareResult(result, categoryName);\n category.push(result);\n }\n\n // Build up the HTML to display.\n var appendString = \"\";\n for (var i = 0; i < categories.length; i++) {\n var categoryName = categories[i].name;\n var category = categoryMap[categoryName];\n if (category && category.length > 0) {\n appendString += buildCategoryString(categoryName, category);\n }\n }\n searchResultsContainer.innerHTML = appendString;\n } else {\n searchResultsContainer.innerHTML = \"<p>No results found.</p>\";\n }\n }", "function displayResults() {\n $.ajax({\n type: 'POST',\n url: 'responder_search.php',\n dataType: 'json',\n success: function (data) {\n _results = data;\n _redrawTable();\n },\n error: function (XMLHttpRequest, textStatus, errorThrown) {\n alert('Error. Check the console for more details.');\n console.log(XMLHttpRequest);\n console.log(textStatus);\n console.log(errorThrown);\n }\n });\n }", "function search() {\n __globspace._gly_searchadvanced.removeAll();\n _gly_ubigeo.removeAll();\n let sql = '1=1', \n idtable='#tbl_searchadvanced', \n isexportable=true, \n nquery=__query.length;\n\n // formación del sql \n for (let i = 0; i < nquery; i++){\n let item = __query[i],\n filter = item.filter.toUpperCase(),\n typedata=item.typedata,\n auxsql='';\n\n switch (typedata) {\n case 'double': case 'small-integer': case 'integer': case 'single':\n auxsql = ` ${item.fieldname} ${item.condition} \"${filter}\"`;\n break;\n case 'date':\n console.log(filter);\n let fi = moment(filter).add(5, 'hours').format('YYYY-MM-DD HH:mm:ss'); //consulta al servicio en hora utc (+5);\n let ff = moment(filter).add(29, 'hours').subtract(1, 'seconds').format('YYYY-MM-DD HH:mm:ss');\n \n if(item.condition == '=' || item.condition == 'contiene'){\n auxsql = `(${ item.fieldname } BETWEEN timestamp '${ fi }' AND timestamp '${ ff }')`;\n }else{\n if(item.condition == '<='){\n auxsql = ` ${item.fieldname} ${item.condition} timestamp '${ff}'`; \n }else if(item.condition == '>='){\n fi = moment(filter).add(5, 'hours').subtract(1, 'seconds').format('YYYY-MM-DD HH:mm:ss');\n auxsql = ` ${item.fieldname} ${item.condition} timestamp '${fi}'`;\n }else if(item.condition == '>'){\n auxsql = ` ${item.fieldname} ${item.condition} timestamp '${ff}'`;\n }else if(item.condition == '<'){\n auxsql = ` ${item.fieldname} ${item.condition} timestamp '${fi}'`;\n }\n }\n break;\n default:\n auxsql = `Upper(${item.fieldname}) ${item.condition} '${filter}'`;\n break;\n }\n\n if (item.option == '--') {\n if(typedata == 'date'){\n sql = auxsql;\n }else{\n item.condition == 'contiene' ? sql += ` and Upper(${item.fieldname}) like '%${filter}%'` : sql = auxsql;\n }\n } else {\n if(typedata == 'date'){\n sql += ` ${item.option} ${auxsql}`;\n }else{\n item .condition == 'contiene' ? sql += ` ${item.option} Upper(${item.fieldname}) like '%${filter}%'` : sql += ` ${item.option} ${auxsql}`;\n }\n }\n }\n \n __globspace.currentview.graphics.remove(_gra_ubigeo);\n\n // si se a selecionado un item de ubigeo primero obtengo la geometria del ubigeo y luego la consulta propia\n if(__url_ubigeo!=''){\n let _queryt = new QueryTask({url:__url_ubigeo}),\n _qparams = new Query(); \n _qparams.returnGeometry = true;\n _qparams.where = __sql_ubigeo;\n\n _queryt.execute(_qparams).then(function(response){\n \n __ubigeogeometry=response.features[0].geometry;\n\n let _queryt2 = new QueryTask({url:__url_query}),\n _qparams2 = new Query(); \n\n _qparams2.where = sql;\n _qparams2.outFields = [\"*\"];\n _qparams2.geometry = __ubigeogeometry;\n _qparams2.spatialRelationship = \"intersects\";\n _qparams2.returnGeometry = true;\n\n _queryt2.execute(_qparams2).then(function(response){\n let nreg = response.features.length;\n let fields = response.fields;\n if(nreg==0){\n alertMessage(\"La consulta no tiene registros a mostrar\", \"warning\",'', true)\n Helper.hidePreloader();\n }else{\n if(nreg>=1000){\n alertMessage('El resultado supera el límite, por ello solo se muestra los primeros 1000 registros. \\n Para mejorar su consulta, ingrese más filtros.','warning', 'bottom-right');\n }\n Helper.loadTable(response, fields, __titlelayer, idtable, isexportable);\n // Helper.renderToZoom(response, __globspace._gly_searchadvanced);\n Helper.renderGraphic(response, __globspace._gly_searchadvanced);\n\n\n if(Object.keys(_gra_ubigeo).length ==0){\n _gra_ubigeo = new Graphic({\n geometry: __ubigeogeometry, \n symbol:_symbol,\n });\n }\n _gra_ubigeo.geometry=__ubigeogeometry;\n __globspace.currentview.graphics.add(_gra_ubigeo);\n __globspace.currentview.when(function () {\n __globspace.currentview.goTo({\n target: __ubigeogeometry\n });\n });\n }\n }).catch(function (error) {\n Helper.hidePreloader();\n console.log(\"query task error\", error);\n })\n }).catch(function (error) {\n Helper.hidePreloader();\n console.log(\"query task error\", error);\n })\n }else{\n let _queryt = new QueryTask({url:__url_query}),\n _qparams = new Query();\n\n _qparams.where = sql;\n _qparams.outFields = [\"*\"];\n _qparams.returnGeometry = true;\n\n _queryt.execute(_qparams).then(function(response){\n let nreg = response.features.length;\n let fields = response.fields;\n if(nreg==0){\n alertMessage(\"La consulta no tiene registros a mostrar\", \"warning\", '', true);\n Helper.hidePreloader();\n }else{\n if(nreg>=1000){\n alertMessage('El resultado supera el límite, por ello solo se muestra los primeros 1000 registros. \\n Para mejorar su consulta, ingrese más filtros.','warning', 'bottom-right');\n }\n Helper.loadTable(response, fields, __titlelayer, idtable, isexportable);\n Helper.renderToZoom(response, __globspace._gly_searchadvanced);\n }\n }).catch(function (error) {\n Helper.hidePreloader();\n console.log(\"query task error\");\n console.log(error);\n })\n }\n }", "getResult(){\r\n // Call database\r\n this.getMovie();\r\n this.getSeries();\r\n this.getGenreMovie();\r\n this.getGenreSerie();\r\n \r\n // Clear Searchbar\r\n this.searchInput= ''; \r\n }", "function apiRequestSearch(name, res) {\r\n axios({\r\n url: \"https://api.igdb.com/v4/games\",\r\n method: \"POST\",\r\n headers: {\r\n \"Accept\": \"application/json\",\r\n \"Client-ID\": \"5py1g59uv8cdxn70ejawwm0vz6k7fk\",\r\n \"Authorization\": \"Bearer ycxnh3depzhn9wfz9he4dkggahig81\",\r\n },\r\n data: 'fields name,cover.image_id,cover; limit 5; search \"' + name + '\"; where name != null & cover != null;'\r\n })\r\n .then(response => {\r\n console.log(response.data);\r\n\r\n res.render(\"autosearch\", {\r\n results: response.data\r\n });\r\n })\r\n .catch(err => {\r\n console.error(err);\r\n });\r\n}", "function searchShows(req, res) {\n let query = req.query.search;\n const url = 'https://api.themoviedb.org/3/search/tv';\n const queryParams = {\n api_key: process.env.TMDB_URL,\n query: query\n }\n superagent.get(url, queryParams)\n .then(results => {\n if (results.body.results.length !== 0) {\n let responseArray = results.body.results;\n res.status(200).render('pages/results.ejs', { shows: responseArray, query: query });\n } else {\n res.status(200).render('pages/no-results.ejs', { query: query });\n }\n }).catch(err => console.log(err));\n}", "function executeSearch() {\n\tlet user_input = $('#class-lookup').val().toUpperCase();\n\t\t\n\t// clears search results\n\t$('#search-return').empty();\n\n\t// display search hint when input box is empty\n\tif (user_input == \"\"){\n\t\t$('#search-return').append(emptySearchFieldInfo());\n\t}\n\t\n\tfor (course in catalog) {\n\t\t\n\t\t// user input describes a course code\n\t\tif (user_input == course) {\n\t\t\t$('#search-return').append(createCourseContainer(course));\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// user input describes a department code\n\t\tif (user_input == catalog[course]['department']) {\n\t\t\t$('#search-return').append(createCourseContainer(course));\n\t\t}\n\t\t\n\t}\n\t\n\t// display a message if no results is returned\n\tif ($('#search-return').children().length == 0) {\n\t\t$('#search-return').append(`<li style='border: 3px solid black;'>\n\t\t\t\t\t\t\t\t\t\t<h3>Sorry, we couldn't find what you were looking for.</h3>\n\t\t\t\t\t\t\t\t\t</li>`)\n\t}\n}", "function domqlsearch() {\n var outp = document.querySelector('#domql-output');\n outp.innerText = \"\";\n\n var query = document.getElementById(\"domql-search\").value;\n try {\n var result = domql.$(query);\n var sep = \"\\n-------------------------------------------------------------------------\\n\";\n var out = \"Found \" + result.length + \" result(s).\" + sep;\n result.forEach(function(node) {\n out += node.outerHTML + sep;\n });\n\n } catch (error) {\n out = error.message;\n }\n\n var content = html_beautify(out, {indent_size: 2});\n outp.innerText = content;\n hljs.highlightBlock(outp);\n\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 singleSearchBar(){\n const searchText = document.getElementById(\"anySearch\").value.toLowerCase();\n console.log(searchText);\n const result = [];\n const nameResult = findByName(searchText, searchText);\n console.log('nameResult:');\n console.log(nameResult);\n result.concat(nameResult);\n renderedTable(result);\n}", "function showResult(response) {\n const resList = response.data;\n console.log(response.data);\n drawResultList(\n $(\"#results-container\"),\n resList,\n \"Sorry, no matched results...\"\n );\n}", "function search() {\n restartSearch();\n if (searchField.val()) {\n dt.search(searchField.val()).draw();\n }\n if (searchSelect.val()) {\n dt.columns(2).search(searchSelect.val()).draw();\n }\n}", "function greekSearch(req, res) {\n let url = `https://api.spoonacular.com/recipes/complexSearch?number=12&cuisine=Greek&apiKey=${apiKey}`;\n\n superagent.get(url)\n .then(searchResults => searchResults.body.results.map(result => new Result(result)))\n .then(results => {\n let cookie = req.cookies.userID ? req.cookies.userID : '';\n res.render('searchPages/greek_food', {searchResults: results, 'cookie': cookie});\n })\n .catch(error => handleError(error, res));\n}", "function italienSearch(req, res) {\n let url = `https://api.spoonacular.com/recipes/complexSearch?number=12&cuisine=Italian&apiKey=${apiKey}`;\n\n superagent.get(url)\n .then(searchResults => searchResults.body.results.map(result => new Result(result)))\n .then(results => {\n let cookie = req.cookies.userID ? req.cookies.userID : '';\n res.render('searchPages/italien_food', {searchResults: results, 'cookie': cookie});\n })\n .catch(error => handleError(error, res));\n}", "function query() {\n //reset text area\n $('#searchResults').text(\"\");\n\n contacts = getContacts(); //get existing list of contacts\n var searchCat = $('#selectSearch').val(); //search category (ie. Name)\n var query = $('#selectQuery').val().toLowerCase(); //user query\n var temp = 0; //counter to indicate if matches found\n if (query && query != '' && query != undefined) {\n for (var i = 0; i < contacts.length; i++) {\n var contact = contacts[i][searchCat]; //go through each contact\n if (contact.toLowerCase().indexOf(query) >= 0) {\n $('<ul>', { text: formatItem(contacts[i]) }).appendTo($('#searchResults'));\n temp++;\n }\n //end of loop\n }\n if (temp == 0) { $('#searchResults').text(\"No matches found\"); }\n } else {\n $('#searchResults').text('ERROR: query not valid.');\n }\n}", "function search() {\t\t\t\t\n\t\t\tconsole.log(\"search()\");\n\t\t\tconsole.log(vm.apiDomain);\n\t\n\t\t\tpageScope.loadingStart();\n\t\t\tconsole.log(\"after pageScope.loadingStart()\");\n\t\t\t// call API to search; pass query params (vm.selected)\n\t\t\tLDBSearchAPI.search(vm.apiDomain, function(data) {\n\t\t\t \tconsole.log(\"setting vm.results - data\");\n\t\t\t\tvm.results = data;\n\t\t\t\tvm.selectedIndex = 0;\n\n\t\t\t\tconsole.log(\"calling loadLDB\");\n\t\t\t\tloadLDB();\n\t\t\t\tconsole.log(\"done calling loadLDB\");\n\n\t\t\t\tpageScope.loadingEnd();\n\t\t\t\tsetFocus();\n\n\t\t\t}, function(err) { // server exception\n\t\t\t\tpageScope.handleError(vm, \"Error while searching\");\n\t\t\t\tpageScope.loadingEnd();\n\t\t\t\tsetFocus();\n\t\t\t});\n\t\t}", "renderResults(searchResults){\n if(searchResults){\n if(searchResults.results){\n return this.renderMovieLists(searchResults.results);\n }\n if(searchResults.err){\n return (<div>{searchResults.err}</div>);\n }\n }\n }", "function movie_find_show_all(url_query, respond){\r\n respond.write(\"<script>document.getElementById('heading').innerHTML ='Movie search All';</script>\");\r\n \r\n var search_input ='<style>input[type=search] {width: 130px;box-sizing: border-box;border: 2px solid #ccc;border-radius: 4px;font-size: 16px;background-color: white; margin:2% auto 2% 40%;background-image:url(\"searchicon.png\");background-position: 10px 10px;background-repeat: no-repeat;padding: 12px 20px 12px 40px;-webkit-transition: width 0.4s ease-in-out;transition: width 0.4s ease-in-out;}input[type=search]:focus {width: 95%;margin:2% auto 2% auto;}/* #searh_input{margin:2% auto 2% 40%;width: 50%;} */</style><input type=\"search\" name=\"search\" placeholder=\"Search..\" id=\"search_input\" onsearch =\"call_db_search()\"><button onclick=\"call_db_search()\" style =\"width:4%; height:7.5%;font-size:2.3em;border-radius:0px;background-color:transparent;\" class=\"btn btn-info\"><i class=\"fas fa-search\"></i></button><br><div id style=\"width:100%;height:7%;background-color:white;color:black;font-size:1em;\"><a href=\"movie_find_show_all\" onclick =\"\">Show all stored movies</a><br><a href=\"delete_all\" onclick =\"\">Delete all stored movies</a></div><hr><script> function call_db_search(){ var search_query = document.getElementById(\"search_input\"); if(search_query.value == \"\"){ document.getElementById(\"heading\").innerHTML =\"Please feel data to be searched for\"; } else{ window.open(\"movie_find_search?\"+search_query.value, \"_self\"); } } </script>';\r\n\r\n\r\n respond.write(search_input);\r\n \r\n \r\n //get data from db\r\n my_sql_conn.connect(function(err){//doing mysql connection handshake aka test connectability\r\n if(err){\r\n // respond.write(\"<p style='width:100%;height:10%;overflow:auto;background-color:white;color:black'>connection error: \"+err+\"</p>\");\r\n //return respond.end();//ending here\r\n }\r\n else{\r\n // respond.write(\"<p>connected to db</p>\");\r\n //respond.end();//ending here\r\n }\r\n \r\n //get data from db\r\n var mysql_db_data_get = \"SELECT * FROM movie_table\"\r\n \r\n \r\n //connect to existing db\r\n \r\n my_sql_conn_db.query(mysql_db_data_get, function(err, results){\r\n \r\n if(err){\r\n // respond.write(\"<p style='width:100%;height:10%;overflow:auto;background-color:white;color:black'>Data adding err (serach) \"+err+\"</p>\");\r\n return ;//respond.end();//ending here\r\n }\r\n else{\r\n // respond.write(\"<p>Data added \"+JSON.stringify(results[0].m_producer)+\"</p>\");\r\n var result = results;\r\n if(results.length ==0){return respond.write(\"<p style='width:100%;height:10%;overflow:auto;background-color:white;color:black'>Could'nt find movie in db, please add some</p>\");}//if record match not found\r\n var extra_results = 1;//skip result duplicate\r\n var count = 0;\r\n for(var i =0; i<=result.length; i++){\r\n db_data_shower();//break if setup is not like this\r\n extra_results =i;//capture duplicate\r\n count = i;\r\n \r\n }\r\n \r\n\r\n \r\n //respond.end();//ending here\r\n }\r\n function db_data_shower(){\r\n if(extra_results==0){return} \r\n respond.write(\"<p style='width:100%;height:10%;overflow:auto;background-color:white;color:black'>Movie Title : \"+result[count].m_title+\" | Movie Director : \"+result[count].m_director+\" | Movie Producer : \"+result[count].m_producer+\" | Movie Producing Company : \"+result[count].m_production_company+\" | Movie filmed Country : \"+result[count].m_country+\" | Movie Starring : \"+result[count].m_actor+\" | Movie Genre : \"+result[count].m_genre+\" | Movie Synopsis : \"+result[count].m_description+\" | Movie Disclaimer : \"+result[count].m_disclaimer+\" | Movie Poster : \"+result[count].m_image+\"<br>\"+ \r\n '<input type=\"button\" style=\"width:40%;height:2em;margin:1% 1% 1% 1%\" onclick=\"window.open(\\'movie_update?'+result[count].movie_id+'\\',\\'_self\\')\" value=\"Update Movie\" class=\"btn btn-primary\"><input type=\"button\" style=\"width:40%;height:2em;margin:1% 1% 1% 1%\" onclick=\"window.open(\\'movie_delete?'+result[count].movie_id+'\\',\\'_self\\')\" value=\"Delete Movie\" class=\"btn btn-primary\"></p>');\r\n }\r\n }\r\n \r\n ); \r\n \r\n });\r\n \r\n}", "function displaySearchResults(results, store) {\n var searchResults = document.getElementById('search-results');\n\n if (results.length) { // Are there any results?\n var appendString = '';\n\n for (var i = 0; i < results.length; i++) { // Iterate over the results\n var item = store[results[i].ref];\n //Recreate card layout for each result item\n appendString += '<div class=\"col-md-4 col-sm-6 learning-item\">';\n appendString += '<picture class=\"intrinsic intrinsic-item\">';\n appendString += '<img class=\"img-responsive intrinsic-img\" src=\"' + item.siteURL + '/assets/images/resources/' + item.image + '\" alt=\"' + item.title + '\">';\n appendString += '</picture>';\n appendString += '<h2><a href=\"' + item.resourceUrl + '\" target=\"_blank\">' + item.title + '</a></h2>';\n appendString += '<p class=\"attribution\">';\n if ( item.resourceAuthor ) {\n appendString += item.resourceAuthor + ', ';\n }\n appendString += item.resourceOrg + '</p>';\n appendString += item.contentHTML;\n appendString += '<div class=\"labels pull-right\">';\n if (item.resourceType === \"Ebook\") {\n appendString += '<i class=\"glyphicon glyphicon-book\"></i> ';\n }\n if (item.resourceType === \"Course\") {\n appendString += '<i class=\"glyphicon glyphicon-blackboard\"></i> ';\n }\n if (item.resourceType === \"Email Course\") {\n appendString += '<i class=\"glyphicon glyphicon-send\"></i> ';\n }\n if (item.resourceType === \"Website\") {\n appendString += '<i class=\"glyphicon glyphicon-link\"></i> ';\n }\n if (item.resourceType === \"Podcast\") {\n appendString += '<i class=\"glyphicon glyphicon-headphones\"></i> ';\n }\n appendString += item.resourceType + ' | ';\n if (item.access === \"Requires Email\") {\n appendString += '<i class=\"glyphicon glyphicon-envelope\"></i> ';\n }\n if (item.access === \"Requires Registration\") {\n appendString += '<i class=\"glyphicon glyphicon-user\"></i> ';\n }\n if (item.access === \"Free\") {\n appendString += '<i class=\"glyphicon glyphicon-download-alt\"></i> ';\n }\n appendString += item.access + ' </div>';\n appendString += '<div class=\"post-sharing pull-right\">';\n var learningItemURL = \"https://hackid.github.io%23\" + item.learningItemID;\n appendString += '<a href=\"https://twitter.com/share?url=' + learningItemURL + '&via=anthkris&hashtags=hackidlearning&text=' + item.title + ' free ' + item.resourceType + '\" target=\"_blank\">';\n appendString += '<img src=\"' + item.siteURL +'/assets/images/twitter-logo.svg\" class=\"social-logo\"/></a>';\n appendString += '<a href=\"https://plus.google.com/share?url=' + learningItemURL + '&title=' + item.title + ' free ' + item.resourceType + '\" target=\"_blank\">';\n appendString += '<img src=\"' + item.siteURL + '/assets/images/google-plus.svg\" class=\"social-logo\"/></a></div>';\n appendString += '<a href=\"' + item.resourceUrl + '\" target=\"_blank\" class=\"button view-button\">View</a>';\n appendString += '</div>';\n }\n\n searchResults.innerHTML = appendString;\n } else {\n searchResults.innerHTML = '<div class=\"col-xs-12\"><p class=\"no-results\">No results found.<br /><a href=\"https://docs.google.com/forms/d/e/1FAIpQLSe-Vw60TcOyTjd_FgTLD7eZ_fPwYTXsUWWNZEN1NrLTPK-qKA/viewform\" target=\"_blank\">Try submitting a resource on this topic!</a></p></div>';\n }\n }", "function post_search(req, res) {\n console.log(req.body);\n Model3d.find_by_string(req.body.search_bar, function(err, docs) {\n if (err) {\n res.send(\"something went wrong\");\n }\n else {\n res.render('navigation/search', {models: docs, selected: \"Search Results\" });\n }\n });\n}", "function dessertSearch(req, res) {\n let url = `https://api.spoonacular.com/recipes/complexSearch?number=12&type=dessert&apiKey=${apiKey}`;\n\n superagent.get(url)\n .then(searchResults => searchResults.body.results.map(result => new Result(result)))\n .then(results => {\n let cookie = req.cookies.userID ? req.cookies.userID : '';\n res.render('searchPages/dessert', {searchResults: results, 'cookie': cookie});\n })\n .catch(error => handleError(error, res));\n}", "function onExecuteSearch(searchInput, resultsContainer)\n{\n var query = searchInput.value;\n\n if(query)\n {\n getResults(query, function(results) {\n\n var resultsList = getResultsList(results);\n\n // Clear existing results container (if applicable)\n var currResultsList = document.getElementById('results');\n if(currResultsList)\n {\n resultsContainer.removeChild(currResultsList);\n }\n\n // Display current results\n resultsContainer.appendChild(resultsList);\n\n });\n }\n}", "function displayMatches() {\n hide(textDiv);\n show(matchesList);\n matchesList.textContent = '';\n const filteredMatches = getFilteredMatches();\n if (filteredMatches.length > 0) {\n //\n // const exactPhrase = new RegExp(`\\b${query}\\b`, 'i');\n // keep exact matches only\n // matches = matches.filter(function(match) {\n // return exactPhrase.test(match.doc.t);\n // });\n // // prefer exact matches — already done if SEARCH_OPTIONS expand is false\n // matches = matches.sort((a, b) => {\n // return exactPhrase.test(a.doc.t) ? -1 :\n // exactPhrase.test(b.doc.t) ? 1 : 0;\n // });\n //\n for (const match of filteredMatches) {\n addMatch(match.doc);\n }\n } else {\n displayInfo('No matches :^\\\\');\n queryInfoElement.textContent = '';\n }\n}", "function displayNewSearchResults(event) {\n let searchTerm = event.target.value;\n let currentSearch = giphy[\"query\"][\"q\"];\n if (searchTerm !== currentSearch && searchTerm !== \"\") {\n giphy[\"query\"][\"q\"] = searchTerm;\n updateOffset(true);\n update();\n }\n}", "function search() {\n\t\n}", "function showYouSearchedFor(model) {\n\t\t\tif ((model == null) || (model.queries.length == 0)) {\n\t\t\t\tvm.youSearchedFor = $sce.trustAsHtml('');\t// no parameters, so no YSF message\n\t\t\t}\n\t\t\t\n\t\t\tvar ysf = \"<b>You searched for...</b>\";\t\t\t// the You Searched For string we're computing\n\t\t\tvar op = '<b>' + model.operator + '</b> ';\t\t// AND or OR, used to join query clauses\n\n\t\t\tfor (var i in model.queries) {\n\t\t\t\tvar query = model.queries[i];\n\t\t\t\tvar field = query['field'];\n\t\t\t\tvar isHuman = (query['condition']['parameters'].indexOf('human') >= 0);\n\t\t\t\tvar input = superscript(query['condition']['input']);\n\t\t\t\t\n\t\t\t\tysf += '<br/>';\t\t\t\t\t\t\t\t// line break between query clauses\n\t\t\t\tif (i != 0) {\t\t\t\t\t\t\t\t// second and later lines begin with operator\n\t\t\t\t\tysf += op;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// custom message for each field type\n\t\t\t\tif (field == 'miS') {\n\t\t\t\t\tysf += 'Gene Symbols or IDs matching <b>' + input + '</b>';\n\n\t\t\t\t} else if (field == 'mnS') {\n\t\t\t\t\tysf += 'Genes matching <b>\"' + input + '\"</b>';\n\n\t\t\t\t} else if (field == 'tsDid') {\n\t\t\t\t\tysf += 'Disease or Phenotype IDs matching <b>' + input + '</b>';\n\n\t\t\t\t} else if (field == 'tsDtext') {\n\t\t\t\t\tysf += 'Diseases or Phenotypes matching <b>\"' + input + '\"</b>';\n\n\t\t\t\t} else if (field == 'location') {\n\t\t\t\t\tif (isHuman) {\n\t\t\t\t\t\tysf += 'Human ';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tysf += 'Mouse ';\n\t\t\t\t\t}\n\t\t\t\t\tysf += 'loci overlapping interval: <b>' + input + '</b>';\n\n\t\t\t\t} else if (field == 'gene_upload') {\n\t\t\t\t\tvar parameters = query['condition']['parameters'];\n\t\t\t\t\tvar column = parameters[0];\n\t\t\t\t\tvar delimiter = parameters[1];\n\t\t\t\t\tvar skipHeader = parameters[2];\n\t\t\t\t\tvar file = query['condition']['file'];\n\t\t\t\t\tvar filename = file['name'];\n\n\t\t\t\t\tysf += 'Gene Symbols or IDs matching file <b>' + filename + '</b> column ' + column + ' ' + delimiter + ' delimited ';\n\t\t\t\t\tif (skipHeader) {\n\t\t\t\t\t\tysf += ' (ignore header row)';\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\t\t\t\t\t// should not happen, but left for debugging purposes\n\t\t\t\t\tysf += field + ' <b>' + input + '</b>';\n\t\t\t\t}\n\t\t\t}\n\t\t\tvm.youSearchedFor = $sce.trustAsHtml(ysf);\n\t\t}", "function searchTerms(d){\n\t\n\tpayload = implode_form(d);\n\n\td.getElementById('demo_results').style.display = \"block\";\n\trdiv = d.getElementById('results_status'); // locate the output div \n\trdiv.innerHTML = ''; // clear out the block, prepare for data!\n\n\tlaunchEngines(rdiv,apibase+'/terms.',payload);\n\t//console.log('APIBASE: ' + apibase);\n\n}", "function printResult(res)\n{\n outputElm.innerHTML = \"\";\n \n for (var i = 0; i < res.length; i++) \n outputElm.appendChild(tableCreate(res[i].columns, res[i].values));\n \n if (outputElm.textContent == \"\") \n outputElm.textContent = \"No resources match your search\";\n}", "function renderSearch(data) {\r\n const body = buildSearchBody(data);\r\n \r\n const searchTable = `\r\n <table cellpadding=\"3\" cellspacing=\"0\" border=\"0\" style=\"width: 50%; margin: 0 auto 2em auto;\">\r\n <thead> \r\n <tr>\r\n <th>Target</th>\r\n <th>Search text</th>\r\n <th>Treat as regex</th>\r\n </tr>\r\n </thead>\r\n <tbody>${body}<tbody>\r\n </table>\r\n `;\r\n\r\n $('#search-wrapper').append(searchTable);\r\n}", "async function search() {\n const data = await getData();\n const match = document.getElementById('searchField').value;\n const result = data.map(oneRec => person(oneRec, match));\n render(result, tbody);\n document.getElementById('searchField').value = '';\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 searchCallback(success, content) {\n if (!success || content.query != $q.val()) {\n // do not consider the result if there is an error\n // or if it is outdated -> query != $q.val()\n return;\n }\n\n // stats: render the number of results + processing time\n $stats.html($statsTemplate.render({ query: content.query, nbHits: content.nbHits.numberWithDelimiter(), processingTimeMS: content.processingTimeMS, nbHits_plural: content.nbHits != 1 }));\n\n // hits: display the `hitsPerPage` results\n var html = '';\n for (var i = 0; i < content.hits.length; ++i) {\n var hit = content.hits[i];\n\n // stars\n hit.star_image = 'stars_' + parseInt(hit.stars);\n if (hit.stars > 0 && parseInt(hit.stars) != hit.stars) {\n hit.star_image += '_half';\n }\n // reviews\n hit.review_count_plural = hit.review_count != 1;\n\n // hit rendering\n html += $hitTemplate.render(hit);\n }\n $hits.html(html);\n\n // facets: display the conjunctive+disjunctive facets\n html = '';\n for (var j = 0; j < 2; ++j) {\n\n // the AlgoliaSearchHelper creates an extra 'disjunctiveFacets' attribute\n var facetType = (['facets', 'disjunctiveFacets'])[j];\n\n for (var facet in content[facetType]) {\n if (facet === 'review_count') {\n // add a slider fetching the 'max' value of 'review_count' from `content.facets_stats.review_count`\n html += $sliderTemplate.render({ facet: facet, title: FACETS.review_count.title, max: content.facets_stats.review_count.max, current: minReviewsCount });\n } else {\n // other facets\n\n // collect all values from `content[facetType][facet]` to sort them by FACETS[facet].sortFunction\n var values = [];\n for (var v in content[facetType][facet]) {\n var label;\n\n // for the boolean-based 'open' facet, use smarter naming for the label\n if (facet === 'open' && v === 'true') {\n label = 'Open';\n } else if (facet === 'open' && v === 'false') {\n label = 'Closed';\n } else {\n label = v;\n }\n\n values.push({ label: label, value: v, count: content[facetType][facet][v], refined: helper.isRefined(facet, v) });\n }\n // sort the values\n values.sort(function(a, b) {\n // sort by the refined states first (put them on top if they are refined)\n if (a.refined != b.refined) {\n if (a.refined) return -1;\n if (b.refined) return 1;\n }\n // then fallback on the standard sort function\n return FACETS[facet].sortFunction(a,b);\n });\n\n // render the facet\n html += $facetTemplate.render({\n facet: facet,\n title: FACETS[facet].title,\n values: values.slice(0, 10),\n has_other_values: values.length > 10,\n other_values: values.slice(10),\n disjunctive: facetType === 'disjunctiveFacets'\n });\n }\n }\n }\n $facets.html(html);\n\n // bind slider\n $('#review_count-slider').slider({\n formater: function(e) {\n if (e === 0) {\n return 'All';\n }\n return '> ' + e;\n }\n }).on('slideStop', function(ev) {\n minReviewsCount = ev.value;\n search();\n });\n\n // pimp checkboxes\n $('input[type=\"checkbox\"]').checkbox();\n\n // render pagination\n var pages = [];\n if (content.page > 5) {\n pages.push({ current: false, number: 1 });\n pages.push({ current: false, number: '...', disabled: true });\n }\n for (var p = content.page - 5; p < content.page + 5; ++p) {\n if (p < 0 || p >= content.nbPages) {\n continue;\n }\n pages.push({ current: content.page == p, number: (p + 1) });\n }\n if (content.page + 5 < content.nbPages) {\n pages.push({ current: false, number: '...', disabled: true });\n pages.push({ current: false, number: content.nbPages });\n }\n $pagination.html($paginationTemplate.render({ pages: pages, prev_page: (content.page > 0 ? content.page : false), next_page: (content.page + 1 < content.nbPages ? content.page + 2 : false) }));\n\n // update URL anchor\n var refinements = [];\n for (var refine in helper.refinements) {\n if (helper.refinements[refine]) {\n var i = refine.indexOf(':');\n var r = {};\n r[refine.slice(0, i)] = refine.slice(i + 1);\n refinements.push(r);\n }\n }\n for (var refine in helper.disjunctiveRefinements) {\n for (var value in helper.disjunctiveRefinements[refine]) {\n if (helper.disjunctiveRefinements[refine][value]) {\n var r = {};\n r[refine] = value;\n refinements.push(r);\n }\n }\n }\n location.replace('#q=' + encodeURIComponent(content.query) + '&page=' + content.page + '&minReviewsCount=' + minReviewsCount + '&refinements=' + JSON.stringify(refinements));\n\n // scroll on top\n window.scrollTo(0, 0);\n }", "function americanSearch(req, res) {\n let url = `https://api.spoonacular.com/recipes/complexSearch?number=12&cuisine=American&apiKey=${apiKey}`;\n\n superagent.get(url)\n .then(searchResults => searchResults.body.results.map(result => new Result(result)))\n .then(results => {\n let cookie = req.cookies.userID ? req.cookies.userID : '';\n res.render('searchPages/america_food', {searchResults: results, 'cookie': cookie});\n })\n .catch(error => handleError(error, res));\n}", "function viewContact() {\n let searchResultList = search()\n console.log(`The person are ${searchResultList}`)\n}", "function showResults() {\n\t\t\t\tconsole.clear();\n\t\t\t\tconsole.log(data);\n\t\t\t}", "function search_results(data, context){\n // cache the jQuery object\n var $search_results = $('#search_results');\n // empty the element\n $('#loading').hide();\n $search_results.hide();\n $search_results.empty();\n // add the results\n $search_results.append('<h2>Results</h2>');\n if (data.ids.length>0) {\n $search_results.append('<ul class=\"paging\"></ul>');\n pager = $('ul.paging');\n for(item in data.ids) {\n object_id = data.ids[item];\n display_item(object_id, pager);\n }\n } else {\n $search_results.append('<div>None found. Please try again...</div>');\n }\n page_size = 10;\n if (data.ids.length>200) {\n page_size = data.ids.length/20;\n }\n pager.quickPager({pageSize: page_size, pagerLocation: \"both\"});\n $search_results.fadeIn();\n }", "function search(query) {\n var aMatches = aLastResults =_search(query)\n .filter(function(o) {\n return o.sIdMatch !== null || o.sNameMatch !== null;\n });\n console.log(aLastResults.length + ' search results');\n _populateSearchTargetVariables(ui$, aMatches);\n return _toControl(aMatches);\n }", "function renderSearchResults(searchResults) {\n let searchResultsHTML = `<table><thead><tr><th>First Name</th><th>Last Name</th><th>Email</th><th>Birthday</th>\n <th>Hire Date</th><th>Dietary Preference</th>\n <th>Allergies</th><th>Hobbies</th></thead><tbody>`;\n searchResults.forEach(function(data) {\n // if (data.orientationComplete === \"1900-01-01\") {\n // data.orientationComplete = \"Incomplete\";\n // } else {\n // data.orientationComplete = moment(data.orientationComplete).format(\n // \"MMMM Do YYYY\"\n // );\n // }\n\n // if (data.compliance_trainingComplete === \"1900-01-01\") {\n // data.compliance_trainingComplete = \"Incomplete\";\n // } else {\n // data.compliance_trainingComplete = moment(\n // data.compliance_trainingComplete\n // ).format(\"MMMM Do YYYY\");\n // }\n\n const tableRow = `<tr>\n <th>${data.first_name}</th>\n <th>${data.last_name}</th>\n <th>${data.email}</th>\n <th>${moment(data.birthday).format(\"MMMM Do YYYY\")}</th>\n <th>${moment(data.hire_date).format(\"MMMM Do YYYY\")}</th>\n <th>${data.food_preference}</th>\n <th>${data.allergy}</th>\n <th>${data.hobby}</th></tr>`;\n\n searchResultsHTML += tableRow;\n });\n\n searchResultsHTML += `</tbody></table>`;\n $(\"#search-results\").empty();\n $(\"#search-results\").append(searchResultsHTML);\n }", "function showSearchResult() {\n pixabayApi\n .fetchImages()\n .then(dataArray => galleryCardTpl(dataArray))\n .then(markup => {\n markupRender(markup, galleryListRef);\n // The condition to prevent the page from scrolling on the very first batch of images\n if (pixabayApi.pageNumber > 2) {\n // Method window.scrollTo() did not work quite the way I expected, so I used another method mentioned in MDN\n window.scrollBy({\n // The page is scrolled by the height of the window minus the height of the search bar\n top: window.innerHeight - 110,\n behavior: 'smooth',\n });\n }\n if (pixabayApi.isLastPage) {\n loadMoreBtnApi.hide();\n } else {\n loadMoreBtnApi.show();\n loadMoreBtnApi.enable();\n }\n })\n .catch(er => {\n loadMoreBtnApi.hide();\n showError(er);\n });\n}", "function showResultsPage(data) {\n state = 1;\n locations = [];\n errorMessage = '';\n\n // if search was by term, stores it in recent searches\n if (searchTerm !== '') {\n rss.store({\n term: searchTerm,\n results: data.results \n });\n }\n\n // prepare next page data\n app.template7Data['page:results'] = ps.getLastQueryResults();\n app.template7Data['page:results'].loadMore = {\n label: 'Load more ...',\n canLoad: app.template7Data['page:results'].page < app.template7Data['page:results'].pages\n };\n\n app.hidePreloader();\n\n window.mainView.router.loadPage('pages/results/results.html');\n }", "function showResults(results) {\n\t\tvar ul = document.getElementById(\"matchResultsList\");\n\t\tclearResultsList(ul);\n\t\tvar frag = document.createDocumentFragment();\n\t\tfor (var i = 0; i < results.length; i++) {\n\t\t\tvar li = document.createElement(\"li\");\n\t\t\tli.innerHTML = results[i];\n\t\t\tfrag.appendChild(li);\n\t\t}\n\t\tul.appendChild(frag);\n\t}", "function display_results (results) {\n\n var result_count = Object.keys(results).length;\n var result_term = \"result\";\n if (!result_count) {\n no_results();\n result_count = 0;\n $(\"#search_count\").html(result_count + \" \" + result_term);\n $(\"#search_count\").show();\n $(\"#search_help_container\").removeClass();\n $('#step_info_container').hide();\n return;\n }\n else if (result_count > 0) {\n $(\"#search_msg\").hide();\n $(\"#search_msg\").html();\n $(\"#search_result_container\").show();\n\n if (result_count > 1) {\n result_term += \"s\";\n }\n\n $(\"#search_count\").html(result_count + \" \" + result_term);\n $(\"#search_count\").show();\n table_tbody.empty();\n $(\"#search_help_container\").removeClass();\n\n var step_info = $('#step_info_container');\n\n // Sort the results by LRG ID (using the numeric part of the LRG ID)\n var result_keys = Object.keys(results);\n result_keys.sort(function(a,b) {\n //var id_a = extract_id(a);\n //var id_b = extract_id(b);\n //return id_a - id_b;\n return a - b;\n });\n\n var link_separator = '<span>-</span>';\n\n var has_lrg_pending = 0;\n\n var lrg_list = [];\n\n var rows_list = [];\n\n // Loop over results\n for (var i=0; i < result_keys.length; i++) {\n var lrg_id = result_keys[i]; // Only numeric value, e.g. \"1\" for \"LRG_1\"\n var entry = results[lrg_id];\n var symbol = entry.symbol;\n var status = entry.status;\n var chr = entry.c[0];\n var start = entry.c[1];\n var end = entry.c[2];\n //var id = lrg_id;//extract_id(lrg_id);\n\n var ens_link = generate_external_link('Ensembl','ens',1);\n var ncbi_link = generate_external_link('NCBI','ncbi',1);\n var ucsc_link = generate_external_link('UCSC','ucsc',1);\n\n var curation_id = lrg_id.toLowerCase();\n\n // Step class\n var step_classes = step_col_class + ' ';\n step_classes += (status == 'public') ? public_step_col_class : pending_step_col_class;\n\n var curation_desc_cell = newCell().attr('id', curation_id+'_step');\n curation_desc_cell.addClass(step_classes);\n\n var curation_date_cell = newCell('-').attr('id', curation_id+\"_date\");\n curation_date_cell.addClass(step_col_class);\n\n if (status == 'public') {\n curation_desc_cell.attr('sorttable_key', lrg_steps_count);\n }\n else {\n lrg_list.push(lrg_id);\n\n if (has_lrg_pending == 0) {\n has_lrg_pending = 1;\n step_info.show(400);\n }\n }\n\n // HTML code\n var newrow = $('<tr/>');\n newrow.attr('id', lrg_row_id_prefix+lrg_id);\n newrow.attr('data-chr', chr);\n newrow.attr('data-start', start);\n newrow.attr('data-end', end);\n newrow.attr('data-symbol', symbol);\n newrow.attr('data-status', status);\n\n // LRG ID\n var lrg_id_cell = newCell(get_lrg_link(lrg_id));\n lrg_id_cell.attr('sorttable_key', lrg_id);\n\n newrow.append(lrg_id_cell);\n // Symbol\n newrow.append(newCell(generate_external_link(symbol,'hgnc_link')));\n // LRG Status\n newrow.append(newCell(\"<span>\"+status+\"</span>\").addClass(status+'_hl'));\n // Curation Status step\n newrow.append(curation_desc_cell);\n // Curation Status date\n newrow.append(curation_date_cell);\n\n // External links\n newrow.append(newCell(ens_link + link_separator + ncbi_link + link_separator + ucsc_link).addClass('gbrowser'));\n\n rows_list.push(newrow);\n //table_tbody.append(newrow);\n }\n table_tbody.append(rows_list);\n\n // Post process to show or not the \"Curation status\" column (not needed if only public LRG returned in the results)\n if (has_lrg_pending == 1) {\n\n // Make space to display the step diagram\n $(\"#search_help_container\").addClass(\"col-xs-6 col-sm-6 col-md-6 col-lg-6 padding-left-0 padding-right-0\");\n\n // Get the LRG steps\n get_lrg_step_data(lrg_list);\n\n // Show the LRG steps\n $('.'+step_col_class).show();\n }\n else {\n step_info.hide();\n step_info.html('');\n\n $('.'+step_col_class).hide();\n }\n }\n}", "function _drawResults() {\n let songs = store.State.songs;\n console.log(songs);\n let template = \"\";\n songs.forEach(song => (template += song.Template));\n document.getElementById(\"search-results\").innerHTML = template;\n}", "function displaySearchField() {\n clearElements();\n const searchField = document.getElementById(\"search-field\");\n const template = document.getElementById(\"search-template\");\n const inputField = template.content.cloneNode(true);\n const btn = inputField.getElementById(\"submit-search-btn\");\n btn.addEventListener(\"click\", () => fetchOneItem());\n searchField.append(inputField);\n}", "function putResultsOnPage(results)\n{\n //get search results div\n var theDiv = document.getElementById('search-results');\n \n //clear current content\n theDiv.innerHTML = '';\n \n //reset Y position because it might have changed after some touch scrolling frenzy!\n theDiv.style.top = '0';\n \n //might be no matches\n if(results.rows.length === 0)\n {\n theDiv.innerHTML = 'No matches found in the common words dictionary.\\\n Tweet @japxlate yourAdvancedWord for advanced word definitions.';\n buttonSpinnerVisible(false); //stop the loading spinner\n return;\n }\n \n //some results so loop through and print\n for(var loop = 0; loop < results.rows.length; loop++)\n {\n var item = results.rows.item(loop);\n \n var theRomaji = kana_to_romaji(item.kana);\n //var theRomaji = item.kana;\n var formattedDefinition = format_slashes(item.definition);\n \n var defText = item.kanji + ' / ' + item.kana + ' (' + theRomaji + ') / ' + formattedDefinition;\n defText = defText.replace(new RegExp(global_searchTerm, 'ig'), '<span style=\"color:#990000;\">$&</span>');\n \n var defLine = '<img src=\"img/j.png\" style=\"vertical-align:middle;\"> ' + defText + '<hr>';\n //var defLine = '<p class=\"def-line\"> ' + defText + '</p>'; //had CSS styling issues (mostly text overflow)\n \n theDiv.innerHTML += defLine;\n }\n \n buttonSpinnerVisible(false); //stop the loading spinner\n}", "function query(term) {\n $(\"#SearchBox\").val(term);\n search(term);\n $.pageslide.close();\n }", "function displayResults(response) {\n\t\tconsole.log(response);\n\t\tif (response.length === 0) {\n\t\t\t// Search validation\n\t\t\tinputValidator();\n\t\t} else {\n\t\t\tresultScnTitle.textContent = response[0].CommonName;\n\t\t\tvar keys = [\n\t\t\t\t'Order',\n\t\t\t\t'Suborder',\n\t\t\t\t'Infraorder',\n\t\t\t\t'Superfamily',\n\t\t\t\t'Family',\n\t\t\t\t'Subfamily',\n\t\t\t\t'Tribe',\n\t\t\t\t'Genus',\n\t\t\t\t'Subgenus',\n\t\t\t\t'Species',\n\t\t\t\t'Subspecies'\n\t\t\t];\n\t\t\tkeys.forEach(function(key) {\n\t\t\t\tvar text = response[0][key];\n\t\t\t\tif (text) {\n\t\t\t\t\tvar resItem = document.createElement('li');\n\t\t\t\t\tresItem.classList.add('result__item');\n\t\t\t\t\t\n\t\t\t\t\tvar resKey = document.createElement('span');\n\t\t\t\t\tresKey.classList.add('result__key')\n\t\t\t\t\tresKey.textContent = key + ': ';\n\t\t\t\t\tresItem.appendChild(resKey);\n\n\t\t\t\t\tvar resValue = document.createElement('span');\n\t\t\t\t\tresValue.classList.add('result__value')\n\t\t\t\t\tresValue.textContent = response[0][key];\n\t\t\t\t\tresItem.appendChild(resValue);\n\t\t\t\t\t\n\t\t\t\t\tresultScnList.appendChild(resItem);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}", "function searchResults(value) {\n\t\tconst outputArray = searchUsers(this.value, userArray);\n\t\tvalue = outputArray.map(output => mainDom(output)).join('');\n\t\trenderToMain(value);\n\t}", "function renderWiki() {\n function handleSubmit(event) {\n // prevent page from reloading when form is submitted\n event.preventDefault();\n // get the value of the input field\n const input = document.querySelector(\".wikipediaQuery\").value;\n // remove whitespace from the input\n const searchQuery = input.trim();\n // call `fetchResults` and pass it the `searchQuery`\n fetchResults(searchQuery);\n }\n\n function fetchResults(searchQuery) {\n const endpoint = `https://en.wikipedia.org/w/api.php?action=query&list=search&prop=info&inprop=url&utf8=&format=json&origin=*&srlimit=20&srsearch=${searchQuery}`;\n fetch(endpoint)\n .then(response => response.json())\n .then(data => {\n const results = data.query.search;\n displayResults(results);\n console.log(results);\n });\n }\n\n\n\n function displayResults(results) {\n // Store a reference to `.searchResults`\n const searchResults = document.querySelector(\".searchResults\");\n // Remove all child elements\n searchResults.innerHTML = \"\";\n // Loop over results array\n results.forEach(result => {\n const url = encodeURI(`https://en.wikipedia.org/wiki/${result.title}`);\n\n searchResults.insertAdjacentHTML(\"beforeend\",\n `<div class=\"resultItem\">\n <h3 class=\"resultItem-title\">\n <a href=\"${url}\" target=\"_blank\" rel=\"noreferrer\">${result.title}</a>\n </h3>\n <span class=\"resultItem-snippet\">${result.snippet}</span><br>\n <a href=\"${url}\" class=\"resultItem-link\" target=\"_blank\" rel=\"noreferrer\">${url}</a>\n </div>`\n );\n });\n }\n\n const form = document.querySelector(\".searchForm\");\n form.addEventListener(\"submit\", handleSubmit);\n\n }", "function renderWiki() {\n function handleSubmit(event) {\n // prevent page from reloading when form is submitted\n event.preventDefault();\n // get the value of the input field\n const input = document.querySelector(\".wikipediaQuery\").value;\n // remove whitespace from the input\n const searchQuery = input.trim();\n // call `fetchResults` and pass it the `searchQuery`\n fetchResults(searchQuery);\n }\n\n function fetchResults(searchQuery) {\n const endpoint = `https://en.wikipedia.org/w/api.php?action=query&list=search&prop=info&inprop=url&utf8=&format=json&origin=*&srlimit=20&srsearch=${searchQuery}`;\n fetch(endpoint)\n .then(response => response.json())\n .then(data => {\n const results = data.query.search;\n displayResults(results);\n console.log(results);\n });\n }\n\n\n\n function displayResults(results) {\n // Store a reference to `.searchResults`\n const searchResults = document.querySelector(\".searchResults\");\n // Remove all child elements\n searchResults.innerHTML = \"\";\n // Loop over results array\n results.forEach(result => {\n const url = encodeURI(`https://en.wikipedia.org/wiki/${result.title}`);\n\n searchResults.insertAdjacentHTML(\"beforeend\",\n `<div class=\"resultItem\">\n <h3 class=\"resultItem-title\">\n <a href=\"${url}\" target=\"_blank\" rel=\"noreferrer\">${result.title}</a>\n </h3>\n <span class=\"resultItem-snippet\">${result.snippet}</span><br>\n <a href=\"${url}\" class=\"resultItem-link\" target=\"_blank\" rel=\"noreferrer\">${url}</a>\n </div>`\n );\n });\n }\n\n const form = document.querySelector(\".searchForm\");\n form.addEventListener(\"submit\", handleSubmit);\n\n }", "function wikiQuery(data) {\n var articleHTML = '<ul class=article-list pure-u-1\">';\n\n $.each(data.query.pages, function(i, article) {\n articleHTML += '<li class=\"clearfix pure-u-1\">';\n articleHTML += '<a target=\"_blank\" href=\"';\n articleHTML += article.fullurl;\n articleHTML += '\">';\n articleHTML += '<div class=\"output-text pure-u-lg-1\">';\n articleHTML += '<h2>'\n articleHTML += article.title;\n articleHTML += '</h2>'\n articleHTML += article.extract;\n articleHTML += '</div>';\n articleHTML += '</a>';\n });\n\n articleHTML += '</ul>';\n $('#search-output').css( \"opacity\", 1 );\n $('#search-output').html(articleHTML).animate({\n opacity: 1\n }, 1000 );\n\n $('.output-text p:last-child').append(\"...\");\n }", "function displayResults(data) {\n // Add to the table here...\n}" ]
[ "0.7220859", "0.717913", "0.69690764", "0.6891735", "0.6891278", "0.6820409", "0.67163646", "0.6665844", "0.665335", "0.66240984", "0.65953904", "0.6540478", "0.65337664", "0.65191954", "0.65070724", "0.65012985", "0.6496936", "0.64881307", "0.64848953", "0.6466934", "0.64570695", "0.6453612", "0.64124984", "0.6373976", "0.6368509", "0.63654566", "0.6365041", "0.6360206", "0.635963", "0.63444847", "0.6333233", "0.6325957", "0.6323912", "0.63224596", "0.63171995", "0.63144493", "0.63068163", "0.6300055", "0.6294269", "0.6291867", "0.6291178", "0.62828535", "0.6278912", "0.62755907", "0.6274855", "0.6271055", "0.6265363", "0.6265169", "0.62459236", "0.62414074", "0.624138", "0.6234199", "0.62213486", "0.6213683", "0.6212943", "0.62109333", "0.6204837", "0.6199009", "0.6191975", "0.61915565", "0.6176333", "0.61659914", "0.616311", "0.6162222", "0.61585605", "0.615845", "0.6154409", "0.6154071", "0.6150439", "0.61443377", "0.61342424", "0.61339945", "0.611848", "0.61182755", "0.61166686", "0.6116173", "0.6109176", "0.6108221", "0.610548", "0.6105187", "0.61046", "0.6102232", "0.6101584", "0.60946965", "0.60929316", "0.6086102", "0.6083025", "0.6078622", "0.6065767", "0.6064494", "0.6059041", "0.60551435", "0.6054795", "0.6053275", "0.60490537", "0.60459405", "0.60416883", "0.60416883", "0.60399276", "0.6036829" ]
0.63568443
29
This file is automatically included by javascript_include_tag :defaults
function selectPeople(select) { if (select.options[select.selectedIndex].value == "") { // The prompt option has no value and thus can't be added. return; } var option = select.options[select.selectedIndex]; var ul = document.getElementById('people-list'); var choices = ul.getElementsByTagName('input'); for (var i = 0; i < choices.length; i++) if (choices[i].value == option.value) return; var image = document.createElement('img'); image.setAttribute('src', '/images/cancel.png'); var li = document.createElement('li'); var input = document.createElement('input'); var text = document.createTextNode(option.firstChild.data); input.type = 'hidden'; input.name = 'people[]'; input.value = option.value; li.appendChild(input); li.appendChild(image); li.appendChild(text); li.setAttribute('onclick', 'this.parentNode.removeChild(this);'); ul.appendChild(li); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function jsOnLoad(){\n\n}", "function setJs() {\n\t\t\tvar body = document.getElementsByTagName(\"body\")[0];\n\t\t\taddClass(body,'js');\n\t\t}", "function PaginaInicial_elementsExtraJS() {\n // screen (PaginaInicial) extra code\n\n }", "function Introducao_elementsExtraJS() {\n // screen (Introducao) extra code\n\n }", "function BaixarOrdemInternet_elementsExtraJS() {\n // screen (BaixarOrdemInternet) extra code\n\n }", "function ExternalScripts() {\r\n BaseObject.apply(this,arguments);\r\n }", "function TELUGU_elementsExtraJS() {\n // screen (TELUGU) extra code\n }", "function IntroducaoPros_elementsExtraJS() {\n // screen (IntroducaoPros) extra code\n\n }", "function attachJavaScriptFileInitial(fileURL) {\n\tif(minifiedJS) fileURL = fileURL.replace(\".js\", \".min.js\");\n\tif(cachingOnOff){\n\t\tfileURL = fileURL+\"?v=\"+appVersion;\n\t}\n\t$.cachedScript(\"javascripts/\"+ minifiedDir + fileURL).done(function(script, textStatus) { });\n}", "function IntroducaoContra_elementsExtraJS() {\n // screen (IntroducaoContra) extra code\n\n }", "function BaixarOrdemTV_elementsExtraJS() {\n // screen (BaixarOrdemTV) extra code\n\n }", "function includeJS(incFile)\n{\n document.write('<script type=\"text/javascript\" src=\"' + incFile+ '\"></scr' + 'ipt>');\n}", "function include(fileName)\n{ \n\t// On insere une balise script avec le nom du fichier a inclure.\n\tdocument.write(\"<script type='text/javascript' src='\"+fileName+\"'></script>\");\n}", "function Screen4_elementsExtraJS() {\n // screen (Screen4) extra code\n\n }", "function mxinclude(src)\n{\n var g = document.createElement('script'); g.type = 'text/javascript'; g.async = true; g.src = src;\n var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(g, s);\n}", "function IncludeJavaScript(jsFile)\n{\n document.write('<script type=\"text/javascript\" src=\"'+ jsFile + '\"></script>');\n}", "function JavascriptWriter() {\n}", "function prePluginInit() {\n // Default options for the plug-in \n // Those can be pre defined or overridden in any of the following:\n // query string parameters in the script reference\n // hash tag parameters in the browser URL box\n // as the options parameter in the plug-in construction call\n // as meta tags in the enhanced element\n window.MI_defaults = {\n optimizeNames: true,\n useLinkTarget: false,\n useLinkTitle: false,\n mi_style: 'default',\n abtest: 'false',\n debug: 'false',\n tabs: ['mentions', 'photos', 'stats'],\n frameElements: ['statsPreview', 'mediaPreview', 'tags', 'shareLinks'],\n ex: [],\n includedSourceIds: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103],\n widgetTextPosition: 'bottom',\n hidden: 'false',\n xOffset: 0,\n yOffset: 0,\n gaugeOrientation: 'left',\n vertical: 'all',\n inqa: false,\n RTL: false,\n lang: \"EN\",\n displayText: false,\n layout: 'inlinepanel',\n columnscount:2,\n allowExternalLinks: 'true',\n displayExternalLinksInline: 'true',\n collapseLines: 'true',\n displayShowMore: 'true',\n loadWhenInvisible: 'false',\n hover: false,\n doClientSide: false,\n template: 'RASTA',\n tabsType: \"TABS\",\n starsType: \"SMALL\",\n animationStyle: \"DEFAULT\",\n logo: \"//d34p6saz4aff9q.cloudfront.net/images/feelterfooter.png\",\n buttonType: \"DEFAULT\",\n lightbox: true\n\n };\n window.tempDictionary = window.tempDictionary ? window.tempDictionary : {\n socialItem: function(data, baseid) {\n var click = data.click;\n var si = data.modsi ? data.modsi : window.tempDictionary[window.MI_defaults.template].socialItem.normalItem.replace(\"@@@metaicon\", data.metaicon).replace(\"@@@cond\", (data.sourceURL == '' || window.MI_defaults.allowExternalLinks == 'false' ? 'style=\"cursor:default;direction:ltr!important;\"' : ' style=\"direction:ltr!important;\" onclick=\"' + click + '\"'))\n var item = window.tempDictionary[window.MI_defaults.template].socialItem.nonTimelineItem.replace(/@@@itemImageURL/g, data.itemImageURL);\n si = si.replace(\"@@@item\", item)\n\n si = si.replace(/@@@itemImageURL/g, data.itemImageURL)\n si = si.replace(/@@@itempublisher/g, (data.itemPublisher.length > 18 ? data.itemPublisher.substring(0, 17) + '...' : data.itemPublisher))\n si = si.replace(/@@@timeago/g, data.timeAgo)\n si = si.replace(/@@@itemDate/g, data.itemDate)\n si = si.replace(/@@@sourceURL/g, data.sourceURL != 'undefined' ? \"\" : data.sourceURL.replace('http://www.youtube.com/', ''))\n si = si.replace(/@@@sourceAvatar/g, item).replace(/@@@itemtext/g, data.moditemText)\n si = si.replace(/@@@itemWidth/g, (typeof data.itemTimeLine != 'undefined' ? '250' : '275') + 'px')\n si = si.replace(/@@@sourceSite/g, (data.source.replace('.com', '').replace('www.', '').replace('.', '').replace('.', '')).trim())\n if (data.regarding) si = si.replace('</th>', '<span style=\"position: inherit;margin-right: 3px;color: #ccc;\">On</span>' + data.regarding.capitalize() + '</th>');\n if (window.MI_defaults.lang != 'EN')\n si += '<div class=\"mi_translate\" onclick=\"window.MI_logUsage(\\'translate_clicked\\',\\'' + baseid + '\\',\\'' + window.MI_defaults.lang + '\\');jQuery.MidasInsight.translate(\\'' + data.ksid + '\\');event.stopPropagation();\" style=\"color: #49b7e6;font-size:12px;height:24px;float:left;\">' + window.langDictionary[window.MI_defaults.lang].translate + '</div>';\n if (data.itemContentImageURL && data.itemContentImageURL.indexOf('/') == -1) data.itemContentImageURL = '';\n if (data.itemContentImageURL && data.itemContentImageURL.indexOf('//') < 0) data.itemContentImageURL = '//' + data.itemContentImageURL;\n if (data.itemContentImageURL && data.itemContentImageURL.indexOf('.') > -1) {\n if (!jQuery.MidasInsight.ObjDictionary[baseid].gallery) jQuery.MidasInsight.ObjDictionary[baseid].gallery = [{\n href: '//d34p6saz4aff9q.cloudfront.net/img/feelter.png'\n }];\n //jQuery.MidasInsight.ObjDictionary[baseid].gallery.push({ href: data.itemContentImageURL, title: data.itemPublisher })\n //data.galleryindex = jQuery.MidasInsight.ObjDictionary[baseid].gallery.length - 1;\n //if (window.MI_defaults.lightbox == true && !(data.source.indexOf(\"facebook\") > -1)) {\n si += window.tempDictionary[window.MI_defaults.template].socialItem.lightboxContentImage.replace(/@@@itemcontentimage/g, data.itemContentImageURL).replace(/@@@ksid/g, data.ksid).replace(/@@@kfid/g, baseid);\n\n //} else {\n // si += window.tempDictionary[window.MI_defaults.template].socialItem.itemContentImage.replace(\"@@@itemcontentimage\", data.itemContentImageURL);\n\n //}\n }\n si += '</td></tr></table>'\n si += '</div>';\n si = si.replace(/@@@click/g, '');\n\n data.modsi = si;\n },\n socialItemneweggItem: function(data, baseid) {\n data.moditemText = data.moditemText.replace(/Pros:/g, '<span style=\"font-weight:bold\">Pros:</span>').replace(/Cons:/g, '<span style=\"font-weight:bold\">Cons:</span>').replace(/Other Thoughts:/g, '<span style=\"font-weight:bold\">Other Thoughts:</span>')\n window.tempDictionary.socialItem(data, baseid);\n },\n socialItemShowInPhotosTab: function(data, baseid) {\n data.click = ' ';\n window.tempDictionary.socialItem(data, baseid);\n },\n socialItemflickrItem: function(data, baseid) {\n window.tempDictionary.socialItemShowInPhotosTab(data, baseid);\n },\n socialIteminstagramItem: function(data, baseid) {\n data.click = ' ';\n data.modsi = window.tempDictionary[window.MI_defaults.template].socialItem.instagramItem.replace(\"@@@metaicon\", data.metaicon).replace(\"@@@cond\", (data.sourceURL == '' || window.MI_defaults.allowExternalLinks == 'false' ? 'style=\"cursor:default;direction:ltr!important;\"' : ' style=\"direction:ltr!important;\" onclick=\"' + data.click + '\"'))\n window.tempDictionary.socialItem(data, baseid);\n },\n socialItempinterestItem: function(data, baseid) {\n window.tempDictionary.socialItemShowInPhotosTab(data, baseid);\n },\n socialItemyoutubeItem: function(data, baseid) {\n //if (!jQuery.MidasInsight.ObjDictionary[baseid].gallery) jQuery.MidasInsight.ObjDictionary[baseid].gallery = [];\n var vurl = data.sourceURL.replace('http://www.youtube.com/', '//www.youtube.com/watch?v=');\n jQuery.MidasInsight.AddtoGallery(baseid, {\n href: vurl,\n title: data.itemPublisher\n });\n //jQuery.MidasInsight.ObjDictionary[baseid].gallery.push({ href: data.sourceURL.replace('http://www.youtube.com/', '//www.youtube.com/watch?v='), title: data.itemPublisher })\n var click = \"window.MI_logUsage('play_video','\" + baseid + \"','youtube'); jQuery.MidasInsight.ShowLightBoxURL('\" + vurl + \"','\" + baseid + \"')\";\n var item = window.tempDictionary[window.MI_defaults.template].socialItem.nonTimelineItem;\n item = item.replace(/@@@itemImageURL/g, data.itemImageURL)\n var si = window.tempDictionary[window.MI_defaults.template].socialItem.lightboxYoutubeItem\n .replace(/@@@youtubeid/g, data.sourceURL.split('/')[data.sourceURL.split('/').length - 1]);\n data.modsi = si.replace(/@@@itemDate/g, data.itemDate)\n .replace(/@@@click/g, click)\n .replace(/@@@itemImageURL/g, data.itemImageURL)\n .replace(/@@@itemPublisher/g, (data.itemPublisher.length > 18 ? data.itemPublisher.substring(0, 17) + '...' : data.itemPublisher))\n .replace(/@@@ksid/g, data.ksid)\n .replace(/@@@timeAgo/g, data.timeAgo)\n .replace(/@@@sourceURL/g, data.sourceURL.replace('http://www.youtube.com/', ''))\n .replace(/@@@sourceAvatar/g, item)\n .replace(/@@@itemText/g, data.moditemText)\n .replace(/@@@itemWidth/g, (typeof data.itemTimeLine != 'undefined' ? '250' : '275') + 'px')\n .replace(/@@@sourceSite/g, (data.source.replace('.com', '').replace('www.', '').replace('.', '').replace('.', '')).trim())\n },\n socialItemvimeoItem: function(data, baseid) {\n //debugger;\n //if (!jQuery.MidasInsight.ObjDictionary[baseid].gallery) jQuery.MidasInsight.ObjDictionary[baseid].gallery = [];\n var vurl = data.sourceURL;\n jQuery.MidasInsight.AddtoGallery(baseid, {\n href: vurl,\n title: data.itemPublisher\n });\n\n //jQuery.MidasInsight.ObjDictionary[baseid].gallery.push({\n // href: data.sourceURL//.replace('vimeo.com/', 'player.vimeo.com/video/')\n // , title: data.itemPublisher\n //})\n var click = \"window.MI_logUsage('play_video','\" + baseid + \"','vimeo'); jQuery.MidasInsight.ShowLightBoxURL('\" + vurl + \"','\" + baseid + \"')\";\n var item = window.tempDictionary[window.MI_defaults.template].socialItem.nonTimelineItem;\n item = item.replace(/@@@itemImageURL/g, data.itemImageURL)\n var si = window.tempDictionary[window.MI_defaults.template].socialItem.lightboxVimeoItem;\n data.modsi = si.replace(/@@@itemDate/g, data.itemDate)\n .replace(/@@@click/g, click)\n .replace(/@@@itemImageURL/g, data.itemImageURL)\n .replace(/@@@itemPublisher/g, (data.itemPublisher.length > 18 ? data.itemPublisher.substring(0, 17) + '...' : data.itemPublisher))\n .replace(/@@@ksid/g, data.ksid)\n .replace(/@@@timeAgo/g, data.timeAgo)\n .replace(/@@@sourceURL/g, data.sourceURL.replace('vimeo.com/', 'player.vimeo.com/video/'))\n .replace(/@@@sourceAvatar/g, item)\n .replace(/@@@itemContentImageURL/g, data.itemContentImageURL)\n .replace(/@@@itemText/g, data.moditemText)\n .replace(/@@@itemWidth/g, (typeof data.itemTimeLine != 'undefined' ? '250' : '275') + 'px')\n .replace(/@@@sourceSite/g, (data.source.replace('.com', '').replace('www.', '').replace('.', '').replace('.', '')).trim())\n\n },\n DEFAULT: {\n panelLayout: {\n header: [\"tabs\"],\n content: [\"stars\", \"photos\", \"tags\", \"mentions\"],\n footer: [\"share\"]\n },\n panel: {\n videoholder: '<div id=\"mi_videoholder_@@@baseid\" class=\"mi_singlevideocontainer mi_closeTopLeft\" onclick=\"jQuery.MidasInsight.MI_GetPhotos(\\'@@@baseid\\',false)\"><div class=\"mi_singlevideo\"></div></div>',\n containerHtml: '<div style=\"padding:5px;\" class=\"mi_panelBackground mikfpanel\" id=\"cpcnt_@@@kfid\" style=\"direction: ltr;@@@layout\"></div>',\n tabs: '<tr><td><div class=\"MI_tabs@@@orientation\" style=\"margin-left:-3px!important;display:inline-block;width:100%;padding-top:10px;\">@@@tabs</div></td></tr>',\n gauge: '<div class=\"mi_gradeselectgradbg\"></div><div class=\"mi_gradeselectmasknerrow' + (window.MI_defaults.RTL == 'true' ? ' mi_gradeselectmasknerrow_right' : '') + '\"></div><div class=\"mi_gradeselecthandlenerrow\"></div><div class=\"mi_gradeselectdigitsnerrow\" ' + (window.MI_defaults.RTL == 'true' ? 'style=\"direction:ltr!important;\"' : 'style=\"direction:ltr;\"') + '><span style=\"font-size: 48px;z-index: 3;color: #92c83e;font-family: \\'Source Sans Pro\\', Alef!important;\"></span><span class=\"mi_gradeselectdigitsnerrow_after\">/ 100</span></div><div class=\"mi_gradeselecttext\"></div>',\n tag: '<span onclick=\"jQuery.MidasInsight.tagClicked(\\'@@@kfid\\',\\'@@@atags\\')\" class=\\'mi_tag_@@@atagsreplace mi_tag\\'>@@@atagscap <span style=\"display:;color:@@@color;-webkit-font-smoothing: antialiased;padding: 0;margin-bottom: 0;margin-left: 0;margin-top: 3px;text-shadow: @@@color 0 0 0.3px,1px 1px 1px white;background-color: transparent;line-height: 10px;nobox-shadow:inset 1px 1px 2px -1px lightslategray;padding: 0px 2px 1px 3px;border-radius: 50%;left: 4px;position: relative;\">&#9733;</span></span>',\n slidercontainer: '<div id=\"mi_previewPhotosContainer_@@@kfid\" style=\"max-width: 465px;cursor:default;-moz-user-select:none;-webkit-user-select:none; -ms-user-select:none; user-select:none;\" unselectable=\"on\" onselectstart=\"return false;\"><table class=\"mi_previewPhotosContainer\" style=\"\" cellspacing=\"0\" onclick=\"jQuery.MidasInsight.MI_GetPhotos(\\'@@@kfid\\',false)\"><tr>',\n photopreview: '<tr ><td id=\"mi_photopreview_@@@kfid\" colspan=\"2\" style=\"width:100%;overflow:hidden;background-color:white;padding:5px 0 !important;border-bottom: 1px solid #DBDBDB !important;\"><div class=\"mi_thumbscontainer\">',\n tabswrapper: {\n header: '<div style=\"width: 152px;margin: 0 auto;background: #fefefe; /* Old browsers */background: -moz-linear-gradient(top, #fefefe 0%, #eeeeee 100%); /* FF3.6+ */background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fefefe), color-stop(100%,#eeeeee)); /* Chrome,Safari4+ */background: -webkit-linear-gradient(top, #fefefe 0%,#eeeeee 100%); /* Chrome10+,Safari5.1+ */background: -o-linear-gradient(top, #fefefe 0%,#eeeeee 100%); /* Opera 11.10+ */background: -ms-linear-gradient(top, #fefefe 0%,#eeeeee 100%); /* IE10+ */background: linear-gradient(to bottom, #fefefe 0%,#eeeeee 100%); /* W3C */filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=\\'#fefefe\\', endColorstr=\\'#eeeeee\\',GradientType=0 ); /* IE6-9 */-webkit-border-radius: 15px;-moz-border-radius: 15px;border-radius: 15px;border: 1px solid #cbcbcb;padding: 5px;\">',\n footer: '</div>'\n },\n starspanel: {\n header: '<tr><td><div class=\"mi_hover_starspanel\" style=\"border-bottom: 1px solid #dfdfdf !important;padding-bottom:5px;width:100%;overflow:hidden;border-top:1px solid #dfdfdf;padding-top:5px;background: #f7f7f7; /* Old browsers */background: -moz-linear-gradient(top, #f7f7f7 0%, #ffffff 100%); /* FF3.6+ */background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f7f7f7), color-stop(100%,#ffffff)); /* Chrome,Safari4+ */background: -webkit-linear-gradient(top, #f7f7f7 0%,#ffffff 100%); /* Chrome10+,Safari5.1+ */background: -o-linear-gradient(top, #f7f7f7 0%,#ffffff 100%); /* Opera 11.10+ */background: -ms-linear-gradient(top, #f7f7f7 0%,#ffffff 100%); /* IE10+ */background: linear-gradient(to bottom, #f7f7f7 0%,#ffffff 100%); /* W3C */filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=\\'#f7f7f7\\', endColorstr=\\'#ffffff\\',GradientType=0 ); /* IE6-9 */width: 396px;left: 0px;position: relative;\"><table style=\"position:relative\">',\n footer: '</tr></table></div></td></tr>'\n },\n footer: {\n header: '<div class=\"mi_footerwrapper\"><div class=\"mi_footerroot mi_footerroot_@@@kfid\" style=\"background-image: url(//d34p6saz4aff9q.cloudfront.net/images/footer/feelterfooternew.png);background-position: -120px 0px;background-repeat: no-repeat;\"><div class=\"mi_footercontainer\" id=\"mi_footercontainer_@@@kfid\" style=\"height:100%;position:static;\">' +\n '<div class=\"mi_footer\" style=\"height:auto;\"><div onclick=\"jQuery(\\'#cpcnt_@@@kfid\\').find(\\'.MI_tab_selected\\').removeClass(\\'MI_tab_selected\\');jQuery(\\'#mipct_scroll_@@@kfid\\').addClass(\\'mi_blured\\');jQuery(\\'#mipct_tblabout_@@@kfid\\').css(\\'max-height\\',jQuery(\\'#mipct_scroll_@@@kfid\\').height()+1).css(\\'height\\',jQuery(\\'#mipct_scroll_@@@kfid\\').height()+1).css(\\'top\\',jQuery(\\'#mipct_scroll_@@@kfid\\').position().top).fadeIn();\" style=\"z-index: 1;position: absolute;right: 0px;top: 5px;height: 25px;width:57px;background-size: contain;cursor: pointer;background-image: url(\\'@@@logo\\');background-repeat: no-repeat;\"></div></div>',\n share: '<div style=\"width: 100%;float:left;\"><div class=\"mi_footer_prompt\" style=\"margin-bottom:0;\">@@@ask</div>' +\n '<ul class=\"mi_share-buttons\"><li><a onclick=\"window.MI_logUsage(\\'mail\\');\" href=\"mailto:?subject={1}&body={2}: {0}\" target=\"_blank\" title=\"Email\"><img onload=\"this.style.opacity=1;this.style.top=0;\" src=\"//d34p6saz4aff9q.cloudfront.net/images/footer/Email.png\" style=\"opacity:0;\" style=\"opacity:0\"></a></li><li><a onclick=\"window.MI_logUsage(\\'share\\');\" href=\"https://www.facebook.com/sharer/sharer.php?u={0}\" target=\"_blank\"><img onload=\"this.style.opacity=1;this.style.top=0;\" src=\"//d34p6saz4aff9q.cloudfront.net/images/footer/Facebook.png\" style=\"opacity:0;\"></a></li><li><a onclick=\"window.MI_logUsage(\\'share\\');\" href=\"https://twitter.com/intent/tweet?source={0}&text={1}: {0}\" target=\"_blank\" title=\"Tweet\"><img onload=\"this.style.opacity=1;this.style.top=0;\" src=\"//d34p6saz4aff9q.cloudfront.net/images/footer/Twitter.png\" style=\"opacity:0\"></a></li><li style=\"display:none;\"><a onclick=\"window.MI_logUsage(\\'share\\');\" href=\"http://pinterest.com/pin/create/button/?url={0}&description={2}\" target=\"_blank\" title=\"Pin it\"><img onload=\"this.style.opacity=1;this.style.top=0;\" src=\"//d34p6saz4aff9q.cloudfront.net/images/footer/Pinterest.png\"></a></li><li><a onclick=\"window.MI_logUsage(\\'share\\');\" href=\"https://plus.google.com/share?url={0}\" target=\"_blank\" title=\"Share on Google+\"><img onload=\"this.style.opacity=1;this.style.top=0;this.style.top=0;\" src=\"//d34p6saz4aff9q.cloudfront.net/images/footer/Googleplus.png\" style=\"opacity:0;\"></a></li></ul></div>',\n callForActions: '<div id=\"cfa\" style=\"white-space:nowrap;padding-left:0;display:inline-block;\"><div onclick=\"alert(\\'call to add to favorites\\')\" style=\"cursor:pointer;border-radius: 7px;height: 27px;width: 187px;margin:5px;MARGIN-LEFT:0;display: inline-block;text-align: center;box-shadow: inset 0 -9px 37px -10px silver;vertical-align: middle;padding-top: 8px;border: 1px solid rgba(0,0,0,0.2);color: grey;\">Add to favorites</div><div onclick=\"alert(\\'call to book\\')\" style=\"cursor:pointer;border-radius: 7px;height: 27px;width: 187px;margin:5px;display: inline-block;text-align: center;box-shadow: inset 0 -9px 37px -10px rgb(3, 179, 12);vertical-align: middle;padding-top: 8px;border: 1px solid rgba(0,0,0,0.2);color: white;margin-left: 1px;background-color: rgb(161, 218, 101);\">BOOK</div></div>'\n },\n header: {\n header: '<table align=\"left\" class=\"mi_reset mi_greenredtitle\">' +\n '<div class=\"mi_green_close @@@orientation\" onclick=\"jQuery.MidasInsight.hidePanel(\\'@@@kfid\\');\" style=\"z-index:3;\"></div>' +\n '<tr><td class=\"mi_header_caption@@@gaugeOrientation>' +\n '<div class=\"mi_drag_area\" style=\"position: absolute;width: 100%;height: 60px;left:0;z-index: 2\"></div>' +\n '<div class=\"mi_gradselectroot @@@gaugeOrientation\" id=\"mi_gradselectroot_@@@kfid\" data-score=\"@@@grade\" style=\"z-idex:1;\"><div class=\"mi_gradeselect\" id=\"mi_gradeselect_@@@kfid\"></div></div>' +\n '<div class=\"mi_title\" style=\"@@@titleOrientation\">@@@displayText</div>' +\n '<div style=\"@@@optionsrtl\" class=\"mi_subtitle\">@@@count</div></td></tr>'\n /*if (count > 4) {\n p += '<div style=\"' + (options.RTL == 'true' ? '' : '') + '\" class=\"mi_subtitle ' + (options.RTL == 'true' ? 'mi_subtitle_rtl' : '') + '\">' + window.langDictionary[window.MI_defaults.lang].basedon.replace('%d', count);\n p += '</div>';\n */\n // tools tabs\n +\n '<div style=\"clear:both;height:0px;margin-bottom:0px;border-top:0px solid #DBDBDB!important;\"></div>',\n footer: '</table>'\n }\n\n ,\n closebutton: '<div class=\"mi_green_close@@@gaugeOrientation\" onclick=\"jQuery.MidasInsight.hidePanel(\\'@@@kfid\\');\"></div>'\n }\n\n ,\n scrollables: {\n header: '<div style=\"clear:both;height: px;margin-bottom:0px;border-top:1px solid #DBDBDB\"></div><div id=\"mipct_scroll_@@@kfid\" tabindex=\"-1\" style=\"heightdummy:0;outline:none;\" class=\"mi_scroll\">' +\n '<table align=\"left\" id=\"mipct_tbldefault_@@@kfid\" class=\"mi_results mi_scrolledcontent\">',\n footer: '</table></div>'\n },\n socialItem: {\n timelineItem: '<div class=\"mi_timeline\">@@@fullYear<br/>@@@month<br/>@@@date</div>',\n nonTimelineItem: '<img onerror=\"jQuery.MidasInsight.HandleMissingImage(\\'avatar\\',this)\" src=\"@@@itemImageURL\" valign=\"top\" class=\"mi_resultimage\"/>',\n youtubeItem: '<div style=\"position:relative;\"><div class=\\\"MI_SourceIcon MI_@@@sourceSite\\\" mi_data-tooltip=\\\"@@@sourceSite\\\"></div><table align=\"left\" class=\"mi_resultcontainer\" style=\"direction:ltr!important;cursor:default;\"><tr><td rowspan=\"4\" valign=\"top\" style=\"padding-right:15px;padding-left:3px;width: 65px;\"><div style=\"position:relative;height: 100%;display: block;\">' +\n '@@@sourceAvatar' +\n '</div></td><th style=\"vertical-align: middle;\" align=\"left\"><div class=\"mi_resultpublisher\" style=\"color:#838383;\">@@@itemPublisher<span class=\"mi_resulttimeago\" itemDate=\"@@@itemDate\">@@@timeAgo' +\n '</span></div></th></tr><tr><td style=\"padding-right:30px;\"></td></tr>' +\n '<tr><td colspan=\"2\" onclick=\"@@@click\" style=\"cursor: pointer; cursor: hand;\"><div style=\"padding-right:10px;overflow:hidden;position:relative;max-width: 275px;\"><img src=\"https://i.ytimg.com/vi/@@@sourceURL/mqdefault.jpg\" style=\"max-width: @@@itemWidth ;min-width:185px;margin-top: 15px;margin-bottom: 15px;box-shadow: 0px 0 10px 4px #eee;float: right;border-radius: 5px;display:inline;\"/><img src=\"//d34p6saz4aff9q.cloudfront.net/images/playvideow.png\" style=\"position:absolute;cursor: pointer;left: 50%!important;margin-top: 20%;display:inline;margin-left: -30px;\" onclick=\"window.MI_logUsage(\\'play_video\\',\\'@@@baseid\\');@@@click\" onerror=\"this.style.display=\\'none\\';\"/></div>' +\n '</td></tr></table></div>',\n lightboxYoutubeItem: '<div style=\"position:relative;\"><div class=\\\"MI_SourceIcon MI_@@@sourceSite\\\" mi_data-tooltip=\\\"@@@sourceSite\\\"></div><table align=\"left\" class=\"mi_resultcontainer\" style=\"direction:ltr!important;cursor:default;\"><tr><td rowspan=\"4\" valign=\"top\" style=\"padding-right:15px;padding-left:3px;width: 65px;\"><div style=\"position:relative;height: 100%;display: block;\">' +\n '@@@sourceAvatar' +\n '</div></td><th style=\"vertical-align: middle;\" align=\"left\"><div class=\"mi_resultpublisher\" style=\"color:#838383;\">@@@itemPublisher<span class=\"mi_resulttimeago\" itemDate=\"@@@itemDate\">@@@timeAgo' +\n '</span></div></th></tr><tr><td style=\"padding-right:30px;\"></td></tr>' +\n '<tr><td colspan=\"2\" onclick=\"@@@click\" style=\"cursor: pointer; cursor: hand;\"><div style=\"padding-right:10px;overflow:hidden;position:relative;max-width: 275px;\"><div id=\"#mi_image_lightbox_@@@ksid\" onclick=\" jQuery(mi_image_lightbox_@@@ksid).fadeIn();\"><img src=\"https://i.ytimg.com/vi/@@@sourceURL/mqdefault.jpg\" style=\"max-width: @@@itemWidth ;min-width:185px;margin-top: 15px;margin-bottom: 15px;box-shadow: 0px 0 10px 4px #eee;float: right;border-radius: 5px;display:inline;\"/><img src=\"//d34p6saz4aff9q.cloudfront.net/images/playvideow.png\" style=\"position:absolute;cursor: pointer;left: 50%!important;margin-top: 20%;display:inline;margin-left: -30px;\" onclick=\"window.MI_logUsage(\\'play_video\\',\\'@@@baseid\\');@@@click\" onerror=\"this.style.display=\\'none\\';\"/></div><div class=\"mi_lightbox\" id=\"mi_image_lightbox_@@@ksid\" onclick=\"jQuery.MidasInsight.StopYoutubeVideo(jQuery(\\'#mi_image_lightbox_@@@ksid iframe\\')[0]);jQuery(this).fadeOut();\"><iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/@@@youtubeid?enablejsapi=1\" frameborder=\"0\" allowfullscreen></iframe></a></div>' +\n '</td></tr></table></div>',\n lightboxVimeoItem: '<div style=\"position:relative;\"><div class=\\\"MI_SourceIcon MI_@@@sourceSite\\\" mi_data-tooltip=\\\"@@@sourceSite\\\"></div><table align=\"left\" class=\"mi_resultcontainer\" style=\"direction:ltr!important;cursor:default;\"><tr><td rowspan=\"4\" valign=\"top\" style=\"padding-right:15px;padding-left:3px;width: 65px;\"><div style=\"position:relative;height: 100%;display: block;\">' +\n '@@@sourceAvatar' +\n '</div></td><th style=\"vertical-align: middle;\" align=\"left\"><div class=\"mi_resultpublisher\" style=\"color:#838383;\">@@@itemPublisher<span class=\"mi_resulttimeago\" itemDate=\"@@@itemDate\">@@@timeAgo' +\n '</span></div></th></tr><tr><td style=\"padding-right:30px;\"></td></tr>' +\n '<tr><td colspan=\"2\" onclick=\"@@@click\" style=\"cursor: pointer; cursor: hand;\"><div style=\"padding-right:10px;overflow:hidden;position:relative;max-width: 275px;\"><div id=\"#mi_image_lightbox_@@@ksid\" onclick=\" jQuery(mi_image_lightbox_@@@ksid).fadeIn();jQuery(\\'#mi_iframe_lightbox_@@@ksid\\').attr(\\'src\\',jQuery(\\'#mi_iframe_lightbox_@@@ksid\\').attr(\\'data-src\\'));\"><img src=\"@@@itemContentImageURL\" style=\"max-width: @@@itemWidth ;min-width:185px;margin-top: 15px;margin-bottom: 15px;nbox-shadow: 0px 0 10px 4px #eee;float: right!important;border-radius: 2px;display:inline;\"/><img src=\"//d34p6saz4aff9q.cloudfront.net/images/playvideow.png\" style=\"position:absolute;cursor: pointer;left: 50%!important;margin-top: 20%;display:inline;margin-left: -30px;\" nonclick=\"window.MI_logUsage(\\'play_video\\',\\'@@@baseid\\');@@@click\" onerror=\"this.style.display=\\'none\\';\"/></div><div class=\"mi_lightbox\" id=\"mi_image_lightbox_@@@ksid\" onclick=\"jQuery(\\'#mi_iframe_lightbox_@@@ksid\\').attr(\\'src\\',\\'\\');jQuery(this).fadeOut();\"><iframe id=\"mi_iframe_lightbox_@@@ksid\" data-src=\"@@@sourceURL?autoplay=1&title=0&byline=0&portrait=0\" width=\"500\" height=\"281\" frameborder=\"0\" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe></a></div>' +\n '</td></tr></table></div>',\n normalItem: '<div style=\"position:relative;\">@@@metaicon<table align=\"left\" class=\"mi_resultcontainer\" @@@cond onclick=\"@@@click\"><tr><td rowspan=\"4\" valign=\"top\" style=\"padding-right:15px;padding-left:3px;width: 65px;\"><div style=\"position:relative;height: 100%;display:block;\">' +\n '@@@item' +\n '</div></td><th style=\"vertical-align: middle;\" align=\"left\"><div class=\"mi_resultpublisher\" style=\"color:#838383;\">@@@itempublisher<span class=\"mi_resulttimeago\" itemDate=\"@@@itemDate\">@@@timeago' +\n '</span></div></th></tr><tr><td style=\"padding-right:30px;\"><div class=\"mi_resulttext\">@@@itemtext</div>',\n instagramItem: '<div style=\"position:relative;\">@@@metaicon<table align=\"left\" class=\"mi_resultcontainer\" @@@cond onclick=\"@@@click\"><tr><td rowspan=\"4\" valign=\"top\" style=\"padding-right:15px;padding-left:3px;width: 65px;\"><div style=\"position:relative;height: 100%;display:block;\">' +\n '@@@item' +\n '</div></td><th style=\"vertical-align: middle;\" align=\"left\"><div class=\"mi_resultpublisher\" style=\"color:#838383;\">@@@itempublisher<span class=\"mi_resulttimeago\" itemDate=\"@@@itemDate\">@@@timeago' +\n '</span></div></th></tr><tr><td style=\"padding-right:30px;\">'\n\n ,\n itemContentImage: '</td></tr><tr><td colspan=\"2\"><div style=\"padding-right:10px;overflow:hidden;\"><img onload=\"if (!jQuery.MidasInsight.imageIsGood(this)) jQuery.MidasInsight.HandleMissingImage(\\'preview\\',this);\" onerror=\"jQuery.MidasInsight.HandleMissingImage(\\'preview\\',this);\" src=\"@@@itemcontentimage\" style=\"max-width: 275px;margin-top: 0px;margin-bottom: 15px;box-shadow: 0px 0 10px 4px #eee;float: right;border-radius: 5px;\"/></div>',\n lightboxContentImage: '</td></tr><tr><td colspan=\"2\"><div style=\"padding-right:10px;overflow:hidden;\"><div id=\"#mi_image_lightbox_@@@ksid\" onclick=\" jQuery(mi_image_lightbox_@@@ksid).fadeIn();\"><img src=\"@@@itemcontentimage\" style=\"max-width: 275px;margin-top: 0px;margin-bottom: 15px;box-shadow: 0px 0 10px 4px #eee;float: right;border-radius: 5px;\"></div><div class=\"mi_lightbox\" id=\"mi_image_lightbox_@@@ksid\" onclick=\"jQuery(this).fadeOut();\"><img src=\"@@@itemcontentimage\" style=\"box-shadow: 0px 0 10px 4px #eee;border-radius: 5px;\" onload=\"jQuery(this).css(\\'position\\', \\'relative\\').css(\\'top\\',\\'50%\\').css(\\'margin-top\\',((this.height/2)*-1)+ \\'px\\').css(\\'top\\',\\'50%\\',\\'!important\\');\"/></div></div>'\n\n }\n },\n MODERN: {\n panelLayout: {\n header: [\"tabs\", \"stars\"],\n content: [\"tags\", \"mentions\"],\n footer: [\"photos\", \"callForActions\", \"share\"]\n },\n panel: {\n videoholder: '<div id=\"mi_videoholder_@@@baseid\" class=\"mi_singlevideocontainer mi_closeTopLeft\" onclick=\"jQuery.MidasInsight.MI_GetPhotos(\\'@@@baseid\\',false)\" style=\"margin-top: 74px;background-position: 10px 18px;\"><div class=\"mi_singlevideo\"></div></div>',\n containerHtml: '<div style=\"padding:5px;margin-top:25px;border: 1px solid #ccc !important;\" class=\"mi_panelBackground mikfpanel\" id=\"cpcnt_@@@kfid\" style=\"direction: ltr;margin-top: 20px;@@@layout\"></div>',\n tabs: '<tr><td><div class=\"MI_tabs@@@orientation\" style=\"margin-left:-10px !important;position:relative;z-index:30;box-shadow:none;left:0px;padding-top: 0 !important;\">@@@tabs</div></td></tr>',\n gauge: '<div class=\"mi_gradeselectgradbg\"></div><div class=\"mi_gradeselectmasknerrow' + (window.MI_defaults.RTL == 'true' ? ' mi_gradeselectmasknerrow_right' : '') + '\" style=\"background-image:url(\\'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHIAAABQCAYAAADFuSFAAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA25pVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDoyODYzNTRkZS04NWY4LTg3NDEtYjNmOS02OGU4NGQzZjVjODkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OTM0QjUyMzEwQ0ZBMTFFNTlCQjg4NzExODFEM0Q0M0QiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OTM0QjUyMzAwQ0ZBMTFFNTlCQjg4NzExODFEM0Q0M0QiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKFdpbmRvd3MpIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6RDVFOTA3RTFFN0Y4MTFFNDkzNjJGQzdDNUEyRDA1MTYiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6RDVFOTA3RTJFN0Y4MTFFNDkzNjJGQzdDNUEyRDA1MTYiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5NfkuaAAAX1klEQVR42uxdCZQdVZm+99by9u7Xr1+n926ykOASgQODS5gJijIGJQxbOM4IIosKKgoHZw7icubMAcHjuI3jCHJkNI4LGcEIKuoIozKj4uAIkTBEliyd3ve313bn++tVvby8vNd53R00CXVPbqrqVdWtW/93v3+5SzWXUrIgHfuJb9u2bUk3UgMIhUIsFosx27aZoigsn8+ztrY21t7ezvbu3csikYj7e7FYdO+JRqNM13U2OzvLUqkUE0Iwx3GYqqruNpPJuFsqo1JBzt3fDMNgiUSCzc/Pu+VS+T09PfT88NDQUE9ra2tnOBweRJn9uGcFbm1HDqOeKo5t7JvIczieQN6POu+ZmZnZj3qMo05Te/bscetNdaE60jvRs6mO1e9M9bAsy30XOucTga4tFAru/ZRzuRwzTdP9vaWlhWWzWfe9qN6opys3kg29G+Xp6Wk2OTnpXr+UpI6NjS3pRno4CZQqSS9NlSchU6KKTkxMuIKnytILUiIhEPhUabqeztG9mqa55UGwFWD9RMKia6iR0D41AgiyG8c9AD4NQZ6M3AehpXC+G2V2IrdhvxW3h5AVnHewtbDNovwZlDeOMkaxP4G6TaKh7YCg96Lek7juOQjZKZVKbv0oVzcoapQEEAHoA0HnKFNDpHehhkCyoPel3+m6ubm5yrtTI6D7/Pvp/ej30dHRSlmLBtKv6KKp7FXQb5W09Y+rz/nZB6U2+/f65/2t39Jpi/KiAHc9Dl+LxnEGGtDa9evXnwChtUE4YtWqVYeUWyMQApNeNATBtSOvIQFS2dTICBwwOguARsGknbjv97j25yjnSVwz4pflM7S6/Ebnaq+r/b1aLtXyWzKQR5OepxfyWyheJo58OgC8CHlDOp0eBIApUkmkCah1L/WlqxNpDa/RxMHSNQB1DcDcDICvx/4E8mOo0w9wzU8IVLr2aPQrjhogCUAiOlrmyVBNmwDehfF4/HQSNIFH6mip2qMZ7UKJ1CJleiYBC/UaB6groSYvhSofg6r8d/z+IPKvAOZsAGQNC4mBSG+Bs/E2qLhzkdvI9r6Y4DWTiPWUyTEDqJ0A9b2w0dfB3v0c7N2GxncvLpt4SQPpMRAEFOdBWO8BcH8Bry5Knp1vK46m5IOaTCY52LkRzslGAHotWPp11PVOvMfMSwpIzwbi3flrYOs+AgA3gYkcAvqTsq/ZRE4JVL6bAegrpqamPgGWXgWG3o53uw8aZua4BbI6FgR4L+vu7r5xxYoVlwNAnQCsDjeOpUSqnzJU7xoAejdAfAfe8xNoqD/8YztEfxQJel4ox0u/H6rzxo6OjkGyOxRvLcO6MgoPORdjUvK845jcKY0rQqhPKuHO79e8m4Nrw6X8c1sY07vVUJetKOT1Ulhi9yE6WZYm9z1pvNufj4+PnwaG3osCbwGYw8cNkB6IrxwcHLwVDNwMEH2vcNFOEXhdcGxzhDvGDqnEfmUWRwt6OHU/UyLTjm0xszDCVTVSBJBmnZqwUu6Ff2Y8qjElJYWgvgKLFwoTl4RCXSkmi+uB9gZVDSepVwgNZNEql94LjTU6OTl5BfKG4eHhj+DUvccskNW9ID09PZfBntwOddpDjgy594sC0LH2AcVfAsAnpZ3dAdB+zsz5WUWNESkPfq7QkBu9EoJxJVSUTC/W0O8rdGxaBTyGeoOstbZtnYufNmpqbD3nSrpxmYcmsvOdnZ1kQ0+Exvl2Npt9NTxesp8TxxSQJBTqi8RLJMDA27q6uq6FPVQWw0KoQUMacy84kv8rVyPf49L+A3AwmYMwRQFTuHIQQLWANQKy0bXl3iNioJjDf7+Buv2NYWbaTDu7FtecpWvJ81U1erLgSnQx6pZ6nMDMG4eGhjZAHu8FmI8fE0CSQAhEbFf29/d/qa+v7xxSpeS2N2PzHLOYl1buF0wJfdopzj4GEGeZBtlJ7p5nJGxkTr0rnLrx8Cy7CFxDXveXiuMsk9Y0MIngWt2Fiq5znAx2TEZYlEEjG2t6dtYr3wO3XJYC75P/2nHsXwPUL0BUvY5T+jtVCV+kqKFWznjT7ASIrx4ZGfk+nL13Qz7bXwxHSBzJwrwO5D8D+7bDJp5DoxPNgCjNgm3O7nnAmn7mIsfIvRnS/jGEPesCV5Gv4gqdOQZz8CO35qGmE0xmfgdtOMtULQyBRZlwplEegLQLLnBkG5lTApmzwAL102z3OinnEOTvxn6CGdYwzhcAjeoBLMvthtQxNRyu5LC/y3Gsq/LF0XPmss99oWTONa0qyaRAHp1g6VZ46e/zG/1RxUjf3pA9ROs7e2BgYCtY2J1Opw8b1Eur5Nj5ifsdI/tVaRs/4lCpZOcOUn0u8+AwWTkmiFGFIfgrvYwZU0yJDjAbIgYNq+pDrFXL7KX7padS3d8Ah/S1B93joDHEWCH7NADtQ1uxXDCFsKBZ5KGKmNNAgPpYsTT1mGUXt9oh82pdS2xRlVBrM6oWskmAnf8EJ6gDzPz4kez4OCKMpPgQLW3L6tWr7zvhhBO6SZ0uWEEaebDMR6A+N8nC9F9DvA9woRvMU3menQSZSoyZc6TmGDemvcrKso2kTNe49pI3o7lrnCO6R/HsI5wkprgXUENQNJ3poTjaAFQyM8sNqUpUAo0C9pLAfHfRmH21ZRa+gvo6zfQOwdyw3t7ej4XD4c9Bg/EjxUx1uWz0QLwAhv1OVLCF+kgXMKKQvTlnZ8a+xLTY33OhFOBKukxh8oCkuevOk3ChCq0S4+F2CNUDrNJAvK1jHkBI2hqTxkrmse1gFG08wkDcaO7HwXxZhVpVZcmDnB+hqC7TbQkVjTpaMgsoFRyzKluqSORnbCnflS+MPBrVU7cgPl29UOhCLCQwIbvrx8bGVNM0byAu/MmA9EGEOj0PLNwKEGMLgkiiLWV/4uQn78DdP60A4gvGMVw2CEV3277U4KyQl0oXEPMqcvYAd8w2bFNchN8CSafxo8n19Clg78lMbQO5wxW20r5gbSwcOUnlPLQLP/436VrO1d+jjEfhxBTBqEle47i5gIKtmhJmJXuCKTzCpGu2HZQnDjhJnNlcinvyxtwvVUX/UDSUuvJwMSfkRbvXjY6OmjBLH1wuMxcNpO+Z0ig5PNM3AcSvoYXFFgovpAlbODf0HRZpoxfMsmq1S4OrYJUbhxt5nFI9Z8PL3ENQWjCWvAdt+gKwYECGUhcAi7BIntbr2j/3bZLYTdZpdQqiFp0pqtvQBpHfpKrUt9tioqzRcGjAFCLyX1Ch3+dc/lC6jK1mc9nxKdnzLKJ1sIjSwTKw1VEnDJDjFfspmf1/2L06W5zcrSmhD4e0RPhwYOJdPwBmGlCzf0type7KpYCqLhZECuipfzQSiZwCdfplBPrJBUG0rXlp5N7nZMa3KvEOvKznhBCAZpEJNY6M8EHRKPwos69aiFJ2oSWczPTkFUzRzxVaf4sbgrBYBaSluge87Fn1h/QeetYqsPIytKp9kssHHdt8yJH2DodZL1RUqVt3h4XQCKbFs+VoiPuW2/G8XE0WzKl/cBzjIU2NfRNe7+qFwCTPHsz+0Nzc3DAA/aw/k+BFB5J0PDzSPlTgqwj0B1tbGztsTnYqB3AuF5GW7QDBY1jZznFyLEyrrD7hBEhybKrjdinTQPgaxJIXAayTeaTjRe5OdG0eWbF+lanXSiV0LcDZZTvF/7ClcTfY+r8H5GC59pI83iJi1rBMMQ1xq+PaXOmGLPBuf1MycpsdWfpOLJw+qSEAYGBXVxeNd96GMGV3JpP5LkUAiwVTXQyNSZ3C84oCvLtSqdSrFgoxnKm9GXP46cuUvvXbK94oriUh8HmEiIUc4wk4MaWcx0JeBtWx07j0vTyUuJgJ/ZWMC/bHT2VQQ2p6LSq31nJyF5aY+JZpTt4Flj7N3GYoXYZKDnupcDZVepZpLM6S6uABx4YrO2fyIxcXrNnvpONr1jV6Gmk5qNkIsLgLIA7T9BLycIk0zeKjNtfrwly76HU7fRQtaBP1WDQC0Z54IWPufOQqnuoFE9UDahKaTOB1ZR7BuRat8hjJmXFiYO3l8GZv5nqs/+gZrEJkKeJdqh7/oCIi1+CHm21p/RsYOu2yD8xUuM7GzKfw4ipri6zCb+qBUEZoT41ln7oUrL6vM/HyVY2eQqMnCNs68vn8lwHeGyYnJ6eImc2O0TYNJIEGAP8KQe0NUKkHzfc8iInT+\\/PWEz++jGvqdq7pHoDCVavcQCihRplNndC+x+\\/21jhnMi18s4ilz3XDkaM0hdV2MsyfN+zMFoD0ebBy2wEbFWaWsNiY8RQL2TEW1XoqHRSqiDwxnH3yPGiX+zvjJ61tVD75HtB6r4Ine8euXbuuBZgmTS1thpUqzcVsZigKAK5G/iLUaYgKr2tDZ8cyxlM/uxye33amhbyQAWqoiHBRg0dJMXNVLwxSC+Loa0S07WbYwXZ2lE3vaJR0JXFmV+y016KFrsqZY3ccUKUaA8hs3hlGaJZnXeFXuA4QkUDl+s6x7NMX495tbZHehmqWzBVYeQUigl/Bft7tTQddvrNDdhH01trb2/+Rut4aOTeymMuZ+56+hkv7u+B52bEhVxr2kKGxiI7eKhbaFJL0iGjyDiXc8nYmjr0ZApqIK2Dk7SEluQle7tthO4fIrgIwt7/sycwDLG/Ns3Z1oNwdyEkNix2zhf2XxtTUfboWWdVI88FsKSDPbTj8z/n5+WebmUGhEp0PZxsB4NUIM95Ko/oN0rSTz7wTCH3PVaOGiZJpC5c8N44mHCrHg9xzaNTQWXB0vswUbQ1T2DGbiG0JvWejI80f4sU+5kh5v3Q7/jRydNg4HKA25QQWVtrgVUbdGFnlkScyxcnLW5WuR1RRf3CWNB5k3QFtSeHIJYZhFA7HSuX888+vrD+ozTRtHi7xIBycrwHIlnoqFXEicyaHbpWZmbulUXSHmCgm5HDNhYiXmQlbyaMJmrSK641zRKrnW6JlRR87ThKYuCKurbikYM3Bi2O/pJhy3hwFgEnWFz4VwLawCCxHRLQzjUdgquSodMQGXaPuPN6wXxasXF0oFKhL8XGSvT/vtl5WG9k7n+ZQpR9B6+imWWN1VWp29kHr+R2fYwQeqYBQsjxmWBmC8vtBHfyTrxeJ9q8zPZJmx1mKa13ihMSGT40Un2QlK/dpv5NACJ1FlRAzHaPSTxxSmGXb1j1gWgmAnVtv8IJkD3upQLXehP2HQKo9C7FS1GMiOTekUsHCNyJf3Uj9ymJ+j5ybfg+PtmR5BA6dhkaBcMON6X0Q3Q5xihPlWTyWuBcgdrDjNIWUBO+NnPpJhek3mk4BMuBljxPWlNo1dRhIZmNrUxD6TdxyHvInFxotgVlbAx/lJlrdRetUGmV1amqqrl3UdT28du3aj5MXVTdEkbJgT4x8WM5N7uehmNcfSr01BXeYqjL6YJZgE/U380Tqq1wLpdlxnjQRVQbjZ3xiqPCELDm5z/gzCfxwzakZ7cLxHWDaXyKf2igkgVa8Gp7sPXA8f9so7BP1VkhRAhO3wFM9s3qt4kEVmBx5SM5NfYOrYYQVzLONpFoR6EcSlczbe/qVvjWf46HoCvYSSWGlVT81dcmnYmrbDaZTFOXBbVZZoeYvxfOC/VnqOHcHExp04SFuD8O0fZSmlDaKKdV6MSPsZhvimOtp4Wddvew4IyjvSpFoc0OMigolF9TvibDhudpOXHQP3ArbuZa9xFJKHxSJ1IpPGoaVgyq9y++rJiBpPm/NsrpfIH8bsr6qXlk0PAhmnlMsFjfRyrBaTNwGUk+tdnV1vRW6+TTqkqvLxpnJzwDMWdg8xkNgJLEPal/OzzA5O8Xk9AQFoIzHWz7ABb+MvUSTJiJqVI/fpKiiq9rDJCD9Rb6UPb/kX4idjZxO4BEFHjQMGPZ/45xXVo6rvs6mH6nQSCQS7u3tvZ4C/3r6WGbnn7NH993LFdIY7lg+o7BDzs0QA2keBEA0mOhbdbbSlr6JvcQTGvKJGteuhJxvqx1JqlaT3lTJh2k5YV2vGFEDmLkZseXpsJWP+iD6S+XFunXrKqtpCUjo481wcE6vy0Z6+MjQN3g+t4cV4cTk8wzBJlgZYUq6iyldfdh2M5HuHlTaO79ItpoFidKtyK+rZVntMa0bYQ2mfdB5mDoN7Hs3LWOnbxLQMnxitvvdgoGBAXeH1q8DUAVq9Tp/7f8hOGbmn7czc3dy6kctj6qSTw0nRy/35HjzMZTewQt5S3JtgN8BECDbO2C2LsXhQutBHgeZvgnZv6PeSSIXzY8C4OtQ5jNULo2akDl040h4qG6fKtIZxMYGI/7Syc1t5fHEftYCorW0gu8tzAErrb0vMGtoN7P3PM/s4X2vYeHoLQF8h4B5JsB8Z3V0UGc6pASQX5Hy4JGFaqcmlUrFoEpp1ZcLrN8PKwzDINSSoG0bTrwdejhWd32GZU5zVf+S6IDqTLYz0Z52mcj1MBOtKSYSADcSZcrAyo9zXW8PoKsLxN8AuJ56H5DwvyCCfVrW/t1GZZAHi+u24JougNkCNiaxn6Rv0NxfKpUUhBscJ05t5Knae3f/j7N/zwTXveEpcoRUjVUGjmFfRTh2ttLde1YAWcP0MsibQPhstdqt+aiFgfPfwnYzOb6HeMLlOVMrcc1DOJz0Q0gOoyl9D4poSjq3TtyYs/e+sFkW8g+7A78EYi6LUGOOSd+WlkphZfWJ25SVq94a4NU4Qc7Pg0WvBXDj1Wq1JtDvA+t+hPMvr1cGmUGaPVAdVVBPwTQxthzNN0iF/ONOJrOJK8qEO1cFLHQnVjvywCRvx3olb2n7KQ+FVgRwLZwAxM3Y3H4YL/YbAPNtTRZpeHMTD9OKiqVHwLgJSZ8iQ7jhwO11xseZMzPNnOlpZo9PkLp9QwBicwmabwvYxGu7RWvYuXUxZR5+ihrNSy3mHnbXJdIDSZVqqmsTWcko52IxBZreEEDUtAc7iLzxICBqvpIFMH8Hn+UPRw5IyfYjJvwZb00yjpBDJFqYNK2ybdQ1F1Qej60X6XRvAFHzXbEAbEOto1PjzY5i+1jTLD/cBc7Y2HPO+BjnIW8eDkIchyvueCPN6ZQIRpV0+wX1PKwgLZjO9oawrKpuumpbKSnoh52UzZi/wzKSp1KPKitX5kRfHxP9A0xGEXYWCmClWc6FfCfU7RuPlRlwR1Gi8cczawP+6gxWfo8i+OUz0jTzcnx8V7VHxamDtrvLa0LSfbqS7ugPcFm0nUwCqBW1Tk71wDOONX8Mc3lAquo+3tGx3VWp7uw4gxk7d5BzU57qCEaKaPQKZUVnS8DHJcWUFyJvpyi8TixJ6WkA/gNsz18ekI5UuR4qL0GiB2k6C53xmvJybn9toOP0cEUJUFlal12nh0GpwSU55NFlq1Z7/76wMzLM3Fnj3iopu5j3VlVhY5i6duK6lOgOHNalJKjRpGVZbWBdboHLos18m0gsrMfZnUxwqzJiZRrMoQFlFCxJtdJXjTl/QwDJktMpAPGURmGIt/8ANvllMVL0Dz6LfODYsplqW+VZAMyd8mhwVTECPJaW6vXq1ElDyPRR+Ohy4siDBiaFqtBX0AMEjjCehzlPc3SUpTOSZoYXS7Kyypi2CD34MfpJzqM4Zet4swcdLm81lg0gZ2dYZaojfeUx1e5NfwzSkUq2bZ+E/HD1XxyonWbTDJCiMSFt5uQzyNlyLuSZzB3SeBx2yDcag7RIz/Vd/jINykv9TEtDetHKKRGJ2O4nxAgtw2Cl3c8wXVOY0urN5HBskwnFCeBYVir5Ix/+4L6/vxiyNNaTqsZEZ0/J7b0Jh5k9jrjUMtw5qw5iSWt+hqmxxEYRTfQF/axLTwCu0qtT7++Y4Li0bI9JWuZ11uhQD7Os8hJyeggApqXkxZ2/Wy8deYu7ejNIS04Aiv7C0MUN/jAMeazvYuUZHMvoENBCrxMtSfq+6GoocxXA6rTFqdPCq9Y9qMRbBgMolp2SAPMe5Pdjn9b1a56mpG/zfAH5ymbCD+79eYPEYS7e6cxM/tYc3hPS+lcZIpHciKbUF2Bw5JLHxl8j7waoDo7fhG2zyxCNZoH0n8YCe3hUpkUCGaQAyCAFQAYpADIAMkgBkEEKgAxSAGQAZABkAGSQAiCDFAAZpADI4xxI+qi593nHIB2jySIg6ftn9B1PEcjj2AXy/wUYACIPOMIobjzuAAAAAElFTkSuQmCC\\');width:100%;background-repeat: no-repeat;background-position: 15px 6px;\"></div><div class=\"mi_gradeselecthandlenerrow\"></div><div class=\"mi_gradeselectdigitsnerrow\" ' + (window.MI_defaults.RTL == 'true' ? 'style=\"direction:ltr!important;\"' : 'style=\"direction:ltr; LEFT: -4PX;TOP: 30PX;\"') + '><span style=\"font-size: 43px;z-index: 3;color: #92c83e;font-family: \\'Source Sans Pro\\', Alef!important;\"></span></div><div class=\"mi_gradeselecttext\" ' + (window.MI_defaults.RTL == 'true' ? 'style=\"top:77px;direction:rtl;color:#b8b8b8;\"' : 'style=\"top:77px;direction:ltr;color:#b8b8b8;\"') + '></div>',\n starspanel: {\n header: '<tr><td><div class=\"mi_hover_starspanel\" style=\"border-bottom: 1px solid #dfdfdf !important;padding-bottom:5px;width:387px;;overflow:hidden;border-top:1px solid #dfdfdf; padding-top: 20px;margin-top: -17px;background: #f7f7f7; /* Old browsers */background: -moz-linear-gradient(top, #f7f7f7 0%, #ffffff 100%); /* FF3.6+ */background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f7f7f7), color-stop(100%,#ffffff)); /* Chrome,Safari4+ */background: -webkit-linear-gradient(top, #f7f7f7 0%,#ffffff 100%); /* Chrome10+,Safari5.1+ */background: -o-linear-gradient(top, #f7f7f7 0%,#ffffff 100%); /* Opera 11.10+ */background: -ms-linear-gradient(top, #f7f7f7 0%,#ffffff 100%); /* IE10+ */background: linear-gradient(to bottom, #f7f7f7 0%,#ffffff 100%); /* W3C */filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=\\'#f7f7f7\\', endColorstr=\\'#ffffff\\',GradientType=0 ); /* IE6-9 */width: 396px;left: -5px;position: relative;\"><table style=\"position:relative\">',\n footer: '</tr></table></div></td></tr>'\n },\n tag: '<span onclick=\"jQuery.MidasInsight.tagClicked(\\'@@@kfid\\',\\'@@@atags\\')\" class=\"mi_tag_@@@atagsreplace mi_tag\">@@@atagscap</span>',\n slidercontainer: '<div id=\"mi_previewPhotosContainer_@@@kfid\" style=\"height:65px;cursor:default;-moz-user-select: none; -webkit-user-select: none; -ms-user-select:none; user-select:none;\" unselectable=\"on\" onselectstart=\"return false;\"><table class=\"mi_previewPhotosContainer\" style=\"\" cellspacing=\"0\"><tr>',\n photopreview: '<tr ><td id=\"mi_photopreview_@@@kfid\" onclick=\"jQuery(\\'.mi_thumbscontainer\\').hide();jQuery.MidasInsight.resize(\\'@@@kfid\\');jQuery.MidasInsight.MI_GetPhotos(\\'@@@kfid\\',false);\" colspan=\"2\" style=\"width: 100%;overflow: hidden;background-color:white;\"><div class=\"mi_thumbscontainer\" style=\"margin:0 auto;overflow:hidden;width:386px;padding-top: 3px;border-top: 1px solid rgba(0,0,0,0.2);\">',\n tabswrapper: {\n header: '<div style=\"width: 152px;margin: 0 auto;background: #fefefe; /* Old browsers */background: -moz-linear-gradient(top, #fefefe 0%, #eeeeee 100%); /* FF3.6+ */background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fefefe), color-stop(100%,#eeeeee)); /* Chrome,Safari4+ */background: -webkit-linear-gradient(top, #fefefe 0%,#eeeeee 100%); /* Chrome10+,Safari5.1+ */background: -o-linear-gradient(top, #fefefe 0%,#eeeeee 100%); /* Opera 11.10+ */background: -ms-linear-gradient(top, #fefefe 0%,#eeeeee 100%); /* IE10+ */background: linear-gradient(to bottom, #fefefe 0%,#eeeeee 100%); /* W3C */filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=\\'#fefefe\\', endColorstr=\\'#eeeeee\\',GradientType=0 ); /* IE6-9 */-webkit-border-radius: 15px;-moz-border-radius: 15px;border-radius: 15px;border: 1px solid #cbcbcb;padding: 5px;\">',\n footer: '</div>'\n },\n footer: {\n header: '<div class=\"mi_footerwrapper\" style=\"background-color:#fff;\"><div class=\"mi_footerroot\" style=\"top:2px;\"><div class=\"mi_footercontainer\" id=\"mi_footercontainer_@@@kfid\" style=\"height:100%;position:static;\">' +\n '<div class=\"mi_footer\" style=\"background-image:none;height:auto;margin-top:2px;\"><div onclick=\"jQuery(\\'#cpcnt_@@@kfid\\').find(\\'.MI_tab_selected\\').removeClass(\\'MI_tab_selected\\');jQuery(\\'#mipct_scroll_@@@kfid\\').addClass(\\'mi_blured\\');jQuery(\\'#mipct_tblabout_@@@kfid\\').css(\\'max-height\\',jQuery(\\'#mipct_scroll_@@@kfid\\').height()+1).css(\\'height\\',jQuery(\\'#mipct_scroll_@@@kfid\\').height()+1).css(\\'top\\',jQuery(\\'#mipct_scroll_@@@kfid\\').position().top).fadeIn();\" style=\"z-index: 1;position: absolute;right: 0px;top: 5px;height: 25px;width: 65px;cursor: pointer;\"></div>',\n share: '<div class=\"mi_footer_prompt\" style=\"color:#59a3e8;top:auto;border-top:none;position:static;float:left;margin-bottom:0;padding: 7px;\">@@@ask</div>' +\n '<div><ul class=\"mi_share-buttons\" style=\"padding:0;margin: -5px 0 0 0;\"><li><a onclick=\"window.MI_logUsage(\\'mail\\');\" href=\"mailto:?subject={1}&body={2}: {0}\" target=\"_blank\" title=\"Email\" ><div style=\"background-image: url(\\'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJgAAAAxCAYAAAAm0WAHAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjQxOTgzOUY2RjMxMjExRTQ4RDc1QkNENzc1ODE3OTkzIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjQxOTgzOUY3RjMxMjExRTQ4RDc1QkNENzc1ODE3OTkzIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NDE5ODM5RjRGMzEyMTFFNDhENzVCQ0Q3NzU4MTc5OTMiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NDE5ODM5RjVGMzEyMTFFNDhENzVCQ0Q3NzU4MTc5OTMiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5SFpoiAAAe+klEQVR42uxdeXBd1Xn/3r5ptWTJki3bsrzbeMcOm9kNCRCghKWEpFkIkFCSIaShpO1MOmkzmTZJZ2hT2gYCTKCUBEiAYQlJiMHYGLzIeMEL3hfJkmWt7+nt9/b3O+9e6erpbZKeRP7gzly9d5d3zvc73/6dc69suq7LJ9sn23htTuvB1q1bh91gs9nUJwUx/Tt3fjeE1I5Pv9Pp9GiaVm232+fgegP2MlzzYI/gei/2E7j+Ea6fSSQScVwPsUmzLeun2ddoNyuN5rFJL/ofhgv0uHE+gHM+fDZgb8K1GuwB/hx7GNfasB9OJpNHcD6Iz5jD4YhiF3wfMjbmZu0/34axKQgb6TfbtY6b0Qb54MZxJe6bjWszsFfikg97HOf7sJ8y+HAauGM43497EtYxs46XFZOF50O2VatW5Raw0WwgshSdVbnd7ktcLtfl+Gzw+Xx+bAGPx1OFcyUgzIl74gASjEQiZ/v7+0PhcDgUi8WOx+PxN/D5Du7pRHPBQphQzI0DBQy1GOhG0H416L0In9WBQMAGDCX4Xg5m+XHdhvtCwNANDB2hUKgPO5XkEATrZXwewPU+MunjsBTo2wcs5aD3PNB7JXDMBP0VwFECPkzCuVIoAZU/ST5Eo9Eu8gF7GONPIVuPzzfQRjuwdheLLptVEkdiwQiGVgrE3+H1ei+cNGlSTXl5eYNpGXIJikXT9J6enqOdnZ1nIHBvg3FP4/Qh/LZvIiwY+p+OcxeB/i9DKeYDQ3lpaWnJSDBAuPq6u7v3dHV1HQGGV4HhDfyuA8zUJsKCUbBwOB0YbgGGSysrK6dWVFQ04rqrUAz87O3tPQ0+dEDgtkL4nkS7u4Dh7Fgt2IgFDJ/U5EUAdCcEal1NTc10AAtkIz4b49M3MKevvb39CIC+ju+PY4D2WYWjmAIG+ivw/XJguB8YzgGGMiiKjBUDLNq+tra2Hfj8FQTtLTCoc7wEjG1BuGcAw19CKW6ora2dDYtVNVYMoDsOPrSAD+vx/RGcasYemxABo0/HoF1fUlLyjbq6usUA5hurlUnvJ4ittbX1g76+vv/AAL6O893FFDC0uRAYvlVWVnbzlClTKoFFiowhCav8ITC8AUEjg45QboopYLRacHlr4f6+CQxroCRVxeYDaE8Cw0cQtJ/DfT6DMWsdjYA5vv/97w8ctLS0ZO0QoKbBvz8ETblv6tSp82C1XByMYmWhJtGwJG4wn8nBCpjqSQC3ly5zLAJmYczlaP9hMOX6+vp6H7RfxgGDHWNTCwwLOGbA0A2hbgEdyUIELB8taHMS4qu7Jk+e/O1p06adxxhrnPhgBwYma6uBoRF82IPvZ3P9FmM6OgEDgFno8IcNDQ13ANgkSDPdpIxHQM522T4sSyX6XIKYoA6JwA701TMGAbOj3RsgUD8BU5ZVV1ebMdi4YYAQ+MCgucBSB5ffDwzH0Gd8LAKGdmswJn8DBb8bit7kYKA3vnwQ8MFHPgDDAgjaDmBoK6qAoSP6+X+bPn365xBAuoplivMNMgcNlsCDvhfAXE8Bg7aNVMhMAYMFUcIFDHMQAGc18eOAwQkLMwPCVg9F6TRKG4nRCBj4MBmM/h6U/CtVVVXVRllo3DFwAx8E4zcLGBaDD1uAob1QAbPnkeI6gPpHaMxnwRjbRDAm3VQjvvDA6twEOh4CPVNMocm0Z8FwMX77I2BoRFvyMWBwQzE/hZj1TsRN5+PYWYhSWHdgKIOQ3gMG3gE+VNANZ8JgU78vwp6BD7DGgjG8CGP5E9Azu9AxyGXBAjCRd8EU3w2XwqKdbaKr/hYNouWkBjFt3jmCWtNsYPgvYFgCrZ9Q4UrD4ASGabFYzA9X02zU/AoSMP4WbulahCYPINutS7dcvMdhZ9nCpoQDCMdMM9tSlRp9aEBPS4atCR7FgXPvo+/+fBYslzZdgCzxHjAmkJ5tfhxCBjoqkWDe29XVtR1Cs6GAtLscv2W2uJrCNRGuPY+79CK5uA6pfysys382Sxj5SgewFnOA4X4IV2O6cFEIYglN3j0UleYTUekMaaKNESN/7oSALZnmlsvn+yXggQXVh/CBGebnwYf3cO6plBgWOFVkAVUPaf1baD7jh4JrM+PJINBhAz1zwKAHsB+CVrfkYg7inbWIG74EzRe4pqJiSHcjYoyylbcmKeY5IzMrAYarYMk2AsNLwJDIhQE0l+M390IwVwK/3YqBVqsjmJRfbw3J+gNhOYPv0bguYw33dcPVbjkakbMQ2C9+qlQJsm4IGQN/CHsF6H8QgrYNGD4ckYChESYn1yFeWeP3+9X8WrYBVma82MJkTt+k6QXSZGY0jAXWIptZi3ueRf96lsp0DTDcj3ClJBcGu0G/lqG/jK7DZinWGsJjM4Ifm6TaG0KLan+wbWIA/SyI3goGvYNT7Xms3gpgvga724qB3cSTurywPSTPbe+TKWVOuf3cEplR5VR0jMWG8fd7W+Pywo6gvLm3X5ZMdcuqmR5JaAMzF8IxhXwsAh9uxvG/gM7wSASsnloDU+jLpr0caFhmSeJPsZ0O23Y6UnFFUhueOoOuir6+vq8jlnkL2tOaScBw36XAcMmkSZNy9kX3wnFzoz/2m0vITOE6dCYmGw9F5MOWuHT1J0GnTaZWOGXldLec1+SVUo9djnclZPPhiFT67bKm0SvlPru1bQ8swHLEk+vAoGezlS44FQcMrHdNS3ftDtC792RcNoOOxmqX3HdpuSyod4vLXoTxR9uL6hNyuCMu+07HZXdLVM5t9AwTfo4t+PA17M9hXPYUJGCsDeHmCyGhMwFuWNxlWq7jZxPyxt6wbD8Wld6INqDBY/f9CBTBrEvne+XCJp/4XDZJ6kOBwe1xEvocMGcZTrVmyNrKYb2+AK23cfonU9zFGOODk1F5ZkufnA3q8hcr/HLlAr/qP5HBk/J8BM7s1V1BefGDfmnvTSrFshtZ10kI1DaMxe8/DMu0SofsAPM7Q0l1/Uwf3Mx5JaJrKYxUEtDPuuI1wPAKmunKEos1IkxZg92ZiQ9toKEHY3/D8oAsbXAb5Ri9KC6kMmCX2TUu2XkyJn1hfRhzSY/b7SaOWijKlTg+gP7jeQUM5o6rB26B+SvJlHGRMc0nYvLohl45BAn3QWUcNsOuFgFbBPvulpjsPhWT/dCev4L/D3iZpg+9D66vFIHyTYhlNkApgmnNzEDMdQnT6kwYyBwqxfPbg7LpYFS8EOLH3ukTN7BdPM+rrGciMZiLOVQgLbg/JP/7fhDfdZlb65KL53plXo0b8V1KwDZ8FFEM2Qu6fW4b3JZDWnuSsr8tBiFOSoV/iBVzAEMTrPB8uM3NVldv0OwChhtwz+SMma9uuHVmdi6Oj54xrBhWMrCLsrgDAqPTS+hDPAUvJSCoVCoxs9Is2TfG2NHT03ML3P3/cdlPXgFDI5Oh/RdwqUom4k73poLK/W1xaLxPPrPYJ1PKnUOC2bEEzgS2A0wiM1/bHZZaxBY3nxtQA2hlAOhzQhHWxePxKq7JspKJ61eBObglkLEfFwZ456moHDyTUBnSjcsC8v7RqDz8Zq/0RjW5ArjK6NKSqcGny9gE4fltc0gF0Z9Z7Jfb15RIbaljICBeOMUl58/yyvr9ETkIxVuDmKWtNyGPbQzKYfSzCwpzyXyfam8gxS0vn9fe3n4NlKQZzIlYvQgwBIDhWk4D5YqVVPyoFTb2KUXRlVuPJwdDkQCUgUqWyaOY/WSLEWHBbKBzBZUae34Bg3AthQtymstV0v0+XeIe+OR6CNW6hT5ZMsOT0qZkMSZZsaOPGmg+0+1H3uqV5uNRuXiORyaDmUO0DDdDwLwwzyz4HbM0w4WClzAItS7ISy8tH4OL7+7XEL845dolfhVj/DsEjH0ebI/L9UsD0gBX5/c5pA+u7l3EOi3dSbkMrvtWCHxdhSNl5XQj6wLtFNZPn+MDQ3xyoisJoY1AQRyI2eJyFP2l0kpricFeBuaQfpdhvK34piJrrMjEh9FsFK6+qC6v7+qXV7C3wlD43HbEiDa5CS523UK/uJ3DY9789TI7a2M6+HAuaN4ixqR+riB/NRfZZTTLGKDWngTciy4h+Iyn3gsqjVyO4JZmN54YfYmP40jLchZa/4e9EcQ5IaVdFDS6GbqbRFpxkYsa4SZXI6Z5yyy84rsXTFuaLfYytxBcZBT0VpU41MCumOGW+68oV5je3BeW945EYaG9ctFsr7LadHulPpucN8sj06ocEosOTW5UbGUwMpFMTY+safSoOKkzZJeZyO50y4S0pXA5Gcwp4wpTy6ICMm4FrJffPM4UJw2Otm5pN4viYoA3HwrLk5uDKuFYWOdW3iIU11Q2qumGsuiD5Qizfd1oONt4AoMXhmkNXP0TOAzms2CLYBlc2dZh0bTGIVQcsAPQ9B/9rkduWxWAW/EiMMTAx0cuZE57ijH7WmPyXHM/3ExUKsDMagSaHAQKbqYNljYAOhdwKoZhg3GaaSOzL8m6lgz88rqYOUKroSwUCBK9qN4p37myTF7bE5ZNsFi/aQ7Lb3b0K4acDWoyY5JDWS7+PhtGWoBU9qvJq3Dx247H5Y41AbhMt7J4GZjDhKQJse8pi4A58H0+VwMXKyuPQiGOdSakP6aDHp98bkUA2DVV5yrxpDLoQes1Mg4y2IdCLGQhOa+A4aZZLEpmnlJRFSrFkE8j9uLl57b3yyNv9ykXcP0yv8ytcSqNKNTUup02FddsOsyMLqSElvELtX/rsZi09CQGNHRYwgE6yRyuozenLMAcLvOxZ8eQKkVUw3KVeu1ytCOhCpR15XYlAHQZn18dkAtmuWXzkZiKNZkxEnOJx64SAdGyazOVpT8m8hqyyfdhBW9Y6pdrMVZOhwyJv0wrDCHiOvkmtPeODK4Zc2Jv4pr6rLMPlqqunsWC8SsTMKfTZrhyZODgNt22B0LlQYJWXWJXcZlpwcw2rH3qup7TgnGs+eyFoeh562BVrNTmnABnDQTW6sqFXqlBbESr89LOsBKyW1b65VNwIy4giyf1nPGWB8AZ17y+h5YiDMuoyXVLfHIrtCsA5m8/HsupTEZJpRq7w1L9ruVxrtiFt/bHNDWw/RDuF0F/NWLpmlK7UaKghXapNJ1aTlynulmWsKm6VkLLPVFNHHTtTZNdKgli9phtLDDWXFlbw3leE4OBpzofHwqJu8KwWIehRPQ8XSFNYSeWw1DkCK7RelWBl1SA0SZpxlgzrHIVkkW6s64tslBgjtdl8z1K+1/6ICx/RAb18J/6YIqTcpUSPjvinMGpB7MJh+ESKUCsKW04GEUbDrlxaYnKTMuhVafOJgsF5pWhK0LKUgV1W04BO92jSU9YlwV1LhVbMbas9LvUJC9pZBhAprAAuwAZ4uJ612CIkMy9/opuPQjBpBtm0TWhYihbNoFkMdtnrI5IGud4cyDnGq8ChIG0H+qOy49/36dcIEszxMdaHecuKfSrEHt+boU/pTijFDCDTpvBi7wWTDdXR2aqvQwRNuzUgnm1Lrl7rUPqEZ88/X6\\/\\/PK9kMrSbljqk8VTXco1mN7BBatFq7D+QFTFN0chSLMnO+VrF5XIKiQLnI5IJvShZl8yL9E1HxFLx2usuc++ckIXpbkeIKfL4ACrgq6mDyvnaSpDTglWphmDTPFOBFaRicH0SqcS3lSJJesaL7al57iWsS8zGB8I+DO4SM2oj3qAzS5G/Qs301oRuypT2AdDn3QXaY2mc61CyTfHmy5g0Uzzdrkmrsx5vGAkRXwSVusP+yJyEqn6ZfM8CJ5dSkOoMSdhnpmhvXUgBvekpSrnyZSgaiMMLw1gYWiQZtGm7tSl7KAZHzZCqJlB7mtLyHEEv+fDrUcThc1H5qpLcWOdie5odaNDJRKRHOOPsSb9fB5Rs1gsUhEc6+Q8kyN6hgeuKMV3kRcRxrwJL3PFfJ9cPNej3CdrYH53brdfCB8gfFp6qSWbgJ1F0Dw1mwXTDYdnBn4UEPr0p97rV8Q3Iru8cblP1X5e2R2Vx99NyHSk9XQVtBDtfRqELCFN1S65a3lATnQl4CYj8rO3+qQDTPn0Io/YHdYAdlB70unhxDHOdZiuxdhO4RiXEp5sWsfBXoyMsRF0UQleQPxXD0aw7hVL6mOIRVIxDyeKWbicCyFOJHOvP4vH43zouAPuXrNkkUk+m2jgy27BRB9mXay3MoxhnNs02aESqXJvyv1PRgjSUO2QZCylUPQaVlnW9YEOhpRBsuEw6AwWNFXEJ5ZjsdiSfOumbEbB8gAG88nNIVilmIpnvnp+iayc7kJ84wYT3bLlWCoTY7bmQk91yGDWLSxRvn9BrVOCUU1lZ89s6Zcn3w3id0m5bZU/tdjNlnv5DuikBTjEOWvLpZPUpmg0qmb8syUpLIMwAGe8yFiQmfBnkWAsgUtn/W00QkYX1BVKygbEN9WIPxfVOYdljukY+PAxMVjdJBWE54AhHggEXGOxYsQaBdtpnc0QQK2KwHE0UZxlChxr0HwcAhYrZC5ydyQSuTbjsl5LKMH0t/lYXH6+MSh7WlKlhS+fnypTROD6/DC9a2e7laXoDSNjM6YmGOtUBexqro7BMj9vXOZV2vX45n55dms/rIDIJXPdMiBjWSwYmBODtvOJo6jFRfbgHJ+8Ls2lJJxbpCJMRdx4HFasq19TlX1+MnUXfWTuWtWRgHHnqbicgNBevcgLF2xTFizXBgwY8uQxa80O1owW+QCfuq6srKzIVM/T9KGBWK5C60DxNBWh5i07DJQp0mOyLPdjrGl19+B6uBAXuQWgdfOJkvRGecQ4i1pKd3cAMcxVC7xy+7l+aZjkUFqhG1NHtPi0FFUB54AxMk0yA+FUPKQLQgBZt8AjpRCyRzemSh5MrZkMpJYAZ9Z+AsMnH0BIWgQsAtqbgaEhG4bBbFaXOTUO+eCUDZZUpB7WlcJvzzTfkbdYbJMzQU1+i2yatTTGnvmsIOmCe+k03Et6XLODlsHE8Oe6kT5DwLZAMfozKl8a6A8Aupc/ylg9hwXyu+yy9XhcWnqScstKn9x5AYUrVbAbmJowxovBI4UuYuyxZMrvWx8w4M9soOKi2R759uUlMhtWcA9c7xFkorR43PW0tJj0gc4OfD+YRiJBvoJrejYMZo2Ifa+b75U5iFE4pfPs9rDK/sSWecVqVuFypDC+sjuirOHaOR4V32l56mWwUP2gc2P6unZDIfhiksNQlD9b4TL5gDiSL1N5L1s2nG7BOgD6j729vbcwhrH+htXsmZWs/tqktVeT21ZyysEnlbBSsYQ+ptUUKnEF05c3kByfPLIhJPtOp+Ygp1Zwykgb0j7oI7AXQd+ZdMMA4OvhdoJ9fX2l6RhMd0Y3zCyrxCPIqjzS2qOpeJFTJ5fNc8vKBrfUoV9bAcLFrJRZMS3vPMSV1yz2FrR0pgcbxvoVaH44A/P6cO03wLkUGBxZyxTGilnl8vK4SEmbu8zlIjV9cA2YnqNMgTGmom8ChmMFlSlwYwia8zyU6xYG0VyPPxi36LKswaUCdGor59nKfVz3ZBdt5FNYGQugyaRNdiGmO9mlKcE6f5YLbtY+JCCFYFH7MQb6y+lm2RiEVmB4PRQK3ZyOIbXkSIMwRGUfkg9mWcz8QrHUylYG/a8i+w3h3LUQlDKvLaOgcOxdYDtjy42HYvKLTf0yyW+XL6724dOWmt/MsYEuWtiDoPdguns0jhPA8Cos2IPAyzV6GRXFLLuYa+Y1vVjWKf9yHYMPdI/P53ri25lBe97hGiUo2HI+MDGwDBkfrJvctNyrhG0rsq+nt4SVYGWLlUa06YPpPoX22nM8EDD3gOs1Bx90kUF/wvftGaZelGKB5sdwz024127FQIFaD2vz8q6IKrFU+FMumJaSrn9erUPOQ5+z4Ta5uiOdYTbDatG2dSJ5eXM/51DDShDvutCvLFhCyz0WxNDd3c1XVz2e7QFW476DuOcl3Ht7TU3NsCC/BmNEBW8+GZfVjW6ZVZVaGZLeOcs+g0XVVIXfxvqXnrk8wGp/byQpp7oT6t4y7/CsmhjoRRAnHsfhG0YdrGABa4FU/gwN/E9JSYmd728wGcSK9pRSm9xzoU+aT7hkd2tqhr4YT64bz0go4Vo1wyVN1Y4hD2OYPh90xeECH8v1CDvu3QYMr+De60pLS8VcvmOT1FQPk4wyn8j8WlhkZJOzqp3YHcoqMXZin0kzqzPW4qeWU3PBnq5mIF7eFZUtULKZlU758nleWTrNOWTWIlfcEgwG94O+N1n/ynFvL+55FBg+y1dKDeWDLrNB7/kQrF83h+WRt0Jy1UKPGrt0Z8KMn5a2I0j8NlX7238iJuFEZstMvHtPJ2TbibjUBFLlloQ2GKJY+ED3+HNgOJLTGlpN77Zt2wYmjXH+ibKysqvr6uqGLX2xWwL58djMLNkKiv23tbVR+5/H8b043ZZlftLcLsIAvMQnoadMmTIgJKzeP9eccvEUtIUYwAua3DIPGSWX5tBKp6ZSbErAqVRh3McFe5ycf/9YXK20YN3rXM7lLfPITFiPpJ57wtjE0Nra2gfm3IvjpwoILPhik38qLy\\/\\/FjFYF1Gm5hd1eXFnRDYcjCGL1XPW3TTDhdptg+41432SUjIul6IXuRkeS2ymARjCh9249SaWVMzf5n190/bt263xzOVo8Jnq6urJfIIkW1A4Ho+tZXErcubMGVrXW+nGC2jKD0v3d3Cb36ObrKysTD1fCSFrC2qy/qOYbIewHOnkuqikWr7TVMU5VbuK+9TafE5cRzWl/UdgtViK4MDThTI+ZObrdw+fq8wmYF1dXcTwNDA8gOO2bOWLtOMFwPBCVVXVfPPpdKuiU2h2tyRUDY70JbQsPDEy43zJmGbMACyd6lQYXU7bEEU3+NCLsb0Hp56x/javgFksGDcfGvkm3MsPEAO46Gom+tF78/F5uBRqTT9ikgf5KgAZXGCYb+K1AfsTCPQvq62tVc9VcvLZbtPVkiJOc+04lZCP2hMqM+4M6WoRYiSRWtNGYfTCopVxWUuJXSUenIFYhmy30mc3VoOOCMNuxC2fhyXaOcKhuMnpdPIVCNXp7zOzyeDDHPYiajvDASYrusU7IHGS06dPM/b6CfjwA9DQk0/AnDm0J4xGfwGmzoHEfpUdmA9STISQmYwhKPSfBB2PgoZnOJUygjZO4Df347dPtbe3n8P2iIHkMzOtZTJR6YGguFWpoq1Pk+5wqhCsBAwxGWclWDDmNFdNqU0FwbECp1qsGNA/p+G+OwrhYhuvIWv7KcbhH7jExypkulFvTGj6uPKBGSMwMMHiE+kPpwtXQTFYpjccYuODnz+FJbuZrobgxtuSWbW+o6ODQeUvcfxdyfLkSq52jPeArcX+nwiUF/HdYOkYzBeIOGzD40sz/afAJfXClcuKAYJxClr/XUNBRjtwfKvO34MP94EP7onkgylcwMDnH+5Gn/sz3T+qNxyyrolGNyNgnhwOh5cYS31lvN4GbQaS9PVnz57VAeoJnPt7kjeatoyN8307YQWWA0NdJgymENEaxJODu3qCXRtZjSkNw1Fo/UMQrl+NYhZqyLQf2t0KPtiAYSVLccRQrCePsmFgWQgKQuH6Hdzifbi0L9tvRvUCOouQbeLMLKzJMq6DZwGT67GL5TJNbeEcHJhC5rDSzfce/HCkliu9TWM7Dma8DwgzwaDZXGYyXhiYxnd2dpI52yHU30G/L4xRuAbCFrT/HjCcRR9LgIGPvg0Uk4vNB2IAH5LAwJrdg7j8Ua7fZhKwQlyktXMu72Vq+hC0ZyHNNIP/sQC0/BMEVVuhSwG4D3Dqh7jG6aDoWAcr7S3PM+Euv4FzX+fbbkh/sTCwum1gYMzIV7L/GNd25coSR4mLHfKR/e+53e6LjZfCFI0PnALibhRS/xXXnkabXfleLT+qt0xnIgK/WYj9SzCZdwJUJV9MxuCZxcCRmGxmfdQUBsH082BQB7Tzv1kjwr5vrAzJ8Z58L74zLvtr0Hud8Z4FtY8GAy0W6ecOwdrEeA9tvIZ+OtNDiWJaGbTViL5uQ1/3AMP00fLBXJ1i4QPXETE0edScMSnkv68UU8BMa8bnEm8GmNshbNNprhkXcKc2cerGePonNW+WTKqdmk7B4s6VDzh3FANFoXoB+15arYn4Rwz4rMXplej7Kzj+DOj15cJgrvfPgIGzC2/jGpOR9diPpTNlnARMhTn4nIv9OtD5BT7bCgy2QvnA+Vpi4Hec6wCGZ3HL07h/t/WB4I9DwAbe3IdTdSBsOY6vBJiLcW6m8fiV3TDnqRpfatOMyVz+v5+3AeR3OOZrMVtwLTaR/6vIgmMSdi4VvxC3XY1ra3C+3KA/HYNmYOC6+R3Y1+P773HL0fTi6QQJmNkPJ2Lr6V1A0xXgwyXAMZ/JgIkjnQ9cbo6dxeuNOM\\/\\/ScAXLXPZeSgTHz4uAbMOng/HXE1ayocx+dJeptec8pDU/yGiyziN6yf50hJqCJerZPqnThMsYNY+y7EHQHsljqfzhTDY+Tic01i7dQa/Pc5/imX8Iy9OricyZdUTLGAD10C7h3zAJ/8tDstMdVQigw9cHtTNN0TyH5MZfOET2aH08S+6gH2yfbIVe7N/MgSfbOO5/b8AAwDCB5vdkkgX5QAAAABJRU5ErkJggg==\\');height:50px;width:50px;height: 30px;width: 30px;background-size: cover;\"></div></a></li><li><a onclick=\"window.MI_logUsage(\\'share\\');\" href=\"https://www.facebook.com/sharer/sharer.php?u={0}\" target=\"_blank\"><div style=\"background-image: url(\\'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJgAAAAxCAYAAAAm0WAHAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjQxOTgzOUY2RjMxMjExRTQ4RDc1QkNENzc1ODE3OTkzIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjQxOTgzOUY3RjMxMjExRTQ4RDc1QkNENzc1ODE3OTkzIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NDE5ODM5RjRGMzEyMTFFNDhENzVCQ0Q3NzU4MTc5OTMiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NDE5ODM5RjVGMzEyMTFFNDhENzVCQ0Q3NzU4MTc5OTMiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5SFpoiAAAe+klEQVR42uxdeXBd1Xn/3r5ptWTJki3bsrzbeMcOm9kNCRCghKWEpFkIkFCSIaShpO1MOmkzmTZJZ2hT2gYCTKCUBEiAYQlJiMHYGLzIeMEL3hfJkmWt7+nt9/b3O+9e6erpbZKeRP7gzly9d5d3zvc73/6dc69suq7LJ9sn23htTuvB1q1bh91gs9nUJwUx/Tt3fjeE1I5Pv9Pp9GiaVm232+fgegP2MlzzYI/gei/2E7j+Ea6fSSQScVwPsUmzLeun2ddoNyuN5rFJL/ofhgv0uHE+gHM+fDZgb8K1GuwB/hx7GNfasB9OJpNHcD6Iz5jD4YhiF3wfMjbmZu0/34axKQgb6TfbtY6b0Qb54MZxJe6bjWszsFfikg97HOf7sJ8y+HAauGM43497EtYxs46XFZOF50O2VatW5Raw0WwgshSdVbnd7ktcLtfl+Gzw+Xx+bAGPx1OFcyUgzIl74gASjEQiZ/v7+0PhcDgUi8WOx+PxN/D5Du7pRHPBQphQzI0DBQy1GOhG0H416L0In9WBQMAGDCX4Xg5m+XHdhvtCwNANDB2hUKgPO5XkEATrZXwewPU+MunjsBTo2wcs5aD3PNB7JXDMBP0VwFECPkzCuVIoAZU/ST5Eo9Eu8gF7GONPIVuPzzfQRjuwdheLLptVEkdiwQiGVgrE3+H1ei+cNGlSTXl5eYNpGXIJikXT9J6enqOdnZ1nIHBvg3FP4/Qh/LZvIiwY+p+OcxeB/i9DKeYDQ3lpaWnJSDBAuPq6u7v3dHV1HQGGV4HhDfyuA8zUJsKCUbBwOB0YbgGGSysrK6dWVFQ04rqrUAz87O3tPQ0+dEDgtkL4nkS7u4Dh7Fgt2IgFDJ/U5EUAdCcEal1NTc10AAtkIz4b49M3MKevvb39CIC+ju+PY4D2WYWjmAIG+ivw/XJguB8YzgGGMiiKjBUDLNq+tra2Hfj8FQTtLTCoc7wEjG1BuGcAw19CKW6ora2dDYtVNVYMoDsOPrSAD+vx/RGcasYemxABo0/HoF1fUlLyjbq6usUA5hurlUnvJ4ittbX1g76+vv/AAL6O893FFDC0uRAYvlVWVnbzlClTKoFFiowhCav8ITC8AUEjg45QboopYLRacHlr4f6+CQxroCRVxeYDaE8Cw0cQtJ/DfT6DMWsdjYA5vv/97w8ctLS0ZO0QoKbBvz8ETblv6tSp82C1XByMYmWhJtGwJG4wn8nBCpjqSQC3ly5zLAJmYczlaP9hMOX6+vp6H7RfxgGDHWNTCwwLOGbA0A2hbgEdyUIELB8taHMS4qu7Jk+e/O1p06adxxhrnPhgBwYma6uBoRF82IPvZ3P9FmM6OgEDgFno8IcNDQ13ANgkSDPdpIxHQM522T4sSyX6XIKYoA6JwA701TMGAbOj3RsgUD8BU5ZVV1ebMdi4YYAQ+MCgucBSB5ffDwzH0Gd8LAKGdmswJn8DBb8bit7kYKA3vnwQ8MFHPgDDAgjaDmBoK6qAoSP6+X+bPn365xBAuoplivMNMgcNlsCDvhfAXE8Bg7aNVMhMAYMFUcIFDHMQAGc18eOAwQkLMwPCVg9F6TRKG4nRCBj4MBmM/h6U/CtVVVXVRllo3DFwAx8E4zcLGBaDD1uAob1QAbPnkeI6gPpHaMxnwRjbRDAm3VQjvvDA6twEOh4CPVNMocm0Z8FwMX77I2BoRFvyMWBwQzE/hZj1TsRN5+PYWYhSWHdgKIOQ3gMG3gE+VNANZ8JgU78vwp6BD7DGgjG8CGP5E9Azu9AxyGXBAjCRd8EU3w2XwqKdbaKr/hYNouWkBjFt3jmCWtNsYPgvYFgCrZ9Q4UrD4ASGabFYzA9X02zU/AoSMP4WbulahCYPINutS7dcvMdhZ9nCpoQDCMdMM9tSlRp9aEBPS4atCR7FgXPvo+/+fBYslzZdgCzxHjAmkJ5tfhxCBjoqkWDe29XVtR1Cs6GAtLscv2W2uJrCNRGuPY+79CK5uA6pfysys382Sxj5SgewFnOA4X4IV2O6cFEIYglN3j0UleYTUekMaaKNESN/7oSALZnmlsvn+yXggQXVh/CBGebnwYf3cO6plBgWOFVkAVUPaf1baD7jh4JrM+PJINBhAz1zwKAHsB+CVrfkYg7inbWIG74EzRe4pqJiSHcjYoyylbcmKeY5IzMrAYarYMk2AsNLwJDIhQE0l+M390IwVwK/3YqBVqsjmJRfbw3J+gNhOYPv0bguYw33dcPVbjkakbMQ2C9+qlQJsm4IGQN/CHsF6H8QgrYNGD4ckYChESYn1yFeWeP3+9X8WrYBVma82MJkTt+k6QXSZGY0jAXWIptZi3ueRf96lsp0DTDcj3ClJBcGu0G/lqG/jK7DZinWGsJjM4Ifm6TaG0KLan+wbWIA/SyI3goGvYNT7Xms3gpgvga724qB3cSTurywPSTPbe+TKWVOuf3cEplR5VR0jMWG8fd7W+Pywo6gvLm3X5ZMdcuqmR5JaAMzF8IxhXwsAh9uxvG/gM7wSASsnloDU+jLpr0caFhmSeJPsZ0O23Y6UnFFUhueOoOuir6+vq8jlnkL2tOaScBw36XAcMmkSZNy9kX3wnFzoz/2m0vITOE6dCYmGw9F5MOWuHT1J0GnTaZWOGXldLec1+SVUo9djnclZPPhiFT67bKm0SvlPru1bQ8swHLEk+vAoGezlS44FQcMrHdNS3ftDtC792RcNoOOxmqX3HdpuSyod4vLXoTxR9uL6hNyuCMu+07HZXdLVM5t9AwTfo4t+PA17M9hXPYUJGCsDeHmCyGhMwFuWNxlWq7jZxPyxt6wbD8Wld6INqDBY/f9CBTBrEvne+XCJp/4XDZJ6kOBwe1xEvocMGcZTrVmyNrKYb2+AK23cfonU9zFGOODk1F5ZkufnA3q8hcr/HLlAr/qP5HBk/J8BM7s1V1BefGDfmnvTSrFshtZ10kI1DaMxe8/DMu0SofsAPM7Q0l1/Uwf3Mx5JaJrKYxUEtDPuuI1wPAKmunKEos1IkxZg92ZiQ9toKEHY3/D8oAsbXAb5Ri9KC6kMmCX2TUu2XkyJn1hfRhzSY/b7SaOWijKlTg+gP7jeQUM5o6rB26B+SvJlHGRMc0nYvLohl45BAn3QWUcNsOuFgFbBPvulpjsPhWT/dCev4L/D3iZpg+9D66vFIHyTYhlNkApgmnNzEDMdQnT6kwYyBwqxfPbg7LpYFS8EOLH3ukTN7BdPM+rrGciMZiLOVQgLbg/JP/7fhDfdZlb65KL53plXo0b8V1KwDZ8FFEM2Qu6fW4b3JZDWnuSsr8tBiFOSoV/iBVzAEMTrPB8uM3NVldv0OwChhtwz+SMma9uuHVmdi6Oj54xrBhWMrCLsrgDAqPTS+hDPAUvJSCoVCoxs9Is2TfG2NHT03ML3P3/cdlPXgFDI5Oh/RdwqUom4k73poLK/W1xaLxPPrPYJ1PKnUOC2bEEzgS2A0wiM1/bHZZaxBY3nxtQA2hlAOhzQhHWxePxKq7JspKJ61eBObglkLEfFwZ456moHDyTUBnSjcsC8v7RqDz8Zq/0RjW5ArjK6NKSqcGny9gE4fltc0gF0Z9Z7Jfb15RIbaljICBeOMUl58/yyvr9ETkIxVuDmKWtNyGPbQzKYfSzCwpzyXyfam8gxS0vn9fe3n4NlKQZzIlYvQgwBIDhWk4D5YqVVPyoFTb2KUXRlVuPJwdDkQCUgUqWyaOY/WSLEWHBbKBzBZUae34Bg3AthQtymstV0v0+XeIe+OR6CNW6hT5ZMsOT0qZkMSZZsaOPGmg+0+1H3uqV5uNRuXiORyaDmUO0DDdDwLwwzyz4HbM0w4WClzAItS7ISy8tH4OL7+7XEL845dolfhVj/DsEjH0ebI/L9UsD0gBX5/c5pA+u7l3EOi3dSbkMrvtWCHxdhSNl5XQj6wLtFNZPn+MDQ3xyoisJoY1AQRyI2eJyFP2l0kpricFeBuaQfpdhvK34piJrrMjEh9FsFK6+qC6v7+qXV7C3wlD43HbEiDa5CS523UK/uJ3DY9789TI7a2M6+HAuaN4ixqR+riB/NRfZZTTLGKDWngTciy4h+Iyn3gsqjVyO4JZmN54YfYmP40jLchZa/4e9EcQ5IaVdFDS6GbqbRFpxkYsa4SZXI6Z5yyy84rsXTFuaLfYytxBcZBT0VpU41MCumOGW+68oV5je3BeW945EYaG9ctFsr7LadHulPpucN8sj06ocEosOTW5UbGUwMpFMTY+safSoOKkzZJeZyO50y4S0pXA5Gcwp4wpTy6ICMm4FrJffPM4UJw2Otm5pN4viYoA3HwrLk5uDKuFYWOdW3iIU11Q2qumGsuiD5Qizfd1oONt4AoMXhmkNXP0TOAzms2CLYBlc2dZh0bTGIVQcsAPQ9B/9rkduWxWAW/EiMMTAx0cuZE57ijH7WmPyXHM/3ExUKsDMagSaHAQKbqYNljYAOhdwKoZhg3GaaSOzL8m6lgz88rqYOUKroSwUCBK9qN4p37myTF7bE5ZNsFi/aQ7Lb3b0K4acDWoyY5JDWS7+PhtGWoBU9qvJq3Dx247H5Y41AbhMt7J4GZjDhKQJse8pi4A58H0+VwMXKyuPQiGOdSakP6aDHp98bkUA2DVV5yrxpDLoQes1Mg4y2IdCLGQhOa+A4aZZLEpmnlJRFSrFkE8j9uLl57b3yyNv9ykXcP0yv8ytcSqNKNTUup02FddsOsyMLqSElvELtX/rsZi09CQGNHRYwgE6yRyuozenLMAcLvOxZ8eQKkVUw3KVeu1ytCOhCpR15XYlAHQZn18dkAtmuWXzkZiKNZkxEnOJx64SAdGyazOVpT8m8hqyyfdhBW9Y6pdrMVZOhwyJv0wrDCHiOvkmtPeODK4Zc2Jv4pr6rLMPlqqunsWC8SsTMKfTZrhyZODgNt22B0LlQYJWXWJXcZlpwcw2rH3qup7TgnGs+eyFoeh562BVrNTmnABnDQTW6sqFXqlBbESr89LOsBKyW1b65VNwIy4giyf1nPGWB8AZ17y+h5YiDMuoyXVLfHIrtCsA5m8/HsupTEZJpRq7w1L9ruVxrtiFt/bHNDWw/RDuF0F/NWLpmlK7UaKghXapNJ1aTlynulmWsKm6VkLLPVFNHHTtTZNdKgli9phtLDDWXFlbw3leE4OBpzofHwqJu8KwWIehRPQ8XSFNYSeWw1DkCK7RelWBl1SA0SZpxlgzrHIVkkW6s64tslBgjtdl8z1K+1/6ICx/RAb18J/6YIqTcpUSPjvinMGpB7MJh+ESKUCsKW04GEUbDrlxaYnKTMuhVafOJgsF5pWhK0LKUgV1W04BO92jSU9YlwV1LhVbMbas9LvUJC9pZBhAprAAuwAZ4uJ612CIkMy9/opuPQjBpBtm0TWhYihbNoFkMdtnrI5IGud4cyDnGq8ChIG0H+qOy49/36dcIEszxMdaHecuKfSrEHt+boU/pTijFDCDTpvBi7wWTDdXR2aqvQwRNuzUgnm1Lrl7rUPqEZ88/X6\\/\\/PK9kMrSbljqk8VTXco1mN7BBatFq7D+QFTFN0chSLMnO+VrF5XIKiQLnI5IJvShZl8yL9E1HxFLx2usuc++ckIXpbkeIKfL4ACrgq6mDyvnaSpDTglWphmDTPFOBFaRicH0SqcS3lSJJesaL7al57iWsS8zGB8I+DO4SM2oj3qAzS5G/Qs301oRuypT2AdDn3QXaY2mc61CyTfHmy5g0Uzzdrkmrsx5vGAkRXwSVusP+yJyEqn6ZfM8CJ5dSkOoMSdhnpmhvXUgBvekpSrnyZSgaiMMLw1gYWiQZtGm7tSl7KAZHzZCqJlB7mtLyHEEv+fDrUcThc1H5qpLcWOdie5odaNDJRKRHOOPsSb9fB5Rs1gsUhEc6+Q8kyN6hgeuKMV3kRcRxrwJL3PFfJ9cPNej3CdrYH53brdfCB8gfFp6qSWbgJ1F0Dw1mwXTDYdnBn4UEPr0p97rV8Q3Iru8cblP1X5e2R2Vx99NyHSk9XQVtBDtfRqELCFN1S65a3lATnQl4CYj8rO3+qQDTPn0Io/YHdYAdlB70unhxDHOdZiuxdhO4RiXEp5sWsfBXoyMsRF0UQleQPxXD0aw7hVL6mOIRVIxDyeKWbicCyFOJHOvP4vH43zouAPuXrNkkUk+m2jgy27BRB9mXay3MoxhnNs02aESqXJvyv1PRgjSUO2QZCylUPQaVlnW9YEOhpRBsuEw6AwWNFXEJ5ZjsdiSfOumbEbB8gAG88nNIVilmIpnvnp+iayc7kJ84wYT3bLlWCoTY7bmQk91yGDWLSxRvn9BrVOCUU1lZ89s6Zcn3w3id0m5bZU/tdjNlnv5DuikBTjEOWvLpZPUpmg0qmb8syUpLIMwAGe8yFiQmfBnkWAsgUtn/W00QkYX1BVKygbEN9WIPxfVOYdljukY+PAxMVjdJBWE54AhHggEXGOxYsQaBdtpnc0QQK2KwHE0UZxlChxr0HwcAhYrZC5ydyQSuTbjsl5LKMH0t/lYXH6+MSh7WlKlhS+fnypTROD6/DC9a2e7laXoDSNjM6YmGOtUBexqro7BMj9vXOZV2vX45n55dms/rIDIJXPdMiBjWSwYmBODtvOJo6jFRfbgHJ+8Ls2lJJxbpCJMRdx4HFasq19TlX1+MnUXfWTuWtWRgHHnqbicgNBevcgLF2xTFizXBgwY8uQxa80O1owW+QCfuq6srKzIVM/T9KGBWK5C60DxNBWh5i07DJQp0mOyLPdjrGl19+B6uBAXuQWgdfOJkvRGecQ4i1pKd3cAMcxVC7xy+7l+aZjkUFqhG1NHtPi0FFUB54AxMk0yA+FUPKQLQgBZt8AjpRCyRzemSh5MrZkMpJYAZ9Z+AsMnH0BIWgQsAtqbgaEhG4bBbFaXOTUO+eCUDZZUpB7WlcJvzzTfkbdYbJMzQU1+i2yatTTGnvmsIOmCe+k03Et6XLODlsHE8Oe6kT5DwLZAMfozKl8a6A8Aupc/ylg9hwXyu+yy9XhcWnqScstKn9x5AYUrVbAbmJowxovBI4UuYuyxZMrvWx8w4M9soOKi2R759uUlMhtWcA9c7xFkorR43PW0tJj0gc4OfD+YRiJBvoJrejYMZo2Ifa+b75U5iFE4pfPs9rDK/sSWecVqVuFypDC+sjuirOHaOR4V32l56mWwUP2gc2P6unZDIfhiksNQlD9b4TL5gDiSL1N5L1s2nG7BOgD6j729vbcwhrH+htXsmZWs/tqktVeT21ZyysEnlbBSsYQ+ptUUKnEF05c3kByfPLIhJPtOp+Ygp1Zwykgb0j7oI7AXQd+ZdMMA4OvhdoJ9fX2l6RhMd0Y3zCyrxCPIqjzS2qOpeJFTJ5fNc8vKBrfUoV9bAcLFrJRZMS3vPMSV1yz2FrR0pgcbxvoVaH44A/P6cO03wLkUGBxZyxTGilnl8vK4SEmbu8zlIjV9cA2YnqNMgTGmom8ChmMFlSlwYwia8zyU6xYG0VyPPxi36LKswaUCdGor59nKfVz3ZBdt5FNYGQugyaRNdiGmO9mlKcE6f5YLbtY+JCCFYFH7MQb6y+lm2RiEVmB4PRQK3ZyOIbXkSIMwRGUfkg9mWcz8QrHUylYG/a8i+w3h3LUQlDKvLaOgcOxdYDtjy42HYvKLTf0yyW+XL6724dOWmt/MsYEuWtiDoPdguns0jhPA8Cos2IPAyzV6GRXFLLuYa+Y1vVjWKf9yHYMPdI/P53ri25lBe97hGiUo2HI+MDGwDBkfrJvctNyrhG0rsq+nt4SVYGWLlUa06YPpPoX22nM8EDD3gOs1Bx90kUF/wvftGaZelGKB5sdwz024127FQIFaD2vz8q6IKrFU+FMumJaSrn9erUPOQ5+z4Ta5uiOdYTbDatG2dSJ5eXM/51DDShDvutCvLFhCyz0WxNDd3c1XVz2e7QFW476DuOcl3Ht7TU3NsCC/BmNEBW8+GZfVjW6ZVZVaGZLeOcs+g0XVVIXfxvqXnrk8wGp/byQpp7oT6t4y7/CsmhjoRRAnHsfhG0YdrGABa4FU/gwN/E9JSYmd728wGcSK9pRSm9xzoU+aT7hkd2tqhr4YT64bz0go4Vo1wyVN1Y4hD2OYPh90xeECH8v1CDvu3QYMr+De60pLS8VcvmOT1FQPk4wyn8j8WlhkZJOzqp3YHcoqMXZin0kzqzPW4qeWU3PBnq5mIF7eFZUtULKZlU758nleWTrNOWTWIlfcEgwG94O+N1n/ynFvL+55FBg+y1dKDeWDLrNB7/kQrF83h+WRt0Jy1UKPGrt0Z8KMn5a2I0j8NlX7238iJuFEZstMvHtPJ2TbibjUBFLlloQ2GKJY+ED3+HNgOJLTGlpN77Zt2wYmjXH+ibKysqvr6uqGLX2xWwL58djMLNkKiv23tbVR+5/H8b043ZZlftLcLsIAvMQnoadMmTIgJKzeP9eccvEUtIUYwAua3DIPGSWX5tBKp6ZSbErAqVRh3McFe5ycf/9YXK20YN3rXM7lLfPITFiPpJ57wtjE0Nra2gfm3IvjpwoILPhik38qLy\\/\\/FjFYF1Gm5hd1eXFnRDYcjCGL1XPW3TTDhdptg+41432SUjIul6IXuRkeS2ymARjCh9249SaWVMzf5n190/bt263xzOVo8Jnq6urJfIIkW1A4Ho+tZXErcubMGVrXW+nGC2jKD0v3d3Cb36ObrKysTD1fCSFrC2qy/qOYbIewHOnkuqikWr7TVMU5VbuK+9TafE5cRzWl/UdgtViK4MDThTI+ZObrdw+fq8wmYF1dXcTwNDA8gOO2bOWLtOMFwPBCVVXVfPPpdKuiU2h2tyRUDY70JbQsPDEy43zJmGbMACyd6lQYXU7bEEU3+NCLsb0Hp56x/javgFksGDcfGvkm3MsPEAO46Gom+tF78/F5uBRqTT9ikgf5KgAZXGCYb+K1AfsTCPQvq62tVc9VcvLZbtPVkiJOc+04lZCP2hMqM+4M6WoRYiSRWtNGYfTCopVxWUuJXSUenIFYhmy30mc3VoOOCMNuxC2fhyXaOcKhuMnpdPIVCNXp7zOzyeDDHPYiajvDASYrusU7IHGS06dPM/b6CfjwA9DQk0/AnDm0J4xGfwGmzoHEfpUdmA9STISQmYwhKPSfBB2PgoZnOJUygjZO4Df347dPtbe3n8P2iIHkMzOtZTJR6YGguFWpoq1Pk+5wqhCsBAwxGWclWDDmNFdNqU0FwbECp1qsGNA/p+G+OwrhYhuvIWv7KcbhH7jExypkulFvTGj6uPKBGSMwMMHiE+kPpwtXQTFYpjccYuODnz+FJbuZrobgxtuSWbW+o6ODQeUvcfxdyfLkSq52jPeArcX+nwiUF/HdYOkYzBeIOGzD40sz/afAJfXClcuKAYJxClr/XUNBRjtwfKvO34MP94EP7onkgylcwMDnH+5Gn/sz3T+qNxyyrolGNyNgnhwOh5cYS31lvN4GbQaS9PVnz57VAeoJnPt7kjeatoyN8307YQWWA0NdJgymENEaxJODu3qCXRtZjSkNw1Fo/UMQrl+NYhZqyLQf2t0KPtiAYSVLccRQrCePsmFgWQgKQuH6Hdzifbi0L9tvRvUCOouQbeLMLKzJMq6DZwGT67GL5TJNbeEcHJhC5rDSzfce/HCkliu9TWM7Dma8DwgzwaDZXGYyXhiYxnd2dpI52yHU30G/L4xRuAbCFrT/HjCcRR9LgIGPvg0Uk4vNB2IAH5LAwJrdg7j8Ua7fZhKwQlyktXMu72Vq+hC0ZyHNNIP/sQC0/BMEVVuhSwG4D3Dqh7jG6aDoWAcr7S3PM+Euv4FzX+fbbkh/sTCwum1gYMzIV7L/GNd25coSR4mLHfKR/e+53e6LjZfCFI0PnALibhRS/xXXnkabXfleLT+qt0xnIgK/WYj9SzCZdwJUJV9MxuCZxcCRmGxmfdQUBsH082BQB7Tzv1kjwr5vrAzJ8Z58L74zLvtr0Hud8Z4FtY8GAy0W6ecOwdrEeA9tvIZ+OtNDiWJaGbTViL5uQ1/3AMP00fLBXJ1i4QPXETE0edScMSnkv68UU8BMa8bnEm8GmNshbNNprhkXcKc2cerGePonNW+WTKqdmk7B4s6VDzh3FANFoXoB+15arYn4Rwz4rMXplej7Kzj+DOj15cJgrvfPgIGzC2/jGpOR9diPpTNlnARMhTn4nIv9OtD5BT7bCgy2QvnA+Vpi4Hec6wCGZ3HL07h/t/WB4I9DwAbe3IdTdSBsOY6vBJiLcW6m8fiV3TDnqRpfatOMyVz+v5+3AeR3OOZrMVtwLTaR/6vIgmMSdi4VvxC3XY1ra3C+3KA/HYNmYOC6+R3Y1+P773HL0fTi6QQJmNkPJ2Lr6V1A0xXgwyXAMZ/JgIkjnQ9cbo6dxeuNOM\\/\\/ScAXLXPZeSgTHz4uAbMOng/HXE1ayocx+dJeptec8pDU/yGiyziN6yf50hJqCJerZPqnThMsYNY+y7EHQHsljqfzhTDY+Tic01i7dQa/Pc5/imX8Iy9OricyZdUTLGAD10C7h3zAJ/8tDstMdVQigw9cHtTNN0TyH5MZfOET2aH08S+6gH2yfbIVe7N/MgSfbOO5/b8AAwDCB5vdkkgX5QAAAABJRU5ErkJggg==\\');height:50px;width:50px;height: 30px;width: 30px;background-size: cover;background-position-x: 32px;;background-position: 32px;\"></div></a></li><li><a onclick=\"window.MI_logUsage(\\'share\\');\" href=\"https://twitter.com/intent/tweet?source={0}&text={1}: {0}\" target=\"_blank\" title=\"Tweet\"><div style=\"background-image: url(\\'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJgAAAAxCAYAAAAm0WAHAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjQxOTgzOUY2RjMxMjExRTQ4RDc1QkNENzc1ODE3OTkzIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjQxOTgzOUY3RjMxMjExRTQ4RDc1QkNENzc1ODE3OTkzIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NDE5ODM5RjRGMzEyMTFFNDhENzVCQ0Q3NzU4MTc5OTMiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NDE5ODM5RjVGMzEyMTFFNDhENzVCQ0Q3NzU4MTc5OTMiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5SFpoiAAAe+klEQVR42uxdeXBd1Xn/3r5ptWTJki3bsrzbeMcOm9kNCRCghKWEpFkIkFCSIaShpO1MOmkzmTZJZ2hT2gYCTKCUBEiAYQlJiMHYGLzIeMEL3hfJkmWt7+nt9/b3O+9e6erpbZKeRP7gzly9d5d3zvc73/6dc69suq7LJ9sn23htTuvB1q1bh91gs9nUJwUx/Tt3fjeE1I5Pv9Pp9GiaVm232+fgegP2MlzzYI/gei/2E7j+Ea6fSSQScVwPsUmzLeun2ddoNyuN5rFJL/ofhgv0uHE+gHM+fDZgb8K1GuwB/hx7GNfasB9OJpNHcD6Iz5jD4YhiF3wfMjbmZu0/34axKQgb6TfbtY6b0Qb54MZxJe6bjWszsFfikg97HOf7sJ8y+HAauGM43497EtYxs46XFZOF50O2VatW5Raw0WwgshSdVbnd7ktcLtfl+Gzw+Xx+bAGPx1OFcyUgzIl74gASjEQiZ/v7+0PhcDgUi8WOx+PxN/D5Du7pRHPBQphQzI0DBQy1GOhG0H416L0In9WBQMAGDCX4Xg5m+XHdhvtCwNANDB2hUKgPO5XkEATrZXwewPU+MunjsBTo2wcs5aD3PNB7JXDMBP0VwFECPkzCuVIoAZU/ST5Eo9Eu8gF7GONPIVuPzzfQRjuwdheLLptVEkdiwQiGVgrE3+H1ei+cNGlSTXl5eYNpGXIJikXT9J6enqOdnZ1nIHBvg3FP4/Qh/LZvIiwY+p+OcxeB/i9DKeYDQ3lpaWnJSDBAuPq6u7v3dHV1HQGGV4HhDfyuA8zUJsKCUbBwOB0YbgGGSysrK6dWVFQ04rqrUAz87O3tPQ0+dEDgtkL4nkS7u4Dh7Fgt2IgFDJ/U5EUAdCcEal1NTc10AAtkIz4b49M3MKevvb39CIC+ju+PY4D2WYWjmAIG+ivw/XJguB8YzgGGMiiKjBUDLNq+tra2Hfj8FQTtLTCoc7wEjG1BuGcAw19CKW6ora2dDYtVNVYMoDsOPrSAD+vx/RGcasYemxABo0/HoF1fUlLyjbq6usUA5hurlUnvJ4ittbX1g76+vv/AAL6O893FFDC0uRAYvlVWVnbzlClTKoFFiowhCav8ITC8AUEjg45QboopYLRacHlr4f6+CQxroCRVxeYDaE8Cw0cQtJ/DfT6DMWsdjYA5vv/97w8ctLS0ZO0QoKbBvz8ETblv6tSp82C1XByMYmWhJtGwJG4wn8nBCpjqSQC3ly5zLAJmYczlaP9hMOX6+vp6H7RfxgGDHWNTCwwLOGbA0A2hbgEdyUIELB8taHMS4qu7Jk+e/O1p06adxxhrnPhgBwYma6uBoRF82IPvZ3P9FmM6OgEDgFno8IcNDQ13ANgkSDPdpIxHQM522T4sSyX6XIKYoA6JwA701TMGAbOj3RsgUD8BU5ZVV1ebMdi4YYAQ+MCgucBSB5ffDwzH0Gd8LAKGdmswJn8DBb8bit7kYKA3vnwQ8MFHPgDDAgjaDmBoK6qAoSP6+X+bPn365xBAuoplivMNMgcNlsCDvhfAXE8Bg7aNVMhMAYMFUcIFDHMQAGc18eOAwQkLMwPCVg9F6TRKG4nRCBj4MBmM/h6U/CtVVVXVRllo3DFwAx8E4zcLGBaDD1uAob1QAbPnkeI6gPpHaMxnwRjbRDAm3VQjvvDA6twEOh4CPVNMocm0Z8FwMX77I2BoRFvyMWBwQzE/hZj1TsRN5+PYWYhSWHdgKIOQ3gMG3gE+VNANZ8JgU78vwp6BD7DGgjG8CGP5E9Azu9AxyGXBAjCRd8EU3w2XwqKdbaKr/hYNouWkBjFt3jmCWtNsYPgvYFgCrZ9Q4UrD4ASGabFYzA9X02zU/AoSMP4WbulahCYPINutS7dcvMdhZ9nCpoQDCMdMM9tSlRp9aEBPS4atCR7FgXPvo+/+fBYslzZdgCzxHjAmkJ5tfhxCBjoqkWDe29XVtR1Cs6GAtLscv2W2uJrCNRGuPY+79CK5uA6pfysys382Sxj5SgewFnOA4X4IV2O6cFEIYglN3j0UleYTUekMaaKNESN/7oSALZnmlsvn+yXggQXVh/CBGebnwYf3cO6plBgWOFVkAVUPaf1baD7jh4JrM+PJINBhAz1zwKAHsB+CVrfkYg7inbWIG74EzRe4pqJiSHcjYoyylbcmKeY5IzMrAYarYMk2AsNLwJDIhQE0l+M390IwVwK/3YqBVqsjmJRfbw3J+gNhOYPv0bguYw33dcPVbjkakbMQ2C9+qlQJsm4IGQN/CHsF6H8QgrYNGD4ckYChESYn1yFeWeP3+9X8WrYBVma82MJkTt+k6QXSZGY0jAXWIptZi3ueRf96lsp0DTDcj3ClJBcGu0G/lqG/jK7DZinWGsJjM4Ifm6TaG0KLan+wbWIA/SyI3goGvYNT7Xms3gpgvga724qB3cSTurywPSTPbe+TKWVOuf3cEplR5VR0jMWG8fd7W+Pywo6gvLm3X5ZMdcuqmR5JaAMzF8IxhXwsAh9uxvG/gM7wSASsnloDU+jLpr0caFhmSeJPsZ0O23Y6UnFFUhueOoOuir6+vq8jlnkL2tOaScBw36XAcMmkSZNy9kX3wnFzoz/2m0vITOE6dCYmGw9F5MOWuHT1J0GnTaZWOGXldLec1+SVUo9djnclZPPhiFT67bKm0SvlPru1bQ8swHLEk+vAoGezlS44FQcMrHdNS3ftDtC792RcNoOOxmqX3HdpuSyod4vLXoTxR9uL6hNyuCMu+07HZXdLVM5t9AwTfo4t+PA17M9hXPYUJGCsDeHmCyGhMwFuWNxlWq7jZxPyxt6wbD8Wld6INqDBY/f9CBTBrEvne+XCJp/4XDZJ6kOBwe1xEvocMGcZTrVmyNrKYb2+AK23cfonU9zFGOODk1F5ZkufnA3q8hcr/HLlAr/qP5HBk/J8BM7s1V1BefGDfmnvTSrFshtZ10kI1DaMxe8/DMu0SofsAPM7Q0l1/Uwf3Mx5JaJrKYxUEtDPuuI1wPAKmunKEos1IkxZg92ZiQ9toKEHY3/D8oAsbXAb5Ri9KC6kMmCX2TUu2XkyJn1hfRhzSY/b7SaOWijKlTg+gP7jeQUM5o6rB26B+SvJlHGRMc0nYvLohl45BAn3QWUcNsOuFgFbBPvulpjsPhWT/dCev4L/D3iZpg+9D66vFIHyTYhlNkApgmnNzEDMdQnT6kwYyBwqxfPbg7LpYFS8EOLH3ukTN7BdPM+rrGciMZiLOVQgLbg/JP/7fhDfdZlb65KL53plXo0b8V1KwDZ8FFEM2Qu6fW4b3JZDWnuSsr8tBiFOSoV/iBVzAEMTrPB8uM3NVldv0OwChhtwz+SMma9uuHVmdi6Oj54xrBhWMrCLsrgDAqPTS+hDPAUvJSCoVCoxs9Is2TfG2NHT03ML3P3/cdlPXgFDI5Oh/RdwqUom4k73poLK/W1xaLxPPrPYJ1PKnUOC2bEEzgS2A0wiM1/bHZZaxBY3nxtQA2hlAOhzQhHWxePxKq7JspKJ61eBObglkLEfFwZ456moHDyTUBnSjcsC8v7RqDz8Zq/0RjW5ArjK6NKSqcGny9gE4fltc0gF0Z9Z7Jfb15RIbaljICBeOMUl58/yyvr9ETkIxVuDmKWtNyGPbQzKYfSzCwpzyXyfam8gxS0vn9fe3n4NlKQZzIlYvQgwBIDhWk4D5YqVVPyoFTb2KUXRlVuPJwdDkQCUgUqWyaOY/WSLEWHBbKBzBZUae34Bg3AthQtymstV0v0+XeIe+OR6CNW6hT5ZMsOT0qZkMSZZsaOPGmg+0+1H3uqV5uNRuXiORyaDmUO0DDdDwLwwzyz4HbM0w4WClzAItS7ISy8tH4OL7+7XEL845dolfhVj/DsEjH0ebI/L9UsD0gBX5/c5pA+u7l3EOi3dSbkMrvtWCHxdhSNl5XQj6wLtFNZPn+MDQ3xyoisJoY1AQRyI2eJyFP2l0kpricFeBuaQfpdhvK34piJrrMjEh9FsFK6+qC6v7+qXV7C3wlD43HbEiDa5CS523UK/uJ3DY9789TI7a2M6+HAuaN4ixqR+riB/NRfZZTTLGKDWngTciy4h+Iyn3gsqjVyO4JZmN54YfYmP40jLchZa/4e9EcQ5IaVdFDS6GbqbRFpxkYsa4SZXI6Z5yyy84rsXTFuaLfYytxBcZBT0VpU41MCumOGW+68oV5je3BeW945EYaG9ctFsr7LadHulPpucN8sj06ocEosOTW5UbGUwMpFMTY+safSoOKkzZJeZyO50y4S0pXA5Gcwp4wpTy6ICMm4FrJffPM4UJw2Otm5pN4viYoA3HwrLk5uDKuFYWOdW3iIU11Q2qumGsuiD5Qizfd1oONt4AoMXhmkNXP0TOAzms2CLYBlc2dZh0bTGIVQcsAPQ9B/9rkduWxWAW/EiMMTAx0cuZE57ijH7WmPyXHM/3ExUKsDMagSaHAQKbqYNljYAOhdwKoZhg3GaaSOzL8m6lgz88rqYOUKroSwUCBK9qN4p37myTF7bE5ZNsFi/aQ7Lb3b0K4acDWoyY5JDWS7+PhtGWoBU9qvJq3Dx247H5Y41AbhMt7J4GZjDhKQJse8pi4A58H0+VwMXKyuPQiGOdSakP6aDHp98bkUA2DVV5yrxpDLoQes1Mg4y2IdCLGQhOa+A4aZZLEpmnlJRFSrFkE8j9uLl57b3yyNv9ykXcP0yv8ytcSqNKNTUup02FddsOsyMLqSElvELtX/rsZi09CQGNHRYwgE6yRyuozenLMAcLvOxZ8eQKkVUw3KVeu1ytCOhCpR15XYlAHQZn18dkAtmuWXzkZiKNZkxEnOJx64SAdGyazOVpT8m8hqyyfdhBW9Y6pdrMVZOhwyJv0wrDCHiOvkmtPeODK4Zc2Jv4pr6rLMPlqqunsWC8SsTMKfTZrhyZODgNt22B0LlQYJWXWJXcZlpwcw2rH3qup7TgnGs+eyFoeh562BVrNTmnABnDQTW6sqFXqlBbESr89LOsBKyW1b65VNwIy4giyf1nPGWB8AZ17y+h5YiDMuoyXVLfHIrtCsA5m8/HsupTEZJpRq7w1L9ruVxrtiFt/bHNDWw/RDuF0F/NWLpmlK7UaKghXapNJ1aTlynulmWsKm6VkLLPVFNHHTtTZNdKgli9phtLDDWXFlbw3leE4OBpzofHwqJu8KwWIehRPQ8XSFNYSeWw1DkCK7RelWBl1SA0SZpxlgzrHIVkkW6s64tslBgjtdl8z1K+1/6ICx/RAb18J/6YIqTcpUSPjvinMGpB7MJh+ESKUCsKW04GEUbDrlxaYnKTMuhVafOJgsF5pWhK0LKUgV1W04BO92jSU9YlwV1LhVbMbas9LvUJC9pZBhAprAAuwAZ4uJ612CIkMy9/opuPQjBpBtm0TWhYihbNoFkMdtnrI5IGud4cyDnGq8ChIG0H+qOy49/36dcIEszxMdaHecuKfSrEHt+boU/pTijFDCDTpvBi7wWTDdXR2aqvQwRNuzUgnm1Lrl7rUPqEZ88/X6\\/\\/PK9kMrSbljqk8VTXco1mN7BBatFq7D+QFTFN0chSLMnO+VrF5XIKiQLnI5IJvShZl8yL9E1HxFLx2usuc++ckIXpbkeIKfL4ACrgq6mDyvnaSpDTglWphmDTPFOBFaRicH0SqcS3lSJJesaL7al57iWsS8zGB8I+DO4SM2oj3qAzS5G/Qs301oRuypT2AdDn3QXaY2mc61CyTfHmy5g0Uzzdrkmrsx5vGAkRXwSVusP+yJyEqn6ZfM8CJ5dSkOoMSdhnpmhvXUgBvekpSrnyZSgaiMMLw1gYWiQZtGm7tSl7KAZHzZCqJlB7mtLyHEEv+fDrUcThc1H5qpLcWOdie5odaNDJRKRHOOPsSb9fB5Rs1gsUhEc6+Q8kyN6hgeuKMV3kRcRxrwJL3PFfJ9cPNej3CdrYH53brdfCB8gfFp6qSWbgJ1F0Dw1mwXTDYdnBn4UEPr0p97rV8Q3Iru8cblP1X5e2R2Vx99NyHSk9XQVtBDtfRqELCFN1S65a3lATnQl4CYj8rO3+qQDTPn0Io/YHdYAdlB70unhxDHOdZiuxdhO4RiXEp5sWsfBXoyMsRF0UQleQPxXD0aw7hVL6mOIRVIxDyeKWbicCyFOJHOvP4vH43zouAPuXrNkkUk+m2jgy27BRB9mXay3MoxhnNs02aESqXJvyv1PRgjSUO2QZCylUPQaVlnW9YEOhpRBsuEw6AwWNFXEJ5ZjsdiSfOumbEbB8gAG88nNIVilmIpnvnp+iayc7kJ84wYT3bLlWCoTY7bmQk91yGDWLSxRvn9BrVOCUU1lZ89s6Zcn3w3id0m5bZU/tdjNlnv5DuikBTjEOWvLpZPUpmg0qmb8syUpLIMwAGe8yFiQmfBnkWAsgUtn/W00QkYX1BVKygbEN9WIPxfVOYdljukY+PAxMVjdJBWE54AhHggEXGOxYsQaBdtpnc0QQK2KwHE0UZxlChxr0HwcAhYrZC5ydyQSuTbjsl5LKMH0t/lYXH6+MSh7WlKlhS+fnypTROD6/DC9a2e7laXoDSNjM6YmGOtUBexqro7BMj9vXOZV2vX45n55dms/rIDIJXPdMiBjWSwYmBODtvOJo6jFRfbgHJ+8Ls2lJJxbpCJMRdx4HFasq19TlX1+MnUXfWTuWtWRgHHnqbicgNBevcgLF2xTFizXBgwY8uQxa80O1owW+QCfuq6srKzIVM/T9KGBWK5C60DxNBWh5i07DJQp0mOyLPdjrGl19+B6uBAXuQWgdfOJkvRGecQ4i1pKd3cAMcxVC7xy+7l+aZjkUFqhG1NHtPi0FFUB54AxMk0yA+FUPKQLQgBZt8AjpRCyRzemSh5MrZkMpJYAZ9Z+AsMnH0BIWgQsAtqbgaEhG4bBbFaXOTUO+eCUDZZUpB7WlcJvzzTfkbdYbJMzQU1+i2yatTTGnvmsIOmCe+k03Et6XLODlsHE8Oe6kT5DwLZAMfozKl8a6A8Aupc/ylg9hwXyu+yy9XhcWnqScstKn9x5AYUrVbAbmJowxovBI4UuYuyxZMrvWx8w4M9soOKi2R759uUlMhtWcA9c7xFkorR43PW0tJj0gc4OfD+YRiJBvoJrejYMZo2Ifa+b75U5iFE4pfPs9rDK/sSWecVqVuFypDC+sjuirOHaOR4V32l56mWwUP2gc2P6unZDIfhiksNQlD9b4TL5gDiSL1N5L1s2nG7BOgD6j729vbcwhrH+htXsmZWs/tqktVeT21ZyysEnlbBSsYQ+ptUUKnEF05c3kByfPLIhJPtOp+Ygp1Zwykgb0j7oI7AXQd+ZdMMA4OvhdoJ9fX2l6RhMd0Y3zCyrxCPIqjzS2qOpeJFTJ5fNc8vKBrfUoV9bAcLFrJRZMS3vPMSV1yz2FrR0pgcbxvoVaH44A/P6cO03wLkUGBxZyxTGilnl8vK4SEmbu8zlIjV9cA2YnqNMgTGmom8ChmMFlSlwYwia8zyU6xYG0VyPPxi36LKswaUCdGor59nKfVz3ZBdt5FNYGQugyaRNdiGmO9mlKcE6f5YLbtY+JCCFYFH7MQb6y+lm2RiEVmB4PRQK3ZyOIbXkSIMwRGUfkg9mWcz8QrHUylYG/a8i+w3h3LUQlDKvLaOgcOxdYDtjy42HYvKLTf0yyW+XL6724dOWmt/MsYEuWtiDoPdguns0jhPA8Cos2IPAyzV6GRXFLLuYa+Y1vVjWKf9yHYMPdI/P53ri25lBe97hGiUo2HI+MDGwDBkfrJvctNyrhG0rsq+nt4SVYGWLlUa06YPpPoX22nM8EDD3gOs1Bx90kUF/wvftGaZelGKB5sdwz024127FQIFaD2vz8q6IKrFU+FMumJaSrn9erUPOQ5+z4Ta5uiOdYTbDatG2dSJ5eXM/51DDShDvutCvLFhCyz0WxNDd3c1XVz2e7QFW476DuOcl3Ht7TU3NsCC/BmNEBW8+GZfVjW6ZVZVaGZLeOcs+g0XVVIXfxvqXnrk8wGp/byQpp7oT6t4y7/CsmhjoRRAnHsfhG0YdrGABa4FU/gwN/E9JSYmd728wGcSK9pRSm9xzoU+aT7hkd2tqhr4YT64bz0go4Vo1wyVN1Y4hD2OYPh90xeECH8v1CDvu3QYMr+De60pLS8VcvmOT1FQPk4wyn8j8WlhkZJOzqp3YHcoqMXZin0kzqzPW4qeWU3PBnq5mIF7eFZUtULKZlU758nleWTrNOWTWIlfcEgwG94O+N1n/ynFvL+55FBg+y1dKDeWDLrNB7/kQrF83h+WRt0Jy1UKPGrt0Z8KMn5a2I0j8NlX7238iJuFEZstMvHtPJ2TbibjUBFLlloQ2GKJY+ED3+HNgOJLTGlpN77Zt2wYmjXH+ibKysqvr6uqGLX2xWwL58djMLNkKiv23tbVR+5/H8b043ZZlftLcLsIAvMQnoadMmTIgJKzeP9eccvEUtIUYwAua3DIPGSWX5tBKp6ZSbErAqVRh3McFe5ycf/9YXK20YN3rXM7lLfPITFiPpJ57wtjE0Nra2gfm3IvjpwoILPhik38qLy//FjFYF1Gm5hd1eXFnRDYcjCGL1XPW3TTDhdptg+41432SUjIul6IXuRkeS2ymARjCh9249SaWVMzf5n190/bt263xzOVo8Jnq6urJfIIkW1A4Ho+tZXErcubMGVrXW+nGC2jKD0v3d3Cb36ObrKysTD1fCSFrC2qy/qOYbIewHOnkuqikWr7TVMU5VbuK+9TafE5cRzWl/UdgtViK4MDThTI+ZObrdw+fq8wmYF1dXcTwNDA8gOO2bOWLtOMFwPBCVVXVfPPpdKuiU2h2tyRUDY70JbQsPDEy43zJmGbMACyd6lQYXU7bEEU3+NCLsb0Hp56x/javgFksGDcfGvkm3MsPEAO46Gom+tF78/F5uBRqTT9ikgf5KgAZXGCYb+K1AfsTCPQvq62tVc9VcvLZbtPVkiJOc+04lZCP2hMqM+4M6WoRYiSRWtNGYfTCopVxWUuJXSUenIFYhmy30mc3VoOOCMNuxC2fhyXaOcKhuMnpdPIVCNXp7zOzyeDDHPYiajvDASYrusU7IHGS06dPM/b6CfjwA9DQk0/AnDm0J4xGfwGmzoHEfpUdmA9STISQmYwhKPSfBB2PgoZnOJUygjZO4Df347dPtbe3n8P2iIHkMzOtZTJR6YGguFWpoq1Pk+5wqhCsBAwxGWclWDDmNFdNqU0FwbECp1qsGNA/p+G+OwrhYhuvIWv7KcbhH7jExypkulFvTGj6uPKBGSMwMMHiE+kPpwtXQTFYpjccYuODnz+FJbuZrobgxtuSWbW+o6ODQeUvcfxdyfLkSq52jPeArcX+nwiUF/HdYOkYzBeIOGzD40sz/afAJfXClcuKAYJxClr/XUNBRjtwfKvO34MP94EP7onkgylcwMDnH+5Gn/sz3T+qNxyyrolGNyNgnhwOh5cYS31lvN4GbQaS9PVnz57VAeoJnPt7kjeatoyN8307YQWWA0NdJgymENEaxJODu3qCXRtZjSkNw1Fo/UMQrl+NYhZqyLQf2t0KPtiAYSVLccRQrCePsmFgWQgKQuH6Hdzifbi0L9tvRvUCOouQbeLMLKzJMq6DZwGT67GL5TJNbeEcHJhC5rDSzfce/HCkliu9TWM7Dma8DwgzwaDZXGYyXhiYxnd2dpI52yHU30G/L4xRuAbCFrT/HjCcRR9LgIGPvg0Uk4vNB2IAH5LAwJrdg7j8Ua7fZhKwQlyktXMu72Vq+hC0ZyHNNIP/sQC0/BMEVVuhSwG4D3Dqh7jG6aDoWAcr7S3PM+Euv4FzX+fbbkh/sTCwum1gYMzIV7L/GNd25coSR4mLHfKR/e+53e6LjZfCFI0PnALibhRS/xXXnkabXfleLT+qt0xnIgK/WYj9SzCZdwJUJV9MxuCZxcCRmGxmfdQUBsH082BQB7Tzv1kjwr5vrAzJ8Z58L74zLvtr0Hud8Z4FtY8GAy0W6ecOwdrEeA9tvIZ+OtNDiWJaGbTViL5uQ1/3AMP00fLBXJ1i4QPXETE0edScMSnkv68UU8BMa8bnEm8GmNshbNNprhkXcKc2cerGePonNW+WTKqdmk7B4s6VDzh3FANFoXoB+15arYn4Rwz4rMXplej7Kzj+DOj15cJgrvfPgIGzC2/jGpOR9diPpTNlnARMhTn4nIv9OtD5BT7bCgy2QvnA+Vpi4Hec6wCGZ3HL07h/t/WB4I9DwAbe3IdTdSBsOY6vBJiLcW6m8fiV3TDnqRpfatOMyVz+v5+3AeR3OOZrMVtwLTaR/6vIgmMSdi4VvxC3XY1ra3C+3KA/HYNmYOC6+R3Y1+P773HL0fTi6QQJmNkPJ2Lr6V1A0xXgwyXAMZ/JgIkjnQ9cbo6dxeuNOM//ScAXLXPZeSgTHz4uAbMOng/HXE1ayocx+dJeptec8pDU/yGiyziN6yf50hJqCJerZPqnThMsYNY+y7EHQHsljqfzhTDY+Tic01i7dQa/Pc5/imX8Iy9OricyZdUTLGAD10C7h3zAJ/8tDstMdVQigw9cHtTNN0TyH5MZfOET2aH08S+6gH2yfbIVe7N/MgSfbOO5/b8AAwDCB5vdkkgX5QAAAABJRU5ErkJggg==\\');height:50px;width:50px;height: 30px;width: 30px;background-size: cover;background-position-x: 62px;;background-position: 62px;\"></div></a></li><li style=\"display:none;\"><a onclick=\"window.MI_logUsage(\\'share\\');\" href=\"http://pinterest.com/pin/create/button/?url={0}&description={2}\" target=\"_blank\" title=\"Pin it\"><img onload=\"this.style.opacity=1;this.style.top=0;\" src=\"//d34p6saz4aff9q.cloudfront.net/images/footer/Pinterest.png\" style=\"opacity:0\"></a></li><li><a onclick=\"window.MI_logUsage(\\'share\\');\" href=\"https://plus.google.com/share?url={0}\" target=\"_blank\" title=\"Share on Google+\"><div style=\"background-image: url(\\'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAXCAYAAADgKtSgAAAD4klEQVRIDY1VzW8bVRD/7Xq9teOPtElDHdlupSIFKEqUhH5AI7WNBCeQuHAqlEPpASHgyA3hf4ALHwckGoFAHBGIA5zapoiCEUpCEiGFUlHJTkCyiePEXjter5f5rf2CWTuBkcZvPB+/eW/evFkNB9DKysrpVqt1NRgMpoWPmqYZbzQa27ZtF4Vzuq7PjY+P/3QARK9pYWHh4urq6s2trS2r2Wy6kqCHqaedfsvLyxd7UfpolpaW5jY3N7ccx3H/L5dKpS2Je0/gtD6QnkpbXFyctyzLVqDcHWWu/8XVatVmfF9wZqaDkKuYgJQVsJL3szOeJ1cJvGOwZslk8stYLDaoaRpc120fpSMXKi6+Xqnim18sWLstDEUCuDQWxotPROH3LwttbGw8OzExMa8TRW49Q2DKCljJ9wpNfPhtGU+eCuOtZ44gFtLx+MmQB6x8uJIYG4/HB4nH/zrbLZFInKOhH3/24w6OxXWMCo89YGD2oRBurdWwXXMY37MZ6ohHXF0u7KVIJBKm0k8szh9lB9v1dpmY/NSoCdtxhQFpUQ/890IDdrPlhVNHPL4P3TCMlKpbz87FcSIZxJ17dayXbC94s+rgsROHcHjgn677JFv1EhJYUSAQSBt8eQTdjy6fjcBquPjo+yoSUppyzcXLF6KsB37O28je30Wu1MT17yowDQ3XZiIeFHF1Pmm1Y2q7E1GOmBpen43itdkYbqzVpTuAqNn2G4poePiYgXBQw5isjyQML55xUpG4wVmhAP2rSrZebuFPqX3ysIHbd+vSijounxmQ/wGPF+UEMydNhCSJInkb24Y8iKJS+Ffe0adZC6zkmeMmXrkQwY1fd/HFkoUTR3TMPChHELp2fgBmgN3WPhHvkLiGdEuOF0GFnz7+wcLquo23nxvcGxpXzoZR3HGwLHoFfshoR6qTE4+40u/6XKVSqdHg55truwgEJGnHRgj6JAYDOD7Urq/SdcfKGKgRV+c8LhaLWeWkVjq/8VQUf1UcvHPLwt2C43XF7d8aqNstzI4F6er1uid0/RQKhSxxvecvQBnZfdnv/OhoAJmnY9ipO3jzqx28P1+FIRHPnw4jJKVQfc1VMXGk3hli7RWa0yyVSl2R/uxUkOZ/E0+jHhwtSlb3JaDNfD7/weTk5KuevTtcvkDz6XT6vPS+l8AP1u3rlwmcy+XuTE9PXxKb9yr3dt5x5gfj3ZGRkRdkPuyNX7Wz/ZLJBZalzp9PTU1d7U7qB/dsnW9iZnh4+FwoFArLzXfHeDITyVerJp9ENkOG89vv1BdcOXFscmrKEEoJH+WT5ssTXVE4L7rrB339/wYDDxkPEF5efgAAAABJRU5ErkJggg==\\'); background-size: 29px;width:30px;height:30px;background-repeat: no-repeat;\"></div></a></li></ul></div>',\n callForActions: '<tr><td><div id=\"cfa\" style=\"white-space:nowrap;border-top: solid 1px #c5c5c5 !important;padding-left:0;\"><div onclick=\"alert(\\'call to add to favorites\\')\" style=\"cursor:pointer;border-radius: 7px;height: 27px;width: 187px;margin:5px;MARGIN-LEFT:0;display: inline-block;text-align: center;box-shadow: inset 0 -9px 37px -10px silver;vertical-align: middle;padding-top: 8px;border: 1px solid rgba(0,0,0,0.2);color: grey;\">Add to favorites</div><div onclick=\"alert(\\'call to book\\')\" style=\"cursor:pointer;border-radius: 7px;height: 27px;width: 187px;margin:5px;display: inline-block;text-align: center;box-shadow: inset 0 -9px 37px -10px rgb(3, 179, 12);vertical-align: middle;padding-top: 8px;border: 1px solid rgba(0,0,0,0.2);color: white;margin-left: 1px;background-color: rgb(161, 218, 101);\">BOOK</div></div></td></tr>'\n },\n header: {\n header: '<table align=\"left\" class=\"mi_reset mi_greenredtitle\"><tr><td class=\"mi_header_caption@@@gaugeOrientation\" style=\"padding:0 !important;\">' +\n '<div class=\"mi_drag_area\" style=\"position: absolute;width: 100%;height:125px;left:0;z-index: 2\"></div>' +\n '<div class=\"mi_green_close@@@gaugeOrientation\" onclick=\"jQuery.MidasInsight.hidePanel(\\'@@@kfid\\');\" style=\"z-index:3;\"></div>'\n // score gauge\n +\n '<div class=\"mi_gradselectroot @@@gaugeOrientation\" id=\"mi_gradselectroot_@@@kfid\" data-score=\"@@@grade\" style=\"left:123px;top:-48px;\"><div class=\"mi_gradeselect\" id=\"mi_gradeselect_@@@kfid\"></div></div>' +\n '<div class=\"mi_title\" style=\"@@@titleOrientation;margin-top:40px;width:240px;float: left;height:38px\" >@@@displayText</div>' +\n '<div style=\"float:left !important;\" class=\"mi_subtitle\" >@@@count</div>' +\n '<div class=\"mi_preview_images\" style=\"z-index:3;width: 100px;height: 75px;border: 1px solid #ababab;position: absolute;right: 18px;top: 33px;padding: 1px 3px 3px 1px;cursor: pointer; cursor: hand;\" onclick=\"jQuery.MidasInsight.MI_GetPhotos(\\'@@@kfid\\',false);\"><div style=\"border: 1px solid #ababab;width:100%;height:100%;background-image:url(@@@previewimgsrc); background-size: cover;\"></div></div>'\n\n // tools tabs\n +\n '<div style=\"clear:both;height:0px;margin-bottom:0px;border-top:0px solid #DBDBDB!important;\"></div>' +\n '</td></tr>',\n footer: '</table>'\n }\n },\n scrollables: {\n header: '<div style=\"clear:both;height: px;margin-bottom:0px;border-top:1px solid #DBDBDB\"></div><div id=\"mipct_scroll_@@@kfid\" tabindex=\"-1\" style=\"heightdummy:0;outline:none;max-height:auto;\" class=\"mi_scroll\">' +\n '<table align=\"left\" id=\"mipct_tbldefault_@@@kfid\" class=\"mi_results mi_scrolledcontent\">',\n footer: '</table></div>'\n },\n socialItem: {\n timelineItem: '<div class=\"mi_timeline\">@@@fullYear<br/>@@@month<br/>@@@date</div>',\n nonTimelineItem: '<img onerror=\"jQuery.MidasInsight.HandleMissingImage(\\'avatar\\',this)\" src=\"@@@itemImageURL\" valign=\"top\" class=\"mi_resultimage\">',\n youtubeItem: '<div style=\"position:relative;\"><div class=\\\"MI_SourceIcon MI_@@@sourceSite\\\" mi_data-tooltip=\\\"@@@sourceSite\\\"></div><table align=\"left\" class=\"mi_resultcontainer\" style=\"direction:ltr!important;cursor:default;\"><tr><td rowspan=\"4\" valign=\"top\" style=\"padding-right:15px;padding-left:3px;width: 65px;\"><div style=\"position:relative;height: 100%;display: block;\">' +\n '@@@sourceAvatar' +\n '</div></td><th style=\"vertical-align: middle;\" align=\"left\"><div class=\"mi_resultpublisher\">@@@itemPublisher<span class=\"mi_resulttimeago\">@@@timeAgo' +\n '</div></span></th></tr><tr><td style=\"padding-right:30px;\">' +\n '</td></tr><tr><td colspan=\"2\"><div style=\"padding-right:10px;overflow:hidden;position:relative;max-width: 275px;\"><img src=\"https://i.ytimg.com/vi/@@@sourceURL/mqdefault.jpg\" style=\"max-width: @@@itemWidth ;min-width:185px;margin-top: 15px;margin-bottom: 15px;box-shadow: 0px 0 10px 4px #eee;border-radius: 5px;display:inline;\"/><img src=\"//d34p6saz4aff9q.cloudfront.net/images/playvideow.png\" style=\"position:absolute;cursor: pointer;left: 50%!important;margin-top: 20%;display:inline;margin-left: -30px;\" onclick=\"window.MI_logUsage(\\'play_video\\',\\'@@@baseid\\');@@@click\" onerror=\"this.style.display=\\'none\\';\"/></div>' +\n '</div></td></tr></table></div>',\n lightboxYoutubeItem: '<div style=\"position:relative;\"><div class=\\\"MI_SourceIcon MI_@@@sourceSite\\\" mi_data-tooltip=\\\"@@@sourceSite\\\"></div><table align=\"left\" class=\"mi_resultcontainer\" style=\"direction:ltr!important;cursor:default;\"><tr><td rowspan=\"4\" valign=\"top\" style=\"padding-right:15px;padding-left:3px;width: 65px;\"><div style=\"position:relative;height: 100%;display: block;\">' +\n '@@@sourceAvatar' +\n '</div></td><th style=\"vertical-align: middle;\" align=\"left\"><div class=\"mi_resultpublisher\" style=\"color:#838383;\">@@@itemPublisher<span class=\"mi_resulttimeago\" itemDate=\"@@@itemDate\">@@@timeAgo' +\n '</span></div></th></tr><tr><td style=\"padding-right:30px;\"></td></tr>' +\n '<tr><td colspan=\"2\" onclick=\"@@@click\" style=\"cursor: pointer; cursor: hand;\"><div style=\"padding-right:10px;overflow:hidden;position:relative;max-width: 275px;\"><div id=\"#mi_image_lightbox_@@@ksid\" onclick=\" jQuery(mi_image_lightbox_@@@ksid).fadeIn();\"><img src=\"https://i.ytimg.com/vi/@@@sourceURL/mqdefault.jpg\" style=\"max-width: @@@itemWidth ;min-width:185px;margin-top: 15px;margin-bottom: 15px;box-shadow: 0px 0 10px 4px #eee;float: right;border-radius: 5px;display:inline;\"/><img src=\"//d34p6saz4aff9q.cloudfront.net/images/playvideow.png\" style=\"position:absolute;cursor: pointer;left: 50%!important;margin-top: 20%;display:inline;margin-left: -30px;\" onclick=\"window.MI_logUsage(\\'play_video\\',\\'@@@baseid\\');@@@click\" onerror=\"this.style.display=\\'none\\';\"/></div><div class=\"mi_lightbox\" id=\"mi_image_lightbox_@@@ksid\" onclick=\"jQuery.MidasInsight.StopYoutubeVideo(jQuery(\\'#mi_image_lightbox_@@@ksid iframe\\')[0]);jQuery(this).fadeOut();\"><iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/@@@youtubeid?enablejsapi=1\" frameborder=\"0\" allowfullscreen></iframe></a></div>' +\n '</td></tr></table></div>',\n lightboxVimeoItem: '<div style=\"position:relative;\"><div class=\\\"MI_SourceIcon MI_@@@sourceSite\\\" mi_data-tooltip=\\\"@@@sourceSite\\\"></div><table align=\"left\" class=\"mi_resultcontainer\" style=\"direction:ltr!important;cursor:default;\"><tr><td rowspan=\"4\" valign=\"top\" style=\"padding-right:15px;padding-left:3px;width: 65px;\"><div style=\"position:relative;height: 100%;display: block;\">' +\n '@@@sourceAvatar' +\n '</div></td><th style=\"vertical-align: middle;\" align=\"left\"><div class=\"mi_resultpublisher\" style=\"color:#838383;\">@@@itemPublisher<span class=\"mi_resulttimeago\" itemDate=\"@@@itemDate\">@@@timeAgo' +\n '</span></div></th></tr><tr><td style=\"padding-right:30px;\"></td></tr>' +\n '<tr><td colspan=\"2\" onclick=\"@@@click\" style=\"cursor: pointer; cursor: hand;\"><div style=\"padding-right:10px;overflow:hidden;position:relative;max-width: 275px;\"><div id=\"#mi_image_lightbox_@@@ksid\" onclick=\" jQuery(mi_image_lightbox_@@@ksid).fadeIn();jQuery(\\'#mi_iframe_lightbox_@@@ksid\\').attr(\\'src\\',jQuery(\\'#mi_iframe_lightbox_@@@ksid\\').attr(\\'data-src\\'));\"><img src=\"@@@itemContentImageURL\" style=\"max-width: @@@itemWidth ;min-width:185px;margin-top: 15px;margin-bottom: 15px;nbox-shadow: 0px 0 10px 4px #eee;float: right!important;border-radius: 2px;display:inline;\"/><img src=\"//d34p6saz4aff9q.cloudfront.net/images/playvideow.png\" style=\"position:absolute;cursor: pointer;left: 50%!important;margin-top: 20%;display:inline;margin-left: -30px;\" nonclick=\"window.MI_logUsage(\\'play_video\\',\\'@@@baseid\\');@@@click\" onerror=\"this.style.display=\\'none\\';\"/></div><div class=\"mi_lightbox\" id=\"mi_image_lightbox_@@@ksid\" onclick=\"jQuery(\\'#mi_iframe_lightbox_@@@ksid\\').attr(\\'src\\',\\'\\');jQuery(this).fadeOut();\"><iframe id=\"mi_iframe_lightbox_@@@ksid\" data-src=\"@@@sourceURL?autoplay=1&title=0&byline=0&portrait=0\" width=\"500\" height=\"281\" frameborder=\"0\" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe></a></div>' +\n '</td></tr></table></div>',\n normalItem: '<div style=\"position:relative;\">@@@metaicon<table align=\"left\" class=\"mi_resultcontainer\" @@@cond onclick=\"@@@click\"><tr><td rowspan=\"4\" valign=\"top\" style=\"padding-right:15px;padding-left:3px;width: 65px;\"><div style=\"position:relative;height: 100%;display:block;\">' +\n '@@@item' +\n '</div></td><th style=\"vertical-align: middle;\" align=\"left\"><div class=\"mi_resultpublisher\">@@@itempublisher<span class=\"mi_resulttimeago\"> @@@timeago' +\n '</div></span></th></tr><tr><td style=\"padding-right:30px;\"><div class=\"mi_resulttext\">@@@itemtext',\n instagramItem: '<div style=\"position:relative;\">@@@metaicon<table align=\"left\" class=\"mi_resultcontainer\" @@@cond onclick=\"@@@click\"><tr><td rowspan=\"4\" valign=\"top\" style=\"padding-right:15px;padding-left:3px;width: 65px;\"><div style=\"position:relative;height: 100%;display:block;\">' +\n '@@@item' +\n '</div></td><th style=\"vertical-align: middle;\" align=\"left\"><div class=\"mi_resultpublisher\" style=\"color:#838383;\">@@@itempublisher<span class=\"mi_resulttimeago\"> @@@timeago' +\n '</div></span></th></tr><tr><td style=\"padding-right:30px;\"><div class=\"mi_resulttext\">',\n itemContentImage: '</td></tr><tr><td colspan=\"2\"><div style=\"padding-right:10px;overflow:hidden;\"><img onload=\"if (!jQuery.MidasInsight.imageIsGood(this)) jQuery.MidasInsight.HandleMissingImage(\\'preview\\',this);\" onerror=\"jQuery.MidasInsight.HandleMissingImage(\\'preview\\',this);\" src=\"@@@itemcontentimage\" style=\"max-width: 275px;margin-top: 0px;margin-bottom: 15px;box-shadow: 0px 0 10px 4px #eee;float: right;border-radius: 5px;\"/></div>',\n lightboxContentImage: '</td></tr><tr><td colspan=\"2\"><div style=\"padding-right:10px;overflow:hidden;\"><div id=\"#mi_image_lightbox_@@@ksid\" onclick=\" jQuery(mi_image_lightbox_@@@ksid).fadeIn();\"><img src=\"@@@itemcontentimage\" style=\"max-width: 275px;margin-top: 0px;margin-bottom: 15px;box-shadow: 0px 0 10px 4px #eee;float: right;border-radius: 5px;\"></div><div class=\"mi_lightbox\" id=\"mi_image_lightbox_@@@ksid\" onclick=\"jQuery(this).fadeOut();\"><img src=\"@@@itemcontentimage\" style=\"nbox-shadow: 0px 0 10px 4px #eee;border-radius: 5px;\" onload=\"jQuery(this).css(\\'position\\', \\'relative\\').css(\\'top\\',\\'50%\\').css(\\'margin-top\\',((this.height/2)*-1)+ \\'px\\').css(\\'top\\',\\'50%\\',\\'!important\\');\"/></div></div>'\n }\n },\n RASTA: {\n panelLayout: {\n header: [\"tabs\", \"stars\"],\n content: [\"photos\", \"tags\", \"mentions\"],\n footer: [\"share\"]\n },\n panel: {\n videoholder: '<div id=\"mi_videoholder_@@@baseid\" class=\"mi_singlevideocontainer mi_closeTopLeft\" onclick=\"jQuery.MidasInsight.MI_GetPhotos(\\'@@@baseid\\',false)\" style=\"margin-top: 74px;background-position: 10px 18px;\"><div class=\"mi_singlevideo\"></div></div>',\n containerHtml: '<div style=\"padding:0px;margin-top:25px;border: 1px solid #ccc;\" class=\"mi_panelBackground mikfpanel mi_rasta\" id=\"cpcnt_@@@kfid\" style=\"direction: ltr;margin-top: 20px;@@@layout\"></div>',\n tabs: '<tr><td><div class=\"MI_tabs@@@orientation\" style=\"margin-left:0px !important;position:relative;z-index:30;box-shadow:none;left:0px;padding-top: 0 !important;\">@@@tabs</div></td></tr>',\n gauge: '<div class=\"mi_gradeselectgradbg\"></div><div class=\"mi_gradeselectmasknerrow' + (window.MI_defaults.RTL == 'true' ? ' mi_gradeselectmasknerrow_right' : '') + '\" style=\"background-image:url(\\'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHIAAABQCAYAAADFuSFAAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA25pVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDoyODYzNTRkZS04NWY4LTg3NDEtYjNmOS02OGU4NGQzZjVjODkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OTM0QjUyMzEwQ0ZBMTFFNTlCQjg4NzExODFEM0Q0M0QiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OTM0QjUyMzAwQ0ZBMTFFNTlCQjg4NzExODFEM0Q0M0QiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKFdpbmRvd3MpIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6RDVFOTA3RTFFN0Y4MTFFNDkzNjJGQzdDNUEyRDA1MTYiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6RDVFOTA3RTJFN0Y4MTFFNDkzNjJGQzdDNUEyRDA1MTYiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5NfkuaAAAX1klEQVR42uxdCZQdVZm+99by9u7Xr1+n926ykOASgQODS5gJijIGJQxbOM4IIosKKgoHZw7icubMAcHjuI3jCHJkNI4LGcEIKuoIozKj4uAIkTBEliyd3ve313bn++tVvby8vNd53R00CXVPbqrqVdWtW/93v3+5SzWXUrIgHfuJb9u2bUk3UgMIhUIsFosx27aZoigsn8+ztrY21t7ezvbu3csikYj7e7FYdO+JRqNM13U2OzvLUqkUE0Iwx3GYqqruNpPJuFsqo1JBzt3fDMNgiUSCzc/Pu+VS+T09PfT88NDQUE9ra2tnOBweRJn9uGcFbm1HDqOeKo5t7JvIczieQN6POu+ZmZnZj3qMo05Te/bscetNdaE60jvRs6mO1e9M9bAsy30XOucTga4tFAru/ZRzuRwzTdP9vaWlhWWzWfe9qN6opys3kg29G+Xp6Wk2OTnpXr+UpI6NjS3pRno4CZQqSS9NlSchU6KKTkxMuIKnytILUiIhEPhUabqeztG9mqa55UGwFWD9RMKia6iR0D41AgiyG8c9AD4NQZ6M3AehpXC+G2V2IrdhvxW3h5AVnHewtbDNovwZlDeOMkaxP4G6TaKh7YCg96Lek7juOQjZKZVKbv0oVzcoapQEEAHoA0HnKFNDpHehhkCyoPel3+m6ubm5yrtTI6D7/Pvp/ej30dHRSlmLBtKv6KKp7FXQb5W09Y+rz/nZB6U2+/f65/2t39Jpi/KiAHc9Dl+LxnEGGtDa9evXnwChtUE4YtWqVYeUWyMQApNeNATBtSOvIQFS2dTICBwwOguARsGknbjv97j25yjnSVwz4pflM7S6/Ebnaq+r/b1aLtXyWzKQR5OepxfyWyheJo58OgC8CHlDOp0eBIApUkmkCah1L/WlqxNpDa/RxMHSNQB1DcDcDICvx/4E8mOo0w9wzU8IVLr2aPQrjhogCUAiOlrmyVBNmwDehfF4/HQSNIFH6mip2qMZ7UKJ1CJleiYBC/UaB6groSYvhSofg6r8d/z+IPKvAOZsAGQNC4mBSG+Bs/E2qLhzkdvI9r6Y4DWTiPWUyTEDqJ0A9b2w0dfB3v0c7N2GxncvLpt4SQPpMRAEFOdBWO8BcH8Bry5Knp1vK46m5IOaTCY52LkRzslGAHotWPp11PVOvMfMSwpIzwbi3flrYOs+AgA3gYkcAvqTsq/ZRE4JVL6bAegrpqamPgGWXgWG3o53uw8aZua4BbI6FgR4L+vu7r5xxYoVlwNAnQCsDjeOpUSqnzJU7xoAejdAfAfe8xNoqD/8YztEfxQJel4ox0u/H6rzxo6OjkGyOxRvLcO6MgoPORdjUvK845jcKY0rQqhPKuHO79e8m4Nrw6X8c1sY07vVUJetKOT1Ulhi9yE6WZYm9z1pvNufj4+PnwaG3osCbwGYw8cNkB6IrxwcHLwVDNwMEH2vcNFOEXhdcGxzhDvGDqnEfmUWRwt6OHU/UyLTjm0xszDCVTVSBJBmnZqwUu6Ff2Y8qjElJYWgvgKLFwoTl4RCXSkmi+uB9gZVDSepVwgNZNEql94LjTU6OTl5BfKG4eHhj+DUvccskNW9ID09PZfBntwOddpDjgy594sC0LH2AcVfAsAnpZ3dAdB+zsz5WUWNESkPfq7QkBu9EoJxJVSUTC/W0O8rdGxaBTyGeoOstbZtnYufNmpqbD3nSrpxmYcmsvOdnZ1kQ0+Exvl2Npt9NTxesp8TxxSQJBTqi8RLJMDA27q6uq6FPVQWw0KoQUMacy84kv8rVyPf49L+A3AwmYMwRQFTuHIQQLWANQKy0bXl3iNioJjDf7+Buv2NYWbaTDu7FtecpWvJ81U1erLgSnQx6pZ6nMDMG4eGhjZAHu8FmI8fE0CSQAhEbFf29/d/qa+v7xxSpeS2N2PzHLOYl1buF0wJfdopzj4GEGeZBtlJ7p5nJGxkTr0rnLrx8Cy7CFxDXveXiuMsk9Y0MIngWt2Fiq5znAx2TEZYlEEjG2t6dtYr3wO3XJYC75P/2nHsXwPUL0BUvY5T+jtVCV+kqKFWznjT7ASIrx4ZGfk+nL13Qz7bXwxHSBzJwrwO5D8D+7bDJp5DoxPNgCjNgm3O7nnAmn7mIsfIvRnS/jGEPesCV5Gv4gqdOQZz8CO35qGmE0xmfgdtOMtULQyBRZlwplEegLQLLnBkG5lTApmzwAL102z3OinnEOTvxn6CGdYwzhcAjeoBLMvthtQxNRyu5LC/y3Gsq/LF0XPmss99oWTONa0qyaRAHp1g6VZ46e/zG/1RxUjf3pA9ROs7e2BgYCtY2J1Opw8b1Eur5Nj5ifsdI/tVaRs/4lCpZOcOUn0u8+AwWTkmiFGFIfgrvYwZU0yJDjAbIgYNq+pDrFXL7KX7padS3d8Ah/S1B93joDHEWCH7NADtQ1uxXDCFsKBZ5KGKmNNAgPpYsTT1mGUXt9oh82pdS2xRlVBrM6oWskmAnf8EJ6gDzPz4kez4OCKMpPgQLW3L6tWr7zvhhBO6SZ0uWEEaebDMR6A+N8nC9F9DvA9woRvMU3menQSZSoyZc6TmGDemvcrKso2kTNe49pI3o7lrnCO6R/HsI5wkprgXUENQNJ3poTjaAFQyM8sNqUpUAo0C9pLAfHfRmH21ZRa+gvo6zfQOwdyw3t7ej4XD4c9Bg/EjxUx1uWz0QLwAhv1OVLCF+kgXMKKQvTlnZ8a+xLTY33OhFOBKukxh8oCkuevOk3ChCq0S4+F2CNUDrNJAvK1jHkBI2hqTxkrmse1gFG08wkDcaO7HwXxZhVpVZcmDnB+hqC7TbQkVjTpaMgsoFRyzKluqSORnbCnflS+MPBrVU7cgPl29UOhCLCQwIbvrx8bGVNM0byAu/MmA9EGEOj0PLNwKEGMLgkiiLWV/4uQn78DdP60A4gvGMVw2CEV3277U4KyQl0oXEPMqcvYAd8w2bFNchN8CSafxo8n19Clg78lMbQO5wxW20r5gbSwcOUnlPLQLP/436VrO1d+jjEfhxBTBqEle47i5gIKtmhJmJXuCKTzCpGu2HZQnDjhJnNlcinvyxtwvVUX/UDSUuvJwMSfkRbvXjY6OmjBLH1wuMxcNpO+Z0ig5PNM3AcSvoYXFFgovpAlbODf0HRZpoxfMsmq1S4OrYJUbhxt5nFI9Z8PL3ENQWjCWvAdt+gKwYECGUhcAi7BIntbr2j/3bZLYTdZpdQqiFp0pqtvQBpHfpKrUt9tioqzRcGjAFCLyX1Ch3+dc/lC6jK1mc9nxKdnzLKJ1sIjSwTKw1VEnDJDjFfspmf1/2L06W5zcrSmhD4e0RPhwYOJdPwBmGlCzf0type7KpYCqLhZECuipfzQSiZwCdfplBPrJBUG0rXlp5N7nZMa3KvEOvKznhBCAZpEJNY6M8EHRKPwos69aiFJ2oSWczPTkFUzRzxVaf4sbgrBYBaSluge87Fn1h/QeetYqsPIytKp9kssHHdt8yJH2DodZL1RUqVt3h4XQCKbFs+VoiPuW2/G8XE0WzKl/cBzjIU2NfRNe7+qFwCTPHsz+0Nzc3DAA/aw/k+BFB5J0PDzSPlTgqwj0B1tbGztsTnYqB3AuF5GW7QDBY1jZznFyLEyrrD7hBEhybKrjdinTQPgaxJIXAayTeaTjRe5OdG0eWbF+lanXSiV0LcDZZTvF/7ClcTfY+r8H5GC59pI83iJi1rBMMQ1xq+PaXOmGLPBuf1MycpsdWfpOLJw+qSEAYGBXVxeNd96GMGV3JpP5LkUAiwVTXQyNSZ3C84oCvLtSqdSrFgoxnKm9GXP46cuUvvXbK94oriUh8HmEiIUc4wk4MaWcx0JeBtWx07j0vTyUuJgJ/ZWMC/bHT2VQQ2p6LSq31nJyF5aY+JZpTt4Flj7N3GYoXYZKDnupcDZVepZpLM6S6uABx4YrO2fyIxcXrNnvpONr1jV6Gmk5qNkIsLgLIA7T9BLycIk0zeKjNtfrwly76HU7fRQtaBP1WDQC0Z54IWPufOQqnuoFE9UDahKaTOB1ZR7BuRat8hjJmXFiYO3l8GZv5nqs/+gZrEJkKeJdqh7/oCIi1+CHm21p/RsYOu2yD8xUuM7GzKfw4ipri6zCb+qBUEZoT41ln7oUrL6vM/HyVY2eQqMnCNs68vn8lwHeGyYnJ6eImc2O0TYNJIEGAP8KQe0NUKkHzfc8iInT+\\/PWEz++jGvqdq7pHoDCVavcQCihRplNndC+x+\\/21jhnMi18s4ilz3XDkaM0hdV2MsyfN+zMFoD0ebBy2wEbFWaWsNiY8RQL2TEW1XoqHRSqiDwxnH3yPGiX+zvjJ61tVD75HtB6r4Ine8euXbuuBZgmTS1thpUqzcVsZigKAK5G/iLUaYgKr2tDZ8cyxlM/uxye33amhbyQAWqoiHBRg0dJMXNVLwxSC+Loa0S07WbYwXZ2lE3vaJR0JXFmV+y016KFrsqZY3ccUKUaA8hs3hlGaJZnXeFXuA4QkUDl+s6x7NMX495tbZHehmqWzBVYeQUigl/Bft7tTQddvrNDdhH01trb2/+Rut4aOTeymMuZ+56+hkv7u+B52bEhVxr2kKGxiI7eKhbaFJL0iGjyDiXc8nYmjr0ZApqIK2Dk7SEluQle7tthO4fIrgIwt7/sycwDLG/Ns3Z1oNwdyEkNix2zhf2XxtTUfboWWdVI88FsKSDPbTj8z/n5+WebmUGhEp0PZxsB4NUIM95Ko/oN0rSTz7wTCH3PVaOGiZJpC5c8N44mHCrHg9xzaNTQWXB0vswUbQ1T2DGbiG0JvWejI80f4sU+5kh5v3Q7/jRydNg4HKA25QQWVtrgVUbdGFnlkScyxcnLW5WuR1RRf3CWNB5k3QFtSeHIJYZhFA7HSuX888+vrD+ozTRtHi7xIBycrwHIlnoqFXEicyaHbpWZmbulUXSHmCgm5HDNhYiXmQlbyaMJmrSK641zRKrnW6JlRR87ThKYuCKurbikYM3Bi2O/pJhy3hwFgEnWFz4VwLawCCxHRLQzjUdgquSodMQGXaPuPN6wXxasXF0oFKhL8XGSvT/vtl5WG9k7n+ZQpR9B6+imWWN1VWp29kHr+R2fYwQeqYBQsjxmWBmC8vtBHfyTrxeJ9q8zPZJmx1mKa13ihMSGT40Un2QlK/dpv5NACJ1FlRAzHaPSTxxSmGXb1j1gWgmAnVtv8IJkD3upQLXehP2HQKo9C7FS1GMiOTekUsHCNyJf3Uj9ymJ+j5ybfg+PtmR5BA6dhkaBcMON6X0Q3Q5xihPlWTyWuBcgdrDjNIWUBO+NnPpJhek3mk4BMuBljxPWlNo1dRhIZmNrUxD6TdxyHvInFxotgVlbAx/lJlrdRetUGmV1amqqrl3UdT28du3aj5MXVTdEkbJgT4x8WM5N7uehmNcfSr01BXeYqjL6YJZgE/U380Tqq1wLpdlxnjQRVQbjZ3xiqPCELDm5z/gzCfxwzakZ7cLxHWDaXyKf2igkgVa8Gp7sPXA8f9so7BP1VkhRAhO3wFM9s3qt4kEVmBx5SM5NfYOrYYQVzLONpFoR6EcSlczbe/qVvjWf46HoCvYSSWGlVT81dcmnYmrbDaZTFOXBbVZZoeYvxfOC/VnqOHcHExp04SFuD8O0fZSmlDaKKdV6MSPsZhvimOtp4Wddvew4IyjvSpFoc0OMigolF9TvibDhudpOXHQP3ArbuZa9xFJKHxSJ1IpPGoaVgyq9y++rJiBpPm/NsrpfIH8bsr6qXlk0PAhmnlMsFjfRyrBaTNwGUk+tdnV1vRW6+TTqkqvLxpnJzwDMWdg8xkNgJLEPal/OzzA5O8Xk9AQFoIzHWz7ABb+MvUSTJiJqVI/fpKiiq9rDJCD9Rb6UPb/kX4idjZxO4BEFHjQMGPZ/45xXVo6rvs6mH6nQSCQS7u3tvZ4C/3r6WGbnn7NH993LFdIY7lg+o7BDzs0QA2keBEA0mOhbdbbSlr6JvcQTGvKJGteuhJxvqx1JqlaT3lTJh2k5YV2vGFEDmLkZseXpsJWP+iD6S+XFunXrKqtpCUjo481wcE6vy0Z6+MjQN3g+t4cV4cTk8wzBJlgZYUq6iyldfdh2M5HuHlTaO79ItpoFidKtyK+rZVntMa0bYQ2mfdB5mDoN7Hs3LWOnbxLQMnxitvvdgoGBAXeH1q8DUAVq9Tp/7f8hOGbmn7czc3dy6kctj6qSTw0nRy/35HjzMZTewQt5S3JtgN8BECDbO2C2LsXhQutBHgeZvgnZv6PeSSIXzY8C4OtQ5jNULo2akDl040h4qG6fKtIZxMYGI/7Syc1t5fHEftYCorW0gu8tzAErrb0vMGtoN7P3PM/s4X2vYeHoLQF8h4B5JsB8Z3V0UGc6pASQX5Hy4JGFaqcmlUrFoEpp1ZcLrN8PKwzDINSSoG0bTrwdejhWd32GZU5zVf+S6IDqTLYz0Z52mcj1MBOtKSYSADcSZcrAyo9zXW8PoKsLxN8AuJ56H5DwvyCCfVrW/t1GZZAHi+u24JougNkCNiaxn6Rv0NxfKpUUhBscJ05t5Knae3f/j7N/zwTXveEpcoRUjVUGjmFfRTh2ttLde1YAWcP0MsibQPhstdqt+aiFgfPfwnYzOb6HeMLlOVMrcc1DOJz0Q0gOoyl9D4poSjq3TtyYs/e+sFkW8g+7A78EYi6LUGOOSd+WlkphZfWJ25SVq94a4NU4Qc7Pg0WvBXDj1Wq1JtDvA+t+hPMvr1cGmUGaPVAdVVBPwTQxthzNN0iF/ONOJrOJK8qEO1cFLHQnVjvywCRvx3olb2n7KQ+FVgRwLZwAxM3Y3H4YL/YbAPNtTRZpeHMTD9OKiqVHwLgJSZ8iQ7jhwO11xseZMzPNnOlpZo9PkLp9QwBicwmabwvYxGu7RWvYuXUxZR5+ihrNSy3mHnbXJdIDSZVqqmsTWcko52IxBZreEEDUtAc7iLzxICBqvpIFMH8Hn+UPRw5IyfYjJvwZb00yjpBDJFqYNK2ybdQ1F1Qej60X6XRvAFHzXbEAbEOto1PjzY5i+1jTLD/cBc7Y2HPO+BjnIW8eDkIchyvueCPN6ZQIRpV0+wX1PKwgLZjO9oawrKpuumpbKSnoh52UzZi/wzKSp1KPKitX5kRfHxP9A0xGEXYWCmClWc6FfCfU7RuPlRlwR1Gi8cczawP+6gxWfo8i+OUz0jTzcnx8V7VHxamDtrvLa0LSfbqS7ugPcFm0nUwCqBW1Tk71wDOONX8Mc3lAquo+3tGx3VWp7uw4gxk7d5BzU57qCEaKaPQKZUVnS8DHJcWUFyJvpyi8TixJ6WkA/gNsz18ekI5UuR4qL0GiB2k6C53xmvJybn9toOP0cEUJUFlal12nh0GpwSU55NFlq1Z7/76wMzLM3Fnj3iopu5j3VlVhY5i6duK6lOgOHNalJKjRpGVZbWBdboHLos18m0gsrMfZnUxwqzJiZRrMoQFlFCxJtdJXjTl/QwDJktMpAPGURmGIt/8ANvllMVL0Dz6LfODYsplqW+VZAMyd8mhwVTECPJaW6vXq1ElDyPRR+Ohy4siDBiaFqtBX0AMEjjCehzlPc3SUpTOSZoYXS7Kyypi2CD34MfpJzqM4Zet4swcdLm81lg0gZ2dYZaojfeUx1e5NfwzSkUq2bZ+E/HD1XxyonWbTDJCiMSFt5uQzyNlyLuSZzB3SeBx2yDcag7RIz/Vd/jINykv9TEtDetHKKRGJ2O4nxAgtw2Cl3c8wXVOY0urN5HBskwnFCeBYVir5Ix/+4L6/vxiyNNaTqsZEZ0/J7b0Jh5k9jrjUMtw5qw5iSWt+hqmxxEYRTfQF/axLTwCu0qtT7++Y4Li0bI9JWuZ11uhQD7Os8hJyeggApqXkxZ2/Wy8deYu7ejNIS04Aiv7C0MUN/jAMeazvYuUZHMvoENBCrxMtSfq+6GoocxXA6rTFqdPCq9Y9qMRbBgMolp2SAPMe5Pdjn9b1a56mpG/zfAH5ymbCD+79eYPEYS7e6cxM/tYc3hPS+lcZIpHciKbUF2Bw5JLHxl8j7waoDo7fhG2zyxCNZoH0n8YCe3hUpkUCGaQAyCAFQAYpADIAMkgBkEEKgAxSAGQAZABkAGSQAiCDFAAZpADI4xxI+qi593nHIB2jySIg6ftn9B1PEcjj2AXy/wUYACIPOMIobjzuAAAAAElFTkSuQmCC\\');width:100%;background-repeat: no-repeat;background-position: 15px 6px;\"></div><div class=\"mi_gradeselecthandlenerrow\"></div><div class=\"mi_gradeselectdigitsnerrow\" ' + (window.MI_defaults.RTL == 'true' ? 'style=\"direction:ltr!important;\"' : 'style=\"direction:ltr; LEFT: -4PX;TOP: 30PX;\"') + '><span style=\"font-size: 43px;z-index: 3;color: #92c83e;font-family: \\'Source Sans Pro\\', Alef!important;\"></span></div><div class=\"mi_gradeselecttext\" ' + (window.MI_defaults.RTL == 'true' ? 'style=\"top:77px;direction:rtl;color:#b8b8b8;\"' : 'style=\"top:77px;direction:ltr;color:#b8b8b8;\"') + '></div>',\n starspanel: {\n header: '<tr><td style=\" border-top: 1px solid #DFDFDF;\"><div class=\"mi_hover_starspanel\" style=\"border-bottom: 1px solid #dfdfdf !important;padding-bottom:5px;;overflow:hidden;border-top:1px solid transparent; padding-top: 20px;margin-top: -17px;background: #f7f7f7; /* Old browsers */background: -moz-linear-gradient(top, #f7f7f7 0%, #ffffff 100%); /* FF3.6+ */background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f7f7f7), color-stop(100%,#ffffff)); /* Chrome,Safari4+ */background: -webkit-linear-gradient(top, #f7f7f7 0%,#ffffff 100%); /* Chrome10+,Safari5.1+ */background: -o-linear-gradient(top, #f7f7f7 0%,#ffffff 100%); /* Opera 11.10+ */background: -ms-linear-gradient(top, #f7f7f7 0%,#ffffff 100%); /* IE10+ */background: linear-gradient(to bottom, #f7f7f7 0%,#ffffff 100%); /* W3C */filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=\\'#f7f7f7\\', endColorstr=\\'#ffffff\\',GradientType=0 ); /* IE6-9 */width: @@@widthpx;left: -0px;position: relative; height: 30px;\"><table style=\"position:relative\">',\n footer: '</tr></table></div></td></tr>'\n },\n tag: '<span onclick=\"jQuery.MidasInsight.tagClicked(\\'@@@kfid\\',\\'@@@atags\\')\" class=\"mi_tag_@@@atagsreplace mi_tag\">@@@atagscap<span style=\"display:inline-block;background-color:@@@color;-webkit-font-smoothing: antialiased;padding: 0;margin-bottom: 0;margin-left: 0;margin-top: 5px;left: 4px;position: relative;width:6px;height:6px;border-radius:50%; box-shadow: inset 0 0 10px 10px rgba(0,0,0,0.2);\"></span></span>',\n slidercontainer: '<div id=\"mi_previewPhotosContainer_@@@kfid\" style=\"height:65px;cursor:default;-moz-user-select: none; -webkit-user-select: none; -ms-user-select:none; user-select:none;\" unselectable=\"on\" onselectstart=\"return false;\"><table class=\"mi_previewPhotosContainer\" style=\"\" cellspacing=\"0\"><tr>',\n photopreview: '<tr ><td id=\"mi_photopreview_@@@kfid\" onclick=\"window.MI_logUsage(\\'photo_preview_clicked\\',\\'@@@kfid\\');if(jQuery.inArray(\\'photos\\', jQuery.MidasInsight.ObjDictionary[\\'@@@kfid\\'].options.tabs) ==-1) return;jQuery(this).find(\\'.mi_thumbscontainer\\').hide();jQuery.MidasInsight.MI_GetPhotos(\\'@@@kfid\\',false);\" colspan=\"2\" style=\"width: 100%;overflow: hidden;background-color:white;\"><div class=\"mi_thumbscontainer\" style=\"margin:0 auto;overflow:hidden;width:@@@widthpx;padding-top: 3px;border-top: 0px solid rgba(0,0,0,0.2);\">',\n tabswrapper: {\n header: '<div style=\"width: 152px;margin: 0 auto;background: #fefefe; /* Old browsers */background: -moz-linear-gradient(top, #fefefe 0%, #eeeeee 100%); /* FF3.6+ */background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fefefe), color-stop(100%,#eeeeee)); /* Chrome,Safari4+ */background: -webkit-linear-gradient(top, #fefefe 0%,#eeeeee 100%); /* Chrome10+,Safari5.1+ */background: -o-linear-gradient(top, #fefefe 0%,#eeeeee 100%); /* Opera 11.10+ */background: -ms-linear-gradient(top, #fefefe 0%,#eeeeee 100%); /* IE10+ */background: linear-gradient(to bottom, #fefefe 0%,#eeeeee 100%); /* W3C */filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=\\'#fefefe\\', endColorstr=\\'#eeeeee\\',GradientType=0 ); /* IE6-9 */-webkit-border-radius: 15px;-moz-border-radius: 15px;border-radius: 15px;border: 1px solid #cbcbcb;padding: 5px;\">',\n footer: '</div>'\n },\n footer: {\n header: '<div class=\"mi_footerwrapper\" style=\"background-color:#fff;\"><div class=\"mi_footerroot\" style=\"top:2px;\"><div class=\"mi_footercontainer\" id=\"mi_footercontainer_@@@kfid\" nstyle=\"height:100%;position:static;\">' +\n '<div class=\"mi_footer\" style=\"background-image:none;height:auto;margin-top:2px;\"><div onclick=\"jQuery(\\'#cpcnt_@@@kfid\\').find(\\'.MI_tab_selected\\').removeClass(\\'MI_tab_selected\\');jQuery(\\'#mipct_scroll_@@@kfid\\').addClass(\\'mi_blured\\');jQuery(\\'#mipct_tblabout_@@@kfid\\').css(\\'max-height\\',jQuery(\\'#mipct_scroll_@@@kfid\\').height()+1).css(\\'height\\',jQuery(\\'#mipct_scroll_@@@kfid\\').height()+1).css(\\'top\\',jQuery(\\'#mipct_scroll_@@@kfid\\').position().top).fadeIn();\" style=\"z-index: 1;position: absolute;right: 0px;top: 5px;height: 25px;width: 65px;cursor: pointer;display:none;\"></div>',\n share: '<div><ul class=\"mi_share-buttons\" style=\"padding:0; margin: 0 10px 5px;;\"><li><a onclick=\"window.MI_logUsage(\\'share\\');\" href=\"https://www.facebook.com/sharer/sharer.php?u={0}\" target=\"_blank\"><div style=\"margin-right: -6px;background-image: url(//d34p6saz4aff9q.cloudfront.net/img/f.png);height: 30px;width: 30px;\"></div></a></li>' +\n ' <li><a onclick=\"window.MI_logUsage(\\'share\\');\" href=\"https://twitter.com/intent/tweet?url={0}&text={1}:\" target=\"_blank\" title=\"Tweet\"><div style=\"background-image:url(//d34p6saz4aff9q.cloudfront.net/img/t.png);height: 30px;width: 30px;\"></div></a></li><li style=\"display:none;\"><a onclick=\"window.MI_logUsage(\\'share\\');\" href=\"http://pinterest.com/pin/create/button/?url={0}&description={2}\" target=\"_blank\" title=\"Pin it\"><img onload=\"this.style.opacity=1;this.style.top=0;\" src=\"//d34p6saz4aff9q.cloudfront.net/images/footer/Pinterest.png\" style=\"opacity:0\"></a></li>' +\n '<li><a onclick=\"window.MI_logUsage(\\'share\\');\" href=\"https://plus.google.com/share?url={0}\" target=\"_blank\" title=\"Share on Google+\"><div style=\"background-image: url(//d34p6saz4aff9q.cloudfront.net/img/g.png); ;width:30px;height:30px;background-repeat: no-repeat;\"></div></a></li></ul></div>' +\n '<div class=\"mi_footer_prompt\" style=\"color:#59a3e8;top:auto;border-top:none;position:static;float:left;margin-bottom:0;padding: 7px;\">@@@ask</div>',\n callForActions: '<tr><td><div id=\"cfa\" style=\"white-space:nowrap;padding: 0;margin-top: -2px;\"><div onclick=\"alert(\\'call to add to favorites\\')\" style=\"cursor:pointer;height: 21px;width: 50%;margin: 0;display: inline-block;text-align: center;vertical-align: middle;padding-top: 7px;border: 1px solid rgb(239, 239, 239);border-left: none;font-size: 12px;color: #111;border-top: none;\">+Add to Favorites</div><div onclick=\"alert(\\'call to book\\')\" style=\"cursor: pointer;height: 21px;width: 50%;margin: 0;display: inline-block;text-align: center;vertical-align: middle;padding-top: 7px;border: 1px solid rgb(239, 239, 239);border-left: none;font-size: 12px;color: #111;border-top: none;background-color: #31b444;color: white;\">Book</div></div></td></tr>'\n },\n header: {\n header: '<div class=\"mi_panelheader\" style=\" max-width: @@@widthpx;overflow: hidden;display: block;\"><table class=\"mi_rasta\" align=\"left\" class=\"mi_reset mi_greenredtitle\" style=\" max-width: @@@widthpx;overflow: hidden;display: block;\"><tr><td class=\"mi_header_caption@@@gaugeOrientation\" style=\"padding:0 !important;@@@exttrastyle\">' +\n '<div class=\"mi_drag_area\" style=\"position: absolute;width: 100%;height:125px;left:0;z-index: 2\"></div>' +\n '<div class=\"mi_green_close@@@gaugeOrientation\" onclick=\"jQuery.MidasInsight.hidePanel(\\'@@@kfid\\');\" style=\"z-index:3;cursor:pointer;display:none;\">✕</div>'\n // score gauge\n +\n '<div class=\"oi_gauge oi_gauge_@@@clsgrade mi_gradselectroot @@@gaugeOrientation\" id=\"mi_gradselectroot_@@@kfid\" data-score=\"@@@decgrade\" ></div>' +\n '<div class=\"mi_titlescore oi_color_@@@clsgrade\" style=\"@@@titleOrientation;text-align: left;margin-top: 16px;width: 240px;font-size: 25px;height: 0px;margin-left: 105px;\" >@@@textgrade</div>' +\n '<div class=\"mi_title\" style=\"@@@titleOrientation;margin-top: 22px;width: 240px;float: left;height: 41px;margin-left: 102px;color: #030303;\" >@@@displayText</div>' +\n '<div style=\"float:left !important;margin-left:102px;color: #A0A0A0; margin-top: -5px; nmargin-left: 0!important;npadding-left: 0!important;\" class=\"mi_subtitle\" >@@@count</div>' +\n '<div class=\"mi_preview_images\" style=\"z-index: 3;width: 100px;height: 60px;border: 0px solid #ababab;position: absolute;right: 18px;top: 33px;padding: 0px 0px 0px 0px;cursor: pointer;\" onclick=\"if(jQuery.inArray(\\'photos\\', jQuery.MidasInsight.ObjDictionary[\\'@@@kfid\\'].options.tabs) ==-1) return; jQuery.MidasInsight.MI_GetPhotos(\\'@@@kfid\\',false);\"><div style=\"border: 0px solid #ababab;width:100%;height:100%;background-image:url(@@@previewimgsrc); background-size: contain;background-repeat: no-repeat;background-position: center top;\"></div></div>'\n\n // tools tabs\n +\n '<div style=\"clear:both;height:0px;margin-bottom:0px;border-top:0px solid #DBDBDB!important;\"></div>' +\n '</td></tr>',\n footer: '</table></div>'\n }\n },\n scrollables: {\n header: '<div style=\"clear:both;height: px;margin-bottom:0px;border-top:0px solid #DBDBDB\"></div><div id=\"mipct_scroll_@@@kfid\" tabindex=\"-1\" style=\"heightdummy:0;outline:none;max-height:none;\" class=\"mi_scroll\">' +\n '<table align=\"left\" id=\"mipct_tbldefault_@@@kfid\" class=\"mi_results mi_scrolledcontent\">',\n footer: '</table></div>'\n },\n socialItem: {\n timelineItem: '<div class=\"mi_timeline\">@@@fullYear<br/>@@@month<br/>@@@date</div>',\n metaIcon: function(data, baseid) {\n return \"<div style=\\\"left:auto;position: absolute;right: 24px;-moz-transform:none;-moz-filter:grayscale(100%);filter: grayscale(100%);zoom: 1;-webkit-filter: grayscale(1);top: 5px;\\\" class=\\\"mi_widget_social_icon_small mi_widget_social_icon_small_\" + (data.source.replace('.com', '').replace('www.', '').replace('.', '').replace('.', '')).trim().capitalize() + \"\\\" mi_data-tooltip=\\\"\" + (data.source.replace('.com', '').replace('www.', '').replace('mi.google.reviews', 'Google Reviews').replace('plus.google', 'Google+')) + \"\\\"></div>\";\n },\n nonTimelineItem: '<img data-source=\"@@@sourceSite\" onerror=\"jQuery.MidasInsight.HandleMissingImage(\\'avatar\\',this)\" src=\"@@@itemImageURL\" valign=\"top\" class=\"mi_resultimage\">',\n youtubeItem: '<div style=\"position:relative;\"><div class=\\\"MI_SourceIcon MI_@@@sourceSite\\\" mi_data-tooltip=\\\"@@@sourceSite\\\"></div><table align=\"left\" class=\"mi_resultcontainer\" style=\"direction:ltr!important;cursor:default;\"><tr><td rowspan=\"4\" valign=\"top\" style=\"padding-right:15px;padding-left:3px;width: 65px;\"><div style=\"position:relative;height: 100%;display: block;\">' +\n '@@@sourceAvatar' +\n '</div></td><th style=\"vertical-align: middle;\" align=\"left\"><div class=\"mi_resultpublisher\">@@@itemPublisher<span class=\"mi_resulttimeago\">@@@timeAgo' +\n '</div></span></th></tr><tr><td style=\"padding-right:30px;\">' +\n '</td></tr><tr><td colspan=\"2\"><div style=\"padding-right:10px;overflow:hidden;position:relative;max-width: 275px;\" class=\"mi_imgcontainer\"><img src=\"https://i.ytimg.com/vi/@@@sourceURL/mqdefault.jpg\" style=\"max-width: @@@itemWidth ;min-width:185px;margin-top: 15px;margin-bottom: 15px;box-shadow: 0px 0 10px 4px #eee;border-radius: 5px;display:inline;\"/><img src=\"//d34p6saz4aff9q.cloudfront.net/images/playvideow.png\" style=\"position:absolute;cursor: pointer;left: 50%!important;margin-top: 20%;display:inline;margin-left: -30px;\" onclick=\"window.MI_logUsage(\\'play_video\\',\\'@@@baseid\\');@@@click\" onerror=\"this.style.display=\\'none\\';\"/></div>' +\n '</div></td></tr></table></div>',\n lightboxYoutubeItem: '<div style=\"position:relative;\"><div class=\\\"MI_SourceIcon MI_@@@sourceSite\\\" mi_data-tooltip=\\\"@@@sourceSite\\\"></div><table align=\"left\" class=\"mi_resultcontainer\" style=\"direction:ltr!important;cursor:default;\"><tr><td rowspan=\"4\" valign=\"top\" style=\"padding-right:15px;padding-left:3px;width: 65px;\"><div style=\"position:relative;height: 100%;display: block;\">' +\n '@@@sourceAvatar' +\n '</div></td><th style=\"vertical-align: middle;\" align=\"left\"><div class=\"mi_resultpublisher\" style=\"color:#838383;\">@@@itemPublisher<span class=\"mi_resulttimeago\" itemDate=\"@@@itemDate\">@@@timeAgo' +\n '</span></div></th></tr><tr><td style=\"padding-right:30px;\"></td></tr>' +\n '<tr><td colspan=\"2\" onclick=\"@@@click\" style=\"cursor: pointer; cursor: hand;\"><div style=\"padding-right:10px;overflow:hidden;position:relative;max-width: 275px;\" class=\"mi_imgcontainer\">' +\n '<div id=\"#mi_image_lightbox_@@@ksid\" >' +\n '<img src=\"https://i.ytimg.com/vi/@@@sourceURL/mqdefault.jpg\" style=\"max-width: @@@itemWidth ;min-width:185px;margin-top: 15px;margin-bottom: 15px;nbox-shadow: 0px 0 10px 4px #eee;float: right!important;border-radius: 2px;display:inline;\"/>' +\n '<img src=\"//d34p6saz4aff9q.cloudfront.net/images/playvideow.png\" style=\"position:absolute;cursor: pointer;left: 50%!important;margin-top: 20%;display:inline;margin-left: -30px;\" '\n //+'onclick=\"window.MI_logUsage(\\'play_video\\',\\'@@@baseid\\');@@@click\" '\n +\n 'onerror=\"this.style.display=\\'none\\';\"/></div>'\n //+'<div class=\"mi_lightbox\" id=\"mi_image_lightbox_@@@ksid\" onclick=\"jQuery.MidasInsight.StopYoutubeVideo(jQuery(\\'#mi_image_lightbox_@@@ksid iframe\\')[0]);jQuery(this).fadeOut();\"><iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/@@@youtubeid?enablejsapi=1\" frameborder=\"0\" allowfullscreen></iframe></a></div>'\n +\n '</td></tr></table></div>',\n lightboxVimeoItem: '<div style=\"position:relative;\"><div class=\\\"MI_SourceIcon MI_@@@sourceSite\\\" mi_data-tooltip=\\\"@@@sourceSite\\\"></div><table align=\"left\" class=\"mi_resultcontainer\" style=\"direction:ltr!important;cursor:default;\"><tr><td rowspan=\"4\" valign=\"top\" style=\"padding-right:15px;padding-left:3px;width: 65px;\"><div style=\"position:relative;height: 100%;display: block;\">' +\n '@@@sourceAvatar' +\n '</div></td><th style=\"vertical-align: middle;\" align=\"left\"><div class=\"mi_resultpublisher\" style=\"color:#838383;\">@@@itemPublisher<span class=\"mi_resulttimeago\" itemDate=\"@@@itemDate\">@@@timeAgo' +\n '</span></div></th></tr><tr><td style=\"padding-right:30px;\"></td></tr>' +\n '<tr><td colspan=\"2\" onclick=\"@@@click\" style=\"cursor: pointer; cursor: hand;\"><div style=\"padding-right:10px;overflow:hidden;position:relative;max-width: 275px;\" class=\"mi_imgcontainer\">' +\n '<div id=\"#mi_image_lightbox_@@@ksid\" '\n //+'onclick=\" jQuery(mi_image_lightbox_@@@ksid).fadeIn();jQuery(\\'#mi_iframe_lightbox_@@@ksid\\').attr(\\'src\\',jQuery(\\'#mi_iframe_lightbox_@@@ksid\\').attr(\\'data-src\\'));\"'\n +\n '><img src=\"@@@itemContentImageURL\" style=\"max-width: @@@itemWidth ;min-width:185px;margin-top: 15px;margin-bottom: 15px;nbox-shadow: 0px 0 10px 4px #eee;float: right!important;border-radius: 2px;display:inline;\"/>' +\n '<img src=\"//d34p6saz4aff9q.cloudfront.net/images/playvideow.png\" style=\"position:absolute;cursor: pointer;left: 50%!important;margin-top: 20%;display:inline;margin-left: -30px;\" '\n //+'nonclick=\"window.MI_logUsage(\\'play_video\\',\\'@@@baseid\\');@@@click\" onerror=\"this.style.display=\\'none\\';\"\n +\n '/></div>'\n //+'<div class=\"mi_lightbox\" id=\"mi_image_lightbox_@@@ksid\" onclick=\"jQuery(\\'#mi_iframe_lightbox_@@@ksid\\').attr(\\'src\\',\\'\\');jQuery(this).fadeOut();\"><iframe id=\"mi_iframe_lightbox_@@@ksid\" data-src=\"@@@sourceURL?autoplay=1&title=0&byline=0&portrait=0\" width=\"500\" height=\"281\" frameborder=\"0\" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>'\n //+'</a></div>'\n +\n '</td></tr></table></div>',\n normalItem: '<div style=\"position:relative;\">@@@metaicon<table align=\"left\" class=\"mi_resultcontainer\" @@@cond onclick=\"@@@click\"><tr><td rowspan=\"4\" valign=\"top\" style=\"padding-right:15px;padding-left:3px;width: 65px;\"><div style=\"position:relative;height: 100%;display:block;\">' +\n '@@@item' +\n '</div></td><th style=\"vertical-align: middle;\" align=\"left\"><div class=\"mi_resultpublisher\">@@@itempublisher<span class=\"mi_resulttimeago\" style=\"\"> @@@timeago' +\n '</div></span></th></tr><tr><td style=\"padding-right:30px;\"><div class=\"mi_resulttext\">@@@itemtext',\n instagramItem: '<div style=\"position:relative;\">@@@metaicon<table align=\"left\" class=\"mi_resultcontainer\" @@@cond onclick=\"@@@click\"><tr><td rowspan=\"4\" valign=\"top\" style=\"padding-right:15px;padding-left:3px;width: 65px;\"><div style=\"position:relative;height: 100%;display:block;\">' +\n '@@@item' +\n '</div></td><th style=\"vertical-align: middle;\" align=\"left\"><div class=\"mi_resultpublisher\" style=\"color:#838383;\">@@@itempublisher<span class=\"mi_resulttimeago\"> @@@timeago' +\n '</div></span></th></tr><tr><td style=\"padding-right:30px;\"><div class=\"mi_resulttext\">',\n itemContentImage: '</td></tr><tr><td colspan=\"2\"><div style=\"padding-right:10px;overflow:hidden;\"><img nonload=\"if (!jQuery.MidasInsight.imageIsGood(this)) jQuery.MidasInsight.HandleMissingImage(\\'preview\\',this);\" onerror=\"jQuery.MidasInsight.HandleMissingImage(\\'preview\\',this);\" src=\"@@@itemcontentimage\" style=\"max-width: 275px;margin-top: 0px;margin-bottom: 15px;nbox-shadow: 0px 0 10px 4px #eee;float: right;border-radius: 5px;\"/></div>',\n lightboxContentImage: '</td></tr><tr><td colspan=\"2\"><div style=\"padding-right:10px;overflow:hidden;\"><div id=\"#mi_image_lightbox_@@@ksid\" ><img src=\"@@@itemcontentimage\" style=\"max-width: 275px;margin-top: 0px;margin-bottom: 15px;nbox-shadow: 0px 0 10px 4px #eee; border-radius: 2px;float: left!important;cursor:pointer;\" nonerror=\"jQuery.MidasInsight.HandleMissingImage(\\'preview\\',this);\" nonload=\"if (!jQuery.MidasInsight.imageIsGood(this)) jQuery.MidasInsight.HandleMissingImage(\\'preview\\',this); else ' +\n '{jQuery.MidasInsight.AddtoGallery(\\'@@@kfid\\', { href: \\'@@@itemcontentimage\\', title:\\'\\' });' +\n ' jQuery(this).parent().attr(\\'onclick\\',\\'jQuery.MidasInsight.ShowLightBoxURL(\\\\\\'@@@itemcontentimage\\\\\\',\\\\\\'@@@kfid\\\\\\')\\');}\"></div></div>'\n //<div class=\"mi_lightbox\" id=\"mi_image_lightbox_@@@ksid\" onclick=\"jQuery(this).fadeOut();\"><img src=\"@@@itemcontentimage\" style=\"nbox-shadow: 0px 0 10px 4px #eee;border-radius: 5px;\" onload=\"jQuery(this).css(\\'position\\', \\'relative\\').css(\\'top\\',\\'50%\\').css(\\'margin-top\\',((this.height/2)*-1)+ \\'px\\').css(\\'top\\',\\'50%\\',\\'!important\\');\"/></div></div>'\n }\n }\n }\n\n var langDictionary = {\n EN: {\n scores: ['Lame', 'Fair', 'Okay', 'Good', 'Great!'],\n basedon: 'Based on %d Reviews & Mentions ',\n ask: 'Ask friends for their opinion',\n mentions: 'Mentions <br/>&&nbsp;Reviews',\n media: 'Photos <br/>&&nbsp;Videos',\n facebook: 'Facebook',\n feelter: 'Social <br/>Insights',\n comment: 'Comment',\n back: 'Back',\n insights: 'Insights',\n clickhere: \"CLICK HERE\",\n hoverbuttontext: 'REVIEWS, MENTIONS & PHOTOS',\n rating: 'Rating <span style=\"font-family: \\'Source Sans Pro\\'\">%d</span> Reviews & Mentions',\n translate: 'Translate'\n },\n FR: {\n scores: ['Boiteux', 'Juste', 'Bien', 'Bon', 'Grand!'],\n basedon: 'Basé sur %d Critiques et Mentions ',\n ask: 'Demandez à vos amis pour leur opinion',\n mentions: 'Mentions & Commentaires',\n media: 'Photos & Vidéos',\n facebook: 'Facebook',\n feelter: 'Insights sociaux',\n comment: 'Commentaire',\n back: 'Arrière',\n insights: 'Insights',\n clickhere: \"CLIQUEZ ICI\",\n hoverbuttontext: 'CRITIQUES, MENTIONS ET PHOTOS',\n rating: ' Rating %d Critiques & Commentaires'\n },\n IT: {\n scores: ['Zoppo', 'Fiera', 'Bene', 'Buono', 'Grande!'],\n basedon: 'Sulla base %d Recensioni e Menzioni',\n ask: 'Chiedi amici per il loro parere',\n mentions: 'Menzioni & Recensioni',\n media: 'Foto & Video',\n facebook: 'Facebook',\n feelter: 'Insights Sociali',\n comment: 'Commento',\n back: 'Indietro',\n insights: 'Insights',\n clickhere: \"CLICK HERE\",\n hoverbuttontext: 'REVIEWS, MENTIONS & PHOTOS',\n rating: 'Rating %d Reviews & Mentions'\n },\n DE: {\n scores: ['lahm', 'Messe', 'Okay', 'gut', 'Na Toll!'],\n basedon: 'Basierend auf %d Bewertungen & Mentions ',\n ask: 'Fragen Sie Freunde nach ihrer Meinung',\n mentions: 'Erwähnungen & Reviews',\n media: 'Fotos & Videos',\n facebook: 'Facebook',\n feelter: 'Social Insights',\n comment: 'Kommentar',\n back: 'Der Rücken',\n insights: 'Insights',\n clickhere: \"HIER KLICKEN\",\n hoverbuttontext: 'REZENSIONEN, ERWÄHNUNGEN UND FOTOS',\n rating: 'Bewertung %d Rezensionen und Erwähnungen'\n },\n ES: {\n scores: ['Cojos', 'Justo', 'Bien', 'Bueno', 'Excelente!'],\n basedon: 'Basado en %d Comentarios y Menciones ',\n ask: 'Pregunte a sus amigos para su opinión ',\n mentions: 'Menciones',\n media: 'Medios',\n facebook: 'Facebook',\n feelter: 'Feelter',\n comment: 'comentario',\n back: 'Back',\n clickhere: \"CLIC AQUÍ\",\n hoverbuttontext: ' COMENTARIOS, MENCIONCES Y FOTOS',\n rating: 'Puntuación %d Comentarios Y Menciones'\n },\n HE: {\n scores: ['גרוע', 'סביר', 'טוב', 'טוב מאוד', '!מעולה'],\n basedon: 'מבוסס על %d חוות דעת ',\n ask: 'שתף את החברים ',\n mentions: 'חוות&nbsp;דעת',\n media: '×ª×ž×•× ×•×ª ווידאו',\n facebook: 'פייסבוק',\n feelter: 'Feelter',\n comment: 'תגובה',\n moreInfo: 'מידע × ×•×¡×£',\n back: 'סגור',\n insights: '×ª×•×‘× ×•×ª',\n clickhere: \"לחץ כאן\",\n hoverbuttontext: 'ביקורות, איזכורים ×•×ª×ž×•× ×•×ª',\n rating: 'הדירוג מבוסס על <span style=\"font-family: \\'Source Sans Pro\\'\"> %d </span>ביקורות ואיזכורים',\n translate: 'תרגם'\n },\n CN: {\n scores: ['拉梅', '公平', '好吧', '好', '太好了!'],\n basedon: '基于%d个评论与说起 ',\n ask: '问朋友他们的意见 ',\n mentions: '说起 ',\n media: '媒体 ',\n facebook: 'Facebookçš„ ',\n feelter: 'Feelter',\n comment: '评论}',\n back: 'Back',\n clickhere: \"CLICK HERE\",\n hoverbuttontext: 'REVIEWS, MENTIONS & PHOTOS',\n rating: 'Rating %d Reviews & Mentions'\n },\n AR: {\n scores: ['عرجاء', 'معرض', 'حسنا،', 'جيدة', 'عظيم!'],\n basedon: 'استنادا %d الآراء Ùˆ التنويهات ',\n ask: ' نسأل الاصدقاء عن رأيهم ',\n mentions: ' يذكر ',\n media: ' الصور ',\n facebook: ' الفيسبوك ',\n feelter: ' Feelter ',\n comment: ' تعليق',\n back: 'Back',\n clickhere: \"CLICK HERE\",\n hoverbuttontext: 'REVIEWS, MENTIONS & PHOTOS',\n rating: 'Rating %d Reviews & Mentions'\n },\n CS: {\n scores: ['Příšerné', 'Uspokojivé', 'PrůmÄ›rné', 'Dobré', 'Vynikající'],\n basedon: 'Na základÄ› %d hodnocení a zmínek',\n ask: 'Zeptej se přítele na jeho názor',\n mentions: 'Hodnocení a zmínky',\n media: 'Fotky a videa ',\n facebook: 'Facebook',\n feelter: ' Feelter ',\n comment: 'Komentář',\n back: 'ZpÄ›t',\n clickhere: \"Klikni zde\",\n hoverbuttontext: 'Názory, zmínky a fotky',\n rating: 'Hodnocení %d názory a zmínky',\n translate: 'pÅ™eložit'\n },\n PL: {\n scores: ['Okropnie', 'Źle', 'Åšredni', 'Bardzo Dobrze', 'Doskonale'],\n basedon: 'Bazowane na %d Opiniach',\n ask: 'Zapytaj znajomych o opiniÄ™',\n mentions: 'Wzmianki i Opinie',\n media: 'Filmy i ZdjÄ™cia',\n facebook: 'Facebook',\n feelter: ' Feelter',\n comment: 'komentarz',\n back: 'z powrotem',\n clickhere: \"kliknij tutaj\",\n hoverbuttontext: 'Opinie, Wzmianki i ZdjÄ™cia',\n rating: 'Ranking %d Wzmianek i Opini',\n translate: 'tÅ‚umaczyć'\n },\n SK: {\n scores: ['Hrozné', 'Uspokojivé', 'Priemerné', 'Dobré', 'Výborné'],\n basedon: 'Na základe %d hodnotení a zmienok',\n ask: 'Spýtaj sa priateľa na jeho názor',\n mentions: 'Zmienky a hodnotenia',\n media: 'Fotky a videá',\n facebook: 'Facebook',\n feelter: ' Feelter',\n comment: 'Komentár',\n back: 'Späť',\n clickhere: \"Klikni tu\",\n hoverbuttontext: 'Opinie, Wzmianki i ZdjÄ™cia',\n rating: 'Hodnotenie %d názory a zmienky',\n translate: 'PreložiÅ¥'\n }\n };\n\n window.langDictionary = langDictionary;\n\n\n // Constructs an object from a query string\n // in the format of key=value&key2=value2\n function parseQuery(query) {\n var Params = new Object();\n if (!query) return Params; // return empty object\n var Pairs = unescape(query).split('&');\n for (var i = 0; i < Pairs.length; i++) {\n if (Pairs[i].indexOf('=') == -1) continue;\n var key = Pairs[i].substr(0, Pairs[i].indexOf('='));\n var val = Pairs[i].substr(Pairs[i].indexOf('=') + 1);\n val = val.replace(/\\+/g, ' ');\n Params[key] = val;\n }\n return Params;\n }\n\n // parse parameters from script source\n var myScript = req.url;\n var queryString = req.query;//(typeof myScript == 'undefined' || typeof myScript.src == 'undefined') ? '' : myScript.src.replace(/^[^\\?]+\\??/, '');\n\n var params = parseQuery(queryString);\n //res.write('zzzz'+queryString+' '+ JSON.stringify(queryString));\n \n window.MI_defaults = extend({}, window.MI_defaults, queryString)\n if (typeof window.MI_defaults.feedback != 'undefined') window.MI_defaults.inqa = window.MI_defaults.feedback;\n\n //get template from html if availasble\n if (!(typeof mi_template === \"undefined\")) {\n window.tempDictionary[window.MI_defaults.template].panelLayout = mi_template.panelLayout;\n }\n if (typeof window.MI_defaults.panelLayout == \"string\") try {\n window.MI_defaults.panelLayout = JSON.parse(window.MI_defaults.panelLayout.replace(/'/g, '\"'));\n }\n catch (e) {}\n if (!(typeof window.MI_defaults.panelLayout === \"undefined\")) {\n window.tempDictionary[window.MI_defaults.template].panelLayout = window.MI_defaults.panelLayout;\n }\n if (typeof window.MI_defaults.frameElements == \"string\") try {\n window.MI_defaults.frameElements = JSON.parse(window.MI_defaults.frameElements.replace(/'/g, '\"'));\n }\n catch (e) {}\n if (typeof window.MI_defaults.tabs == \"string\") try {\n window.MI_defaults.tabs = JSON.parse(window.MI_defaults.tabs.replace(/'/g, '\"'));\n }\n catch (e) {}\n if (typeof window.MI_defaults.ex == \"string\") try {\n window.MI_defaults.ex = JSON.parse(window.MI_defaults.ex.replace(/'/g, '\"'));\n }\n catch (e) {}\n if (typeof window.MI_defaults.panelLayout == 'undefined') window.MI_defaults.panelLayout = {};\n if (typeof window.MI_defaults.panelLayout.flags == 'undefined') window.MI_defaults.panelLayout.flags = [];\n if (typeof window.MI_defaults.panelLayout.flags == \"string\") try {\n window.MI_defaults.panelLayout.flags = JSON.parse(window.MI_defaults.panelLayout.flags.replace(/'/g, '\"'));\n }\n catch (e) {}\n if (typeof window.langDictionary[window.MI_defaults.lang] == 'undefined') window.MI_defaults.lang = 'EN';\n\n if (typeof window.langDictionary[window.MI_defaults.lang] == 'undefined')\n window.langDictionary[window.MI_defaults.lang] = extend({}, langDictionary['EN'], window.langDictionary[window.MI_defaults.lang]);\n\n //exclude tripadvisor\n if (typeof window.MI_defaults.ex == 'undefined') {\n window.MI_defaults.ex = [];\n }\n window.MI_defaults.ex.push(3);\n window.MI_defaults.ex.push(24);\n switch (window.MI_defaults.lang) {\n case 'AR':\n window.MI_defaults.RTL = 'true';\n window.MI_defaults.gaugeOrientation = 'right';\n break;\n }\n window.MI_defaults.minPanelWidth = window.MI_defaults.layout == \"inlinepanel\" ? 750 : 485;\n window.MI_defaults.panelWidth = window.MI_defaults.template == 'RASTA' ? window.MI_defaults.minPanelWidth : 386;\n\n if (typeof String.prototype.camelCase !== 'function') {\n String.prototype.camelCase = function() {\n return this.toLowerCase().replace(/-(.)/g, function(match, group1) {\n return group1.toUpperCase();\n });\n }\n }\n if (typeof String.prototype.trim !== 'function') {\n String.prototype.trim = function() {\n return this.replace(/^\\s+|\\s+$/g, '');\n }\n }\n\n if (typeof String.prototype.trim !== 'function') {\n String.prototype.trim = function() {\n return this.replace(/^\\s+|\\s+$/g, '');\n }\n }\n String.prototype.capitalize = function() {\n return this.replace(/((?:^|\\s(?!and)(?!or)(?!of)(?!the)(?!\\bat\\b))\\S)/g, function(a) {\n return a.toUpperCase();\n }).replace(/\\b\\S\\S$/g, function(a) {\n return a.toUpperCase();\n });\n };\n\n if (!Object.keys) {\n Object.keys = function(obj) {\n var keys = [];\n\n for (var i in obj) {\n if (obj.hasOwnProperty(i)) {\n keys.push(i);\n }\n }\n return keys;\n };\n }\n if (typeof console == \"undefined\") {\n this.console = {\n log: function() {}\n };\n }\n\n if (!Array.prototype.map) {\n Array.prototype.map = function(fun) {\n var t = Object(this);\n var len = t.length >>> 0;\n var res = new Array(len);\n var thisArg = arguments.length >= 2 ? arguments[1] : void 0;\n for (var i = 0; i < len; i++) {\n if (i in t)\n res[i] = fun.call(thisArg, t[i], i, t);\n }\n return res;\n };\n }\n\n Array.maxProp = function(array, prop) {\n var values = array.map(function(el) {\n return el[prop];\n });\n return Math.max.apply(Math, values);\n };\n Array.minProp = function(array, prop) {\n var values = array.map(function(el) {\n return el[prop];\n });\n return Math.min.apply(Math, values);\n };\n String.prototype.format = function() {\n var formatted = this;\n for (var i = 0; i < arguments.length; i++) {\n var regexp = new RegExp('\\\\{' + i + '\\\\}', 'gi');\n formatted = formatted.replace(regexp, arguments[i]);\n }\n return formatted;\n };\n\n\n // initiate logging parameters and create \n // on-screen log if in debug mode\n window.MI_logState = '';\n window.MI_logDetails = '';\n window.MI_logKey = '';\n window.MI_logLast = new Date();\n window.MI_scrollLast = new Date(1970, 1, 1);\n window.MI_queuedLoggingEvents = '';\n if (typeof(window.MI_defaults.debug) != 'undefined' && window.MI_defaults.debug == 'true') {\n jQuery('<div id=\"MI_onScreenLog\" style=\"padding:5px;overflow:hidden;z-index:999;position:fixed;right:10px;top:10px;width:200px;bottom:10px;border-radius:5px;border:1px solid #333;background:#aaa;background:rgba(0,0,0,0.5);color:white;\"><div class=\"mi-logCaption\" style=\"background:#aaa;margin:-10px -10px 10px -10px;padding:10px;color:#333;\" ><strong style=\"color: white;\">Debug-Mode Log</strong><br><div style=\"box-shadow: 0px 0px 5px gray;background-color: white;border: 1px solid #7D7D7D;border-radius: 4px;padding: 5px;margin-top: 5px;font-size: 11px;color: #999;\">This log is only displayed on debug mode.To stop showing It, Remove the \"debug=true\" parameter from your script reference or hash tag.</div></div>').appendTo(\"body\");\n }\n else if (typeof(window.MI_defaults.hidden) != 'undefined' && window.MI_defaults.hidden == 'true') {\n return;\n }\n\n window.misstimer = 0;\n }", "configure() {\n //if (typeof $.fn.SageMedia == 'undefined') {\n // this.js = '/js/SageMediaManagement.js';\n //}\n //this.css = '//';\n }", "function Main() {\n window.$ = jQuery.noConflict();\n this.languagesLoaded = false;\n this.frameCallback = null;\n }", "function dealers_page_elementsExtraJS() {\n // screen (dealers_page) extra code\n\n }", "function BaixarOrdemInternet_TV_elementsExtraJS() {\n // screen (BaixarOrdemInternet_TV) extra code\n\n }", "function include_js(js_file) {\n\tvar doc_head = document.getElementsByTagName('head').item(0);\n\tvar jsNode = document.createElement('script');\n\tjsNode.setAttribute('language', 'javascript');\n\tjsNode.setAttribute('type', 'text/javascript');\n\tjsNode.setAttribute('src', js_file);\n\tdoc_head.appendChild(jsNode);\n\treturn false;\n}", "function applyMultiJs () {\n /* Main script loaded on base.html. Here only function is\n called */\n $('#id_client_id').multi({\n \"search_placeholder\":\n \"Search... (if there are no clients, hit CTRL+R to manually refresh the page)\",\n });\n}", "function scriptLoader()\n{\n addJavascript(\"phoneticMapper.js\", \"head\");\n addJavascript(\"vedatype.js\", \"head\");\n addJavascript(\"slp01.js\", \"head\"); \n}", "function ConfirmacaoCliente_elementsExtraJS() {\n // screen (ConfirmacaoCliente) extra code\n\n }", "function IncludeJavaScript(jsFile)\n{\n document.write('<script type=\"text/javascript\" src=\"/'\n + jsFile + '\"></scr' + 'ipt>'); \n}", "init() {\n this.addAdditionnalScripts();\n }", "function scriptLoadHandler()\n {\n // Restore $ and window.jQuery to their previous values and store the\n // new jQuery in our local jQuery variable\n jQuery = window.jQuery.noConflict(true);\n\n // Call widgets init function\n init(); \n }", "function HeaderDocumentReadyScripts() {\n\n\tif ($.trim(SearchPageUrl).length > 0) {\n\t\tsessionStorage.setItem('SearchPageUrl', SearchPageUrl);\n\t}\n\n\t$(\"body\").find(\"div\").click(function () {\n\t\tif ($(this).hasClass(\"village-cinema-bg\") == false && $(this).hasClass(\"wrapper\") == false) { //#5322 - To Allow click on main div or body.\n\t\t\tisBodyClicked = false;\n\t\t}\n\t});\n\n\tif ($('#LoginTexthWidget').length > 0) {\n\t\t$('#LoginTexthWidget').hover(function () {\n\t\t\treturn false;\n\t\t});\n\n\t\t$('#LoginTexthWidget').click(function () {\n\t\t\treturn false;\n\t\t});\n\n\t}\n\n\tSetPasswordDefaultText();\n\tWidgetStateChange();\n\tWidgetByMovieFilterChange('All');\n\tWidgetByCinemaFilterChange('All');\n\n\tstyleFormElements();\n\n\tEnableDisableControl('ddlByMovieCinemas', true);\n\tEnableDisableControl('ddlByMovieSessions', true);\n\tEnableDisableControl('ddlByCinemaMovies', true);\n\tEnableDisableControl('ddlByCinemaSessions', true);\n\n\t$('#ddlByMovieCinemas').parent().find('span').html('Select cinema');\n\t$('#ddlByMovieSessions').parent().find('span').html('Select session');\n\t$('#ddlByCinemaMovies').parent().find('span').html('Select movie');\n\t$('#ddlByCinemaSessions').parent().find('span').html('Select session');\n\n\t//code for call cinema page on enter press in CinemaMegaMenu \n\t/* fix for defect #643 */\n\t$('#Cinema-Search').bind('keypress', function (e) {\n\t\tvar code = (e.keyCode ? e.keyCode : e.which);\n\t\tif (code == 13) {\n\t\t\t$('#imgCinemaNavFindCinema').trigger('click');\n\t\t\treturn false;\n\t\t}\n\t});\n\n\t$('#QuickTicketsMenu ul.tabs a').click(function () {\n\n\t\tif ($(this).attr('href') == '#CinemaTab') {\n\t\t\tWidgetTab('bycinema');\n\t\t}\n\t\telse {\n\t\t\tWidgetTab('bymovie');\n\t\t}\n\n\t\t$('#txtCurrentWidgetTab').val($(this).attr('href'));\n\n\t});\n\n\t$('#divHeaderForgotPwdContent').html($('#hidForgotPasswordText').val());\n\t$('#divHeaderMailSentContent').html($('#hidMailSentText').val());\n\n}", "function DEFAULT$static_(){ToolbarSkin.DEFAULT=( new ToolbarSkin(\"default\"));}", "cleanScript(jsfile) {// N/A in web\n }", "function CalendarPlugin() {\n}", "function initThemeJs() {\n\t\t(function($) {\n\n\t\t\t\"use strict\";\n\n\t\t\tskel.breakpoints({\n\t\t\t\txlarge: '(max-width: 1680px)',\n\t\t\t\tlarge: '(max-width: 1280px)',\n\t\t\t\tmedium: '(max-width: 980px)',\n\t\t\t\tsmall: '(max-width: 736px)',\n\t\t\t\txsmall: '(max-width: 480px)'\n\t\t\t});\n\n\t\t\t$(function() {\n\n\t\t\t\tvar $window = $(window),\n\t\t\t\t\t$body = $('body'),\n\t\t\t\t\t$header = $('#header'),\n\t\t\t\t\t$banner = $('#banner');\n\n\t\t\t\t// Disable animations/transitions until the page has loaded.\n\t\t\t\t$body.addClass('is-loading');\n\n\t\t\t\t$window.on('load', function() {\n\t\t\t\t\twindow.setTimeout(function() {\n\t\t\t\t\t\t$body.removeClass('is-loading');\n\t\t\t\t\t}, 100);\n\t\t\t\t});\n\n\t\t\t\t// Fix: Placeholder polyfill.\n\t\t\t\t$('form').placeholder();\n\n\t\t\t\t// Prioritize \"important\" elements on medium.\n\t\t\t\tskel.on('+medium -medium', function() {\n\t\t\t\t\t$.prioritize(\n\t\t\t\t\t\t'.important\\\\28 medium\\\\29',\n\t\t\t\t\t\tskel.breakpoint('medium').active\n\t\t\t\t\t);\n\t\t\t\t});\n\n\t\t\t\t// Header.\n\t\t\t\tif (skel.vars.IEVersion < 9)\n\t\t\t\t\t$header.removeClass('alt');\n\n\t\t\t\tif ($banner.length > 0 &&\n\t\t\t\t\t$header.hasClass('alt')) {\n\n\t\t\t\t\t$window.on('resize', function() {\n\t\t\t\t\t\t$window.trigger('scroll');\n\t\t\t\t\t});\n\n\t\t\t\t\t$banner.scrollex({\n\t\t\t\t\t\tbottom: $header.outerHeight(),\n\t\t\t\t\t\tterminate: function() {\n\t\t\t\t\t\t\t$header.removeClass('alt');\n\t\t\t\t\t\t},\n\t\t\t\t\t\tenter: function() {\n\t\t\t\t\t\t\t$header.addClass('alt');\n\t\t\t\t\t\t},\n\t\t\t\t\t\tleave: function() {\n\t\t\t\t\t\t\t$header.removeClass('alt');\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t}\n\n\t\t\t\t// Menu.\n\t\t\t\tvar $menu = $('#menu');\n\n\t\t\t\t$menu._locked = false;\n\n\t\t\t\t$menu._lock = function() {\n\n\t\t\t\t\tif ($menu._locked)\n\t\t\t\t\t\treturn false;\n\n\t\t\t\t\t$menu._locked = true;\n\n\t\t\t\t\twindow.setTimeout(function() {\n\t\t\t\t\t\t$menu._locked = false;\n\t\t\t\t\t}, 350);\n\n\t\t\t\t\treturn true;\n\n\t\t\t\t};\n\n\t\t\t\t$menu._show = function() {\n\n\t\t\t\t\tif ($menu._lock())\n\t\t\t\t\t\t$body.addClass('is-menu-visible');\n\n\t\t\t\t};\n\n\t\t\t\t$menu._hide = function() {\n\n\t\t\t\t\tif ($menu._lock())\n\t\t\t\t\t\t$body.removeClass('is-menu-visible');\n\n\t\t\t\t};\n\n\t\t\t\t$menu._toggle = function() {\n\n\t\t\t\t\tif ($menu._lock())\n\t\t\t\t\t\t$body.toggleClass('is-menu-visible');\n\n\t\t\t\t};\n\n\t\t\t\t$menu\n\t\t\t\t\t.appendTo($body)\n\t\t\t\t\t.on('click', function(event) {\n\n\t\t\t\t\t\tevent.stopPropagation();\n\n\t\t\t\t\t\t// Hide.\n\t\t\t\t\t\t$menu._hide();\n\n\t\t\t\t\t})\n\t\t\t\t\t.find('.inner')\n\t\t\t\t\t.on('click', '.close', function(event) {\n\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\tevent.stopImmediatePropagation();\n\n\t\t\t\t\t\t// Hide.\n\t\t\t\t\t\t$menu._hide();\n\n\t\t\t\t\t})\n\t\t\t\t\t.on('click', function(event) {\n\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t})\n\t\t\t\t\t.on('click', 'a', function(event) {\n\n\t\t\t\t\t\tvar href = $(this).attr('href');\n\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\tevent.stopPropagation();\n\n\t\t\t\t\t\t// Hide.\n\t\t\t\t\t\t$menu._hide();\n\n\t\t\t\t\t\t// Redirect.\n\t\t\t\t\t\twindow.setTimeout(function() {\n\t\t\t\t\t\t\twindow.location.href = href;\n\t\t\t\t\t\t}, 350);\n\n\t\t\t\t\t});\n\n\t\t\t\t$body\n\t\t\t\t\t.on('click', 'a[href=\"#menu\"]', function(event) {\n\n\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\tevent.preventDefault();\n\n\t\t\t\t\t\t// Toggle.\n\t\t\t\t\t\t$menu._toggle();\n\n\t\t\t\t\t})\n\t\t\t\t\t.on('keydown', function(event) {\n\n\t\t\t\t\t\t// Hide on escape.\n\t\t\t\t\t\tif (event.keyCode == 27)\n\t\t\t\t\t\t\t$menu._hide();\n\n\t\t\t\t\t});\n\t\t\t});\n\t\t})(jQuery);\n\t}", "function scriptLoadHandler() {\n // Restore $ and window.jQuery to their previous values and store the\n // new jQuery in our local jQuery variable\n wjQuery = window.jQuery.noConflict(false); \n }", "function scriptLoadHandler() {\n\t\tjQuery = window.jQuery.noConflict(true);\n\t\tmain();\n\t}", "function scriptLoadHandler() {\n\t\tjQuery = window.jQuery.noConflict(true);\n\t\tmain();\n\t}", "function Stimulus() {\n //var evt = window.event || arguments[1] || arguments.callee.caller.arguments[0];\n //var target = evt.target || evt.srcElement;\n var options = {};\n if (arguments[0]) options = arguments[0];\n var default_args = {\n 'id' : '',\n 'image' : '',\n 'text' : '',\n 'audio' : '',\n 'seq' : [],\n 'priority' : 2\n }\n for (var index in default_args) {\n if (typeof options[index] == \"undefined\") options[index] = default_args[index];\n }\n}", "function scriptLoadHandler() {\n // Restore jQuery and window.jQuery to their previous values and store the\n // new jQuery in our local jQuery variable\n jQuery = window.jQuery.noConflict(true);\n PlannTo.jQuery = jQuery;\n\n // Call our main function\n\n main();\n }", "function BaixarOrdemTelefone_elementsExtraJS() {\n // screen (BaixarOrdemTelefone) extra code\n\n }", "function startScreen_elementsExtraJS() {\n // screen (startScreen) extra code\n }", "function startScreen_elementsExtraJS() {\n // screen (startScreen) extra code\n }", "onReady() {\n\n }", "function TermsServices_elementsExtraJS() {\n // screen (TermsServices) extra code\n\n }", "function HTML5_SolutionStorage() {\n}", "function detailedReviewPage_elementsExtraJS() {\n // screen (detailedReviewPage) extra code\n }", "function defaultsClick() {\n Common.defaultSettings();\n setControlValues();\n Common.setTheme(document.getElementById('theme').value);\n}", "function BootstrapOptions() { }", "function BootstrapOptions() { }", "function userscripts()\n{\n //insert code here:\n}", "function defineAppCode() {\r\n var strCode=\"\";\r\n if (document.location.hostname.length === 0) {\r\n strCode += '<link rel=\"stylesheet\" href=\"datepicker/datepicker.css\">';\r\n strCode += '<link rel=\"stylesheet\" href=\"static_files/assets/css/bootstrap-multiselect.css\">';\r\n strCode += '<link rel=\"stylesheet\" href=\"tablesorter/css/theme.blue.css\">';\r\n strCode += '<link rel=\"stylesheet\" href=\"http://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css\">';\r\n strCode += '<link rel=\"stylesheet\" href=\"static_files/assets/validator/bootstrapValidator.min.css\">'; \r\n strCode += '<link rel=\"stylesheet\" href=\"css/safe.css\">';\r\n strCode += '<link rel=\"stylesheet\" href=\"css/beaches.css\">';\r\n strCode += '<script type=\"text/javascript\" src=\"static_files/assets/validator/bootstrapValidator.min.js\"></script>'; \r\n strCode += '<script type=\"text/javascript\" src=\"static_files/assets/multiselect/bootstrap-multiselect.js\"></script>'; \r\n strCode += '<script type=\"text/javascript\" src=\"static_files/assets/datepicker/bootstrap-datepicker.js\"></script>';\r\n strCode += '<script type=\"text/javascript\" src=\"static_files/assets/datepicker/moment-with-locales.js\"></script>';\r\n strCode += '<script type=\"text/javascript\" src=\"/placeholders/placeholders.min.js\"></script>';\r\n\r\n } else { \r\n strCode += '<link rel=\"stylesheet\" href=\"/datepicker/datepicker.css\">';\r\n strCode += '<link rel=\"stylesheet\" href=\"/static_files/assets/multiselect/bootstrap-multiselect.css\">';\r\n strCode += '<link rel=\"stylesheet\" href=\"/tablesorter/css/theme.blue.css\">';\r\n strCode += '<link rel=\"stylesheet\" href=\"//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css\">';\r\n strCode += '<link rel=\"stylesheet\" href=\"/static_files/assets/validator/bootstrapValidator.min.css\">';\r\n strCode += '<link rel=\"stylesheet\" href=\"/static_files/WebApps/Health/safe/css/safe.css\">';\r\n strCode += '<link rel=\"stylesheet\" href=\"/static_files/WebApps/Health/SwimSafe/css/beaches.css\">';\r\n strCode += '<script type=\"text/javascript\" src=\"/static_files/assets/validator/bootstrapValidator.min.js\"></script>';\r\n strCode += '<script type=\"text/javascript\" src=\"/static_files/assets/multiselect/bootstrap-multiselect.js\"></script>';\r\n strCode += '<script type=\"text/javascript\" src=\"/datepicker/bootstrap-datepicker.js\"></script>';\r\n strCode += '<script type=\"text/javascript\" src=\"/static_files/assets/datepicker/moment-with-locales.js\"></script>';\r\n strCode += '<script type=\"text/javascript\" src=\"/placeholders/placeholders.min.js\"></script>';\r\n }\r\n return strCode;\r\n\r\n}", "function _init(){\n if(mergedConfig.content && mergedConfig.button && mergedConfig.cookie_name && _util.validate.settingsConfig(mergedConfig)){\n //Add cookieValue globally if it exists.\n cookieValue = _util.validate.ifCookieNameSet(mergedConfig.cookie_name.name) ? JSON.parse(_util.getCookieValueByName(mergedConfig.cookie_name.name)) : undefined;\n // Build DOM\n _build.bannerLayout(mergedConfig);\n _build.modalLayout(mergedConfig);\n _util.toggleBanner(mergedConfig);\n };\n }", "function init() {\n // THIS IS THE CODE THAT WILL BE EXECUTED ONCE THE WEBPAGE LOADS\n }", "function LiveReloadJsHandler() {\n}", "static get defaultOptions() {\n // @ts-ignore\n const options = super.defaultOptions\n options.id = \"pf2e-monster-import-ui\"\n options.template = \"modules/pf2e_monsterimportui/templates/monster-import-ui.html\"\n options.width = 1024\n options.height = 800\n options.resizable = true\n options.classes = [\"pf2e-monster-import-ui\"]\n options.popOut = true\n\n return options\n }", "function loadScripts() {\r\n\t\t\t\twindow._sf_endpt = (new Date()).getTime();\r\n\t\t\t\tvar cbDomain = ((\"https:\"==document.location.protocol)?\"https://a248.e.akamai.net/chartbeat.download.akamai.com/102508/\":\"http://static.chartbeat.com/\");\r\n\t\t\t\tif(loadPubJS) {\r\n\t\t\t\t\t$.getScript(cbDomain+\"js/chartbeat_pub.js\");\r\n\t\t\t\t}\r\n\t\t\t\tif((loadVidJS) || (typeof StrategyInterface !== 'undefined' && (espn && espn.video))) {\r\n\t\t\t\t\t$.getScript(cbDomain+\"js/chartbeat_video.js\");\r\n\t\t\t\t}\r\n\t\t\t\t// load default chartbeat js others are disabled\r\n\t\t\t\tif(!loadVidJS && !loadPubJS) {\r\n\t\t\t\t\t$.getScript(cbDomain+\"js/chartbeat.js\");\r\n\t\t\t\t}\r\n\t\t\t}", "function getDefaultJsConfig() {\n return {\n compilerOptions: {\n maxNodeModuleJsDepth: 2,\n allowSyntheticDefaultImports: true\n },\n // Necessary to not flood the initial files\n // with potentially completely unrelated .ts/.js files:\n include: []\n };\n }", "function init() {\n //UH HUH, THIS MY SHIT!\n }", "function letsJQuery() {\n get_layout();\n}", "onLoad() { }", "function InitValues_Framework_L1(){\n // You must make textarea, slidbar and more.\n}", "function InitValues_Framework_L1(){\n // You must make textarea, slidbar and more.\n}", "function startScreen_elementsExtraJS() {\n // screen (startScreen) extra code\n\n }", "function startScreen_elementsExtraJS() {\n // screen (startScreen) extra code\n\n }", "static get defaultOptions() {\n return mergeObject(super.defaultOptions, {\n id: 'turnmarker-settings-form',\n title: 'Turn Marker - Global Settings',\n template: './modules/turnmarker/templates/settings.html',\n classes: ['sheet', 'tm-settings'],\n width: 500,\n closeOnSubmit: true\n });\n }", "function include(url){ \n document.write('<script type=\"text/javascript\" src=\"'+ url +'\" ></script>'); \n}", "function removeOriginalJsLocations() {\n $('a[href*=\"user-registration.html?register\"], ' +\n 'a[href*=\"user-login.html?login\"], ' +\n '.customer-account-login .new-users button')\n .attr('onclick', 'return false;');\n }", "function onReady() {\r\n alert( 'Кофе готов!' );\r\n }", "function includeJS(s) {\n\tfor (i = 0; i < s.length; i++) {\n\t\tvar script = document.createElement(\"script\");\n\t\tscript.type = \"text/javascript\";\n\t\tscript.src = base + s[i];\n\t\tdocument.getElementsByTagName(\"head\")[0].appendChild(script);\n\t}\n}", "function scriptLoadHandler() {\n\t\t // Restore $ and window.jQuery to their previous values and store the\n\t\t // new jQuery in our local jQuery variable\n\t\t jQuery = window.jQuery.noConflict(true);\n\t\t // Call our main function\n\t\t main(); \n\t\t}", "function scriptLoadHandler() {\n // Restore $ and window.jQuery to their previous values and store the\n // new jQuery in our local jQuery variable\n jQuery = window.jQuery.noConflict(true);\n // Call our main function\n main();\n }", "function scriptLoadHandler() {\n // Restore $ and window.jQuery to their previous values and store the\n // new jQuery in our local jQuery variable\n jQuery = window.jQuery.noConflict(true);\n // Call our main function\n main();\n }", "function Javascript(file) {\n \n this.file = file;\n}", "function qodefOnDocumentReady() {\n qodefThemeRegistration.init();\n\t qodefInitDemosMasonry.init();\n\t qodefInitDemoImportPopup.init();\n }", "function DatePickerPlugin() {\n\n }", "function wsLib_defaultOnload() {\n ///// jQuery Selector Variables\n var $selectsRing = $('.js-default-onload-select');\n var $selects = $selectsRing.find('select');\n var $checkboxesRing = $('.js-default-onload-checkbox');\n var $checkboxes = $checkboxesRing.find('input[type=\"checkbox\"]');\n var $radiobuttons = $('.js-default-onload-radio');\n\n // Unchecks checkboxes and defaults radio buttons and selects\n $(document).ready(function() {\n $checkboxes.prop('checked', false);\n $radiobuttons.prop('checked', true);\n\n $selects.each(function() {\n $(this).find('option').first().prop('selected', true);\n });\n });\n}", "function initOnDomReady() {}", "function scriptLoadHandler() {\n\t\t// Restore jQuery and window.jQuery to their previous values and store the\n\t\t// new jQuery in our local jQuery variable\n\t\tjQuery = window.jQuery.noConflict(true);\n\t\t$ = window.jQuery;\n\t\t// Call our main function\n\t\tmain(); \n\t}", "function loadJQ() {\r\n\t var script = document.createElement(\"script\");\r\n\t script.setAttribute(\"src\", \"http://plaku.com/bytui/jquery.min.js\");\r\n\t script.addEventListener('load', function() {\r\n\t\tvar script = document.createElement(\"script\");\r\n\t\tloadJQCookie();\r\n\t\tdocument.body.appendChild(script);\r\n\t }, false);\r\n\t document.body.appendChild(script);\r\n\t}", "static viewJs(formfactor) {\n let src;\n switch(formfactor) {\n case 'phone':\n case 'table':\n src = window.rootpath + 'sample/sample-view-phone.js';\n //src = window.rootpath + 'sample-view-desktop.js';\n break;\n case 'desktop':\n default:\n src = window.rootpath + 'sample/sample-view-desktop.js';\n break;\n }\n return src;\n }", "function mobileinit(){\n\t\t//init(document.body);\n\t\tJQM_VER = ($.mobile.version==null) ? \"1.0\" : $.mobile.version;\n\t}", "function init() {\n var js = document.createElement('script');\n js.setAttribute('type', 'text/javascript');\n js.setAttribute('src', url);\n document.getElementsByTagName('head').item(0).appendChild(js);\n}", "function theme_script(){\n\n}", "function include(file)\n\t{\n\t\tif (window.document.getElementsByTagName)\n\t\t{\n\t\t\tscript = window.document.createElement(\"script\");\n\t\t\tscript.type = \"text/javascript\";\n\t\t\tscript.src = file;\n\t\t\tdocument.documentElement.firstChild.appendChild(script);\n\t\t}\n\t}", "defaults () {\n }", "function init()\n{\n}", "function init()\n{\n}", "function init()\n{\n}", "function noJSLinks()\n {\n this.ruleID = 'noJSLinks';\n }", "function onScriptStart() {\n setYTStyleSheet(bodyStyleLoading);\n // Early configuration for settings that cannot wait until configuration is loaded.\n config.timeToMarkAsSeen = localStorage.getItem(\"YTBSP_timeToMarkAsSeen\");\n config.autoPauseVideo = \"0\" !== localStorage.getItem(\"YTBSP_autoPauseVideo\");\n}", "function Scan_elementsExtraJS() {\n // screen (Scan) extra code\n\n }", "function autoInit () {\n\t\tvar ddPageinfo = IBMCore.common.meta.page.pageInfo,\n\t\t\tncForm = \"\";\n\n\t\t// Check if they have the proper settings before we .getscript the NC JS file.\n\t\t// First they need the proper NC and ID object that tells us where the form and the placeholder div is.\n\t\tif (ddPageinfo.nc && ddPageinfo.nc.id) {\n\t\t\t// Onload, check if the form and placeholder exists, then include extra JS if so.\n\t\t\t$(function(){\n\t\t\t\tncForm = ddPageinfo.nc.id.form ? $(\"#\" + ddPageinfo.nc.id.form) : ($(\".nc_register_form\")[0] || $(\"#registerform\"));\n\n\t\t\t\t// Validate that the form and the placeholder div exist on the page\n\t\t\t\tif (ncForm.length === 0 || $(\"#\" + ddPageinfo.nc.id.privacyDiv).length === 0) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t$.ajax({\n\t\t\t\t\turl: \"//1.www.s81c.com/common/v18/js/notice-choice.js\",\n\t\t\t\t\t//url: \"/v18/js/notice-choice.js\",\n\t\t\t\t\tdataType: \"script\",\n\t\t\t\t\tcache: true\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t}", "function include (file) {\r\n\tvar script = document.createElement('script');\r\nscript.src = file;\r\nscript.type = 'text/javascript';\r\nscript.defer = true;\r\n\r\ndocument.getElementsByTagName('head').item(0).appendChild(script);\r\n}", "function LocalStoragePlugin() {\n}", "function scriptLoadHandler() {\n // Restore $ and window.jQuery to their previous values and store the\n // new jQuery in our local jQuery variable\n jQuery = window.jQuery.noConflict(true);\n // Call our main function\n main();\n }", "onLoad () {}", "function drupalgap_add_js() {\n try {\n var data;\n if (arguments[0]) { data = arguments[0]; }\n jQuery.ajax({\n async: false,\n type: 'GET',\n url: data,\n data: null,\n success: function() {\n if (drupalgap.settings.debug) {\n // Print the js path to the console.\n console.log(data);\n }\n },\n dataType: 'script',\n error: function(xhr, textStatus, errorThrown) {\n console.log(\n 'drupalgap_add_js - error - (' +\n data + ' : ' + textStatus +\n ') ' + errorThrown\n );\n }\n });\n }\n catch (error) {\n console.log('drupalgap_add_js - ' + error);\n }\n}", "function downloadJSAtOnload(){var e=document.createElement(\"script\");e.src=\"https://cdn.rawgit.com/Arlina-Design/quasar/23207858/arlinablock.js\",document.body.appendChild(e)}", "function letsJQuery() {\r\n\tcreateOptionsMenu();\r\n\tpressthatButton();\r\n }", "onLoad() {}", "function nojs(){\n\t$(\".nojs\").addClass(\"invisible\");\n}" ]
[ "0.58667916", "0.5809452", "0.5691467", "0.55791026", "0.54832417", "0.5441119", "0.5424961", "0.5365284", "0.53516793", "0.5348419", "0.5323757", "0.5307114", "0.530026", "0.5284755", "0.5272971", "0.5245144", "0.5240868", "0.5212524", "0.52064997", "0.5201398", "0.51995724", "0.5186234", "0.5180205", "0.51741374", "0.5141839", "0.5135635", "0.5113518", "0.51081705", "0.5108053", "0.5085439", "0.5050135", "0.5039857", "0.503482", "0.503098", "0.5014807", "0.50117564", "0.50117564", "0.50037855", "0.49912784", "0.4988099", "0.4975791", "0.4975791", "0.4973737", "0.4973364", "0.49718958", "0.4971668", "0.49711087", "0.49573472", "0.49573472", "0.49558133", "0.4954429", "0.4943482", "0.49410465", "0.49381256", "0.4937444", "0.49323094", "0.4930704", "0.49210918", "0.49199083", "0.49197417", "0.49042588", "0.49042588", "0.48959514", "0.48959514", "0.48941723", "0.48861456", "0.4882558", "0.4877919", "0.48766547", "0.48722482", "0.4869432", "0.4869432", "0.48667526", "0.485963", "0.48540983", "0.48537174", "0.48525074", "0.48515764", "0.48407012", "0.4838134", "0.4823225", "0.48069844", "0.48036796", "0.48033702", "0.47932515", "0.4791583", "0.4791583", "0.4791583", "0.4786905", "0.47867838", "0.47838148", "0.4771871", "0.47685522", "0.47679895", "0.47670165", "0.47657704", "0.47513252", "0.47497034", "0.47441804", "0.47424796", "0.47384396" ]
0.0
-1
This material is proprietary to Lawson Software, and is not to be reproduced or disclosed except in accordance with software contract provisions, or upon written authorization from Lawson Software. Copyright (C) 20012007 by Lawson Software. All Rights Reserved. Saint Paul, Minnesota Description: This function determines if a white or black font color should be used with the corresponding background color. Arguments: The Background color in hex triplets ex. 'c0c0c0'
function fontBright(thecolor) { var drd = 0 var dgr = 0 var dbl = 0 var brightness = 0 // hrd = thecolor.substring(0,2) // hgr = thecolor.substring(2,4) // hbl = thecolor.substring(4,6) drd = parseInt(thecolor.substring(0,2),16) dgr = parseInt(thecolor.substring(2,4),16) dbl = parseInt(thecolor.substring(4,6),16) brightness = eval(0.212671 * drd + 0.715160 * dgr + 0.072169 * dbl) if (brightness >= 128) return '000000' else return 'FFFFFF' }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isValidColor(text) {\n return hexColorRegEx.test(text);\n}", "function bgColorToTextColor(bg) {\n if ((parseInt(bg.substring(0,2), 16) + parseInt(bg.substring(2,4), 16) + parseInt(bg.substring(4,6), 16)) < 128 * 3) {\n return 'ffffff';\n } else {\n return '000000';\n }\n}", "function shouldUseWhiteFont(element) {\n // element.style.backgroundColor returns a string in rgb format then r,g,b are extracted\n const [r, g, b] = extractRGBfromString(element)\n const isWhite = (r * 0.299 + g * 0.587 + b * 0.114) < 186\n isWhite ? element.style.color = \"white\" : element.style.color = \"#333333\"\n}", "function backgroundDark(hexVal){\n let r = parseInt(hexVal.substr(1,2),16);\n let g = parseInt(hexVal.substr(3,2),16);\n let b = parseInt(hexVal.substr(4,2),16);\n let brightness = ((r*299)+(g*587)+(b*114))/1000;\n return (brightness < 80) ? true : false;\n}", "hasBackground() {\n return !this.text && !this.outlined;\n }", "function determineFontColor(color) {\r\n var convert = hexToRgb(color)\r\n if ((convert.r*0.299 + convert.g*0.587 + convert.b*0.114) > 186) \r\n return fontBaseBlack \r\n else {\r\n return fontBaseWhite\r\n }\r\n}", "function determineTextColor(red, green, blue) {\n var c = [red/255, green/255, blue/255];\n\n for (var i = 0; i < c.length; i++) {\n c[i] <= 0.03928 ? c[i] = c[i] / 12.92 : c[i] = Math.pow((c[i] + 0.055) / 1.055, 2.4);\n }\n\n if (0.2126 * c[0] + 0.7152 * c[1] + 0.0722 * c[2] > 0.179) {\n return \"black\";\n } else {\n return \"white\";\n }\n}", "function hexOrRbgCheck(color) {\n const hexOrRbgCheck = document.querySelector(\"input[name=Color_Code]:checked\").value\n if (hexOrRbgCheck === 'Hex') {\n document.getElementById('colorcodename').innerText = 'Hex'\n document.getElementById('colorcode').innerText = color\n document.getElementById(\"colorshow\").style.backgroundColor = color\n } else if (hexOrRbgCheck === 'rgb') {\n document.getElementById('colorcodename').innerText = 'RGB'\n document.getElementById('colorcode').innerText = hexToRGB(color)\n document.getElementById(\"colorshow\").style.backgroundColor = color\n\n }\n\n}", "function get_black_or_white(rgb) {\n\tif ((rgb.r * 0.299 + rgb.g * 0.587 + rgb.b * 0.114) > 186) return \"black\"; else return \"white\";\n}", "function fontColor(bgColor, lightColor, darkColor) {\n var color = bgColor.charAt(0) === \"#\" ? bgColor.substring(1, 7) : bgColor;\n var r = parseInt(color.substring(0, 2), 16); // hexToR\n var g = parseInt(color.substring(2, 4), 16); // hexToG\n var b = parseInt(color.substring(4, 6), 16); // hexToB\n var uicolors = [r / 255, g / 255, b / 255];\n var c = uicolors.map(col => {\n if (col <= 0.03928) {\n return col / 12.92;\n }\n return Math.pow((col + 0.055) / 1.055, 2.4);\n });\n var L = 0.2126 * c[0] + 0.7152 * c[1] + 0.0722 * c[2];\n return L > 0.179 ? darkColor : lightColor;\n}", "function getTextColor(bgColor) {\n // Convert the hex background color to its decimal components.\n const red = parseInt(bgColor.substring(1, 3), 16);\n const green = parseInt(bgColor.substring(3, 5), 16);\n const blue = parseInt(bgColor.substring(5, 7), 16);\n\n // Compute the \"relative luminance\".\n const luminance = (0.2126 * red + 0.7152 * green + 0.0722 * blue) / 255;\n\n // Use dark text on light backgrounds and vice versa.\n return luminance > 0.5 ? 'black' : 'white';\n}", "function GetCheerColorInfo(a){/* exported GetCheerColorInfo */var b=a,c=\"color\",d=\"style\",e=\"color\";return a.startsWith(\"bg-\")&&(b=a.substr(3),c=\"bgcolor\",d=\"wstyle\",e=\"background-color\"),ColorNames.hasOwnProperty(b)?[c,d,e,ColorNames[b]]:b.match(/^#[0-9a-f]{6}/i)?[c,d,e,b]:[null,null,null,null]}", "function hexRgb (value) {\n\t return low.string(value) &&\n\t rgb.test(value)\n\t}", "function checkInputField(element) {\n var background = window.getComputedStyle(element, null).getPropertyValue(\"background-color\");\n if(background == 'rgb(255, 0, 0)') {\n\treturn true;\n } else {\n\treturn false;\n }\n}", "idealTextColor(color) {\n if (color == null) {\n return \"#000000\"\n }\n\n let nThreshold = 105;\n let components = this.getRGBComponents(color);\n let bgDelta = (components.R * 0.299) + (components.G * 0.587) + (components.B * 0.114);\n\n return ((255 - bgDelta) < nThreshold) ? Color(color).darken(0.7).hex() : '#ffffff';\n }", "function bgcolor(fn){\n\t// body.style.background = \"rgb(\"+r+\",\"+g+\",\"+b+\")\"; //Single color\n\tbody.style.background=fn();\n\tif(r===225 && g<225){\n\t\tif(b!=0)b--;\n\t\telse g++;\n\t}else if(g===225 && b<225)\t{\n\t\tif(r!=0)r--;\n\t\telse b++;\n\t}else if(b===225 && r<225){\n\t\tif(g!=0)g--;\n\t\telse r++;\n\t}\n\t\t\n}", "function setBackgroundRGB(){\n var redHex = rgbToHex(document.getElementById(\"BackgroundRvalue\").value);\n var greenHex = rgbToHex(document.getElementById(\"BackgroundGvalue\").value);\n var blueHex = rgbToHex(document.getElementById(\"BackgroundBvalue\").value);\n var stringHex = \"0x\" + redHex + greenHex + blueHex;\n skyBoxMaterial.color.setHex(stringHex);\n}", "checkRedGreenZone (highDragText) {\n const textBounds = highDragText.getBounds()\n const greenZoneBounds = new Phaser.Rectangle(500, 90, 177, 125)\n const redZoneBounds = new Phaser.Rectangle(500, 206, 177, 127)\n if (Phaser.Rectangle.containsRect(textBounds, greenZoneBounds)) return 'green'\n if (Phaser.Rectangle.containsRect(textBounds, redZoneBounds)) return 'red'\n return false\n }", "function bgScrimColor(alpha) {\n return (isBlackBackground() ? 'rgba(0,0,0,' : 'rgba(255,255,255,') + alpha + ')';\n }", "function isHexColor(color) {\n return string.regex(/^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/)(color)\n}", "function Themes_PreProcessWebBrowser(theObject)\n{\n\tvar bgColor = Get_Color(theObject.Properties[__NEMESIS_PROPERTY_BK_COLOR_DEFAULT], null);\n\tif (bgColor == null || __NEMESIS_REGEX_TRANSPARENT_COLOR.test(bgColor))\n\t\ttheObject.Properties[__NEMESIS_PROPERTY_BK_COLOR_DEFAULT] = \"#ffffff\";\n}", "function fontColorforBgColor(rgba){\r\n\t\tvar d = 0,\r\n\t\t\t\tfontColor = \"#000000\",\r\n\t\t\t\ta = 1 - ( 0.299 * rgba.r + 0.587 * rgba.b + 0.114 * rgba.b)/255;\r\n\r\n\t\t\tif (a < 0.5){\r\n\t\t\t\tfontColor = \"#000000\"; //Bright BG - Black font\r\n\t\t\t}else{\r\n\t\t\t\tfontColor = \"#ffffff\"; //Dark BG - White font\r\n\t\t\t}\r\n\t\t\treturn fontColor;\r\n\t}", "function backgroundText() {\n var topLetters = ['C', 'R', 'E', 'A', 'T', 'I', 'V', 'E'];\n var bottomLetters = ['F', 'A', 'I', 'L', 'U', 'R', 'E'];\n ctx.clearRect(0, 0, screen.width, screen.height);\n var w = (screen.width / 10) | 0;\n ctx.font = (w * 0.92) + \"px Futura\";\n ctx.fillStyle = \"#CA7244\";\n ctx.textAlign = \"center\";\n\n ctx.lineWidth = 8;\n ctx.strokeStyle = '#A93421';\n topLetters.forEach(function (letter, index) {\n //ctx.strokeText(letter, (screen.width / 3.9) + (index * screen.width / 15), screen.height / 2.1);\n //ctx.fillText(letter, (screen.width / 3.9) + (index * screen.width / 15), screen.height / 2.1);\n ctx.strokeText(letter, (screen.width / 6.9) + (index * screen.width / 10.3), screen.height / 2.4);\n ctx.fillText(letter, (screen.width / 6.9) + (index * screen.width / 10.3), screen.height / 2.4);\n });\n bottomLetters.forEach(function (letter, index) {\n //ctx.strokeText(letter, screen.width / 3.9 + (index * screen.width / 12.9), screen.height / 1.3);\n //ctx.fillText(letter, screen.width / 3.9 + (index * screen.width / 12.9), screen.height / 1.3);\n ctx.strokeText(letter, screen.width / 5 + (index * screen.width / 10.2), screen.height / 1.3);\n ctx.fillText(letter, screen.width / 5 + (index * screen.width / 10.2), screen.height / 1.3);\n });\n }", "function background(word) {\n if (word === \"ducky\"){\n document.body.style.backgroundColor = \"#ffffb3\";}\n\n if (word === \"monkey\"){\n document.body.style.backgroundColor = \"#99bbff\";}\n\n if (word === \"panda\"){\n document.body.style.backgroundColor = \"grey\";}\n\n if (word === \"pancake\"){\n document.body.style.backgroundColor = \"#ffcccc\";}\n}", "function getFontColor(rgb){\n\n\t\t\t//\tCalculate color brightness difference\n\t\t\t//\thttps://www.w3.org/TR/AERT/#color-contrast\n\t\t\tvar o = Math.round(((parseInt(rgb[0]) * 299) + (parseInt(rgb[1]) * 587) + (parseInt(rgb[2]) * 114)) /1000);\n\n\t\t\t//\t125 is the magic number (range is 500)\n\t\t\treturn (o>125) ? 'black' : 'white'\n\t\t}", "function pickTextColorBasedOnBgColor(bgColor, lightColor, darkColor) {\n var color = (bgColor.charAt(0) === '#') ? bgColor.substring(1, 7) : bgColor;\n var r = parseInt(color.substring(0, 2), 16); // hexToR\n var g = parseInt(color.substring(2, 4), 16); // hexToG\n var b = parseInt(color.substring(4, 6), 16); // hexToB\n var uicolors = [r / 255, g / 255, b / 255];\n var c = uicolors.map((col) => {\n if (col <= 0.03928) {\n return col / 12.92;\n }\n return Math.pow((col + 0.055) / 1.055, 2.4);\n });\n var L = (0.2126 * c[0]) + (0.7152 * c[1]) + (0.0722 * c[2]);\n return (L > 0.179) ? darkColor : lightColor;\n}", "function textColor(isGood) {\n \t\tif (isGood) {\n \t\t\treturn { \"color\": \"green\", \"border\": \"1px solid green\"};\n \t\t} else {\n \t\t\treturn { \"color\": \"red\", \"border\": \"1px solid red\"};\n \t\t}\n \t}", "function isHexColor(value) {\n return typeof value === 'string' && validator_lib_isHexColor__WEBPACK_IMPORTED_MODULE_1___default()(value);\n}", "function check_hex(inp){\n\n var hexPatt = /^#[0-9A-F]{6}$/i; \n if(hexPatt.test(inp)){\n alert(\"Correct HEXCOLOR code\");\n }\n else{\n alert(\"Incorrect HEXCOLOR code\");\n }\n}", "function gonative_match_statusbar_to_body_background_color() {\n let rgb = window.getComputedStyle(document.body, null).getPropertyValue('background-color');\n let sep = rgb.indexOf(\",\") > -1 ? \",\" : \" \";\n rgb = rgb.substring(rgb.indexOf('(')+1).split(\")\")[0].split(sep).map(function(x) { return x * 1; });\n if(rgb.length === 4){\n rgb = rgb.map(function(x){ return parseInt(x * rgb[3]); })\n }\n let hex = '#' + rgb[0].toString(16).padStart(2,'0') + rgb[1].toString(16).padStart(2,'0') + rgb[2].toString(16).padStart(2,'0');\n let luma = 0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]; // per ITU-R BT.709\n if(luma > 40){\n gonative.statusbar.set({'style': 'dark', 'color': hex});\n }\n else{\n gonative.statusbar.set({'style': 'light', 'color': hex});\n }\n}", "function Validate_colour() {\n\tcolour_entry = document.getElementById(\"colour\");\n\tcolour = colour_entry.value;\n\tre = /^#[0-9a-f]{6}$/i;\n\tif ( re.test(colour) ) {\n\t\tdocument.getElementById(\"colour_cell\").style.backgroundColor = colour;\n\t\treturn true;\n\t} else {\n\t\talert(\"Invalid colour. Use syntax '#dddddd'\");\n\t\tcolour_entry.value = '#';\n\t\tcolour_entry.focus();\n\t\tcolour_entry.select();\n\t\treturn false;\n\t}\n}", "function gradeColor(gradeValue, gradeBackground) {\n var grade = \"default\";\n if (document.getElementById(gradeValue)) {\n grade = document.getElementById(gradeValue).innerHTML;\n } else if (document.getElementsByClassName(gradeValue).length > 0) {\n grade = document.getElementsByClassName(gradeValue)[0].innerHTML;\n }\n var gradeBackground = document.getElementById(gradeBackground) ? document.getElementById(gradeBackground) : document.getElementsByClassName(gradeBackground)[0];\n\n var colors = {\n \"A+\": {\n background: \"#00c853\",\n text: \"#004e20\",\n shadow: \"#C8E6C9\"\n },\n \"A-\": {\n background: \"#57d154\",\n text: \"#245423\",\n shadow: \"#DCEDC8\"\n },\n \"A\": {\n background: \"#36c246\",\n text: \"#195920\",\n shadow: \"#C8E6C9\"\n },\n \"B+\": {\n background: \"#8bc34a\",\n text: \"#3d5620\",\n shadow: \"#DCEDC8\"\n },\n \"B-\": {\n background: \"#a0cb6e\",\n text: \"#40502d\",\n shadow: \"#DCEDC8\"\n },\n \"B\": {\n background: \"#9ccc65\",\n text: \"#32451d\",\n shadow: \"#DCEDC8\"\n },\n \"C+\": {\n background: \"#cddc39\",\n text: \"#5a611a\",\n shadow: \"#F0F4C3\"\n },\n \"C-\": {\n background: \"#fbc02d\",\n text: \"#544112\",\n shadow: \"#FFD180\"\n },\n \"C\": {\n background: \"#d4e157\",\n text: \"#5d6325\",\n shadow: \"#E6EE9C\"\n },\n \"D+\": {\n background: \"#ffa726\",\n text: \"#67430f\",\n shadow: \"#FFCC80\"\n },\n \"D-\": {\n background: \"#e65100\",\n text: \"#592001\",\n shadow: \"#FFAB91\"\n },\n \"D\": {\n background: \"#f57c00\",\n text: \"#623200\",\n shadow: \"#FFAB91\"\n },\n \"F\": {\n background: \"#f44336\",\n text: \"#7e231d\",\n shadow: \"#ffc5c0\"\n },\n \"late\": {\n background: \"#EF9A9A\",\n text: \"#505050\",\n shadow: \"#FFCDD2\"\n },\n default: {\n background: \"#E0F7FA\",\n text: \"#003375\",\n shadow: \"#ecf8f9\"\n }\n };\n grade = grade.match(/([A-F][+\\-]?(?![\\w]+))/);\n grade = grade ? grade[0] : \"default\";\n\n //edge case: late submission assignment, set to \"late\":\n if (document.querySelector('.lateAssignment') !== null) {\n grade = \"late\"\n }\n\n gradeBackground.style.backgroundColor = colors[grade].background;\n gradeBackground.style.color = colors[grade].text;\n gradeBackground.style.boxShadow = \"0px 5px 12px\" + colors[grade].shadow\n if (document.getElementById(gradeValue) !== null) document.getElementById(gradeValue).style.color = colors[grade].text;\n }", "function textColor(pbin) {\n\tconst r = pbin >> 16\n\tconst g = (pbin >> 8) & 0xff\n\tconst b = pbin & 0xff\n\tconst lum = Math.sqrt(0.299 * (r * r) + 0.587 * (g * g) + 0.114 * (b * b))\n\n\t// determine whether the color is light or dark\n\tif (lum > 127.5) {\n\t\treturn 0\n\t} else {\n\t\treturn 0xffffff\n\t}\n}", "function isWhite(hsl) {\n flag = 'false';\n if (getLightness(hsl) >= 86) {\n debug(\"Value is white\"); // test\n return true;\n }\n return false;\n}", "function isValidHexColor(t) {\n return item => {\n var hash = hashbow(item);\n t.is(typeof hash, 'string');\n t.is(hash.charAt(0), '#');\n t.is(hash.length, 7);\n };\n}", "function changeFontColor(final) {\n var temp1 = final[1].split(',', 14);\n var temp2 = final[2].split(',', 14);\n\n //rgbs of temp1\n var r1 = temp1[0].match(/(\\d+)/);\n var g1 = temp1[1]\n var b1 = temp1[2].match(/(\\d+)/);\n //rgbs of temp2\n var r2 = temp2[0].match(/(\\d+)/);\n var g2 = temp2[1];\n var b2 = temp2[2].match(/(\\d+)/);\n if (parseInt(r1) <= 87 || parseInt(r2) <= 87) {\n if (parseInt(g1) <= 87 || parseInt(g2) <= 87) {\n body.style.color = \"white\";\n document.getElementById(\"bg\").style.color = \"white\";\n document.getElementById(\"no\").style.color = \"white\";\n document.getElementById(\"crnt\").style.color = \"white\";\n document.getElementById(\"dirgrad\").style.color = \"white\";\n document.getElementById(\"copy\").style.color = \"white\";\n }\n } else {\n if (parseInt(g1) >= 87 || parseInt(g2) >= 87) {\n body.style.color = \"rgba(0, 0, 0, 0.65)\";\n document.getElementById(\"bg\").style.color = \"rgba(0, 0, 0, 0.65)\";\n document.getElementById(\"no\").style.color = \"rgba(0, 0, 0, 0.65)\";\n document.getElementById(\"crnt\").style.color = \"rgba(0, 0, 0, 0.65)\";\n document.getElementById(\"dirgrad\").style.color = \"rgba(0, 0, 0, 0.65)\";\n document.getElementById(\"copy\").style.color = \"rgba(0, 0, 0, 0.65)\";\n }\n }\n}", "bg_gfx1() {\n let nta = ((this.clock.hpos >>> 3) & 0x1F) | ((this.clock.vpos << 2) & 0x3E0) | (this.io.bg_name_table_address << 10);\n let pattern = this.VRAM[nta];\n\n let paddr = (this.clock.vpos & 7) | (pattern << 3) | (this.io.bg_pattern_table_address << 11);\n\n let caddr = ((paddr >>> 3) & 0x1F) | (this.io.bg_color_table_address << 6);\n\n let color = this.VRAM[caddr];\n let index = this.clock.hpos ^ 7;\n if ((this.VRAM[paddr] & (1 << index)) === 0)\n this.bg_color = color & 0x0F;\n else\n this.bg_color = (color >>> 4) & 0x0F;\n }", "function isHexaColor(sNum) {\n return (typeof sNum === \"string\") && sNum.length === 6\n && !isNaN(parseInt(sNum, 16));\n}", "function backgroundColourCheck() {\n if(localStorage.getItem(\"BackgroundColour\") === \"Enabled\") {\n setBGColour(true);\n } else {\n setBGColour(false);\n }\n }", "function bs_findBackgroundColor(elm) {\n\tif (typeof(elm) == 'string') {\n\t\telm = document.getElementById(elm);\n\t}\n\tif (typeof(elm) == 'undefined') return false;\n\tif (moz) {\n\t\ttry {\n\t\t\tvar col = document.defaultView.getComputedStyle(elm, null).getPropertyValue(\"background-color\");\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t} else {\n\t\tif (typeof(elm.currentStyle) == 'undefined') return false;\n\t\tvar col = elm.currentStyle.backgroundColor;\n\t}\n\tif ((typeof(col) != 'undefined') && (col != 'transparent') && (col != '')) {\n\t\treturn col;\n\t} else {\n\t\treturn bs_findBackgroundColor(elm.parentNode);\n\t}\n}", "function checkWhiteColor() {\n\t\t\tcp.countPixels([255, 255, 255], \n\t\t\t\twin, \n\t\t\t\tfunction(count) {\n\t\t\t\t\tvalueOf(testRun, count).shouldBe(win.rect.width*win.rect.height - expectedRed - expectedGreen);\n\t\t\t\t\tfin();\t\n\t\t\t\t}\n\t\t\t);\n\t\t}", "function change_background(){\r\n\r\n for(x=0;x<6;x++){\r\n generated = hexa[color_generator()];\r\n color += generated;\r\n\r\n };\r\n body.style.backgroundColor = color;\r\n span.innerText = color;\r\n color = \"#\"; // reinitialize the value of color to '#'\r\n \r\n\r\n \r\n\r\n \r\n}", "function background_color() {\n var data = new Date()\n var hora = data.getHours()\n if (hora >= 0 && hora < 12) {\n document.body.style.background = 'thistle'\n document.getElementsByClassName('msg').innerHTML = \"Bom Dia!\"\n } else if (hora >= 12 && hora <= 18) {\n document.body.style.background = 'rgb(191, 216, 215)'\n document.getElementsByClassName('msg').innerHTML = \"Boa Tarde!\"\n } else {\n document.body.style.background = 'rgb(195, 191, 216)'\n document.getElementsByClassName('msg').innerHTML = \"Boa Noite!\"\n }\n}", "function getEltBackgroundColor (elt) \n{\n if (is.nav4) return (elt.bgColor);\n else if (is.ie4up) \n {\n var colorVal = elt.style.backgroundColor;\n if (isColorName(colorVal)) return colorNameToNumber (colorVal);\n else if (typeof(colorVal) == \"string\") \n return ((\"0x\" + colorVal.substring(1)) - 0);\n else return colorVal;\n }\n else if (is.gecko) {\n var colorVal = elt.style.backgroundColor;\n \n\t if (typeof(colorVal) == \"string\")\n\t { \t\n\t\tif (isColorName(colorVal)) \t\n\t\t{\n\t\t\treturn colorNameToNumber (colorVal);\n\t\t}\n\t\telse if (colorVal.indexOf([\"rgb\"]) != -1) \n\t\t{\t\n\t\t\tvar sR,sG,sB;\n\t\t\tvar iR,iG,iB;\n\t\t\tvar i=0;\n\n\t\t\tColorString = (elt.style.backgroundColor);\n\t\t\t//ColorString = \"rgb(255,20,255)\";\n\t\t\tColorString = ColorString.slice(4,-1);\n\n\t\t\twhile(ColorString[i] != ',' && i < 20){i++;}\n\t\t\tsR = ColorString.slice(0,-(ColorString.length - i));\n\t\t\ti++;\n\t\t\tj = i;\n\t\t\twhile(ColorString[j] != ',' && j < 20){j++;}\n\t\t\tsG = ColorString.slice(i,0-(ColorString.length - j));\n\t\t\tj++;\n\t\t\tsB = ColorString.slice(j);\n\t\t\tiR = stringToNumber(sR);\n\t\t\tiG = stringToNumber(sG);\n\t\t\tiB = stringToNumber(sB);\n\t\t\tsR = iR.toString(16);if(sR.length < 2)sR = \"0\" + sR;if(sR.length < 2)sR = \"0\" + sR;\n\t\t\tsG = iG.toString(16);if(sG.length < 2)sG = \"0\" + sG;if(sG.length < 2)sG = \"0\" + sG;\n\t\t\tsB = iB.toString(16);if(sB.length < 2)sB = \"0\" + sB;if(sB.length < 2)sB = \"0\" + sB;\n\n\t\t\tsRGB = sR.toUpperCase()+sG.toUpperCase()+sB.toUpperCase();\n\t\t\treturn ((\"0x\" + sRGB)-0);\n\t\t}\n\t }\n else return colorVal;\n }\n}", "function getTextColor(r, g, b) {\n let tempTextColor = '#000000'\n if (r < 128 && g < 128 && b < 128) {\n tempTextColor = '#ffffff'\n }\n return tempTextColor;\n}", "function color_for_text(text) {\r\n if ( !text ) return;\r\n if ( text == \"Completed\" ) return \"#ddd\";\r\n if ( text == \"Ready\" ) return \"#cfc\";\r\n if ( text == \"In progress\" ) return \"#ffb\";\r\n if ( text == \"On hold\" ) return \"#fcc\";\r\n return;\r\n}", "function css__RGBCOLOR_ques_(cssPrimitiveType) /* (cssPrimitiveType : cssPrimitiveType) -> bool */ {\n return (cssPrimitiveType === 26);\n}", "function colorizeBlack(el){\n let shade=el.style.backgroundColor;\n if(shade==''){\n el.style.backgroundColor=\"rgba(0,0,0,0.1)\"; \n }\n else{\n\n if(shade.substr(3,1) == 'a' && shade.substr(14,1) != '1'){\n let alpha = parseFloat(\"0.\"+shade.substr(16,1))\n alpha = alpha + 0.1;\n shade = shade.substr(0,13)+alpha+\")\";\n }\n else{\n el.style.backgroundColor=\"rgba(0,0,0,1)\";\n }\n el.style.backgroundColor=shade;\n }\n}", "function checkMixWholeNumQ3(){ \n var mixWholeNum3 = document.getElementById('txtMixWholeNum3').value;\n var mixWholeNum3TrueColor = document.getElementById('txtMixWholeNum3').style.backgroundColor = \"orange\";\n mixWholeNum3 === \"3\" ? mixWholeNum3TrueColor : document.getElementById('txtMixWholeNum3').style.backgroundColor = \"red\"; \n }", "function checkMixWholeNumQ2(){ \n var mixWholeNum2 = document.getElementById('txtMixWholeNum2').value;\n var mixWholeNum2TrueColor = document.getElementById('txtMixWholeNum2').style.backgroundColor = \"orange\";\n mixWholeNum2 === \"1\" ? mixWholeNum2TrueColor : document.getElementById('txtMixWholeNum2').style.backgroundColor = \"red\"; \n }", "function isColorCode( fieldValue ) {\r\n\tvar checkOK = \"#0123456789ABCDEFabcdef\";\r\n\tvar checkStr = fieldValue;\r\n\tvar allValid = true;\r\n\tvar allNum = \"\";\r\n\r\n\tfor (i = 0; i < checkStr.length; i++)\r\n\t{\r\n\t\tch = checkStr.charAt(i);\r\n\r\n\t\tfor (j = 0; j < checkOK.length; j++)\r\n\t\t\tif (ch == checkOK.charAt(j))\r\n\t\t\t\tbreak;\r\n\r\n\t\tif (j == checkOK.length)\r\n\t\t{\r\n\t\t\tallValid = false;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tif (ch != \",\")\r\n\t\t\tallNum += ch;\r\n\t}\r\n\r\n\t// now check length and that only first letter is # symbol\r\n\tif ( fieldValue.length != 7 || fieldValue.lastIndexOf( '#' ) != 0 )\r\n\t\tallValid = false;\r\n\r\n\treturn allValid;\r\n}", "static test(color) {\n return typeof color === 'string' && (isHex.test(color) || isRgb.test(color));\n }", "function checkMixWholeNumQ1(){ \n var mixWholeNum1 = document.getElementById('txtMixWholeNum1').value;\n var mixWholeNum1TrueColor = document.getElementById('txtMixWholeNum1').style.backgroundColor = \"orange\";\n mixWholeNum1 === \"2\" ? mixWholeNum1TrueColor : document.getElementById('txtMixWholeNum1').style.backgroundColor = \"red\"; \n }", "get backgroundColor() {\n if (!(this.fields.backgroundColor instanceof pass_color_1.PassColor))\n return undefined;\n return this.fields.backgroundColor;\n }", "function background(col){\r\n ctx.fillStyle = col;\r\n return ctx.fillRect(0,0,creation.width,creation.height);\r\n}", "function getBgColorUponNewMessage() {\r\n\treturn \"6699CC\";\r\n}", "getBackgroundColor() {\n switch (this.config.background) {\n case Config_1.Background.BLACK:\n return exports.BLACK_BACKGROUND;\n case Config_1.Background.AUTHENTIC:\n default:\n return exports.AUTHENTIC_BACKGROUND;\n }\n }", "setBGColor(row) {\r\n let colorObj = JSON.parse(row[\"ColorCode\"]);\r\n return hexToRgba(colorObj.color, colorObj.alpha);\r\n }", "function applyFilterNoBackground(filterFunction){\n \n for (var r = 0; r < image.length; r++) {\n for (var c = 0; c < image[r].length; c++) {\n var rgbString = image[r][c]; //rgbString here used to be r\n \n if(image[r][c] === image[0][0]){ //change paranthesis 0,0\n \n }\n else{\n var rgbNumbers = rgbStringToArray(rgbString) \n filterFunction(rgbNumbers); //only run if certain condition is met, if qual to top left pixel color\n rgbString = rgbArrayToString(rgbNumbers);\n image[r][c] = rgbString; \n }\n \n }\n \n }\n } //applyFilterNoBackground /\\", "function getBGColor(num){\n switch (num) {\n case 2:return \"#eee4da\";break;\n case 4:return \"#ede0c8\";break;\n case 8:return \"#f2b179\";break;\n case 16:return \"#f59563\";break;\n case 32:return \"#f67c5f\";break;\n case 64:return \"#f65e3b\";break;\n case 128:return \"#edcf72\";break;\n case 256:return \"#edcc61\";break;\n case 512:return \"#9c0\";break;\n case 1024:return \"#33b5e5\";break;\n case 2048:return \"#09c\";break;\n case 4096:return \"#a6c\";break;\n case 8192:return \"#93c\";break;\n }\n }", "_drawBackground(firstRow, lastRow) {\n const ctx = this._ctx;\n const cols = this._bufferService.cols;\n let startX = 0;\n let startY = 0;\n let prevFillStyle = null;\n ctx.save();\n this._forEachCell(firstRow, lastRow, null, (cell, x, y) => {\n // libvte and xterm both draw the background (but not foreground) of invisible characters,\n // so we should too.\n let nextFillStyle = null; // null represents default background color\n if (cell.isInverse()) {\n if (cell.isFgDefault()) {\n nextFillStyle = this._colors.foreground.css;\n }\n else if (cell.isFgRGB()) {\n nextFillStyle = `rgb(${AttributeData.toColorRGB(cell.getFgColor()).join(',')})`;\n }\n else {\n nextFillStyle = this._colors.ansi[cell.getFgColor()].css;\n }\n }\n else if (cell.isBgRGB()) {\n nextFillStyle = `rgb(${AttributeData.toColorRGB(cell.getBgColor()).join(',')})`;\n }\n else if (cell.isBgPalette()) {\n nextFillStyle = this._colors.ansi[cell.getBgColor()].css;\n }\n if (prevFillStyle === null) {\n // This is either the first iteration, or the default background was set. Either way, we\n // don't need to draw anything.\n startX = x;\n startY = y;\n }\n if (y !== startY) {\n // our row changed, draw the previous row\n ctx.fillStyle = prevFillStyle || '';\n this._fillCells(startX, startY, cols - startX, 1);\n startX = x;\n startY = y;\n }\n else if (prevFillStyle !== nextFillStyle) {\n // our color changed, draw the previous characters in this row\n ctx.fillStyle = prevFillStyle || '';\n this._fillCells(startX, startY, x - startX, 1);\n startX = x;\n startY = y;\n }\n prevFillStyle = nextFillStyle;\n });\n // flush the last color we encountered\n if (prevFillStyle !== null) {\n ctx.fillStyle = prevFillStyle;\n this._fillCells(startX, startY, cols - startX, 1);\n }\n ctx.restore();\n }", "getBackgroundSolidRGBAString(state) {\r\n return `rgba(${state.backgroundSolidSettings.r}, ${state.backgroundSolidSettings.g}, ${state.backgroundSolidSettings.b}, ${state.backgroundSolidSettings.a})`;\r\n }", "function checkTextContrast(color, text) {\r\n /*this method returns how bright the color is from 1(brightest) to 0(darkest)*/\r\n const luminance = chroma(color).luminance();\r\n console.log(luminance);\r\n if (luminance > 0.5) {\r\n text.style.color = 'black';\r\n } else {\r\n text.style.color = 'white';\r\n }\r\n}", "function cambiacolor(color){ // CON LA FUNCION MODIFICAMOS \ncaja.style.background = color;\n}", "function colorBg(colorBg) {\n noteDiv.style.background = colorBg;\n }", "function isWhiteOrYellow(testPixels)\n{\n\t//Each pixel has 4 items in the data array,\n\t//red, green, blue, and alpha.\n\t//Alpha transparency is ignored.\n\tvar items = testPixels.data.length - 4;\n\tvar red;\n\tvar green;\n\tvar blue;\n\tvar i;\n\t\n\tfor(i = 0; i < items; i += 4)\n\t{\t\n\t\tred = testPixels.data[i];\n\t\tgreen = testPixels.data[i + 1];\n\t\tblue = testPixels.data[i + 2];\n\t\t\n\t\tif(red >= 240)\n\t\t{\n\t\t\tred = 255;\n\t\t}\n\t\t\n\t\tif(red <= 25)\n\t\t{\n\t\t\tred = 0;\n\t\t}\n\t\t\n\t\tif(green >= 240)\n\t\t{\n\t\t\tgreen = 255;\n\t\t}\n\t\t\n\t\tif(green <= 25)\n\t\t{\n\t\t\tgreen = 0;\n\t\t}\n\t\t\n\t\tif(blue >= 240)\n\t\t{\n\t\t\tblue = 255;\n\t\t}\n\t\t\n\t\tif(blue <= 25)\n\t\t{\n\t\t\tblue = 0;\n\t\t}\t\t\n\t\t\n\t\tif(red !== 255 || green !== 255 || blue !== 0 && blue !== 255)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\treturn true;\n}", "function getBg(value){\n if(value < 0.85) return \"rgba(255, 0, 0, 0.3)\"\n if(value < 0.91) return \"rgba(255, 255, 0, 0.3)\"\n return \"rgba(0, 255, 0, 0.3)\"\n}", "function get_background_color( elem ) {\n var result = '#fff';\n \n elem.add( elem.parents() ).each(function(){\n var c = $(this).css('background-color');\n if ( c !== 'transparent' && c !== 'rgba(0, 0, 0, 0)' ) {\n result = c;\n return false;\n }\n });\n \n return result;\n }", "function getBgColorUponFlashingStopped() {\r\n\treturn \"transparent\";\r\n}", "function _setTextColors() {\n if (!styles.shepherdThemeTextPrimary) {\n styles.shepherdThemeTextPrimary = transparentize(0.25, readableColor(styles.shepherdThemePrimary));\n }\n\n if (!styles.shepherdThemeTextSecondary) {\n styles.shepherdThemeTextSecondary = transparentize(0.25, readableColor(styles.shepherdThemeSecondary));\n }\n\n if (!styles.shepherdThemeTextHeader) {\n styles.shepherdThemeTextHeader = transparentize(0.25, readableColor(styles.shepherdHeaderBackground));\n }\n\n if (!styles.shepherdThemeTextColor) {\n styles.shepherdThemeTextColor = transparentize(0.25, readableColor(styles.shepherdTextBackground));\n }\n}", "function drawBackground() {\n let randomNumber = Math.floor(Math.random() * 3);\n if (randomNumber == 2) {\n bgColor = \"whitesmoke\";\n }\n else {\n bgColor = \"black\";\n }\n crc2.fillStyle = bgColor;\n crc2.fillRect(0, 0, crc2.canvas.width, crc2.canvas.height);\n }", "function backgroundColourGenerator(dataArray, PRAC_CODE) {\n backgroundColorArray = [];\n dataArray.forEach(element => {\n if (element.PRAC_CODE == PRAC_CODE) {\n backgroundColorArray.push('rgb(0, 94, 184,0.6)')\n } else {\n backgroundColorArray.push('rgb(100, 100, 100,0.6)')\n }\n });\n return backgroundColorArray\n}", "function CheckIfHighlightingClickableColor() {\n\n\tvar rayCheck : Ray = Camera.main.ScreenPointToRay(Input.mousePosition);\n\t\n\tif (Physics.Raycast(rayCheck, hit3))\n\t{\n // If you hit the mesh collider\n\t\tif(hit3.collider == meshCol)\n\t\t{\n // Set the texture coordinate\n\t\t pV = hit3.textureCoord;\n\n // Store the color\n\t\t\tcheckClickableColor = dermatomeTexture.GetPixel(pV.x * dermatomeTexture.width, \n\t\t\tpV.y * dermatomeTexture.height);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tcheckClickableColor = Color.black;\n\t\t}\n\t}\n\t\n // If it is any clickable color then set boolean to true\n\tif((checkClickableColor == c2Color) || (checkClickableColor == c3Color) || (checkClickableColor == c4Color)\n\t|| (checkClickableColor == c5Color) || (checkClickableColor == c6Color) || (checkClickableColor == c7Color)\n\t|| (checkClickableColor == c8Color))\n\t{\n\t\tisClickableColor = true;\n\t}\n\telse\n\t{\n\t\tisClickableColor = false;\n\t}\n\t\n\t// If it is the C2 color\n\tif(checkClickableColor == c2Color)\n\t{\n\t\tdisplayC = \"C2\";\n\t}\n\t// If it is the C3 color\n\telse if(checkClickableColor == c3Color)\n\t{\n\t\tdisplayC = \"C3\";\n\t}\n\t// If it is the C4 color\n\telse if(checkClickableColor == c4Color)\n\t{\n\t\tdisplayC = \"C4\";\n\t}\n\t// If it is the C5 color\n\telse if(checkClickableColor == c5Color)\n\t{\n\t\tdisplayC = \"C5\";\n\t}\n\t// If it is the C6 color\n\telse if(checkClickableColor == c6Color)\n\t{\n\t\tdisplayC = \"C6\";\n\t}\n\t// If it is the C7 color\n\telse if(checkClickableColor == c7Color)\n\t{\n\t\tdisplayC = \"C7\";\n\t}\n\t// If it is the C8 color\n\telse if(checkClickableColor == c8Color)\n\t{\n\t\tdisplayC = \"C8\";\n\t}\n // Else make it empty\n\telse\n\t{\n\t\tdisplayC = \" \";\n\t}\n\t\n\t\n\t\n\t\n}", "function GetHexColour($Rgb)\n{\n\tvar $Length = 6\n\treturn ('000000000' + $Rgb.toString(16) ).substr(-$Length);\n}", "function isBlack(hsl) {\n flag = 'false';\n if (getLightness(hsl) <= 5) {\n debug(\"Value is black\"); // test\n return true;\n }\n return false;\n}", "function correctHex(hex) {\n if (!hex || hex.length < consts_1.MIN_HEX_LENGTH) {\n return 'ffffff'; // not a valid color--default to white\n }\n if (hex.length >= consts_1.MAX_HEX_LENGTH) {\n return hex.substring(0, consts_1.MAX_HEX_LENGTH);\n }\n return hex.substring(0, consts_1.MIN_HEX_LENGTH);\n}", "function changeBackgroundColor() {\r\n var randomHue = Math.floor(Math.random()*360);\r\n\r\n document.body.style.backgroundColor = \"hsl(\" + randomHue + \", 70%, 80%)\";\r\n\r\n var elHexcode = document.getElementById('hex-code');\r\n elHexcode.textContent = HSLToHex(randomHue,70,80);\r\n}", "function check_hex(){\n\n var hex=prompt(\"Enter HexCode: \");\n var hexPattern = /^#[0-9A-F]{6}$/i; //regex for hex code color match\n if(hexPattern.test(hex)){\n alert(\"Correct HEX code\");\n }\n else{\n alert(\"Incorrect HEX code\");\n }\n}", "function DrawBackground(){\n\n // draw the background\n ctx.fillStyle = trial.background_colour;\n ctx.fillRect(0, 0, trial.canvas_dimensions[0], trial.canvas_dimensions[1]);\n\n // draw the progress text\n ctx.font = \"28px Arial\";\n ctx.fillStyle = \"white\";\n ctx.textAlign = \"center\";\n var info_text = \"Block \" + counter.block + \" of \" + counter.n_blocks + \", Trial \" + counter.trial + \" of \" + trial.n_trials;\n ctx.fillText(info_text, trial.canvas_dimensions[0]/2, 3* ctx.measureText('M').width/2);\n\n\n }", "function setBoardCoverRGB(){\n var redHex = rgbToHex(document.getElementById(\"CoverRvalue\").value);\n var greenHex = rgbToHex(document.getElementById(\"CoverGvalue\").value);\n var blueHex = rgbToHex(document.getElementById(\"CoverBvalue\").value);\n BoardCoverColor = \"0x\" + redHex + greenHex + blueHex;\n\n if(BoardCoverBool){\n Boardmaterial.color.setHex(BoardCoverColor);\n }\n}", "MainBackgroundColor(r, g, b, alpha) {\n this._r = r;\n this._g = g;\n this._b = b;\n this._alpha = alpha;\n }", "static DefaultBackgroundColor(){return \"#FFFFFFFF\";}", "function chooseColor()\n{\n ctx.fillStyle = \"#ff0088\";\n ctx.fillRect(320,10,140,80);\n ctx.textAlign = \"center\";\n ctx.fillStyle = \"white\";\n ctx.font = \"25px Arial\";\n ctx.fillText(\"בחירת צבע\",390,58);\n}", "function checkTextContrast(color, text) {\n const luminance = chroma(color).luminance();\n\n //Changing the text color\n if (luminance > 0.5) {\n text.style.color = \"black\";\n } else {\n text.style.color = \"white\";\n }\n}", "function bgMaterial() {\n return backgroundColor == whiteBackgroundColor ? whiteMaterial : blackMaterial;\n }", "function fontColorOverride(cell) {\n\n var cellObj = $(cell);\n var hex = cellObj.attr(\"fill\");\n\n var colorIsLight = function (r, g, b) {\n // Counting the perceptive luminance\n // human eye favors green color...\n var a = 1 - (0.299 * r + 0.587 * g + 0.114 * b) / 255;\n return (a < 0.5);\n }\n\n\n function hexToRgb(hex) {\n // Expand shorthand form (e.g. \"03F\") to full form (e.g. \"0033FF\")\n var shorthandRegex = /^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i;\n hex = hex.replace(shorthandRegex, function (m, r, g, b) {\n return r + r + g + g + b + b;\n });\n\n var result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex);\n return result ? {\n r: parseInt(result[1], 16),\n g: parseInt(result[2], 16),\n b: parseInt(result[3], 16)\n } : null;\n }\n\n if (hexToRgb(hex)) {\n var textColor = colorIsLight(hexToRgb(hex).r, hexToRgb(hex).g, hexToRgb(hex).b) ? '#000000' : '#ffffff';\n cellObj.next('text').attr('fill', textColor);\n }\n\n }", "function xBackground(e,c,i)\r\n{\r\n if(!(e=xGetElementById(e))) return '';\r\n var bg='';\r\n if(e.style) {\r\n if(xStr(c)) {e.style.backgroundColor=c;}\r\n if(xStr(i)) {e.style.backgroundImage=(i!='')? 'url('+i+')' : null;}\r\n bg=e.style.backgroundColor;\r\n }\r\n return bg;\r\n}", "function changeColor(){\n \n //Write a condition determine what color it should be changed to\n if(text.innerHTML === \"#F08080\"){\n //change the background color using JS\n text.innerHTML = \"#f5cb42\";\n clicker.style.backgroundColor = \"#f5cb42\";\n //Change the text of the color using the span id color-name\n\n }\n\n else{\n //change the background color using JS\n clicker.style.backgroundColor = \"#F08080\";\n text.innerHTML = \"#F08080\";\n //Change the text of the color using the span id color-name\n\n\n }\n}", "function use_plyr_bg_color() {\n ctx.strokeStyle = BLACK;\n ctx.fillStyle = BLACK;\n if (sessionStorage.getItem(\"page\") === BLACK) {\n ctx.strokeStyle = WHITE;\n ctx.fillStyle = WHITE;\n }\n }", "function check(c){\n\t(c===pickedColor)?tof.textContent=\"CORRECT\":tof.textContent=\"TRY AGAIN\";\n}", "function replaceFontColor (text) {\n while (text != (text = text.replace(/\\[color=([^\\]]+)\\]((?:(?!\\[color=[^\\]]+\\]|\\[\\/color\\])[\\S\\s])*)\\[\\/color\\]/ig, function (match, p1, p2, offset, string) {\n return \"<font color='\" + p1 + \"'>\" + p2 + \"</font>\";\n })));\n return text;\n}", "function isColorInPalette(strF, strT){\n errorMessages.value(\"\");\n let tempStrF = strF.match(/[a-z_]/gi);\n let tempStrT = strT.match(/[a-z_]/gi);\n let tempPalette = [];\n let testStr = true;\n for(let j = 0; j< palette.length; j++){\n tempPalette[j] = palette[j][0];\n }\n for(let i = 0; i <tempStrF.length; i++ ){\n if(tempPalette.includes(tempStrF[i])){\n // Do not set test string to true here as it may be the last letter that is checked.\n // if the state machine is ever set to false that is what we need to know.\n // print(\"The color is in the palette\");\n }\n else {\n testStr = false;\n //print(\"One of the colors is not in the palette\");\n }\n }\n for(let k = 0; k <tempStrT.length; k++ ){\n if(tempPalette.includes(tempStrT[k])){\n // Do not set test string to true here as it may be the last letter that is checked.\n // if the state machine is ever set to false that is what we need to know.\n // print(\"The color is in the palette\");\n }\n else {\n testStr = false;\n //print(\"One of the colors is not in the palette\");\n }\n }\n return testStr;\n}", "function highlightBackground(cell)\r\n {\r\n // Gold background-color with 35% opacity\r\n $(cell).css('background-color', 'rgba(255, 215, 0, 0.35)');\r\n }", "function white() {\r\n for (var i = 0; i < 81; ++i) {\r\n var bc = document.getElementById(i).style.backgroundColor;\r\n var dis = document.getElementById(i).disabled;\r\n if (dis) {\r\n document.getElementById(i).style.backgroundColor = \"rgb(217, 218, 208)\";\r\n } else if (document.getElementById(i).value != \"\") {\r\n document.getElementById(i).style.backgroundColor = \"rgb(20, 145, 246)\";\r\n } else {\r\n document.getElementById(i).style.backgroundColor = \"white\";\r\n }\r\n }\r\n}", "function checkColor(args){\n\tvar p = args[0];\n\tvar rgb = args[1];\n\tviewerParams.Pcolors[p] = [rgb.r/255., rgb.g/255., rgb.b/255., rgb.a];\n\t//update the octree loading bar if it exists\n\tif (viewerParams.haveOctree[p]){\n\t\td3.select('#' + p + 'octreeLoadingFill').attr('fill','rgb(' + (255*viewerParams.Pcolors[p][0]) + ',' + (255*viewerParams.Pcolors[p][1]) + ',' + (255*viewerParams.Pcolors[p][2]) + ')')\n\t\td3.select('#' + p + 'octreeLoadingText').attr('fill','rgb(' + (255*viewerParams.Pcolors[p][0]) + ',' + (255*viewerParams.Pcolors[p][1]) + ',' + (255*viewerParams.Pcolors[p][2]) + ')')\n\t}\n}", "function get_background_color(element) {\n\t\t\tvar rgb = $(element).css('background-color');\n\t\t\trgb = rgb.match(/^rgb\\((\\d+),\\s*(\\d+),\\s*(\\d+)\\)$/);\n\t\t function hex(x) {return (\"0\" + parseInt(x).toString(16)).slice(-2);}\n\t\t return \"0x\" + hex(rgb[1]) + hex(rgb[2]) + hex(rgb[3]);\n\t\t}", "function OLcontentBackground(text, picture, hasfullhtml){\r\nvar txt;if(hasfullhtml){txt=text;}else{txt=\r\n'<table'+(o3_wrap?'':' width=\"'+o3_width+'\"')+' border=\"0\" cellpadding=\"0\" cellspacing=\"0\" '\r\n+'height=\"'+o3_height+'\"><tr><td colspan=\"3\" height=\"'+o3_padyt+'\"></td></tr><tr><td width=\"'\r\n+o3_padxl+'\"></td><td valign=\"top\"'+(o3_wrap?'':' width=\"'+(o3_width-o3_padxl-o3_padxr)+'\"')+'>'\r\n+OLlgfUtil(0,o3_textfontclass,'div',o3_textcolor,o3_textfont,o3_textsize)+text+\r\nOLlgfUtil(1,'','div')+'</td><td width=\"'+o3_padxr+'\"></td></tr><tr><td colspan=\"3\" height=\"'\r\n+o3_padyb+'\"></td></tr></table>';}\r\nOLsetBackground(picture);\r\nreturn txt;\r\n}", "function backgroundColor() {\n return Math.floor(Math.random() * 256);\n}", "function makeNight(){\n bgColor = \"#191970\";\n grassColor= \"#006400\";\n}", "function bkcolor (input)\n{\n document.body.style.backgroundColor = input;\n}" ]
[ "0.6609497", "0.64297247", "0.64067775", "0.6096098", "0.60119206", "0.595266", "0.5937559", "0.58918947", "0.58866966", "0.58602107", "0.5845899", "0.5838103", "0.58225995", "0.5806666", "0.576732", "0.57668984", "0.57601666", "0.5739534", "0.57319903", "0.5712443", "0.5711359", "0.566737", "0.56449205", "0.5635785", "0.56123304", "0.5597893", "0.55835587", "0.5568533", "0.55682427", "0.5550559", "0.5547918", "0.55309635", "0.55194217", "0.55140704", "0.5510891", "0.5500895", "0.5498174", "0.5496408", "0.54894984", "0.54828966", "0.547703", "0.5469562", "0.54683554", "0.545327", "0.5439074", "0.54211104", "0.5416691", "0.54035485", "0.5399254", "0.53979796", "0.5379904", "0.53774357", "0.53769904", "0.5374517", "0.536885", "0.53641295", "0.53630984", "0.53613174", "0.5355708", "0.53324085", "0.53274965", "0.5322252", "0.5312588", "0.5311285", "0.53097403", "0.529464", "0.5288352", "0.5288253", "0.5287055", "0.5281446", "0.5281433", "0.5275779", "0.52720153", "0.52653116", "0.52611285", "0.52577055", "0.52558887", "0.52546257", "0.52484816", "0.5246531", "0.52461165", "0.52445084", "0.52405727", "0.52355224", "0.5233402", "0.5229826", "0.5226461", "0.5225605", "0.52215636", "0.5211951", "0.5209863", "0.5205232", "0.52051115", "0.5202839", "0.519932", "0.51922953", "0.5190323", "0.5184924", "0.5180704", "0.5175382" ]
0.54944146
38
Updates data after asynchronous data load
componentWillReceiveProps(nextProps) { this.setState(nextProps); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateData() {\n\t/*\n\t* TODO: Fetch data\n\t*/\n}", "function updateData() \n{\n\tObject.keys(raidApp.selectedLocations).forEach((key) => \n\t{\n\t\tconst raid = raidApp.selectedLocations[key];\n\t\tconst card = getRaidCard(raid);\n\t\t// CODELAB: Add code to call getForecastFromCache\n\n\t\t// Get the forecast data from the network.\n\t\t//getRaidFromNetwork(location.geo).then((forecast) => {\n\t\t//renderForecast(card, forecast);\n\t\t//});\n\t\trenderRaid(card, raid) \n\t});\n}", "function updateData()\r\n{\r\n if (debug)\r\n {\r\n console.debug(\"updating data...\");\r\n }\r\n Clientraw.retrieveAndParse(clientrawUrl, Clientraw.parseClientraw);\r\n Clientraw.retrieveAndParse(clientrawhourUrl, Clientraw.parseClientrawhour);\r\n Clientraw.retrieveAndParse(clientrawextraUrl, Clientraw.parseClientrawextra);\r\n}", "function updateData() {\n $.getJSON(window.location + 'data', {\n measure: _store.measure,\n dag: _store.dag,\n id: _store.id\n }, function (data) {\n var array = [];\n for (var key in data) {\n array.push({ value: data[key].value, date: new Date(data[key].ds) });\n }\n _store.data = array;\n _store.updating = false;\n DetailViewStore.emit(DATA_UPDATE_EVENT);\n });\n}", "function syncData() {}", "function update() {\n var conn = new Ext.data.Connection();\n conn.request({\n url: '/json/',\n method: 'GET',\n params: {},\n success: function(responseObject) {\n dataArray = Ext.decode(responseObject.responseText);//decodes the response\n reload_data(); //resets the store and grids\n },\n failure: function() {\n alert(\"failure with GET!\");\n }\n });\n\t \n }", "update(startingData) {}", "function updateData() {\n\n const currentAvatarPage = invisible.getAttribute(\"current-avatar-page\");\n const currentAvatarPageToFetch = currentAvatarPage - 1;\n const fetchURL = \"getShopDtoByUserId/\" + currentUserId + \"?page=\" + currentAvatarPageToFetch + \"&size=5\";\n\n fetch(`${fetchURL}`)\n .then(success) // successful response\n .then(handleData)\n .then(activateShopping)\n .catch(error); // error\n\n }", "refreshDatas() {\n this.populateBrandsData(); \n this.forceUpdate();\n }", "update(data) {\n this.data = data || this.data;\n this._updateID++;\n }", "async updateData() {\n await this.sleep(1000);\n fetch('/getsystem').then(\n response => response.json()).then(data => this.setState({\n data: data\n })).catch(error => console.error(error));\n }", "function updateData() {\n data = JSON.parse(FooBar.getData());\n //console.log(data);\n}", "function reloadData() {\n if (typeof (CPData) != \"undefined\") { CPData.regenerate(); }\n if (typeof (CPDataSoon) != \"undefined\") { CPData.regenerate(); }\n if (typeof (CPDataDownloaded) != \"undefined\") { CPData.regenerate(); }\n loadInfo();\n }", "__doDataUpdate() {\n if (this.$isDestroyed) {\n return;\n }\n\n let queues = this.__setDataQueue;\n this.__setDataQueue = null;\n if (!queues || !queues.length) {\n return;\n }\n\n // call lifecycle beforeUpdate hook\n this.beforeUpdate && this.beforeUpdate();\n this.setData(getSetDataPaths(queues), this.__nextTickCallback);\n }", "updateDataFile() {\n\t\tthis.getDataFile()\n\t\t.then(() => this.getClient());\n\t}", "function updateData(data) {\n\t\t\t$scope.$parent.mainEntity.get().then(refreshMainEntity, processError);\n\t\t}", "function update_data()\n {\n data = walk_list(container, 0);\n }", "async update() {}", "async loadData() {\n this.setState({\n data: await get()\n })\n }", "function on_data(data) {\n data_cache[key] = data;\n placeholder.update();\n }", "function _updateData() {\n return _getWeather()\n .then(function (weather) {\n let temp = weather.main.temp - 273,\n weatherStatus = weather.weather[0].main,\n windSpeed = weather.wind.speed;\n _renderData(localLat,localLon,temp,weatherStatus,windSpeed);\n }, function () {\n console.error(\"Что-то пошло не так!!!\");\n });\n }", "function update(){\n\tconsole.log('Initializing data...server will be ready when the count is done')\n\tdb.clearCityData('sfbay')\n\tdb.saveCityData('sfbay');\n}", "update() {\n this.dataChanged = true;\n this.persons.all = undefined;\n this.jobTitles.all = undefined;\n this.updateFiltered();\n this.updateTimed();\n }", "function loadData() {\n consolidatedresults.loaded = false;\n dataService.getConsolidatedResults()\n .then(function(response) {\n //handle the success condition here\n var data = response.data;\n consolidatedresults.realdata = data[0];\n consolidatedresults.col_names = data[1];\n consolidatedresults.loaded = true;\n // console.log(consolidatedresults.realdata);\n // console.log(consolidatedresults.col_names);\n });\n }", "function getData()\n\t\t{\n\t\t\tvar newData = { hello : \"world! it's \" + new Date().toLocaleTimeString() }; // Just putting some sample data in for fun.\n\n\t\t\t/* Get my data from somewhere and populate newData with it... Probably a JSON API or something. */\n\t\t\t/* ... */\n\t\t\tupdateCallback(newData);\n\t\t}", "fetchData() {\n this.initLoading();\n this.getInstance(this.view, this.qs_url).then(instance => {\n this.setLoadingSuccessful();\n this.data.instance = instance;\n\n if(this.view.schema.autoupdate) {\n this.startAutoUpdate();\n }\n }).catch(error => {\n debugger;\n this.setLoadingError(error);\n });\n\n this.getParentInstancesForPath();\n }", "function getDataAndApply() {\n getModelKey();\n for (var i = 0; i < toggleSection.length; i++) {\n toggleSection[i].classList.remove('loaded');\n }\n getData(modelKey,\n getSelectedTrimId(),\n getSelectedEngineId(),\n function (status, response) { \n apply(response, $stats); \n setTimeout(function(){\n setUpHeight();\n for (var i = 0; i < toggleSection.length; i++) {\n toggleSection[i].classList.add('loaded');\n }\n }, 400);\n },\n function () { console.log(\"getDataAndApply fail\"); });\n }", "function refreshData() {\n $scope.loadData();\n }", "async function updateDataFromServer () {\n weatherDatafromServer = await getWeatherDataFromServer()\n\n // Setting the state with the returned server's data\n setState(weatherDatafromServer)\n }", "function loadData() {\n system.isLoading = true;\n\n $.ajax({\n url: system.apiURL,\n dataType: 'jsonp',\n success: onLoadData\n });\n\n }", "fetchData() {\n this.initLoading();\n let qs = this.setAndGetQuerySetFromSandBox(this.view, this.qs_url);\n this.data.instance = qs.cache = qs.model.getInstance({}, qs);\n this.setLoadingSuccessful();\n this.getParentInstancesForPath();\n }", "fetchData() {\n this.initLoading();\n let qs = this.setAndGetQuerySetFromSandBox(this.view, this.qs_url);\n this.data.instance = qs.cache = qs.model.getInstance({}, qs);\n this.setLoadingSuccessful();\n this.getParentInstancesForPath();\n }", "update(data) {\n this.data = data;\n this.populate(this.dindex);\n console.log(\"Infographic of type \\\"\" + this.typename + \"\\\" updated.\");\n }", "async loadData() {\n if (!this.load_data) throw new Error('no load data callback provided');\n\n return await Q.nfcall(this.load_data);\n }", "function requestData() {\n firstDataPass = true;\n __notifySubscribersForNewDataCache(firstDataValues);\n firstDataValues = [];\n }", "async function update() {\n const file = await downloadHelper.download();\n if (!file) return;\n let timeSeries = await fileHelper.loadJSON('./data/output/timeSeries.json');\n const date = [file.slice(4, 6), file.slice(2, 4), file.slice(0, 2)].join('-');\n const entries = await fileHelper.parseCSV(file);\n const summary = dataHelper.summarizeCases(entries);\n timeSeries = dataHelper.agregateDataDay(timeSeries, summary, date);\n await fileHelper.saveJSON('./data/output/timeSeries.json', timeSeries);\n}", "loadingData() {}", "loadingData() {}", "async initializeDataLoad() {\n }", "fetchData() {\n this.setLoadingSuccessful();\n }", "async function fetchData() {\n\n // get the datasets.json data\n const url = withPrefix('/data/datasets.json')\n const resp = await fetch(url)\n const datasets = await resp.json()\n\n // sort the datasets by added date, descending\n datasets.sort((a, b) => new Date(b.added) - new Date(a.added))\n\n // update the display with latest data\n setDatasets(datasets)\n setFiltered(datasets.map(d => d.slug))\n setSubjects(getSubjects(datasets))\n setStart(getEarliestDate(datasets))\n }", "function updateData() {\n $http.get('backend.php?method=index').then(function(response) {\n console.log('Result from method index----');\n console.log(response.data);\n $scope.items = response.data;\n });\n }", "_onRefresh() {\n this.loadData(false);\n }", "_onRefresh() {\n this.loadData(false);\n }", "function fetchData() {\n console.log('IMonData: [Old API] Fetching...');\n var store = new Store();\n\n var baseUrl = 'https://thenetmonitor.org/v1/';\n\n var futures = [];\n\n ['datum_sources', 'countries', 'regions'].forEach(function(type) {\n var fut = HTTP.get.future()(baseUrl + type, { timeout: Settings.timeout });\n futures.push(fut);\n var results = fut.wait();\n store.sync(results.data);\n });\n\n Future.wait(futures);\n\n console.log('IMonData: [Old API] Inserting...');\n\n _.each(store.findAll('regions'), insertRegion);\n _.each(store.findAll('countries'), insertCountry);\n _.each(store.findAll('datum_sources'), insertIndicator);\n\n console.log('IMonData: [Old API] Inserted.');\n\n}", "function getData()\n\t\t{\n\t\t\tvar newData = { hello : \"world! it's \" + new Date().toLocaleTimeString() }; // Just putting some sample data in for fun.\n\n\t\t\t/* Get my data from somewhere and populate newData with it... Probably a JSON API or something. */\n\t\t\t/* ... */\n\n\t\t\t// I'm calling updateCallback to tell it I've got new data for it to munch on.\n\t\t\tupdateCallback(newData);\n\t\t}", "refreshData() {\n if (!this.refreshUrl) {\n return;\n }\n Csv.parseUrl(proxyCatalogItemUrl(this, this.refreshUrl), true, this.ignoreRowsStartingWithComment).then(dataColumnMajor => {\n runInAction(() => {\n if (this.polling.shouldReplaceData) {\n this.dataColumnMajor = dataColumnMajor;\n }\n else {\n this.append(dataColumnMajor);\n }\n });\n });\n }", "function refreshData() {\n\n\t$(\"#data-refresh-response\").load('/fetch_data');\n}", "async refresh() {\n this.notifyLoading(true);\n refreshApex(this.boats); \n this.notifyLoading(false);\n }", "function fetch_data() {\n\n function on_data_received(data) {\n\t load_data_into_table(data);\n\n if (refresh_rate != 0) {\n\t setTimeout(fetch_data, refresh_rate * 1000);\n\t }\n }\n \n $.ajax({\n url: dataurl,\n method: 'GET',\n dataType: 'json',\n success: on_data_received\n });\n }", "async function StoredDataGetter(){\n\n return await updated_data;\n\n}", "componentDidUpdate() {\n this.loadData();\n }", "function updateDatabase() {\n var promises = [];\n getAllData();\n}", "async function updateData() {\n const sheetData = await connectToGoogleSheets(SPREADSHEET_ID);\n\n // create all promises to fetch data from all the sheets\n const promises = SHEETS.map((SHEET) => {\n const { index, name, type, cols } = SHEET;\n return getSheetData(sheetData.worksheets[index], name, type, cols);\n });\n\n Promise.all(promises)\n .then((data) => {\n // map data to final format\n const formattedData = SHEETS.reduce((acc, SHEET, i) => {\n acc[SHEET.name] = data[i];\n return acc;\n }, {});\n\n return Promise.resolve(formattedData);\n })\n .then((arr) => {\n writeJson(DATA_PATH, arr);\n });\n}", "async loadItems() {\n const keys = await AsyncStorage.getAllKeys();\n const values = await AsyncStorage.multiGet(keys);\n\n this.data = this.data.set('source', fromJS(values));\n }", "updateData(data) {\n this.data(data, true);\n\n return this;\n }", "update_data(obj) {\n // Data result and query info\n const data = obj.json\n const first = obj.first\n const last = obj.last\n const units = obj.units\n const uid = obj.uid\n\n // Track timings\n const timings = obj.timings // from viewer\n timings.buffer_latency = performance.now() - timings.buffer_time\n timings.data_time = performance.now()\n this._last_timings = timings\n\n // State from data-updates. Stored for manual mode layout-saving\n this._last_update = {first: first, last: last, units: units}\n this._needs_custom_update = false\n\n if (this._sync_mode == SyncMode.MANUAL) {\n // Show manual button in a default color to indicate we are no longer stale\n // TODO: This just indicates a refresh. If the global slider/settings has moved SINCE then, we could\n // actually be stale. This is a ui bug that needs to be fixed using a global settings version number\n // or something like that.\n this.jheader.find('#sync-manual').addClass('selected')\n }\n this.remove_status_msg(BaseWidget.STALE)\n this.jheader.find('#sync-manual').removeClass('selected-warning')\n this.jheader.find('#sync-manual').html(BaseWidget.MANUAL_BUTTON_TEXT_DEFAULT)\n this.jheader.removeClass('stale')\n\n this.num_data_updates++\n this.on_update_data(data, obj)\n }", "function updateArray()\n{\n\t$.ajax({\n\t\ttype: \"GET\",\n\t\turl: \"/stats\",\n\t\tdataType: \"text\",\n\t\tsuccess: function (data, textStatus, jqXHR) {\n\t\t\tvar tmp = JSON.parse(data);\n\t\t\tvar tmpp = {};\n\t\t\tif (vdatap.length != 0) {\n\t\t\t\tif (vdatap[0]['timestamp'] == tmp['timestamp']) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (v in tmp) {\n\t\t\t\tif (tmp[v]['value'] != undefined) {\n\t\t\t\t\ttmp[v]['value'] = parseInt(tmp[v]['value']);\n\t\t\t\t\ttmpp[v.replace(\"MAIN.\",\"\")] = parseInt(tmp[v]['value']);\n\t\t\t\t}\n\t\t\t}\n\t\t\tvdata.unshift(tmp);\n\t\t\tvdatap.unshift(tmpp);\n\t\t\tcompressData();\n\t\t\tupdateHitrate();\n\t\t\tif (reconstructTable) {\n\t\t\t\tconstructTable();\n\t\t\t\treconstructTable = false;\n\t\t\t\tsparklineDataHistory = {};\n\t\t\t} else {\n\t\t\t\tupdateTable();\n\t\t\t}\n\t\t}\n\t})\t\n}", "loadData(){\n\t\tlet thisStore = this;\n\t\tClient.fetchBugs(bugs => {\n\t\t\tthis.bugs = bugs;\n\t\t\t//timeout required upon app loading, but no lag due to listening for data load completing\n\t\t\t//data will be loaded into the state of app.jsx\n\t\t\tsetTimeout(function(){thisStore.emit('DATA_LOADED')}, 250);\n\t\t});\n\t}", "function loadData() {\n if (cachedData) {\n historyData = JSON.parse(cachedData);\n renderData(historyData);\n } else {\n stopButtonsUpdate();\n }\n}", "async function refresh() {\n setLoading(true);\n setNetworkError(false);\n const data = await fetchCanteenDataFromWeb();\n if (data === 'networkError') {\n setNetworkError(true);\n } else {\n saveCanteenDataToStore(data);\n setDayPlans(data);\n }\n setLoading(false);\n }", "async saveData() {\n let data = this.state.rowData;\n let projectID = this.props.match.params.projectID;\n\n let updatedRows = this.updatedRows;\n\n // index is the index of a row that has been updated\n\n let processData = async function (pair) {\n let index = pair[\"rowIndex\"];\n let key = pair[\"colIndex\"];\n let netID = data[index][\"netid\"];\n let hours = data[index][key];\n let newData = {\n \"ProjectID\": projectID,\n \"NetID\": netID,\n \"Dates\": key,\n \"HoursPerWeek\": hours\n };\n let response = await fetch('../api/updateSchedule', {\n method: \"PUT\",\n headers: {\n 'Accept': 'application/json',\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(newData)\n });\n }\n updatedRows.forEach(processData);\n this.updatedRows.clear();\n }", "updateSelfData(ro) {}", "function dataLoaded(err,data,m){\n}", "async function updateData () {\n setIsLoading(true)\n let tempUser = [...props.users];\n tempUser[modelState.index].name = action;\n tempUser[modelState.index].addedDate = addedDate;\n tempUser[modelState.index].addedMoment = addedMoment;\n await wait(2000);\n setIsLoading(false)\n props.AddUser(tempUser)\n setModelState({...modelState, index:null,popupType:''})\n }", "function loadRemoteData() {\n\n\t\t// The comment service returns a promise.\n\t\tUserservice.getEditedComments().then(function(EditedComments) {\n\n\t\t\tapplyRemoteData(EditedComments);\n\n\t\t});\n\n\t}", "function loadData() {\n $.get(\"/api/games\")\n .done(function (data) {\n updateView(data)\n console.log(data);\n })\n .fail(function (jqXHR, textStatus) {\n showOutput(\"Failed: \" + textStatus);\n });\n }", "function loadData() {\n $.get(\"/api/games\")\n .done(function (data) {\n updateView(data)\n console.log(data);\n })\n .fail(function (jqXHR, textStatus) {\n showOutput(\"Failed: \" + textStatus);\n });\n }", "makeData (callback) {\n\t\tBoundAsync.series(this, [\n\t\t\tthis.adjustMarkers,\t\t\t// adjust those markers for a different commit\n\t\t\tthis.setData\t\t\t\t// set the data to be used in the request that will result in a message sent\n\t\t], callback);\n\t}", "@api\n async refresh() {\n this.notifyLoading(true);\n this.isLoading = true;\n this.notifyLoading(this.isLoading);\n await refreshApex(this.boats);\n this.isLoading = false;\n this.notifyLoading(this.isLoading);\n \n }", "setObjectDataLoaded() {\n this.hasDataLoaded.object = true\n if(this.hasDataLoaded.record === true) {\n this.handleWireDataLoaded();\n }\n }", "async function updateUI() {\n await retrieveData('/data')\n .then(data => {\n document.getElementById('date').innerHTML =\n `Date: ${data[data.length - 1].date}`\n\n document.getElementById('temp').innerHTML =\n `${data[data.length - 1].temperature}°`\n\n document.getElementById('desc').innerHTML =\n `${data[data.length - 1].desc}`\n\n document.getElementById('content').innerHTML =\n `I feel :${data[data.length - 1].userResponse}`\n\n document.getElementById('day').innerHTML =\n `Day: ${data[data.length - 1].day}`\n\n })\n}", "function refreshData()\n{\n\n\tDataAccess.Data(function (data)\n\t{\n\t\t// if((data[\"username\"] == undefined) || (data[\"password\"] == undefined))\n\t\t// \treturn notification(\"שם משתמש או סיסמא אינו מוגדר\",\"error\")\n\t\tvar progress = $('#courses').find(\"progress\");\n\t\t//show the progress bar\n\t\t$(progress).show();\n\t\t// Set the progress bar 0/2\n\n\t\tchrome.runtime.sendMessage({updatedata:true});\n\n\t\t$(progress).attr('value',1);\n\n\t})\n\n}", "async updateData() {\n await this.sleep(5000);\n //display arch_task\n await fetch('/arch_task').then(\n response => response.json()).then(taskdata => this.setState({\n taskdata: taskdata\n })).catch(error => console.error(error));\n\n\n // display arch_subtask\n // fetch('/arch_subtask').then(\n // response => response.json()).then(subtaskdata => this.setState({\n // subtaskdata: subtaskdata\n // })).catch(error => console.error(error));\n\n //Display arch_finding\n fetch('/arch_finding').then(\n response => response.json()).then(findingdata => this.setState({\n findingdata: findingdata\n })).catch(error => console.error(error));\n\n //Display arch_system\n await fetch('/arch_system').then(\n response => response.json()).then(systemdata => this.setState({\n systemdata: systemdata\n })).catch(error => console.error(error));\n \n }", "update( data ) {\n this.state.cursor().update( cursor => {\n return cursor.merge( data )\n })\n }", "#updateData() {\n this.container.querySelector('.data').innerHTML = this.data;\n }", "setData (data) {\n this.processData(data);\n this.trigger('update', data);\n }", "function initData(){\n container.prepend(progressInfo);\n jQuery.get(getPageURL(0, resource)).done(function(data) {\n records = processData(data, true);\n initView(new recline.Model.Dataset({records:records}));\n numReq = getRequestNumber(data.result.total, pageSize);\n for (var i = 1; i <= numReq; i++) {\n requestData(getPageURL(i, resource));\n };\n });\n }", "loadData() {\n\n }", "_doFetch() {\n\t\tthis.emit(\"needs_data\", this);\n\t}", "async function loadData() {\n console.log('loadData() called');\n await downloadFromServer();\n console.log('Downloaded data from server');\n messages = JSON.parse(backend.getItem('message')) || [];\n // users = JSON.parse(backend.getItem('user_img')) || [];\n\n\n}", "updatePreFetch(data) {\n this.preFetch = data\n }", "reloadCurrentRow() {\n loadAllRows().then((response) => this.receiveData(this.currentRowIndex, response));\n }", "loadData(direction) {\n fetch(`widget-activity/?range_start=${this.attributes.rangeStart}&range_end=${this.attributes.rangeEnd}&direction=${direction}`)\n .then(rsp => rsp.json())\n .then(rsp => {\n this.set({\n rangeStart: rsp.range.range_start,\n rangeEnd: rsp.range.range_end,\n data: {\n changeDescriptions: rsp.activity_data.change_descriptions,\n comments: rsp.activity_data.comments,\n reviewRequests: rsp.activity_data.review_requests,\n reviews: rsp.activity_data.reviews,\n }\n });\n\n this.trigger('updated');\n });\n }", "componentDidMount() {\n // Load initial Data, otherwise there would be a gap till loaded\n this.fetchData()\n // update Data every 5 seconds\n this.updateData = setInterval(\n () => this.fetchData(),\n 5000\n )\n }", "function loadData(data) {\r\n // returns a promise\r\n }", "function loadData() {\n $.get(\"/api/games\")\n .done(function (data) {\n updateList(data);\n })\n .fail(function (jqXHR, textStatus) {\n alert(\"Failed: \" + textStatus);\n });\n }", "function _updateFromServer(){\n $.get('/api/heros', (\n function(response){\n _heroArray = response;\n // Signal listeners that store has been updated.\n AppStore.emitChange();\n }\n ));\n}", "function refreshData() {\n\t\tlistTasks({ category });\n\t\tlistTodayTasks({ category });\n\t}", "async connectedCallback() {\n let request = new XMLHttpRequest();\n request.open('GET', jsonData, false);\n request.send(null);\n this.data = JSON.parse(request.responseText);\n // turns out that github does not provide \n // unauthenticated access to public repos over rest\n // Thank you github. Hence cannot fatch Data using the Fetch API \n //const data = await fetchDataHelper({ amountOfRecords: 100 });\n //this.data = data;\n this.calculateData();\n }", "function loadData() {\n // After some auto-refresh do an hard refresh to update the HTML if there weren't any new items in a while\n if ( refreshCycle >= 60 ) {\n refreshData();\n return;\n }\n\n // Show loading image\n $('#ab_update img').show();\n\n // Define query\n var itemQuery;\n if ( config.userRights.canViewAFLDetails && config.userInfo ) {\n itemQuery = {\n 'afllimit': config.entries,\n 'afldir': 'older',\n 'action': 'query',\n 'list': 'abuselog',\n 'aflprop': 'ids|user|title|action|result|filter|timestamp|details|hidden'\n };\n } else {\n itemQuery = {\n 'afllimit': config.entries,\n 'afldir': 'older',\n 'action': 'query',\n 'list': 'abuselog',\n 'aflprop': 'ids|user|title|action|result|filter|timestamp|hidden'\n };\n }\n\n\n // Select only new items\n if (itemSince) {\n itemQuery.itemend = itemSince;\n }\n // Get data\n callAPI(itemQuery, function(response) {\n for (var i in response.query.abuselog) {\n var item = response.query.abuselog[i];\n\n // Remove duplicates which may occur during autorefresh\n if ($.inArray(item.id, itemIds) > -1) {\n continue;\n }\n if(itemIds.length >= config.entries) {\n refreshData();\n }\n itemIds.push(item.id);\n\n // Time\n // query timestamps are UTC in ISO format\n var now = new Date(),\n then = new Date(item.timestamp),\n date = then.toLocaleDateString(),\n time = then.toLocaleTimeString();\n\n // Set time limit for next requests\n itemSince = item.timestamp;\n\n // Create item details if viewer has permission, checks with personal configuration and item is not an anon\n var tableUserExtraLinks = '';\n\n // NB: UCP doesn't always give us the user's groups, so we'll heuristically assume that any username that _doesn't_ look like an IP address is probably a user.\n if ( config.userRights.canViewAFLDetails && config.userInfo && ((isUCP && !mw.util.isIPAddress(item.user)) || /(user)/.test(item.details.user_groups)) ) {\n var userExtraLinks = [];\n\n if (item.details.user_editcount != null) {\n // NB: UCP wikis provide an inaccurate edit count.\n userExtraLinks.push(isUCP\n ? '<span title=\"' + i18n.msg('ucpGlobalEditsTooltip').escape() + '\">' + i18n.msg('globalEdits').escape() + '&nbsp;&ge;&nbsp;' + item.details.user_editcount + '</span>'\n : i18n.msg('globalEdits').escape() + '&nbsp;' + item.details.user_editcount\n );\n }\n\n // UCP wikis no longer seem to provide this variable. Bug or intentional, who knows?\n if (item.details.user_age != null) {\n var userAge = secondsToString(item.details.user_age);\n userExtraLinks.push('<span title=\"' + mw.msg('abusefilter-edit-builder-vars-user-age') + '\">' + i18n.msg('age').escape() + '&nbsp;' + userAge + '</span>');\n }\n\n if (userExtraLinks.length) {\n tableUserExtraLinks = '<span class=\"abExtraLinks\">(' + userExtraLinks.join(' &bull; ') + ')</span>';\n }\n }\n\n // Create cells HTML\n var alUrl = mw.util.getUrl('Special:AbuseLog');\n var tableCellTime = '<td rowspan=\"2\" class=\"abItemTime\" >' + date + '<br/>' + time + '</td>';\n var tableCellPage =\n '<td class=\"abItemPage\">' +\n '<a href=\"' + mw.util.getUrl(item.title) + '\" target=\"_blank\">' + item.title + '</a>' + '&nbsp;' +\n '<span class=\"abExtraLinks\" style=\"text-transform:lowercase;\">(' +\n (config.userRights.canViewAFLDetails ? ('<a href=\"' + alUrl + '/' + item.id + '\" target=\"_blank\">' + mw.msg('abusefilter-log-detailslink') + '</a> &bull; ') : '') +\n mw.msg('abusefilter-edit-warn-actions') + '&nbsp;' + mw.msg('abusefilter-action-' + item.result) + ')' +\n '</span>' +\n '</td>';\n\n var tableCellUser =\n '<td class=\"abItemUser\">' +\n '<a href=\"' + mw.util.getUrl('User:' + item.user) + '\" target=\"_blank\">' + item.user + '</a> ' + tableUserExtraLinks +\n '</td>';\n\n var tableCellFilter =\n '<td class=\"abItemFilterID\">' +\n (config.userRights.canViewAFLDetails ? ('<a href=\"' + alUrl + '?wpSearchFilter=' + item.filter_id + '\" title=\"' + mw.msg('abusefilter-log-summary') + '\" target=\"_blank\">') : '') + i18n.msg('triggeredFilter').escape() + '&nbsp;' + item.filter_id + (config.userRights.canViewAFLDetails ? '</a>' : '') +\n ' - ' +\n (config.userRights.canViewAF ? ('<a href=\"' + mw.util.getUrl('Special:AbuseFilter') + '/' + item.filter_id + '\" title=\"' + mw.msg('abusefilter-history-public') + '\" target=\"_blank\">') : '') + item.filter + (config.userRights.canViewAF ? '</a>' : '') +\n '</td>';\n\n var tableCellTools =\n '<td class=\"abItemTools\">&raquo; ' +\n '<a href=\"' + mw.util.getUrl('User_talk:' + item.user) + '\" target=\"_blank\">' + mw.msg('talkpagelinktext') + '</a> &bull; ' +\n '<a href=\"' + mw.util.getUrl('Special:Contributions/' + item.user) + '\" target=\"_blank\">' + mw.msg('contribslink') + '</a> &bull; ' +\n '<a href=\"' + alUrl + '?wpSearchUser=' + item.user + '\" title=\"' + mw.msg('abusefilter-log-linkoncontribs-text') + '\" target=\"_blank\">' + mw.msg('abusefilter-log-linkoncontribs') + '</a> &bull; ' +\n '<a href=\"//soap.fandom.com/\" target=\"_blank\" title=\"' + i18n.msg('soapTooltip').escape() + '\">SOAP</a>' +\n (config.userRights.canBlock ? (' &bull; <a href=\"' + mw.util.getUrl('Special:Block/' + item.user) + '\" target=\"_blank\">' + mw.msg('blocklink') + '</a>') : '') +\n '</td>';\n\n // Create table row HTML\n var urgency = urgencyClass(now.getTime(), then.getTime()),\n timeDiff = Math.floor( (now.getTime() - then.getTime()) / 1000 ), // debugging purpose\n tableRow =\n '<tr class=\"abItemRow abItemRowReport abItemRowFilter' + item.filter_id + ' ' + urgency + '\" data-time-ago=\"' + secondsToString(timeDiff , 'timestamp') + '\">' +\n tableCellTime + tableCellPage + tableCellUser +\n '</tr>' +\n '<tr class=\"abItemRow abItemRowDetails abItemRowFilter' + item.filter_id + ' ' + urgency + '\">' +\n tableCellFilter + tableCellTools +\n '</tr>';\n\n // Insert row in table\n if (config.order == 'older') {\n $('#abHeader').after(tableRow);\n } else {\n $('#abData').append(tableRow);\n }\n }\n refreshCycle++;\n loadComplete();\n });\n }", "function refreshData() {\n vm.ready = true;\n if (vm.currentDeviceType && vm.currentDeviceType.id) {\n filter.start= moment(filter.start).format('YYYY-MM-DD HH:mm:ss');\n filter.end = moment(filter.end).format('YYYY-MM-DD HH:mm:ss');\n getFilteredDeviceState(vm.currentDeviceType, filter.start, filter.end);\n vm.steppedline = (vm.currentDeviceType.type === 'binary');\n }\n }", "update (data) {\n for (let key in data) {\n if (this.hasOwnProperty(key)) { // Can only update already defined properties\n this[key] = data[key];\n }\n }\n }", "fetchData() {\n this.initLoading();\n this.setAndGetInstanceFromSandBox(this.view, this.qs_url).then(instance => {\n this.setLoadingSuccessful();\n this.data.instance = instance;\n }).catch(error => {\n this.setLoadingError(error);\n debugger;\n });\n\n this.getParentInstancesForPath();\n }", "function updateData(data) {\n if (data && !data.error) {\n state.stops[\"id\"+data.id.substring(6)] = data; \n }\n displayData();\n}", "function updateData(data) {\n const updated = createContainer(data);\n main.innerHTML = \"\";\n main.append(updated);\n}", "updateData() {\n let new_qs = this.getQuerySet(this.view, this.qs_url).clone().prefetch();\n return new_qs.items().then(instances => {\n if(deepEqual(this.getQuerySet(this.view, this.qs_url).query, new_qs.query)) {\n this.setQuerySet(this.view, this.qs_url, new_qs);\n\n this.setInstancesToData(instances);\n\n return true;\n } else {\n return false;\n }\n }).catch(error => {\n debugger;\n });\n }", "loadData() {\n let key = this.Key;\n let tmp = [];\n\n if (key === \"department\") {\n getDepartment().done((res) => {\n res.forEach(({ DepartmentId, DepartmentName }) =>\n tmp.push({\n id: DepartmentId,\n label: DepartmentName,\n })\n );\n\n this.Data = tmp;\n });\n } else if (key === \"position\") {\n getPosition().done((res) => {\n res.forEach(({ PositionId, PositionName }) =>\n tmp.push({\n id: PositionId,\n label: PositionName,\n })\n );\n\n this.Data = tmp;\n });\n } else this.Data = formData[key];\n }", "setData (callback) {\n\t\tthis.newCommitHash = this.repoFactory.randomCommitHash();\t// a new commit hash for the adjusted locations\n\t\tthis.data = {\n\t\t\tteamId: this.team.id,\n\t\t\tstreamId: this.repoStreams[0].id,\n\t\t\tcommitHash: this.newCommitHash,\n\t\t\tlocations: this.adjustedMarkerLocations\n\t\t};\n\t\tcallback();\n\t}", "function refreshSourceDatas() {\n sourceDataService.findSourceData(\"\").then(\n // Success\n function(response) {\n sourceDatas = response.sourceDatas;\n refreshSourceDataTable();\n });\n }", "function loadData() {\r\n\r\n queue()\r\n .defer(d3.csv, \"data/hpi_sa.csv\")\r\n .defer(d3.csv, \"data/hpi_nsa.csv\")\r\n .await(function (error, sa, nsa) {\r\n\r\n if (error) throw error;\r\n\r\n sa.forEach(function (d) {\r\n d.YEAR = parseDate(d.YEAR);\r\n\r\n d.USA = +d.USA;\r\n d.USA = Math.round(d.USA); \r\n });\r\n\r\n nsa.forEach(function (d) {\r\n d.YEAR = parseDate(d.YEAR);\r\n\r\n d.USA = +d.USA;\r\n d.USA = Math.round(d.USA); \r\n });\r\n\r\n saData = sa;\r\n nsaData = nsa;\r\n\r\n updateVisualization();\r\n\r\n });\r\n}" ]
[ "0.81581765", "0.7244727", "0.71804595", "0.69931304", "0.699033", "0.6860745", "0.6850716", "0.67512196", "0.67452353", "0.6678395", "0.6640566", "0.66004074", "0.65766424", "0.65616494", "0.655694", "0.6555777", "0.65052265", "0.6495275", "0.6421862", "0.64195395", "0.6417964", "0.6403708", "0.6397507", "0.63707393", "0.636462", "0.6351376", "0.6327107", "0.63217795", "0.63193643", "0.62906307", "0.6267858", "0.6267858", "0.62662154", "0.6260346", "0.6256498", "0.62333816", "0.62330747", "0.62330747", "0.62259054", "0.6220702", "0.6212608", "0.6203893", "0.62033045", "0.62033045", "0.61962587", "0.61949736", "0.61890143", "0.6188055", "0.618388", "0.61741734", "0.6165519", "0.61608887", "0.61599", "0.6158125", "0.61554104", "0.6144186", "0.61417687", "0.61381733", "0.6119177", "0.6108015", "0.6099167", "0.60951805", "0.60889393", "0.6084822", "0.60809505", "0.60778713", "0.6073971", "0.6073971", "0.6068941", "0.6055394", "0.6049794", "0.60424685", "0.6041916", "0.6032654", "0.6023525", "0.6021367", "0.6018304", "0.6009471", "0.6001948", "0.5995075", "0.59848166", "0.5981714", "0.598009", "0.5975273", "0.59714574", "0.59671617", "0.5966177", "0.59652275", "0.5962684", "0.59550935", "0.5954125", "0.59503484", "0.59477013", "0.5946286", "0.59413606", "0.594025", "0.5940138", "0.59374285", "0.5935071", "0.59297657", "0.5917503" ]
0.0
-1
colors assinged by quartiles
function colors() { map.getLayer('countylayer').style('fill', function(data) { var ddi = parseFloat(data.ddi); if (ddi <= 38.12357875) { //1st quartile return "#fef0d9"; } else if (ddi <= 50.8602104) { return "#fdcc8a"; } else if (ddi <= 64.03133336 ) { return "#fc8d59"; } else { //4th quartile return "#d7301f"; } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function quakeColor(mag) {\n if (mag > 5) {\n return 'red'\n }\n else if (mag > 4) {\n return '#d5995d'\n }\n else if (mag > 3) {\n return 'darkorange'\n }\n else if (mag > 2) {\n return 'greenyellow'\n }\n else {\n return '#99ff33'\n }\n}", "function Qcolor(magnitude) {\n if (magnitude >= 5) {\n return \"#990000\";} \n else if (magnitude >= 4 && magnitude <5) {\n return \"#D60000\";} \n else if (magnitude >= 3 && magnitude <4) {\n return \"#FF4848\";} \n else if (magnitude >= 2 && magnitude <3){\n return \"#FFB0B0\";} \n else if (magnitude >= 1 && magnitude <2){\n return \"#FFCACA\"; } \n else if (magnitude < 1){\n return \"#FFE4E4\";} \n }", "function color(n) {\r\n // rgb\r\n return `hsl(${n * quickcol * 360},100%,50%)`;\r\n // default\r\n return `hsl(${n * quickcol * 360},${20+n*quickcol*50}%,${n * quickcol * 100}%)`;\r\n // gray-scaled\r\n return `hsl(0, 0%, ${100 - n * quickcol * 100}%)`;\r\n}", "function missileColorizer(missiles) {\n var intensity = 55;\n for (var i = 0; i < missiles.length; i++) {\n intensity += missiles[i].energy * 50;\n }\n intensity = Math.min(255, intensity);\n return 'rgb(' + intensity + ',' + Math.round(intensity / 2) + ',0)';\n}", "function quakeColor(depth) {\n if (depth <= 1) {\n return \"#008000\";\n } else if (depth <= 5 && depth > 1) {\n return \"#FF0000\";\n } else if (depth <= 10 && depth > 5) {\n return \"#FFA500\";\n } else if (depth <= 50 && depth > 10) {\n return \"#FFFF00\";\n } else if (depth <= 150 && depth > 50) {\n return \"#008000\";\n } else {\n return \"#000000\";\n };\n}", "function paintColor(d, i){\n if (i < n){\n tog(color, i / ( n + 2) );\n } else {\n var k = Math.floor(i/n);\n var num = ( 2 * k + 1);\n var dem = Math.pow(2, Math.ceil( Math.log(k + 1) / Math.LN2 ));\n var added = ( num / dem ) % 1;\n tog(color, (i % n + added) / ( n + 2) );\n }\n vec3.scale( color, color, 100);\n \n return [\n \"color:rgb( \", \n Math.round(color[0]), \"%,\", \n Math.round(color[1]), \"%,\",\n Math.round(color[2]), \"% )\"\n ].join(\"\");\n }", "function quantileColorScale(data){\r\n var colorClasses = ['#edf8e9','#c7e9c0','#a1d99b','#74c476','#31a354','#006d2c'];\r\n\r\n //create color scale generator\r\n var colorScale = d3.scaleQuantile()\r\n .range(colorClasses);\r\n\r\n //build array of all values of the expressed attribute\r\n var domainArray = [];\r\n for (var i=0; i<data.length; i++){\r\n var val = parseFloat(data[i][expressed]);\r\n if (typeof val == 'number' && !isNaN(val)){\r\n domainArray.push(val);\r\n } \r\n };\r\n \r\n wScale = d3.scalePow()\r\n .exponent(0.25)\r\n .range([0, chartWidth])\r\n .domain([d3.min(domainArray), d3.max(domainArray)]);\r\n\r\n //assign array of expressed values as scale domain\r\n colorScale.domain(domainArray);\r\n\r\n return colorScale;\r\n }", "function setColors() {\n var len = points.length / 3;\n for (var i = 0; i < len; i++) {\n colors.push(1.0);\n colors.push(0.0);\n colors.push(0.0);\n colors.push(1.0);\n }\n}", "function earthQuakeColor (mag){\n if (mag>90)\n return \"purple\"\n if (mag>70)\n return \"DarkRed\"\n else if (mag>50)\n return \"OrangeRed\"\n else if (mag>30)\n return \"Gold\"\n else if (mag>10)\n return \"GreenYellow\"\n else \n return \"Green\"\n}", "_prepareColorShades(min, max) {\n let step = (max - min) / 5;\n this._shades = [];\n for (let i = 0; i < 5; i++) {\n this._shades.push(max - i * step);\n }\n }", "function setQuantileColorScale (domainArr, rangeArr) {\n return d3.scale.quantile()\n .domain(domainArr)\n .range(rangeArr);\n }", "function createColorizer(breaks, colorRange) {\n const colors = colorRange.map((c) => [\n c.r,\n c.g,\n c.b,\n Math.floor(c.opacity * 255)\n ])\n return (v) => {\n const floored = Math.floor(v)\n for (let i = 0; i < breaks.length; i++) {\n if (floored <= breaks[i]) return colors[i]\n }\n return [255, 255, 255, 0]\n }\n}", "function colormatch(){\n\n\nreminder = Math.abs(change % (2*Math.PI));\n\nif (reminder > 0 && reminder < quarter) obcolor= (by-b > 0)? paint[1]: paint[3];\nelse if (reminder > quarter && reminder < quarter*2) obcolor= (by-b > 0)? paint[2]: paint[0];\nelse if (reminder > quarter*2 && reminder < quarter*3 ) obcolor= (by-b > 0)? paint[3]: paint[1];\nelse if (reminder > quarter*3 && reminder < quarter*4) obcolor= (by-b > 0)? paint[0]: paint[2];\n\nif (bcolor == obcolor) return 0;\nelse return 1;\n}", "function getColor5(d){\n return d>0.95 ? '#F67280':\n d>0.25 ? '#C06C84':\n d>-0.25 ? '#F8B195':\n d>-0.95 ? '#6C5B7B':\n '#355C7D';\n}", "function makeColorScale(data){\n\n var colorScale=d3.scale.quantile()//use quantile for scale generator\n .range(objectColors[expressed]);//incorporate objectColors array to change depending on variable\n\n//creating equal interval classifcation\n var minmax = [\n d3.min(data, function(d) { return parseFloat(d[expressed]); }),\n d3.max(data, function(d) { return parseFloat(d[expressed]); })\n ];\n //assign two-value array as scale domain\n colorScale.domain(minmax);\n return colorScale;\n}", "function getColor(i) {\n return i > 5 ? '#F30' :\n i > 4 ? '#F60' :\n i > 3 ? '#F90' :\n i > 2 ? '#FC0' :\n i > 1 ? '#FF0' :\n '#9F3';\n}", "function getQuakeColor(magnitude){\n \n if (magnitude < 1) {\n return \"#fff246\";\n }\n else if (magnitude < 2) {\n return \"#a3d76e\";\n }\n else if (magnitude < 3) {\n return \"#00b7a3\";\n }\n else if (magnitude < 4) {\n return \"#32bbff\";\n }\n else if (magnitude < 5) {\n return \"#4e5ecf\";\n }\n else {\n return \"#b714e0\";\n }\n}", "function getColor(d) {\n\n\t\tswitch (valueType) {\n\t\tcase \"percent\":\n\t\t\treturn d > 500 ? colours[6] :\n\t\t\td > 200 ? colours[5] :\n\t\t\td > 100 ? colours[4] :\n\t\t\td > 50 ? colours[3] :\n\t\t\td > 25 ? colours[2] :\n\t\t\td > 0 ? colours[1] :\n\t\t\t colours[0];\n\t\t\tbreak;\n\t\tcase \"difference\":\n\t\t zoomDiff = 11 - zoomLevel;\n\t\t if (zoomDiff > 0) {\n d = d / Math.pow(4, zoomDiff)\n\t\t }\n\n\t\t\treturn d > 500 ? colours[6] :\n\t\t\td > 200 ? colours[5] :\n\t\t\td > 100 ? colours[4] :\n\t\t\td > 50 ? colours[3] :\n\t\t\td > 25 ? colours[2] :\n\t\t\td > 0 ? colours[1] :\n\t\t\t colours[0];\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn d > 500 ? colours[6] :\n\t\t\td > 200 ? colours[5] :\n\t\t\td > 100 ? colours[4] :\n\t\t\td > 50 ? colours[3] :\n\t\t\td > 25 ? colours[2] :\n\t\t\td > 0 ? colours[1] :\n\t\t\t colours[0];\n\t\t}\n\t}", "function AssignColors(mag) \r\n{\r\n xLen=uIntervals.length;\r\n for (let i = 0; i < xLen; i++) \r\n {\r\n if (mag > uIntervals[xLen-i]) {return uColors[i]}\r\n }\r\n return \"gainsboro\";\r\n}", "function css_color(rate){\n\n var css;\n if(rate <= w4.rate_mean){\n l = 'q';\n quantz = d3.scale.quantize()\n .domain([w4.rate_min, w4.rate_mean])\n .range(d3.range(9));\n css = 'q' + quantz(rate) + \"-9\";\n }else{\n quantz = d3.scale.quantize()\n .domain([w4.rate_mean, w4.rate_max])\n .range(d3.range(9));\n css = 'p' + quantz(rate) + \"-9\";\n }\n //console.log(\"r=\" + rate +\" rmean=\" + rmean + \" :\" + clazz);\n return css;\n \n}", "getColor(cnt) {\n const colors = this.get('colors');\n const cutoffs = this.get('cutoffs');\n if (cnt > cutoffs[4]) return colors[4];\n if (cnt > cutoffs[3]) return colors[3];\n if (cnt > cutoffs[2]) return colors[2];\n if (cnt >= cutoffs[1]) return colors[1];\n return colors[0];\n // return cnt > cutoffs[4] ? colors[4] :\n // cnt > cutoffs[3] ? colors[3] :\n // cnt > cutoffs[2] ? colors[2] :\n // cnt >= cutoffs[1] ? colors[1] :\n // colors[0];\n }", "function thisColor(i) { \n colors = ['#001f3f', '#0074D9', '#B10DC9', '#AAAAAA', '#39CCCC', '#FFDC00', '#FF851B', \n '#01FF70', '#F012BE', '#7FDBFF', '#3D9970', '#85144b', '#2ECC40', '##FF4136', '#F012BE', \n \"#3366cc\", \"#dc3912\", \"#ff9900\"];\n\n cc = d3.scaleLinear()\n .domain([-2, 17])\n .range([1, 0]);\n\n return d3.interpolateSpectral(cc(i));\n}", "function colorRange(magnituge) {\n switch (true) {\n case magnituge >= 5.0:\n return 'red';\n break;\n case magnituge >= 4.0:\n return 'orangered';\n break;\n case magnituge >= 3.0:\n return 'orange';\n break;\n case magnituge >= 2.0:\n return 'gold';\n break;\n case magnituge >= 1.0:\n return 'yellow';\n break;\n default:\n return 'greenyellow';\n };\n}", "function getColor(d) {\n\tfld_min = 1;\n\tfld_max = 255;\n\tfld_incr = 31.75;\n\treturn d > (fld_min + fld_incr * 7) ? '#800026' :\n\t d > (fld_min + fld_incr * 6) ? '#BD0026' :\n\t d > (fld_min + fld_incr * 5) ? '#E31A1C' :\n\t d > (fld_min + fld_incr * 4) ? '#FC4E2A' :\n\t d > (fld_min + fld_incr * 3) ? '#FD8D3C' :\n\t d > (fld_min + fld_incr * 2) ? '#FEB24C' :\n\t d > (fld_min + fld_incr * 1) ? '#FED976' :\n\t \t\t '#FFEDA0';\n}", "function getColor(magnitude) {\r\n return magnitude >= 5 ? '#e80909' :\r\n magnitude >= 4 ? '#e87909' :\r\n magnitude >= 3 ? '#ffe208' :\r\n magnitude >= 2 ? '#f0ff19' :\r\n magnitude >= 1 ? '#5ce330' :\r\n '#03ff3d';\r\n}", "function getColor(magnitude) {\n if (magnitude > 5) {\n return \"#ea2c2c\";\n }\n if (magnitude > 4) {\n return \"#ea822c\";\n }\n if (magnitude > 3) {\n return \"#ee9c00\";\n }\n if (magnitude > 2) {\n return \"#eecc00\";\n }\n if (magnitude > 1) {\n return \"#d4ee00\";\n }\n return \"#98ee00\";\n}", "function getColor(d) {\n return d > 90 ? '#FC2500':\n d > 70 ? \"#FC5400\":\n d > 50 ? \"#FC7300\":\n d > 30 ? '#FCCD5D':\n d > 10 ? '#9ACD32':\n '#00FF00';\n}", "function getColor(magnitude) {\n if (magnitude > 5) {\n return \"#ea2c2c\";\n }\n if (magnitude > 4) {\n return \"#ea822c\";\n }\n if (magnitude > 3) {\n return \"#ee9c00\";\n }\n if (magnitude > 2) {\n return \"#eecc00\";\n }\n if (magnitude > 1) {\n return \"#d4ee00\";\n }\n return \"#98ee00\";\n}", "function colorgenerator() {\n let colours = [],\n i;\n for (i = 0; i < 372; i++){\n colours[i] = 'hsl(' + i + ', 100%, 50%)';\n if (i > 359) {\n colours[i] = 'hsl(0, 100%, 100%)';\n }\n }\n colours = colours.toString();\n //console.log(colours);\n root.style.setProperty(\"--colours\", colours);\n}", "function getColor(magnitude) {\r\n if (magnitude > 5) {\r\n return \"#ea2c2c\";\r\n }\r\n if (magnitude > 4) {\r\n return \"#ea822c\";\r\n }\r\n if (magnitude > 3) {\r\n return \"#ee9c00\";\r\n }\r\n if (magnitude > 2) {\r\n return \"#eecc00\";\r\n }\r\n if (magnitude > 1) {\r\n return \"#d4ee00\";\r\n }\r\n return \"#98ee00\";\r\n}", "function rangeColors(rangeNumber) {\n var colorArr = [];\n var red = new Color(232, 9, 26),\n white = new Color(255, 255, 255),\n green = new Color(6, 170, 60),\n start = green,\n end = red;\n // if (rangeNumber > 50) {\n // start = white,\n // end = red;\n // rangeNumber = rangeNumber % 51;\n // }\n var startColors = start.getColors(),\n endColors = end.getColors();\n for (var i = 0; i <= rangeNumber; i++) {\n var r = Interpolate(startColors.r, endColors.r, rangeNumber, i);\n var g = Interpolate(startColors.g, endColors.g, rangeNumber, i);\n var b = Interpolate(startColors.b, endColors.b, rangeNumber, i);\n var color = \"rgb(\" + r + \",\" + g + \",\" + b + \")\";\n colorArr.push(color);\n }\n\n function Interpolate(start, end, steps, count) {\n var s = start,\n e = end,\n final = s + (((e - s) / steps) * count);\n return Math.floor(final);\n }\n\n function Color(_r, _g, _b) {\n var r, g, b;\n var setColors = function(_r, _g, _b) {\n r = _r;\n g = _g;\n b = _b;\n };\n setColors(_r, _g, _b);\n this.getColors = function() {\n var colors = {\n r: r,\n g: g,\n b: b\n };\n return colors;\n };\n }\n return colorArr;\n}", "vaxiColor(n) {\n return n >= 100 ? 'hsl(139, 100%, 17%)':\n n > 75 ? 'hsl(139, 100%, 27%)':\n n > 60 ? 'hsl(139, 100%, 32%)':\n n > 50 ? 'hsl(139, 100%, 37%)':\n n > 45 ? 'hsl(139, 100%, 42%)':\n n > 40 ? 'hsl(139, 100%, 47%)':\n n > 35 ? 'hsl(139, 100%, 52%)':\n n > 30 ? 'hsl(139, 100%, 57%)':\n n > 25 ? 'hsl(139, 100%, 62%)':\n n > 20 ? 'hsl(139, 100%, 67%)':\n n > 15 ? 'hsl(139, 100%, 72%)':\n n > 10 ? 'hsl(139, 100%, 77%)':\n n > 5 ? 'hsl(139, 100%, 87%)':\n n > 3 ? 'hsl(139, 100%, 92%)':\n n > 2 ? 'hsl(139, 100%, 95%)':\n n > 1 ? 'hsl(139, 100%, 97%)':\n 'hsl(139, 100%, 99%)';\n }", "function getColor(d) {\n return d > 5 ? 'hsl(15, 100%, 50%)' :\n d > 4 ? 'hsl(30, 100%, 50%)' :\n d > 3 ? 'hsl(45, 100%, 50%)' :\n d > 2 ? 'hsl(60, 100%, 50%)' :\n d > 1 ? 'hsl(75, 100%, 50%)' :\n d > 0 ? 'hsl(90, 100%, 50%)' :\n 'hsl(0, 100%, 50%)';\n}", "function getColor(d) {\r\n return d > 50000 ? '#034e7b' :\r\n d > 40000 ? '#0570b0' :\r\n d > 30000 ? '#3690c0' :\r\n d > 20000 ? '#74a9cf' :\r\n d > 10000 ? '#a6bddb' :\r\n d > 5000 ? '#d0d1e6' :\r\n '#f1eef6';\r\n\t}", "static hueToRGB(p, q, t) {\n if (t < 0) { t += 1; }\n if (t > 1) { t -= 1; }\n if (t < (1/6)) { return p + ((q - p) * 6 * t); }\n if (t < (1/2)) { return q; }\n if (t < (2/3)) { return p + ((q - p) * ((2/3) - t) * 6); }\n return p;\n }", "function getColor(d) {\n return d > 5000 ? '#800026' :\n d > 4000 ? '#BD0026' :\n d > 3000 ? '#E31A1C' :\n d > 2000 ? '#FC4E2A' :\n d > 1000 ? '#FD8D3C' :\n d > 500 ? '#FEB24C' :\n d > 250 ? '#FED976' :\n '#FFEDA0';\n }", "function getEarthquakeCircleColor(pMagnitude) {\n\n // Assign color based on magnitude: \n // >=5 = #cc0000 \n // >=4 = #ff8080\n // >=3 = #ff9933\n // >=2 = #ffe066\n // >=1 = #ffff00\n // <1 = #80ff00\n \n if (pMagnitude > 5) {\n return \"#ff0000\"; \n } \n if (pMagnitude >= 4) {\n return \"#ff8080\"; \n } \n if (pMagnitude >= 3) {\n return \"#ff9933\"; \n } \n if (pMagnitude >= 2) {\n return \"#ffe066\"; \n } \n if (pMagnitude >= 1) {\n return \"#ffff00\"; \n } \n if (pMagnitude < 1) {\n return \"#80ff00\"; \n } \n\n}", "function getColor(magnitude) {\n if (magnitude > 7) {\n return 'red'\n } else if (magnitude > 6) {\n return 'orange'\n } else if (magnitude > 5) {\n return 'yellow'\n } else if (magnitude > 4) {\n return 'lightgreen'\n } else if (magnitude > 2) {\n return 'green'\n } else {\n return 'blue'\n }\n}", "function makeColorScale(data){\n\n // default colorScale\n var colorClasses = colorbrewer.PuBuGn[5];\n\n var colorScale = d3.scale.quantile()\n .range(colorClasses);\n\n var domainArray = [];\n for (var i = 0; i < data.length; i++){\n\n var val = parseFloat(data[i][expressed]);\n domainArray.push(val);\n };\n\n colorScale.domain(domainArray);\n\n return colorScale;\n\n }", "function getColor(d) {\n\tvar value = d ;\n\tvar s = value * 100 / 4 + 75;\n\tvar v = (1.0 - value * 1.5) * 50 + 50;\n\treturn currentCategory == \"footfall\" ? \"hsl(0, \" + s + \"%, \" + v + \"%)\"\t: \n\t\t\tcurrentCategory == \"rainfall\" ? \"hsl(300, \" + s + \"%, \" + v + \"%)\" :\n\t\t\t\tcurrentCategory == \"stayduration\" ? \"hsl(285, \" + s + \"%, \" + v\t+ \"%)\" :\n\t\t\t\t\tcurrentCategory == \"freetaxi\" ? \"hsl(265, \" + s + \"%, \" + v + \"%)\" :\n\t\t\t\t\t\tcurrentCategory == \"subzoneingress\" ? \"hsl(195, \" + s + \"%, \" + v\t+ \"%)\" : \n\t\t\t\t\t\t\tcurrentCategory == \"subzoneegress\" ? \"hsl(165, \" + s + \"%, \" + v\t+ \"%)\":\n\t\t\t\t\t\t\t\tcurrentCategory == \"planningareaegress\" ? \"hsl(75, \" + s + \"%, \" + v\t+ \"%)\":\n\t\t\t\t\t\t\t\t\tcurrentCategory == \"odplanningarea\" ? \"hsl(60, \" + s + \"%, \" + v\t+ \"%)\":\n\t\t\t\t\t\t\t\t\t\tcurrentCategory == \"model1\" ? \"hsl(30, \" + s + \"%, \" + v\t+ \"%)\"://45\n\t\t\t\t\t\t\t\t\t\t\tcurrentCategory == \"model2\" ? \"hsl(30, \" + s + \"%, \" + v\t+ \"%)\":\n\t\t\t\t\t\t\t\t\t\t\t\tcurrentCategory == \"model3\" ? \"hsl(30, \" + s + \"%, \" + v\t+ \"%)\"://330\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"hsl(30, \" + s + \"%, \" + v + \"%)\";//175\n}", "function getColor(d) {\n return d > 90 ? '#542788' :\n d > 70 ? '#2166ac' :\n d > 50 ? '#92c5de' :\n d > 30 ? '#f4a582' :\n d > 10 ? '#d7191c' :\n '#a50f15';\n}", "function setColor(magnitude) {\n return magnitude > 5 ? \"red\":\n magnitude > 4 ? \"orange\":\n magnitude > 3 ? \"pink\":\n magnitude > 2 ? \"yellow\":\n magnitude > 1 ? \"lightgreen\":\n \"lightyellow\";\n }", "function getColor(mag) {\n return mag >= 5 ? \"#EA2C2C\" : \n mag >= 4? \"#EA822C\" :\n mag >= 3? \"#EE9C00\" :\n mag > 2? \"#EECC00\" :\n mag > 1? \"#D4EE00\" :\n \"#98EE00\";\n}", "function getColour(mag) {\n if (mag > 5) {\n return \"#FF4500\"\n } else if (mag > 4) {\n return \"#FF6347\"\n } else if (mag > 3) {\n return \"#FF8C00\"\n } else if (mag > 2) {\n return \"#FF7F50\"\n } else if (mag > 1) {\n return \"#FF6347\"\n } else {\n return \"#FFA500\"\n }\n }", "function colorSquare(){\n let s = new Array;\n let v = new Array;\n for (let k = 0; k <= numberofTree; k++) {\n ctx.fillRect(parseFloat($('#mortal-tree'+k).css('left'))-780,parseFloat($('#mortal-tree'+k).css('top')) - 360,29,29);\n ctx.fillStyle = \"rgb(214,236,239)\";\n }\n for (let k = 1; k <= numberofTree; k++) {\n s[k] = (parseFloat($('#mortal-tree'+k).css('left'))-780)/30;\n v[k] = (parseFloat($('#mortal-tree'+k).css('top')) - 360)/30;\n tab[i+v[k]][j+s[k]] = 4;\n } \n }", "function makeColorScale3(data, color){\n\n var colorClasses = getColorClasses(color);\n\n var colorScale = d3.scale.quantile()\n .range(colorClasses);\n\n var domainArray = [];\n for (var i = 0; i < data.length; i++){\n var val = parseFloat(data[i][1]);\n domainArray.push(val);\n };\n\n colorScale.domain(domainArray);\n\n return colorScale;\n\n }", "function circleColor(quakeMag) {\n if (quakeMag > 7.9) {\n return \"#FF0909\"\n }\n else if (quakeMag > 6.9) {\n return \"#FF3209\"\n }\n else if (quakeMag > 5.9) {\n return \"#FF5309\"\n }\n else if (quakeMag > 4.9) {\n return \"#FF7C09\"\n }\n else if (quakeMag > 3.9) {\n return \"#FF9D09\"\n }\n else {\n return \"#FFD709\"\n }\n}", "function color(interest1) { //interest1 is 0-1 scaled relative value of first word in pair\n if (interest1 === undefined || interest1 === GREYVALUE) {\n return GREYCOLOR;\n }\n let red = 255 * interest1;\n let blue = 255 * (1 - interest1);\n return `rgb(${red}, 25, ${blue})` //backtick means string, ${} interpolates rgb values \n}", "setColor(sector, colors){\n const group = this.groupsArray[sector];\n let amnt = 0;\n [\"red\", \"green\", \"blue\"].forEach(c=>{\n if (colors[c]){\n amnt++;\n }\n })\n\n if (amnt == 3){\n group.forEach(i=>{\n this.FadeTo(i, this.colEnum.white).then(() => {})\n })\n } else if (amnt == 2){\n if (colors.red && colors.green){\n this.setGradient(group, this.colEnum.rg1, this.colEnum.rg2)\n } else if (colors.red && colors.blue){\n this.setGradient(group, this.colEnum.rb1, this.colEnum.rb2)\n } else if (colors.green && colors.blue){\n this.setGradient(group, this.colEnum.gb1, this.colEnum.gb2)\n } \n } else if (amnt == 1){\n if (colors.red){\n this.setGradient(group, this.colEnum.white, this.colEnum.red);\n } else if (colors.green){\n this.setGradient(group, this.colEnum.white, this.colEnum.green);\n } else {\n this.setGradient(group, this.colEnum.white, this.colEnum.blue);\n }\n } else {\n group.forEach(i=>{\n this.FadeTo(i, this.colEnum.off).then(() => {})\n })\n }\n }", "function colorMap(fraction,rgbarray){\n\n if (fraction<0.33) { rgbarray[0] = 0.0; }\n else if (fraction>0.67) { rgbarray[0] = 255.0; }\n else { rgbarray[0] = interpolate(fraction,0.33,0.67,0.0,255.0); }\n \n if (fraction<0.33) { rgbarray[1] = interpolate(fraction,0.0,0.33,0.0,255.0); }\n else if (fraction>0.67) { rgbarray[1] = interpolate(fraction,0.67,1.0,255.0,0.0); }\n else { rgbarray[1] = 255.0; }\n \n if (fraction<0.33) { rgbarray[2] = 255.0; }\n else if (fraction>0.67) { rgbarray[2] = 0.0; }\n else { rgbarray[2] = interpolate(fraction,0.33,0.67,255.0,0.0); }\n\n}", "function clrs(i, j) {\n clr_list = [\n [0, 0, 0],\n [255, 255, 255],\n [204, 82, 82],\n [204, 163, 82],\n [163, 204, 82],\n [82, 204, 82],\n [82, 204, 163],\n [82, 163, 204],\n [82, 82, 204],\n [163, 82, 204],\n [204, 82, 163],\n [204, 82, 82]\n ];\n var tmp = clr_list[i];\n var foo = d3.rgb(tmp[0], tmp[1], tmp[2])\n return d3.rgb(tmp[0], tmp[1], tmp[2]).darker(2.5).brighter(j * 5);\n}", "function getColor(d){\n return d > 5 ? \"#a54500\":\n d > 4 ? \"#FF0000\":\n d > 3 ? \"#ff6f08\":\n d > 2 ? \"#ff9143\":\n d > 1 ? \"#ffb37e\":\n \"#ffcca5\";\n }", "function getColor1(d){\n return d> 200 ? '#355C7D':\n d> 120 ? '#6C5B7B':\n d> 80 ? '#C06C84':\n d> 40 ? '#F67280':\n '#F8B195';\n }", "function uvColor (index) {\n if (index > 0 && index < 3 ) {\n green (index)\n }\n else if (index > 3 && index < 5 ) {\n yellow (index)\n }\n else if (index > 3 && index < 5 ) {\n yellow (index)\n }\n else if (index > 5 && index < 8 ) {\n orange (index)\n }\n else if (index > 8 && index < 11 ) {\n red (index)\n }\n else if (index > 11) {\n violet (index)\n }\n $(`#uvIndex2`).html(`\n <span> ${ index }</span>\n `) \n }", "function getColors(data) {\n // returns an Array of n colors, \n // if less than 70, red else green.\n let colors = [];\n for (let i = 0; i < data.length; i++) {\n if (data[i] >= 70)\n colors.push(`hsla(140, 50%, 60%, 1)`);\n else\n colors.push(`hsla(0, 50%, 60%, 1)`);\n }\n return colors\n}", "get_place_color(d, colorscale) {\n //Get data value\n if (d.munip_votes) {\n var value = d.munip_votes;\n }\n else {\n var value = 0;\n }\n if (value ) {\n //If value exists…\n if(value == -1){\n return '#B7E1F3';\n }\n else{\n return this.colorscale(value/26);\n }\n\n } else {\n //If value is undefined…\n return \"#99999F\";\n }\n }", "function heatMapColorforValue(value, maxValue){\n var h = (1.0 - value /maxValue) * 130;\n return \"hsl(\" + h + \", 100%, 50%)\";\n}", "function getColor( w, f ) {\n val = w/f;\n if( val > 0.75 && val <= 1 ) {\n return \"yellow\";\n }\n if( val > 1 ) {\n return \"red\" ; \n }\n return \"green\"; \n }", "function getColor(magnitude) {\r\n switch (true) {\r\n case magnitude > 5:\r\n return \"#ea2c2c\";\r\n case magnitude > 4:\r\n return \"#ea822c\";\r\n case magnitude > 3:\r\n return \"#ee9c00\";\r\n case magnitude > 2:\r\n return \"#eecc00\";\r\n case magnitude > 1:\r\n return \"#d4ee00\";\r\n default:\r\n return \"#98ee00\";\r\n }\r\n }", "function colorScale(frequenciesArray){ \n\t//accepts an array of all frequency values and defines the class breaks based on the lowest and highest \n\t\n\t//create quantile classes with color scale \n\tvar color = d3.scale.pow() //designate quantile scale \n\t\t.range ([\n\t\t \"#000\",\n\t\t\t//\"#302C29\", //grey-ish\n\t\t\t//\"#45455C\",\t\t\t\n\t\t\t//\"#4C61A2\", \n\t\t\t\"#057FFE\" //bright blue\n\t\t]); \n\t\n\t//set min and max data values as domain \n\tcolor.domain ( //[0,1]\n\t\t[\n\t\t\td3.min(frequenciesArray), //lowest \n\t\t\td3.max(frequenciesArray) //highest \n\t\t]\n\t); \n\t\n\t//var low = d3.min(frequenciesArray); //lowest \n\t//var high = d3.max(frequenciesArray); //highest \n\t//console.log(\"colorscale:\"+low+\" to \"+high);\n\t\n\treturn color; //return the color scale generator \t\n}", "function getColor31(d){\n return d> 3000 ? '#355C7D':\n d> 535 ? '#6C5B7B':\n d> 103 ? '#C06C84':\n d> 22 ? '#F67280':\n '#F8B195';\n\n}", "function getColor(d) {\n\t\t\t\treturn d > 5515000 ? '#3B0B0B' :\n\t\t\t\t\t d > 5515000 ? '#3B0B0B' :\n\t\t\t\t\t d > 5515000 ? '#3B0B0B' :\n\t\t\t\t\t d > 5515000 ? '#3B0B0B' :\n\t\t\t\t\t d > 5515000 ? '#3B0B0B' :\n\t\t\t\t\t d > 5514999 ? '#2E64FE' :\n\t\t\t\t\t d > 5564048 ? '#3B0B0B' :\n\t\t\t\t\t\t\t\t '#3B0B0B';\n\t\t\t}", "populateGridColorArrays() {\n //for every column..\n for (let i = 0; i < this.colNum; i++) {\n\n // //Generate colors based on a split complementry palette\n // if (i % 2 == 0) {\n // this.hVal = 19;\n // this.sVal = 91;\n // this.bVal = 95;\n // this.colorsRight[i] = color(this.hVal, this.sVal, this.bVal, this.mouduleAlpha);\n // } else if (i % 3 == 0) {\n // this.hVal = 59;\n // this.sVal = 96;\n // this.bVal = 87;\n // this.colorsRight[i] = color(this.hVal, this.sVal, this.bVal, this.mouduleAlpha);\n // }else{\n // this.hVal = 240;\n // this.sVal = 57;\n // this.bVal = 89;\n // this.colorsRight[i] = color(this.hVal, this.sVal, this.bVal, this.mouduleAlpha);\n // }\n\n // //Generate colors based on a triad palette\n // if (i % 2 == 0) {\n // this.hVal = 19;\n // this.sVal = 91;\n // this.bVal = 100;\n // this.colorsRight[i] = color(this.hVal, this.sVal, this.bVal, this.mouduleAlpha);\n // } else if (i % 3 == 0) {\n // this.hVal = 173;\n // this.sVal = 96;\n // this.bVal = 40;\n // this.colorsRight[i] = color(this.hVal, this.sVal, this.bVal, this.mouduleAlpha);\n // }else{\n // this.hVal = 259;\n // this.sVal = 82;\n // this.bVal = 90;\n // this.colorsRight[i] = color(this.hVal, this.sVal, this.bVal, this.mouduleAlpha);\n // }\n\n //Generate colors based on a analogus palette\n\n //based on the row number push one of three possible colors into the right hand side color array\n if (i % 3 === 0) {\n this.hVal = 261;\n this.sVal = 75;\n this.bVal = 91;\n this.colorsRight[i] = color(this.hVal, this.sVal, this.bVal, this.mouduleAlpha);\n } else if (i % 2 === 0) {\n this.hVal = 231;\n this.sVal = 90;\n this.bVal = 89;\n this.colorsRight[i] = color(this.hVal, this.sVal, this.bVal, this.mouduleAlpha);\n } else {\n this.hVal = 202;\n this.sVal = 90;\n this.bVal = 89;\n this.colorsRight[i] = color(this.hVal, this.sVal, this.bVal, this.mouduleAlpha);\n }\n\n //based on the row number push one of two possible colors (white or black) into the left hand side color array\n //two possible colors linearly interpolate to three possible colors creating and asnyschronus relation between the left and right hand sides\n if (i % 2 == 0) {\n this.hVal = 0;\n this.sVal = 0;\n this.bVal = 20;\n this.colorsLeft[i] = color(this.hVal, this.sVal, this.bVal, this.mouduleAlpha);\n } else {\n this.hVal = 0;\n this.sVal = 0;\n this.bVal = 85;\n this.colorsLeft[i] = color(this.hVal, this.sVal, this.bVal, this.mouduleAlpha);\n }\n }\n\n }", "hue2rgb(p, q, t){\r\n if(t < 0) t += 1;\r\n if(t > 1) t -= 1;\r\n if(t < 1/6) return p + (q - p) * 6 * t;\r\n if(t < 1/2) return q;\r\n if(t < 2/3) return p + (q - p) * (2/3 - t) * 6;\r\n return p;\r\n }", "function getColor(magnitude) {\n switch (true) {\n case magnitude > 5:\n return \"#ea2c2c\";\n case magnitude > 4:\n return \"#ea822c\";\n case magnitude > 3:\n return \"#ee9c00\";\n case magnitude > 2:\n return \"#eecc00\";\n case magnitude > 1:\n return \"#d4ee00\";\n default:\n return \"#98ee00\";\n } \n }", "function colorTiles(index) {\n switch(true) {\n case (index < 10):\n return 'linear-gradient(to right,#e6007e 0,#a81815 100%)'\n break;\n case (index>=10 && index<20):\n return 'linear-gradient(to right,#009fe3 0,#522583 100%)'\n break;\n case (index>=20 && index<30):\n return 'linear-gradient(to right,#f2e500 0,#007f2d 100%)'\n break;\n case (index>=30 && index<40):\n return 'linear-gradient(to right,#ffed00 0,#e74011 100%)'\n break;\n case (index>=40 && index<50):\n return 'linear-gradient(to right, rgba(169,49,149,1) 0%, rgba(121,8,103,1) 100%)'\n break;\n case (index>=50 && index<60):\n return 'linear-gradient(to right, rgba(240,79,33,1) 0%, rgba(155,35,0,1) 100%)'\n break;\n case (index>=60 && index<70):\n return 'linear-gradient(to right, rgba(144,172,189,1) 0%, rgba(59,102,127,1) 100%)'\n break;\n case (index>=70 && index<numberOfTiles):\n return 'linear-gradient(to right, rgba(81,51,151,1) 0%, rgba(40,14,102,1) 100%)'\n break;\n }\n}", "function getColor(d) {\r\n return d > 100 ? '#800026' :\r\n d > 80 ? '#BD0026' :\r\n d > 50 ? '#E31A1C' :\r\n d > 35 ? '#FC4E2A' :\r\n d > 20 ? '#FD8D3C' :\r\n d > 10 ? '#FEB24C' :\r\n d > 5 ? '#FED976' :\r\n '#FFEDA0';\r\n}", "function makeColorScale(data){\n var colorClasses = [\n \"#f7de9c\",\n \"#e1bf61\",\n \"#b59334\",\n \"#7c5f10\",\n \"#56420c\"\n ];\n\n //create color scale generator\n var colorScale = d3.scale.quantile()\n .range(colorClasses);\n\n console.log(data.length);\n\n //build array of all values of the expressed attribute\n var domainArray = data[expressed];\n\n console.log(csvArray);\n\n for (var j=0; j<csvArray.length; j++) {\n\n }\n\n //assign array of expressed values as scale domain\n colorScale.domain(csvArray);\n\n console.log(colorScale.quantiles());\n\n return colorScale;\n\n }", "function paint (value, colscale){\n svg.selectAll(\"circle\")\n .attr(\"title\", function(d) {return d;})\n .style(\"fill\", function (d, i){\n return d3.rgb(colscale(value[i]));});\n}", "function getColor(d) {\n return d > 35 ? '#800026' :\n d > 30 ? '#BD0026' :\n d > 25 ? '#E31A1C' :\n d > 20 ? '#FC4E2A' :\n d > 15 ? '#FD8D3C' :\n d > 10 ? '#FEB24C' :\n d > 5 ? '#FED976' :\n '#FFFFFF';\n}", "function getColor(mag) {\n return mag >= 5 ? 'red' :\n mag >= 4 ? 'salmon' :\n mag >= 3 ? 'orange' :\n mag >= 2 ? 'gold' :\n mag >= 1 ? 'greenyellow' :\n 'green';\n }", "getColor(value) {\n // Test Max\n if (value === 255) {\n console.log(\"MAX!\");\n }\n let percent = (value) / 255 * 50;\n // return 'rgb(V, V, V)'.replace(/V/g, 255 - value);\n return 'hsl(H, 100%, P%)'.replace(/H/g, 255 - value).replace(/P/g, percent);\n }", "function getColor(magnitude) {\n switch (true) {\n case magnitude > 5:\n return \"#ea2c2c\";\n case magnitude > 4:\n return \"#ea822c\";\n case magnitude > 3:\n return \"#ee9c00\";\n case magnitude > 2:\n return \"#eecc00\";\n case magnitude > 1:\n return \"#d4ee00\";\n default:\n return \"#98ee00\";\n }\n }", "function colorCube()\n{\n quad( 1, 0, 3, 2 );\n quad( 2, 3, 7, 6 );\n quad( 3, 0, 4, 7 );\n quad( 6, 5, 1, 2 );\n quad( 4, 5, 6, 7 );\n quad( 5, 4, 0, 1 );\n}", "function getColor(mag) {\n if (mag > 5) {\n return \"Purple\";\n }\n if (mag > 4) {\n return \"FireBrick\";\n }\n if (mag > 3) {\n return \"OrangeRed\"\n }\n if (mag > 2) {\n return \"Salmon\";\n }\n if (mag > 1) {\n return \"Yellow\";\n }\n return \"LightGreen\";\n}", "function color5(d) {\n return d > 2000 ? '#E65100' :\n d > 1600 ? '#FB8C00' :\n d > 1400 ? '#FFB74D' :\n d > 1000 ? '#FFCC80' :\n '#FFE0B2';\n }", "function GaugeBarColor (s) {\r\n\t\t\tvar\tcolorScale = d3.scaleLinear()\r\n\t\t\t\t.domain([0,9])\r\n\t\t\t\t.range([0,255]);\r\n\t\t\t//red is (255,0,0), yellow is (255,255,0), green is (0,255,0)\r\n\t\t\t//between red and yellow we need to add to the green channel\r\n\t\t\t//between yellow and green we need to subtract from the red channel\r\n\t\t\t//had to mix some blue at 10% to make the dark green stand out from a (0,255,0)\r\n\t\t\tif(s < 4.5) {\r\n\t\t\t\treturn \"rgb(255,\" + 2 * Math.round(colorScale(s)) + \",0)\"\r\n\t\t\t} else {\r\n\t\t\t\treturn \"rgb(\" + Math.round((255-(colorScale(s)+1))) + \",255,\"+ Math.round(colorScale(s)*0.2)+\")\"\r\n\t\t\t};\r\n\t\t}", "function getColor(magnitude) {\n switch (true) {\n case magnitude > 5:\n return \"#ea2c2c\";\n case magnitude > 4:\n return \"#ea822c\";\n case magnitude > 3:\n return \"#ee9c00\";\n case magnitude > 2:\n return \"#eecc00\";\n case magnitude > 1:\n return \"#d4ee00\";\n default:\n return \"#98ee00\";\n }\n}", "function colorCube()\n{\n quad( 1, 0, 3, 2 );\n quad( 2, 3, 7, 6 );\n quad( 3, 0, 4, 7 );\n quad( 6, 5, 1, 2 );\n quad( 4, 5, 6, 7 );\n quad( 5, 4, 0, 1 );\n}", "function getColor(magnitude) {\r\n switch (true) {\r\n case magnitude > 5:\r\n return \"#ea2c2c\";\r\n case magnitude > 4:\r\n return \"#ea822c\";\r\n case magnitude > 3:\r\n return \"#ee9c00\";\r\n case magnitude > 2:\r\n return \"#eecc00\";\r\n case magnitude > 1:\r\n return \"#d4ee00\";\r\n default:\r\n return \"#98ee00\";\r\n }\r\n }", "function interpolateColor(d) {\n\t\t\t\t\t\treturn d['mtd3-color'] ? d['mtd3-color'] : colorPalette(d);\n\t\t\t\t\t}", "function getColor(d){\n return d > 5 ? \"darkred\":\n d > 4 ? \"darkorange\":\n d > 3 ? \"orange\":\n d > 2 ? \"yellow\":\n d > 1 ? \"yellowgreen\":\n \"green\";\n }", "function setColor(magnitude) {\n \tif (magnitude > 5) {\n \treturn '#FF0000'\n \t} else if (magnitude > 4) {\n \treturn '#FF7C00'\n \t} else if (magnitude > 3) {\n \treturn '#FFBE00'\n \t} else if (magnitude > 2) {\n \treturn '#FFF500'\n \t} else if (magnitude > 1) {\n \treturn '#AEFF00'\n \t} else {\n \treturn '#39FF00'\n \t}\n}", "function codeColorRed(value, maxValue){\n var r = Math.floor(value/maxValue * 255);\n var g = 0;\n var b = 0;\n return color= \"rgb(\"+r+\" ,\"+g+\",\"+ b+\")\";\n}", "function getColor(d) {\n \n if (d > 800000.00) {\n return 'seagreen';\n } else if ( d > 700000.00 ){\n return 'orange';\n } else if (d > 600000.00) {\n return 'red' ;\n } else if (d > 500000.00) {\n return 'brown' ;\n } else if (d > 400000.00) {\n return 'lavender'; \n } else if (d > 300000.00) {\n return 'yellow'; \n } else if (d > 150000.00) {\n return 'pink';\n } else if (d > 100000.00) {\n return 'aqua';\n } else if (d > 50000.00) {\n return 'coral';\n } else {\n return 'slategrey';\n } \n}", "function getColor(d) {\n return d > d6 ? '#800026' :\n d > d5 ? '#BD0026' :\n d > d4 ? '#FC4E2A' :\n d > d3 ? '#FD8D3C' :\n d > d2 ? '#FEB24C' :\n d > d1 ? '#FED976' :\n '#FFEDA0';\n // d > 1000 ? '#800026' :\n // d > 500 ? '#BD0026' :\n // d > 200 ? '#E31A1C' :\n // d > 100 ? '#FC4E2A' :\n // d > 50 ? '#FD8D3C' :\n // d > 20 ? '#FEB24C' :\n // d > 10 ? '#FED976' :\n // '#FFEDA0';\n }", "function colorRange(magnitude) {\n\n switch (true) {\n case magnitude >= 5:\n return '#ff0000';\n break;\n\n case magnitude >= 4:\n return '#ff5900';\n break;\n \n case magnitude >= 3:\n return '#ee9c00';\n break;\n\n case magnitude >= 2:\n return '#eecc00';\n break;\n\n case magnitude >= 1:\n return '#d4ee00';\n break;\n\n default:\n return '#98ee00';\n };\n}", "function getColor(magnitude) {\r\n //Condtionals for magnitude \r\n if (magnitude >= 5) {\r\n return \"red\";\r\n }\r\n else if (magnitude >= 4){\r\n return \"peru\";\r\n }\r\n else if (magnitude >= 3) {\r\n return \"darkorange\";\r\n }\r\n else if (magnitude >= 2) {\r\n return \"yellow\";\r\n }\r\n else if (magnitude >= 1) {\r\n return \"yellowgreen\";\r\n }\r\n else {\r\n return \"green\";\r\n }\r\n}", "function color_pct (ct) {\r\n return ct == \"Muy alto\" ? '#08519c':\r\n ct == \"Alto\" ? '#3182bd':\r\n ct == \"Medio\" ? '#6baed6':\r\n\t\t ct == \"Bajo\" ? '#bdd7e7':\r\n ct == \"Muy bajo\" ? '#eff3ff':\r\n '#fdfcfd';\r\n}", "function hue2rgb( p, q, h ) {\r\nh = ( h + 1 ) % 1;\r\nif ( h * 6 < 1 ) {\r\nreturn p + (q - p) * 6 * h;\r\n}\r\nif ( h * 2 < 1) {\r\nreturn q;\r\n}\r\nif ( h * 3 < 2 ) {\r\nreturn p + (q - p) * ((2/3) - h) * 6;\r\n}\r\nreturn p;\r\n}", "function colorMe(value, ranges) {\n for (let i = 0; i <= ranges.length; i++) {\n if (value <= ranges[i]) {\n if (i === 0) {\n return colors[i];\n } else {\n return colors[i - 1];\n }\n }\n }\n }", "function getColor(magnitude) {\n switch (true) {\n case magnitude > 5:\n return \"#581845\";\n case magnitude > 4:\n return \"#900C3F\";\n case magnitude > 3:\n return \"#C70039\";\n case magnitude > 2:\n return \"#FF5733\";\n case magnitude > 1:\n return \"#FFC300\";\n default:\n return \"#DAF7A6\";\n }\n }", "function getColor(d) {\n\n\treturn d > 1000000000 ? '#800026' :\n\t\t d > 500000000 ? '#BD0026' :\n\t\t d > 200000000 ? '#E31A1C' :\n\t\t d > 100000000 ? '#FC4E2A' :\n\t\t d > 50000000 ? '#FD8D3C' :\n\t\t d > 20000000 ? '#FEB24C' :\n\t\t d > 10000000 ? '#FED976' :\n\t\t\t\t\t '#FFEDA0';\n}", "function color(magnitude){\n\n if (magnitude > 5){\n return 'red'\n } else if (magnitude > 4){\n return 'orange'\n } else if (magnitude > 3){\n return 'yellow'\n } else if (magnitude > 2){\n return 'green'\n } else if (magnitude > 1){\n return 'lightblue'\n } else {\n return 'purple'\n }\n }", "function getColor(d) {\n return d > 5 ? '#f45f42' :\n d > 4 ? '#f48641' :\n d > 3 ? '#f49a41' :\n d > 2 ? '#f4cd41' :\n d > 1 ? '#f4f141' :\n '#97f441';\n}", "function getColor(d) {\n/*\t\t\treturn d > 600 ? '#d98472' :\n\t\t\t\t d > 304 ? '#e4b76e' :\n\t\t\t '#bcc64d';*/\n\t\t\treturn d > 600 ? '#ca6554' :\n\t\t\t\t d > 304 ? '#d6877a' :\n\t\t\t '#e7bab3';\n\t\t}", "function getColor(d)\n\t\t{\n\t\t\tvar fill=['#006837','#1a9850','#66bd63','#a6d96a','#d9ef8b','#ffffbf','#fee08b','#fdae61','#f46d43','d73027'];\n\t\t\tvar mid1 = min;\n\t\t\tvar blue=['#0281a1','#0fafd7','#68d9f5'];\n\t\t\tvar green =['#006837','#1a9850','#66bd63','#a6d96a'];\n\t\t\tvar red = ['#ffffbf','#fee08b','#fdae61','#f46d43','d73027'];\n\t\t\tvar mid2 = min+(max-min)*0.35;\n\t\t\tvar mid3 = min;\n\t\t\tif(d<mid1){return fill[0]}\n\t\t\tif(d>mid2){return fill[fill.length-1]}\n\t\t\tvar he = Math.floor((d-mid1)/(mid2-mid1)*fill.length)%fill.length;\n\t\t\treturn fill[he];\n\t\t}", "function getColor(magnitude) {\n switch (true) {\n case magnitude > 5:\n return \"#ea2c2c\";\n case magnitude > 4:\n return \"#ea822c\";\n case magnitude > 3:\n return \"#ee9c00\";\n case magnitude > 2:\n return \"#eecc00\";\n case magnitude > 1:\n return \"#d4ee00\";\n default:\n return \"#98ee00\";\n }\n }", "function getColor (magnitude){\r\n switch (true){\r\n case magnitude >6:\r\n return \"#581845\"\r\n case magnitude >5:\r\n return \"#900C3F\"\r\n case magnitude >4:\r\n return \"#C70039\"\r\n case magnitude >3:\r\n return \"#FF5733\"\r\n case magnitude >2:\r\n return \"#FFC300\"\r\n case magnitude >1:\r\n return \"#DAF7A6\"\r\n \r\n }\r\n }", "function getColor(magnitude) {\n switch (true) {\n case magnitude > 5:\n return \"#ea2c2c\";\n case magnitude > 4:\n return \"#ea822c\";\n case magnitude > 3:\n return \"#ee9c00\";\n case magnitude > 2:\n return \"#eecc00\";\n case magnitude > 1:\n return \"#d4ee00\";\n default:\n return \"#98ee00\";\n }\n }" ]
[ "0.6680838", "0.66190636", "0.64805543", "0.6340362", "0.6220522", "0.61402154", "0.60816324", "0.60437167", "0.601559", "0.6007904", "0.59848905", "0.5972039", "0.59578395", "0.5955354", "0.5952719", "0.5950934", "0.5935897", "0.5934338", "0.5905693", "0.58892167", "0.58891255", "0.58648425", "0.58582", "0.58397955", "0.5815596", "0.5803529", "0.5802991", "0.580237", "0.5801575", "0.579781", "0.57796866", "0.5765481", "0.5761936", "0.5744043", "0.5735147", "0.57198334", "0.57117575", "0.5703261", "0.5700622", "0.56860846", "0.5679619", "0.5675535", "0.567126", "0.56642103", "0.56497735", "0.56418383", "0.56417733", "0.5637989", "0.56341463", "0.56335056", "0.5625702", "0.5625158", "0.56172997", "0.56151485", "0.56071347", "0.5605862", "0.5603921", "0.5601643", "0.5594756", "0.55941224", "0.5591255", "0.5589259", "0.5589102", "0.5585376", "0.5582355", "0.5581434", "0.5580665", "0.5580099", "0.55792445", "0.55788314", "0.5576085", "0.55673516", "0.5566161", "0.5563015", "0.5562681", "0.55592245", "0.55565625", "0.5555423", "0.55544055", "0.55518275", "0.55486846", "0.55466473", "0.5541676", "0.5537051", "0.5536523", "0.55358946", "0.55351406", "0.5534059", "0.5531776", "0.55312675", "0.5531186", "0.5529427", "0.5528244", "0.55277216", "0.5522438", "0.5522399", "0.55222934", "0.55205715", "0.55202585", "0.5519337" ]
0.6826832
0